serviceworker2.js 604 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994
  1. /*! Copyright (c) 2023 WhatsApp Inc. All Rights Reserved. */
  2. (() => {
  3. var e = {
  4. 4462: (e, t, n) => {
  5. !function (e) {
  6. "use strict";
  7. var t = function (e) {
  8. var t, n = new Float64Array(16);
  9. if (e) for (t = 0; t < e.length; t++) n[t] = e[t];
  10. return n
  11. }, r = function () {
  12. throw new Error("no PRNG")
  13. }, o = new Uint8Array(16), i = new Uint8Array(32);
  14. i[0] = 9;
  15. var s = t(), a = t([1]), c = t([56129, 1]),
  16. l = t([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]),
  17. u = t([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]),
  18. d = t([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]),
  19. _ = t([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]),
  20. f = t([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
  21. function h(e, t, n, r) {
  22. e[t] = n >> 24 & 255, e[t + 1] = n >> 16 & 255, e[t + 2] = n >> 8 & 255, e[t + 3] = 255 & n, e[t + 4] = r >> 24 & 255, e[t + 5] = r >> 16 & 255, e[t + 6] = r >> 8 & 255, e[t + 7] = 255 & r
  23. }
  24. function p(e, t, n, r, o) {
  25. var i, s = 0;
  26. for (i = 0; i < o; i++) s |= e[t + i] ^ n[r + i];
  27. return (1 & s - 1 >>> 8) - 1
  28. }
  29. function b(e, t, n, r) {
  30. return p(e, t, n, r, 16)
  31. }
  32. function m(e, t, n, r) {
  33. return p(e, t, n, r, 32)
  34. }
  35. function g(e, t, n, r) {
  36. !function (e, t, n, r) {
  37. for (var o, i = 255 & r[0] | (255 & r[1]) << 8 | (255 & r[2]) << 16 | (255 & r[3]) << 24, s = 255 & n[0] | (255 & n[1]) << 8 | (255 & n[2]) << 16 | (255 & n[3]) << 24, a = 255 & n[4] | (255 & n[5]) << 8 | (255 & n[6]) << 16 | (255 & n[7]) << 24, c = 255 & n[8] | (255 & n[9]) << 8 | (255 & n[10]) << 16 | (255 & n[11]) << 24, l = 255 & n[12] | (255 & n[13]) << 8 | (255 & n[14]) << 16 | (255 & n[15]) << 24, u = 255 & r[4] | (255 & r[5]) << 8 | (255 & r[6]) << 16 | (255 & r[7]) << 24, d = 255 & t[0] | (255 & t[1]) << 8 | (255 & t[2]) << 16 | (255 & t[3]) << 24, _ = 255 & t[4] | (255 & t[5]) << 8 | (255 & t[6]) << 16 | (255 & t[7]) << 24, f = 255 & t[8] | (255 & t[9]) << 8 | (255 & t[10]) << 16 | (255 & t[11]) << 24, h = 255 & t[12] | (255 & t[13]) << 8 | (255 & t[14]) << 16 | (255 & t[15]) << 24, p = 255 & r[8] | (255 & r[9]) << 8 | (255 & r[10]) << 16 | (255 & r[11]) << 24, b = 255 & n[16] | (255 & n[17]) << 8 | (255 & n[18]) << 16 | (255 & n[19]) << 24, m = 255 & n[20] | (255 & n[21]) << 8 | (255 & n[22]) << 16 | (255 & n[23]) << 24, g = 255 & n[24] | (255 & n[25]) << 8 | (255 & n[26]) << 16 | (255 & n[27]) << 24, v = 255 & n[28] | (255 & n[29]) << 8 | (255 & n[30]) << 16 | (255 & n[31]) << 24, y = 255 & r[12] | (255 & r[13]) << 8 | (255 & r[14]) << 16 | (255 & r[15]) << 24, w = i, S = s, E = a, j = c, k = l, A = u, T = d, x = _, P = f, I = h, O = p, U = b, R = m, C = g, D = v, M = y, $ = 0; $ < 20; $ += 2) w ^= (o = (R ^= (o = (P ^= (o = (k ^= (o = w + R | 0) << 7 | o >>> 25) + w | 0) << 9 | o >>> 23) + k | 0) << 13 | o >>> 19) + P | 0) << 18 | o >>> 14, A ^= (o = (S ^= (o = (C ^= (o = (I ^= (o = A + S | 0) << 7 | o >>> 25) + A | 0) << 9 | o >>> 23) + I | 0) << 13 | o >>> 19) + C | 0) << 18 | o >>> 14, O ^= (o = (T ^= (o = (E ^= (o = (D ^= (o = O + T | 0) << 7 | o >>> 25) + O | 0) << 9 | o >>> 23) + D | 0) << 13 | o >>> 19) + E | 0) << 18 | o >>> 14, M ^= (o = (U ^= (o = (x ^= (o = (j ^= (o = M + U | 0) << 7 | o >>> 25) + M | 0) << 9 | o >>> 23) + j | 0) << 13 | o >>> 19) + x | 0) << 18 | o >>> 14, w ^= (o = (j ^= (o = (E ^= (o = (S ^= (o = w + j | 0) << 7 | o >>> 25) + w | 0) << 9 | o >>> 23) + S | 0) << 13 | o >>> 19) + E | 0) << 18 | o >>> 14, A ^= (o = (k ^= (o = (x ^= (o = (T ^= (o = A + k | 0) << 7 | o >>> 25) + A | 0) << 9 | o >>> 23) + T | 0) << 13 | o >>> 19) + x | 0) << 18 | o >>> 14, O ^= (o = (I ^= (o = (P ^= (o = (U ^= (o = O + I | 0) << 7 | o >>> 25) + O | 0) << 9 | o >>> 23) + U | 0) << 13 | o >>> 19) + P | 0) << 18 | o >>> 14, M ^= (o = (D ^= (o = (C ^= (o = (R ^= (o = M + D | 0) << 7 | o >>> 25) + M | 0) << 9 | o >>> 23) + R | 0) << 13 | o >>> 19) + C | 0) << 18 | o >>> 14;
  38. w = w + i | 0, S = S + s | 0, E = E + a | 0, j = j + c | 0, k = k + l | 0, A = A + u | 0, T = T + d | 0, x = x + _ | 0, P = P + f | 0, I = I + h | 0, O = O + p | 0, U = U + b | 0, R = R + m | 0, C = C + g | 0, D = D + v | 0, M = M + y | 0, e[0] = w >>> 0 & 255, e[1] = w >>> 8 & 255, e[2] = w >>> 16 & 255, e[3] = w >>> 24 & 255, e[4] = S >>> 0 & 255, e[5] = S >>> 8 & 255, e[6] = S >>> 16 & 255, e[7] = S >>> 24 & 255, e[8] = E >>> 0 & 255, e[9] = E >>> 8 & 255, e[10] = E >>> 16 & 255, e[11] = E >>> 24 & 255, e[12] = j >>> 0 & 255, e[13] = j >>> 8 & 255, e[14] = j >>> 16 & 255, e[15] = j >>> 24 & 255, e[16] = k >>> 0 & 255, e[17] = k >>> 8 & 255, e[18] = k >>> 16 & 255, e[19] = k >>> 24 & 255, e[20] = A >>> 0 & 255, e[21] = A >>> 8 & 255, e[22] = A >>> 16 & 255, e[23] = A >>> 24 & 255, e[24] = T >>> 0 & 255, e[25] = T >>> 8 & 255, e[26] = T >>> 16 & 255, e[27] = T >>> 24 & 255, e[28] = x >>> 0 & 255, e[29] = x >>> 8 & 255, e[30] = x >>> 16 & 255, e[31] = x >>> 24 & 255, e[32] = P >>> 0 & 255, e[33] = P >>> 8 & 255, e[34] = P >>> 16 & 255, e[35] = P >>> 24 & 255, e[36] = I >>> 0 & 255, e[37] = I >>> 8 & 255, e[38] = I >>> 16 & 255, e[39] = I >>> 24 & 255, e[40] = O >>> 0 & 255, e[41] = O >>> 8 & 255, e[42] = O >>> 16 & 255, e[43] = O >>> 24 & 255, e[44] = U >>> 0 & 255, e[45] = U >>> 8 & 255, e[46] = U >>> 16 & 255, e[47] = U >>> 24 & 255, e[48] = R >>> 0 & 255, e[49] = R >>> 8 & 255, e[50] = R >>> 16 & 255, e[51] = R >>> 24 & 255, e[52] = C >>> 0 & 255, e[53] = C >>> 8 & 255, e[54] = C >>> 16 & 255, e[55] = C >>> 24 & 255, e[56] = D >>> 0 & 255, e[57] = D >>> 8 & 255, e[58] = D >>> 16 & 255, e[59] = D >>> 24 & 255, e[60] = M >>> 0 & 255, e[61] = M >>> 8 & 255, e[62] = M >>> 16 & 255, e[63] = M >>> 24 & 255
  39. }(e, t, n, r)
  40. }
  41. function v(e, t, n, r) {
  42. !function (e, t, n, r) {
  43. for (var o, i = 255 & r[0] | (255 & r[1]) << 8 | (255 & r[2]) << 16 | (255 & r[3]) << 24, s = 255 & n[0] | (255 & n[1]) << 8 | (255 & n[2]) << 16 | (255 & n[3]) << 24, a = 255 & n[4] | (255 & n[5]) << 8 | (255 & n[6]) << 16 | (255 & n[7]) << 24, c = 255 & n[8] | (255 & n[9]) << 8 | (255 & n[10]) << 16 | (255 & n[11]) << 24, l = 255 & n[12] | (255 & n[13]) << 8 | (255 & n[14]) << 16 | (255 & n[15]) << 24, u = 255 & r[4] | (255 & r[5]) << 8 | (255 & r[6]) << 16 | (255 & r[7]) << 24, d = 255 & t[0] | (255 & t[1]) << 8 | (255 & t[2]) << 16 | (255 & t[3]) << 24, _ = 255 & t[4] | (255 & t[5]) << 8 | (255 & t[6]) << 16 | (255 & t[7]) << 24, f = 255 & t[8] | (255 & t[9]) << 8 | (255 & t[10]) << 16 | (255 & t[11]) << 24, h = 255 & t[12] | (255 & t[13]) << 8 | (255 & t[14]) << 16 | (255 & t[15]) << 24, p = 255 & r[8] | (255 & r[9]) << 8 | (255 & r[10]) << 16 | (255 & r[11]) << 24, b = 255 & n[16] | (255 & n[17]) << 8 | (255 & n[18]) << 16 | (255 & n[19]) << 24, m = 255 & n[20] | (255 & n[21]) << 8 | (255 & n[22]) << 16 | (255 & n[23]) << 24, g = 255 & n[24] | (255 & n[25]) << 8 | (255 & n[26]) << 16 | (255 & n[27]) << 24, v = 255 & n[28] | (255 & n[29]) << 8 | (255 & n[30]) << 16 | (255 & n[31]) << 24, y = 255 & r[12] | (255 & r[13]) << 8 | (255 & r[14]) << 16 | (255 & r[15]) << 24, w = 0; w < 20; w += 2) i ^= (o = (m ^= (o = (f ^= (o = (l ^= (o = i + m | 0) << 7 | o >>> 25) + i | 0) << 9 | o >>> 23) + l | 0) << 13 | o >>> 19) + f | 0) << 18 | o >>> 14, u ^= (o = (s ^= (o = (g ^= (o = (h ^= (o = u + s | 0) << 7 | o >>> 25) + u | 0) << 9 | o >>> 23) + h | 0) << 13 | o >>> 19) + g | 0) << 18 | o >>> 14, p ^= (o = (d ^= (o = (a ^= (o = (v ^= (o = p + d | 0) << 7 | o >>> 25) + p | 0) << 9 | o >>> 23) + v | 0) << 13 | o >>> 19) + a | 0) << 18 | o >>> 14, y ^= (o = (b ^= (o = (_ ^= (o = (c ^= (o = y + b | 0) << 7 | o >>> 25) + y | 0) << 9 | o >>> 23) + c | 0) << 13 | o >>> 19) + _ | 0) << 18 | o >>> 14, i ^= (o = (c ^= (o = (a ^= (o = (s ^= (o = i + c | 0) << 7 | o >>> 25) + i | 0) << 9 | o >>> 23) + s | 0) << 13 | o >>> 19) + a | 0) << 18 | o >>> 14, u ^= (o = (l ^= (o = (_ ^= (o = (d ^= (o = u + l | 0) << 7 | o >>> 25) + u | 0) << 9 | o >>> 23) + d | 0) << 13 | o >>> 19) + _ | 0) << 18 | o >>> 14, p ^= (o = (h ^= (o = (f ^= (o = (b ^= (o = p + h | 0) << 7 | o >>> 25) + p | 0) << 9 | o >>> 23) + b | 0) << 13 | o >>> 19) + f | 0) << 18 | o >>> 14, y ^= (o = (v ^= (o = (g ^= (o = (m ^= (o = y + v | 0) << 7 | o >>> 25) + y | 0) << 9 | o >>> 23) + m | 0) << 13 | o >>> 19) + g | 0) << 18 | o >>> 14;
  44. e[0] = i >>> 0 & 255, e[1] = i >>> 8 & 255, e[2] = i >>> 16 & 255, e[3] = i >>> 24 & 255, e[4] = u >>> 0 & 255, e[5] = u >>> 8 & 255, e[6] = u >>> 16 & 255, e[7] = u >>> 24 & 255, e[8] = p >>> 0 & 255, e[9] = p >>> 8 & 255, e[10] = p >>> 16 & 255, e[11] = p >>> 24 & 255, e[12] = y >>> 0 & 255, e[13] = y >>> 8 & 255, e[14] = y >>> 16 & 255, e[15] = y >>> 24 & 255, e[16] = d >>> 0 & 255, e[17] = d >>> 8 & 255, e[18] = d >>> 16 & 255, e[19] = d >>> 24 & 255, e[20] = _ >>> 0 & 255, e[21] = _ >>> 8 & 255, e[22] = _ >>> 16 & 255, e[23] = _ >>> 24 & 255, e[24] = f >>> 0 & 255, e[25] = f >>> 8 & 255, e[26] = f >>> 16 & 255, e[27] = f >>> 24 & 255, e[28] = h >>> 0 & 255, e[29] = h >>> 8 & 255, e[30] = h >>> 16 & 255, e[31] = h >>> 24 & 255
  45. }(e, t, n, r)
  46. }
  47. var y = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);
  48. function w(e, t, n, r, o, i, s) {
  49. var a, c, l = new Uint8Array(16), u = new Uint8Array(64);
  50. for (c = 0; c < 16; c++) l[c] = 0;
  51. for (c = 0; c < 8; c++) l[c] = i[c];
  52. for (; o >= 64;) {
  53. for (g(u, l, s, y), c = 0; c < 64; c++) e[t + c] = n[r + c] ^ u[c];
  54. for (a = 1, c = 8; c < 16; c++) a = a + (255 & l[c]) | 0, l[c] = 255 & a, a >>>= 8;
  55. o -= 64, t += 64, r += 64
  56. }
  57. if (o > 0) for (g(u, l, s, y), c = 0; c < o; c++) e[t + c] = n[r + c] ^ u[c];
  58. return 0
  59. }
  60. function S(e, t, n, r, o) {
  61. var i, s, a = new Uint8Array(16), c = new Uint8Array(64);
  62. for (s = 0; s < 16; s++) a[s] = 0;
  63. for (s = 0; s < 8; s++) a[s] = r[s];
  64. for (; n >= 64;) {
  65. for (g(c, a, o, y), s = 0; s < 64; s++) e[t + s] = c[s];
  66. for (i = 1, s = 8; s < 16; s++) i = i + (255 & a[s]) | 0, a[s] = 255 & i, i >>>= 8;
  67. n -= 64, t += 64
  68. }
  69. if (n > 0) for (g(c, a, o, y), s = 0; s < n; s++) e[t + s] = c[s];
  70. return 0
  71. }
  72. function E(e, t, n, r, o) {
  73. var i = new Uint8Array(32);
  74. v(i, r, o, y);
  75. for (var s = new Uint8Array(8), a = 0; a < 8; a++) s[a] = r[a + 16];
  76. return S(e, t, n, s, i)
  77. }
  78. function j(e, t, n, r, o, i, s) {
  79. var a = new Uint8Array(32);
  80. v(a, i, s, y);
  81. for (var c = new Uint8Array(8), l = 0; l < 8; l++) c[l] = i[l + 16];
  82. return w(e, t, n, r, o, c, a)
  83. }
  84. var k = function (e) {
  85. var t, n, r, o, i, s, a, c;
  86. this.buffer = new Uint8Array(16), this.r = new Uint16Array(10), this.h = new Uint16Array(10), this.pad = new Uint16Array(8), this.leftover = 0, this.fin = 0, t = 255 & e[0] | (255 & e[1]) << 8, this.r[0] = 8191 & t, n = 255 & e[2] | (255 & e[3]) << 8, this.r[1] = 8191 & (t >>> 13 | n << 3), r = 255 & e[4] | (255 & e[5]) << 8, this.r[2] = 7939 & (n >>> 10 | r << 6), o = 255 & e[6] | (255 & e[7]) << 8, this.r[3] = 8191 & (r >>> 7 | o << 9), i = 255 & e[8] | (255 & e[9]) << 8, this.r[4] = 255 & (o >>> 4 | i << 12), this.r[5] = i >>> 1 & 8190, s = 255 & e[10] | (255 & e[11]) << 8, this.r[6] = 8191 & (i >>> 14 | s << 2), a = 255 & e[12] | (255 & e[13]) << 8, this.r[7] = 8065 & (s >>> 11 | a << 5), c = 255 & e[14] | (255 & e[15]) << 8, this.r[8] = 8191 & (a >>> 8 | c << 8), this.r[9] = c >>> 5 & 127, this.pad[0] = 255 & e[16] | (255 & e[17]) << 8, this.pad[1] = 255 & e[18] | (255 & e[19]) << 8, this.pad[2] = 255 & e[20] | (255 & e[21]) << 8, this.pad[3] = 255 & e[22] | (255 & e[23]) << 8, this.pad[4] = 255 & e[24] | (255 & e[25]) << 8, this.pad[5] = 255 & e[26] | (255 & e[27]) << 8, this.pad[6] = 255 & e[28] | (255 & e[29]) << 8, this.pad[7] = 255 & e[30] | (255 & e[31]) << 8
  87. };
  88. function A(e, t, n, r, o, i) {
  89. var s = new k(i);
  90. return s.update(n, r, o), s.finish(e, t), 0
  91. }
  92. function T(e, t, n, r, o, i) {
  93. var s = new Uint8Array(16);
  94. return A(s, 0, n, r, o, i), b(e, t, s, 0)
  95. }
  96. function x(e, t, n, r, o) {
  97. var i;
  98. if (n < 32) return -1;
  99. for (j(e, 0, t, 0, n, r, o), A(e, 16, e, 32, n - 32, e), i = 0; i < 16; i++) e[i] = 0;
  100. return 0
  101. }
  102. function P(e, t, n, r, o) {
  103. var i, s = new Uint8Array(32);
  104. if (n < 32) return -1;
  105. if (E(s, 0, 32, r, o), 0 !== T(t, 16, t, 32, n - 32, s)) return -1;
  106. for (j(e, 0, t, 0, n, r, o), i = 0; i < 32; i++) e[i] = 0;
  107. return 0
  108. }
  109. function I(e, t) {
  110. var n;
  111. for (n = 0; n < 16; n++) e[n] = 0 | t[n]
  112. }
  113. function O(e) {
  114. var t, n, r = 1;
  115. for (t = 0; t < 16; t++) n = e[t] + r + 65535, r = Math.floor(n / 65536), e[t] = n - 65536 * r;
  116. e[0] += r - 1 + 37 * (r - 1)
  117. }
  118. function U(e, t, n) {
  119. for (var r, o = ~(n - 1), i = 0; i < 16; i++) r = o & (e[i] ^ t[i]), e[i] ^= r, t[i] ^= r
  120. }
  121. function R(e, n) {
  122. var r, o, i, s = t(), a = t();
  123. for (r = 0; r < 16; r++) a[r] = n[r];
  124. for (O(a), O(a), O(a), o = 0; o < 2; o++) {
  125. for (s[0] = a[0] - 65517, r = 1; r < 15; r++) s[r] = a[r] - 65535 - (s[r - 1] >> 16 & 1), s[r - 1] &= 65535;
  126. s[15] = a[15] - 32767 - (s[14] >> 16 & 1), i = s[15] >> 16 & 1, s[14] &= 65535, U(a, s, 1 - i)
  127. }
  128. for (r = 0; r < 16; r++) e[2 * r] = 255 & a[r], e[2 * r + 1] = a[r] >> 8
  129. }
  130. function C(e, t) {
  131. var n = new Uint8Array(32), r = new Uint8Array(32);
  132. return R(n, e), R(r, t), m(n, 0, r, 0)
  133. }
  134. function D(e) {
  135. var t = new Uint8Array(32);
  136. return R(t, e), 1 & t[0]
  137. }
  138. function M(e, t) {
  139. var n;
  140. for (n = 0; n < 16; n++) e[n] = t[2 * n] + (t[2 * n + 1] << 8);
  141. e[15] &= 32767
  142. }
  143. function $(e, t, n) {
  144. for (var r = 0; r < 16; r++) e[r] = t[r] + n[r]
  145. }
  146. function L(e, t, n) {
  147. for (var r = 0; r < 16; r++) e[r] = t[r] - n[r]
  148. }
  149. function N(e, t, n) {
  150. var r, o, i = 0, s = 0, a = 0, c = 0, l = 0, u = 0, d = 0, _ = 0, f = 0, h = 0, p = 0, b = 0, m = 0,
  151. g = 0, v = 0, y = 0, w = 0, S = 0, E = 0, j = 0, k = 0, A = 0, T = 0, x = 0, P = 0, I = 0,
  152. O = 0, U = 0, R = 0, C = 0, D = 0, M = n[0], $ = n[1], L = n[2], N = n[3], J = n[4], B = n[5],
  153. F = n[6], K = n[7], q = n[8], z = n[9], W = n[10], G = n[11], Y = n[12], H = n[13], V = n[14],
  154. X = n[15];
  155. i += (r = t[0]) * M, s += r * $, a += r * L, c += r * N, l += r * J, u += r * B, d += r * F, _ += r * K, f += r * q, h += r * z, p += r * W, b += r * G, m += r * Y, g += r * H, v += r * V, y += r * X, s += (r = t[1]) * M, a += r * $, c += r * L, l += r * N, u += r * J, d += r * B, _ += r * F, f += r * K, h += r * q, p += r * z, b += r * W, m += r * G, g += r * Y, v += r * H, y += r * V, w += r * X, a += (r = t[2]) * M, c += r * $, l += r * L, u += r * N, d += r * J, _ += r * B, f += r * F, h += r * K, p += r * q, b += r * z, m += r * W, g += r * G, v += r * Y, y += r * H, w += r * V, S += r * X, c += (r = t[3]) * M, l += r * $, u += r * L, d += r * N, _ += r * J, f += r * B, h += r * F, p += r * K, b += r * q, m += r * z, g += r * W, v += r * G, y += r * Y, w += r * H, S += r * V, E += r * X, l += (r = t[4]) * M, u += r * $, d += r * L, _ += r * N, f += r * J, h += r * B, p += r * F, b += r * K, m += r * q, g += r * z, v += r * W, y += r * G, w += r * Y, S += r * H, E += r * V, j += r * X, u += (r = t[5]) * M, d += r * $, _ += r * L, f += r * N, h += r * J, p += r * B, b += r * F, m += r * K, g += r * q, v += r * z, y += r * W, w += r * G, S += r * Y, E += r * H, j += r * V, k += r * X, d += (r = t[6]) * M, _ += r * $, f += r * L, h += r * N, p += r * J,b += r * B,m += r * F,g += r * K,v += r * q,y += r * z,w += r * W,S += r * G,E += r * Y,j += r * H,k += r * V,A += r * X,_ += (r = t[7]) * M,f += r * $,h += r * L,p += r * N,b += r * J,m += r * B,g += r * F,v += r * K,y += r * q,w += r * z,S += r * W,E += r * G,j += r * Y,k += r * H,A += r * V,T += r * X,f += (r = t[8]) * M,h += r * $,p += r * L,b += r * N,m += r * J,g += r * B,v += r * F,y += r * K,w += r * q,S += r * z,E += r * W,j += r * G,k += r * Y,A += r * H,T += r * V,x += r * X,h += (r = t[9]) * M,p += r * $,b += r * L,m += r * N,g += r * J,v += r * B,y += r * F,w += r * K,S += r * q,E += r * z,j += r * W,k += r * G,A += r * Y,T += r * H,x += r * V,P += r * X,p += (r = t[10]) * M,b += r * $,m += r * L,g += r * N,v += r * J,y += r * B,w += r * F,S += r * K,E += r * q,j += r * z,k += r * W,A += r * G,T += r * Y,x += r * H,P += r * V,I += r * X,b += (r = t[11]) * M,m += r * $,g += r * L,v += r * N,y += r * J,w += r * B,S += r * F,E += r * K,j += r * q,k += r * z,A += r * W,T += r * G,x += r * Y,P += r * H,I += r * V,O += r * X,m += (r = t[12]) * M,g += r * $,v += r * L,y += r * N,w += r * J,S += r * B,E += r * F,j += r * K,k += r * q,A += r * z,T += r * W,x += r * G,P += r * Y,I += r * H,O += r * V,U += r * X,g += (r = t[13]) * M,v += r * $,y += r * L,w += r * N,S += r * J,E += r * B,j += r * F,k += r * K,A += r * q,T += r * z,x += r * W,P += r * G,I += r * Y,O += r * H,U += r * V,R += r * X,v += (r = t[14]) * M,y += r * $,w += r * L,S += r * N,E += r * J,j += r * B,k += r * F,A += r * K,T += r * q,x += r * z,P += r * W,I += r * G,O += r * Y,U += r * H,R += r * V,C += r * X,y += (r = t[15]) * M,s += 38 * (S += r * L),a += 38 * (E += r * N),c += 38 * (j += r * J),l += 38 * (k += r * B),u += 38 * (A += r * F),d += 38 * (T += r * K),_ += 38 * (x += r * q),f += 38 * (P += r * z),h += 38 * (I += r * W),p += 38 * (O += r * G),b += 38 * (U += r * Y),m += 38 * (R += r * H),g += 38 * (C += r * V),v += 38 * (D += r * X),i = (r = (i += 38 * (w += r * $)) + (o = 1) + 65535) - 65536 * (o = Math.floor(r / 65536)),s = (r = s + o + 65535) - 65536 * (o = Math.floor(r / 65536)),a = (r = a + o + 65535) - 65536 * (o = Math.floor(r / 65536)),c = (r = c + o + 65535) - 65536 * (o = Math.floor(r / 65536)),l = (r = l + o + 65535) - 65536 * (o = Math.floor(r / 65536)),u = (r = u + o + 65535) - 65536 * (o = Math.floor(r / 65536)),d = (r = d + o + 65535) - 65536 * (o = Math.floor(r / 65536)),_ = (r = _ + o + 65535) - 65536 * (o = Math.floor(r / 65536)),f = (r = f + o + 65535) - 65536 * (o = Math.floor(r / 65536)),h = (r = h + o + 65535) - 65536 * (o = Math.floor(r / 65536)),p = (r = p + o + 65535) - 65536 * (o = Math.floor(r / 65536)),b = (r = b + o + 65535) - 65536 * (o = Math.floor(r / 65536)),m = (r = m + o + 65535) - 65536 * (o = Math.floor(r / 65536)),g = (r = g + o + 65535) - 65536 * (o = Math.floor(r / 65536)),v = (r = v + o + 65535) - 65536 * (o = Math.floor(r / 65536)),y = (r = y + o + 65535) - 65536 * (o = Math.floor(r / 65536)),i = (r = (i += o - 1 + 37 * (o - 1)) + (o = 1) + 65535) - 65536 * (o = Math.floor(r / 65536)),s = (r = s + o + 65535) - 65536 * (o = Math.floor(r / 65536)),a = (r = a + o + 65535) - 65536 * (o = Math.floor(r / 65536)),c = (r = c + o + 65535) - 65536 * (o = Math.floor(r / 65536)),l = (r = l + o + 65535) - 65536 * (o = Math.floor(r / 65536)),u = (r = u + o + 65535) - 65536 * (o = Math.floor(r / 65536)),d = (r = d + o + 65535) - 65536 * (o = Math.floor(r / 65536)),_ = (r = _ + o + 65535) - 65536 * (o = Math.floor(r / 65536)),f = (r = f + o + 65535) - 65536 * (o = Math.floor(r / 65536)),h = (r = h + o + 65535) - 65536 * (o = Math.floor(r / 65536)),p = (r = p + o + 65535) - 65536 * (o = Math.floor(r / 65536)),b = (r = b + o + 65535) - 65536 * (o = Math.floor(r / 65536)),m = (r = m + o + 65535) - 65536 * (o = Math.floor(r / 65536)),g = (r = g + o + 65535) - 65536 * (o = Math.floor(r / 65536)),v = (r = v + o + 65535) - 65536 * (o = Math.floor(r / 65536)),y = (r = y + o + 65535) - 65536 * (o = Math.floor(r / 65536)),i += o - 1 + 37 * (o - 1),e[0] = i,e[1] = s,e[2] = a,e[3] = c,e[4] = l,e[5] = u,e[6] = d,e[7] = _,e[8] = f,e[9] = h,e[10] = p,e[11] = b,e[12] = m,e[13] = g,e[14] = v,e[15] = y
  156. }
  157. function J(e, t) {
  158. N(e, t, t)
  159. }
  160. function B(e, n) {
  161. var r, o = t();
  162. for (r = 0; r < 16; r++) o[r] = n[r];
  163. for (r = 253; r >= 0; r--) J(o, o), 2 !== r && 4 !== r && N(o, o, n);
  164. for (r = 0; r < 16; r++) e[r] = o[r]
  165. }
  166. function F(e, n) {
  167. var r, o = t();
  168. for (r = 0; r < 16; r++) o[r] = n[r];
  169. for (r = 250; r >= 0; r--) J(o, o), 1 !== r && N(o, o, n);
  170. for (r = 0; r < 16; r++) e[r] = o[r]
  171. }
  172. function K(e, n, r) {
  173. var o, i, s = new Uint8Array(32), a = new Float64Array(80), l = t(), u = t(), d = t(), _ = t(),
  174. f = t(), h = t();
  175. for (i = 0; i < 31; i++) s[i] = n[i];
  176. for (s[31] = 127 & n[31] | 64, s[0] &= 248, M(a, r), i = 0; i < 16; i++) u[i] = a[i], _[i] = l[i] = d[i] = 0;
  177. for (l[0] = _[0] = 1, i = 254; i >= 0; --i) U(l, u, o = s[i >>> 3] >>> (7 & i) & 1), U(d, _, o), $(f, l, d), L(l, l, d), $(d, u, _), L(u, u, _), J(_, f), J(h, l), N(l, d, l), N(d, u, f), $(f, l, d), L(l, l, d), J(u, l), L(d, _, h), N(l, d, c), $(l, l, _), N(d, d, l), N(l, _, h), N(_, u, a), J(u, f), U(l, u, o), U(d, _, o);
  178. for (i = 0; i < 16; i++) a[i + 16] = l[i], a[i + 32] = d[i], a[i + 48] = u[i], a[i + 64] = _[i];
  179. var p = a.subarray(32), b = a.subarray(16);
  180. return B(p, p), N(b, b, p), R(e, b), 0
  181. }
  182. function q(e, t) {
  183. return K(e, t, i)
  184. }
  185. function z(e, t) {
  186. return r(t, 32), q(e, t)
  187. }
  188. function W(e, t, n) {
  189. var r = new Uint8Array(32);
  190. return K(r, n, t), v(e, o, r, y)
  191. }
  192. k.prototype.blocks = function (e, t, n) {
  193. for (var r, o, i, s, a, c, l, u, d, _, f, h, p, b, m, g, v, y, w, S = this.fin ? 0 : 2048, E = this.h[0], j = this.h[1], k = this.h[2], A = this.h[3], T = this.h[4], x = this.h[5], P = this.h[6], I = this.h[7], O = this.h[8], U = this.h[9], R = this.r[0], C = this.r[1], D = this.r[2], M = this.r[3], $ = this.r[4], L = this.r[5], N = this.r[6], J = this.r[7], B = this.r[8], F = this.r[9]; n >= 16;) _ = d = 0, _ += (E += 8191 & (r = 255 & e[t + 0] | (255 & e[t + 1]) << 8)) * R, _ += (j += 8191 & (r >>> 13 | (o = 255 & e[t + 2] | (255 & e[t + 3]) << 8) << 3)) * (5 * F), _ += (k += 8191 & (o >>> 10 | (i = 255 & e[t + 4] | (255 & e[t + 5]) << 8) << 6)) * (5 * B), _ += (A += 8191 & (i >>> 7 | (s = 255 & e[t + 6] | (255 & e[t + 7]) << 8) << 9)) * (5 * J), d = (_ += (T += 8191 & (s >>> 4 | (a = 255 & e[t + 8] | (255 & e[t + 9]) << 8) << 12)) * (5 * N)) >>> 13, _ &= 8191, _ += (x += a >>> 1 & 8191) * (5 * L), _ += (P += 8191 & (a >>> 14 | (c = 255 & e[t + 10] | (255 & e[t + 11]) << 8) << 2)) * (5 * $), _ += (I += 8191 & (c >>> 11 | (l = 255 & e[t + 12] | (255 & e[t + 13]) << 8) << 5)) * (5 * M), _ += (O += 8191 & (l >>> 8 | (u = 255 & e[t + 14] | (255 & e[t + 15]) << 8) << 8)) * (5 * D), f = d += (_ += (U += u >>> 5 | S) * (5 * C)) >>> 13, f += E * C, f += j * R, f += k * (5 * F), f += A * (5 * B), d = (f += T * (5 * J)) >>> 13, f &= 8191, f += x * (5 * N), f += P * (5 * L), f += I * (5 * $), f += O * (5 * M), d += (f += U * (5 * D)) >>> 13, f &= 8191, h = d, h += E * D, h += j * C, h += k * R, h += A * (5 * F), d = (h += T * (5 * B)) >>> 13, h &= 8191, h += x * (5 * J), h += P * (5 * N), h += I * (5 * L), h += O * (5 * $), p = d += (h += U * (5 * M)) >>> 13, p += E * M, p += j * D, p += k * C, p += A * R, d = (p += T * (5 * F)) >>> 13, p &= 8191, p += x * (5 * B), p += P * (5 * J), p += I * (5 * N), p += O * (5 * L), b = d += (p += U * (5 * $)) >>> 13, b += E * $, b += j * M, b += k * D, b += A * C, d = (b += T * R) >>> 13, b &= 8191, b += x * (5 * F), b += P * (5 * B), b += I * (5 * J), b += O * (5 * N), m = d += (b += U * (5 * L)) >>> 13, m += E * L, m += j * $, m += k * M, m += A * D, d = (m += T * C) >>> 13, m &= 8191, m += x * R, m += P * (5 * F), m += I * (5 * B), m += O * (5 * J), g = d += (m += U * (5 * N)) >>> 13, g += E * N, g += j * L, g += k * $, g += A * M, d = (g += T * D) >>> 13, g &= 8191, g += x * C, g += P * R, g += I * (5 * F), g += O * (5 * B), v = d += (g += U * (5 * J)) >>> 13, v += E * J, v += j * N, v += k * L, v += A * $, d = (v += T * M) >>> 13, v &= 8191, v += x * D, v += P * C, v += I * R, v += O * (5 * F), y = d += (v += U * (5 * B)) >>> 13, y += E * B, y += j * J, y += k * N, y += A * L, d = (y += T * $) >>> 13, y &= 8191, y += x * M, y += P * D, y += I * C, y += O * R,w = d += (y += U * (5 * F)) >>> 13,w += E * F,w += j * B,w += k * J,w += A * N,d = (w += T * L) >>> 13,w &= 8191,w += x * $,w += P * M,w += I * D,w += O * C,E = _ = 8191 & (d = (d = ((d += (w += U * R) >>> 13) << 2) + d | 0) + (_ &= 8191) | 0),j = f += d >>>= 13,k = h &= 8191,A = p &= 8191,T = b &= 8191,x = m &= 8191,P = g &= 8191,I = v &= 8191,O = y &= 8191,U = w &= 8191,t += 16,n -= 16;
  194. this.h[0] = E, this.h[1] = j, this.h[2] = k, this.h[3] = A, this.h[4] = T, this.h[5] = x, this.h[6] = P, this.h[7] = I, this.h[8] = O, this.h[9] = U
  195. }, k.prototype.finish = function (e, t) {
  196. var n, r, o, i, s = new Uint16Array(10);
  197. if (this.leftover) {
  198. for (i = this.leftover, this.buffer[i++] = 1; i < 16; i++) this.buffer[i] = 0;
  199. this.fin = 1, this.blocks(this.buffer, 0, 16)
  200. }
  201. for (n = this.h[1] >>> 13, this.h[1] &= 8191, i = 2; i < 10; i++) this.h[i] += n, n = this.h[i] >>> 13, this.h[i] &= 8191;
  202. for (this.h[0] += 5 * n, n = this.h[0] >>> 13, this.h[0] &= 8191, this.h[1] += n, n = this.h[1] >>> 13, this.h[1] &= 8191, this.h[2] += n, s[0] = this.h[0] + 5, n = s[0] >>> 13, s[0] &= 8191, i = 1; i < 10; i++) s[i] = this.h[i] + n, n = s[i] >>> 13, s[i] &= 8191;
  203. for (s[9] -= 8192, r = (1 ^ n) - 1, i = 0; i < 10; i++) s[i] &= r;
  204. for (r = ~r, i = 0; i < 10; i++) this.h[i] = this.h[i] & r | s[i];
  205. for (this.h[0] = 65535 & (this.h[0] | this.h[1] << 13), this.h[1] = 65535 & (this.h[1] >>> 3 | this.h[2] << 10), this.h[2] = 65535 & (this.h[2] >>> 6 | this.h[3] << 7), this.h[3] = 65535 & (this.h[3] >>> 9 | this.h[4] << 4), this.h[4] = 65535 & (this.h[4] >>> 12 | this.h[5] << 1 | this.h[6] << 14), this.h[5] = 65535 & (this.h[6] >>> 2 | this.h[7] << 11), this.h[6] = 65535 & (this.h[7] >>> 5 | this.h[8] << 8), this.h[7] = 65535 & (this.h[8] >>> 8 | this.h[9] << 5), o = this.h[0] + this.pad[0], this.h[0] = 65535 & o, i = 1; i < 8; i++) o = (this.h[i] + this.pad[i] | 0) + (o >>> 16) | 0, this.h[i] = 65535 & o;
  206. e[t + 0] = this.h[0] >>> 0 & 255, e[t + 1] = this.h[0] >>> 8 & 255, e[t + 2] = this.h[1] >>> 0 & 255, e[t + 3] = this.h[1] >>> 8 & 255, e[t + 4] = this.h[2] >>> 0 & 255, e[t + 5] = this.h[2] >>> 8 & 255, e[t + 6] = this.h[3] >>> 0 & 255, e[t + 7] = this.h[3] >>> 8 & 255, e[t + 8] = this.h[4] >>> 0 & 255, e[t + 9] = this.h[4] >>> 8 & 255, e[t + 10] = this.h[5] >>> 0 & 255, e[t + 11] = this.h[5] >>> 8 & 255, e[t + 12] = this.h[6] >>> 0 & 255, e[t + 13] = this.h[6] >>> 8 & 255, e[t + 14] = this.h[7] >>> 0 & 255, e[t + 15] = this.h[7] >>> 8 & 255
  207. }, k.prototype.update = function (e, t, n) {
  208. var r, o;
  209. if (this.leftover) {
  210. for ((o = 16 - this.leftover) > n && (o = n), r = 0; r < o; r++) this.buffer[this.leftover + r] = e[t + r];
  211. if (n -= o, t += o, this.leftover += o, this.leftover < 16) return;
  212. this.blocks(this.buffer, 0, 16), this.leftover = 0
  213. }
  214. if (n >= 16 && (o = n - n % 16, this.blocks(e, t, o), t += o, n -= o), n) {
  215. for (r = 0; r < n; r++) this.buffer[this.leftover + r] = e[t + r];
  216. this.leftover += n
  217. }
  218. };
  219. var G = x, Y = P;
  220. var H = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591];
  221. function V(e, t, n, r) {
  222. for (var o, i, s, a, c, l, u, d, _, f, h, p, b, m, g, v, y, w, S, E, j, k, A, T, x, P, I = new Int32Array(16), O = new Int32Array(16), U = e[0], R = e[1], C = e[2], D = e[3], M = e[4], $ = e[5], L = e[6], N = e[7], J = t[0], B = t[1], F = t[2], K = t[3], q = t[4], z = t[5], W = t[6], G = t[7], Y = 0; r >= 128;) {
  223. for (S = 0; S < 16; S++) E = 8 * S + Y, I[S] = n[E + 0] << 24 | n[E + 1] << 16 | n[E + 2] << 8 | n[E + 3], O[S] = n[E + 4] << 24 | n[E + 5] << 16 | n[E + 6] << 8 | n[E + 7];
  224. for (S = 0; S < 80; S++) if (o = U, i = R, s = C, a = D, c = M, l = $, u = L, N, _ = J, f = B, h = F, p = K, b = q, m = z, g = W, G, A = 65535 & (k = G), T = k >>> 16, x = 65535 & (j = N), P = j >>> 16, A += 65535 & (k = (q >>> 14 | M << 18) ^ (q >>> 18 | M << 14) ^ (M >>> 9 | q << 23)), T += k >>> 16, x += 65535 & (j = (M >>> 14 | q << 18) ^ (M >>> 18 | q << 14) ^ (q >>> 9 | M << 23)), P += j >>> 16, A += 65535 & (k = q & z ^ ~q & W), T += k >>> 16, x += 65535 & (j = M & $ ^ ~M & L), P += j >>> 16, A += 65535 & (k = H[2 * S + 1]), T += k >>> 16, x += 65535 & (j = H[2 * S]), P += j >>> 16, j = I[S % 16], T += (k = O[S % 16]) >>> 16, x += 65535 & j, P += j >>> 16, x += (T += (A += 65535 & k) >>> 16) >>> 16, A = 65535 & (k = w = 65535 & A | T << 16), T = k >>> 16, x = 65535 & (j = y = 65535 & x | (P += x >>> 16) << 16), P = j >>> 16, A += 65535 & (k = (J >>> 28 | U << 4) ^ (U >>> 2 | J << 30) ^ (U >>> 7 | J << 25)), T += k >>> 16, x += 65535 & (j = (U >>> 28 | J << 4) ^ (J >>> 2 | U << 30) ^ (J >>> 7 | U << 25)), P += j >>> 16, T += (k = J & B ^ J & F ^ B & F) >>> 16, x += 65535 & (j = U & R ^ U & C ^ R & C), P += j >>> 16, d = 65535 & (x += (T += (A += 65535 & k) >>> 16) >>> 16) | (P += x >>> 16) << 16, v = 65535 & A | T << 16, A = 65535 & (k = p), T = k >>> 16, x = 65535 & (j = a), P = j >>> 16, T += (k = w) >>> 16, x += 65535 & (j = y), P += j >>> 16, R = o, C = i, D = s, M = a = 65535 & (x += (T += (A += 65535 & k) >>> 16) >>> 16) | (P += x >>> 16) << 16, $ = c, L = l, N = u, U = d, B = _, F = f, K = h, q = p = 65535 & A | T << 16, z = b, W = m, G = g, J = v, S % 16 == 15) for (E = 0; E < 16; E++) j = I[E], A = 65535 & (k = O[E]), T = k >>> 16, x = 65535 & j, P = j >>> 16, j = I[(E + 9) % 16], A += 65535 & (k = O[(E + 9) % 16]), T += k >>> 16, x += 65535 & j, P += j >>> 16, y = I[(E + 1) % 16], A += 65535 & (k = ((w = O[(E + 1) % 16]) >>> 1 | y << 31) ^ (w >>> 8 | y << 24) ^ (w >>> 7 | y << 25)), T += k >>> 16, x += 65535 & (j = (y >>> 1 | w << 31) ^ (y >>> 8 | w << 24) ^ y >>> 7), P += j >>> 16, y = I[(E + 14) % 16], T += (k = ((w = O[(E + 14) % 16]) >>> 19 | y << 13) ^ (y >>> 29 | w << 3) ^ (w >>> 6 | y << 26)) >>> 16, x += 65535 & (j = (y >>> 19 | w << 13) ^ (w >>> 29 | y << 3) ^ y >>> 6), P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, I[E] = 65535 & x | P << 16, O[E] = 65535 & A | T << 16;
  225. A = 65535 & (k = J), T = k >>> 16, x = 65535 & (j = U), P = j >>> 16, j = e[0], T += (k = t[0]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[0] = U = 65535 & x | P << 16, t[0] = J = 65535 & A | T << 16, A = 65535 & (k = B), T = k >>> 16, x = 65535 & (j = R), P = j >>> 16, j = e[1], T += (k = t[1]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[1] = R = 65535 & x | P << 16, t[1] = B = 65535 & A | T << 16, A = 65535 & (k = F), T = k >>> 16, x = 65535 & (j = C), P = j >>> 16, j = e[2], T += (k = t[2]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[2] = C = 65535 & x | P << 16, t[2] = F = 65535 & A | T << 16, A = 65535 & (k = K), T = k >>> 16, x = 65535 & (j = D), P = j >>> 16, j = e[3], T += (k = t[3]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[3] = D = 65535 & x | P << 16, t[3] = K = 65535 & A | T << 16, A = 65535 & (k = q), T = k >>> 16, x = 65535 & (j = M), P = j >>> 16, j = e[4], T += (k = t[4]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[4] = M = 65535 & x | P << 16, t[4] = q = 65535 & A | T << 16, A = 65535 & (k = z), T = k >>> 16, x = 65535 & (j = $), P = j >>> 16, j = e[5], T += (k = t[5]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[5] = $ = 65535 & x | P << 16, t[5] = z = 65535 & A | T << 16, A = 65535 & (k = W), T = k >>> 16, x = 65535 & (j = L), P = j >>> 16, j = e[6], T += (k = t[6]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[6] = L = 65535 & x | P << 16, t[6] = W = 65535 & A | T << 16, A = 65535 & (k = G), T = k >>> 16, x = 65535 & (j = N), P = j >>> 16, j = e[7], T += (k = t[7]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[7] = N = 65535 & x | P << 16, t[7] = G = 65535 & A | T << 16, Y += 128, r -= 128
  226. }
  227. return r
  228. }
  229. function X(e, t, n) {
  230. var r, o = new Int32Array(8), i = new Int32Array(8), s = new Uint8Array(256), a = n;
  231. for (o[0] = 1779033703, o[1] = 3144134277, o[2] = 1013904242, o[3] = 2773480762, o[4] = 1359893119, o[5] = 2600822924, o[6] = 528734635, o[7] = 1541459225, i[0] = 4089235720, i[1] = 2227873595, i[2] = 4271175723, i[3] = 1595750129, i[4] = 2917565137, i[5] = 725511199, i[6] = 4215389547, i[7] = 327033209, V(o, i, t, n), n %= 128, r = 0; r < n; r++) s[r] = t[a - n + r];
  232. for (s[n] = 128, s[(n = 256 - 128 * (n < 112 ? 1 : 0)) - 9] = 0, h(s, n - 8, a / 536870912 | 0, a << 3), V(o, i, s, n), r = 0; r < 8; r++) h(e, 8 * r, o[r], i[r]);
  233. return 0
  234. }
  235. function Z(e, n) {
  236. var r = t(), o = t(), i = t(), s = t(), a = t(), c = t(), l = t(), d = t(), _ = t();
  237. L(r, e[1], e[0]), L(_, n[1], n[0]), N(r, r, _), $(o, e[0], e[1]), $(_, n[0], n[1]), N(o, o, _), N(i, e[3], n[3]), N(i, i, u), N(s, e[2], n[2]), $(s, s, s), L(a, o, r), L(c, s, i), $(l, s, i), $(d, o, r), N(e[0], a, c), N(e[1], d, l), N(e[2], l, c), N(e[3], a, d)
  238. }
  239. function Q(e, t, n) {
  240. var r;
  241. for (r = 0; r < 4; r++) U(e[r], t[r], n)
  242. }
  243. function ee(e, n) {
  244. var r = t(), o = t(), i = t();
  245. B(i, n[2]), N(r, n[0], i), N(o, n[1], i), R(e, o), e[31] ^= D(r) << 7
  246. }
  247. function te(e, t, n) {
  248. var r, o;
  249. for (I(e[0], s), I(e[1], a), I(e[2], a), I(e[3], s), o = 255; o >= 0; --o) Q(e, t, r = n[o / 8 | 0] >> (7 & o) & 1), Z(t, e), Z(e, e), Q(e, t, r)
  250. }
  251. function ne(e, n) {
  252. var r = [t(), t(), t(), t()];
  253. I(r[0], d), I(r[1], _), I(r[2], a), N(r[3], d, _), te(e, r, n)
  254. }
  255. function re(e, n, o) {
  256. var i, s = new Uint8Array(64), a = [t(), t(), t(), t()];
  257. for (o || r(n, 32), X(s, n, 32), s[0] &= 248, s[31] &= 127, s[31] |= 64, ne(a, s), ee(e, a), i = 0; i < 32; i++) n[i + 32] = e[i];
  258. return 0
  259. }
  260. var oe = new Float64Array([237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]);
  261. function ie(e, t) {
  262. var n, r, o, i;
  263. for (r = 63; r >= 32; --r) {
  264. for (n = 0, o = r - 32, i = r - 12; o < i; ++o) t[o] += n - 16 * t[r] * oe[o - (r - 32)], n = Math.floor((t[o] + 128) / 256), t[o] -= 256 * n;
  265. t[o] += n, t[r] = 0
  266. }
  267. for (n = 0, o = 0; o < 32; o++) t[o] += n - (t[31] >> 4) * oe[o], n = t[o] >> 8, t[o] &= 255;
  268. for (o = 0; o < 32; o++) t[o] -= n * oe[o];
  269. for (r = 0; r < 32; r++) t[r + 1] += t[r] >> 8, e[r] = 255 & t[r]
  270. }
  271. function se(e) {
  272. var t, n = new Float64Array(64);
  273. for (t = 0; t < 64; t++) n[t] = e[t];
  274. for (t = 0; t < 64; t++) e[t] = 0;
  275. ie(e, n)
  276. }
  277. function ae(e, n, r, o) {
  278. var i, s, a = new Uint8Array(64), c = new Uint8Array(64), l = new Uint8Array(64),
  279. u = new Float64Array(64), d = [t(), t(), t(), t()];
  280. X(a, o, 32), a[0] &= 248, a[31] &= 127, a[31] |= 64;
  281. var _ = r + 64;
  282. for (i = 0; i < r; i++) e[64 + i] = n[i];
  283. for (i = 0; i < 32; i++) e[32 + i] = a[32 + i];
  284. for (X(l, e.subarray(32), r + 32), se(l), ne(d, l), ee(e, d), i = 32; i < 64; i++) e[i] = o[i];
  285. for (X(c, e, r + 64), se(c), i = 0; i < 64; i++) u[i] = 0;
  286. for (i = 0; i < 32; i++) u[i] = l[i];
  287. for (i = 0; i < 32; i++) for (s = 0; s < 32; s++) u[i + s] += c[i] * a[s];
  288. return ie(e.subarray(32), u), _
  289. }
  290. function ce(e, n, r, o) {
  291. var i, c = new Uint8Array(32), u = new Uint8Array(64), d = [t(), t(), t(), t()],
  292. _ = [t(), t(), t(), t()];
  293. if (r < 64) return -1;
  294. if (function (e, n) {
  295. var r = t(), o = t(), i = t(), c = t(), u = t(), d = t(), _ = t();
  296. return I(e[2], a), M(e[1], n), J(i, e[1]), N(c, i, l), L(i, i, e[2]), $(c, e[2], c), J(u, c), J(d, u), N(_, d, u), N(r, _, i), N(r, r, c), F(r, r), N(r, r, i), N(r, r, c), N(r, r, c), N(e[0], r, c), J(o, e[0]), N(o, o, c), C(o, i) && N(e[0], e[0], f), J(o, e[0]), N(o, o, c), C(o, i) ? -1 : (D(e[0]) === n[31] >> 7 && L(e[0], s, e[0]), N(e[3], e[0], e[1]), 0)
  297. }(_, o)) return -1;
  298. for (i = 0; i < r; i++) e[i] = n[i];
  299. for (i = 0; i < 32; i++) e[i + 32] = o[i];
  300. if (X(u, e, r), se(u), te(d, _, u), ne(_, n.subarray(32)), Z(d, _), ee(c, d), r -= 64, m(n, 0, c, 0)) {
  301. for (i = 0; i < r; i++) e[i] = 0;
  302. return -1
  303. }
  304. for (i = 0; i < r; i++) e[i] = n[i + 64];
  305. return r
  306. }
  307. var le = 16, ue = 64, de = 32, _e = 64;
  308. function fe(e, t) {
  309. if (32 !== e.length) throw new Error("bad key size");
  310. if (24 !== t.length) throw new Error("bad nonce size")
  311. }
  312. function he() {
  313. for (var e = 0; e < arguments.length; e++) if (!(arguments[e] instanceof Uint8Array)) throw new TypeError("unexpected type, use Uint8Array")
  314. }
  315. function pe(e) {
  316. for (var t = 0; t < e.length; t++) e[t] = 0
  317. }
  318. e.lowlevel = {
  319. crypto_core_hsalsa20: v,
  320. crypto_stream_xor: j,
  321. crypto_stream: E,
  322. crypto_stream_salsa20_xor: w,
  323. crypto_stream_salsa20: S,
  324. crypto_onetimeauth: A,
  325. crypto_onetimeauth_verify: T,
  326. crypto_verify_16: b,
  327. crypto_verify_32: m,
  328. crypto_secretbox: x,
  329. crypto_secretbox_open: P,
  330. crypto_scalarmult: K,
  331. crypto_scalarmult_base: q,
  332. crypto_box_beforenm: W,
  333. crypto_box_afternm: G,
  334. crypto_box: function (e, t, n, r, o, i) {
  335. var s = new Uint8Array(32);
  336. return W(s, o, i), G(e, t, n, r, s)
  337. },
  338. crypto_box_open: function (e, t, n, r, o, i) {
  339. var s = new Uint8Array(32);
  340. return W(s, o, i), Y(e, t, n, r, s)
  341. },
  342. crypto_box_keypair: z,
  343. crypto_hash: X,
  344. crypto_sign: ae,
  345. crypto_sign_keypair: re,
  346. crypto_sign_open: ce,
  347. crypto_secretbox_KEYBYTES: 32,
  348. crypto_secretbox_NONCEBYTES: 24,
  349. crypto_secretbox_ZEROBYTES: 32,
  350. crypto_secretbox_BOXZEROBYTES: le,
  351. crypto_scalarmult_BYTES: 32,
  352. crypto_scalarmult_SCALARBYTES: 32,
  353. crypto_box_PUBLICKEYBYTES: 32,
  354. crypto_box_SECRETKEYBYTES: 32,
  355. crypto_box_BEFORENMBYTES: 32,
  356. crypto_box_NONCEBYTES: 24,
  357. crypto_box_ZEROBYTES: 32,
  358. crypto_box_BOXZEROBYTES: 16,
  359. crypto_sign_BYTES: ue,
  360. crypto_sign_PUBLICKEYBYTES: de,
  361. crypto_sign_SECRETKEYBYTES: _e,
  362. crypto_sign_SEEDBYTES: 32,
  363. crypto_hash_BYTES: 64,
  364. gf: t,
  365. D: l,
  366. L: oe,
  367. pack25519: R,
  368. unpack25519: M,
  369. M: N,
  370. A: $,
  371. S: J,
  372. Z: L,
  373. pow2523: F,
  374. add: Z,
  375. set25519: I,
  376. modL: ie,
  377. scalarmult: te,
  378. scalarbase: ne
  379. }, e.randomBytes = function (e) {
  380. var t = new Uint8Array(e);
  381. return r(t, e), t
  382. }, e.secretbox = function (e, t, n) {
  383. he(e, t, n), fe(n, t);
  384. for (var r = new Uint8Array(32 + e.length), o = new Uint8Array(r.length), i = 0; i < e.length; i++) r[i + 32] = e[i];
  385. return x(o, r, r.length, t, n), o.subarray(le)
  386. }, e.secretbox.open = function (e, t, n) {
  387. he(e, t, n), fe(n, t);
  388. for (var r = new Uint8Array(le + e.length), o = new Uint8Array(r.length), i = 0; i < e.length; i++) r[i + le] = e[i];
  389. return r.length < 32 || 0 !== P(o, r, r.length, t, n) ? null : o.subarray(32)
  390. }, e.secretbox.keyLength = 32, e.secretbox.nonceLength = 24, e.secretbox.overheadLength = le, e.scalarMult = function (e, t) {
  391. if (he(e, t), 32 !== e.length) throw new Error("bad n size");
  392. if (32 !== t.length) throw new Error("bad p size");
  393. var n = new Uint8Array(32);
  394. return K(n, e, t), n
  395. }, e.scalarMult.base = function (e) {
  396. if (he(e), 32 !== e.length) throw new Error("bad n size");
  397. var t = new Uint8Array(32);
  398. return q(t, e), t
  399. }, e.scalarMult.scalarLength = 32, e.scalarMult.groupElementLength = 32, e.box = function (t, n, r, o) {
  400. var i = e.box.before(r, o);
  401. return e.secretbox(t, n, i)
  402. }, e.box.before = function (e, t) {
  403. he(e, t), function (e, t) {
  404. if (32 !== e.length) throw new Error("bad public key size");
  405. if (32 !== t.length) throw new Error("bad secret key size")
  406. }(e, t);
  407. var n = new Uint8Array(32);
  408. return W(n, e, t), n
  409. }, e.box.after = e.secretbox, e.box.open = function (t, n, r, o) {
  410. var i = e.box.before(r, o);
  411. return e.secretbox.open(t, n, i)
  412. }, e.box.open.after = e.secretbox.open, e.box.keyPair = function () {
  413. var e = new Uint8Array(32), t = new Uint8Array(32);
  414. return z(e, t), {publicKey: e, secretKey: t}
  415. }, e.box.keyPair.fromSecretKey = function (e) {
  416. if (he(e), 32 !== e.length) throw new Error("bad secret key size");
  417. var t = new Uint8Array(32);
  418. return q(t, e), {publicKey: t, secretKey: new Uint8Array(e)}
  419. }, e.box.publicKeyLength = 32, e.box.secretKeyLength = 32, e.box.sharedKeyLength = 32, e.box.nonceLength = 24, e.box.overheadLength = e.secretbox.overheadLength, e.sign = function (e, t) {
  420. if (he(e, t), t.length !== _e) throw new Error("bad secret key size");
  421. var n = new Uint8Array(ue + e.length);
  422. return ae(n, e, e.length, t), n
  423. }, e.sign.open = function (e, t) {
  424. if (he(e, t), t.length !== de) throw new Error("bad public key size");
  425. var n = new Uint8Array(e.length), r = ce(n, e, e.length, t);
  426. if (r < 0) return null;
  427. for (var o = new Uint8Array(r), i = 0; i < o.length; i++) o[i] = n[i];
  428. return o
  429. }, e.sign.detached = function (t, n) {
  430. for (var r = e.sign(t, n), o = new Uint8Array(ue), i = 0; i < o.length; i++) o[i] = r[i];
  431. return o
  432. }, e.sign.detached.verify = function (e, t, n) {
  433. if (he(e, t, n), t.length !== ue) throw new Error("bad signature size");
  434. if (n.length !== de) throw new Error("bad public key size");
  435. var r, o = new Uint8Array(ue + e.length), i = new Uint8Array(ue + e.length);
  436. for (r = 0; r < ue; r++) o[r] = t[r];
  437. for (r = 0; r < e.length; r++) o[r + ue] = e[r];
  438. return ce(i, o, o.length, n) >= 0
  439. }, e.sign.keyPair = function () {
  440. var e = new Uint8Array(de), t = new Uint8Array(_e);
  441. return re(e, t), {publicKey: e, secretKey: t}
  442. }, e.sign.keyPair.fromSecretKey = function (e) {
  443. if (he(e), e.length !== _e) throw new Error("bad secret key size");
  444. for (var t = new Uint8Array(de), n = 0; n < t.length; n++) t[n] = e[32 + n];
  445. return {publicKey: t, secretKey: new Uint8Array(e)}
  446. }, e.sign.keyPair.fromSeed = function (e) {
  447. if (he(e), 32 !== e.length) throw new Error("bad seed size");
  448. for (var t = new Uint8Array(de), n = new Uint8Array(_e), r = 0; r < 32; r++) n[r] = e[r];
  449. return re(t, n, !0), {publicKey: t, secretKey: n}
  450. }, e.sign.publicKeyLength = de, e.sign.secretKeyLength = _e, e.sign.seedLength = 32, e.sign.signatureLength = ue, e.hash = function (e) {
  451. he(e);
  452. var t = new Uint8Array(64);
  453. return X(t, e, e.length), t
  454. }, e.hash.hashLength = 64, e.verify = function (e, t) {
  455. return he(e, t), 0 !== e.length && 0 !== t.length && (e.length === t.length && 0 === p(e, 0, t, 0, e.length))
  456. }, e.setPRNG = function (e) {
  457. r = e
  458. }, function () {
  459. var t = "undefined" != typeof self ? self.crypto || self.msCrypto : null;
  460. if (t && t.getRandomValues) {
  461. e.setPRNG((function (e, n) {
  462. var r, o = new Uint8Array(n);
  463. for (r = 0; r < n; r += 65536) t.getRandomValues(o.subarray(r, r + Math.min(n - r, 65536)));
  464. for (r = 0; r < n; r++) e[r] = o[r];
  465. pe(o)
  466. }))
  467. } else (t = n(2329)) && t.randomBytes && e.setPRNG((function (e, n) {
  468. var r, o = t.randomBytes(n);
  469. for (r = 0; r < n; r++) e[r] = o[r];
  470. pe(o)
  471. }))
  472. }()
  473. }(e.exports ? e.exports : self.nacl = self.nacl || {})
  474. }, 1504: e => {
  475. function t(e, t, n, r, o, i, s) {
  476. try {
  477. var a = e[i](s), c = a.value
  478. } catch (e) {
  479. return void n(e)
  480. }
  481. a.done ? t(c) : Promise.resolve(c).then(r, o)
  482. }
  483. e.exports = function (e) {
  484. return function () {
  485. var n = this, r = arguments;
  486. return new Promise((function (o, i) {
  487. var s = e.apply(n, r);
  488. function a(e) {
  489. t(s, o, i, a, c, "next", e)
  490. }
  491. function c(e) {
  492. t(s, o, i, a, c, "throw", e)
  493. }
  494. a(void 0)
  495. }))
  496. }
  497. }
  498. }, 5526: e => {
  499. e.exports = function (e, t, n) {
  500. return t in e ? Object.defineProperty(e, t, {
  501. value: n,
  502. enumerable: !0,
  503. configurable: !0,
  504. writable: !0
  505. }) : e[t] = n, e
  506. }
  507. }, 7914: e => {
  508. e.exports = function (e) {
  509. return e && e.__esModule ? e : {default: e}
  510. }
  511. }, 3982: (e, t, n) => {
  512. var r = n(5526);
  513. function o(e, t) {
  514. var n = Object.keys(e);
  515. if (Object.getOwnPropertySymbols) {
  516. var r = Object.getOwnPropertySymbols(e);
  517. t && (r = r.filter((function (t) {
  518. return Object.getOwnPropertyDescriptor(e, t).enumerable
  519. }))), n.push.apply(n, r)
  520. }
  521. return n
  522. }
  523. e.exports = function (e) {
  524. for (var t = 1; t < arguments.length; t++) {
  525. var n = null != arguments[t] ? arguments[t] : {};
  526. t % 2 ? o(Object(n), !0).forEach((function (t) {
  527. r(e, t, n[t])
  528. })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach((function (t) {
  529. Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
  530. }))
  531. }
  532. return e
  533. }
  534. }, 4302: e => {
  535. "use strict";
  536. var t = Object.prototype.hasOwnProperty, n = "function" == typeof WeakMap ? new WeakMap : new Map;
  537. function r(e) {
  538. var t = n.get(e);
  539. if (void 0 !== t) return t;
  540. var r = new Map;
  541. return Object.getOwnPropertyNames(e).forEach((function (t) {
  542. r.set(e[t], t)
  543. })), n.set(e, r), r
  544. }
  545. var o = Object.freeze(Object.defineProperties(Object.create(null), {
  546. isValid: {
  547. value: function (e) {
  548. return r(this).has(e)
  549. }
  550. }, cast: {
  551. value: function (e) {
  552. return this.isValid(e) ? e : void 0
  553. }
  554. }, members: {
  555. value: function () {
  556. return r(this).keys()
  557. }
  558. }, getName: {
  559. value: function (e) {
  560. return r(this).get(e)
  561. }
  562. }
  563. }));
  564. function i(e) {
  565. var n = Object.create(o);
  566. for (var r in e) t.call(e, r) && Object.defineProperty(n, r, {value: e[r]});
  567. return Object.freeze(n)
  568. }
  569. var s = Object.freeze(Object.defineProperties(Object.create(null), {
  570. isValid: {
  571. value: function (e) {
  572. return "string" == typeof e && t.call(this, e)
  573. }
  574. }, cast: {value: o.cast}, members: {
  575. value: function () {
  576. return Object.getOwnPropertyNames(this)
  577. }
  578. }, getName: {
  579. value: function (e) {
  580. return e
  581. }
  582. }
  583. }));
  584. i.Mirrored = function (e) {
  585. for (var t = Object.create(s), n = 0, r = e.length; n < r; ++n) Object.defineProperty(t, e[n], {value: e[n]});
  586. return Object.freeze(t)
  587. }, Object.freeze(i.Mirrored), e.exports = Object.freeze(i)
  588. }, 8926: e => {
  589. function t(e, t, n, r, o, i, s) {
  590. try {
  591. var a = e[i](s), c = a.value
  592. } catch (e) {
  593. return void n(e)
  594. }
  595. a.done ? t(c) : Promise.resolve(c).then(r, o)
  596. }
  597. e.exports = function (e) {
  598. return function () {
  599. var n = this, r = arguments;
  600. return new Promise((function (o, i) {
  601. var s = e.apply(n, r);
  602. function a(e) {
  603. t(s, o, i, a, c, "next", e)
  604. }
  605. function c(e) {
  606. t(s, o, i, a, c, "throw", e)
  607. }
  608. a(void 0)
  609. }))
  610. }
  611. }, e.exports.default = e.exports, e.exports.__esModule = !0
  612. }, 5318: e => {
  613. e.exports = function (e) {
  614. return e && e.__esModule ? e : {default: e}
  615. }, e.exports.default = e.exports, e.exports.__esModule = !0
  616. }, 6128: (e, t, n) => {
  617. "use strict";
  618. n.r(t), n.d(t, {default: () => Nt});
  619. var r = Object.keys, o = Array.isArray,
  620. i = "undefined" != typeof self ? self : "undefined" != typeof window ? window : n.g;
  621. function s(e, t) {
  622. return "object" != typeof t || r(t).forEach((function (n) {
  623. e[n] = t[n]
  624. })), e
  625. }
  626. var a = Object.getPrototypeOf, c = {}.hasOwnProperty;
  627. function l(e, t) {
  628. return c.call(e, t)
  629. }
  630. function u(e, t) {
  631. "function" == typeof t && (t = t(a(e))), r(t).forEach((function (n) {
  632. _(e, n, t[n])
  633. }))
  634. }
  635. var d = Object.defineProperty;
  636. function _(e, t, n, r) {
  637. d(e, t, s(n && l(n, "get") && "function" == typeof n.get ? {
  638. get: n.get,
  639. set: n.set,
  640. configurable: !0
  641. } : {value: n, configurable: !0, writable: !0}, r))
  642. }
  643. function f(e) {
  644. return {
  645. from: function (t) {
  646. return e.prototype = Object.create(t.prototype), _(e.prototype, "constructor", e), {extend: u.bind(null, e.prototype)}
  647. }
  648. }
  649. }
  650. var h = Object.getOwnPropertyDescriptor;
  651. function p(e, t) {
  652. var n;
  653. return h(e, t) || (n = a(e)) && p(n, t)
  654. }
  655. var b = [].slice;
  656. function m(e, t, n) {
  657. return b.call(e, t, n)
  658. }
  659. function g(e, t) {
  660. return t(e)
  661. }
  662. function v(e) {
  663. if (!e) throw new Error("Assertion Failed")
  664. }
  665. function y(e) {
  666. i.setImmediate ? setImmediate(e) : setTimeout(e, 0)
  667. }
  668. function w(e, t) {
  669. return e.reduce((function (e, n, r) {
  670. var o = t(n, r);
  671. return o && (e[o[0]] = o[1]), e
  672. }), {})
  673. }
  674. function S(e, t) {
  675. return function () {
  676. try {
  677. e.apply(this, arguments)
  678. } catch (e) {
  679. t(e)
  680. }
  681. }
  682. }
  683. function E(e, t, n) {
  684. try {
  685. e.apply(null, n)
  686. } catch (e) {
  687. t && t(e)
  688. }
  689. }
  690. function j(e, t) {
  691. if (l(e, t)) return e[t];
  692. if (!t) return e;
  693. if ("string" != typeof t) {
  694. for (var n = [], r = 0, o = t.length; r < o; ++r) {
  695. var i = j(e, t[r]);
  696. n.push(i)
  697. }
  698. return n
  699. }
  700. var s = t.indexOf(".");
  701. if (-1 !== s) {
  702. var a = e[t.substr(0, s)];
  703. return void 0 === a ? void 0 : j(a, t.substr(s + 1))
  704. }
  705. }
  706. function k(e, t, n) {
  707. if (e && void 0 !== t && (!("isFrozen" in Object) || !Object.isFrozen(e))) if ("string" != typeof t && "length" in t) {
  708. v("string" != typeof n && "length" in n);
  709. for (var r = 0, o = t.length; r < o; ++r) k(e, t[r], n[r])
  710. } else {
  711. var i = t.indexOf(".");
  712. if (-1 !== i) {
  713. var s = t.substr(0, i), a = t.substr(i + 1);
  714. if ("" === a) void 0 === n ? delete e[s] : e[s] = n; else {
  715. var c = e[s];
  716. c || (c = e[s] = {}), k(c, a, n)
  717. }
  718. } else void 0 === n ? delete e[t] : e[t] = n
  719. }
  720. }
  721. function A(e) {
  722. var t = {};
  723. for (var n in e) l(e, n) && (t[n] = e[n]);
  724. return t
  725. }
  726. var T = [].concat;
  727. function x(e) {
  728. return T.apply([], e)
  729. }
  730. var P = "Boolean,String,Date,RegExp,Blob,File,FileList,ArrayBuffer,DataView,Uint8ClampedArray,ImageData,Map,Set".split(",").concat(x([8, 16, 32, 64].map((function (e) {
  731. return ["Int", "Uint", "Float"].map((function (t) {
  732. return t + e + "Array"
  733. }))
  734. })))).filter((function (e) {
  735. return i[e]
  736. })).map((function (e) {
  737. return i[e]
  738. }));
  739. function I(e) {
  740. if (!e || "object" != typeof e) return e;
  741. var t;
  742. if (o(e)) {
  743. t = [];
  744. for (var n = 0, r = e.length; n < r; ++n) t.push(I(e[n]))
  745. } else if (P.indexOf(e.constructor) >= 0) t = e; else for (var i in t = e.constructor ? Object.create(e.constructor.prototype) : {}, e) l(e, i) && (t[i] = I(e[i]));
  746. return t
  747. }
  748. function O(e, t, n, o) {
  749. return n = n || {}, o = o || "", r(e).forEach((function (r) {
  750. if (l(t, r)) {
  751. var i = e[r], s = t[r];
  752. "object" == typeof i && "object" == typeof s && i && s && "" + i.constructor == "" + s.constructor ? O(i, s, n, o + r + ".") : i !== s && (n[o + r] = t[r])
  753. } else n[o + r] = void 0
  754. })), r(t).forEach((function (r) {
  755. l(e, r) || (n[o + r] = t[r])
  756. })), n
  757. }
  758. var U = "undefined" != typeof Symbol && Symbol.iterator, R = U ? function (e) {
  759. var t;
  760. return null != e && (t = e[U]) && t.apply(e)
  761. } : function () {
  762. return null
  763. }, C = {};
  764. function D(e) {
  765. var t, n, r, i;
  766. if (1 === arguments.length) {
  767. if (o(e)) return e.slice();
  768. if (this === C && "string" == typeof e) return [e];
  769. if (i = R(e)) {
  770. for (n = []; !(r = i.next()).done;) n.push(r.value);
  771. return n
  772. }
  773. if (null == e) return [e];
  774. if ("number" == typeof (t = e.length)) {
  775. for (n = new Array(t); t--;) n[t] = e[t];
  776. return n
  777. }
  778. return [e]
  779. }
  780. for (t = arguments.length, n = new Array(t); t--;) n[t] = arguments[t];
  781. return n
  782. }
  783. var M = "undefined" != typeof location && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
  784. function $(e, t) {
  785. M = e, L = t
  786. }
  787. var L = function () {
  788. return !0
  789. }, N = !new Error("").stack;
  790. function J() {
  791. if (N) try {
  792. throw J.arguments, new Error
  793. } catch (e) {
  794. return e
  795. }
  796. return new Error
  797. }
  798. function B(e, t) {
  799. var n = e.stack;
  800. return n ? (t = t || 0, 0 === n.indexOf(e.name) && (t += (e.name + e.message).split("\n").length), n.split("\n").slice(t).filter(L).map((function (e) {
  801. return "\n" + e
  802. })).join("")) : ""
  803. }
  804. var F = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"],
  805. K = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(F),
  806. q = {
  807. VersionChanged: "Database version changed by other database connection",
  808. DatabaseClosed: "Database has been closed",
  809. Abort: "Transaction aborted",
  810. TransactionInactive: "Transaction has already completed or failed"
  811. };
  812. function z(e, t) {
  813. this._e = J(), this.name = e, this.message = t
  814. }
  815. function W(e, t, n, r) {
  816. this._e = J(), this.failures = t, this.failedKeys = r, this.successCount = n
  817. }
  818. function G(e, t) {
  819. this._e = J(), this.name = "BulkError", this.failures = t, this.message = function (e, t) {
  820. return e + ". Errors: " + t.map((function (e) {
  821. return e.toString()
  822. })).filter((function (e, t, n) {
  823. return n.indexOf(e) === t
  824. })).join("\n")
  825. }(e, t)
  826. }
  827. f(z).from(Error).extend({
  828. stack: {
  829. get: function () {
  830. return this._stack || (this._stack = this.name + ": " + this.message + B(this._e, 2))
  831. }
  832. }, toString: function () {
  833. return this.name + ": " + this.message
  834. }
  835. }), f(W).from(z), f(G).from(z);
  836. var Y = K.reduce((function (e, t) {
  837. return e[t] = t + "Error", e
  838. }), {}), H = z, V = K.reduce((function (e, t) {
  839. var n = t + "Error";
  840. function r(e, r) {
  841. this._e = J(), this.name = n, e ? "string" == typeof e ? (this.message = e, this.inner = r || null) : "object" == typeof e && (this.message = e.name + " " + e.message, this.inner = e) : (this.message = q[t] || n, this.inner = null)
  842. }
  843. return f(r).from(H), e[t] = r, e
  844. }), {});
  845. V.Syntax = SyntaxError, V.Type = TypeError, V.Range = RangeError;
  846. var X = F.reduce((function (e, t) {
  847. return e[t + "Error"] = V[t], e
  848. }), {});
  849. var Z = K.reduce((function (e, t) {
  850. return -1 === ["Syntax", "Type", "Range"].indexOf(t) && (e[t + "Error"] = V[t]), e
  851. }), {});
  852. function Q() {
  853. }
  854. function ee(e) {
  855. return e
  856. }
  857. function te(e, t) {
  858. return null == e || e === ee ? t : function (n) {
  859. return t(e(n))
  860. }
  861. }
  862. function ne(e, t) {
  863. return function () {
  864. e.apply(this, arguments), t.apply(this, arguments)
  865. }
  866. }
  867. function re(e, t) {
  868. return e === Q ? t : function () {
  869. var n = e.apply(this, arguments);
  870. void 0 !== n && (arguments[0] = n);
  871. var r = this.onsuccess, o = this.onerror;
  872. this.onsuccess = null, this.onerror = null;
  873. var i = t.apply(this, arguments);
  874. return r && (this.onsuccess = this.onsuccess ? ne(r, this.onsuccess) : r), o && (this.onerror = this.onerror ? ne(o, this.onerror) : o), void 0 !== i ? i : n
  875. }
  876. }
  877. function oe(e, t) {
  878. return e === Q ? t : function () {
  879. e.apply(this, arguments);
  880. var n = this.onsuccess, r = this.onerror;
  881. this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? ne(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? ne(r, this.onerror) : r)
  882. }
  883. }
  884. function ie(e, t) {
  885. return e === Q ? t : function (n) {
  886. var r = e.apply(this, arguments);
  887. s(n, r);
  888. var o = this.onsuccess, i = this.onerror;
  889. this.onsuccess = null, this.onerror = null;
  890. var a = t.apply(this, arguments);
  891. return o && (this.onsuccess = this.onsuccess ? ne(o, this.onsuccess) : o), i && (this.onerror = this.onerror ? ne(i, this.onerror) : i), void 0 === r ? void 0 === a ? void 0 : a : s(r, a)
  892. }
  893. }
  894. function se(e, t) {
  895. return e === Q ? t : function () {
  896. return !1 !== t.apply(this, arguments) && e.apply(this, arguments)
  897. }
  898. }
  899. function ae(e, t) {
  900. return e === Q ? t : function () {
  901. var n = e.apply(this, arguments);
  902. if (n && "function" == typeof n.then) {
  903. for (var r = this, o = arguments.length, i = new Array(o); o--;) i[o] = arguments[o];
  904. return n.then((function () {
  905. return t.apply(r, i)
  906. }))
  907. }
  908. return t.apply(this, arguments)
  909. }
  910. }
  911. Z.ModifyError = W, Z.DexieError = z, Z.BulkError = G;
  912. var ce = {}, le = function () {
  913. try {
  914. return [Oe.resolve(), Oe.prototype, Oe.resolve(), Function.constructor]
  915. } catch (t) {
  916. var e = i.Promise;
  917. return e ? [e.resolve(), e.prototype, e.resolve()] : []
  918. }
  919. }(), ue = le[0], de = le[1], _e = le[2], fe = de && de.then, he = ue && ue.constructor, pe = le[3],
  920. be = !!_e, me = !1, ge = _e ? function () {
  921. _e.then(Be)
  922. } : i.setImmediate ? setImmediate.bind(null, Be) : i.MutationObserver ? function () {
  923. var e = document.createElement("div");
  924. new MutationObserver((function () {
  925. Be(), e = null
  926. })).observe(e, {attributes: !0}), e.setAttribute("i", "1")
  927. } : function () {
  928. setTimeout(Be, 0)
  929. }, ve = function (e, t) {
  930. xe.push([e, t]), we && (ge(), we = !1)
  931. }, ye = !0, we = !0, Se = [], Ee = [], je = null, ke = ee, Ae = {
  932. id: "global",
  933. global: !0,
  934. ref: 0,
  935. unhandleds: [],
  936. onunhandled: dt,
  937. txRelaxedDurabilityEnabled: !1,
  938. pgp: !1,
  939. env: {},
  940. finalize: function () {
  941. this.unhandleds.forEach((function (e) {
  942. try {
  943. dt(e[0], e[1])
  944. } catch (e) {
  945. }
  946. }))
  947. }
  948. }, Te = Ae, xe = [], Pe = 0, Ie = [];
  949. function Oe(e) {
  950. if ("object" != typeof this) throw new TypeError("Promises must be constructed via new");
  951. this._listeners = [], this.onuncatched = Q, this._lib = !1;
  952. var t = this._PSD = Te;
  953. if (M && (this._stackHolder = J(), this._prev = null, this._numPrev = 0), "function" != typeof e) {
  954. if (e !== ce) throw new TypeError("Not a function");
  955. return this._state = arguments[1], this._value = arguments[2], void (!1 === this._state && De(this, this._value))
  956. }
  957. this._state = null, this._value = null, ++t.ref, Ce(this, e)
  958. }
  959. var Ue = {
  960. get: function () {
  961. var e = Te, t = Xe;
  962. function n(n, r) {
  963. var o = this, i = !e.global && (e !== Te || t !== Xe);
  964. i && tt();
  965. var s = new Oe((function (t, s) {
  966. $e(o, new Re(ct(n, e, i), ct(r, e, i), t, s, e))
  967. }));
  968. return M && Je(s, this), s
  969. }
  970. return n.prototype = ce, n
  971. }, set: function (e) {
  972. _(this, "then", e && e.prototype === ce ? Ue : {
  973. get: function () {
  974. return e
  975. }, set: Ue.set
  976. })
  977. }
  978. };
  979. function Re(e, t, n, r, o) {
  980. this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.resolve = n, this.reject = r, this.psd = o
  981. }
  982. function Ce(e, t) {
  983. try {
  984. t((function (t) {
  985. if (null === e._state) {
  986. if (t === e) throw new TypeError("A promise cannot be resolved with itself.");
  987. var n = e._lib && Fe();
  988. t && "function" == typeof t.then ? Ce(e, (function (e, n) {
  989. t instanceof Oe ? t._then(e, n) : t.then(e, n)
  990. })) : (e._state = !0, e._value = t, Me(e)), n && Ke()
  991. }
  992. }), De.bind(null, e))
  993. } catch (t) {
  994. De(e, t)
  995. }
  996. }
  997. function De(e, t) {
  998. if (Ee.push(t), null === e._state) {
  999. var n = e._lib && Fe();
  1000. t = ke(t), e._state = !1, e._value = t, M && null !== t && "object" == typeof t && !t._promise && E((function () {
  1001. var n = p(t, "stack");
  1002. t._promise = e, _(t, "stack", {
  1003. get: function () {
  1004. return me ? n && (n.get ? n.get.apply(t) : n.value) : e.stack
  1005. }
  1006. })
  1007. })), function (e) {
  1008. Se.some((function (t) {
  1009. return t._value === e._value
  1010. })) || Se.push(e)
  1011. }(e), Me(e), n && Ke()
  1012. }
  1013. }
  1014. function Me(e) {
  1015. var t = e._listeners;
  1016. e._listeners = [];
  1017. for (var n = 0, r = t.length; n < r; ++n) $e(e, t[n]);
  1018. var o = e._PSD;
  1019. --o.ref || o.finalize(), 0 === Pe && (++Pe, ve((function () {
  1020. 0 == --Pe && qe()
  1021. }), []))
  1022. }
  1023. function $e(e, t) {
  1024. if (null !== e._state) {
  1025. var n = e._state ? t.onFulfilled : t.onRejected;
  1026. if (null === n) return (e._state ? t.resolve : t.reject)(e._value);
  1027. ++t.psd.ref, ++Pe, ve(Le, [n, e, t])
  1028. } else e._listeners.push(t)
  1029. }
  1030. function Le(e, t, n) {
  1031. try {
  1032. je = t;
  1033. var r, o = t._value;
  1034. t._state ? r = e(o) : (Ee.length && (Ee = []), r = e(o), -1 === Ee.indexOf(o) && function (e) {
  1035. var t = Se.length;
  1036. for (; t;) if (Se[--t]._value === e._value) return void Se.splice(t, 1)
  1037. }(t)), n.resolve(r)
  1038. } catch (e) {
  1039. n.reject(e)
  1040. } finally {
  1041. je = null, 0 == --Pe && qe(), --n.psd.ref || n.psd.finalize()
  1042. }
  1043. }
  1044. function Ne(e, t, n) {
  1045. if (t.length === n) return t;
  1046. var r = "";
  1047. if (!1 === e._state) {
  1048. var o, i, s = e._value;
  1049. null != s ? (o = s.name || "Error", i = s.message || s, r = B(s, 0)) : (o = s, i = ""), t.push(o + (i ? ": " + i : "") + r)
  1050. }
  1051. return M && ((r = B(e._stackHolder, 2)) && -1 === t.indexOf(r) && t.push(r), e._prev && Ne(e._prev, t, n)), t
  1052. }
  1053. function Je(e, t) {
  1054. var n = t ? t._numPrev + 1 : 0;
  1055. n < 100 && (e._prev = t, e._numPrev = n)
  1056. }
  1057. function Be() {
  1058. Fe() && Ke()
  1059. }
  1060. function Fe() {
  1061. var e = ye;
  1062. return ye = !1, we = !1, e
  1063. }
  1064. function Ke() {
  1065. var e, t, n;
  1066. do {
  1067. for (; xe.length > 0;) for (e = xe, xe = [], n = e.length, t = 0; t < n; ++t) {
  1068. var r = e[t];
  1069. r[0].apply(null, r[1])
  1070. }
  1071. } while (xe.length > 0);
  1072. ye = !0, we = !0
  1073. }
  1074. function qe() {
  1075. var e = Se;
  1076. Se = [], e.forEach((function (e) {
  1077. e._PSD.onunhandled.call(null, e._value, e)
  1078. }));
  1079. for (var t = Ie.slice(0), n = t.length; n;) t[--n]()
  1080. }
  1081. function ze(e) {
  1082. return new Oe(ce, !1, e)
  1083. }
  1084. function We(e, t) {
  1085. var n = Te;
  1086. return function () {
  1087. var r = Fe(), o = Te;
  1088. try {
  1089. return it(n, !0), e.apply(this, arguments)
  1090. } catch (e) {
  1091. t && t(e)
  1092. } finally {
  1093. it(o, !1), r && Ke()
  1094. }
  1095. }
  1096. }
  1097. u(Oe.prototype, {
  1098. then: Ue, _then: function (e, t) {
  1099. $e(this, new Re(null, null, e, t, Te))
  1100. }, catch: function (e) {
  1101. if (1 === arguments.length) return this.then(null, e);
  1102. var t = arguments[0], n = arguments[1];
  1103. return "function" == typeof t ? this.then(null, (function (e) {
  1104. return e instanceof t ? n(e) : ze(e)
  1105. })) : this.then(null, (function (e) {
  1106. return e && e.name === t ? n(e) : ze(e)
  1107. }))
  1108. }, finally: function (e) {
  1109. return this.then((function (t) {
  1110. return e(), t
  1111. }), (function (t) {
  1112. return e(), ze(t)
  1113. }))
  1114. }, stack: {
  1115. get: function () {
  1116. if (this._stack) return this._stack;
  1117. try {
  1118. me = !0;
  1119. var e = Ne(this, [], 20).join("\nFrom previous: ");
  1120. return null !== this._state && (this._stack = e), e
  1121. } finally {
  1122. me = !1
  1123. }
  1124. }
  1125. }, timeout: function (e, t) {
  1126. var n = this;
  1127. return e < 1 / 0 ? new Oe((function (r, o) {
  1128. var i = setTimeout((function () {
  1129. return o(new V.Timeout(t))
  1130. }), e);
  1131. n.then(r, o).finally(clearTimeout.bind(null, i))
  1132. })) : this
  1133. }
  1134. }), "undefined" != typeof Symbol && Symbol.toStringTag && _(Oe.prototype, Symbol.toStringTag, "Promise"), Ae.env = st(), u(Oe, {
  1135. all: function () {
  1136. var e = D.apply(null, arguments).map(nt);
  1137. return new Oe((function (t, n) {
  1138. 0 === e.length && t([]);
  1139. var r = e.length;
  1140. e.forEach((function (o, i) {
  1141. return Oe.resolve(o).then((function (n) {
  1142. e[i] = n, --r || t(e)
  1143. }), n)
  1144. }))
  1145. }))
  1146. }, resolve: function (e) {
  1147. if (e instanceof Oe) return e;
  1148. if (e && "function" == typeof e.then) return new Oe((function (t, n) {
  1149. e.then(t, n)
  1150. }));
  1151. var t = new Oe(ce, !0, e);
  1152. return Je(t, je), t
  1153. }, reject: ze, race: function () {
  1154. var e = D.apply(null, arguments).map(nt);
  1155. return new Oe((function (t, n) {
  1156. e.map((function (e) {
  1157. return Oe.resolve(e).then(t, n)
  1158. }))
  1159. }))
  1160. }, PSD: {
  1161. get: function () {
  1162. return Te
  1163. }, set: function (e) {
  1164. return Te = e
  1165. }
  1166. }, newPSD: Qe, usePSD: at, scheduler: {
  1167. get: function () {
  1168. return ve
  1169. }, set: function (e) {
  1170. ve = e
  1171. }
  1172. }, rejectionMapper: {
  1173. get: function () {
  1174. return ke
  1175. }, set: function (e) {
  1176. ke = e
  1177. }
  1178. }, follow: function (e, t) {
  1179. return new Oe((function (n, r) {
  1180. return Qe((function (t, n) {
  1181. var r = Te;
  1182. r.unhandleds = [], r.onunhandled = n, r.finalize = ne((function () {
  1183. var e = this;
  1184. !function (e) {
  1185. function t() {
  1186. e(), Ie.splice(Ie.indexOf(t), 1)
  1187. }
  1188. Ie.push(t), ++Pe, ve((function () {
  1189. 0 == --Pe && qe()
  1190. }), [])
  1191. }((function () {
  1192. 0 === e.unhandleds.length ? t() : n(e.unhandleds[0])
  1193. }))
  1194. }), r.finalize), e()
  1195. }), t, n, r)
  1196. }))
  1197. }
  1198. });
  1199. var Ge = {awaits: 0, echoes: 0, id: 0}, Ye = 0, He = [], Ve = 0, Xe = 0, Ze = 0;
  1200. function Qe(e, t, n, r) {
  1201. var o = Te, i = Object.create(o);
  1202. i.parent = o, i.ref = 0, i.global = !1, i.id = ++Ze;
  1203. var a = Ae.env;
  1204. i.env = be ? {
  1205. Promise: Oe,
  1206. PromiseProp: {value: Oe, configurable: !0, writable: !0},
  1207. all: Oe.all,
  1208. race: Oe.race,
  1209. resolve: Oe.resolve,
  1210. reject: Oe.reject,
  1211. nthen: lt(a.nthen, i),
  1212. gthen: lt(a.gthen, i)
  1213. } : {}, t && s(i, t), ++o.ref, i.finalize = function () {
  1214. --this.parent.ref || this.parent.finalize()
  1215. };
  1216. var c = at(i, e, n, r);
  1217. return 0 === i.ref && i.finalize(), c
  1218. }
  1219. function et() {
  1220. return Ge.id || (Ge.id = ++Ye), ++Ge.awaits, Ge.echoes += 7, Ge.id
  1221. }
  1222. function tt(e) {
  1223. !Ge.awaits || e && e !== Ge.id || (0 == --Ge.awaits && (Ge.id = 0), Ge.echoes = 7 * Ge.awaits)
  1224. }
  1225. function nt(e) {
  1226. return Ge.echoes && e && e.constructor === he ? (et(), e.then((function (e) {
  1227. return tt(), e
  1228. }), (function (e) {
  1229. return tt(), _t(e)
  1230. }))) : e
  1231. }
  1232. function rt(e) {
  1233. ++Xe, Ge.echoes && 0 != --Ge.echoes || (Ge.echoes = Ge.id = 0), He.push(Te), it(e, !0)
  1234. }
  1235. function ot() {
  1236. var e = He[He.length - 1];
  1237. He.pop(), it(e, !1)
  1238. }
  1239. function it(e, t) {
  1240. var n, r = Te;
  1241. if ((t ? !Ge.echoes || Ve++ && e === Te : !Ve || --Ve && e === Te) || (n = t ? rt.bind(null, e) : ot, fe.call(ue, n)), e !== Te && (Te = e, r === Ae && (Ae.env = st()), be)) {
  1242. var o = Ae.env.Promise, s = e.env;
  1243. de.then = s.nthen, o.prototype.then = s.gthen, (r.global || e.global) && (Object.defineProperty(i, "Promise", s.PromiseProp), o.all = s.all, o.race = s.race, o.resolve = s.resolve, o.reject = s.reject)
  1244. }
  1245. }
  1246. function st() {
  1247. var e = i.Promise;
  1248. return be ? {
  1249. Promise: e,
  1250. PromiseProp: Object.getOwnPropertyDescriptor(i, "Promise"),
  1251. all: e.all,
  1252. race: e.race,
  1253. resolve: e.resolve,
  1254. reject: e.reject,
  1255. nthen: de.then,
  1256. gthen: e.prototype.then
  1257. } : {}
  1258. }
  1259. function at(e, t, n, r, o) {
  1260. var i = Te;
  1261. try {
  1262. return it(e, !0), t(n, r, o)
  1263. } finally {
  1264. it(i, !1)
  1265. }
  1266. }
  1267. function ct(e, t, n) {
  1268. return "function" != typeof e ? e : function () {
  1269. var r = Te;
  1270. n && et(), it(t, !0);
  1271. try {
  1272. return e.apply(this, arguments)
  1273. } finally {
  1274. it(r, !1)
  1275. }
  1276. }
  1277. }
  1278. function lt(e, t) {
  1279. return function (n, r) {
  1280. return e.call(this, ct(n, t, !1), ct(r, t, !1))
  1281. }
  1282. }
  1283. var ut = "unhandledrejection";
  1284. function dt(e, t) {
  1285. var n;
  1286. try {
  1287. n = t.onuncatched(e)
  1288. } catch (e) {
  1289. }
  1290. if (!1 !== n) try {
  1291. var r, o = {promise: t, reason: e};
  1292. if (i.document && document.createEvent ? ((r = document.createEvent("Event")).initEvent(ut, !0, !0), s(r, o)) : i.CustomEvent && s(r = new CustomEvent(ut, {detail: o}), o), r && i.dispatchEvent && (dispatchEvent(r), !i.PromiseRejectionEvent && i.onunhandledrejection)) try {
  1293. i.onunhandledrejection(r)
  1294. } catch (e) {
  1295. }
  1296. r.defaultPrevented || console.warn("Unhandled rejection: " + (e.stack || e))
  1297. } catch (e) {
  1298. }
  1299. }
  1300. var _t = Oe.reject;
  1301. function ft(e) {
  1302. var t = {}, n = function (n, r) {
  1303. if (r) {
  1304. for (var o = arguments.length, i = new Array(o - 1); --o;) i[o - 1] = arguments[o];
  1305. return t[n].subscribe.apply(null, i), e
  1306. }
  1307. if ("string" == typeof n) return t[n]
  1308. };
  1309. n.addEventType = a;
  1310. for (var i = 1, s = arguments.length; i < s; ++i) a(arguments[i]);
  1311. return n;
  1312. function a(e, r, o) {
  1313. if ("object" == typeof e) return c(e);
  1314. r || (r = se), o || (o = Q);
  1315. var i = {
  1316. subscribers: [], fire: o, subscribe: function (e) {
  1317. -1 === i.subscribers.indexOf(e) && (i.subscribers.push(e), i.fire = r(i.fire, e))
  1318. }, unsubscribe: function (e) {
  1319. i.subscribers = i.subscribers.filter((function (t) {
  1320. return t !== e
  1321. })), i.fire = i.subscribers.reduce(r, o)
  1322. }
  1323. };
  1324. return t[e] = n[e] = i, i
  1325. }
  1326. function c(e) {
  1327. r(e).forEach((function (t) {
  1328. var n = e[t];
  1329. if (o(n)) a(t, e[t][0], e[t][1]); else {
  1330. if ("asap" !== n) throw new V.InvalidArgument("Invalid event config");
  1331. var r = a(t, ee, (function () {
  1332. for (var e = arguments.length, t = new Array(e); e--;) t[e] = arguments[e];
  1333. r.subscribers.forEach((function (e) {
  1334. y((function () {
  1335. e.apply(null, t)
  1336. }))
  1337. }))
  1338. }))
  1339. }
  1340. }))
  1341. }
  1342. }
  1343. var ht, pt = "{version}", bt = String.fromCharCode(65535), mt = function () {
  1344. try {
  1345. return IDBKeyRange.only([[]]), [[]]
  1346. } catch (e) {
  1347. return bt
  1348. }
  1349. }(), gt = -1 / 0,
  1350. vt = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",
  1351. yt = "String expected.", wt = [],
  1352. St = "undefined" != typeof navigator && /(MSIE|Trident|Edge)/.test(navigator.userAgent), Et = St,
  1353. jt = St, kt = function (e) {
  1354. return !/(dexie\.js|dexie\.min\.js)/.test(e)
  1355. };
  1356. function At(e, t) {
  1357. var n, a, c, d, f, h = At.dependencies,
  1358. p = s({addons: At.addons, autoOpen: !0, indexedDB: h.indexedDB, IDBKeyRange: h.IDBKeyRange}, t),
  1359. b = p.addons, y = p.autoOpen, T = p.indexedDB, P = p.IDBKeyRange, U = this._dbSchema = {}, R = [],
  1360. $ = [], L = {}, N = null, F = null, K = !1, q = null, z = !1, Y = "readonly", H = "readwrite",
  1361. X = this, Z = new Oe((function (e) {
  1362. n = e
  1363. })), ne = new Oe((function (e, t) {
  1364. a = t
  1365. })), se = !0, ce = !!Lt(T);
  1366. function le(e) {
  1367. this._cfg = {
  1368. version: e,
  1369. storesSource: null,
  1370. dbschema: {},
  1371. tables: {},
  1372. contentUpgrade: null
  1373. }, this.stores({})
  1374. }
  1375. function ue(e, t, n) {
  1376. var o = X._createTransaction(H, $, U);
  1377. o.create(t), o._completion.catch(n);
  1378. var i = o._reject.bind(o);
  1379. Qe((function () {
  1380. Te.trans = o, 0 === e ? (r(U).forEach((function (e) {
  1381. de(t, e, U[e].primKey, U[e].indexes)
  1382. })), Oe.follow((function () {
  1383. return X.on.populate.fire(o)
  1384. })).catch(i)) : function (e, t, n) {
  1385. var o = [], i = R.filter((function (t) {
  1386. return t._cfg.version === e
  1387. }))[0];
  1388. if (!i) throw new V.Upgrade("Dexie specification of currently installed DB version is missing");
  1389. U = X._dbSchema = i._cfg.dbschema;
  1390. var s = !1;
  1391. function a() {
  1392. return o.length ? Oe.resolve(o.shift()(t.idbtrans)).then(a) : Oe.resolve()
  1393. }
  1394. return R.filter((function (t) {
  1395. return t._cfg.version > e
  1396. })).forEach((function (e) {
  1397. o.push((function () {
  1398. var r = U, o = e._cfg.dbschema;
  1399. Me(r, n), Me(o, n), U = X._dbSchema = o;
  1400. var i = function (e, t) {
  1401. var n = {del: [], add: [], change: []};
  1402. for (var r in e) t[r] || n.del.push(r);
  1403. for (r in t) {
  1404. var o = e[r], i = t[r];
  1405. if (o) {
  1406. var s = {name: r, def: i, recreate: !1, del: [], add: [], change: []};
  1407. if (o.primKey.src !== i.primKey.src) s.recreate = !0, n.change.push(s); else {
  1408. var a = o.idxByName, c = i.idxByName;
  1409. for (var l in a) c[l] || s.del.push(l);
  1410. for (l in c) {
  1411. var u = a[l], d = c[l];
  1412. u ? u.src !== d.src && s.change.push(d) : s.add.push(d)
  1413. }
  1414. (s.del.length > 0 || s.add.length > 0 || s.change.length > 0) && n.change.push(s)
  1415. }
  1416. } else n.add.push([r, i])
  1417. }
  1418. return n
  1419. }(r, o);
  1420. if (i.add.forEach((function (e) {
  1421. de(n, e[0], e[1].primKey, e[1].indexes)
  1422. })), i.change.forEach((function (e) {
  1423. if (e.recreate) throw new V.Upgrade("Not yet support for changing primary key");
  1424. var t = n.objectStore(e.name);
  1425. e.add.forEach((function (e) {
  1426. _e(t, e)
  1427. })), e.change.forEach((function (e) {
  1428. t.deleteIndex(e.name), _e(t, e)
  1429. })), e.del.forEach((function (e) {
  1430. t.deleteIndex(e)
  1431. }))
  1432. })), e._cfg.contentUpgrade) return s = !0, Oe.follow((function () {
  1433. e._cfg.contentUpgrade(t)
  1434. }))
  1435. })), o.push((function (t) {
  1436. s && Et || function (e, t) {
  1437. for (var n = 0; n < t.db.objectStoreNames.length; ++n) {
  1438. var r = t.db.objectStoreNames[n];
  1439. null == e[r] && t.db.deleteObjectStore(r)
  1440. }
  1441. }(e._cfg.dbschema, t)
  1442. }))
  1443. })), a().then((function () {
  1444. !function (e, t) {
  1445. r(e).forEach((function (n) {
  1446. t.db.objectStoreNames.contains(n) || de(t, n, e[n].primKey, e[n].indexes)
  1447. }))
  1448. }(U, n)
  1449. }))
  1450. }(e, o, t).catch(i)
  1451. }))
  1452. }
  1453. function de(e, t, n, r) {
  1454. var o = e.db.createObjectStore(t, n.keyPath ? {
  1455. keyPath: n.keyPath,
  1456. autoIncrement: n.auto
  1457. } : {autoIncrement: n.auto});
  1458. return r.forEach((function (e) {
  1459. _e(o, e)
  1460. })), o
  1461. }
  1462. function _e(e, t) {
  1463. e.createIndex(t.name, t.keyPath, {unique: t.unique, multiEntry: t.multi})
  1464. }
  1465. function fe(e, t, n) {
  1466. if (z || Te.letThrough) {
  1467. var r = X._createTransaction(e, t, U);
  1468. try {
  1469. r.create()
  1470. } catch (e) {
  1471. return _t(e)
  1472. }
  1473. return r._promise(e, (function (e, t) {
  1474. return Qe((function () {
  1475. return Te.trans = r, n(e, t, r)
  1476. }))
  1477. })).then((function (e) {
  1478. return r._completion.then((function () {
  1479. return e
  1480. }))
  1481. }))
  1482. }
  1483. if (!K) {
  1484. if (!y) return _t(new V.DatabaseClosed);
  1485. X.open().catch(Q)
  1486. }
  1487. return Z.then((function () {
  1488. return fe(e, t, n)
  1489. }))
  1490. }
  1491. function be(e, t, n) {
  1492. var r = arguments.length;
  1493. if (r < 2) throw new V.InvalidArgument("Too few arguments");
  1494. for (var o = new Array(r - 1); --r;) o[r - 1] = arguments[r];
  1495. n = o.pop();
  1496. var i = x(o);
  1497. return [e, i, n]
  1498. }
  1499. function me(e, t, n) {
  1500. this.name = e, this.schema = t, this._tx = n, this.hook = L[e] ? L[e].hook : ft(null, {
  1501. creating: [re, Q],
  1502. reading: [te, ee],
  1503. updating: [ie, Q],
  1504. deleting: [oe, Q]
  1505. })
  1506. }
  1507. function ge(e, t, n) {
  1508. return (n ? Ut : It)((function (n) {
  1509. e.push(n), t && t()
  1510. }))
  1511. }
  1512. function ve(e, t, n, r, o) {
  1513. return new Oe((function (i, s) {
  1514. var a = n.length, c = a - 1;
  1515. if (0 === a) return i();
  1516. if (r) {
  1517. var l, u = Ut(s), d = Pt(null);
  1518. E((function () {
  1519. for (var r = 0; r < a; ++r) {
  1520. l = {onsuccess: null, onerror: null};
  1521. var s = n[r];
  1522. o.call(l, s[0], s[1], t);
  1523. var _ = e.delete(s[0]);
  1524. _._hookCtx = l, _.onerror = u, _.onsuccess = r === c ? Pt(i) : d
  1525. }
  1526. }), (function (e) {
  1527. throw l.onerror && l.onerror(e), e
  1528. }))
  1529. } else for (var _ = 0; _ < a; ++_) {
  1530. var f = e.delete(n[_]);
  1531. f.onerror = It(s), _ === c && (f.onsuccess = We((function () {
  1532. return i()
  1533. })))
  1534. }
  1535. }))
  1536. }
  1537. function ye(e, t, n, r) {
  1538. var o = this;
  1539. this.db = X, this.mode = e, this.storeNames = t, this.idbtrans = null, this.on = ft(this, "complete", "error", "abort"), this.parent = r || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new Oe((function (e, t) {
  1540. o._resolve = e, o._reject = t
  1541. })), this._completion.then((function () {
  1542. o.active = !1, o.on.complete.fire()
  1543. }), (function (e) {
  1544. var t = o.active;
  1545. return o.active = !1, o.on.error.fire(e), o.parent ? o.parent._reject(e) : t && o.idbtrans && o.idbtrans.abort(), _t(e)
  1546. }))
  1547. }
  1548. function we(e, t, n) {
  1549. this._ctx = {table: e, index: ":id" === t ? null : t, or: n}
  1550. }
  1551. function Se(e, t) {
  1552. var n = null, r = null;
  1553. if (t) try {
  1554. n = t()
  1555. } catch (e) {
  1556. r = e
  1557. }
  1558. var o = e._ctx, i = o.table;
  1559. this._ctx = {
  1560. table: i,
  1561. index: o.index,
  1562. isPrimKey: !o.index || i.schema.primKey.keyPath && o.index === i.schema.primKey.name,
  1563. range: n,
  1564. keysOnly: !1,
  1565. dir: "next",
  1566. unique: "",
  1567. algorithm: null,
  1568. filter: null,
  1569. replayFilter: null,
  1570. justLimit: !0,
  1571. isMatch: null,
  1572. offset: 0,
  1573. limit: 1 / 0,
  1574. error: r,
  1575. or: o.or,
  1576. valueMapper: i.hook.reading.fire
  1577. }
  1578. }
  1579. function Ee(e, t) {
  1580. return !(e.filter || e.algorithm || e.or) && (t ? e.justLimit : !e.replayFilter)
  1581. }
  1582. function je(e, t) {
  1583. return e._cfg.version - t._cfg.version
  1584. }
  1585. function ke(e, t, n) {
  1586. t.forEach((function (t) {
  1587. var r = n[t];
  1588. e.forEach((function (e) {
  1589. t in e || (e === ye.prototype || e instanceof ye ? _(e, t, {
  1590. get: function () {
  1591. return this.table(t)
  1592. }
  1593. }) : e[t] = new me(t, r))
  1594. }))
  1595. }))
  1596. }
  1597. function Ae(e, t, n, r, o, i) {
  1598. var s = We(i ? function (e, t, r) {
  1599. return n(i(e), t, r)
  1600. } : n, o);
  1601. e.onerror || (e.onerror = It(o)), e.onsuccess = S(t ? function () {
  1602. var n = e.result;
  1603. if (n) {
  1604. var i = function () {
  1605. n.continue()
  1606. };
  1607. t(n, (function (e) {
  1608. i = e
  1609. }), r, o) && s(n.value, n, (function (e) {
  1610. i = e
  1611. })), i()
  1612. } else r()
  1613. } : function () {
  1614. var t = e.result;
  1615. if (t) {
  1616. var n = function () {
  1617. t.continue()
  1618. };
  1619. s(t.value, t, (function (e) {
  1620. n = e
  1621. })), n()
  1622. } else r()
  1623. }, o)
  1624. }
  1625. function xe(e, t) {
  1626. return T.cmp(e, t)
  1627. }
  1628. function Pe(e, t) {
  1629. return xe(e, t) > 0 ? e : t
  1630. }
  1631. function Ie(e, t) {
  1632. return T.cmp(e, t)
  1633. }
  1634. function Ue(e, t) {
  1635. return T.cmp(t, e)
  1636. }
  1637. function Re(e, t) {
  1638. return e < t ? -1 : e === t ? 0 : 1
  1639. }
  1640. function Ce(e, t) {
  1641. return e > t ? -1 : e === t ? 0 : 1
  1642. }
  1643. function De(e, t) {
  1644. return e ? t ? function () {
  1645. return e.apply(this, arguments) && t.apply(this, arguments)
  1646. } : e : t
  1647. }
  1648. function Me(e, t) {
  1649. for (var n = t.db.objectStoreNames, r = 0; r < n.length; ++r) {
  1650. var o = n[r], s = t.objectStore(o);
  1651. c = "getAll" in s;
  1652. for (var a = 0; a < s.indexNames.length; ++a) {
  1653. var l = s.indexNames[a], u = s.index(l).keyPath,
  1654. d = "string" == typeof u ? u : "[" + m(u).join("+") + "]";
  1655. if (e[o]) {
  1656. var _ = e[o].idxByName[d];
  1657. _ && (_.name = l)
  1658. }
  1659. }
  1660. }
  1661. /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && i.WorkerGlobalScope && i instanceof i.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (c = !1)
  1662. }
  1663. function $e(e) {
  1664. X.on("blocked").fire(e), wt.filter((function (e) {
  1665. return e.name === X.name && e !== X && !e._vcFired
  1666. })).map((function (t) {
  1667. return t.on("versionchange").fire(e)
  1668. }))
  1669. }
  1670. this.version = function (e) {
  1671. if (N || K) throw new V.Schema("Cannot add version when database is open");
  1672. this.verno = Math.max(this.verno, e);
  1673. var t = R.filter((function (t) {
  1674. return t._cfg.version === e
  1675. }))[0];
  1676. return t || (t = new le(e), R.push(t), R.sort(je), se = !1, t)
  1677. }, s(le.prototype, {
  1678. stores: function (e) {
  1679. this._cfg.storesSource = this._cfg.storesSource ? s(this._cfg.storesSource, e) : e;
  1680. var t = {};
  1681. R.forEach((function (e) {
  1682. s(t, e._cfg.storesSource)
  1683. }));
  1684. var n = this._cfg.dbschema = {};
  1685. return this._parseStoresSpec(t, n), U = X._dbSchema = n, [L, X, ye.prototype].forEach((function (e) {
  1686. for (var t in e) e[t] instanceof me && delete e[t]
  1687. })), ke([L, X, ye.prototype, this._cfg.tables], r(n), n), $ = r(n), this
  1688. }, upgrade: function (e) {
  1689. return this._cfg.contentUpgrade = e, this
  1690. }, _parseStoresSpec: function (e, t) {
  1691. r(e).forEach((function (n) {
  1692. if (null !== e[n]) {
  1693. var r = {}, i = function (e) {
  1694. var t = [];
  1695. return e.split(",").forEach((function (e) {
  1696. var n = (e = e.trim()).replace(/([&*]|\+\+)/g, ""),
  1697. r = /^\[/.test(n) ? n.match(/^\[(.*)\]$/)[1].split("+") : n;
  1698. t.push(new Dt(n, r || null, /\&/.test(e), /\*/.test(e), /\+\+/.test(e), o(r), /\./.test(e)))
  1699. })), t
  1700. }(e[n]), s = i.shift();
  1701. if (s.multi) throw new V.Schema("Primary key cannot be multi-valued");
  1702. s.keyPath && k(r, s.keyPath, s.auto ? 0 : s.keyPath), i.forEach((function (e) {
  1703. if (e.auto) throw new V.Schema("Only primary key can be marked as autoIncrement (++)");
  1704. if (!e.keyPath) throw new V.Schema("Index must have a name and cannot be an empty string");
  1705. k(r, e.keyPath, e.compound ? e.keyPath.map((function () {
  1706. return ""
  1707. })) : "")
  1708. })), t[n] = new Mt(n, s, i, r)
  1709. }
  1710. }))
  1711. }
  1712. }), this._allTables = L, this._createTransaction = function (e, t, n, r) {
  1713. return new ye(e, t, n, r)
  1714. }, this._whenReady = function (e) {
  1715. return z || Te.letThrough ? e() : new Oe((function (e, t) {
  1716. if (!K) {
  1717. if (!y) return void t(new V.DatabaseClosed);
  1718. X.open().catch(Q)
  1719. }
  1720. Z.then(e, t)
  1721. })).then(e)
  1722. }, this.verno = 0, this.open = function () {
  1723. if (K || N) return Z.then((function () {
  1724. return F ? _t(F) : X
  1725. }));
  1726. M && (ne._stackHolder = J()), K = !0, F = null, z = !1;
  1727. var t = n, o = null;
  1728. return Oe.race([ne, new Oe((function (t, n) {
  1729. if (!T) throw new V.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.");
  1730. var i = se ? T.open(e) : T.open(e, Math.round(10 * X.verno));
  1731. if (!i) throw new V.MissingAPI("IndexedDB API not available");
  1732. i.onerror = It(n), i.onblocked = We($e), i.onupgradeneeded = We((function (t) {
  1733. if (o = i.transaction, se && !X._allowEmptyDB) {
  1734. i.onerror = Rt, o.abort(), i.result.close();
  1735. var r = T.deleteDatabase(e);
  1736. r.onsuccess = r.onerror = We((function () {
  1737. n(new V.NoSuchDatabase("Database " + e + " doesnt exist"))
  1738. }))
  1739. } else {
  1740. o.onerror = It(n), ue((t.oldVersion > Math.pow(2, 62) ? 0 : t.oldVersion) / 10, o, n)
  1741. }
  1742. }), n), i.onsuccess = We((function () {
  1743. if (o = null, N = i.result, wt.push(X), se) !function () {
  1744. if (X.verno = N.version / 10, X._dbSchema = U = {}, 0 === ($ = m(N.objectStoreNames, 0)).length) return;
  1745. const e = Te.txRelaxedDurabilityEnabled ? {durability: "relaxed"} : {durability: "default"};
  1746. var t = N.transaction($t($), "readonly", e);
  1747. $.forEach((function (e) {
  1748. for (var n = t.objectStore(e), r = n.keyPath, o = r && "string" == typeof r && -1 !== r.indexOf("."), i = new Dt(r, r || "", !1, !1, !!n.autoIncrement, r && "string" != typeof r, o), s = [], a = 0; a < n.indexNames.length; ++a) {
  1749. var c = n.index(n.indexNames[a]);
  1750. o = (r = c.keyPath) && "string" == typeof r && -1 !== r.indexOf(".");
  1751. var l = new Dt(c.name, r, !!c.unique, !!c.multiEntry, !1, r && "string" != typeof r, o);
  1752. s.push(l)
  1753. }
  1754. U[e] = new Mt(e, i, s, {})
  1755. })), ke([L], r(U), U)
  1756. }(); else if (N.objectStoreNames.length > 0) try {
  1757. const e = Te.txRelaxedDurabilityEnabled ? {durability: "relaxed"} : {durability: "default"};
  1758. Me(U, N.transaction($t(N.objectStoreNames), Y, e))
  1759. } catch (e) {
  1760. }
  1761. N.onversionchange = We((function (e) {
  1762. X._vcFired = !0, X.on("versionchange").fire(e)
  1763. })), ce || "__dbnames" === e || ht.dbnames.put({name: e}).catch(Q), t()
  1764. }), n)
  1765. }))]).then((function () {
  1766. return q = [], Oe.resolve(At.vip(X.on.ready.fire)).then((function e() {
  1767. if (q.length > 0) {
  1768. var t = q.reduce(ae, Q);
  1769. return q = [], Oe.resolve(At.vip(t)).then(e)
  1770. }
  1771. }))
  1772. })).finally((function () {
  1773. q = null
  1774. })).then((function () {
  1775. return K = !1, X
  1776. })).catch((function (e) {
  1777. try {
  1778. o && o.abort()
  1779. } catch (e) {
  1780. }
  1781. return K = !1, X.close(), _t(F = e)
  1782. })).finally((function () {
  1783. z = !0, t()
  1784. }))
  1785. }, this.close = function () {
  1786. var e = wt.indexOf(X);
  1787. if (e >= 0 && wt.splice(e, 1), N) {
  1788. try {
  1789. N.close()
  1790. } catch (e) {
  1791. }
  1792. N = null
  1793. }
  1794. y = !1, F = new V.DatabaseClosed, K && a(F), Z = new Oe((function (e) {
  1795. n = e
  1796. })), ne = new Oe((function (e, t) {
  1797. a = t
  1798. }))
  1799. }, this.delete = function () {
  1800. var t = arguments.length > 0;
  1801. return new Oe((function (n, r) {
  1802. if (t) throw new V.InvalidArgument("Arguments not allowed in db.delete()");
  1803. function o() {
  1804. X.close();
  1805. var t = T.deleteDatabase(e);
  1806. t.onsuccess = We((function () {
  1807. ce || ht.dbnames.delete(e).catch(Q), n()
  1808. })), t.onerror = It(r), t.onblocked = $e
  1809. }
  1810. K ? Z.then(o) : o()
  1811. }))
  1812. }, this.backendDB = function () {
  1813. return N
  1814. }, this.isOpen = function () {
  1815. return null !== N
  1816. }, this.hasBeenClosed = function () {
  1817. return F && F instanceof V.DatabaseClosed
  1818. }, this.hasFailed = function () {
  1819. return null !== F
  1820. }, this.dynamicallyOpened = function () {
  1821. return se
  1822. }, this.name = e, u(this, {
  1823. tables: {
  1824. get: function () {
  1825. return r(L).map((function (e) {
  1826. return L[e]
  1827. }))
  1828. }
  1829. }
  1830. }), this.on = ft(this, "populate", "blocked", "versionchange", {ready: [ae, Q]}), this.on.ready.subscribe = g(this.on.ready.subscribe, (function (e) {
  1831. return function (t, n) {
  1832. At.vip((function () {
  1833. z ? (F || Oe.resolve().then(t), n && e(t)) : q ? (q.push(t), n && e(t)) : (e(t), n || e((function e() {
  1834. X.on.ready.unsubscribe(t), X.on.ready.unsubscribe(e)
  1835. })))
  1836. }))
  1837. }
  1838. })), this.transaction = function () {
  1839. var e = be.apply(this, arguments);
  1840. return this._transaction.apply(this, e)
  1841. }, this._transaction = function (e, t, n) {
  1842. var r = Te.trans;
  1843. r && r.db === X && -1 === e.indexOf("!") || (r = null);
  1844. var o = -1 !== e.indexOf("?");
  1845. e = e.replace("!", "").replace("?", "");
  1846. try {
  1847. var i = t.map((function (e) {
  1848. var t = e instanceof me ? e.name : e;
  1849. if ("string" != typeof t) throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
  1850. return t
  1851. }));
  1852. if ("r" == e || e == Y) e = Y; else {
  1853. if ("rw" != e && e != H) throw new V.InvalidArgument("Invalid transaction mode: " + e);
  1854. e = H
  1855. }
  1856. if (r) {
  1857. if (r.mode === Y && e === H) {
  1858. if (!o) throw new V.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
  1859. r = null
  1860. }
  1861. r && i.forEach((function (e) {
  1862. if (r && -1 === r.storeNames.indexOf(e)) {
  1863. if (!o) throw new V.SubTransaction("Table " + e + " not included in parent transaction.");
  1864. r = null
  1865. }
  1866. })), o && r && !r.active && (r = null)
  1867. }
  1868. } catch (e) {
  1869. return r ? r._promise(null, (function (t, n) {
  1870. n(e)
  1871. })) : _t(e)
  1872. }
  1873. return r ? r._promise(e, s, "lock") : Te.trans ? at(Te.transless, (function () {
  1874. return X._whenReady(s)
  1875. })) : X._whenReady(s);
  1876. function s() {
  1877. return Oe.resolve().then((function () {
  1878. var t, o = Te.transless || Te, s = X._createTransaction(e, i, U, r),
  1879. a = {trans: s, transless: o};
  1880. r ? s.idbtrans = r.idbtrans : s.create(), n.constructor === pe && et();
  1881. var c = Oe.follow((function () {
  1882. if (t = n.call(s, s)) if (t.constructor === he) {
  1883. var e = tt.bind(null, null);
  1884. t.then(e, e)
  1885. } else "function" == typeof t.next && "function" == typeof t.throw && (t = Ct(t))
  1886. }), a);
  1887. return (t && "function" == typeof t.then ? Oe.resolve(t).then((function (e) {
  1888. return s.active ? e : _t(new V.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))
  1889. })) : c.then((function () {
  1890. return t
  1891. }))).then((function (e) {
  1892. return r && s._resolve(), s._completion.then((function () {
  1893. return e
  1894. }))
  1895. })).catch((function (e) {
  1896. return s._reject(e), _t(e)
  1897. }))
  1898. }))
  1899. }
  1900. }, this.table = function (e) {
  1901. if (!l(L, e)) throw new V.InvalidTable("Table " + e + " does not exist");
  1902. return L[e]
  1903. }, u(me.prototype, {
  1904. _trans: function (e, t, n) {
  1905. var r = this._tx || Te.trans;
  1906. return r && r.db === X ? r === Te.trans ? r._promise(e, t, n) : Qe((function () {
  1907. return r._promise(e, t, n)
  1908. }), {trans: r, transless: Te.transless || Te}) : fe(e, [this.name], t)
  1909. }, _idbstore: function (e, t, n) {
  1910. var r = this.name;
  1911. return this._trans(e, (function (e, n, o) {
  1912. if (-1 === o.storeNames.indexOf(r)) throw new V.NotFound("Table" + r + " not part of transaction");
  1913. return t(e, n, o.idbtrans.objectStore(r), o)
  1914. }), n)
  1915. }, get: function (e, t) {
  1916. if (e && e.constructor === Object) return this.where(e).first(t);
  1917. var n = this;
  1918. return this._idbstore(Y, (function (t, r, o) {
  1919. var i = o.get(e);
  1920. i.onerror = It(r), i.onsuccess = We((function () {
  1921. t(n.hook.reading.fire(i.result))
  1922. }), r)
  1923. })).then(t)
  1924. }, where: function (e) {
  1925. if ("string" == typeof e) return new we(this, e);
  1926. if (o(e)) return new we(this, "[" + e.join("+") + "]");
  1927. var t = r(e);
  1928. if (1 === t.length) return this.where(t[0]).equals(e[t[0]]);
  1929. var n = this.schema.indexes.concat(this.schema.primKey).filter((function (e) {
  1930. return e.compound && t.every((function (t) {
  1931. return e.keyPath.indexOf(t) >= 0
  1932. })) && e.keyPath.every((function (e) {
  1933. return t.indexOf(e) >= 0
  1934. }))
  1935. }))[0];
  1936. if (n && mt !== bt) return this.where(n.name).equals(n.keyPath.map((function (t) {
  1937. return e[t]
  1938. })));
  1939. n || console.warn("The query " + JSON.stringify(e) + " on " + this.name + " would benefit of a compound index [" + t.join("+") + "]");
  1940. var i = this.schema.idxByName, s = t.reduce((function (t, n) {
  1941. return [t[0] || i[n], t[0] || !i[n] ? De(t[1], (function (t) {
  1942. return "" + j(t, n) == "" + e[n]
  1943. })) : t[1]]
  1944. }), [null, null]), a = s[0];
  1945. return a ? this.where(a.name).equals(e[a.keyPath]).filter(s[1]) : n ? this.filter(s[1]) : this.where(t).equals("")
  1946. }, count: function (e) {
  1947. return this.toCollection().count(e)
  1948. }, offset: function (e) {
  1949. return this.toCollection().offset(e)
  1950. }, limit: function (e) {
  1951. return this.toCollection().limit(e)
  1952. }, reverse: function () {
  1953. return this.toCollection().reverse()
  1954. }, filter: function (e) {
  1955. return this.toCollection().and(e)
  1956. }, each: function (e) {
  1957. return this.toCollection().each(e)
  1958. }, toArray: function (e) {
  1959. return this.toCollection().toArray(e)
  1960. }, orderBy: function (e) {
  1961. return new Se(new we(this, o(e) ? "[" + e.join("+") + "]" : e))
  1962. }, toCollection: function () {
  1963. return new Se(new we(this))
  1964. }, mapToClass: function (e, t) {
  1965. this.schema.mappedClass = e;
  1966. var n = Object.create(e.prototype);
  1967. t && xt(n, t), this.schema.instanceTemplate = n;
  1968. var r = function (t) {
  1969. if (!t) return t;
  1970. var n = Object.create(e.prototype);
  1971. for (var r in t) if (l(t, r)) try {
  1972. n[r] = t[r]
  1973. } catch (e) {
  1974. }
  1975. return n
  1976. };
  1977. return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = r, this.hook("reading", r), e
  1978. }, defineClass: function (e) {
  1979. return this.mapToClass(At.defineClass(e), e)
  1980. }, bulkDelete: function (e) {
  1981. return this.hook.deleting.fire === Q ? this._idbstore(H, (function (t, n, r, o) {
  1982. t(ve(r, o, e, !1, Q))
  1983. })) : this.where(":id").anyOf(e).delete().then((function () {
  1984. }))
  1985. }, bulkPut: function (e, t) {
  1986. var n = this;
  1987. return this._idbstore(H, (function (r, o, i) {
  1988. if (!i.keyPath && !n.schema.primKey.auto && !t) throw new V.InvalidArgument("bulkPut() with non-inbound keys requires keys array in second argument");
  1989. if (i.keyPath && t) throw new V.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
  1990. if (t && t.length !== e.length) throw new V.InvalidArgument("Arguments objects and keys must have the same length");
  1991. if (0 === e.length) return r();
  1992. var s, a, c = function (e) {
  1993. 0 === l.length ? r(e) : o(new G(n.name + ".bulkPut(): " + l.length + " of " + u + " operations failed", l))
  1994. }, l = [], u = e.length, d = n;
  1995. if (n.hook.creating.fire === Q && n.hook.updating.fire === Q) {
  1996. a = ge(l);
  1997. for (var _ = 0, f = e.length; _ < f; ++_) (s = t ? i.put(e[_], t[_]) : i.put(e[_])).onerror = a;
  1998. s.onerror = ge(l, c), s.onsuccess = Ot(c)
  1999. } else {
  2000. var h = t || i.keyPath && e.map((function (e) {
  2001. return j(e, i.keyPath)
  2002. })), p = h && w(h, (function (t, n) {
  2003. return null != t && [t, e[n]]
  2004. }));
  2005. (h ? d.where(":id").anyOf(h.filter((function (e) {
  2006. return null != e
  2007. }))).modify((function () {
  2008. this.value = p[this.primKey], p[this.primKey] = null
  2009. })).catch(W, (function (e) {
  2010. l = e.failures
  2011. })).then((function () {
  2012. for (var n = [], r = t && [], o = h.length - 1; o >= 0; --o) {
  2013. var i = h[o];
  2014. (null == i || p[i]) && (n.push(e[o]), t && r.push(i), null != i && (p[i] = null))
  2015. }
  2016. return n.reverse(), t && r.reverse(), d.bulkAdd(n, r)
  2017. })).then((function (e) {
  2018. var t = h[h.length - 1];
  2019. return null != t ? t : e
  2020. })) : d.bulkAdd(e)).then(c).catch(G, (function (e) {
  2021. l = l.concat(e.failures), c()
  2022. })).catch(o)
  2023. }
  2024. }), "locked")
  2025. }, bulkAdd: function (e, t) {
  2026. var n = this, r = this.hook.creating.fire;
  2027. return this._idbstore(H, (function (o, i, s, a) {
  2028. if (!s.keyPath && !n.schema.primKey.auto && !t) throw new V.InvalidArgument("bulkAdd() with non-inbound keys requires keys array in second argument");
  2029. if (s.keyPath && t) throw new V.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
  2030. if (t && t.length !== e.length) throw new V.InvalidArgument("Arguments objects and keys must have the same length");
  2031. if (0 === e.length) return o();
  2032. function c(e) {
  2033. 0 === _.length ? o(e) : i(new G(n.name + ".bulkAdd(): " + _.length + " of " + f + " operations failed", _))
  2034. }
  2035. var l, u, d, _ = [], f = e.length;
  2036. if (r !== Q) {
  2037. var h, p = s.keyPath;
  2038. u = ge(_, null, !0), d = Pt(null), E((function () {
  2039. for (var n = 0, o = e.length; n < o; ++n) {
  2040. h = {onerror: null, onsuccess: null};
  2041. var i = t && t[n], c = e[n], _ = t ? i : p ? j(c, p) : void 0,
  2042. f = r.call(h, _, c, a);
  2043. null == _ && null != f && (p ? k(c = I(c), p, f) : i = f), (l = null != i ? s.add(c, i) : s.add(c))._hookCtx = h, n < o - 1 && (l.onerror = u, h.onsuccess && (l.onsuccess = d))
  2044. }
  2045. }), (function (e) {
  2046. throw h.onerror && h.onerror(e), e
  2047. })), l.onerror = ge(_, c, !0), l.onsuccess = Pt(c)
  2048. } else {
  2049. u = ge(_);
  2050. for (var b = 0, m = e.length; b < m; ++b) (l = t ? s.add(e[b], t[b]) : s.add(e[b])).onerror = u;
  2051. l.onerror = ge(_, c), l.onsuccess = Ot(c)
  2052. }
  2053. }))
  2054. }, add: function (e, t) {
  2055. var n = this.hook.creating.fire;
  2056. return this._idbstore(H, (function (r, o, i, s) {
  2057. var a = {onsuccess: null, onerror: null};
  2058. if (n !== Q) {
  2059. var c = null != t ? t : i.keyPath ? j(e, i.keyPath) : void 0, l = n.call(a, c, e, s);
  2060. null == c && null != l && (i.keyPath ? k(e, i.keyPath, l) : t = l)
  2061. }
  2062. try {
  2063. var u = null != t ? i.add(e, t) : i.add(e);
  2064. u._hookCtx = a, u.onerror = Ut(o), u.onsuccess = Pt((function (t) {
  2065. var n = i.keyPath;
  2066. n && k(e, n, t), r(t)
  2067. }))
  2068. } catch (e) {
  2069. throw a.onerror && a.onerror(e), e
  2070. }
  2071. }))
  2072. }, put: function (e, t) {
  2073. var n = this, r = this.hook.creating.fire, o = this.hook.updating.fire;
  2074. if (r !== Q || o !== Q) {
  2075. var i = this.schema.primKey.keyPath, s = void 0 !== t ? t : i && j(e, i);
  2076. return null == s ? this.add(e) : (e = I(e), this._trans(H, (function () {
  2077. return n.where(":id").equals(s).modify((function () {
  2078. this.value = e
  2079. })).then((function (r) {
  2080. return 0 === r ? n.add(e, t) : s
  2081. }))
  2082. }), "locked"))
  2083. }
  2084. return this._idbstore(H, (function (n, r, o) {
  2085. var i = void 0 !== t ? o.put(e, t) : o.put(e);
  2086. i.onerror = It(r), i.onsuccess = We((function (t) {
  2087. var r = o.keyPath;
  2088. r && k(e, r, t.target.result), n(i.result)
  2089. }))
  2090. }))
  2091. }, delete: function (e) {
  2092. return this.hook.deleting.subscribers.length ? this.where(":id").equals(e).delete() : this._idbstore(H, (function (t, n, r) {
  2093. var o = r.delete(e);
  2094. o.onerror = It(n), o.onsuccess = We((function () {
  2095. t(o.result)
  2096. }))
  2097. }))
  2098. }, clear: function () {
  2099. return this.hook.deleting.subscribers.length ? this.toCollection().delete() : this._idbstore(H, (function (e, t, n) {
  2100. var r = n.clear();
  2101. r.onerror = It(t), r.onsuccess = We((function () {
  2102. e(r.result)
  2103. }))
  2104. }))
  2105. }, update: function (e, t) {
  2106. if ("object" != typeof t || o(t)) throw new V.InvalidArgument("Modifications must be an object.");
  2107. if ("object" != typeof e || o(e)) return this.where(":id").equals(e).modify(t);
  2108. r(t).forEach((function (n) {
  2109. k(e, n, t[n])
  2110. }));
  2111. var n = j(e, this.schema.primKey.keyPath);
  2112. return void 0 === n ? _t(new V.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(n).modify(t)
  2113. }
  2114. }), u(ye.prototype, {
  2115. _lock: function () {
  2116. return v(!Te.global), ++this._reculock, 1 !== this._reculock || Te.global || (Te.lockOwnerFor = this), this
  2117. }, _unlock: function () {
  2118. if (v(!Te.global), 0 == --this._reculock) for (Te.global || (Te.lockOwnerFor = null); this._blockedFuncs.length > 0 && !this._locked();) {
  2119. var e = this._blockedFuncs.shift();
  2120. try {
  2121. at(e[1], e[0])
  2122. } catch (e) {
  2123. }
  2124. }
  2125. return this
  2126. }, _locked: function () {
  2127. return this._reculock && Te.lockOwnerFor !== this
  2128. }, create: function (e) {
  2129. var t = this;
  2130. if (!this.mode) return this;
  2131. if (v(!this.idbtrans), !e && !N) switch (F && F.name) {
  2132. case"DatabaseClosedError":
  2133. throw new V.DatabaseClosed(F);
  2134. case"MissingAPIError":
  2135. throw new V.MissingAPI(F.message, F);
  2136. default:
  2137. throw new V.OpenFailed(F)
  2138. }
  2139. if (!this.active) throw new V.TransactionInactive;
  2140. v(null === this._completion._state);
  2141. const n = Te.txRelaxedDurabilityEnabled ? {durability: "relaxed"} : {durability: "default"};
  2142. return (e = this.idbtrans = e || N.transaction($t(this.storeNames), this.mode, n)).onerror = We((function (n) {
  2143. Rt(n), t._reject(e.error)
  2144. })), e.onabort = We((function (n) {
  2145. Rt(n), t.active && t._reject(new V.Abort(e.error)), t.active = !1, t.on("abort").fire(n)
  2146. })), e.oncomplete = We((function () {
  2147. t.active = !1, t._resolve()
  2148. })), this
  2149. }, _promise: function (e, t, n) {
  2150. var r = this;
  2151. if (e === H && this.mode !== H) return _t(new V.ReadOnly("Transaction is readonly"));
  2152. if (!this.active) return _t(new V.TransactionInactive);
  2153. if (this._locked()) return new Oe((function (o, i) {
  2154. r._blockedFuncs.push([function () {
  2155. r._promise(e, t, n).then(o, i)
  2156. }, Te])
  2157. }));
  2158. if (n) return Qe((function () {
  2159. var e = new Oe((function (e, n) {
  2160. r._lock();
  2161. var o = t(e, n, r);
  2162. o && o.then && o.then(e, n)
  2163. }));
  2164. return e.finally((function () {
  2165. return r._unlock()
  2166. })), e._lib = !0, e
  2167. }));
  2168. var o = new Oe((function (e, n) {
  2169. var o = t(e, n, r);
  2170. o && o.then && o.then(e, n)
  2171. }));
  2172. return o._lib = !0, o
  2173. }, _root: function () {
  2174. return this.parent ? this.parent._root() : this
  2175. }, waitFor: function (e) {
  2176. var t = this._root();
  2177. if (e = Oe.resolve(e), t._waitingFor) t._waitingFor = t._waitingFor.then((function () {
  2178. return e
  2179. })); else {
  2180. t._waitingFor = e, t._waitingQueue = [];
  2181. var n = t.idbtrans.objectStore(t.storeNames[0]);
  2182. !function e() {
  2183. for (++t._spinCount; t._waitingQueue.length;) t._waitingQueue.shift()();
  2184. t._waitingFor && (n.get(-1 / 0).onsuccess = e)
  2185. }()
  2186. }
  2187. var r = t._waitingFor;
  2188. return new Oe((function (n, o) {
  2189. e.then((function (e) {
  2190. return t._waitingQueue.push(We(n.bind(null, e)))
  2191. }), (function (e) {
  2192. return t._waitingQueue.push(We(o.bind(null, e)))
  2193. })).finally((function () {
  2194. t._waitingFor === r && (t._waitingFor = null)
  2195. }))
  2196. }))
  2197. }, abort: function () {
  2198. this.active && this._reject(new V.Abort), this.active = !1
  2199. }, tables: {
  2200. get: (d = "Transaction.tables", f = function () {
  2201. return L
  2202. }, function () {
  2203. return console.warn(d + " is deprecated. See https://github.com/dfahlander/Dexie.js/wiki/Deprecations. " + B(J(), 1)), f.apply(this, arguments)
  2204. })
  2205. }, table: function (e) {
  2206. return new me(e, X.table(e).schema, this)
  2207. }
  2208. }), u(we.prototype, (function () {
  2209. function e(e, t, n) {
  2210. var r = e instanceof we ? new Se(e) : e;
  2211. return r._ctx.error = n ? new n(t) : new TypeError(t), r
  2212. }
  2213. function t(e) {
  2214. return new Se(e, (function () {
  2215. return P.only("")
  2216. })).limit(0)
  2217. }
  2218. function n(e, t, n, r, o, i) {
  2219. for (var s = Math.min(e.length, r.length), a = -1, c = 0; c < s; ++c) {
  2220. var l = t[c];
  2221. if (l !== r[c]) return o(e[c], n[c]) < 0 ? e.substr(0, c) + n[c] + n.substr(c + 1) : o(e[c], r[c]) < 0 ? e.substr(0, c) + r[c] + n.substr(c + 1) : a >= 0 ? e.substr(0, a) + t[a] + n.substr(a + 1) : null;
  2222. o(e[c], l) < 0 && (a = c)
  2223. }
  2224. return s < r.length && "next" === i ? e + n.substr(e.length) : s < e.length && "prev" === i ? e.substr(0, n.length) : a < 0 ? null : e.substr(0, a) + r[a] + n.substr(a + 1)
  2225. }
  2226. function r(t, r, o, i) {
  2227. var s, a, c, l, u, d, _, f = o.length;
  2228. if (!o.every((function (e) {
  2229. return "string" == typeof e
  2230. }))) return e(t, yt);
  2231. function h(e) {
  2232. s = function (e) {
  2233. return "next" === e ? function (e) {
  2234. return e.toUpperCase()
  2235. } : function (e) {
  2236. return e.toLowerCase()
  2237. }
  2238. }(e), a = function (e) {
  2239. return "next" === e ? function (e) {
  2240. return e.toLowerCase()
  2241. } : function (e) {
  2242. return e.toUpperCase()
  2243. }
  2244. }(e), c = "next" === e ? Re : Ce;
  2245. var t = o.map((function (e) {
  2246. return {lower: a(e), upper: s(e)}
  2247. })).sort((function (e, t) {
  2248. return c(e.lower, t.lower)
  2249. }));
  2250. l = t.map((function (e) {
  2251. return e.upper
  2252. })), u = t.map((function (e) {
  2253. return e.lower
  2254. })), d = e, _ = "next" === e ? "" : i
  2255. }
  2256. h("next");
  2257. var p = new Se(t, (function () {
  2258. return P.bound(l[0], u[f - 1] + i)
  2259. }));
  2260. p._ondirectionchange = function (e) {
  2261. h(e)
  2262. };
  2263. var b = 0;
  2264. return p._addAlgorithm((function (e, t, o) {
  2265. var i = e.key;
  2266. if ("string" != typeof i) return !1;
  2267. var s = a(i);
  2268. if (r(s, u, b)) return !0;
  2269. for (var h = null, p = b; p < f; ++p) {
  2270. var m = n(i, s, l[p], u[p], c, d);
  2271. null === m && null === h ? b = p + 1 : (null === h || c(h, m) > 0) && (h = m)
  2272. }
  2273. return t(null !== h ? function () {
  2274. e.continue(h + _)
  2275. } : o), !1
  2276. })), p
  2277. }
  2278. return {
  2279. between: function (n, r, o, i) {
  2280. o = !1 !== o, i = !0 === i;
  2281. try {
  2282. return xe(n, r) > 0 || 0 === xe(n, r) && (o || i) && (!o || !i) ? t(this) : new Se(this, (function () {
  2283. return P.bound(n, r, !o, !i)
  2284. }))
  2285. } catch (t) {
  2286. return e(this, vt)
  2287. }
  2288. }, equals: function (e) {
  2289. return new Se(this, (function () {
  2290. return P.only(e)
  2291. }))
  2292. }, above: function (e) {
  2293. return new Se(this, (function () {
  2294. return P.lowerBound(e, !0)
  2295. }))
  2296. }, aboveOrEqual: function (e) {
  2297. return new Se(this, (function () {
  2298. return P.lowerBound(e)
  2299. }))
  2300. }, below: function (e) {
  2301. return new Se(this, (function () {
  2302. return P.upperBound(e, !0)
  2303. }))
  2304. }, belowOrEqual: function (e) {
  2305. return new Se(this, (function () {
  2306. return P.upperBound(e)
  2307. }))
  2308. }, startsWith: function (t) {
  2309. return "string" != typeof t ? e(this, yt) : this.between(t, t + bt, !0, !0)
  2310. }, startsWithIgnoreCase: function (e) {
  2311. return "" === e ? this.startsWith(e) : r(this, (function (e, t) {
  2312. return 0 === e.indexOf(t[0])
  2313. }), [e], bt)
  2314. }, equalsIgnoreCase: function (e) {
  2315. return r(this, (function (e, t) {
  2316. return e === t[0]
  2317. }), [e], "")
  2318. }, anyOfIgnoreCase: function () {
  2319. var e = D.apply(C, arguments);
  2320. return 0 === e.length ? t(this) : r(this, (function (e, t) {
  2321. return -1 !== t.indexOf(e)
  2322. }), e, "")
  2323. }, startsWithAnyOfIgnoreCase: function () {
  2324. var e = D.apply(C, arguments);
  2325. return 0 === e.length ? t(this) : r(this, (function (e, t) {
  2326. return t.some((function (t) {
  2327. return 0 === e.indexOf(t)
  2328. }))
  2329. }), e, bt)
  2330. }, anyOf: function () {
  2331. var n = D.apply(C, arguments), r = Ie;
  2332. try {
  2333. n.sort(r)
  2334. } catch (t) {
  2335. return e(this, vt)
  2336. }
  2337. if (0 === n.length) return t(this);
  2338. var o = new Se(this, (function () {
  2339. return P.bound(n[0], n[n.length - 1])
  2340. }));
  2341. o._ondirectionchange = function (e) {
  2342. r = "next" === e ? Ie : Ue, n.sort(r)
  2343. };
  2344. var i = 0;
  2345. return o._addAlgorithm((function (e, t, o) {
  2346. for (var s = e.key; r(s, n[i]) > 0;) if (++i === n.length) return t(o), !1;
  2347. return 0 === r(s, n[i]) || (t((function () {
  2348. e.continue(n[i])
  2349. })), !1)
  2350. })), o
  2351. }, notEqual: function (e) {
  2352. return this.inAnyRange([[gt, e], [e, mt]], {includeLowers: !1, includeUppers: !1})
  2353. }, noneOf: function () {
  2354. var t = D.apply(C, arguments);
  2355. if (0 === t.length) return new Se(this);
  2356. try {
  2357. t.sort(Ie)
  2358. } catch (t) {
  2359. return e(this, vt)
  2360. }
  2361. var n = t.reduce((function (e, t) {
  2362. return e ? e.concat([[e[e.length - 1][1], t]]) : [[gt, t]]
  2363. }), null);
  2364. return n.push([t[t.length - 1], mt]), this.inAnyRange(n, {
  2365. includeLowers: !1,
  2366. includeUppers: !1
  2367. })
  2368. }, inAnyRange: function (n, r) {
  2369. if (0 === n.length) return t(this);
  2370. if (!n.every((function (e) {
  2371. return void 0 !== e[0] && void 0 !== e[1] && Ie(e[0], e[1]) <= 0
  2372. }))) return e(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", V.InvalidArgument);
  2373. var o = !r || !1 !== r.includeLowers, i = r && !0 === r.includeUppers;
  2374. var s, a = Ie;
  2375. function c(e, t) {
  2376. return a(e[0], t[0])
  2377. }
  2378. try {
  2379. (s = n.reduce((function (e, t) {
  2380. for (var n = 0, r = e.length; n < r; ++n) {
  2381. var o = e[n];
  2382. if (xe(t[0], o[1]) < 0 && xe(t[1], o[0]) > 0) {
  2383. o[0] = xe(i = o[0], s = t[0]) < 0 ? i : s, o[1] = Pe(o[1], t[1]);
  2384. break
  2385. }
  2386. }
  2387. var i, s;
  2388. return n === r && e.push(t), e
  2389. }), [])).sort(c)
  2390. } catch (t) {
  2391. return e(this, vt)
  2392. }
  2393. var l = 0, u = i ? function (e) {
  2394. return Ie(e, s[l][1]) > 0
  2395. } : function (e) {
  2396. return Ie(e, s[l][1]) >= 0
  2397. }, d = o ? function (e) {
  2398. return Ue(e, s[l][0]) > 0
  2399. } : function (e) {
  2400. return Ue(e, s[l][0]) >= 0
  2401. };
  2402. var _ = u, f = new Se(this, (function () {
  2403. return P.bound(s[0][0], s[s.length - 1][1], !o, !i)
  2404. }));
  2405. return f._ondirectionchange = function (e) {
  2406. "next" === e ? (_ = u, a = Ie) : (_ = d, a = Ue), s.sort(c)
  2407. }, f._addAlgorithm((function (e, t, n) {
  2408. for (var r = e.key; _(r);) if (++l === s.length) return t(n), !1;
  2409. return !!function (e) {
  2410. return !u(e) && !d(e)
  2411. }(r) || (0 === xe(r, s[l][1]) || 0 === xe(r, s[l][0]) || t((function () {
  2412. a === Ie ? e.continue(s[l][0]) : e.continue(s[l][1])
  2413. })), !1)
  2414. })), f
  2415. }, startsWithAnyOf: function () {
  2416. var n = D.apply(C, arguments);
  2417. return n.every((function (e) {
  2418. return "string" == typeof e
  2419. })) ? 0 === n.length ? t(this) : this.inAnyRange(n.map((function (e) {
  2420. return [e, e + bt]
  2421. }))) : e(this, "startsWithAnyOf() only works with strings")
  2422. }
  2423. }
  2424. })), u(Se.prototype, (function () {
  2425. function e(e, t) {
  2426. e.filter = De(e.filter, t)
  2427. }
  2428. function t(e, t, n) {
  2429. var r = e.replayFilter;
  2430. e.replayFilter = r ? function () {
  2431. return De(r(), t())
  2432. } : t, e.justLimit = n && !r
  2433. }
  2434. function n(e, t) {
  2435. if (e.isPrimKey) return t;
  2436. var n = e.table.schema.idxByName[e.index];
  2437. if (!n) throw new V.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
  2438. return t.index(n.name)
  2439. }
  2440. function o(e, t) {
  2441. var r = n(e, t);
  2442. return e.keysOnly && "openKeyCursor" in r ? r.openKeyCursor(e.range || null, e.dir + e.unique) : r.openCursor(e.range || null, e.dir + e.unique)
  2443. }
  2444. function i(e, t, n, r, i) {
  2445. var s = e.replayFilter ? De(e.filter, e.replayFilter()) : e.filter;
  2446. e.or ? function () {
  2447. var a = {}, c = 0;
  2448. function u() {
  2449. 2 == ++c && n()
  2450. }
  2451. function d(e, n, o) {
  2452. if (!s || s(n, o, u, r)) {
  2453. var i = n.primaryKey, c = "" + i;
  2454. "[object ArrayBuffer]" === c && (c = "" + new Uint8Array(i)), l(a, c) || (a[c] = !0, t(e, n, o))
  2455. }
  2456. }
  2457. e.or._iterate(d, u, r, i), Ae(o(e, i), e.algorithm, d, u, r, !e.keysOnly && e.valueMapper)
  2458. }() : Ae(o(e, i), De(e.algorithm, s), t, n, r, !e.keysOnly && e.valueMapper)
  2459. }
  2460. return {
  2461. _read: function (e, t) {
  2462. var n = this._ctx;
  2463. return n.error ? n.table._trans(null, _t.bind(null, n.error)) : n.table._idbstore(Y, e).then(t)
  2464. }, _write: function (e) {
  2465. var t = this._ctx;
  2466. return t.error ? t.table._trans(null, _t.bind(null, t.error)) : t.table._idbstore(H, e, "locked")
  2467. }, _addAlgorithm: function (e) {
  2468. var t = this._ctx;
  2469. t.algorithm = De(t.algorithm, e)
  2470. }, _iterate: function (e, t, n, r) {
  2471. return i(this._ctx, e, t, n, r)
  2472. }, clone: function (e) {
  2473. var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
  2474. return e && s(n, e), t._ctx = n, t
  2475. }, raw: function () {
  2476. return this._ctx.valueMapper = null, this
  2477. }, each: function (e) {
  2478. var t = this._ctx;
  2479. return this._read((function (n, r, o) {
  2480. i(t, e, n, r, o)
  2481. }))
  2482. }, count: function (e) {
  2483. var t = this._ctx;
  2484. if (Ee(t, !0)) return this._read((function (e, r, o) {
  2485. var i = n(t, o), s = t.range ? i.count(t.range) : i.count();
  2486. s.onerror = It(r), s.onsuccess = function (n) {
  2487. e(Math.min(n.target.result, t.limit))
  2488. }
  2489. }), e);
  2490. var r = 0;
  2491. return this._read((function (e, n, o) {
  2492. i(t, (function () {
  2493. return ++r, !1
  2494. }), (function () {
  2495. e(r)
  2496. }), n, o)
  2497. }), e)
  2498. }, sortBy: function (e, t) {
  2499. var n = e.split(".").reverse(), r = n[0], o = n.length - 1;
  2500. function i(e, t) {
  2501. return t ? i(e[n[t]], t - 1) : e[r]
  2502. }
  2503. var s = "next" === this._ctx.dir ? 1 : -1;
  2504. function a(e, t) {
  2505. var n = i(e, o), r = i(t, o);
  2506. return n < r ? -s : n > r ? s : 0
  2507. }
  2508. return this.toArray((function (e) {
  2509. return e.sort(a)
  2510. })).then(t)
  2511. }, toArray: function (e) {
  2512. var t = this._ctx;
  2513. return this._read((function (e, r, o) {
  2514. if (c && "next" === t.dir && Ee(t, !0) && t.limit > 0) {
  2515. var s = t.table.hook.reading.fire, a = n(t, o),
  2516. l = t.limit < 1 / 0 ? a.getAll(t.range, t.limit) : a.getAll(t.range);
  2517. l.onerror = It(r), l.onsuccess = Ot(s === ee ? e : function (t) {
  2518. try {
  2519. e(t.map(s))
  2520. } catch (e) {
  2521. r(e)
  2522. }
  2523. })
  2524. } else {
  2525. var u = [];
  2526. i(t, (function (e) {
  2527. u.push(e)
  2528. }), (function () {
  2529. e(u)
  2530. }), r, o)
  2531. }
  2532. }), e)
  2533. }, offset: function (e) {
  2534. var n = this._ctx;
  2535. return e <= 0 || (n.offset += e, Ee(n) ? t(n, (function () {
  2536. var t = e;
  2537. return function (e, n) {
  2538. return 0 === t || (1 === t ? (--t, !1) : (n((function () {
  2539. e.advance(t), t = 0
  2540. })), !1))
  2541. }
  2542. })) : t(n, (function () {
  2543. var t = e;
  2544. return function () {
  2545. return --t < 0
  2546. }
  2547. }))), this
  2548. }, limit: function (e) {
  2549. return this._ctx.limit = Math.min(this._ctx.limit, e), t(this._ctx, (function () {
  2550. var t = e;
  2551. return function (e, n, r) {
  2552. return --t <= 0 && n(r), t >= 0
  2553. }
  2554. }), !0), this
  2555. }, until: function (t, n) {
  2556. return e(this._ctx, (function (e, r, o) {
  2557. return !t(e.value) || (r(o), n)
  2558. })), this
  2559. }, first: function (e) {
  2560. return this.limit(1).toArray((function (e) {
  2561. return e[0]
  2562. })).then(e)
  2563. }, last: function (e) {
  2564. return this.reverse().first(e)
  2565. }, filter: function (t) {
  2566. return e(this._ctx, (function (e) {
  2567. return t(e.value)
  2568. })), function (e, t) {
  2569. e.isMatch = De(e.isMatch, t)
  2570. }(this._ctx, t), this
  2571. }, and: function (e) {
  2572. return this.filter(e)
  2573. }, or: function (e) {
  2574. return new we(this._ctx.table, e, this)
  2575. }, reverse: function () {
  2576. return this._ctx.dir = "prev" === this._ctx.dir ? "next" : "prev", this._ondirectionchange && this._ondirectionchange(this._ctx.dir), this
  2577. }, desc: function () {
  2578. return this.reverse()
  2579. }, eachKey: function (e) {
  2580. var t = this._ctx;
  2581. return t.keysOnly = !t.isMatch, this.each((function (t, n) {
  2582. e(n.key, n)
  2583. }))
  2584. }, eachUniqueKey: function (e) {
  2585. return this._ctx.unique = "unique", this.eachKey(e)
  2586. }, eachPrimaryKey: function (e) {
  2587. var t = this._ctx;
  2588. return t.keysOnly = !t.isMatch, this.each((function (t, n) {
  2589. e(n.primaryKey, n)
  2590. }))
  2591. }, keys: function (e) {
  2592. var t = this._ctx;
  2593. t.keysOnly = !t.isMatch;
  2594. var n = [];
  2595. return this.each((function (e, t) {
  2596. n.push(t.key)
  2597. })).then((function () {
  2598. return n
  2599. })).then(e)
  2600. }, primaryKeys: function (e) {
  2601. var t = this._ctx;
  2602. if (c && "next" === t.dir && Ee(t, !0) && t.limit > 0) return this._read((function (e, r, o) {
  2603. var i = n(t, o),
  2604. s = t.limit < 1 / 0 ? i.getAllKeys(t.range, t.limit) : i.getAllKeys(t.range);
  2605. s.onerror = It(r), s.onsuccess = Ot(e)
  2606. })).then(e);
  2607. t.keysOnly = !t.isMatch;
  2608. var r = [];
  2609. return this.each((function (e, t) {
  2610. r.push(t.primaryKey)
  2611. })).then((function () {
  2612. return r
  2613. })).then(e)
  2614. }, uniqueKeys: function (e) {
  2615. return this._ctx.unique = "unique", this.keys(e)
  2616. }, firstKey: function (e) {
  2617. return this.limit(1).keys((function (e) {
  2618. return e[0]
  2619. })).then(e)
  2620. }, lastKey: function (e) {
  2621. return this.reverse().firstKey(e)
  2622. }, distinct: function () {
  2623. var t = this._ctx, n = t.index && t.table.schema.idxByName[t.index];
  2624. if (!n || !n.multi) return this;
  2625. var r = {};
  2626. return e(this._ctx, (function (e) {
  2627. var t = e.primaryKey.toString(), n = l(r, t);
  2628. return r[t] = !0, !n
  2629. })), this
  2630. }, modify: function (e) {
  2631. var t = this, n = this._ctx.table.hook, o = n.updating.fire, i = n.deleting.fire;
  2632. return this._write((function (n, a, c, u) {
  2633. var d;
  2634. if ("function" == typeof e) d = o === Q && i === Q ? e : function (t) {
  2635. var n = I(t);
  2636. if (!1 === e.call(this, t, this)) return !1;
  2637. if (l(this, "value")) {
  2638. var s = O(n, this.value), a = o.call(this, s, this.primKey, n, u);
  2639. a && (t = this.value, r(a).forEach((function (e) {
  2640. k(t, e, a[e])
  2641. })))
  2642. } else i.call(this, this.primKey, t, u)
  2643. }; else if (o === Q) {
  2644. var _ = r(e), f = _.length;
  2645. d = function (t) {
  2646. for (var n = !1, r = 0; r < f; ++r) {
  2647. var o = _[r], i = e[o];
  2648. j(t, o) !== i && (k(t, o, i), n = !0)
  2649. }
  2650. return n
  2651. }
  2652. } else {
  2653. var h = e;
  2654. e = A(h), d = function (t) {
  2655. var n = !1, i = o.call(this, e, this.primKey, I(t), u);
  2656. return i && s(e, i), r(e).forEach((function (r) {
  2657. var o = e[r];
  2658. j(t, r) !== o && (k(t, r, o), n = !0)
  2659. })), i && (e = A(h)), n
  2660. }
  2661. }
  2662. var p = 0, b = 0, m = !1, g = [], v = [], y = null;
  2663. function w(e) {
  2664. return e && (g.push(e), v.push(y)), a(new W("Error modifying one or more objects", g, b, v))
  2665. }
  2666. function S() {
  2667. m && b + g.length === p && (g.length > 0 ? w() : n(b))
  2668. }
  2669. t.clone().raw()._iterate((function (e, t) {
  2670. y = t.primaryKey;
  2671. var n = {primKey: t.primaryKey, value: e, onsuccess: null, onerror: null};
  2672. function r(e) {
  2673. return g.push(e), v.push(n.primKey), S(), !0
  2674. }
  2675. if (!1 !== d.call(n, e, n)) {
  2676. var o = !l(n, "value");
  2677. ++p, E((function () {
  2678. var e = o ? t.delete() : t.update(n.value);
  2679. e._hookCtx = n, e.onerror = Ut(r), e.onsuccess = Pt((function () {
  2680. ++b, S()
  2681. }))
  2682. }), r)
  2683. } else n.onsuccess && n.onsuccess(n.value)
  2684. }), (function () {
  2685. m = !0, S()
  2686. }), w, c)
  2687. }))
  2688. }, delete: function () {
  2689. var e = this, t = this._ctx, n = t.range, r = t.table.hook.deleting.fire, o = r !== Q;
  2690. if (!o && Ee(t) && (t.isPrimKey && !jt || !n)) return this._write((function (e, t, r) {
  2691. var o = It(t), i = n ? r.count(n) : r.count();
  2692. i.onerror = o, i.onsuccess = function () {
  2693. var s = i.result;
  2694. E((function () {
  2695. var t = n ? r.delete(n) : r.clear();
  2696. t.onerror = o, t.onsuccess = function () {
  2697. return e(s)
  2698. }
  2699. }), (function (e) {
  2700. return t(e)
  2701. }))
  2702. }
  2703. }));
  2704. var i = o ? 2e3 : 1e4;
  2705. return this._write((function (n, s, a, c) {
  2706. var l = 0, u = e.clone({keysOnly: !t.isMatch && !o}).distinct().limit(i).raw(), d = [],
  2707. _ = function () {
  2708. return u.each(o ? function (e, t) {
  2709. d.push([t.primaryKey, t.value])
  2710. } : function (e, t) {
  2711. d.push(t.primaryKey)
  2712. }).then((function () {
  2713. return o ? d.sort((function (e, t) {
  2714. return Ie(e[0], t[0])
  2715. })) : d.sort(Ie), ve(a, c, d, o, r)
  2716. })).then((function () {
  2717. var e = d.length;
  2718. return l += e, d = [], e < i ? l : _()
  2719. }))
  2720. };
  2721. n(_())
  2722. }))
  2723. }
  2724. }
  2725. })), s(this, {
  2726. Collection: Se,
  2727. Table: me,
  2728. Transaction: ye,
  2729. Version: le,
  2730. WhereClause: we
  2731. }), X.on("versionchange", (function (e) {
  2732. e.newVersion > 0 ? console.warn("Another connection wants to upgrade database '" + X.name + "'. Closing db now to resume the upgrade.") : console.warn("Another connection wants to delete database '" + X.name + "'. Closing db now to resume the delete request."), X.close()
  2733. })), X.on("blocked", (function (e) {
  2734. !e.newVersion || e.newVersion < e.oldVersion ? console.warn("Dexie.delete('" + X.name + "') was blocked") : console.warn("Upgrade '" + X.name + "' blocked by other connection holding version " + e.oldVersion / 10)
  2735. })), b.forEach((function (e) {
  2736. e(X)
  2737. }))
  2738. }
  2739. function Tt(e) {
  2740. if ("function" == typeof e) return new e;
  2741. if (o(e)) return [Tt(e[0])];
  2742. if (e && "object" == typeof e) {
  2743. var t = {};
  2744. return xt(t, e), t
  2745. }
  2746. return e
  2747. }
  2748. function xt(e, t) {
  2749. return r(t).forEach((function (n) {
  2750. var r = Tt(t[n]);
  2751. e[n] = r
  2752. })), e
  2753. }
  2754. function Pt(e) {
  2755. return We((function (t) {
  2756. var n = t.target, r = n._hookCtx, o = r.value || n.result, i = r && r.onsuccess;
  2757. i && i(o), e && e(o)
  2758. }), e)
  2759. }
  2760. function It(e) {
  2761. return We((function (t) {
  2762. return Rt(t), e(t.target.error), !1
  2763. }))
  2764. }
  2765. function Ot(e) {
  2766. return We((function (t) {
  2767. e(t.target.result)
  2768. }))
  2769. }
  2770. function Ut(e) {
  2771. return We((function (t) {
  2772. var n = t.target, r = n.error, o = n._hookCtx, i = o && o.onerror;
  2773. return i && i(r), Rt(t), e(r), !1
  2774. }))
  2775. }
  2776. function Rt(e) {
  2777. e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault()
  2778. }
  2779. function Ct(e) {
  2780. var t = function (t) {
  2781. return e.next(t)
  2782. }, n = i(t), r = i((function (t) {
  2783. return e.throw(t)
  2784. }));
  2785. function i(e) {
  2786. return function (t) {
  2787. var i = e(t), s = i.value;
  2788. return i.done ? s : s && "function" == typeof s.then ? s.then(n, r) : o(s) ? Oe.all(s).then(n, r) : n(s)
  2789. }
  2790. }
  2791. return i(t)()
  2792. }
  2793. function Dt(e, t, n, r, o, i, s) {
  2794. this.name = e, this.keyPath = t, this.unique = n, this.multi = r, this.auto = o, this.compound = i, this.dotted = s;
  2795. var a = "string" == typeof t ? t : t && "[" + [].join.call(t, "+") + "]";
  2796. this.src = (n ? "&" : "") + (r ? "*" : "") + (o ? "++" : "") + a
  2797. }
  2798. function Mt(e, t, n, r) {
  2799. this.name = e, this.primKey = t || new Dt, this.indexes = n || [new Dt], this.instanceTemplate = r, this.mappedClass = null, this.idxByName = w(n, (function (e) {
  2800. return [e.name, e]
  2801. }))
  2802. }
  2803. function $t(e) {
  2804. return 1 === e.length ? e[0] : e
  2805. }
  2806. function Lt(e) {
  2807. var t = e && (e.getDatabaseNames || e.webkitGetDatabaseNames);
  2808. return t && t.bind(e)
  2809. }
  2810. $(M, kt), u(At, Z), u(At, {
  2811. delete: function (e) {
  2812. var t = new At(e), n = t.delete();
  2813. return n.onblocked = function (e) {
  2814. return t.on("blocked", e), this
  2815. }, n
  2816. },
  2817. exists: function (e) {
  2818. return new At(e).open().then((function (e) {
  2819. return e.close(), !0
  2820. })).catch(At.NoSuchDatabaseError, (function () {
  2821. return !1
  2822. }))
  2823. },
  2824. getDatabaseNames: function (e) {
  2825. var t = Lt(At.dependencies.indexedDB);
  2826. return t ? new Oe((function (e, n) {
  2827. var r = t();
  2828. r.onsuccess = function (t) {
  2829. e(m(t.target.result, 0))
  2830. }, r.onerror = It(n)
  2831. })).then(e) : ht.dbnames.toCollection().primaryKeys(e)
  2832. },
  2833. defineClass: function () {
  2834. return function (e) {
  2835. e && s(this, e)
  2836. }
  2837. },
  2838. applyStructure: xt,
  2839. ignoreTransaction: function (e) {
  2840. return Te.trans ? at(Te.transless, e) : e()
  2841. },
  2842. vip: function (e) {
  2843. return Qe((function () {
  2844. return Te.letThrough = !0, e()
  2845. }))
  2846. },
  2847. async: function (e) {
  2848. return function () {
  2849. try {
  2850. var t = Ct(e.apply(this, arguments));
  2851. return t && "function" == typeof t.then ? t : Oe.resolve(t)
  2852. } catch (e) {
  2853. return _t(e)
  2854. }
  2855. }
  2856. },
  2857. spawn: function (e, t, n) {
  2858. try {
  2859. var r = Ct(e.apply(n, t || []));
  2860. return r && "function" == typeof r.then ? r : Oe.resolve(r)
  2861. } catch (e) {
  2862. return _t(e)
  2863. }
  2864. },
  2865. currentTransaction: {
  2866. get: function () {
  2867. return Te.trans || null
  2868. }
  2869. },
  2870. waitFor: function (e, t) {
  2871. var n = Oe.resolve("function" == typeof e ? At.ignoreTransaction(e) : e).timeout(t || 6e4);
  2872. return Te.trans ? Te.trans.waitFor(n) : n
  2873. },
  2874. Promise: Oe,
  2875. debug: {
  2876. get: function () {
  2877. return M
  2878. }, set: function (e) {
  2879. $(e, "dexie" === e ? function () {
  2880. return !0
  2881. } : kt)
  2882. }
  2883. },
  2884. derive: f,
  2885. extend: s,
  2886. props: u,
  2887. override: g,
  2888. Events: ft,
  2889. getByKeyPath: j,
  2890. setByKeyPath: k,
  2891. delByKeyPath: function (e, t) {
  2892. "string" == typeof t ? k(e, t, void 0) : "length" in t && [].map.call(t, (function (t) {
  2893. k(e, t, void 0)
  2894. }))
  2895. },
  2896. shallowClone: A,
  2897. deepClone: I,
  2898. getObjectDiff: O,
  2899. asap: y,
  2900. maxKey: mt,
  2901. minKey: gt,
  2902. addons: [],
  2903. connections: wt,
  2904. MultiModifyError: V.Modify,
  2905. errnames: Y,
  2906. IndexSpec: Dt,
  2907. TableSchema: Mt,
  2908. dependencies: function () {
  2909. try {
  2910. return {
  2911. indexedDB: i.indexedDB || i.mozIndexedDB || i.webkitIndexedDB || i.msIndexedDB,
  2912. IDBKeyRange: i.IDBKeyRange || i.webkitIDBKeyRange
  2913. }
  2914. } catch (e) {
  2915. return {indexedDB: null, IDBKeyRange: null}
  2916. }
  2917. }(),
  2918. semVer: pt,
  2919. version: pt.split(".").map((function (e) {
  2920. return parseInt(e)
  2921. })).reduce((function (e, t, n) {
  2922. return e + t / Math.pow(10, 2 * n)
  2923. })),
  2924. default: At,
  2925. Dexie: At
  2926. }), Oe.rejectionMapper = function (e, t) {
  2927. if (!e || e instanceof z || e instanceof TypeError || e instanceof SyntaxError || !e.name || !X[e.name]) return e;
  2928. var n = new X[e.name](t || e.message, e);
  2929. return "stack" in e && _(n, "stack", {
  2930. get: function () {
  2931. return this.inner.stack
  2932. }
  2933. }), n
  2934. }, (ht = new At("__dbnames")).version(1).stores({dbnames: "name"}), function () {
  2935. var e = "Dexie.DatabaseNames";
  2936. try {
  2937. void 0 !== typeof localStorage && void 0 !== i.document && (JSON.parse(localStorage.getItem(e) || "[]").forEach((function (e) {
  2938. return ht.dbnames.put({name: e}).catch(Q)
  2939. })), localStorage.removeItem(e))
  2940. } catch (e) {
  2941. }
  2942. }();
  2943. const Nt = At
  2944. }, 8552: (e, t, n) => {
  2945. var r = n(852)(n(5639), "DataView");
  2946. e.exports = r
  2947. }, 7071: (e, t, n) => {
  2948. var r = n(852)(n(5639), "Map");
  2949. e.exports = r
  2950. }, 3818: (e, t, n) => {
  2951. var r = n(852)(n(5639), "Promise");
  2952. e.exports = r
  2953. }, 3720: (e, t, n) => {
  2954. var r = n(852)(n(5639), "Set");
  2955. e.exports = r
  2956. }, 2705: (e, t, n) => {
  2957. var r = n(5639).Symbol;
  2958. e.exports = r
  2959. }, 577: (e, t, n) => {
  2960. var r = n(852)(n(5639), "WeakMap");
  2961. e.exports = r
  2962. }, 9932: e => {
  2963. e.exports = function (e, t) {
  2964. for (var n = -1, r = null == e ? 0 : e.length, o = Array(r); ++n < r;) o[n] = t(e[n], n, e);
  2965. return o
  2966. }
  2967. }, 4239: (e, t, n) => {
  2968. var r = n(2705), o = n(9607), i = n(2333), s = r ? r.toStringTag : void 0;
  2969. e.exports = function (e) {
  2970. return null == e ? void 0 === e ? "[object Undefined]" : "[object Null]" : s && s in Object(e) ? o(e) : i(e)
  2971. }
  2972. }, 9454: (e, t, n) => {
  2973. var r = n(4239), o = n(7005);
  2974. e.exports = function (e) {
  2975. return o(e) && "[object Arguments]" == r(e)
  2976. }
  2977. }, 8458: (e, t, n) => {
  2978. var r = n(3560), o = n(5346), i = n(3218), s = n(1257), a = /^\[object .+?Constructor\]$/,
  2979. c = Function.prototype, l = Object.prototype, u = c.toString, d = l.hasOwnProperty,
  2980. _ = RegExp("^" + u.call(d).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
  2981. e.exports = function (e) {
  2982. return !(!i(e) || o(e)) && (r(e) ? _ : a).test(s(e))
  2983. }
  2984. }, 8749: (e, t, n) => {
  2985. var r = n(4239), o = n(1780), i = n(7005), s = {};
  2986. s["[object Float32Array]"] = s["[object Float64Array]"] = s["[object Int8Array]"] = s["[object Int16Array]"] = s["[object Int32Array]"] = s["[object Uint8Array]"] = s["[object Uint8ClampedArray]"] = s["[object Uint16Array]"] = s["[object Uint32Array]"] = !0, s["[object Arguments]"] = s["[object Array]"] = s["[object ArrayBuffer]"] = s["[object Boolean]"] = s["[object DataView]"] = s["[object Date]"] = s["[object Error]"] = s["[object Function]"] = s["[object Map]"] = s["[object Number]"] = s["[object Object]"] = s["[object RegExp]"] = s["[object Set]"] = s["[object String]"] = s["[object WeakMap]"] = !1, e.exports = function (e) {
  2987. return i(e) && o(e.length) && !!s[r(e)]
  2988. }
  2989. }, 280: (e, t, n) => {
  2990. var r = n(5726), o = n(6916), i = Object.prototype.hasOwnProperty;
  2991. e.exports = function (e) {
  2992. if (!r(e)) return o(e);
  2993. var t = [];
  2994. for (var n in Object(e)) i.call(e, n) && "constructor" != n && t.push(n);
  2995. return t
  2996. }
  2997. }, 531: (e, t, n) => {
  2998. var r = n(2705), o = n(9932), i = n(1469), s = n(3448), a = r ? r.prototype : void 0,
  2999. c = a ? a.toString : void 0;
  3000. e.exports = function e(t) {
  3001. if ("string" == typeof t) return t;
  3002. if (i(t)) return o(t, e) + "";
  3003. if (s(t)) return c ? c.call(t) : "";
  3004. var n = t + "";
  3005. return "0" == n && 1 / t == -Infinity ? "-0" : n
  3006. }
  3007. }, 7561: (e, t, n) => {
  3008. var r = n(7990), o = /^\s+/;
  3009. e.exports = function (e) {
  3010. return e ? e.slice(0, r(e) + 1).replace(o, "") : e
  3011. }
  3012. }, 7518: e => {
  3013. e.exports = function (e) {
  3014. return function (t) {
  3015. return e(t)
  3016. }
  3017. }
  3018. }, 4429: (e, t, n) => {
  3019. var r = n(5639)["__core-js_shared__"];
  3020. e.exports = r
  3021. }, 1957: (e, t, n) => {
  3022. var r = "object" == typeof n.g && n.g && n.g.Object === Object && n.g;
  3023. e.exports = r
  3024. }, 852: (e, t, n) => {
  3025. var r = n(8458), o = n(7801);
  3026. e.exports = function (e, t) {
  3027. var n = o(e, t);
  3028. return r(n) ? n : void 0
  3029. }
  3030. }, 9607: (e, t, n) => {
  3031. var r = n(2705), o = Object.prototype, i = o.hasOwnProperty, s = o.toString, a = r ? r.toStringTag : void 0;
  3032. e.exports = function (e) {
  3033. var t = i.call(e, a), n = e[a];
  3034. try {
  3035. e[a] = void 0;
  3036. var r = !0
  3037. } catch (e) {
  3038. }
  3039. var o = s.call(e);
  3040. return r && (t ? e[a] = n : delete e[a]), o
  3041. }
  3042. }, 4160: (e, t, n) => {
  3043. var r = n(8552), o = n(7071), i = n(3818), s = n(3720), a = n(577), c = n(4239), l = n(1257),
  3044. u = "[object Map]", d = "[object Promise]", _ = "[object Set]", f = "[object WeakMap]",
  3045. h = "[object DataView]", p = l(r), b = l(o), m = l(i), g = l(s), v = l(a), y = c;
  3046. (r && y(new r(new ArrayBuffer(1))) != h || o && y(new o) != u || i && y(i.resolve()) != d || s && y(new s) != _ || a && y(new a) != f) && (y = function (e) {
  3047. var t = c(e), n = "[object Object]" == t ? e.constructor : void 0, r = n ? l(n) : "";
  3048. if (r) switch (r) {
  3049. case p:
  3050. return h;
  3051. case b:
  3052. return u;
  3053. case m:
  3054. return d;
  3055. case g:
  3056. return _;
  3057. case v:
  3058. return f
  3059. }
  3060. return t
  3061. }), e.exports = y
  3062. }, 7801: e => {
  3063. e.exports = function (e, t) {
  3064. return null == e ? void 0 : e[t]
  3065. }
  3066. }, 5346: (e, t, n) => {
  3067. var r, o = n(4429),
  3068. i = (r = /[^.]+$/.exec(o && o.keys && o.keys.IE_PROTO || "")) ? "Symbol(src)_1." + r : "";
  3069. e.exports = function (e) {
  3070. return !!i && i in e
  3071. }
  3072. }, 5726: e => {
  3073. var t = Object.prototype;
  3074. e.exports = function (e) {
  3075. var n = e && e.constructor;
  3076. return e === ("function" == typeof n && n.prototype || t)
  3077. }
  3078. }, 6916: (e, t, n) => {
  3079. var r = n(5569)(Object.keys, Object);
  3080. e.exports = r
  3081. }, 1167: (e, t, n) => {
  3082. e = n.nmd(e);
  3083. var r = n(1957), o = t && !t.nodeType && t, i = o && e && !e.nodeType && e,
  3084. s = i && i.exports === o && r.process, a = function () {
  3085. try {
  3086. var e = i && i.require && i.require("util").types;
  3087. return e || s && s.binding && s.binding("util")
  3088. } catch (e) {
  3089. }
  3090. }();
  3091. e.exports = a
  3092. }, 2333: e => {
  3093. var t = Object.prototype.toString;
  3094. e.exports = function (e) {
  3095. return t.call(e)
  3096. }
  3097. }, 5569: e => {
  3098. e.exports = function (e, t) {
  3099. return function (n) {
  3100. return e(t(n))
  3101. }
  3102. }
  3103. }, 5639: (e, t, n) => {
  3104. var r = n(1957), o = "object" == typeof self && self && self.Object === Object && self,
  3105. i = r || o || Function("return this")();
  3106. e.exports = i
  3107. }, 1257: e => {
  3108. var t = Function.prototype.toString;
  3109. e.exports = function (e) {
  3110. if (null != e) {
  3111. try {
  3112. return t.call(e)
  3113. } catch (e) {
  3114. }
  3115. try {
  3116. return e + ""
  3117. } catch (e) {
  3118. }
  3119. }
  3120. return ""
  3121. }
  3122. }, 7990: e => {
  3123. var t = /\s/;
  3124. e.exports = function (e) {
  3125. for (var n = e.length; n-- && t.test(e.charAt(n));) ;
  3126. return n
  3127. }
  3128. }, 9567: (e, t, n) => {
  3129. var r = n(554);
  3130. e.exports = function (e, t) {
  3131. var n;
  3132. if ("function" != typeof t) throw new TypeError("Expected a function");
  3133. return e = r(e), function () {
  3134. return --e > 0 && (n = t.apply(this, arguments)), e <= 1 && (t = void 0), n
  3135. }
  3136. }
  3137. }, 5694: (e, t, n) => {
  3138. var r = n(9454), o = n(7005), i = Object.prototype, s = i.hasOwnProperty, a = i.propertyIsEnumerable,
  3139. c = r(function () {
  3140. return arguments
  3141. }()) ? r : function (e) {
  3142. return o(e) && s.call(e, "callee") && !a.call(e, "callee")
  3143. };
  3144. e.exports = c
  3145. }, 1469: e => {
  3146. var t = Array.isArray;
  3147. e.exports = t
  3148. }, 8612: (e, t, n) => {
  3149. var r = n(3560), o = n(1780);
  3150. e.exports = function (e) {
  3151. return null != e && o(e.length) && !r(e)
  3152. }
  3153. }, 4144: (e, t, n) => {
  3154. e = n.nmd(e);
  3155. var r = n(5639), o = n(5062), i = t && !t.nodeType && t, s = i && e && !e.nodeType && e,
  3156. a = s && s.exports === i ? r.Buffer : void 0, c = (a ? a.isBuffer : void 0) || o;
  3157. e.exports = c
  3158. }, 1609: (e, t, n) => {
  3159. var r = n(280), o = n(4160), i = n(5694), s = n(1469), a = n(8612), c = n(4144), l = n(5726), u = n(6719),
  3160. d = Object.prototype.hasOwnProperty;
  3161. e.exports = function (e) {
  3162. if (null == e) return !0;
  3163. if (a(e) && (s(e) || "string" == typeof e || "function" == typeof e.splice || c(e) || u(e) || i(e))) return !e.length;
  3164. var t = o(e);
  3165. if ("[object Map]" == t || "[object Set]" == t) return !e.size;
  3166. if (l(e)) return !r(e).length;
  3167. for (var n in e) if (d.call(e, n)) return !1;
  3168. return !0
  3169. }
  3170. }, 3560: (e, t, n) => {
  3171. var r = n(4239), o = n(3218);
  3172. e.exports = function (e) {
  3173. if (!o(e)) return !1;
  3174. var t = r(e);
  3175. return "[object Function]" == t || "[object GeneratorFunction]" == t || "[object AsyncFunction]" == t || "[object Proxy]" == t
  3176. }
  3177. }, 1780: e => {
  3178. e.exports = function (e) {
  3179. return "number" == typeof e && e > -1 && e % 1 == 0 && e <= 9007199254740991
  3180. }
  3181. }, 3218: e => {
  3182. e.exports = function (e) {
  3183. var t = typeof e;
  3184. return null != e && ("object" == t || "function" == t)
  3185. }
  3186. }, 7005: e => {
  3187. e.exports = function (e) {
  3188. return null != e && "object" == typeof e
  3189. }
  3190. }, 3448: (e, t, n) => {
  3191. var r = n(4239), o = n(7005);
  3192. e.exports = function (e) {
  3193. return "symbol" == typeof e || o(e) && "[object Symbol]" == r(e)
  3194. }
  3195. }, 6719: (e, t, n) => {
  3196. var r = n(8749), o = n(7518), i = n(1167), s = i && i.isTypedArray, a = s ? o(s) : r;
  3197. e.exports = a
  3198. }, 1463: (e, t, n) => {
  3199. var r = n(9567);
  3200. e.exports = function (e) {
  3201. return r(2, e)
  3202. }
  3203. }, 5062: e => {
  3204. e.exports = function () {
  3205. return !1
  3206. }
  3207. }, 8601: (e, t, n) => {
  3208. var r = n(4841), o = 1 / 0;
  3209. e.exports = function (e) {
  3210. return e ? (e = r(e)) === o || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e == e ? e : 0 : 0 === e ? e : 0
  3211. }
  3212. }, 554: (e, t, n) => {
  3213. var r = n(8601);
  3214. e.exports = function (e) {
  3215. var t = r(e), n = t % 1;
  3216. return t == t ? n ? t - n : t : 0
  3217. }
  3218. }, 4841: (e, t, n) => {
  3219. var r = n(7561), o = n(3218), i = n(3448), s = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, c = /^0o[0-7]+$/i,
  3220. l = parseInt;
  3221. e.exports = function (e) {
  3222. if ("number" == typeof e) return e;
  3223. if (i(e)) return NaN;
  3224. if (o(e)) {
  3225. var t = "function" == typeof e.valueOf ? e.valueOf() : e;
  3226. e = o(t) ? t + "" : t
  3227. }
  3228. if ("string" != typeof e) return 0 === e ? e : +e;
  3229. e = r(e);
  3230. var n = a.test(e);
  3231. return n || c.test(e) ? l(e.slice(2), n ? 2 : 8) : s.test(e) ? NaN : +e
  3232. }
  3233. }, 9833: (e, t, n) => {
  3234. var r = n(531);
  3235. e.exports = function (e) {
  3236. return null == e ? "" : r(e)
  3237. }
  3238. }, 835: (e, t, n) => {
  3239. var r = n(9833), o = 0;
  3240. e.exports = function (e) {
  3241. var t = ++o;
  3242. return r(e) + t
  3243. }
  3244. }, 2238: function (e, t, n) {
  3245. var r;
  3246. !function (o, i) {
  3247. "use strict";
  3248. var s = "function", a = "undefined", c = "object", l = "string", u = "model", d = "name", _ = "type",
  3249. f = "vendor", h = "version", p = "architecture", b = "console", m = "mobile", g = "tablet",
  3250. v = "smarttv", y = "wearable", w = "embedded", S = "Amazon", E = "Apple", j = "ASUS",
  3251. k = "BlackBerry", A = "Firefox", T = "Google", x = "Huawei", P = "LG", I = "Microsoft",
  3252. O = "Motorola", U = "Opera", R = "Samsung", C = "Sony", D = "Xiaomi", M = "Zebra", $ = "Facebook",
  3253. L = function (e) {
  3254. for (var t = {}, n = 0; n < e.length; n++) t[e[n].toUpperCase()] = e[n];
  3255. return t
  3256. }, N = function (e, t) {
  3257. return typeof e === l && -1 !== J(t).indexOf(J(e))
  3258. }, J = function (e) {
  3259. return e.toLowerCase()
  3260. }, B = function (e, t) {
  3261. if (typeof e === l) return e = e.replace(/^\s\s*/, "").replace(/\s\s*$/, ""), typeof t === a ? e : e.substring(0, 255)
  3262. }, F = function (e, t) {
  3263. for (var n, r, o, a, l, u, d = 0; d < t.length && !l;) {
  3264. var _ = t[d], f = t[d + 1];
  3265. for (n = r = 0; n < _.length && !l;) if (l = _[n++].exec(e)) for (o = 0; o < f.length; o++) u = l[++r], typeof (a = f[o]) === c && a.length > 0 ? 2 === a.length ? typeof a[1] == s ? this[a[0]] = a[1].call(this, u) : this[a[0]] = a[1] : 3 === a.length ? typeof a[1] !== s || a[1].exec && a[1].test ? this[a[0]] = u ? u.replace(a[1], a[2]) : i : this[a[0]] = u ? a[1].call(this, u, a[2]) : i : 4 === a.length && (this[a[0]] = u ? a[3].call(this, u.replace(a[1], a[2])) : i) : this[a] = u || i;
  3266. d += 2
  3267. }
  3268. }, K = function (e, t) {
  3269. for (var n in t) if (typeof t[n] === c && t[n].length > 0) {
  3270. for (var r = 0; r < t[n].length; r++) if (N(t[n][r], e)) return "?" === n ? i : n
  3271. } else if (N(t[n], e)) return "?" === n ? i : n;
  3272. return e
  3273. }, q = {
  3274. ME: "4.90",
  3275. "NT 3.11": "NT3.51",
  3276. "NT 4.0": "NT4.0",
  3277. 2e3: "NT 5.0",
  3278. XP: ["NT 5.1", "NT 5.2"],
  3279. Vista: "NT 6.0",
  3280. 7: "NT 6.1",
  3281. 8: "NT 6.2",
  3282. 8.1: "NT 6.3",
  3283. 10: ["NT 6.4", "NT 10.0"],
  3284. RT: "ARM"
  3285. }, z = {
  3286. browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [h, [d, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [h, [d, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [d, h], [/opios[\/ ]+([\w\.]+)/i], [h, [d, "Opera Mini"]], [/\bopr\/([\w\.]+)/i], [h, [d, U]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, /(ba?idubrowser)[\/ ]?([\w\.]+)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i, /(weibo)__([\d\.]+)/i], [d, h], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [h, [d, "UCBrowser"]], [/\bqbcore\/([\w\.]+)/i], [h, [d, "WeChat(Win) Desktop"]], [/micromessenger\/([\w\.]+)/i], [h, [d, "WeChat"]], [/konqueror\/([\w\.]+)/i], [h, [d, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [h, [d, "IE"]], [/yabrowser\/([\w\.]+)/i], [h, [d, "Yandex"]], [/(avast|avg)\/([\w\.]+)/i], [[d, /(.+)/, "$1 Secure Browser"], h], [/\bfocus\/([\w\.]+)/i], [h, [d, "Firefox Focus"]], [/\bopt\/([\w\.]+)/i], [h, [d, "Opera Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [h, [d, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [h, [d, "Dolphin"]], [/coast\/([\w\.]+)/i], [h, [d, "Opera Coast"]], [/miuibrowser\/([\w\.]+)/i], [h, [d, "MIUI Browser"]], [/fxios\/([-\w\.]+)/i], [h, [d, A]], [/\bqihu|(qi?ho?o?|360)browser/i], [[d, "360 Browser"]], [/(oculus|samsung|sailfish)browser\/([\w\.]+)/i], [[d, /(.+)/, "$1 Browser"], h], [/(comodo_dragon)\/([\w\.]+)/i], [[d, /_/g, " "], h], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i], [d, h], [/(metasr)[\/ ]?([\w\.]+)/i, /(lbbrowser)/i], [d], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[d, $], h], [/safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(chromium|instagram)[\/ ]([-\w\.]+)/i], [d, h], [/\bgsa\/([\w\.]+) .*safari\//i], [h, [d, "GSA"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [h, [d, "Chrome Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[d, "Chrome WebView"], h], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [h, [d, "Android Browser"]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [d, h], [/version\/([\w\.]+) .*mobile\/\w+ (safari)/i], [h, [d, "Mobile Safari"]], [/version\/([\w\.]+) .*(mobile ?safari|safari)/i], [h, d], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [d, [h, K, {
  3287. "1.0": "/8",
  3288. 1.2: "/1",
  3289. 1.3: "/3",
  3290. "2.0": "/412",
  3291. "2.0.2": "/416",
  3292. "2.0.3": "/417",
  3293. "2.0.4": "/419",
  3294. "?": "/"
  3295. }]], [/(webkit|khtml)\/([\w\.]+)/i], [d, h], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[d, "Netscape"], h], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [h, [d, "Firefox Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i], [d, h]],
  3296. cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[p, "amd64"]], [/(ia32(?=;))/i], [[p, J]], [/((?:i[346]|x)86)[;\)]/i], [[p, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[p, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[p, "armhf"]], [/windows (ce|mobile); ppc;/i], [[p, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[p, /ower/, "", J]], [/(sun4\w)[;\)]/i], [[p, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[p, J]]],
  3297. device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [u, [f, R], [_, g]], [/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [u, [f, R], [_, m]], [/\((ip(?:hone|od)[\w ]*);/i], [u, [f, E], [_, m]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [u, [f, E], [_, g]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [u, [f, x], [_, g]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i], [u, [f, x], [_, m]], [/\b(poco[\w ]+)(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[u, /_/g, " "], [f, D], [_, m]], [/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[u, /_/g, " "], [f, D], [_, g]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [u, [f, "OPPO"], [_, m]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [u, [f, "Vivo"], [_, m]], [/\b(rmx[12]\d{3})(?: bui|;|\))/i], [u, [f, "Realme"], [_, m]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [u, [f, O], [_, m]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [u, [f, O], [_, g]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [u, [f, P], [_, g]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [u, [f, P], [_, m]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [u, [f, "Lenovo"], [_, g]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[u, /_/g, " "], [f, "Nokia"], [_, m]], [/(pixel c)\b/i], [u, [f, T], [_, g]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [u, [f, T], [_, m]], [/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [u, [f, C], [_, m]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[u, "Xperia Tablet"], [f, C], [_, g]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [u, [f, "OnePlus"], [_, m]], [/(alexa)webm/i, /(kf[a-z]{2}wi)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [u, [f, S], [_, g]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[u, /(.+)/g, "Fire Phone $1"], [f, S], [_, m]], [/(playbook);[-\w\),; ]+(rim)/i], [u, f, [_, g]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [u, [f, k], [_, m]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [u, [f, j], [_, g]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [u, [f, j], [_, m]], [/(nexus 9)/i], [u, [f, "HTC"], [_, g]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i], [f, [u, /_/g, " "], [_, m]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [u, [f, "Acer"], [_, g]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [u, [f, "Meizu"], [_, m]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [u, [f, "Sharp"], [_, m]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [f, u, [_, m]], [/(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [f, u, [_, g]], [/(surface duo)/i], [u, [f, I], [_, g]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [u, [f, "Fairphone"], [_, m]], [/(u304aa)/i], [u, [f, "AT&T"], [_, m]], [/\bsie-(\w*)/i], [u, [f, "Siemens"], [_, m]], [/\b(rct\w+) b/i], [u, [f, "RCA"], [_, g]], [/\b(venue[\d ]{2,7}) b/i], [u, [f, "Dell"], [_, g]], [/\b(q(?:mv|ta)\w+) b/i], [u, [f, "Verizon"], [_, g]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [u, [f, "Barnes & Noble"], [_, g]], [/\b(tm\d{3}\w+) b/i], [u, [f, "NuVision"], [_, g]], [/\b(k88) b/i], [u, [f, "ZTE"], [_, g]], [/\b(nx\d{3}j) b/i], [u, [f, "ZTE"], [_, m]], [/\b(gen\d{3}) b.+49h/i], [u, [f, "Swiss"], [_, m]], [/\b(zur\d{3}) b/i], [u, [f, "Swiss"], [_, g]], [/\b((zeki)?tb.*\b) b/i], [u, [f, "Zeki"], [_, g]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[f, "Dragon Touch"], u, [_, g]], [/\b(ns-?\w{0,9}) b/i], [u, [f, "Insignia"], [_, g]], [/\b((nxa|next)-?\w{0,9}) b/i], [u, [f, "NextBook"], [_, g]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[f, "Voice"], u, [_, m]], [/\b(lvtel\-)?(v1[12]) b/i], [[f, "LvTel"], u, [_, m]], [/\b(ph-1) /i], [u, [f, "Essential"], [_, m]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [u, [f, "Envizen"], [_, g]], [/\b(trio[-\w\. ]+) b/i], [u, [f, "MachSpeed"], [_, g]], [/\btu_(1491) b/i], [u, [f, "Rotor"], [_, g]], [/(shield[\w ]+) b/i], [u, [f, "Nvidia"], [_, g]], [/(sprint) (\w+)/i], [f, u, [_, m]], [/(kin\.[onetw]{3})/i], [[u, /\./g, " "], [f, I], [_, m]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [u, [f, M], [_, g]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [u, [f, M], [_, m]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [f, u, [_, b]], [/droid.+; (shield) bui/i], [u, [f, "Nvidia"], [_, b]], [/(playstation [345portablevi]+)/i], [u, [f, C], [_, b]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [u, [f, I], [_, b]], [/smart-tv.+(samsung)/i], [f, [_, v]], [/hbbtv.+maple;(\d+)/i], [[u, /^/, "SmartTV"], [f, R], [_, v]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[f, P], [_, v]], [/(apple) ?tv/i], [f, [u, "Apple TV"], [_, v]], [/crkey/i], [[u, "Chromecast"], [f, T], [_, v]], [/droid.+aft(\w)( bui|\))/i], [u, [f, S], [_, v]], [/\(dtv[\);].+(aquos)/i], [u, [f, "Sharp"], [_, v]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i], [[f, B], [u, B], [_, v]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[_, v]], [/((pebble))app/i], [f, u, [_, y]], [/droid.+; (glass) \d/i], [u, [f, T], [_, y]], [/droid.+; (wt63?0{2,3})\)/i], [u, [f, M], [_, y]], [/(quest( 2)?)/i], [u, [f, $], [_, y]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [f, [_, w]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i], [u, [_, m]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [u, [_, g]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[_, g]], [/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i], [[_, m]], [/(android[-\w\. ]{0,9});.+buil/i], [u, [f, "Generic"]]],
  3298. engine: [[/windows.+ edge\/([\w\.]+)/i], [h, [d, "EdgeHTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [h, [d, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i], [d, h], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [h, d]],
  3299. os: [[/microsoft (windows) (vista|xp)/i], [d, h], [/(windows) nt 6\.2; (arm)/i, /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, /(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i], [d, [h, K, q]], [/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[d, "Windows"], [h, K, q]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /cfnetwork\/.+darwin/i], [[h, /_/g, "."], [d, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[d, "Mac OS"], [h, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86)/i], [h, d], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [d, h], [/\(bb(10);/i], [h, [d, k]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [h, [d, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [h, [d, "Firefox OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [h, [d, "webOS"]], [/crkey\/([\d\.]+)/i], [h, [d, "Chromecast"]], [/(cros) [\w]+ ([\w\.]+\w)/i], [[d, "Chromium OS"], h], [/(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [d, h], [/(sunos) ?([\w\.\d]*)/i], [[d, "Solaris"], h], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i, /(unix) ?([\w\.]*)/i], [d, h]]
  3300. }, W = function (e, t) {
  3301. if (typeof e === c && (t = e, e = i), !(this instanceof W)) return new W(e, t).getResult();
  3302. var n = e || (typeof o !== a && o.navigator && o.navigator.userAgent ? o.navigator.userAgent : ""),
  3303. r = t ? function (e, t) {
  3304. var n = {};
  3305. for (var r in e) t[r] && t[r].length % 2 == 0 ? n[r] = t[r].concat(e[r]) : n[r] = e[r];
  3306. return n
  3307. }(z, t) : z;
  3308. return this.getBrowser = function () {
  3309. var e, t = {};
  3310. return t.name = i, t.version = i, F.call(t, n, r.browser), t.major = typeof (e = t.version) === l ? e.replace(/[^\d\.]/g, "").split(".")[0] : i, t
  3311. }, this.getCPU = function () {
  3312. var e = {};
  3313. return e.architecture = i, F.call(e, n, r.cpu), e
  3314. }, this.getDevice = function () {
  3315. var e = {};
  3316. return e.vendor = i, e.model = i, e.type = i, F.call(e, n, r.device), e
  3317. }, this.getEngine = function () {
  3318. var e = {};
  3319. return e.name = i, e.version = i, F.call(e, n, r.engine), e
  3320. }, this.getOS = function () {
  3321. var e = {};
  3322. return e.name = i, e.version = i, F.call(e, n, r.os), e
  3323. }, this.getResult = function () {
  3324. return {
  3325. ua: this.getUA(),
  3326. browser: this.getBrowser(),
  3327. engine: this.getEngine(),
  3328. os: this.getOS(),
  3329. device: this.getDevice(),
  3330. cpu: this.getCPU()
  3331. }
  3332. }, this.getUA = function () {
  3333. return n
  3334. }, this.setUA = function (e) {
  3335. return n = typeof e === l && e.length > 255 ? B(e, 255) : e, this
  3336. }, this.setUA(n), this
  3337. };
  3338. W.VERSION = "0.7.31", W.BROWSER = L([d, h, "major"]), W.CPU = L([p]), W.DEVICE = L([u, f, _, b, m, v, g, y, w]), W.ENGINE = W.OS = L([d, h]), typeof t !== a ? (e.exports && (t = e.exports = W), t.UAParser = W) : n.amdO ? (r = function () {
  3339. return W
  3340. }.call(t, n, t, e)) === i || (e.exports = r) : typeof o !== a && (o.UAParser = W);
  3341. var G = typeof o !== a && (o.jQuery || o.Zepto);
  3342. if (G && !G.ua) {
  3343. var Y = new W;
  3344. G.ua = Y.getResult(), G.ua.get = function () {
  3345. return Y.getUA()
  3346. }, G.ua.set = function (e) {
  3347. Y.setUA(e);
  3348. var t = Y.getResult();
  3349. for (var n in t) G.ua[n] = t[n]
  3350. }
  3351. }
  3352. }("object" == typeof window ? window : this)
  3353. }, 4493: (e, t) => {
  3354. "use strict";
  3355. Object.defineProperty(t, "__esModule", {value: !0}), t.SINGLE_BYTE_TOKEN = t.DICT_VERSION = t.DICTIONARY_3_TOKEN = t.DICTIONARY_2_TOKEN = t.DICTIONARY_1_TOKEN = t.DICTIONARY_0_TOKEN = t.DICTIONARIES = void 0;
  3356. t.DICT_VERSION = 3;
  3357. t.SINGLE_BYTE_TOKEN = ["xmlstreamstart", "xmlstreamend", "s.whatsapp.net", "type", "participant", "from", "receipt", "id", "notification", "disappearing_mode", "status", "jid", "broadcast", "user", "devices", "device_hash", "to", "offline", "message", "result", "class", "xmlns", "duration", "notify", "iq", "t", "ack", "g.us", "enc", "urn:xmpp:whatsapp:push", "presence", "config_value", "picture", "verified_name", "config_code", "key-index-list", "contact", "mediatype", "routing_info", "edge_routing", "get", "read", "urn:xmpp:ping", "fallback_hostname", "0", "chatstate", "business_hours_config", "unavailable", "download_buckets", "skmsg", "verified_level", "composing", "handshake", "device-list", "media", "text", "fallback_ip4", "media_conn", "device", "creation", "location", "config", "item", "fallback_ip6", "count", "w:profile:picture", "image", "business", "2", "hostname", "call-creator", "display_name", "relaylatency", "platform", "abprops", "success", "msg", "offline_preview", "prop", "key-index", "v", "day_of_week", "pkmsg", "version", "1", "ping", "w:p", "download", "video", "set", "specific_hours", "props", "primary", "unknown", "hash", "commerce_experience", "last", "subscribe", "max_buckets", "call", "profile", "member_since_text", "close_time", "call-id", "sticker", "mode", "participants", "value", "query", "profile_options", "open_time", "code", "list", "host", "ts", "contacts", "upload", "lid", "preview", "update", "usync", "w:stats", "delivery", "auth_ttl", "context", "fail", "cart_enabled", "appdata", "category", "atn", "direct_connection", "decrypt-fail", "relay_id", "mmg-fallback.whatsapp.net", "target", "available", "name", "last_id", "mmg.whatsapp.net", "categories", "401", "is_new", "index", "tctoken", "ip4", "token_id", "latency", "recipient", "edit", "ip6", "add", "thumbnail-document", "26", "paused", "true", "identity", "stream:error", "key", "sidelist", "background", "audio", "3", "thumbnail-image", "biz-cover-photo", "cat", "gcm", "thumbnail-video", "error", "auth", "deny", "serial", "in", "registration", "thumbnail-link", "remove", "00", "gif", "thumbnail-gif", "tag", "capability", "multicast", "item-not-found", "description", "business_hours", "config_expo_key", "md-app-state", "expiration", "fallback", "ttl", "300", "md-msg-hist", "device_orientation", "out", "w:m", "open_24h", "side_list", "token", "inactive", "01", "document", "te2", "played", "encrypt", "msgr", "hide", "direct_path", "12", "state", "not-authorized", "url", "terminate", "signature", "status-revoke-delay", "02", "te", "linked_accounts", "trusted_contact", "timezone", "ptt", "kyc-id", "privacy_token", "readreceipts", "appointment_only", "address", "expected_ts", "privacy", "7", "android", "interactive", "device-identity", "enabled", "attribute_padding", "1080", "03", "screen_height"];
  3358. const n = ["read-self", "active", "fbns", "protocol", "reaction", "screen_width", "heartbeat", "deviceid", "2:47DEQpj8", "uploadfieldstat", "voip_settings", "retry", "priority", "longitude", "conflict", "false", "ig_professional", "replaced", "preaccept", "cover_photo", "uncompressed", "encopt", "ppic", "04", "passive", "status-revoke-drop", "keygen", "540", "offer", "rate", "opus", "latitude", "w:gp2", "ver", "4", "business_profile", "medium", "sender", "prev_v_id", "email", "website", "invited", "sign_credential", "05", "transport", "skey", "reason", "peer_abtest_bucket", "America/Sao_Paulo", "appid", "refresh", "100", "06", "404", "101", "104", "107", "102", "109", "103", "member_add_mode", "105", "transaction-id", "110", "106", "outgoing", "108", "111", "tokens", "followers", "ig_handle", "self_pid", "tue", "dec", "thu", "joinable", "peer_pid", "mon", "features", "wed", "peer_device_presence", "pn", "delete", "07", "fri", "audio_duration", "admin", "connected", "delta", "rcat", "disable", "collection", "08", "480", "sat", "phash", "all", "invite", "accept", "critical_unblock_low", "group_update", "signed_credential", "blinded_credential", "eph_setting", "net", "09", "background_location", "refresh_id", "Asia/Kolkata", "privacy_mode_ts", "account_sync", "voip_payload_type", "service_areas", "acs_public_key", "v_id", "0a", "fallback_class", "relay", "actual_actors", "metadata", "w:biz", "5", "connected-limit", "notice", "0b", "host_storage", "fb_page", "subject", "privatestats", "invis", "groupadd", "010", "note.m4r", "uuid", "0c", "8000", "sun", "372", "1020", "stage", "1200", "720", "canonical", "fb", "011", "video_duration", "0d", "1140", "superadmin", "012", "Opening.m4r", "keystore_attestation", "dleq_proof", "013", "timestamp", "ab_key", "w:sync:app:state", "0e", "vertical", "600", "p_v_id", "6", "likes", "014", "500", "1260", "creator", "0f", "rte", "destination", "group", "group_info", "syncd_anti_tampering_fatal_exception_enabled", "015", "dl_bw", "Asia/Jakarta", "vp8/h.264", "online", "1320", "fb:multiway", "10", "timeout", "016", "nse_retry", "urn:xmpp:whatsapp:dirty", "017", "a_v_id", "web_shops_chat_header_button_enabled", "nse_call", "inactive-upgrade", "none", "web", "groups", "2250", "mms_hot_content_timespan_in_seconds", "contact_blacklist", "nse_read", "suspended_group_deletion_notification", "binary_version", "018", "https://www.whatsapp.com/otp/copy/", "reg_push", "shops_hide_catalog_attachment_entrypoint", "server_sync", ".", "ephemeral_messages_allowed_values", "019", "mms_vcache_aggregation_enabled", "iphone", "America/Argentina/Buenos_Aires", "01a", "mms_vcard_autodownload_size_kb", "nse_ver", "shops_header_dropdown_menu_item", "dhash", "catalog_status", "communities_mvp_new_iqs_serverprop", "blocklist", "default", "11", "ephemeral_messages_enabled", "01b", "original_dimensions", "8", "mms4_media_retry_notification_encryption_enabled", "mms4_server_error_receipt_encryption_enabled", "original_image_url", "sync", "multiway", "420", "companion_enc_static", "shops_profile_drawer_entrypoint", "01c", "vcard_as_document_size_kb", "status_video_max_duration", "request_image_url", "01d", "regular_high", "s_t", "abt", "share_ext_min_preliminary_image_quality", "01e", "32", "syncd_key_rotation_enabled", "data_namespace", "md_downgrade_read_receipts2", "patch", "polltype", "ephemeral_messages_setting", "userrate", "15", "partial_pjpeg_bw_threshold", "played-self", "catalog_exists", "01f", "mute_v2"];
  3359. t.DICTIONARY_0_TOKEN = n;
  3360. const r = ["reject", "dirty", "announcement", "020", "13", "9", "status_video_max_bitrate", "fb:thrift_iq", "offline_batch", "022", "full", "ctwa_first_business_reply_logging", "h.264", "smax_id", "group_description_length", "https://www.whatsapp.com/otp/code", "status_image_max_edge", "smb_upsell_business_profile_enabled", "021", "web_upgrade_to_md_modal", "14", "023", "s_o", "smaller_video_thumbs_status_enabled", "media_max_autodownload", "960", "blocking_status", "peer_msg", "joinable_group_call_client_version", "group_call_video_maximization_enabled", "return_snapshot", "high", "America/Mexico_City", "entry_point_block_logging_enabled", "pop", "024", "1050", "16", "1380", "one_tap_calling_in_group_chat_size", "regular_low", "inline_joinable_education_enabled", "hq_image_max_edge", "locked", "America/Bogota", "smb_biztools_deeplink_enabled", "status_image_quality", "1088", "025", "payments_upi_intent_transaction_limit", "voip", "w:g2", "027", "md_pin_chat_enabled", "026", "multi_scan_pjpeg_download_enabled", "shops_product_grid", "transaction_id", "ctwa_context_enabled", "20", "fna", "hq_image_quality", "alt_jpeg_doc_detection_quality", "group_call_max_participants", "pkey", "America/Belem", "image_max_kbytes", "web_cart_v1_1_order_message_changes_enabled", "ctwa_context_enterprise_enabled", "urn:xmpp:whatsapp:account", "840", "Asia/Kuala_Lumpur", "max_participants", "video_remux_after_repair_enabled", "stella_addressbook_restriction_type", "660", "900", "780", "context_menu_ios13_enabled", "mute-state", "ref", "payments_request_messages", "029", "frskmsg", "vcard_max_size_kb", "sample_buffer_gif_player_enabled", "match_last_seen", "510", "4983", "video_max_bitrate", "028", "w:comms:chat", "17", "frequently_forwarded_max", "groups_privacy_blacklist", "Asia/Karachi", "02a", "web_download_document_thumb_mms_enabled", "02b", "hist_sync", "biz_block_reasons_version", "1024", "18", "web_is_direct_connection_for_plm_transparent", "view_once_write", "file_max_size", "paid_convo_id", "online_privacy_setting", "video_max_edge", "view_once_read", "enhanced_storage_management", "multi_scan_pjpeg_encoding_enabled", "ctwa_context_forward_enabled", "video_transcode_downgrade_enable", "template_doc_mime_types", "hq_image_bw_threshold", "30", "body", "u_aud_limit_sil_restarts_ctrl", "other", "participating", "w:biz:directory", "1110", "vp8", "4018", "meta", "doc_detection_image_max_edge", "image_quality", "1170", "02c", "smb_upsell_chat_banner_enabled", "key_expiry_time_second", "pid", "stella_interop_enabled", "19", "linked_device_max_count", "md_device_sync_enabled", "02d", "02e", "360", "enhanced_block_enabled", "ephemeral_icon_in_forwarding", "paid_convo_status", "gif_provider", "project_name", "server-error", "canonical_url_validation_enabled", "wallpapers_v2", "syncd_clear_chat_delete_chat_enabled", "medianotify", "02f", "shops_required_tos_version", "vote", "reset_skey_on_id_change", "030", "image_max_edge", "multicast_limit_global", "ul_bw", "21", "25", "5000", "poll", "570", "22", "031", "1280", "WhatsApp", "032", "bloks_shops_enabled", "50", "upload_host_switching_enabled", "web_ctwa_context_compose_enabled", "ptt_forwarded_features_enabled", "unblocked", "partial_pjpeg_enabled", "fbid:devices", "height", "ephemeral_group_query_ts", "group_join_permissions", "order", "033", "alt_jpeg_status_quality", "migrate", "popular-bank", "win_uwp_deprecation_killswitch_enabled", "web_download_status_thumb_mms_enabled", "blocking", "url_text", "035", "web_forwarding_limit_to_groups", "1600", "val", "1000", "syncd_msg_date_enabled", "bank-ref-id", "max_subject", "payments_web_enabled", "web_upload_document_thumb_mms_enabled", "size", "request", "ephemeral", "24", "receipt_agg", "ptt_remember_play_position", "sampling_weight", "enc_rekey", "mute_always", "037", "034", "23", "036", "action", "click_to_chat_qr_enabled", "width", "disabled", "038", "md_blocklist_v2", "played_self_enabled", "web_buttons_message_enabled", "flow_id", "clear", "450", "fbid:thread", "bloks_session_state", "America/Lima", "attachment_picker_refresh", "download_host_switching_enabled", "1792", "u_aud_limit_sil_restarts_test2", "custom_urls", "device_fanout", "optimistic_upload", "2000", "key_cipher_suite", "web_smb_upsell_in_biz_profile_enabled", "e", "039", "siri_post_status_shortcut", "pair-device", "lg", "lc", "stream_attribution_url", "model", "mspjpeg_phash_gen", "catalog_send_all", "new_multi_vcards_ui", "share_biz_vcard_enabled", "-", "clean", "200", "md_blocklist_v2_server", "03b", "03a", "web_md_migration_experience", "ptt_conversation_waveform", "u_aud_limit_sil_restarts_test1"];
  3361. t.DICTIONARY_1_TOKEN = r;
  3362. const o = ["64", "ptt_playback_speed_enabled", "web_product_list_message_enabled", "paid_convo_ts", "27", "manufacturer", "psp-routing", "grp_uii_cleanup", "ptt_draft_enabled", "03c", "business_initiated", "web_catalog_products_onoff", "web_upload_link_thumb_mms_enabled", "03e", "mediaretry", "35", "hfm_string_changes", "28", "America/Fortaleza", "max_keys", "md_mhfs_days", "streaming_upload_chunk_size", "5541", "040", "03d", "2675", "03f", "...", "512", "mute", "48", "041", "alt_jpeg_quality", "60", "042", "md_smb_quick_reply", "5183", "c", "1343", "40", "1230", "043", "044", "mms_cat_v1_forward_hot_override_enabled", "user_notice", "ptt_waveform_send", "047", "Asia/Calcutta", "250", "md_privacy_v2", "31", "29", "128", "md_messaging_enabled", "046", "crypto", "690", "045", "enc_iv", "75", "failure", "ptt_oot_playback", "AIzaSyDR5yfaG7OG8sMTUj8kfQEb8T9pN8BM6Lk", "w", "048", "2201", "web_large_files_ui", "Asia/Makassar", "812", "status_collapse_muted", "1334", "257", "2HP4dm", "049", "patches", "1290", "43cY6T", "America/Caracas", "web_sticker_maker", "campaign", "ptt_pausable_enabled", "33", "42", "attestation", "biz", "04b", "query_linked", "s", "125", "04a", "810", "availability", "1411", "responsiveness_v2_m1", "catalog_not_created", "34", "America/Santiago", "1465", "enc_p", "04d", "status_info", "04f", "key_version", "..", "04c", "04e", "md_group_notification", "1598", "1215", "web_cart_enabled", "37", "630", "1920", "2394", "-1", "vcard", "38", "elapsed", "36", "828", "peer", "pricing_category", "1245", "invalid", "stella_ios_enabled", "2687", "45", "1528", "39", "u_is_redial_audio_1104_ctrl", "1025", "1455", "58", "2524", "2603", "054", "bsp_system_message_enabled", "web_pip_redesign", "051", "verify_apps", "1974", "1272", "1322", "1755", "052", "70", "050", "1063", "1135", "1361", "80", "1096", "1828", "1851", "1251", "1921", "key_config_id", "1254", "1566", "1252", "2525", "critical_block", "1669", "max_available", "w:auth:backup:token", "product", "2530", "870", "1022", "participant_uuid", "web_cart_on_off", "1255", "1432", "1867", "41", "1415", "1440", "240", "1204", "1608", "1690", "1846", "1483", "1687", "1749", "69", "url_number", "053", "1325", "1040", "365", "59", "Asia/Riyadh", "1177", "test_recommended", "057", "1612", "43", "1061", "1518", "1635", "055", "1034", "1375", "750", "1430", "event_code", "1682", "503", "55", "865", "78", "1309", "1365", "44", "America/Guayaquil", "535", "LIMITED", "1377", "1613", "1420", "1599", "1822", "05a", "1681", "password", "1111", "1214", "1376", "1478", "47", "1082", "4282", "Europe/Istanbul", "1307", "46", "058", "1124", "256", "rate-overlimit", "retail", "u_a_socket_err_fix_succ_test", "1292", "1370", "1388", "520", "861", "psa", "regular", "1181", "1766", "05b", "1183", "1213", "1304", "1537"];
  3363. t.DICTIONARY_2_TOKEN = o;
  3364. const i = ["1724", "profile_picture", "1071", "1314", "1605", "407", "990", "1710", "746", "pricing_model", "056", "059", "061", "1119", "6027", "65", "877", "1607", "05d", "917", "seen", "1516", "49", "470", "973", "1037", "1350", "1394", "1480", "1796", "keys", "794", "1536", "1594", "2378", "1333", "1524", "1825", "116", "309", "52", "808", "827", "909", "495", "1660", "361", "957", "google", "1357", "1565", "1967", "996", "1775", "586", "736", "1052", "1670", "bank", "177", "1416", "2194", "2222", "1454", "1839", "1275", "53", "997", "1629", "6028", "smba", "1378", "1410", "05c", "1849", "727", "create", "1559", "536", "1106", "1310", "1944", "670", "1297", "1316", "1762", "en", "1148", "1295", "1551", "1853", "1890", "1208", "1784", "7200", "05f", "178", "1283", "1332", "381", "643", "1056", "1238", "2024", "2387", "179", "981", "1547", "1705", "05e", "290", "903", "1069", "1285", "2436", "062", "251", "560", "582", "719", "56", "1700", "2321", "325", "448", "613", "777", "791", "51", "488", "902", "Asia/Almaty", "is_hidden", "1398", "1527", "1893", "1999", "2367", "2642", "237", "busy", "065", "067", "233", "590", "993", "1511", "54", "723", "860", "363", "487", "522", "605", "995", "1321", "1691", "1865", "2447", "2462", "NON_TRANSACTIONAL", "433", "871", "432", "1004", "1207", "2032", "2050", "2379", "2446", "279", "636", "703", "904", "248", "370", "691", "700", "1068", "1655", "2334", "060", "063", "364", "533", "534", "567", "1191", "1210", "1473", "1827", "069", "701", "2531", "514", "prev_dhash", "064", "496", "790", "1046", "1139", "1505", "1521", "1108", "207", "544", "637", "final", "1173", "1293", "1694", "1939", "1951", "1993", "2353", "2515", "504", "601", "857", "modify", "spam_request", "p_121_aa_1101_test4", "866", "1427", "1502", "1638", "1744", "2153", "068", "382", "725", "1704", "1864", "1990", "2003", "Asia/Dubai", "508", "531", "1387", "1474", "1632", "2307", "2386", "819", "2014", "066", "387", "1468", "1706", "2186", "2261", "471", "728", "1147", "1372", "1961"];
  3365. t.DICTIONARY_3_TOKEN = i;
  3366. const s = [n, r, o, i];
  3367. t.DICTIONARIES = s
  3368. }, 1330: (e, t, n) => {
  3369. "use strict";
  3370. Object.defineProperty(t, "__esModule", {value: !0}), t.decimalStringToLongInt = function (e) {
  3371. if (!/^-?\d+$/.test(e)) throw __LOG__(2)`"${e}" is not a valid decimal string`, new Error("decimalStringToLongInt is given an invalid decimal string");
  3372. const t = "-" === e[0], n = e.replace(/^-?0*/, ""), o = n.length;
  3373. if (o < 16 || 16 === o && n <= "9007199254740991") return t ? -Number(n) : Number(n);
  3374. if (o > 20 || 20 === o && n > "18446744073709551615" || t && (o > 19 || 19 === o && n > "9223372036854775807")) throw __LOG__(2)`"${e}" is over 64 bits`, new Error("decimalStringToHexLong is given value over 64 bits");
  3375. let i = 0, s = 0;
  3376. for (let e = 0; e < o; e++) i = 10 * i + Number(n[e]), s = 10 * s + Math.floor(i / 4294967296), i %= 4294967296;
  3377. return (0, r.createHexLongFrom32Bits)(s, i, t)
  3378. }, t.isBiggerLongInt = function (e, t) {
  3379. if ("number" == typeof e && "number" == typeof t) return e > t;
  3380. const n = "number" == typeof e ? (0, r.hexLongFromNumber)(e) : e,
  3381. o = "number" == typeof t ? (0, r.hexLongFromNumber)(t) : t;
  3382. return (0, r.isBiggerHexLong)(n, o)
  3383. }, t.longIntToDecimalString = function (e) {
  3384. if ("number" == typeof e) return e.toString(10);
  3385. const t = (0, r.hexLongToHex)(e), n = [0];
  3386. let o = 0;
  3387. for (let e = 0; e < t.length; e++) {
  3388. o = (0, r.hexAt)(t, e);
  3389. for (let e = 0; e < n.length; e++) n[e] = 16 * n[e] + o, o = n[e] / 10 | 0, n[e] %= 10;
  3390. for (; o > 0;) n.push(o % 10), o = o / 10 | 0
  3391. }
  3392. const i = n.reverse().join("");
  3393. return (0, r.hexLongIsNegative)(e) ? "-" + i : i
  3394. }, t.maybeNumberOrThrowIfTooLarge = void 0, t.numberOrThrowIfTooLarge = o;
  3395. var r = n(5982);
  3396. function o(e) {
  3397. if ("number" != typeof e) throw __LOG__(2)`${e} is not a safe integer`, new Error("numberOrThrowIfTooLarge is given a non-safe integer");
  3398. return e
  3399. }
  3400. t.maybeNumberOrThrowIfTooLarge = e => null == e ? e : o(e)
  3401. }, 6595: (e, t, n) => {
  3402. "use strict";
  3403. Object.defineProperty(t, "__esModule", {value: !0}), t.Spec = void 0, t.compileSpec = function (e) {
  3404. if (e.internalCompiledSpec) return e.internalCompiledSpec;
  3405. const t = e.internalSpec;
  3406. if (!t) throw new Error(`Message Class ${String(e)} does not have internalSpec`);
  3407. const n = e.internalDefaults || {}, s = Object.keys(t).filter((e => e !== r.KEYS.ONEOF)),
  3408. a = new Array(s.length), c = [], l = [], u = new Array(s.length), d = t[r.KEYS.ONEOF] || {};
  3409. s.sort(((e, n) => {
  3410. const r = i(t, e), o = i(t, n);
  3411. return r[0] - o[0]
  3412. }));
  3413. for (let e = 0; e < s.length; e++) {
  3414. const o = s[e], d = i(t, o);
  3415. u[e] = n[o];
  3416. const _ = d[1], f = d[0];
  3417. if (c.push(f), l.push(_), (_ & r.TYPE_MASK) === r.TYPES.MESSAGE) a[e] = d[2]; else if ((_ & r.TYPE_MASK) === r.TYPES.ENUM) {
  3418. const t = d[2];
  3419. if ("function" == typeof t.cast) a[e] = t; else {
  3420. let n, r = !0, o = 0;
  3421. for (const e in t) r && e !== o++ && (r = !1);
  3422. if (r) {
  3423. n = [];
  3424. for (let e = 0; e < o; e++) n.push(!0)
  3425. } else {
  3426. n = {};
  3427. for (const e in t) n[t[e]] = !0
  3428. }
  3429. a[e] = n
  3430. }
  3431. } else a[e] = null
  3432. }
  3433. const _ = {};
  3434. for (const e in d) d[e].forEach((t => {
  3435. _[t] || (_[t] = []), _[t].push(e)
  3436. }));
  3437. const f = t[r.KEYS.RESERVED] && t[r.KEYS.RESERVED][r.KEYS.RESERVED_TAGS],
  3438. h = t[r.KEYS.RESERVED] && t[r.KEYS.RESERVED][r.KEYS.RESERVED_FIELDS],
  3439. p = new o(s, c, l, u, a, d, _, f, h);
  3440. return e.internalCompiledSpec = p, p
  3441. };
  3442. var r = n(6154);
  3443. class o {
  3444. constructor(e, t, n, r, o, i, s, a, c) {
  3445. this.names = e, this.fields = t, this.types = n, this.defaults = r, this.meta = o, this.oneofToFields = i, this.fieldToOneof = s, this.reservedTags = a ? a.reduce(((e, t) => (e[t] = !0, e)), {}) : {}, this.reservedFields = c ? c.reduce(((e, t) => (e[t] = !0, e)), {}) : {}
  3446. }
  3447. }
  3448. function i(e, t) {
  3449. const n = e[t];
  3450. if (null == n) throw new Error(`fieldData of ${t} is missing`);
  3451. return n
  3452. }
  3453. t.Spec = o
  3454. }, 6154: (e, t) => {
  3455. "use strict";
  3456. Object.defineProperty(t, "__esModule", {value: !0}), t.TYPE_MASK = t.TYPES = t.KEYS = t.FLAGS = t.ENC = void 0;
  3457. t.FLAGS = {REPEATED: 64, PACKED: 128, REQUIRED: 256};
  3458. t.TYPE_MASK = 31;
  3459. t.TYPES = {
  3460. INT32: 1,
  3461. INT64: 2,
  3462. UINT32: 3,
  3463. UINT64: 4,
  3464. SINT32: 5,
  3465. SINT64: 6,
  3466. BOOL: 7,
  3467. ENUM: 8,
  3468. FIXED64: 9,
  3469. SFIXED64: 10,
  3470. DOUBLE: 11,
  3471. STRING: 12,
  3472. BYTES: 13,
  3473. MESSAGE: 14,
  3474. FIXED32: 15,
  3475. SFIXED32: 16,
  3476. FLOAT: 17
  3477. };
  3478. t.ENC = {VARINT: 0, BIT64: 1, BINARY: 2, BIT32: 5};
  3479. t.KEYS = {ONEOF: "__oneofs__", RESERVED: "__reserved__", RESERVED_TAGS: "tags", RESERVED_FIELDS: "fields"}
  3480. }, 5036: (e, t, n) => {
  3481. "use strict";
  3482. Object.defineProperty(t, "__esModule", {value: !0}), t.typeToEncType = function (e) {
  3483. if (e & i.PACKED) return c.BINARY;
  3484. const t = e & a;
  3485. return t <= s.ENUM ? c.VARINT : t <= s.DOUBLE ? c.BIT64 : t <= s.MESSAGE ? c.BINARY : c.BIT32
  3486. };
  3487. var r = function (e, t) {
  3488. if (!t && e && e.__esModule) return e;
  3489. if (null === e || "object" != typeof e && "function" != typeof e) return {default: e};
  3490. var n = o(t);
  3491. if (n && n.has(e)) return n.get(e);
  3492. var r = {}, i = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3493. for (var s in e) if ("default" !== s && Object.prototype.hasOwnProperty.call(e, s)) {
  3494. var a = i ? Object.getOwnPropertyDescriptor(e, s) : null;
  3495. a && (a.get || a.set) ? Object.defineProperty(r, s, a) : r[s] = e[s]
  3496. }
  3497. r.default = e, n && n.set(e, r);
  3498. return r
  3499. }(n(6154));
  3500. function o(e) {
  3501. if ("function" != typeof WeakMap) return null;
  3502. var t = new WeakMap, n = new WeakMap;
  3503. return (o = function (e) {
  3504. return e ? n : t
  3505. })(e)
  3506. }
  3507. const {FLAGS: i, TYPES: s, TYPE_MASK: a, ENC: c} = r
  3508. }, 2525: (e, t, n) => {
  3509. "use strict";
  3510. var r = n(7914);
  3511. Object.defineProperty(t, "__esModule", {value: !0}), t.checkRequirements = c, t.checkValid = function (e, t) {
  3512. c(e, t);
  3513. const n = p(t, e);
  3514. if (n) throw n.path.reverse(), new TypeError(`Invalid value at ${n.path.join(".")}: ${n.error}`)
  3515. };
  3516. var o = r(n(9028)), i = n(6595), s = n(6154);
  3517. const a = Number.MAX_SAFE_INTEGER;
  3518. function c(e, t) {
  3519. const n = l(e, t);
  3520. if (n) throw n.reverse(), new TypeError(`Message missing required value ${n.join(".")}`)
  3521. }
  3522. function l(e, t) {
  3523. const {names: n, types: r, meta: a} = (0, i.compileSpec)(e);
  3524. let c;
  3525. for (let e = 0; e < r.length && !c; e++) {
  3526. const i = r[e], u = n[e], d = (0, o.default)(t, u) ? t[u] : void 0;
  3527. if (i & s.FLAGS.REQUIRED && null == d) c = [u]; else if ((i & s.TYPE_MASK) === s.TYPES.MESSAGE && i & s.FLAGS.REPEATED && null != d) {
  3528. const t = a[e];
  3529. let n;
  3530. for (n = 0; n < d.length && !c; n++) c = l(t, d[n]);
  3531. c && c.push(`${u}[${n}]`)
  3532. } else (i & s.TYPE_MASK) === s.TYPES.MESSAGE && null != d && (c = l(a[e], d), c && c.push(u))
  3533. }
  3534. return c
  3535. }
  3536. function u(e, t, n) {
  3537. return "string" == typeof e ? !/^-?0x[0-9a-f]{16}$/i.test(e) && (__LOG__(2)`"${f(e)}" is not a valid long`, {
  3538. path: [],
  3539. error: "value must be a hex string of the form '0x123...' or '-0x123...' where the tail is always 16 characters long"
  3540. }) : d(e, t, n)
  3541. }
  3542. function d(e, t, n) {
  3543. return "number" != typeof e || e != e || Math.floor(e) !== e ? (__LOG__(2)`"${f(e)}" is not a valid int`, {
  3544. path: [],
  3545. error: "value must be an int"
  3546. }) : (e < t || e >= n) && (__LOG__(2)`"${f(e)}" is out of range`, {
  3547. path: [],
  3548. error: "value is out of range"
  3549. })
  3550. }
  3551. function _(e, t, n) {
  3552. return e ? void 0 : (__LOG__(2)`"${f(n)}" is not ${t}`, {path: [], error: "value is invalid"})
  3553. }
  3554. function f(e) {
  3555. return "string" == typeof e ? `"${e}"` : Array.isArray(e) ? `[${e.join(", ")}]` : `${e}`
  3556. }
  3557. const h = [void 0, e => d(e, -2147483648, 2147483648), e => u(e, -a, a + 1), e => d(e, 0, 4294967296), e => u(e, 0, a + 1), e => d(e, -2147483648, 2147483648), e => u(e, -a, a + 1), e => _("boolean" == typeof e, "boolean", e), (e, t) => _("number" == typeof e && (t[e] || void 0 !== t.cast(e)), "in enum", e), e => u(e, 0, a + 1), e => u(e, -a, a + 1), e => _("number" == typeof e, "number", e), e => _("string" == typeof e, "string", e), e => _(e instanceof ArrayBuffer || e instanceof Uint8Array, "ArrayBuffer or Uint8Array", e), p, e => d(e, 0, 4294967296), e => d(e, -2147483648, 2147483648), e => _("number" == typeof e, "number", e)];
  3558. function p(e, t) {
  3559. const {
  3560. names: n,
  3561. fields: r,
  3562. types: o,
  3563. meta: a,
  3564. oneofToFields: c,
  3565. fieldToOneof: l,
  3566. reservedTags: u,
  3567. reservedFields: d
  3568. } = (0, i.compileSpec)(t);
  3569. let _;
  3570. for (let t = 0; t < n.length && !_; t++) {
  3571. const i = n[t], p = o[t], b = e[i], m = p & s.TYPE_MASK, g = h[m];
  3572. if (void 0 === g) throw new Error(`Can not find the validator for type ${m}`);
  3573. if (p & (s.FLAGS.PACKED | s.FLAGS.REPEATED) && null != b) if (Array.isArray(b)) {
  3574. const e = a[t];
  3575. for (let t = 0; t < b.length && !_; t++) _ = g(b[t], e), _ && _.path.push(`${i}[${t}]`)
  3576. } else __LOG__(2)`"${f(b)}" is not an array`, _ = {
  3577. path: [i],
  3578. error: "repeated field must be array"
  3579. }; else if (null != b) {
  3580. _ = g(b, a[t]), _ && _.path.push(i);
  3581. const n = l[i];
  3582. n && n.forEach((t => {
  3583. c[t].filter((e => e !== i)).forEach((n => {
  3584. void 0 !== e[n] && (_ = {path: [t], error: `oneof has fields '${i}' and '${n}' set`})
  3585. }))
  3586. })), u[r[t]] && (_ = {path: [i], error: `tag ${r[t]} is reserved`}), d[i] && (_ = {
  3587. path: [i],
  3588. error: "field name is reserved"
  3589. })
  3590. }
  3591. }
  3592. return _
  3593. }
  3594. }, 3955: (e, t, n) => {
  3595. "use strict";
  3596. var r = n(7914);
  3597. Object.defineProperty(t, "__esModule", {value: !0}), t.decodeProtobuf = function (e, t) {
  3598. const n = new i.Binary(t), r = g(e, n, void 0, !1);
  3599. return (0, d.checkRequirements)(e, r), r
  3600. }, t.decodeProtobufWithUnknowns = function (e, t) {
  3601. const n = new i.Binary(t), r = g(e, n, void 0, !0);
  3602. return (0, d.checkRequirements)(e, r), r
  3603. }, t.getUnknownFields = function (e) {
  3604. return (0, s.default)(e, "$$unsafeUnknownFields") ? e.$$unsafeUnknownFields : null
  3605. };
  3606. var o = r(n(3982)), i = n(9323), s = r(n(9028)), a = n(5982), c = n(6595), l = n(6154), u = n(5036),
  3607. d = n(2525);
  3608. function _(e, t, n) {
  3609. if (e !== (0, u.typeToEncType)(t)) throw new Error(`FormatError: ${n} encoded with wire type ${e}`)
  3610. }
  3611. function f(e, t, n) {
  3612. switch (t) {
  3613. case l.TYPES.INT32:
  3614. return h(n, -2147483648, 2147483648, e, i.parseInt64OrThrow);
  3615. case l.TYPES.INT64:
  3616. return n.readVarInt(p);
  3617. case l.TYPES.UINT32:
  3618. return h(n, 0, 4294967296, e, i.parseUint64OrThrow);
  3619. case l.TYPES.UINT64:
  3620. return n.readVarInt(b);
  3621. case l.TYPES.SINT32: {
  3622. const t = h(n, 0, 4294967296, e, i.parseInt64OrThrow);
  3623. return 1 & t ? ~(t >>> 1) : t >>> 1
  3624. }
  3625. case l.TYPES.SINT64:
  3626. return n.readVarInt(m);
  3627. case l.TYPES.BOOL:
  3628. return !!h(n, 0, 2, e, i.parseUint64OrThrow);
  3629. case l.TYPES.ENUM:
  3630. return n.readVarInt(i.parseInt64OrThrow);
  3631. case l.TYPES.FIXED64:
  3632. return n.readLong(b, !0);
  3633. case l.TYPES.SFIXED64:
  3634. return n.readLong(p, !0);
  3635. case l.TYPES.DOUBLE:
  3636. return n.readFloat64(!0);
  3637. case l.TYPES.STRING:
  3638. return n.readString(n.readVarInt(i.parseUint64OrThrow));
  3639. case l.TYPES.BYTES:
  3640. return n.readBuffer(n.readVarInt(i.parseUint64OrThrow));
  3641. case l.TYPES.FIXED32:
  3642. return n.readUint32(!0);
  3643. case l.TYPES.SFIXED32:
  3644. return n.readInt32(!0);
  3645. case l.TYPES.FLOAT:
  3646. return n.readFloat32(!0)
  3647. }
  3648. }
  3649. function h(e, t, n, r, o) {
  3650. const i = e.readVarInt(o);
  3651. if (i < t || i >= n) throw new Error(`FormatError: ${r} encoded with out-of-range value ${i}`);
  3652. return i
  3653. }
  3654. function p(e, t) {
  3655. if ((0, i.longFitsInDouble)(!0, e, t)) {
  3656. return 4294967296 * e + v(t)
  3657. }
  3658. {
  3659. const n = e < 0;
  3660. let r;
  3661. r = n ? 0 === t ? -e : ~e : e;
  3662. const o = n ? -t : t;
  3663. return (0, a.createHexLongFrom32Bits)(r, o, n)
  3664. }
  3665. }
  3666. function b(e, t) {
  3667. if ((0, i.longFitsInDouble)(!1, e, t)) {
  3668. return 4294967296 * v(e) + v(t)
  3669. }
  3670. return (0, a.createHexLongFrom32Bits)(e, t)
  3671. }
  3672. function m(e, t) {
  3673. let n = e >>> 1, r = e << 31 | t >>> 1;
  3674. return 1 & t && (n = ~n, r = ~r), p(n, r)
  3675. }
  3676. function g(e, t, n, r) {
  3677. var s;
  3678. const {
  3679. names: a,
  3680. fields: u,
  3681. types: d,
  3682. meta: p,
  3683. oneofToFields: b,
  3684. fieldToOneof: m,
  3685. reservedTags: v,
  3686. reservedFields: y
  3687. } = (0, c.compileSpec)(e), {internalDefaults: w} = e, S = n || (0, o.default)({}, w) || {};
  3688. S.$$unknownFieldCount = null !== (s = null == n ? void 0 : n.$$unknownFieldCount) && void 0 !== s ? s : 0;
  3689. for (let e = 0; e < a.length; e++) d[e] & l.FLAGS.REPEATED && (S[a[e]] = []);
  3690. let E = 0;
  3691. const j = u.length > 0;
  3692. let k = u[0];
  3693. for (; t.size();) {
  3694. const e = h(t, 0, 4294967296, "field and enc type", i.parseInt64OrThrow), n = 7 & e, o = e >>> 3;
  3695. if (j && o !== k) {
  3696. const e = E;
  3697. do {
  3698. ++E === u.length && (E = 0), k = u[E]
  3699. } while (o !== k && E !== e)
  3700. }
  3701. if (j && o === k) {
  3702. const e = a[E], s = d[E];
  3703. _(n, s, e);
  3704. const c = s & l.TYPE_MASK, u = p[E];
  3705. if (s & l.FLAGS.PACKED) {
  3706. const n = t.readVarInt(i.parseUint64OrThrow), r = t.readBinary(n);
  3707. for (; r.size();) {
  3708. var A;
  3709. const t = f(e, c, r);
  3710. (c !== l.TYPES.ENUM || u[t] || void 0 !== (null === (A = u.cast) || void 0 === A ? void 0 : A.call(u, t))) && S[e].push(t)
  3711. }
  3712. } else if (c === l.TYPES.MESSAGE) {
  3713. const n = t.readVarInt(i.parseUint64OrThrow), o = t.readBinary(n);
  3714. if (s & l.FLAGS.REPEATED) S[e].push(g(u, o, void 0, r)); else {
  3715. const t = S[e];
  3716. S[e] = g(u, o, t, r)
  3717. }
  3718. } else {
  3719. var T;
  3720. const n = f(e, c, t);
  3721. (c !== l.TYPES.ENUM || u[n] || void 0 !== (null === (T = u.cast) || void 0 === T ? void 0 : T.call(u, n))) && (s & l.FLAGS.REPEATED ? S[e].push(n) : S[e] = n)
  3722. }
  3723. const h = m[e];
  3724. h && void 0 !== S[e] && h.forEach((t => {
  3725. b[t].filter((t => t !== e)).forEach((e => {
  3726. delete S[e]
  3727. }))
  3728. })), (v[o] || y[e]) && delete S[e]
  3729. } else if (S.$$unknownFieldCount++, r) {
  3730. let e;
  3731. switch (S.$$unsafeUnknownFields || (S.$$unsafeUnknownFields = {}), n) {
  3732. case l.ENC.VARINT:
  3733. e = t.readVarInt(i.parseInt64OrThrow);
  3734. break;
  3735. case l.ENC.BIT64:
  3736. e = t.readBinary(8);
  3737. break;
  3738. case l.ENC.BINARY:
  3739. e = t.readBinary(t.readVarInt(i.parseUint64OrThrow));
  3740. break;
  3741. case l.ENC.BIT32:
  3742. e = t.readBinary(4)
  3743. }
  3744. S.$$unsafeUnknownFields[o] = e
  3745. } else n === l.ENC.VARINT ? t.readVarInt(i.parseInt64OrThrow) : n === l.ENC.BIT64 ? t.advance(8) : n === l.ENC.BINARY ? t.advance(t.readVarInt(i.parseUint64OrThrow)) : n === l.ENC.BIT32 && t.advance(4)
  3746. }
  3747. return S
  3748. }
  3749. function v(e) {
  3750. return e >= 0 ? e : 4294967296 + e
  3751. }
  3752. }, 4753: (e, t, n) => {
  3753. "use strict";
  3754. Object.defineProperty(t, "__esModule", {value: !0}), t.encodeErrorInfo = function () {
  3755. return void 0 !== l ? `Last encoded value for ${l}` : "No information known"
  3756. }, t.encodeProtobuf = function (e, t) {
  3757. let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new r.Binary;
  3758. return (0, c.checkValid)(e, t), p(n, t, e), l = void 0, n
  3759. };
  3760. var r = n(9323), o = n(5982), i = n(6595), s = n(6154), a = n(5036), c = n(2525);
  3761. let l;
  3762. function u(e, t) {
  3763. e.writeVarInt(t)
  3764. }
  3765. function d(e, t) {
  3766. if ("number" == typeof t && t < 4503599627370496 && t >= -4503599627370496) e.writeVarInt(t >= 0 ? 2 * t : 2 * -t - 1); else {
  3767. const n = new r.Binary;
  3768. let i;
  3769. "number" == typeof t ? (i = t < 0, n.writeVarInt(i ? -t : t)) : (i = (0, o.hexLongIsNegative)(t), n.writeVarIntFromHexLong(i ? (0, o.negateHexLong)(t) : t));
  3770. const s = n.peek((() => n.readByteArray())), a = s.byteLength;
  3771. if (i) {
  3772. let e, t = 0;
  3773. do {
  3774. e = s[t], s[t] = 128 & e | (127 & e) - 1 & 127, t++
  3775. } while (255 === s[t - 1])
  3776. }
  3777. let c = i ? 1 : 0;
  3778. for (let e = 0; e < a; e++) {
  3779. const t = s[e], n = 128 & t | (63 & t) << 1 | c;
  3780. c = (64 & t) >> 6, s[e] = n
  3781. }
  3782. 1 === c && (s[a - 1] |= 128, n.writeInt8(1)), e.writeBinary(n)
  3783. }
  3784. }
  3785. function _(e, t) {
  3786. "number" == typeof t ? e.writeVarInt(t) : e.writeVarIntFromHexLong(t)
  3787. }
  3788. const f = [void 0, u, _, u, _, d, d, (e, t) => {
  3789. e.writeVarInt(t ? 1 : 0)
  3790. }, u, (e, t) => {
  3791. "number" == typeof t ? e.writeUint64(t, !0) : e.writeHexLong(t, !0)
  3792. }, (e, t) => {
  3793. "number" == typeof t ? e.writeInt64(t, !0) : e.writeHexLong(t, !0)
  3794. }, (e, t) => {
  3795. e.writeFloat64(t, !0)
  3796. }, function (e, t) {
  3797. e.writeVarInt((0, r.numUtf8Bytes)(t)), e.writeString(t)
  3798. }, function (e, t) {
  3799. e.writeVarInt(t.byteLength), e.writeBuffer(t)
  3800. }, function (e, t, n) {
  3801. e.writeWithVarIntLength(((e, t) => p(e, t, n)), t)
  3802. }, (e, t) => {
  3803. e.writeUint32(t, !0)
  3804. }, (e, t) => {
  3805. e.writeInt32(t, !0)
  3806. }, (e, t) => {
  3807. e.writeFloat32(t, !0)
  3808. }], h = f.map((e => {
  3809. if (null != e) return (e, n) => {
  3810. e.writeWithVarIntLength(t, n)
  3811. };
  3812. function t(t, n) {
  3813. for (let r = 0; r < n.length; r++) e(t, n[r])
  3814. }
  3815. }));
  3816. function p(e, t, n) {
  3817. const {names: r, fields: o, types: c, meta: u} = (0, i.compileSpec)(n), {internalDefaults: d} = n;
  3818. for (let n = 0; n < r.length; n++) {
  3819. const i = r[n];
  3820. let _ = t[i];
  3821. if (null == _ && d && (_ = d[i]), null != _) {
  3822. l = i;
  3823. const t = o[n], r = c[n], d = r & s.TYPE_MASK, p = u[n], b = 8 * t | (0, a.typeToEncType)(r);
  3824. if (r & s.FLAGS.PACKED) {
  3825. if (_.length > 0) {
  3826. e.writeVarInt(b);
  3827. (0, h[d])(e, _, p)
  3828. }
  3829. } else if (r & s.FLAGS.REPEATED) for (let t = 0; t < _.length; t++) {
  3830. e.writeVarInt(b);
  3831. (0, f[d])(e, _[t], p)
  3832. } else {
  3833. e.writeVarInt(b);
  3834. (0, f[d])(e, _, p)
  3835. }
  3836. }
  3837. }
  3838. }
  3839. }, 480: (e, t, n) => {
  3840. "use strict";
  3841. Object.defineProperty(t, "__esModule", {value: !0}), t.initTagsLogger = function () {
  3842. (0, r.initializeWaLogger)({debug: o, info: o, logRestricted: o, warn: o, error: o, devConsole: o})
  3843. };
  3844. var r = n(1784);
  3845. function o() {
  3846. }
  3847. }, 1084: (e, t, n) => {
  3848. "use strict";
  3849. Object.defineProperty(t, "__esModule", {value: !0}), t.parseClientResponseServerResponse = function (e, t) {
  3850. const n = (0, a.assertTag)(e, "iq");
  3851. if (!n.success) return n;
  3852. const c = (0, i.attrJidEnum)(e, "from", o.DOMAINJID_USERJID);
  3853. if (!c.success) return c;
  3854. const l = (0, a.literal)(a.attrString, e, "type", "result");
  3855. if (!l.success) return l;
  3856. const u = (0, s.attrStringFromReference)(t, ["id"]);
  3857. if (!u.success) return u;
  3858. const d = (0, a.literal)(a.attrString, e, "id", u.value);
  3859. if (!d.success) return d;
  3860. const _ = (0, a.attrInt)(e, "t");
  3861. if (!_.success) return _;
  3862. return (0, r.makeResult)({from: c.value, type: l.value, t: _.value})
  3863. };
  3864. var r = n(2207), o = n(3716), i = n(5273), s = n(2375), a = n(3263)
  3865. }, 3716: (e, t, n) => {
  3866. "use strict";
  3867. Object.defineProperty(t, "__esModule", {value: !0}), t.DOMAINJID_USERJID = void 0;
  3868. var r = n(4037);
  3869. const o = {validators: [r.validateDomainJid, r.validateUserJid], typeName: "DomainJid|UserJid"};
  3870. t.DOMAINJID_USERJID = o
  3871. }, 8525: (e, t, n) => {
  3872. "use strict";
  3873. Object.defineProperty(t, "__esModule", {value: !0}), t.makeClientRequest = function () {
  3874. return (0, o.mergeClientWellFormedToMixin)((0, r.smax)("iq", {
  3875. id: (0, i.generateId)(),
  3876. type: "get",
  3877. xmlns: "w:p"
  3878. }))
  3879. };
  3880. var r = n(1399), o = n(4068), i = n(780)
  3881. }, 4068: (e, t, n) => {
  3882. "use strict";
  3883. Object.defineProperty(t, "__esModule", {value: !0}), t.mergeClientWellFormedToMixin = function (e) {
  3884. const t = (0, r.smax)("iq", {to: i.S_WHATSAPP_NET});
  3885. return (0, o.mergeStanzas)(e, t)
  3886. };
  3887. var r = n(1399), o = n(5640), i = n(780)
  3888. }, 5273: (e, t, n) => {
  3889. "use strict";
  3890. Object.defineProperty(t, "__esModule", {value: !0}), t.attrBroadcastJid = function (e, t) {
  3891. return (0, i.attrValidate)(e, t, r.validateBroadcastJid, "BroadcastJid")
  3892. }, t.attrCallJid = function (e, t) {
  3893. return (0, i.attrValidate)(e, t, r.validateCallJid, "CallJid")
  3894. }, t.attrDeviceJid = function (e, t) {
  3895. return (0, i.attrValidate)(e, t, r.validateDeviceJid, "DeviceJid")
  3896. }, t.attrDomainJid = function (e, t) {
  3897. return (0, i.attrValidate)(e, t, r.validateDomainJid, "DomainJid")
  3898. }, t.attrGroupJid = function (e, t) {
  3899. return (0, i.attrValidate)(e, t, r.validateGroupJid, "GroupJid")
  3900. }, t.attrJidEnum = function (e, t, n) {
  3901. const r = (0, i.attrString)(e, t);
  3902. if (!r.success) return r;
  3903. const {validators: s, typeName: a} = n;
  3904. for (let e = 0; e < s.length; e++) {
  3905. const t = s[e](r.value);
  3906. if (null != t) return (0, o.makeResult)(t)
  3907. }
  3908. return (0, i.errorMessage)(e, `to have "${t}"={${a}}, but instead has "${r.value}"`)
  3909. }, t.attrNewsletterJid = function (e, t) {
  3910. return (0, i.attrValidate)(e, t, r.validateNewsletterJid, "NewsletterJid")
  3911. }, t.attrStatusJid = function (e, t) {
  3912. return (0, i.attrValidate)(e, t, r.validateStatusJid, "StatusJid")
  3913. }, t.attrUserJid = function (e, t) {
  3914. return (0, i.attrValidate)(e, t, r.validateUserJid, "UserJid")
  3915. }, t.literalJid = function (e, t, n, r) {
  3916. const o = e(t, n);
  3917. if (!o.success) return o;
  3918. if (o.value === r) return o;
  3919. return (0, i.errorMessage)(t, `to have "${n}"={${r}}, but instead has "${o.value}"`)
  3920. }, t.optionalLiteralJid = function (e, t, n, r) {
  3921. const o = (0, i.optional)(e, t, n);
  3922. if (!o.success) return o;
  3923. if (null == o.value || o.value === r) return o;
  3924. return (0, i.errorMessage)(t, `to have "${n}"={${r}}, but instead has "${o.value}"`)
  3925. };
  3926. var r = n(4037), o = n(2207), i = n(3263)
  3927. }, 2375: (e, t, n) => {
  3928. "use strict";
  3929. var r = n(7914);
  3930. Object.defineProperty(t, "__esModule", {value: !0}), t.attrFromReference = a, t.attrStringFromReference = c, t.contentStringFromReference = function (e, t) {
  3931. const n = l(e, t);
  3932. if (!n.success) return d(n);
  3933. const r = (0, s.contentString)(n.value);
  3934. if (!r.success) return d(r);
  3935. return r
  3936. }, t.optionalAttrFromReference = function (e, t, n, r, o) {
  3937. return u(t, n) ? a(e, t, n, r, o) : s.voidSuccess
  3938. }, t.optionalAttrStringFromReference = function (e, t) {
  3939. return u(e, t) ? c(e, t) : s.voidSuccess
  3940. };
  3941. var o = r(n(9028)), i = n(2207), s = n(3263);
  3942. function a(e, t, n, r, o) {
  3943. const i = l(t, n);
  3944. if (!i.success) return d(i);
  3945. const s = e(i.value, n[n.length - 1], r, o);
  3946. return s.success ? s : d(s)
  3947. }
  3948. function c(e, t) {
  3949. return a(s.attrString, e, t)
  3950. }
  3951. function l(e, t) {
  3952. const n = t.length;
  3953. let r = e;
  3954. for (let e = 0; e < n - 1; e++) {
  3955. const n = t[e], o = (0, s.flattenedChildWithTag)(r, n);
  3956. if (!o.success) return o;
  3957. r = o.value
  3958. }
  3959. return (0, i.makeResult)(r)
  3960. }
  3961. function u(e, t) {
  3962. const n = l(e, t);
  3963. return n.success && (0, o.default)(n.value.attrs, t[t.length - 1])
  3964. }
  3965. function d(e) {
  3966. return (0, i.makeError)(`in the reference, ${e.error}`)
  3967. }
  3968. }, 3263: (e, t, n) => {
  3969. "use strict";
  3970. var r = n(7914);
  3971. Object.defineProperty(t, "__esModule", {value: !0}), t.assertAttr = function (e, t, n) {
  3972. const r = f(e, t);
  3973. if (!r.success) return r;
  3974. if (r.value !== n) return k(e, `to have "${t}"="${n}", but instead has "${r.value}"`);
  3975. return _
  3976. }, t.assertTag = function (e, t) {
  3977. if (e.tag !== t) return k(e, `to be <${t}>`);
  3978. return _
  3979. }, t.attrInt = b, t.attrIntRange = function (e, t, n, r) {
  3980. const o = b(e, t);
  3981. if (!o.success) return o;
  3982. const i = o.value;
  3983. if (void 0 !== n && i < n) return k(e, `to have "${t}"={at least ${n}} but has value ${i}`);
  3984. if (void 0 !== r && i > r) return k(e, `to have "${t}"={at most ${r}} but has value ${i}`);
  3985. return (0, l.makeResult)(i)
  3986. }, t.attrStanzaId = function (e, t) {
  3987. return h(e, t, u.toStanzaId, "stanzaID")
  3988. }, t.attrString = f, t.attrStringEnum = function (e, t, n) {
  3989. const r = f(e, t);
  3990. if (!r.success) return r;
  3991. const o = n[r.value];
  3992. if (null != o) return (0, l.makeResult)(o);
  3993. const i = Object.values(n).join("|");
  3994. return k(e, `to have "${t}"={${i}}, but instead has "${r.value}"`)
  3995. }, t.attrValidate = h, t.childWithTag = function (e, t, n) {
  3996. const r = v(e, t, n);
  3997. if (!r.success) return r;
  3998. const o = r.value;
  3999. if (null == o) return k(e, `to have 1 child <${t}>, but found 0`);
  4000. return (0, l.makeResult)(o)
  4001. }, t.contentBytes = j, t.contentBytesRange = function (e, t, n) {
  4002. const r = j(e);
  4003. if (!r.success) return r;
  4004. const o = r.value.length;
  4005. if (void 0 !== t && o < t) return k(e, `to have binary content at least ${t} bytes but has ${o} bytes`);
  4006. if (void 0 !== n && o > n) return k(e, `to have binary content at most ${n} bytes but has ${o} bytes`);
  4007. return (0, l.makeResult)(r.value)
  4008. }, t.contentInt = function (e) {
  4009. return p(e, T, "integer")
  4010. }, t.contentLiteralBytes = function (e, t) {
  4011. const n = j(e);
  4012. if (!n.success) return n;
  4013. if ((0, s.uint8ArraysEqual)(n.value, t)) return (0, l.makeResult)(t);
  4014. return k(e, `to have content ":binary:${(0, o.encodeB64)(t)}", but instead has ":binary:${(0, o.encodeB64)(n.value)}"`)
  4015. }, t.contentString = E, t.contentStringEnum = function (e, t) {
  4016. const n = E(e);
  4017. if (!n.success) return n;
  4018. const r = t[n.value];
  4019. if (null != r) return (0, l.makeResult)(r);
  4020. const o = Object.values(t).join("|");
  4021. return k(e, `to have content "${o}", but instead has "${n.value}"`)
  4022. }, t.contentValidate = p, t.countChildrenWithTag = function (e, t, n, r, o) {
  4023. const i = x(e, t, n, r);
  4024. if (!i.success) return i;
  4025. const s = i.value.length;
  4026. for (let e = 0; e < s; e++) {
  4027. const t = o(i.value[e]);
  4028. if (!t.success) return t
  4029. }
  4030. return (0, l.makeResult)(s)
  4031. }, t.countHomogeneousChildrenWithTag = function (e, t, n) {
  4032. const r = w(e, t, n);
  4033. if (!r.success) return r;
  4034. return (0, l.makeResult)(r.value.length)
  4035. }, t.emptyObject = void 0, t.errorMessage = k, t.errorMixinDisjunction = function (e, t, n) {
  4036. const r = t.map(((e, t) => `${e}: ${n[t].error}`));
  4037. return k(e, [`to match any of following mixins: ${t.join(", ")}, but all mixins failed.`, ...r].join(" "))
  4038. }, t.flattenedChildWithTag = function (e, t) {
  4039. const n = g(e, t);
  4040. if (!n.success) return n;
  4041. if (null == n.value) return k(e, `to have 1 child <${t}>, but found 0`);
  4042. return (0, l.makeResult)(n.value)
  4043. }, t.identity = function (e) {
  4044. return e
  4045. }, t.literal = function (e, t, n, r) {
  4046. const o = e(t, n);
  4047. if (!o.success) return o;
  4048. if (o.value === r) return (0, l.makeResult)(r);
  4049. return k(t, `to have "${n}"={${r}}, but instead has "${o.value}"`)
  4050. }, t.literalContent = function (e, t, n) {
  4051. const r = e(t);
  4052. if (!r.success) return r;
  4053. if (r.value === n) return (0, l.makeResult)(n);
  4054. return k(t, `to have content "${n}", but instead has "${r.value}"`)
  4055. }, t.mapChildrenWithTag = y, t.mapHomogeneousChildrenWithTag = w, t.maybeChildren = m, t.optional = S, t.optionalChild = g, t.optionalChildWithTag = v, t.optionalLiteral = function (e, t, n, r) {
  4056. if (null == r) return _;
  4057. const o = S(e, t, n);
  4058. if (!o.success) return o;
  4059. if (o.value === r) return (0, l.makeResult)(r);
  4060. if (null == o.value) return _;
  4061. return k(t, `to have "${n}"={${r}}, but instead has "${o.value}"`)
  4062. }, t.voidSuccess = void 0;
  4063. var o = n(2089), i = n(9323), s = n(9093), a = n(2924), c = r(n(9028)), l = n(2207), u = n(3417),
  4064. d = n(3486);
  4065. const _ = (0, l.makeResult)();
  4066. function f(e, t) {
  4067. return A(e, t) ? function (e, t) {
  4068. if (t instanceof d.WapJid) return (0, l.makeResult)(t.toString());
  4069. if ("string" == typeof t) return (0, l.makeResult)(t);
  4070. return k(e, `decodeAsString: attribute is ${typeof t} not a string: ${String(t)}`)
  4071. }(e, e.attrs[t]) : k(e, `to have attribute "${t}"`)
  4072. }
  4073. function h(e, t, n, r) {
  4074. const o = f(e, t);
  4075. if (!o.success) return o;
  4076. const i = n(o.value);
  4077. return null != i ? (0, l.makeResult)(i) : k(e, `to have "${t}"={${r}}, but instead has "${o.value}"`)
  4078. }
  4079. function p(e, t, n) {
  4080. const r = E(e);
  4081. if (!r.success) return r;
  4082. const o = t(r.value);
  4083. return null != o ? (0, l.makeResult)(o) : k(e, `to have ${n} content, but instead has "${r.value}"`)
  4084. }
  4085. function b(e, t) {
  4086. return h(e, t, T, "integer")
  4087. }
  4088. function m(e) {
  4089. const t = e.content;
  4090. return t instanceof Uint8Array ? k(e, "to have children") : (0, l.makeResult)(t)
  4091. }
  4092. function g(e, t) {
  4093. const n = m(e);
  4094. if (!n.success) return n;
  4095. const r = n.value;
  4096. if (null == r) return _;
  4097. let o = null;
  4098. for (let n = 0; n < r.length; n++) {
  4099. const i = r[n];
  4100. if (i.tag === t) {
  4101. if (null != o) return k(e, `to have 1 child <${t}>, but found more than 1`);
  4102. o = i
  4103. }
  4104. }
  4105. return (0, l.makeResult)(o)
  4106. }
  4107. function v(e, t, n) {
  4108. const r = g(e, t);
  4109. return r.success ? null == r.value ? _ : n(r.value) : r
  4110. }
  4111. function y(e, t, n, r, o) {
  4112. const i = x(e, t, n, r);
  4113. if (!i.success) return i;
  4114. const s = [];
  4115. for (let e = 0; e < i.value.length; e++) {
  4116. const t = o(i.value[e]);
  4117. if (!t.success) return t;
  4118. s.push(t.value)
  4119. }
  4120. return (0, l.makeResult)(s)
  4121. }
  4122. function w(e, t, n) {
  4123. const r = y(e, t, 0, 1 / 0, n);
  4124. if (!r.success) return r;
  4125. for (let t = 0; t < r.value.length; t++) if (!(0, a.deepEqual)(r.value[0], r.value[t])) return k(e, "to have homogeneous children, but found two children that are not equal");
  4126. return r
  4127. }
  4128. function S(e, t, n, r, o) {
  4129. return A(t, n) ? e(t, n, r, o) : _
  4130. }
  4131. function E(e) {
  4132. const t = j(e);
  4133. if (!t.success) return t;
  4134. try {
  4135. const e = new i.Binary(t.value), n = e.readString(e.size());
  4136. return (0, l.makeResult)(n)
  4137. } catch (t) {
  4138. return k(e, `to have string content, but run into decoding error: ${t.message}`)
  4139. }
  4140. }
  4141. function j(e) {
  4142. const {content: t} = e;
  4143. return null == t ? k(e, "to have content") : Array.isArray(t) ? k(e, "to have content, but has children instead") : (0, l.makeResult)(t)
  4144. }
  4145. function k(e, t) {
  4146. return (0, l.makeError)(`expected <${e.tag}>: ${t}`)
  4147. }
  4148. function A(e, t) {
  4149. return (0, c.default)(e.attrs, t)
  4150. }
  4151. function T(e) {
  4152. const t = parseInt(e, 10);
  4153. return Number.isNaN(t) ? null : t
  4154. }
  4155. function x(e, t, n, r) {
  4156. const o = m(e);
  4157. if (!o.success) return o;
  4158. const i = o.value;
  4159. if (null == i) return 0 !== n ? k(e, `to have at least ${n} <${t}> children, but found 0`) : (0, l.makeResult)([]);
  4160. const s = [];
  4161. for (let e = 0; e < i.length; e++) {
  4162. const n = i[e];
  4163. n.tag === t && s.push(n)
  4164. }
  4165. const a = s.length;
  4166. return a < n ? k(e, `to have at least ${n} <${t}> children, but found ${a}`) : a > r ? k(e, `to have at most ${r} <${t}> children, but found ${a}`) : (0, l.makeResult)(s)
  4167. }
  4168. t.voidSuccess = _;
  4169. t.emptyObject = {}
  4170. }, 1399: (e, t, n) => {
  4171. "use strict";
  4172. Object.defineProperty(t, "__esModule", {value: !0}), t.smax = void 0;
  4173. const r = n(780).wap;
  4174. t.smax = r
  4175. }, 5640: (e, t, n) => {
  4176. "use strict";
  4177. Object.defineProperty(t, "__esModule", {value: !0}), t.mergeStanzas = s, t.optionalMerge = function (e, t, n, r) {
  4178. if (null != n) return e(t, n, r);
  4179. return t
  4180. };
  4181. var r = n(4080), o = n(3486);
  4182. const i = "smax$any";
  4183. function s(e, t) {
  4184. return function (e, t) {
  4185. const n = e.tag, r = t.tag;
  4186. if (r === i) return;
  4187. if (n !== r) throw new Error(`tag mismatch: ${n} != ${r}`)
  4188. }(e, t), function (e, t) {
  4189. const n = e.attrs, r = t.attrs;
  4190. Object.keys(r).forEach((e => {
  4191. const t = r[e], i = n[e];
  4192. if (null != t && null != i) {
  4193. if (function (e, t) {
  4194. if ("string" == typeof e && "string" == typeof t) return e === t;
  4195. if (e instanceof o.WapJid && t instanceof o.WapJid) return e.toString() === t.toString();
  4196. return !1
  4197. }(t, i)) return;
  4198. throw new Error(`conflict for key: ${e}`)
  4199. }
  4200. n[e] = t
  4201. }))
  4202. }(e, t), t.content instanceof Uint8Array ? function (e, t) {
  4203. const n = e.content;
  4204. if (n instanceof Uint8Array) {
  4205. if (!(0, r.uint8ArraysEqualUNSAFE)(n, t)) throw new Error("elementValue mismatch: bytes dose not equal");
  4206. return
  4207. }
  4208. if (null != n) throw new Error("elementValue mismatch: destination has children");
  4209. e.content = t
  4210. }(e, t.content) : null != t.content && function (e, t) {
  4211. const n = e.content;
  4212. if (n instanceof Uint8Array) throw new Error("children mismatch: destination has element value");
  4213. if (null == n || 0 === n.length) return void (e.content = t);
  4214. if (!function (e, t) {
  4215. const n = a(t), r = a(e), o = Object.keys(n);
  4216. for (let e = 0; e < o.length; e++) {
  4217. const t = o[e], i = n[t], s = r[t];
  4218. if (null != i && null != s && i !== s) return !1
  4219. }
  4220. return !0
  4221. }(n, t)) throw new Error("children mismatch: child counts are not compatible");
  4222. const r = [], o = Array.from(n);
  4223. t.forEach((e => {
  4224. const t = o.findIndex((t => t.tag === e.tag));
  4225. if (-1 === t) r.push(e); else {
  4226. const n = s(o.splice(t, 1)[0], e);
  4227. r.push(n)
  4228. }
  4229. })), o.forEach((e => r.push(e))), e.content = r
  4230. }(e, t.content), e
  4231. }
  4232. function a(e) {
  4233. return e.reduce(((e, t) => {
  4234. const n = t.tag, r = e[n];
  4235. return e[n] = null == r ? 1 : r + 1, e
  4236. }), {})
  4237. }
  4238. }, 9909: (e, t) => {
  4239. "use strict";
  4240. Object.defineProperty(t, "__esModule", {value: !0}), t.default = g;
  4241. const n = "undefined" != typeof Promise ? Promise : null,
  4242. r = "function" == typeof setImmediate ? setImmediate : null;
  4243. let o = 0;
  4244. const i = [], s = [], a = [], c = {sentinel: "CONTINUE_AS_IF_NO_HANDLER"},
  4245. l = {sentinel: "RETRY_ASYNCHRONOUSLY"}, u = {sentinel: "TO_STRING"}, d = {sentinel: "DID_ERROR"};
  4246. let _ = null;
  4247. const f = [], h = 64, p = 128, b = 512, m = "undefined" == typeof self ? void 0 : self;
  4248. function g(e, t) {
  4249. this._flags = 0, this._value = void 0, this._onFulfilled = void 0, this._onRejected = void 0, this._context = void 0, this._resolveLevel = 0, this._control = void 0, this.x = void 0, this._thenableParent = null, this._parent = void 0, this._child = void 0, this._children = void 0, this.control = void 0, t && (this._context = t.this), "function" == typeof e && (this._onFulfilled = e, this._flags |= 4, this._flags |= 256, F(e, this._context, (e => O(this, 0, !0, !1, e)), (e => O(this, 0, !1, !1, e))))
  4250. }
  4251. let v, y;
  4252. function w(e) {
  4253. if (void 0 === e) return v;
  4254. if (P(e)) return e;
  4255. {
  4256. const t = new g;
  4257. return O(t, 0, !0, !1, e), z(t, b), t
  4258. }
  4259. }
  4260. function S(e) {
  4261. const t = new g;
  4262. return t._value = e, z(t, 514), f.push(t), t
  4263. }
  4264. function E(e) {
  4265. let t = "";
  4266. if (e._flags & p) {
  4267. t = (e._onFulfilled || e._onRejected).call(e._context, u)
  4268. } else if (e._control) t = `.addRawControl(${e._control.name}, ${e._control.foo})`; else if (16 & e._flags) t = `.endWithControls(${Object.keys(e.control)})`; else if (e._flags & b) t = 1 & e._flags ? `Promise.resolve(${void 0 === e._value ? "" : e._value})` : `Promise.reject(${void 0 === e._value ? "" : e._value})`; else if (256 & e._flags) switch (3 & e._flags) {
  4269. case 2:
  4270. case 0:
  4271. case 1:
  4272. t = `new Promise(${e._onFulfilled})`
  4273. } else e._onFulfilled && e._onRejected ? t = `.then(${e._onFulfilled}, ${e._onRejected})` : e._onFulfilled ? t = `.then(${e._onFulfilled})` : e._onRejected && (t = `.catch(${e._onRejected})`);
  4274. return t
  4275. }
  4276. function j(e) {
  4277. this.message = e, this.stack = new Error(e || this.name).stack
  4278. }
  4279. function k() {
  4280. 0 === o && (s.length || f.length) && (o = 1, y || (y = function () {
  4281. let e, t, o = 0;
  4282. return "undefined" == typeof MutationObserver || m && m.navigator && m.navigator.standalone ? n ? function () {
  4283. n.resolve().then(N)
  4284. } : "function" == typeof r ? function () {
  4285. r(N)
  4286. } : function () {
  4287. setTimeout(N, 0)
  4288. } : (e = document.createTextNode(""), t = new MutationObserver(N), t.observe(e, {characterData: !0}), function () {
  4289. e.data = o = 1 - o
  4290. })
  4291. }()), y())
  4292. }
  4293. function A(e, t) {
  4294. z(e, 8), t._parent = e, e._children ? e._children.push(t) : e._child ? (e._children = [e._child, t], e._child = void 0) : e._child = t
  4295. }
  4296. function T(e) {
  4297. if (e && ("object" == typeof e || "function" == typeof e)) {
  4298. let t;
  4299. try {
  4300. t = e.then
  4301. } catch (e) {
  4302. return _ = e, d
  4303. }
  4304. if ("function" == typeof t) return t
  4305. }
  4306. }
  4307. function x(e) {
  4308. if (!e || P(e)) return e;
  4309. const t = T(e);
  4310. if (t === d) return S(_);
  4311. if (t) {
  4312. const n = new g((function (n, r) {
  4313. t.call(e, n, r)
  4314. }));
  4315. return n._thenableParent = e, n
  4316. }
  4317. return e
  4318. }
  4319. function P(e) {
  4320. return e instanceof g
  4321. }
  4322. function I(e, t, n) {
  4323. const r = P(e = x(e));
  4324. let o, i, s, a, u = !1;
  4325. if (r) {
  4326. if (!(3 & e._flags)) return z(e.then(t, n), 32);
  4327. z(e, 8), u = !!(e._flags & h), s = e._context, o = 1 & e._flags ? t : n, i = e._value
  4328. } else o = t, i = e;
  4329. if (!o) return w(e).then();
  4330. if (i = q(o, s, i, !0), i === d) a = S(_); else {
  4331. if (i === l) return w(e).then(t, n);
  4332. if (i === c) return r ? e.then() : w(e);
  4333. a = w(i)
  4334. }
  4335. return u && (a = a.cancellable()), void 0 !== s && (a = a.then(), a._context = s), a
  4336. }
  4337. function O(e, t, n, r, o) {
  4338. if (t !== e._resolveLevel) return;
  4339. const i = ++e._resolveLevel;
  4340. if (z(e, 4), e._thenableParent = null, n) if (o === e) e._parent = void 0, M(e, !1, r, new TypeError("promise resolved to itself")); else if (P(o)) {
  4341. const t = 3 & o._flags;
  4342. 0 === t ? A(o, e) : (e._parent = o, z(e, 1024), z(o, 8), M(e, 1 === t, r, o._value))
  4343. } else {
  4344. const t = T(o);
  4345. t === d ? (e._parent = void 0, M(e, !1, r, _)) : t ? (e._parent = void 0, e._thenableParent = o, F(t, o, (t => O(e, i, !0, !1, t)), (t => O(e, i, !1, !1, t)))) : M(e, !0, r, o)
  4346. } else M(e, !1, r, o)
  4347. }
  4348. function U(e, t, n, r, o) {
  4349. t === e._resolveLevel && (R(e), O(e, t, n, r, o))
  4350. }
  4351. function R(e) {
  4352. if (e._parent) {
  4353. const t = e._parent;
  4354. if (e._parent = void 0, t._child === e) t._child = void 0; else if (t._children) {
  4355. const n = t._children;
  4356. for (let t = 0; t < n.length; t++) if (n[t] === e) {
  4357. n.splice(t, 1);
  4358. break
  4359. }
  4360. 0 === n.length && (t._children = void 0)
  4361. }
  4362. }
  4363. }
  4364. function C(e) {
  4365. if (null == e) throw new Error(`Invalid .catch guard ${e}`);
  4366. if ("function" == typeof e) return e;
  4367. if ("object" == typeof e) throw new Error("Object guards in .catch are currently unsupported");
  4368. return function (t) {
  4369. return t === e
  4370. }
  4371. }
  4372. function D(e, t) {
  4373. return function (n, r) {
  4374. return n === u ? `.catch(..., ${t})` : e && !function (e, t) {
  4375. for (let n = 0; n < e.length; n++) {
  4376. const r = e[n];
  4377. if (r === Error || r.prototype instanceof Error) {
  4378. if (t instanceof r) return !0
  4379. } else if (r(t)) return !0
  4380. }
  4381. return !1
  4382. }(e, n) ? c : r ? l : t.call(this, n)
  4383. }
  4384. }
  4385. function M(e, t, n, r) {
  4386. if (z(e, 4 | (t ? 1 : 2)), e._value = r, e._child) $(e._child, t, n, r), e._child = void 0; else if (e._children) {
  4387. const o = e._children;
  4388. e._children = void 0;
  4389. for (let e = 0; e < o.length; e++) $(o[e], t, n, r)
  4390. } else t || 8 & e._flags || f.push(e)
  4391. }
  4392. function $(e, t, n, r) {
  4393. e._resolveLevel++;
  4394. const o = K(e, t);
  4395. if (o && 32 & e._flags) {
  4396. z(e, 4);
  4397. const i = q(o, e._context, r, !0);
  4398. if (i !== l) return void (i === d ? (e._parent = void 0, M(e, !1, n, _)) : i === c ? M(e, t, n, r) : (e._parent = void 0, O(e, e._resolveLevel, !0, n, i)));
  4399. e._flags &= -5
  4400. }
  4401. o ? ((n ? a : s).push(e), k()) : M(e, t, n, r)
  4402. }
  4403. function L(e, t) {
  4404. for (; 0 !== e.length;) t.push(e.pop())
  4405. }
  4406. function N() {
  4407. for (; 0 !== i.length || 0 !== s.length;) {
  4408. 0 === i.length && L(s, i);
  4409. const e = i.pop(), t = e._parent;
  4410. let n = !!(t && 1 & t._flags), r = t && t._value;
  4411. const o = K(e, n);
  4412. if (z(e, 4), o) {
  4413. let t;
  4414. do {
  4415. t = q(o, e._context, r, !1)
  4416. } while (t === l);
  4417. t === d ? (r = _, n = !1, e._parent = void 0) : t !== c && (r = t, n = !0, e._parent = void 0)
  4418. }
  4419. 3 & e._flags || (O(e, e._resolveLevel, n, !0, r), L(a, i))
  4420. }
  4421. for (o--; 0 !== f.length;) {
  4422. const e = f.pop();
  4423. 8 & e._flags || B(e, e._value)
  4424. }
  4425. }
  4426. g.resolve = w, g.reject = S, g.prototype.then = function (e, t) {
  4427. "function" != typeof e && (e = void 0), "function" != typeof t && (t = void 0);
  4428. const n = new g;
  4429. n._onFulfilled = e, n._onRejected = t, n._context = this._context, this._flags & h && z(n, h);
  4430. const r = 3 & this._flags;
  4431. return 0 === r ? A(this, n) : (z(this, 8), (1 === r ? e : t) ? (n._parent = this, s.push(n), k()) : (n._parent = this, z(n, r), n._value = this._value, 2 === r && f.push(n))), n
  4432. }, g.prototype.catch = function (e) {
  4433. const t = arguments.length - 1;
  4434. if (0 === t) return this.then(void 0, e);
  4435. const n = new Array(t);
  4436. for (let e = 0; e < t; e++) n[e] = C(arguments[e]);
  4437. const r = D(n, arguments[t]), o = I(this, void 0, r);
  4438. return o._onRejected && z(o, p), o
  4439. }, g.all = function (e) {
  4440. return new g((function (t, n) {
  4441. let r = e.length;
  4442. if (0 === r) return void t([]);
  4443. const o = new Array(e.length);
  4444. function i(e) {
  4445. if (0 == --r) {
  4446. const n = [];
  4447. for (let t = 0; t < o.length; t++) {
  4448. const r = o[t];
  4449. n.push(r && 3 & r._flags ? r._value : e)
  4450. }
  4451. t(n)
  4452. }
  4453. return e
  4454. }
  4455. for (let t = 0; t < e.length; t++) o[t] = I(e[t], i, n)
  4456. }))
  4457. }, g.allSettled = function (e) {
  4458. return new g((function (t) {
  4459. const n = Array.from(e);
  4460. let r = n.length;
  4461. if (0 === r) return void t([]);
  4462. const o = new Array(n.length);
  4463. function i(e) {
  4464. return function (n) {
  4465. const i = e ? {status: "rejected", reason: n} : {status: "fulfilled", value: n};
  4466. if (0 == --r) {
  4467. const e = [];
  4468. for (let t = 0; t < o.length; t++) {
  4469. const n = o[t];
  4470. e.push(n && 3 & n._flags ? n._value : i)
  4471. }
  4472. t(e)
  4473. }
  4474. return i
  4475. }
  4476. }
  4477. const s = i(!1), a = i(!0);
  4478. for (let e = 0; e < n.length; e++) o[e] = I(n[e], s, a)
  4479. }))
  4480. }, g.race = function (e) {
  4481. const t = x(e);
  4482. if (P(t)) {
  4483. const e = t.then((e => g.race(e)));
  4484. return e._context = void 0, e._flags &= -65, e
  4485. }
  4486. return new g((function (e, n) {
  4487. for (let r = 0; r < t.length; r++) {
  4488. const o = x(t[r]);
  4489. if (!P(o) || 3 & o._flags) for (e(o), r++; r < t.length; r++) {
  4490. const e = t[r];
  4491. P(e) && z(e, 8)
  4492. } else o.then(e, n)
  4493. }
  4494. }))
  4495. }, g.prototype.toString = function () {
  4496. const e = [];
  4497. let t;
  4498. for (let n = this, r = !1; n; n = n._parent) {
  4499. t = n, !r && 3 & n._flags && (r = !0, n._flags & b || (1 & n._flags ? e.push(`[resolved value: ${n._value}]`) : e.push(`[rejected reason: ${n._value}]`)));
  4500. let o = E(n);
  4501. 1024 & n._flags && (o = `~${o}`), e.push(o)
  4502. }
  4503. return e.reverse(), 768 & t._flags || (e[0] = `[Promise]${e[0]}`), e.join("\n")
  4504. }, g.prototype.finally = function (e) {
  4505. function t(t) {
  4506. return t === u ? `.finally(${e})` : (e.call(this), c)
  4507. }
  4508. return z(this.then(t, t), p)
  4509. }, j.prototype = Object.create(Error.prototype, {name: {value: "AbortError"}}), g.CancellationError = j, g.prototype.cancellable = function () {
  4510. return z(this.then(), h)
  4511. }, g.prototype.cancel = function (e) {
  4512. let t;
  4513. for (let e = this; e && !(3 & e._flags); e = e._parent) e._flags & h && (t = e);
  4514. if (t) if (void 0 === e && (e = new j), K(t, !1)) {
  4515. const n = new g;
  4516. R(t), A(n, t), U(n, 0, !1, !1, e)
  4517. } else U(t, t._resolveLevel, !1, !1, e)
  4518. };
  4519. const J = null == (null == m ? void 0 : m.dispatchEvent) ? null : class extends Event {
  4520. constructor(e, t) {
  4521. super(e, {cancelable: !0}), Object.defineProperties(this, {
  4522. promise: {
  4523. value: t.promise,
  4524. enumerable: !0
  4525. }, reason: {value: t.reason, enumerable: !0}
  4526. })
  4527. }
  4528. };
  4529. function B(e, t) {
  4530. if (null != (null == m ? void 0 : m.dispatchEvent)) {
  4531. const n = new J("unhandledrejection", {promise: e, reason: t});
  4532. if (m.dispatchEvent(n), !m.PromiseRejectionEvent && m.onunhandledrejection) try {
  4533. m.onunhandledrejection(n)
  4534. } catch (e) {
  4535. }
  4536. } else "undefined" != typeof process && null != process.emit ? process.emit("unhandledRejection", t, e) : console.error(`StackPromise did not catch ${t}`, e, t)
  4537. }
  4538. function F(e, t, n, r) {
  4539. try {
  4540. e.call(t, n, r)
  4541. } catch (e) {
  4542. r(e)
  4543. }
  4544. }
  4545. function K(e, t) {
  4546. if (!(4 & e._flags)) return t ? e._onFulfilled : e._onRejected
  4547. }
  4548. function q(e, t, n, r) {
  4549. try {
  4550. return r ? e.call(t, n, !0) : e.call(t, n)
  4551. } catch (e) {
  4552. return _ = e, d
  4553. }
  4554. }
  4555. function z(e, t) {
  4556. return e._flags |= t, e
  4557. }
  4558. v = new g, O(v, 0, !0, !1, void 0)
  4559. }, 3274: (e, t, n) => {
  4560. "use strict";
  4561. Object.defineProperty(t, "__esModule", {value: !0}), t.Offline = t.Disconnected = t.BufferTooLargeError = void 0;
  4562. var r = n(6911);
  4563. const o = (0, r.customError)("BufferTooLarge", !1);
  4564. t.BufferTooLargeError = o;
  4565. const i = (0, r.customError)("Disconnected", !1);
  4566. t.Disconnected = i;
  4567. const s = (0, r.customError)("Offline", !1, i);
  4568. t.Offline = s
  4569. }, 4857: (e, t, n) => {
  4570. "use strict";
  4571. Object.defineProperty(t, "__esModule", {value: !0}), t.AckParser = void 0, t.ackMatchesTemplate = function (e, t) {
  4572. return e.id === t.id && (void 0 === t.class || e.class === t.class) && (void 0 === t.type || e.type === t.type) && (void 0 === t.from || i(e.from, t.from)) && (void 0 === t.participant || e.participant === t.participant) && (void 0 === t.ts || e.ts === t.ts)
  4573. }, t.fromJidsAreEqual = i;
  4574. var r = n(4037);
  4575. const o = new (n(8748).WapParser)("ack", (e => (e.assertTag("ack"), {
  4576. id: e.attrString("id"),
  4577. ts: e.maybeAttrString("t"),
  4578. class: e.attrString("class"),
  4579. type: e.maybeAttrString("type"),
  4580. from: e.attrJidWithType(),
  4581. participant: e.hasAttr("participant") ? e.attrDeviceJid("participant") : null
  4582. })));
  4583. function i(e, t) {
  4584. if ((0, r.extractFromJid)(e) === t) return !0;
  4585. if (null != e.userJid) return (0, r.defaultDeviceJidForUser)(e.userJid) === t;
  4586. if (null != e.deviceJid) {
  4587. const {deviceJid: n} = e;
  4588. return 0 === (0, r.extractDeviceId)(n) && (0, r.extractUserJid)(n) === t
  4589. }
  4590. return !1
  4591. }
  4592. t.AckParser = o
  4593. }, 9026: (e, t, n) => {
  4594. "use strict";
  4595. var r = n(346).default, o = n(7914);
  4596. Object.defineProperty(t, "__esModule", {value: !0}), t.DEFAULT_SOCKET_ID = void 0, t.cancelDeadSocketTimer = function () {
  4597. S && S.deadSocketTimer.cancel()
  4598. }, t.castSmaxStanza = I, t.closeSocket = function () {
  4599. const e = U("closeSocket").socket;
  4600. e && (__LOG__(2)`closeSocket called`, e.close())
  4601. }, t.closeSocketAndPreventRetry = function () {
  4602. const e = U("closeSocketAndPreventRetry");
  4603. e.socketLoop.endWithValue(), e.socket && (__LOG__(2)`closeSocketAndPreventRetry called`, e.socket.close())
  4604. }, t.deprecatedCastStanza = function (e) {
  4605. I(e)
  4606. }, t.deprecatedSendIq = function (e, t) {
  4607. return O(e, !1).then((e => (0, _.parseIqResponse)(e, t)))
  4608. }, t.deprecatedSendIqErrorParser = function (e, t, n) {
  4609. return O(e, !1).then((e => (0, _.parseIqResponse)(e, t, n)))
  4610. }, t.deprecatedSendIqIfConnectedWithin = function (e, t, n) {
  4611. return O(e, !1, n).then((e => (0, _.parseIqResponse)(e, t)))
  4612. }, t.deprecatedSendIqWithoutRetry = function (e, t) {
  4613. return O(e, !0).then((e => (0, _.parseIqResponse)(e, t)))
  4614. }, t.deprecatedSendStanzaAndReturnAck = P, t.deprecatedSendStanzaAndWaitForAck = function (e, t) {
  4615. return P(e, t).then((() => {
  4616. }))
  4617. }, t.forceAbortSocketConnection = function () {
  4618. var e;
  4619. const t = U("socketAbortController");
  4620. null === (e = t.socketAbortController) || void 0 === e || e.abort()
  4621. }, t.forceResetSocketLoop = function () {
  4622. U("forceResetSocketLoop").socketLoop.reset()
  4623. }, t.getComms = function () {
  4624. return S
  4625. }, t.isActiveSocket = function (e) {
  4626. return U("castStanza").socketId === e
  4627. }, t.isSocketConnected = T, t.maybeResetSocketLoop = function () {
  4628. T() || U("maybeResetSocketLoop").socketLoop.reset()
  4629. }, t.onStreamErrorReceived = function () {
  4630. U("onStreamErrorReceived").socketLoop.cancelReset()
  4631. }, t.openSocketLoop = A, t.resetStateForTests = function () {
  4632. S = null, E = new h.Resolvable, j = 1
  4633. }, t.sendPing = function () {
  4634. return U("sendPing").sendPing()
  4635. }, t.sendSmaxStanza = function (e, t) {
  4636. var n, r, o;
  4637. const i = null !== (n = null == t ? void 0 : t.withoutRetry) && void 0 !== n && n,
  4638. s = null !== (r = null == t ? void 0 : t.timeoutSeconds) && void 0 !== r ? r : 0,
  4639. a = null !== (o = null == t ? void 0 : t.signal) && void 0 !== o ? o : null;
  4640. return O(e, i, s, a, "smax")
  4641. }, t.singletonOrThrowIfUninitialized = U, t.socketLoopIteration = x, t.startComms = function (e, t, n) {
  4642. if (S) return;
  4643. S = new k(e, t, n), setTimeout(A, 0)
  4644. }, t.startHandlingRequests = function () {
  4645. return U("startHandlingRequests").startHandlingRequests()
  4646. }, t.stopComms = function () {
  4647. const e = U("stopComms");
  4648. e.socketLoop.endWithValue(), e.socket && e.socket.close();
  4649. S = null
  4650. }, t.waitForConnection = function () {
  4651. U("waitForConnection").sendPing(), E || (E = new h.Resolvable);
  4652. return E.promise
  4653. };
  4654. var i = o(n(3982)), s = o(n(1504)), a = n(4857), c = n(3558), l = o(n(2065)), u = n(3274), d = n(5584),
  4655. _ = n(2827), f = n(2521), h = n(1630), p = n(2207), b = n(8494), m = n(1084), g = n(8525), v = n(3263),
  4656. y = n(9987), w = n(780);
  4657. let S = null, E = null, j = 1;
  4658. t.DEFAULT_SOCKET_ID = 0;
  4659. class k {
  4660. constructor(e, t, n) {
  4661. var r, o;
  4662. this.nextSocketId = 1, this.pendingIqs = new Map, this.ackHandlers = [], this.pendingSmaxStanzas = new Map, this._recvBlocker = new h.Resolvable, this.socketAbortController = null, this.activePing = null, this._pending = new Set, this.socketId = 0, this.socket = null, this.softCloseSocket = null, this.handleStanza = (e, t, n) => {
  4663. const r = (0, v.attrString)(e, "id");
  4664. if (r.success && "receipt" !== e.tag) {
  4665. const t = r.value, n = this.pendingSmaxStanzas.get(t);
  4666. if (n) return this.pendingSmaxStanzas.delete(t), n.resolve(e), this.maybeScheduleHealthCheck(), "NO_ACK"
  4667. }
  4668. const o = R(e);
  4669. if (null != o) {
  4670. const t = this.pendingIqs.get(o);
  4671. t ? (this.pendingIqs.delete(o), t.resolve(e), this.maybeScheduleHealthCheck()) : (__LOG__(3)`handleIq no handler for iq with id ${o}`, __LOG__(4, void 0, new Error)`handleIq no handler for iq`)
  4672. } else {
  4673. if ("ack" !== e.tag) return "failure" === e.tag && this.config.shouldBlockReceivingUntilSuccess ? this._handleStanza(e, t, n) : this._recvBlocker.promise.then((() => this._handleStanza(e, t, n)));
  4674. this.handleAck(e)
  4675. }
  4676. return "NO_ACK"
  4677. }, this.healthCheckTimer = new b.ShiftTimer((() => {
  4678. this.socketId && this.sendPing()
  4679. })), this.deadSocketTimer = new b.ShiftTimer((e => {
  4680. __LOG__(2)`Comms: Socket ${e} expired`, e === this.socketId && this.softCloseSocket && this.softCloseSocket()
  4681. })), this.sendPing = (0, s.default)((function* () {
  4682. const e = U("sendPing");
  4683. if (!e.socketId) return __LOG__(2)`sendPing when socket dead`, Promise.resolve();
  4684. if (e.activePing && e.activePing.socketId === e.socketId) return __LOG__(2)`sendPing ping still pending`, Promise.resolve();
  4685. e.activePing && e.activePing.handler.resolve();
  4686. const t = (0, g.makeClientRequest)(), n = t.attrs.id;
  4687. if ("string" != typeof n) return __LOG__(4, void 0, new Error)`No stanzaId in ping request stanza`, Promise.resolve();
  4688. const r = new h.Resolvable;
  4689. e.activePing = {socketId: e.socketId, stanzaId: n, handler: r}, e.callStanza(t);
  4690. const o = yield r.promise;
  4691. if (o) {
  4692. const n = (0, m.parseClientResponseServerResponse)(o, t);
  4693. if (n.success) {
  4694. var i, s;
  4695. const t = (0, y.castToUnixTime)(n.value.t), r = Math.round(Date.now() / 1e3 - t);
  4696. null === (i = (s = e.config.handlers).onClockSkewUpdate) || void 0 === i || i.call(s, r)
  4697. }
  4698. }
  4699. })), this._handleStanza = e, this.onConnectionChange = (0, d.notifyConnectionChangeFactory)(null !== (r = t.handlers.onConnectionChange) && void 0 !== r ? r : () => {
  4700. }, null !== (o = t.handlers.onOptimisticConnectionChange) && void 0 !== o ? o : () => {
  4701. }), this.gzipInflate = n, this.config = t, this.socketLoop = new f.PromiseRetryLoop({
  4702. name: "MainSocketLoop",
  4703. code: x,
  4704. timer: {
  4705. jitter: .1,
  4706. max: t.maxSocketLoopWaitTime,
  4707. algo: {type: "fibonacci", first: 1e4, second: 1e4},
  4708. relativeDelay: !0
  4709. },
  4710. resetDelay: 3e4
  4711. })
  4712. }
  4713. filterPending(e) {
  4714. const t = [];
  4715. function n(n) {
  4716. e(n) && t.push(n)
  4717. }
  4718. return this.pendingIqs.forEach(n), this.ackHandlers.forEach(n), this.pendingSmaxStanzas.forEach(n), t
  4719. }
  4720. sendPendingStanza(e) {
  4721. var t;
  4722. null === (t = e.cleanup) || void 0 === t || t.call(e), e.cleanup = void 0, this.callStanza(e.stanza)
  4723. }
  4724. maybeSendPendingStanza(e) {
  4725. this.socket ? this.sendPendingStanza(e) : __LOG__(2)`Comms has no open socket, will resend stanza when socket opens`
  4726. }
  4727. callStanzaAsync(e) {
  4728. var t = this;
  4729. return (0, s.default)((function* () {
  4730. return yield t.callStanza(e)
  4731. }))()
  4732. }
  4733. callStanza(e) {
  4734. const t = this.castStanza(e);
  4735. return this.deadSocketTimer.onOrBefore(this.config.deadSocketTime, this.socketId), this.healthCheckTimer.cancel(), t
  4736. }
  4737. castStanzaAsync(e) {
  4738. var t = this;
  4739. return (0, s.default)((function* () {
  4740. return yield t.castStanza(e)
  4741. }))()
  4742. }
  4743. castStanza(e) {
  4744. try {
  4745. var t, n;
  4746. const r = null === (t = (n = this.config.handlers).onBeforeCastStanzaForE2E) || void 0 === t ? void 0 : t.call(n, e);
  4747. if (null != r) return __LOG__(4, void 0, new Error)`Dropping stanza since onBeforeCastStanza matched. (This is not expected in a non-E2E build!)`, Array.isArray(r) ? Promise.all(r.map((e => Promise.resolve(this.handleStanza(e, this.socketId, 0))))) : (this.handleStanza(r, this.socketId, 0), Promise.resolve())
  4748. } catch (e) {
  4749. }
  4750. const r = this.socketOrThrow("castStanza");
  4751. try {
  4752. return r.sendFrame((0, w.encodeStanza)(e)).then((() => {
  4753. var t, n;
  4754. null === (t = (n = this.config.handlers).onCastStanza) || void 0 === t || t.call(n, e)
  4755. })).catch((e => {
  4756. if (__LOG__(4, void 0, new Error)`castStanza async error ${e}`, e instanceof u.BufferTooLargeError) return Promise.reject(e)
  4757. }))
  4758. } catch (e) {
  4759. __LOG__(4, void 0, new Error)`castStanza error ${e}`
  4760. }
  4761. return Promise.resolve()
  4762. }
  4763. socketOrThrow(e) {
  4764. const t = this.socket;
  4765. if (t) return t;
  4766. throw(0, l.default)(`Comms.${e} called while no socket`)
  4767. }
  4768. startHandlingRequests() {
  4769. return __LOG__(2)`Comms.startHandlingRequests`, this._recvBlocker.resolve(), this._recvBlocker.promise.then((() => {
  4770. }))
  4771. }
  4772. parseAndHandleStanza(e, t) {
  4773. e === this.socketId && (this.deadSocketTimer.cancel(), E && (E.resolve(), E = null));
  4774. const n = (0, w.decodeStanza)(t, this.gzipInflate).catch((e => {
  4775. throw __LOG__(4, void 0, new Error)`Failure parsing stanza!`, e
  4776. })).then((n => {
  4777. var r, o;
  4778. null === (r = (o = this.config.handlers).onHandleStanza) || void 0 === r || r.call(o, n, e, t.byteLength);
  4779. const i = this.activePing;
  4780. return i && i.socketId === e && i.stanzaId === R(n) ? (this.activePing = null, i.handler.resolve(n), this.maybeScheduleHealthCheck(), "NO_ACK") : this.handleStanza(n, e, t.byteLength)
  4781. })).then((t => {
  4782. if (e === this.socketId) {
  4783. if ("CLOSE_SOCKET" === t) {
  4784. __LOG__(2)`Comms: job response is CLOSE_SOCKET`;
  4785. const e = this.socket;
  4786. e && e.close()
  4787. } else "NO_ACK" === t || this.castStanza(t);
  4788. return "NO_ACK"
  4789. }
  4790. }));
  4791. this._pending.add(n), n.finally((() => {
  4792. this._pending.delete(n)
  4793. }))
  4794. }
  4795. handleAck(e) {
  4796. const t = this.ackHandlers;
  4797. let n = -1, r = null;
  4798. for (; !r && ++n < t.length;) r = t[n].parseAndTest(e);
  4799. if (r) {
  4800. var o, i;
  4801. const s = t[n];
  4802. (0, c.removeIndexWithoutPreservingOrder)(t, n), null === (o = (i = this.config.handlers).onHandleAck) || void 0 === o || o.call(i, e), s.resolve(r), this.maybeScheduleHealthCheck()
  4803. } else __LOG__(3)`handleAck: unrecognized ${e}`
  4804. }
  4805. removeHandler(e) {
  4806. if ("iq" === e.type || "smax" === e.type) {
  4807. const t = e.stanza.attrs.id;
  4808. if (!t || "string" != typeof t) return;
  4809. if ("iq" === e.type && !this.pendingIqs.delete(t) || "smax" === e.type && !this.pendingSmaxStanzas.delete(t)) return
  4810. } else {
  4811. e.type;
  4812. const t = this.ackHandlers.indexOf(e);
  4813. if (-1 === t) return;
  4814. (0, c.removeIndexWithoutPreservingOrder)(this.ackHandlers, t)
  4815. }
  4816. e.resolve(Promise.reject(new u.Disconnected))
  4817. }
  4818. maybeScheduleHealthCheck() {
  4819. if (this.healthCheckTimer.isScheduled()) return;
  4820. if (this.activePing || this.ackHandlers.length || this.pendingIqs.size || this.pendingSmaxStanzas.size) return;
  4821. const e = this.config.healthCheckInterval, t = Math.ceil(1e3 * e * (1 + Math.random()));
  4822. this.healthCheckTimer.onOrBefore(t)
  4823. }
  4824. }
  4825. function A() {
  4826. U("openSocketLoop").socketLoop.start()
  4827. }
  4828. function T() {
  4829. var e;
  4830. return !!(null === (e = S) || void 0 === e ? void 0 : e.socket)
  4831. }
  4832. function x() {
  4833. var e, t, n;
  4834. const o = U("socketLoopIteration");
  4835. o.socketAbortController = new r;
  4836. const i = o.nextSocketId++;
  4837. return __LOG__(2)`Comms: Socket ${i} opening`, null === (e = (t = o.config.handlers).onSocketLoopIteration) || void 0 === e || e.call(t), o.config.openChatSocket((() => {
  4838. o.onConnectionChange("in_handshake")
  4839. }), null === (n = o.socketAbortController) || void 0 === n ? void 0 : n.signal).then((0, p.onResult)((e => {
  4840. var t, n, r, s;
  4841. null === (t = (n = o.config.handlers).onSocketOpen) || void 0 === t || t.call(n);
  4842. const a = new h.Resolvable;
  4843. return __LOG__(2)`Comms: Socket ${i} opened`, o.socketId = i, o.socket = e, o.softCloseSocket = () => {
  4844. o.softCloseSocket = null, o.socket && o.config.shouldCloseStaleSocket && (o.socket.close(), o.socket = null), a.resolve()
  4845. }, o.socketLoop.resetTimeoutAfter(1e4), o.deadSocketTimer.cancel(), o.maybeScheduleHealthCheck(), e.setOnFrame((e => o.parseAndHandleStanza(i, e))), e.setOnClose((() => {
  4846. var e, t;
  4847. __LOG__(2)`Comms: Socket ${i} closed`, o.activePing && i === o.activePing.socketId && (o.activePing.handler.resolve(), o.activePing = null), o.filterPending((e => e.attachedToSocketId === i)).forEach((e => {
  4848. o.removeHandler(e)
  4849. })), i === o.socketId && (o.socketId = 0, o.socket = null, o.onConnectionChange("disconnected"), null === (e = (t = o.config.handlers).onDisconnect) || void 0 === e || e.call(t), a.resolve())
  4850. })), o.onConnectionChange("connected"), null === (r = (s = o.config.handlers).onConnect) || void 0 === r || r.call(s), o.filterPending((e => !e.attachedToSocketId)).sort(((e, t) => e.orderedId - t.orderedId)).forEach((e => {
  4851. switch (e.type) {
  4852. case"smax":
  4853. case"iq":
  4854. o.sendPendingStanza(e);
  4855. break;
  4856. case"ack":
  4857. o.callStanza(e.stanza);
  4858. break;
  4859. default:
  4860. e.type
  4861. }
  4862. })), a.promise
  4863. }))).then((0, p.catchError)((e => {
  4864. switch (e) {
  4865. case"max-hunters":
  4866. __LOG__(3)`socketLoopIteration socket closed while in noise handshake using treasureHunt strategy`;
  4867. break;
  4868. case"disconnected":
  4869. __LOG__(3)`socketLoopIteration socket disconnected while in noise handshake`
  4870. }
  4871. }))).catch((e => {
  4872. e instanceof u.Disconnected ? __LOG__(2)`socketLoopIteration socket closed while in noise handshake` : __LOG__(4, void 0, new Error)`socketLoopIteration failed ${e}`
  4873. }))
  4874. }
  4875. function P(e, t) {
  4876. return new Promise((n => {
  4877. const r = U("deprecatedSendStanzaAndWaitForAck"), o = {
  4878. type: "ack", parseAndTest: e => {
  4879. const n = a.AckParser.parse(e);
  4880. return !n.error && (0, a.ackMatchesTemplate)(n.success, t) ? e : null
  4881. }, resolve: n, stanza: e, attachedToSocketId: 0, orderedId: j++
  4882. };
  4883. r.ackHandlers.push(o), r.socket ? r.callStanza(e).catch((e => {
  4884. const t = r.ackHandlers.indexOf(o);
  4885. -1 !== t && ((0, c.removeIndexWithoutPreservingOrder)(r.ackHandlers, t), o.resolve(Promise.reject(e)))
  4886. })) : __LOG__(2)`Comms has no open socket, will send stanza when socket opens`
  4887. }))
  4888. }
  4889. function I(e) {
  4890. const t = U("castStanza");
  4891. t.socket ? t.castStanza(e) : __LOG__(2)`Comms has no open socket`
  4892. }
  4893. function O(e, t) {
  4894. let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
  4895. r = arguments.length > 3 ? arguments[3] : void 0,
  4896. o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : "iq";
  4897. return new Promise((s => {
  4898. const a = U("sendIq"), c = e.attrs.id;
  4899. if (!c || "string" != typeof c) throw(0, l.default)(`Comms:sendIq given iq without id: ${String(e)}`);
  4900. const d = a.socketId;
  4901. if (t && !d) return void s(Promise.reject(new u.Offline));
  4902. const _ = () => {
  4903. const e = "iq" === o ? a.pendingIqs.get(c) : a.pendingSmaxStanzas.get(c);
  4904. e ? a.removeHandler(e) : s(Promise.reject((0, l.default)(`Comms:_sendIq unexisting stanza to be cancelled: ${c}`)))
  4905. };
  4906. let f = null;
  4907. if (n > 0) {
  4908. const e = setTimeout(_, 1e3 * n);
  4909. f = () => {
  4910. clearTimeout(e)
  4911. }
  4912. }
  4913. if (null != r) {
  4914. if (r.aborted) return void s(Promise.reject(new u.Disconnected));
  4915. r.addEventListener("abort", _), f = () => {
  4916. r.removeEventListener("abort", _)
  4917. }
  4918. }
  4919. const h = {resolve: s, stanza: e, attachedToSocketId: t ? d : 0, orderedId: j++, cleanup: f};
  4920. if ("iq" === o) {
  4921. var p, b;
  4922. const t = (0, i.default)({type: o}, h);
  4923. a.pendingIqs.set(c, t), null === (p = (b = a.config.handlers).onSendIq) || void 0 === p || p.call(b, e), a.maybeSendPendingStanza(t)
  4924. } else {
  4925. const e = (0, i.default)({type: o}, h);
  4926. a.pendingSmaxStanzas.set(c, e), a.maybeSendPendingStanza(e)
  4927. }
  4928. }))
  4929. }
  4930. function U(e) {
  4931. if (S) return S;
  4932. throw(0, l.default)(`Comms::${e} called before startComms`)
  4933. }
  4934. function R(e) {
  4935. if ("iq" === e.tag) {
  4936. const t = e.attrs.type;
  4937. if ("result" === t || "error" === t) return (0, w.decodeAsString)(e.attrs.id) || null
  4938. }
  4939. return null
  4940. }
  4941. }, 5584: (e, t) => {
  4942. "use strict";
  4943. Object.defineProperty(t, "__esModule", {value: !0}), t.notifyConnectionChangeFactory = function (e, t) {
  4944. let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 15e3;
  4945. const r = {timeoutID: null, connectionStatus: "disconnected", optimismLevel: "optimist"}, o = () => {
  4946. const {optimismLevel: e, connectionStatus: o} = r;
  4947. "optimist" === e ? r.timeoutID = setTimeout((() => {
  4948. r.optimismLevel = "realist", t(o)
  4949. }), n) : t(o)
  4950. };
  4951. return n => {
  4952. r.connectionStatus = n, "disconnected" === n || "in_handshake" === n ? o() : (null != r.timeoutID && (clearTimeout(r.timeoutID), r.timeoutID = null), t(n)), e(n)
  4953. }
  4954. }
  4955. }, 6581: (e, t, n) => {
  4956. "use strict";
  4957. var r = n(7914);
  4958. Object.defineProperty(t, "__esModule", {value: !0}), t.XmppParsingFailure = t.ParsableWapNode = void 0;
  4959. var o = n(9323), i = r(n(2065)), s = n(4037), a = n(1330), c = n(8481), l = n(717), u = n(9987), d = n(780),
  4960. _ = n(3486);
  4961. class f extends Error {
  4962. constructor(e, t) {
  4963. super(`XmppParsingFailure: ${e}: ${t}`), this.name = "XmppParsingFailure", this.parser = e, this.reason = t
  4964. }
  4965. toString() {
  4966. return `XmppParsingFailure: ${this.parser}: ${this.reason}`
  4967. }
  4968. }
  4969. t.XmppParsingFailure = f;
  4970. class h extends c.ParsableXmlNode {
  4971. constructor(e, t) {
  4972. super(e, t)
  4973. }
  4974. assertFromServer() {
  4975. const e = this.attrString("from");
  4976. e !== s.WA_SERVER_JID_SUFFIX && this.throw(`to have "from"="s.whatsapp.net", but instead has "${e}"`)
  4977. }
  4978. attrUserJid(e) {
  4979. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  4980. return null == n.userJid ? this.throw(`to have "${e}"={UserJid}, but instead has "${t}"`) : n.userJid
  4981. }
  4982. attrPhoneUserJid(e) {
  4983. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  4984. return "phoneUser" === n.jidType ? n.userJid : this.throw(`to have "${e}"={PhoneUserJid}, but instead has "${t}"`)
  4985. }
  4986. attrLidUserJid(e) {
  4987. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  4988. return "lidUser" === n.jidType ? n.userJid : this.throw(`to have "${e}"={LidUserJid}, but instead has "${t}"`)
  4989. }
  4990. maybeAttrUserJid(e) {
  4991. return this.hasAttr(e) ? this.attrUserJid(e) : null
  4992. }
  4993. maybeAttrPhoneUserJid(e) {
  4994. return this.hasAttr(e) ? this.attrPhoneUserJid(e) : null
  4995. }
  4996. maybeAttrLidUserJid(e) {
  4997. return this.hasAttr(e) ? this.attrLidUserJid(e) : null
  4998. }
  4999. attrGroupJid(e) {
  5000. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  5001. return null == n.groupJid ? this.throw(`to have "${e}"={GroupJid}, but instead has "${t}"`) : n.groupJid
  5002. }
  5003. maybeAttrGroupJid(e) {
  5004. return this.hasAttr(e) ? this.attrGroupJid(e) : null
  5005. }
  5006. attrChatJid(e) {
  5007. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  5008. return null != n.userJid ? n.userJid : null != n.groupJid ? n.groupJid : this.throw(`to have "${e}"={ChatJid}, but instead has "${t}"`)
  5009. }
  5010. attrPhoneChatJid(e) {
  5011. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  5012. return "phoneUser" === n.jidType ? n.userJid : "group" === n.jidType ? n.groupJid : this.throw(`to have "${e}"={ChatJid}, but instead has "${t}"`)
  5013. }
  5014. attrDeviceJid(e) {
  5015. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  5016. return null != n.deviceJid ? n.deviceJid : null != n.userJid ? (0, s.defaultDeviceJidForUser)(n.userJid) : this.throw(`to have "${e}"={DeviceJid}, but instead has "${t}"`)
  5017. }
  5018. attrPhoneDeviceJid(e) {
  5019. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  5020. return "phoneDevice" === n.jidType ? n.deviceJid : "phoneUser" === n.jidType ? (0, s.defaultPhoneDeviceJidForUser)(n.userJid) : this.throw(`to have "${e}"={DeviceJid}, but instead has "${t}"`)
  5021. }
  5022. attrDeviceId(e) {
  5023. const t = this.attrInt(e);
  5024. return (0, s.interpretAsDeviceId)(t)
  5025. }
  5026. attrFromJidChat() {
  5027. const e = this.attrJidWithType();
  5028. switch (e.jidType) {
  5029. case"msgrUser": {
  5030. const t = e.userJid, n = (0, s.defaultDeviceJidForUser)(t);
  5031. return {type: "device", chat: t, deviceJid: n, author: n}
  5032. }
  5033. case"interopUser": {
  5034. const t = e.userJid, n = (0, s.defaultDeviceJidForUser)(t);
  5035. return {type: "device", chat: t, deviceJid: n, author: n}
  5036. }
  5037. case"phoneUser": {
  5038. const t = e.userJid, n = (0, s.defaultDeviceJidForUser)(t);
  5039. return {type: "device", chat: t, deviceJid: n, author: n}
  5040. }
  5041. case"lidUser": {
  5042. const t = e.userJid, n = (0, s.defaultLidDeviceJidForLidUserJid)(t);
  5043. return {type: "device", chat: t, deviceJid: n, author: n}
  5044. }
  5045. case"phoneDevice": {
  5046. const t = e.deviceJid;
  5047. return {type: "device", chat: (0, s.extractUserJid)(t), deviceJid: t, author: t}
  5048. }
  5049. case"msgrDevice": {
  5050. const t = e.deviceJid;
  5051. return {type: "device", chat: (0, s.extractUserJid)(t), deviceJid: t, author: t}
  5052. }
  5053. case"interopDevice": {
  5054. const t = e.deviceJid;
  5055. return {type: "device", chat: (0, s.extractUserJid)(t), deviceJid: t, author: t}
  5056. }
  5057. case"lidDevice": {
  5058. const t = e.deviceJid;
  5059. return {type: "device", chat: (0, s.extractUserJid)(t), deviceJid: t, author: t}
  5060. }
  5061. case"group": {
  5062. const t = this.hasAttr("participant") ? this.attrDeviceJid("participant") : null;
  5063. return null == t ? this.throw("expected to have participant JID for group") : {
  5064. type: "group",
  5065. chat: e.groupJid,
  5066. groupJid: e.groupJid,
  5067. author: t
  5068. }
  5069. }
  5070. case"broadcast": {
  5071. const t = this.hasAttr("participant") ? this.attrDeviceJid("participant") : null;
  5072. return null == t ? this.throw("expected to have participant JID for group") : {
  5073. type: "broadcast",
  5074. broadcastJid: e.broadcastJid,
  5075. chat: (0, s.extractUserJid)(t),
  5076. author: t
  5077. }
  5078. }
  5079. case"call":
  5080. throw __LOG__(4, void 0, new Error)`ParsableWapNode: attrFromJid() is called with ${e.callJid}`, (0, i.default)("ParsableWapNode: attrFromJid() does not support CallJid");
  5081. default:
  5082. return e.jidType, this.throw(`attrFromJidChat should not be used with jid of type ${e.jidType}`)
  5083. }
  5084. }
  5085. attrFromJidPhoneChat() {
  5086. const e = this.attrJidWithType();
  5087. switch (e.jidType) {
  5088. case"phoneUser": {
  5089. const t = e.userJid, n = (0, s.defaultPhoneDeviceJidForUser)(t);
  5090. return {type: "device", chat: t, deviceJid: n, author: n}
  5091. }
  5092. case"phoneDevice": {
  5093. const t = e.deviceJid;
  5094. return {type: "device", chat: (0, s.extractPhoneUserJid)(t), deviceJid: t, author: t}
  5095. }
  5096. case"group": {
  5097. const t = this.hasAttr("participant") ? this.attrPhoneDeviceJid("participant") : null;
  5098. return null == t ? this.throw("expected to have participant JID for group") : {
  5099. type: "group",
  5100. chat: e.groupJid,
  5101. groupJid: e.groupJid,
  5102. author: t
  5103. }
  5104. }
  5105. case"broadcast": {
  5106. const t = this.hasAttr("participant") ? this.attrPhoneDeviceJid("participant") : null;
  5107. return null == t ? this.throw("expected to have participant JID for group") : {
  5108. type: "broadcast",
  5109. broadcastJid: e.broadcastJid,
  5110. chat: (0, s.extractPhoneUserJid)(t),
  5111. author: t
  5112. }
  5113. }
  5114. case"call":
  5115. throw __LOG__(4, void 0, new Error)`ParsableWapNode: attrFromJid() is called with ${e.callJid}`, (0, i.default)("ParsableWapNode: attrFromJid() does not support CallJid");
  5116. default:
  5117. return e.jidType, this.throw(`attrFromJidChat should not be used with jid of type ${e.jidType}`)
  5118. }
  5119. }
  5120. attrFromPhoneJid() {
  5121. if ("status" === this.attrJidWithType().jidType) {
  5122. const e = this.hasAttr("participant") ? this.attrPhoneDeviceJid("participant") : null;
  5123. return null == e ? this.throw("to have participant for status msg") : {
  5124. type: "status",
  5125. author: e
  5126. }
  5127. }
  5128. return this.attrFromJidPhoneChat()
  5129. }
  5130. attrFromJid() {
  5131. const e = this.attrJidWithType();
  5132. if ("status" === e.jidType) {
  5133. const e = this.hasAttr("participant") ? this.attrPhoneDeviceJid("participant") : null;
  5134. return null == e ? this.throw("to have participant for status msg") : {
  5135. type: "status",
  5136. author: e
  5137. }
  5138. }
  5139. return "newsletter" === e.jidType ? {
  5140. type: "newsletter",
  5141. newsletterJid: e.newsletterJid
  5142. } : this.attrFromJidChat()
  5143. }
  5144. attrJidWithType() {
  5145. let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "from";
  5146. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  5147. return "unknown" === n.jidType ? this.throw(`to have "${e}"={Jid}, but instead has "${t}"`) : n
  5148. }
  5149. attrWapJid() {
  5150. let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "from";
  5151. const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
  5152. return "unknown" === n.jidType ? _.WapJid.create(null, t) : (0, d.JID)((0, s.extractFromJid)(n))
  5153. }
  5154. attrLongInt(e) {
  5155. const t = this.attrString(e);
  5156. return (0, a.decimalStringToLongInt)(t)
  5157. }
  5158. attrTime(e) {
  5159. return (0, u.castToUnixTime)(this.attrInt(e))
  5160. }
  5161. attrFutureTime(e) {
  5162. const t = this.attrInt(e);
  5163. return (0, u.futureUnixTime)(t)
  5164. }
  5165. contentString() {
  5166. if (this.hasChildren()) return this.throw("to have string content, but has children instead");
  5167. if (this.hasContent()) {
  5168. const e = new o.Binary(this.contentBytes());
  5169. return e.readString(e.size())
  5170. }
  5171. return this.throw("to have content")
  5172. }
  5173. decodeAsString(e) {
  5174. return (0, d.decodeAsString)(e)
  5175. }
  5176. contentSerializedPubKey() {
  5177. return this.hasContent() ? (0, l.serializeIdentity)(this.contentBytes()) : this.throw("to have content")
  5178. }
  5179. createParseError(e) {
  5180. return new f(this.name(), `expected <${this.tag()}> ${e}`)
  5181. }
  5182. throw(e) {
  5183. throw this.createParseError(e)
  5184. }
  5185. }
  5186. t.ParsableWapNode = h
  5187. }, 2827: (e, t, n) => {
  5188. "use strict";
  5189. Object.defineProperty(t, "__esModule", {value: !0}), t.parseIqResponse = function (e, t, n) {
  5190. const i = e.content;
  5191. if (i && Array.isArray(i) && i[0]) {
  5192. const t = i[0];
  5193. if ("error" === t.tag) {
  5194. const i = t.attrs || {};
  5195. let s;
  5196. n && (s = "function" == typeof n ? n(e) : n.parseOrThrow(t));
  5197. const a = s;
  5198. return {
  5199. success: !1,
  5200. errorCode: parseInt(i.code, 10),
  5201. errorText: (0, r.decodeAsString)(i.text) || "",
  5202. errorType: (0, r.decodeAsString)(i.type) || "",
  5203. errorBackoff: parseInt(i.backoff, 10),
  5204. toString: o,
  5205. customError: a
  5206. }
  5207. }
  5208. }
  5209. return "function" == typeof t ? {success: !0, result: t(e)} : {success: !0, result: t.parseOrThrow(e)}
  5210. };
  5211. var r = n(780);
  5212. function o() {
  5213. return `IqError ${this.errorCode}: ${this.errorText}`
  5214. }
  5215. }, 780: (e, t, n) => {
  5216. "use strict";
  5217. var r = n(7914);
  5218. Object.defineProperty(t, "__esModule", {value: !0}), t.BIG_ENDIAN_CONTENT = function (e) {
  5219. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 4, n = e;
  5220. const r = new Uint8Array(t);
  5221. for (let e = t - 1; e >= 0; e--) r[e] = 255 & n, n >>>= 8;
  5222. return r
  5223. }, t.BROADCAST_JID = function (e) {
  5224. return V(e)
  5225. }, t.CALL_JID = function (e) {
  5226. return V(e)
  5227. }, t.CUSTOM_STRING = function (e) {
  5228. return e
  5229. }, t.DEVICE_JID = function (e) {
  5230. return V(e)
  5231. }, t.DOMAIN_JID = X, t.DROP_ATTR = void 0, t.GROUP_JID = function (e) {
  5232. return V(e)
  5233. }, t.G_US = void 0, t.INT = function (e) {
  5234. return e.toString()
  5235. }, t.JID = V, t.LONG_INT = function (e) {
  5236. return (0, c.longIntToDecimalString)(e)
  5237. }, t.MAYBE_CUSTOM_STRING = function (e) {
  5238. if (null == e) return j;
  5239. return e
  5240. }, t.NEWSLETTER = void 0, t.NEWSLETTER_JID = function (e) {
  5241. return V(e)
  5242. }, t.PARTICIPANT_JID = function (e) {
  5243. return "status" === e.type || "group" === e.type || "broadcast" === e.type ? V(e.author) : j
  5244. }, t.STANZA_ID = function (e) {
  5245. return e
  5246. }, t.S_WHATSAPP_NET = t.STATUS_BROADCAST = void 0, t.TO_JID = function (e) {
  5247. return V(H(e))
  5248. }, t.TO_WAP_JID = function (e) {
  5249. return "phoneDevice" === e.jidType || "msgrDevice" === e.jidType || "lidDevice" === e.jidType ? V(e.deviceJid) : "phoneUser" === e.jidType || "msgrUser" === e.jidType || "lidUser" === e.jidType ? V(e.userJid) : "group" === e.jidType ? V(e.groupJid) : "status" === e.jidType ? V(e.statusJid) : "call" === e.jidType ? V(e.callJid) : "interopDevice" === e.jidType ? V(e.deviceJid) : "interopUser" === e.jidType ? V(e.userJid) : "newsletter" === e.jidType ? V(e.newsletterJid) : (e.jidType, V(e.broadcastJid))
  5250. }, t.USER_JID = function (e) {
  5251. return V(e)
  5252. }, t.WapNode = void 0, t.decodeAsString = function (e) {
  5253. if (e instanceof u.WapJid) return e.toString();
  5254. return e
  5255. }, t.decodeStanza = function (e, t) {
  5256. const n = new i.Binary(e);
  5257. if (2 & n.readUint8()) return __LOG__(2)`Decoding compressed stanza`, t(n.readByteArray()).then((e => z(new i.Binary(e))));
  5258. return Promise.resolve(z(n))
  5259. }, t.decodeStanzaDebug = function (e) {
  5260. const t = new i.Binary(e);
  5261. if (2 & t.readUint8()) throw(0, s.default)("Cannot pass compressed stanza to decodeStanzaDebug");
  5262. return z(t)
  5263. }, t.enableXMLFormat = function () {
  5264. I = !0
  5265. }, t.encodeStanza = function (e) {
  5266. const t = e instanceof O ? e : C(e), n = new i.Binary;
  5267. D(t, n);
  5268. const r = n.readByteArray(), o = new Uint8Array(1 + r.length);
  5269. return o[0] = 0, o.set(r, 1), o
  5270. }, t.extractParticipantJid = function (e) {
  5271. switch (e.type) {
  5272. case"group":
  5273. case"status":
  5274. case"broadcast":
  5275. return e.author;
  5276. default:
  5277. return e.type, null
  5278. }
  5279. }, t.extractToJid = H, t.generateId = function () {
  5280. if (!S) {
  5281. const e = new Uint16Array(2);
  5282. self.crypto.getRandomValues(e), S = `${String(e[0])}.${String(e[1])}-`
  5283. }
  5284. return `${S}${E++}`
  5285. }, t.makeStanza = C, t.makeWapNode = U, t.wap = void 0;
  5286. var o = r(n(7537)), i = n(9323), s = r(n(2065)), a = n(4037), c = n(1330), l = n(4493), u = n(3486),
  5287. d = r(n(8132)), _ = n(3260);
  5288. const f = a.MSGR_USER_DOMAIN.replace("@", ""), h = a.WA_USER_DOMAIN.replace("@", ""),
  5289. p = a.LID_DOMAIN.replace("@", ""), b = a.INTEROP_DOMAIN.replace("@", ""), m = [236, 237, 238, 239],
  5290. g = 248, v = 249, y = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", ".", "�", "�", "�", "�"],
  5291. w = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
  5292. let S = "", E = 1;
  5293. const j = {sentinel: "DROP_ATTR"};
  5294. t.DROP_ATTR = j;
  5295. const k = u.WapJid.create(null, "g.us");
  5296. t.G_US = k;
  5297. const A = u.WapJid.create(null, a.WA_SERVER_JID_SUFFIX);
  5298. t.S_WHATSAPP_NET = A;
  5299. const T = u.WapJid.create("status", "broadcast");
  5300. t.STATUS_BROADCAST = T;
  5301. const x = u.WapJid.create(null, "newsletter");
  5302. t.NEWSLETTER = x;
  5303. const P = {};
  5304. let I = !1;
  5305. class O {
  5306. constructor(e) {
  5307. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : P,
  5308. n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
  5309. this.tag = e, this.attrs = t, this.content = n
  5310. }
  5311. toString() {
  5312. let e = "<" + this.tag;
  5313. e += (0, _.attrsToString)(this.attrs);
  5314. const t = this.content;
  5315. return Array.isArray(t) ? e += `>${t.map(String).join("")}</${this.tag}>` : e += t ? `>${(0, _.uint8ArrayToDebugString)(t)}</${this.tag}>` : " />", I && (e = (0, d.default)(e)), e
  5316. }
  5317. }
  5318. function U(e, t, n) {
  5319. let r = null;
  5320. if (t && null != t.children) throw(0, s.default)('Children should not be passed via props (see eslint check "react/no-children-props")');
  5321. if (Array.isArray(n)) r = n.filter(Boolean); else if ("string" == typeof n) r = i.Binary.build(n).readByteArray(); else if (n instanceof ArrayBuffer) r = new Uint8Array(n); else if (n instanceof Uint8Array) r = n; else {
  5322. const e = [];
  5323. for (let t = 2; t < arguments.length; t++) {
  5324. const n = arguments[t];
  5325. n && e.push(n)
  5326. }
  5327. r = e
  5328. }
  5329. Array.isArray(r) && 0 === r.length && (r = null);
  5330. const o = {};
  5331. if (t) {
  5332. const n = t;
  5333. Object.keys(n).forEach((t => {
  5334. if (["__self", "__source"].includes(t)) return;
  5335. const r = n[t];
  5336. if (null == r) throw(0, s.default)(`Attr ${t} in <${e}> is null`);
  5337. r !== j && (o[t] = r)
  5338. }))
  5339. }
  5340. return new O(e, o, r)
  5341. }
  5342. t.WapNode = O;
  5343. const R = U;
  5344. function C(e) {
  5345. let t = e.content;
  5346. return Array.isArray(t) ? t = t.map(C) : "string" == typeof t && (t = i.Binary.build(t).readByteArray()), new O(e.tag, e.attrs || P, t)
  5347. }
  5348. function D(e, t) {
  5349. if (null == e) t.writeUint8(0); else if (e instanceof O) M(e, t); else if (e instanceof u.WapJid) !function (e, t) {
  5350. const n = e.getInnerJid();
  5351. if (n.type === u.WAP_JID_SUBTYPE.JID_U) {
  5352. const {user: e, device: r, domainType: o} = n;
  5353. t.writeUint8(247), t.writeUint8(o), t.writeUint8(r), D(e, t)
  5354. } else if (n.type === u.WAP_JID_SUBTYPE.JID_FB) {
  5355. const {user: e, device: r} = n;
  5356. t.writeUint8(246), D(e, t), t.writeUint16(r), D(h, t)
  5357. } else if (n.type === u.WAP_JID_SUBTYPE.JID_INTEROP) {
  5358. const {user: e, device: r, integrator: o} = n;
  5359. t.writeUint8(245), D(e, t), t.writeUint16(r), t.writeUint16(o), D(h, t)
  5360. } else {
  5361. const {user: e, server: r} = n;
  5362. t.writeUint8(250), null != e ? D(e, t) : t.writeUint8(0), D(r, t)
  5363. }
  5364. }(e, t); else if ("string" == typeof e) J(e, t); else {
  5365. if (!(e instanceof Uint8Array)) throw(0, s.default)("Invalid payload type " + typeof e);
  5366. !function (e, t) {
  5367. F(e.length, t), t.writeByteArray(e)
  5368. }(e, t)
  5369. }
  5370. }
  5371. function M(e, t) {
  5372. if (void 0 === e.tag) return t.writeUint8(g), void t.writeUint8(0);
  5373. let n = 1;
  5374. e.attrs && (n += 2 * Object.keys(e.attrs).length), e.content && n++, n < 256 ? (t.writeUint8(g), t.writeUint8(n)) : n < 65536 && (t.writeUint8(v), t.writeUint16(n)), D(e.tag, t), e.attrs && Object.keys(e.attrs).forEach((n => {
  5375. J(n, t), D(e.attrs[n], t)
  5376. }));
  5377. const r = e.content;
  5378. if (Array.isArray(r)) {
  5379. r.length < 256 ? (t.writeUint8(g), t.writeUint8(r.length)) : r.length < 65536 && (t.writeUint8(v), t.writeUint16(r.length));
  5380. for (let e = 0; e < r.length; e++) M(r[e], t)
  5381. } else r && D(r, t)
  5382. }
  5383. let $, L;
  5384. function N(e) {
  5385. const t = new Map;
  5386. for (let n = 0; n < e.length; n++) t.set(e[n], n);
  5387. return t
  5388. }
  5389. function J(e, t) {
  5390. if ("" === e) return t.writeUint8(252), void t.writeUint8(0);
  5391. null == $ && ($ = N(l.SINGLE_BYTE_TOKEN));
  5392. const n = $.get(e);
  5393. if (null != n) return void t.writeUint8(n + 1);
  5394. if (null == L) {
  5395. L = [];
  5396. for (let e = 0; e < l.DICTIONARIES.length; ++e) L.push(N(l.DICTIONARIES[e]))
  5397. }
  5398. for (let n = 0; n < L.length; ++n) {
  5399. const r = L[n].get(e);
  5400. if (null != r) return t.writeUint8(m[n]), void t.writeUint8(r)
  5401. }
  5402. const r = (0, i.numUtf8Bytes)(e);
  5403. if (r < 128) {
  5404. if (!/[^0-9.-]+?/.exec(e)) return void B(e, 255, t);
  5405. if (!/[^0-9A-F]+?/.exec(e)) return void B(e, 251, t)
  5406. }
  5407. F(r, t), t.writeString(e)
  5408. }
  5409. function B(e, t, n) {
  5410. const r = e.length % 2 == 1;
  5411. n.writeUint8(t);
  5412. let o = Math.ceil(e.length / 2);
  5413. r && (o |= 128), n.writeUint8(o);
  5414. let i = 0;
  5415. for (let r = 0; r < e.length; r++) {
  5416. const o = e.charCodeAt(r);
  5417. let a = null;
  5418. if (48 <= o && o <= 57 ? a = o - 48 : 255 === t ? 45 === o ? a = 10 : 46 === o && (a = 11) : 251 === t && 65 <= o && o <= 70 && (a = o - 55), null == a) throw(0, s.default)(`Cannot nibble encode ${o}`);
  5419. r % 2 == 0 ? (i = a << 4, r === e.length - 1 && (i |= 15, n.writeUint8(i))) : (i |= a, n.writeUint8(i))
  5420. }
  5421. }
  5422. function F(e, t) {
  5423. if (e < 256) t.writeUint8(252), t.writeUint8(e); else if (e < 1048576) t.writeUint8(253), t.writeUint8(e >>> 16 & 255), t.writeUint8(e >>> 8 & 255), t.writeUint8(255 & e); else {
  5424. if (!(e < 4294967296)) throw(0, s.default)(`Binary with length ${e} is too big for WAP protocol`);
  5425. t.writeUint8(254), t.writeUint32(e)
  5426. }
  5427. }
  5428. function K(e, t) {
  5429. const n = e.readUint8();
  5430. if (0 === n) return null;
  5431. if (n === g) return q(e, e.readUint8());
  5432. if (n === v) return q(e, e.readUint16());
  5433. if (252 === n) {
  5434. const n = e.readUint8();
  5435. return G(e, n, t)
  5436. }
  5437. if (253 === n) {
  5438. const n = e.readUint8(), r = e.readUint8(), o = e.readUint8();
  5439. return G(e, ((15 & n) << 16) + (r << 8) + o, t)
  5440. }
  5441. if (254 === n) {
  5442. const n = e.readUint32();
  5443. return G(e, n, t)
  5444. }
  5445. if (250 === n) return function (e) {
  5446. const t = function (e) {
  5447. const t = K(e, !0);
  5448. if (null != t && "string" != typeof t) throw(0, s.default)("WAWap:decodeNullableString got invalid value, string expected");
  5449. return t
  5450. }(e), n = W(e);
  5451. return u.WapJid.create(t, n)
  5452. }(e);
  5453. if (246 === n) return function (e) {
  5454. const t = W(e), n = e.readUint16();
  5455. return W(e), u.WapJid.createFbJid(t, n)
  5456. }(e);
  5457. if (245 === n) return function (e) {
  5458. const t = W(e), n = e.readUint16(), r = e.readUint16();
  5459. return W(e), u.WapJid.createInteropJid(t, n, r)
  5460. }(e);
  5461. if (247 === n) return function (e) {
  5462. let t = null;
  5463. const n = e.readUint8();
  5464. if (0 === n) t = u.DomainType.WHATSAPP; else {
  5465. if (1 !== n) throw(0, s.default)(`decodeJidU - Invalid domain type encoding ${n}`);
  5466. t = u.DomainType.LID
  5467. }
  5468. const r = e.readUint8(), o = W(e);
  5469. return u.WapJid.createJidU(o, t, r)
  5470. }(e);
  5471. if (255 === n) {
  5472. const t = e.readUint8();
  5473. return Y(e, y, t >>> 7, 127 & t)
  5474. }
  5475. if (251 === n) {
  5476. const t = e.readUint8();
  5477. return Y(e, w, t >>> 7, 127 & t)
  5478. }
  5479. if (n <= 0 || n >= 240) throw(0, s.default)("Unable to decode WAP buffer");
  5480. if (n >= 236 && n <= 239) {
  5481. const t = n - 236, r = l.DICTIONARIES[t];
  5482. if (void 0 === r) throw(0, s.default)(`Missing WAP dictionary ${t}`);
  5483. const o = e.readUint8(), i = r[o];
  5484. if (void 0 === i) throw(0, s.default)(`Invalid value index ${o} in dict ${t}`);
  5485. return i
  5486. }
  5487. const r = l.SINGLE_BYTE_TOKEN[n - 1];
  5488. if (void 0 === r) throw(0, s.default)(`Undefined token with index ${n}`);
  5489. return r
  5490. }
  5491. function q(e, t) {
  5492. const n = [];
  5493. for (let r = 0; r < t; r++) n.push(z(e));
  5494. return n
  5495. }
  5496. function z(e) {
  5497. const t = e.readUint8();
  5498. let n, r;
  5499. if (t === g) n = e.readUint8(); else {
  5500. if (t !== v) throw(0, s.default)(`Failed to decode node since type byte ${String(t)} is invalid`);
  5501. n = e.readUint16()
  5502. }
  5503. let o = null;
  5504. if (0 === n) throw(0, s.default)("Failed to decode node, list cannot be empty");
  5505. const i = W(e);
  5506. for (n -= 1; n > 1;) {
  5507. r || (r = {});
  5508. const t = W(e), o = K(e, !0);
  5509. r[t] = o, n -= 2
  5510. }
  5511. return 1 === n && (o = K(e, !1), o instanceof u.WapJid && (o = String(o))), new O(i, r, o)
  5512. }
  5513. function W(e) {
  5514. const t = K(e, !0);
  5515. if ("string" != typeof t) throw(0, s.default)("WAWap:decodeString got invalid value, string expected");
  5516. return t
  5517. }
  5518. function G(e, t) {
  5519. let n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
  5520. return n ? e.readString(t) : e.readByteArray(t)
  5521. }
  5522. function Y(e, t, n, r) {
  5523. const o = new Array(2 * r - n);
  5524. for (let n = 0; n < o.length - 1; n += 2) {
  5525. const r = e.readUint8();
  5526. o[n] = t[r >>> 4], o[n + 1] = t[15 & r]
  5527. }
  5528. if (n) {
  5529. const n = e.readUint8();
  5530. o[o.length - 1] = t[n >>> 4]
  5531. }
  5532. return o.join("")
  5533. }
  5534. function H(e) {
  5535. switch (e.type) {
  5536. case"group":
  5537. return e.groupJid;
  5538. case"status":
  5539. return a.STATUS_JID;
  5540. case"device":
  5541. return e.deviceJid;
  5542. case"newsletter":
  5543. return e.newsletterJid;
  5544. default:
  5545. return e.type, e.broadcastJid
  5546. }
  5547. }
  5548. function V(e) {
  5549. const t = (0, a.validateDomainJid)(e);
  5550. if (null != t) return X(t);
  5551. const n = e.split("@");
  5552. let r = n[0];
  5553. const o = n[1];
  5554. let i = null, s = null;
  5555. if (o !== h && o !== f && o !== b && o !== p || -1 !== r.indexOf(":") && ([r, i] = r.split(":"), s = parseInt(i, 10)), o === b) {
  5556. const [e, t] = r.split("-");
  5557. return u.WapJid.createInteropJid(t, s, parseInt(e, 10))
  5558. }
  5559. if (o === f) return u.WapJid.createFbJid(r, s);
  5560. const c = o === p ? u.DomainType.LID : u.DomainType.WHATSAPP;
  5561. return null != s && 0 !== s ? u.WapJid.createJidU(r, c, s) : u.WapJid.create(r, o)
  5562. }
  5563. function X(e) {
  5564. return "s.whatsapp.net" === e ? A : "g.us" === e ? k : "newsletter" === e ? x : (0, o.default)(e)
  5565. }
  5566. t.wap = R
  5567. }, 3486: (e, t, n) => {
  5568. "use strict";
  5569. Object.defineProperty(t, "__esModule", {value: !0}), t.WapJid = t.WAP_JID_SUBTYPE = t.DomainType = void 0;
  5570. var r = n(4037);
  5571. const o = {JID: 0, JID_U: 1, JID_AD: 1, JID_FB: 3, JID_INTEROP: 4};
  5572. t.WAP_JID_SUBTYPE = o;
  5573. const i = n(4302)({WHATSAPP: 0, LID: 1});
  5574. t.DomainType = i;
  5575. class s {
  5576. constructor(e) {
  5577. this._jid = e
  5578. }
  5579. static createAD(e, t, n) {
  5580. return new s({
  5581. type: o.JID_AD,
  5582. user: e,
  5583. device: null == n ? 0 : n,
  5584. agent: null == t ? 0 : t,
  5585. domainType: i.WHATSAPP
  5586. })
  5587. }
  5588. static createJidU(e, t, n) {
  5589. return new s({
  5590. type: o.JID_U,
  5591. user: e,
  5592. device: null == n ? 0 : n,
  5593. domainType: null == t ? i.WHATSAPP : t
  5594. })
  5595. }
  5596. static createFbJid(e, t) {
  5597. return new s({type: o.JID_FB, user: e, device: null == t ? 0 : t})
  5598. }
  5599. static createInteropJid(e, t, n) {
  5600. return new s({type: o.JID_INTEROP, user: e, device: null == t ? 0 : t, integrator: n})
  5601. }
  5602. static create(e, t) {
  5603. return new s({type: o.JID, user: e, server: t})
  5604. }
  5605. toString() {
  5606. if (this._jid.type === o.JID_AD || this._jid.type === o.JID_U) {
  5607. const {user: e, device: t, domainType: n} = this._jid,
  5608. o = n === i.WHATSAPP ? r.WA_USER_JID_SUFFIX : r.LID_SUFFIX;
  5609. return 0 === t ? `${e}@${o}` : `${e}:${t}@${o}`
  5610. }
  5611. if (this._jid.type === o.JID_FB) {
  5612. const {user: e, device: t} = this._jid;
  5613. return `${e}:${t}@${r.MSGR_USER_JID_SUFFIX}`
  5614. }
  5615. if (this._jid.type === o.JID_INTEROP) {
  5616. const {user: e, device: t, integrator: n} = this._jid;
  5617. return `${n}-${e}:${t}@${r.INTEROP_USER_JID_SUFFIX}`
  5618. }
  5619. {
  5620. this._jid.type;
  5621. const {user: e, server: t} = this._jid;
  5622. return null != e ? `${e}@${t}` : t
  5623. }
  5624. }
  5625. getInnerJid() {
  5626. return this._jid
  5627. }
  5628. }
  5629. t.WapJid = s
  5630. }, 8748: (e, t, n) => {
  5631. "use strict";
  5632. var r = n(7914);
  5633. Object.defineProperty(t, "__esModule", {value: !0}), t.WapParser = void 0;
  5634. var o = r(n(2065)), i = n(6581);
  5635. t.WapParser = class {
  5636. constructor(e, t) {
  5637. this._name = e, this._parser = t
  5638. }
  5639. parse(e) {
  5640. const t = new i.ParsableWapNode(this._name, e);
  5641. try {
  5642. return {success: this._parser(t)}
  5643. } catch (e) {
  5644. if (e instanceof i.XmppParsingFailure) return {error: e};
  5645. throw e
  5646. }
  5647. }
  5648. parseOrThrow(e) {
  5649. const t = this.parse(e);
  5650. if (t.error) throw(0, o.default)(String(t.error));
  5651. return t.success
  5652. }
  5653. }
  5654. }, 3417: (e, t) => {
  5655. "use strict";
  5656. Object.defineProperty(t, "__esModule", {value: !0}), t.toStanzaId = function (e) {
  5657. return e
  5658. }
  5659. }, 8397: (e, t, n) => {
  5660. "use strict";
  5661. var r = n(7914);
  5662. Object.defineProperty(t, "__esModule", {value: !0}), t.expand = c, t.extractAndExpand = function (e, t, n) {
  5663. return (0, i.extractSha256)(null, e).then((e => c(new Uint8Array(e), t, n)))
  5664. }, t.extractWithSaltAndExpand = function (e, t, n, r) {
  5665. return (0, i.extractSha256)(t, e).then((e => c(new Uint8Array(e), n, r)))
  5666. };
  5667. var o = n(9323), i = n(3155), s = r(n(2065));
  5668. const a = 255 * i.SHA256_BYTE_LENGTH;
  5669. function c(e, t, n) {
  5670. if (n < 0 || n > a) return Promise.reject((0, s.default)(`HKDF::expand given bad length ${n}`));
  5671. let r;
  5672. const c = Math.ceil(n / i.SHA256_BYTE_LENGTH), l = o.Binary.build(t).readByteArray(), u = new o.Binary;
  5673. let d = (0, i.encodeKeySha256)(e).then((e => (r = e, new Uint8Array(0))));
  5674. for (let e = 1; e <= c; e++) d = d.then((t => (0, i.sign)(r, o.Binary.build(t, l, e).readByteArray()))).then((e => {
  5675. const t = new Uint8Array(e);
  5676. return u.writeByteArray(t), t
  5677. }));
  5678. return d.then((() => u.readBuffer(n)))
  5679. }
  5680. }, 3155: (e, t, n) => {
  5681. "use strict";
  5682. Object.defineProperty(t, "__esModule", {value: !0}), t.SHA256_BYTE_LENGTH = t.DEFAULT_SALT = void 0, t.encodeKeySha256 = function (e) {
  5683. return c(i, e)
  5684. }, t.extractSha256 = function (e, t) {
  5685. return c(i, null != e ? e : o).then((e => l(e, t)))
  5686. }, t.hmacSha1 = function (e, t, n) {
  5687. return c(a, e).then((e => l(e, t, n)))
  5688. }, t.hmacSha256 = function (e, t, n) {
  5689. return c(i, e).then((e => l(e, t, n)))
  5690. }, t.hmacSha512 = function (e, t, n) {
  5691. return c(s, e).then((e => l(e, t, n)))
  5692. }, t.sign = l;
  5693. var r = n(29);
  5694. t.SHA256_BYTE_LENGTH = 32;
  5695. const o = new Uint8Array(32);
  5696. t.DEFAULT_SALT = o;
  5697. const i = {name: "HMAC", hash: "SHA-256"}, s = {name: "HMAC", hash: "SHA-512"},
  5698. a = {name: "HMAC", hash: "SHA-1"};
  5699. function c(e, t) {
  5700. const n = (0, r.castTypedArrays)(Uint8Array, t);
  5701. return self.crypto.subtle.importKey("raw", n, e, !1, ["sign"]).then((t => ({key: t, algo: e})))
  5702. }
  5703. function l(e, t, n) {
  5704. let {key: r, algo: o} = e;
  5705. return self.crypto.subtle.sign(o, r, t).then((e => null != n && 0 !== n ? e.slice(0, n) : e))
  5706. }
  5707. }, 3596: (e, t, n) => {
  5708. "use strict";
  5709. Object.defineProperty(t, "__esModule", {value: !0}), Object.defineProperty(t, "hash", {
  5710. enumerable: !0,
  5711. get: function () {
  5712. return r.hash
  5713. }
  5714. }), t.lowlevel = t.keypairFromSecretKey = t.keyPair = void 0, Object.defineProperty(t, "scalarMult", {
  5715. enumerable: !0,
  5716. get: function () {
  5717. return r.scalarMult
  5718. }
  5719. }), t.signDetachedVerify = void 0, Object.defineProperty(t, "verify", {
  5720. enumerable: !0, get: function () {
  5721. return r.verify
  5722. }
  5723. });
  5724. var r = n(4462);
  5725. const o = {
  5726. scalarbase: r.lowlevel.scalarbase,
  5727. crypto_hash: r.lowlevel.crypto_hash,
  5728. modL: r.lowlevel.modL,
  5729. pack25519: r.lowlevel.pack25519,
  5730. S: r.lowlevel.S,
  5731. M: r.lowlevel.M,
  5732. A: r.lowlevel.A,
  5733. Z: r.lowlevel.Z,
  5734. D: r.lowlevel.D,
  5735. unpack25519: r.lowlevel.unpack25519,
  5736. pow2523: r.lowlevel.pow2523,
  5737. crypto_verify_32: r.lowlevel.crypto_verify_32,
  5738. set25519: r.lowlevel.set25519,
  5739. add: r.lowlevel.add,
  5740. scalarmult: r.lowlevel.scalarmult
  5741. };
  5742. t.lowlevel = o;
  5743. const i = r.box.keyPair.fromSecretKey;
  5744. t.keypairFromSecretKey = i;
  5745. const s = r.box.keyPair;
  5746. t.keyPair = s;
  5747. const a = r.sign.detached.verify;
  5748. t.signDetachedVerify = a
  5749. }, 9093: (e, t, n) => {
  5750. "use strict";
  5751. var r = n(7914);
  5752. Object.defineProperty(t, "__esModule", {value: !0}), t.arrayBuffersEqual = function (e, t) {
  5753. return s(new Uint8Array(e), new Uint8Array(t))
  5754. }, t.randomNumberLessThan = function (e) {
  5755. if (e !== (0 | e)) throw(0, i.default)("bound must be int32");
  5756. if (e <= 0) throw(0, i.default)("bound must not be positive");
  5757. const t = new Int32Array(1), n = e * Math.floor((-1 >>> 1) / e);
  5758. let r = -1;
  5759. for (; -1 === r;) {
  5760. self.crypto.getRandomValues(t);
  5761. const o = t[0] >>> 1;
  5762. o < n && (r = o % e)
  5763. }
  5764. return r
  5765. }, t.rawKeysEqual = function (e, t) {
  5766. return 0 === e.length && 0 === t.length || (0, o.verify)(e, t)
  5767. }, t.serializedPubKeysEqual = function (e, t) {
  5768. return 0 === e.length && 0 === t.length || (0, o.verify)(e, t)
  5769. }, t.uint8ArraysEqual = s;
  5770. var o = n(3596), i = r(n(2065));
  5771. function s(e, t) {
  5772. return 0 === e.length && 0 === t.length || (0, o.verify)(e, t)
  5773. }
  5774. }, 479: (e, t, n) => {
  5775. "use strict";
  5776. var r = n(7914);
  5777. Object.defineProperty(t, "__esModule", {value: !0}), t.SignedPreKeyRecordStructureSpec = t.SessionStructureSpec = t.SessionStructure$PendingPreKeySpec = t.SessionStructure$PendingKeyExchangeSpec = t.SessionStructure$ChainSpec = t.SessionStructure$Chain$MessageKeySpec = t.SessionStructure$Chain$ChainKeySpec = t.SenderKeyStateStructureSpec = t.SenderKeyStateStructure$SenderSigningKeySpec = t.SenderKeyStateStructure$SenderMessageKeySpec = t.SenderKeyStateStructure$SenderChainKeySpec = t.SenderKeyRecordStructureSpec = t.RecordStructureSpec = t.PreKeyRecordStructureSpec = t.IdentityKeyPairStructureSpec = void 0;
  5778. var o = r(n(3982)), i = n(6154);
  5779. const s = (0, o.default)({}, null);
  5780. t.SessionStructureSpec = s;
  5781. const a = (0, o.default)({}, null);
  5782. t.SessionStructure$PendingPreKeySpec = a;
  5783. const c = (0, o.default)({}, null);
  5784. t.SessionStructure$PendingKeyExchangeSpec = c;
  5785. const l = (0, o.default)({}, null);
  5786. t.SessionStructure$ChainSpec = l;
  5787. const u = (0, o.default)({}, null);
  5788. t.SessionStructure$Chain$MessageKeySpec = u;
  5789. const d = (0, o.default)({}, null);
  5790. t.SessionStructure$Chain$ChainKeySpec = d;
  5791. const _ = (0, o.default)({}, null);
  5792. t.RecordStructureSpec = _;
  5793. const f = (0, o.default)({}, null);
  5794. t.PreKeyRecordStructureSpec = f;
  5795. const h = (0, o.default)({}, null);
  5796. t.SignedPreKeyRecordStructureSpec = h;
  5797. const p = (0, o.default)({}, null);
  5798. t.IdentityKeyPairStructureSpec = p;
  5799. const b = (0, o.default)({}, null);
  5800. t.SenderKeyStateStructureSpec = b;
  5801. const m = (0, o.default)({}, null);
  5802. t.SenderKeyStateStructure$SenderSigningKeySpec = m;
  5803. const g = (0, o.default)({}, null);
  5804. t.SenderKeyStateStructure$SenderMessageKeySpec = g;
  5805. const v = (0, o.default)({}, null);
  5806. t.SenderKeyStateStructure$SenderChainKeySpec = v;
  5807. const y = (0, o.default)({}, null);
  5808. t.SenderKeyRecordStructureSpec = y, s.internalSpec = {
  5809. sessionVersion: [1, i.TYPES.UINT32],
  5810. localIdentityPublic: [2, i.TYPES.BYTES],
  5811. remoteIdentityPublic: [3, i.TYPES.BYTES],
  5812. rootKey: [4, i.TYPES.BYTES],
  5813. previousCounter: [5, i.TYPES.UINT32],
  5814. senderChain: [6, i.TYPES.MESSAGE, l],
  5815. receiverChains: [7, i.FLAGS.REPEATED | i.TYPES.MESSAGE, l],
  5816. pendingKeyExchange: [8, i.TYPES.MESSAGE, c],
  5817. pendingPreKey: [9, i.TYPES.MESSAGE, a],
  5818. remoteRegistrationId: [10, i.TYPES.UINT32],
  5819. localRegistrationId: [11, i.TYPES.UINT32],
  5820. needsRefresh: [12, i.TYPES.BOOL],
  5821. aliceBaseKey: [13, i.TYPES.BYTES]
  5822. }, a.internalSpec = {
  5823. preKeyId: [1, i.TYPES.UINT32],
  5824. signedPreKeyId: [3, i.TYPES.INT32],
  5825. baseKey: [2, i.TYPES.BYTES]
  5826. }, c.internalSpec = {
  5827. sequence: [1, i.TYPES.UINT32],
  5828. localBaseKey: [2, i.TYPES.BYTES],
  5829. localBaseKeyPrivate: [3, i.TYPES.BYTES],
  5830. localRatchetKey: [4, i.TYPES.BYTES],
  5831. localRatchetKeyPrivate: [5, i.TYPES.BYTES],
  5832. localIdentityKey: [7, i.TYPES.BYTES],
  5833. localIdentityKeyPrivate: [8, i.TYPES.BYTES]
  5834. }, l.internalSpec = {
  5835. senderRatchetKey: [1, i.TYPES.BYTES],
  5836. senderRatchetKeyPrivate: [2, i.TYPES.BYTES],
  5837. chainKey: [3, i.TYPES.MESSAGE, d],
  5838. messageKeys: [4, i.FLAGS.REPEATED | i.TYPES.MESSAGE, u]
  5839. }, u.internalSpec = {
  5840. index: [1, i.TYPES.UINT32],
  5841. cipherKey: [2, i.TYPES.BYTES],
  5842. macKey: [3, i.TYPES.BYTES],
  5843. iv: [4, i.TYPES.BYTES]
  5844. }, d.internalSpec = {
  5845. index: [1, i.TYPES.UINT32],
  5846. key: [2, i.TYPES.BYTES]
  5847. }, _.internalSpec = {
  5848. currentSession: [1, i.TYPES.MESSAGE, s],
  5849. previousSessions: [2, i.FLAGS.REPEATED | i.TYPES.MESSAGE, s]
  5850. }, f.internalSpec = {
  5851. id: [1, i.TYPES.UINT32],
  5852. publicKey: [2, i.TYPES.BYTES],
  5853. privateKey: [3, i.TYPES.BYTES]
  5854. }, h.internalSpec = {
  5855. id: [1, i.TYPES.UINT32],
  5856. publicKey: [2, i.TYPES.BYTES],
  5857. privateKey: [3, i.TYPES.BYTES],
  5858. signature: [4, i.TYPES.BYTES],
  5859. timestamp: [5, i.TYPES.FIXED64]
  5860. }, p.internalSpec = {
  5861. publicKey: [1, i.TYPES.BYTES],
  5862. privateKey: [2, i.TYPES.BYTES]
  5863. }, b.internalSpec = {
  5864. senderKeyId: [1, i.TYPES.UINT32],
  5865. senderChainKey: [2, i.TYPES.MESSAGE, v],
  5866. senderSigningKey: [3, i.TYPES.MESSAGE, m],
  5867. senderMessageKeys: [4, i.FLAGS.REPEATED | i.TYPES.MESSAGE, g]
  5868. }, m.internalSpec = {
  5869. public: [1, i.TYPES.BYTES],
  5870. private: [2, i.TYPES.BYTES]
  5871. }, g.internalSpec = {
  5872. iteration: [1, i.TYPES.UINT32],
  5873. seed: [2, i.TYPES.BYTES]
  5874. }, v.internalSpec = {
  5875. iteration: [1, i.TYPES.UINT32],
  5876. seed: [2, i.TYPES.BYTES]
  5877. }, y.internalSpec = {senderKeyStates: [1, i.FLAGS.REPEATED | i.TYPES.MESSAGE, b]}
  5878. }, 2560: (e, t, n) => {
  5879. "use strict";
  5880. Object.defineProperty(t, "__esModule", {value: !0}), t.AbortError = t.ABORT_ERROR = void 0, t.catchAbort = function (e) {
  5881. return t => {
  5882. if (t.name === i) return e(t);
  5883. throw t
  5884. }
  5885. };
  5886. var r = n(6911);
  5887. class o extends ((0, r.customError)("AbortError")) {
  5888. }
  5889. t.AbortError = o;
  5890. const i = "AbortError";
  5891. t.ABORT_ERROR = i
  5892. }, 9959: (e, t, n) => {
  5893. "use strict";
  5894. var r = n(7914);
  5895. Object.defineProperty(t, "__esModule", {value: !0}), t.createPromiseTimer = function (e) {
  5896. const t = i(e);
  5897. return function (e) {
  5898. return new Promise((n => {
  5899. const r = t();
  5900. r > 0 ? setTimeout(n, r, e) : n(e)
  5901. }))
  5902. }
  5903. }, t.createTimer = i, t.getDelay = function (e, t) {
  5904. if (0 === e) return 0;
  5905. const n = a(t.algo);
  5906. for (let t = 1; t < e; t++) n();
  5907. return s(t, n())
  5908. };
  5909. var o = r(n(2065));
  5910. function i(e) {
  5911. const {relativeDelay: t = !1} = e;
  5912. let n = null;
  5913. const r = a(e.algo);
  5914. return function () {
  5915. const o = n;
  5916. if (null == o) return n = t ? Date.now() : 0, 0;
  5917. let i = s(e, r());
  5918. if (t) {
  5919. const e = Date.now(), t = e - o;
  5920. t > 0 && (i = Math.max(0, i - t)), n = e
  5921. }
  5922. return i
  5923. }
  5924. }
  5925. function s(e, t) {
  5926. let {max: n, min: r, jitter: o = .1} = e, i = t;
  5927. return null != n && i > n && (i = n), null != r && i < r && (i = r), 0 !== o && (i = Math.ceil(i * (1 + o * Math.random()))), i
  5928. }
  5929. function a(e) {
  5930. switch (e.type) {
  5931. case"fibonacci":
  5932. return function (e) {
  5933. let t = e.second - e.first, n = e.first - t;
  5934. return function () {
  5935. const e = t + n;
  5936. return n = t, t = e, e
  5937. }
  5938. }(e);
  5939. case"exponential":
  5940. return function (e) {
  5941. const {base: t = 2} = e;
  5942. let n = e.first;
  5943. return function () {
  5944. const e = n;
  5945. return n *= t, e
  5946. }
  5947. }(e);
  5948. case"constant":
  5949. return function (e) {
  5950. const t = e.delay;
  5951. return function () {
  5952. return t
  5953. }
  5954. }(e);
  5955. case"adjust":
  5956. return function (e) {
  5957. const {toMs: t, backoff: n} = e, r = a(n);
  5958. return function () {
  5959. return t(r())
  5960. }
  5961. }(e);
  5962. default:
  5963. throw(0, o.default)(`makeTimeFunc unrecognized backoff ${e.type}`)
  5964. }
  5965. }
  5966. }, 5068: (e, t, n) => {
  5967. "use strict";
  5968. Object.defineProperty(t, "__esModule", {value: !0}), t.delayMs = function (e, t) {
  5969. return new Promise(((n, o) => {
  5970. if (null == t ? void 0 : t.aborted) throw new r.AbortError;
  5971. const i = setTimeout((function () {
  5972. null == t || t.removeEventListener("abort", s), n()
  5973. }), e);
  5974. function s() {
  5975. null == t || t.removeEventListener("abort", s), clearTimeout(i), o(new r.AbortError)
  5976. }
  5977. null == t || t.addEventListener("abort", s)
  5978. }))
  5979. }, t.withTimeout = function (e, t, n) {
  5980. return new Promise(((r, o) => {
  5981. const i = setTimeout((() => {
  5982. try {
  5983. r(n())
  5984. } catch (e) {
  5985. o(e)
  5986. }
  5987. }), t);
  5988. e.then((e => {
  5989. clearTimeout(i), r(e)
  5990. }), (e => {
  5991. clearTimeout(i), o(e)
  5992. }))
  5993. }))
  5994. };
  5995. var r = n(2560)
  5996. }, 2521: (e, t, n) => {
  5997. "use strict";
  5998. var r = n(7914);
  5999. Object.defineProperty(t, "__esModule", {value: !0}), t.PromiseRetryLoop = void 0;
  6000. var o = r(n(2065)), i = n(9959), s = n(5068), a = n(1630);
  6001. t.PromiseRetryLoop = class {
  6002. constructor(e) {
  6003. this._resolvable = new a.Resolvable, this._promise = null, this._resetTime = null, this._currentLoopIdentificator = 0, this.endWithValue = e => {
  6004. this._currentLoopIdentificator++, this._resolvable.resolve(e)
  6005. }, this._options = e
  6006. }
  6007. resetTimeoutAfter(e) {
  6008. this._resetTime = Date.now() + e
  6009. }
  6010. cancelReset() {
  6011. this._resetTime = null
  6012. }
  6013. reset() {
  6014. this._resolvable.resolveWasCalled() || (__LOG__(2)`PromiseRetryLoop: resetting ${this._options.name}`, this._currentLoopIdentificator++, this._runLoop())
  6015. }
  6016. start() {
  6017. this._resolvable.resolveWasCalled() || (__LOG__(2)`PromiseRetryLoop: starting ${this._options.name}`, 0 !== this._currentLoopIdentificator && __LOG__(4, void 0, new Error)`PromiseRetryLoop was called several times. You may have race conditions`, this._currentLoopIdentificator++, this._runLoop())
  6018. }
  6019. _runLoop() {
  6020. const e = this._options, t = this._currentLoopIdentificator;
  6021. let n = (0, i.createTimer)(this._options.timer);
  6022. n();
  6023. const r = () => {
  6024. if (this._resolvable.resolveWasCalled()) return;
  6025. if (t !== this._currentLoopIdentificator) return;
  6026. const o = Date.now();
  6027. return this._promise = (0, e.code)(this.endWithValue).then((() => {
  6028. if (this._resolvable.resolveWasCalled()) return;
  6029. const {resetDelay: t} = e;
  6030. (void 0 !== t && Date.now() >= o + t || null != this._resetTime && this._resetTime <= Date.now()) && (__LOG__(2)`PromiseRetryLoop: resetting ${e.name}`, n = (0, i.createTimer)(this._options.timer)), this._resetTime = null;
  6031. const a = n();
  6032. return __LOG__(2)`PromiseRetryLoop: retrying ${e.name} in ${a}ms`, (0, s.delayMs)(a).then(r)
  6033. })), this._promise
  6034. };
  6035. this._promise = Promise.resolve().then(r)
  6036. }
  6037. promise() {
  6038. return this._resolvable.resolveWasCalled() ? this._resolvable.promise : this._promise ? Promise.race([this._resolvable.promise, this._promise.then((() => this._resolvable.promise))]) : Promise.reject((0, o.default)(`PromiseRetryLoop ${this._options.name} had promise() called before start()`))
  6039. }
  6040. }
  6041. }, 1630: (e, t) => {
  6042. "use strict";
  6043. Object.defineProperty(t, "__esModule", {value: !0}), t.Resolvable = void 0;
  6044. t.Resolvable = class {
  6045. constructor() {
  6046. this._resolve = () => {
  6047. }, this._isResolved = !1, this.promise = new Promise((e => {
  6048. this._resolve = e
  6049. }))
  6050. }
  6051. resolve(e) {
  6052. this._isResolved = !0, this._resolve(e)
  6053. }
  6054. reject(e) {
  6055. this.resolve(Promise.reject(e))
  6056. }
  6057. resolveWasCalled() {
  6058. return this._isResolved
  6059. }
  6060. }
  6061. }, 9069: (e, t, n) => {
  6062. "use strict";
  6063. var r = n(7914);
  6064. Object.defineProperty(t, "__esModule", {value: !0}), t.loadStackPromisePolyfill = function () {
  6065. function e(e) {
  6066. this.message = e, this.stack = (0, o.default)(e || this.name).stack
  6067. }
  6068. Promise.prototype.cancellable = function () {
  6069. return console.info("StackPromise.cancellable noop"), this
  6070. }, Promise.prototype.cancel = function () {
  6071. return console.info("StackPromise.cancel noop"), this
  6072. }, e.prototype = Object.create(Error.prototype, {name: {value: "AbortError"}}), Promise.CancellationError = e
  6073. };
  6074. var o = r(n(2065))
  6075. }, 2683: (e, t, n) => {
  6076. "use strict";
  6077. Object.defineProperty(t, "__esModule", {value: !0}), t.bytesToDebugString = i, t.debugStr = o, t.rebuildTemplate = function (e, t) {
  6078. const n = [e[0]];
  6079. return t.forEach(((t, r) => {
  6080. n.push(o(t), e[r + 1])
  6081. })), n.join("")
  6082. };
  6083. var r = n(5982);
  6084. function o(e) {
  6085. if ("string" == typeof e) return `'${e}'`;
  6086. if (null == e || "object" != typeof e) return String(e);
  6087. if (Array.isArray(e)) return `[${e.join(",")}]`;
  6088. if (e instanceof Uint8Array) {
  6089. if (e.length < 64) return `<<${i(e)}>>`;
  6090. {
  6091. const t = e.subarray(0, 32);
  6092. return `<<${i(t)}, ${e.length - t.length} more bytes>>`
  6093. }
  6094. }
  6095. return e.toString === Object.prototype.toString ? JSON.stringify(e, ((e, t) => e ? String(t) : t)) : String(e)
  6096. }
  6097. function i(e) {
  6098. let t = !0, n = e.length;
  6099. for (; t && n;) {
  6100. const r = e[--n];
  6101. t = 32 <= r && r < 127
  6102. }
  6103. return t ? JSON.stringify(String.fromCharCode.apply(String, e)) : (0, r.toHex)(e)
  6104. }
  6105. }, 1784: (e, t, n) => {
  6106. "use strict";
  6107. var r = n(7914);
  6108. Object.defineProperty(t, "__esModule", {value: !0}), t.TAGS = _, t.getWaLoggerAdditionalOptions = f, t.initializeWaLogger = function (e) {
  6109. var t;
  6110. u = e, null === (t = a) || void 0 === t || t(), a = null
  6111. }, t.whenReady = function () {
  6112. return l.apply(this, arguments)
  6113. };
  6114. var o = r(n(1504)), i = n(2683), s = r(n(9619));
  6115. let a;
  6116. const c = new Promise((e => {
  6117. a = e
  6118. }));
  6119. function l() {
  6120. return (l = (0, o.default)((function* () {
  6121. yield c
  6122. }))).apply(this, arguments)
  6123. }
  6124. let u = null;
  6125. function d() {
  6126. return (0, s.default)(u, "WALogger called before initialization")
  6127. }
  6128. function _(e) {
  6129. return {
  6130. TAGS: t => _([...e, ...t]), DEV: function (t) {
  6131. for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
  6132. const s = (0, i.rebuildTemplate)(t, r);
  6133. return d().debug(s, e), f("DEV", s)
  6134. }, DEV_XMPP: function (t) {
  6135. for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
  6136. const s = (0, i.rebuildTemplate)(t, r);
  6137. return d().logRestricted(s, e), f("DEV_XMPP", s)
  6138. }, LOG: function (t) {
  6139. for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
  6140. const s = (0, i.rebuildTemplate)(t, r);
  6141. return d().info(s, e), f("LOG", s)
  6142. }, WARN: function (t) {
  6143. for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
  6144. const s = (0, i.rebuildTemplate)(t, r);
  6145. return d().warn(s, e), f("WARN", s)
  6146. }, ERROR: function (t) {
  6147. for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
  6148. const s = (0, i.rebuildTemplate)(t, r);
  6149. let a;
  6150. for (const e of r) if (e instanceof Error) {
  6151. a = e;
  6152. break
  6153. }
  6154. return null != a ? d().error(s, e, a) : d().error(s, e), f("ERROR", s)
  6155. }, CATCHING: function (t) {
  6156. for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
  6157. const s = (0, i.rebuildTemplate)(t, r);
  6158. return d().error(s, e), f("CATCHING", s)
  6159. }
  6160. }
  6161. }
  6162. function f(e, t) {
  6163. return {
  6164. verbose: () => f(e, t),
  6165. color: () => f(e, t),
  6166. devConsole: function () {
  6167. for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
  6168. return d().devConsole(e, t, [], ...r), f(e, t)
  6169. },
  6170. sendLogs: n => "ERROR" !== e && "CATCHING" !== e ? _([]).ERROR`[${n}] ${t}` : f(e, t),
  6171. tags: function () {
  6172. return f(e, t)
  6173. }
  6174. }
  6175. }
  6176. }, 717: (e, t, n) => {
  6177. "use strict";
  6178. var r = n(7914);
  6179. Object.defineProperty(t, "__esModule", {value: !0}), t.KEY_TYPE = void 0, t.castToPreKeyId = p, t.castToSerializedPubKey = b, t.castToSignedPreKeyId = function (e) {
  6180. return (0, a.ensureIntInRange)(e, 0, l)
  6181. }, t.deserializePreKey = function (e) {
  6182. try {
  6183. const {id: t, publicKey: n, privateKey: r} = (0, c.decodeProtobuf)(s.PreKeyRecordStructureSpec, e);
  6184. return null == t || null == n || null == r ? null : {
  6185. id: p(t),
  6186. keyPair: _((0, a.toBytes)(r, 32), b(new Uint8Array(n)))
  6187. }
  6188. } catch (e) {
  6189. return null
  6190. }
  6191. }, t.ecdh = function (e, t) {
  6192. return (0, o.scalarMult)(e, t.subarray(1)).buffer
  6193. }, t.makeKeyPair = d, t.makeKeyPairFrom = function (e) {
  6194. const {publicKey: t, secretKey: n} = (0, o.keypairFromSecretKey)(e);
  6195. return u((0, a.ensureSize)(t, 32), (0, a.ensureSize)(n, 32))
  6196. }, t.makeKeyPairFromArrayBuffers = function (e, t) {
  6197. return {publicKey: (0, a.toBytes)(e, 32), privateKey: (0, a.toBytes)(t, 32)}
  6198. }, t.makeKeyPairFromSerialized = _, t.makePreKeys = function (e, t) {
  6199. let n = (e - 1) % l;
  6200. n <= 0 && (n += l);
  6201. const r = [];
  6202. for (let e = 0; e < t; e++) {
  6203. const e = n === l ? 1 : n + 1, t = d(), o = (0, a.encodeSignalProto)(s.PreKeyRecordStructureSpec, {
  6204. id: e,
  6205. publicKey: h(t),
  6206. privateKey: t.privateKey
  6207. });
  6208. r.push({plainObject: {id: e, keyPair: t}, record: o}), n = e
  6209. }
  6210. return r
  6211. }, t.makeRawSenderKey = function () {
  6212. const e = (0, a.makeBytes)(32);
  6213. return self.crypto.getRandomValues(e), e
  6214. }, t.makeSerializedKeyPair = function () {
  6215. const e = d();
  6216. return f(e.privateKey, h(e))
  6217. }, t.makeSerializedKeyPairFrom = f, t.serializeIdentity = function (e) {
  6218. const t = (0, a.makeBytes)(33);
  6219. return t[0] = 5, t.set((0, a.ensureSize)(e, 32), 1), t
  6220. }, t.serializePubKey = h, t.toSerializedKeyPair = function (e) {
  6221. return f(e.privateKey, h(e))
  6222. };
  6223. var o = n(3596), i = r(n(2065)), s = n(479), a = n(1879), c = n(3955);
  6224. t.KEY_TYPE = 5;
  6225. const l = 16777215;
  6226. function u(e, t) {
  6227. return {publicKey: e, privateKey: t}
  6228. }
  6229. function d() {
  6230. const {publicKey: e, secretKey: t} = (0, o.keyPair)();
  6231. return t[0] &= 248, t[31] = 64 | 63 & t[31], u((0, a.ensureSize)(e, 32), (0, a.ensureSize)(t, 32))
  6232. }
  6233. function _(e, t) {
  6234. return u((0, a.sliceBytes)(t, 1, 32), e)
  6235. }
  6236. function f(e, t) {
  6237. return {serializedPubKey: t, privateKey: e}
  6238. }
  6239. function h(e) {
  6240. const t = (0, a.makeBytes)(33);
  6241. return t[0] = 5, t.set(e.publicKey, 1), t
  6242. }
  6243. function p(e) {
  6244. return (0, a.ensureIntInRange)(e, 1, l)
  6245. }
  6246. function b(e) {
  6247. if (0 === e.length || 5 !== e[0]) throw(0, i.default)("Unrecognized public key type");
  6248. return (0, a.ensureSize)(e, 33)
  6249. }
  6250. }, 1879: (e, t, n) => {
  6251. "use strict";
  6252. var r = n(7914);
  6253. Object.defineProperty(t, "__esModule", {value: !0}), t.HMAC_SHA256 = t.AES_CBC = void 0, t.areSessionHashesEqual = function (e, t) {
  6254. return (0, i.arrayBuffersEqual)(e, t)
  6255. }, t.castRegistrationId = function (e) {
  6256. return _(e)
  6257. }, t.castSenderKeyId = function (e) {
  6258. return _(e)
  6259. }, t.castToByteEncoded = function (e) {
  6260. return e
  6261. }, t.castToSessionHash = function (e) {
  6262. return e
  6263. }, t.decodeSignalProto = function (e, t, n) {
  6264. return n((0, a.decodeProtobuf)(e, t))
  6265. }, t.encodeSignalProto = function (e, t) {
  6266. return (0, c.encodeProtobuf)(e, t).readByteArray()
  6267. }, t.ensureIntInRange = _, t.ensureSize = d, t.hkdf = function (e, t, n, r) {
  6268. return (0, o.extractWithSaltAndExpand)(e, t, n, r).then((e => new Uint8Array(e)))
  6269. }, t.makeBytes = function (e) {
  6270. return new Uint8Array(e)
  6271. }, t.makeCryptoKey = function (e, t) {
  6272. let n, r;
  6273. "hmac-sha256" === t ? (n = u, r = ["sign"]) : (n = l, r = ["encrypt", "decrypt"]);
  6274. return self.crypto.subtle.importKey("raw", e, n, !1, r)
  6275. }, t.makeRegistrationId = function (e) {
  6276. const t = "extendedRange" === e ? 2147483646 : 16380;
  6277. return (0, i.randomNumberLessThan)(t) + 1
  6278. }, t.makeSenderKeyId = function () {
  6279. return (0, i.randomNumberLessThan)(-1 >>> 1) + 1
  6280. }, t.readBytes = function (e, t) {
  6281. return e.readByteArray(t)
  6282. }, t.sliceBytes = function (e, t, n) {
  6283. if (e.length - t < n) throw(0, s.default)(`Can not split off ${n} bytes from index ${t} of ${e.length} bytes`);
  6284. return e.slice(t, t + n)
  6285. }, t.toBuffer = function (e) {
  6286. const t = e.buffer, n = e.byteOffset, r = e.length;
  6287. return 0 === n && r === t.byteLength ? t : t.slice(n, n + r)
  6288. }, t.toBytes = function (e, t) {
  6289. return d(new Uint8Array(e), t)
  6290. };
  6291. var o = n(8397), i = n(9093), s = r(n(2065)), a = n(3955), c = n(4753);
  6292. const l = {name: "AES-CBC"};
  6293. t.AES_CBC = l;
  6294. const u = {name: "HMAC", hash: "SHA-256"};
  6295. function d(e, t) {
  6296. if (e.length !== t) throw(0, s.default)(`Signal expected ${t} bytes, given ${e.length}`);
  6297. return e
  6298. }
  6299. function _(e) {
  6300. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
  6301. n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 4294967296;
  6302. if ("number" == typeof e && t <= e && e < n && Math.floor(e) === e) return e;
  6303. throw(0, s.default)(`Expected integer in range [${t}, ${n}), given ${String(e)}`)
  6304. }
  6305. t.HMAC_SHA256 = u
  6306. }, 4080: (e, t, n) => {
  6307. "use strict";
  6308. var r = n(7914);
  6309. Object.defineProperty(t, "__esModule", {value: !0}), t.arrayBufferMod = function (e, t) {
  6310. const n = new Uint8Array(e);
  6311. if (t > 8388607) throw(0, o.default)("Divisor is too big");
  6312. let r = 0;
  6313. for (let e = 0; e < n.length; ++e) r = ((r << 8) + n[e]) % t;
  6314. return r
  6315. }, t.arrayBufferToString = function (e) {
  6316. return String.fromCharCode.apply(null, new Uint8Array(e))
  6317. }, t.arrayBuffersEqualUNSAFE = function (e, t) {
  6318. const n = new Uint8Array(e), r = new Uint8Array(t);
  6319. return i(n, r)
  6320. }, t.concatBuffers = function (e) {
  6321. const t = e.map((e => new Uint8Array(e))), n = t.reduce(((e, t) => e + t.byteLength), 0),
  6322. r = new Uint8Array(n);
  6323. return t.reduce(((e, t) => (r.set(t, e), e + t.byteLength)), 0), r.buffer.slice(r.byteOffset, r.byteOffset + r.byteLength)
  6324. }, t.largeStringToArrayBuffer = function (e) {
  6325. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 5e5;
  6326. return new Promise((n => {
  6327. const r = e.length, o = new ArrayBuffer(r), i = new Uint8Array(o);
  6328. let s = 0;
  6329. setTimeout((function a() {
  6330. const c = Math.min(s + t, r);
  6331. for (; s < c;) i[s] = e.charCodeAt(s), s++;
  6332. if (s === r) return void n(o);
  6333. setTimeout(a, 16)
  6334. }), 0)
  6335. }))
  6336. }, t.stringToArrayBuffer = function (e) {
  6337. const t = new ArrayBuffer(e.length), n = new Uint8Array(t);
  6338. let r, o;
  6339. for (r = 0, o = e.length; r < o; r++) n[r] = e.charCodeAt(r);
  6340. return n.buffer
  6341. }, t.uint8ArraysEqualUNSAFE = i;
  6342. var o = r(n(2065));
  6343. function i(e, t) {
  6344. if (e.byteLength !== t.byteLength) return !1;
  6345. for (let n = 0; n !== e.byteLength; n++) if (e[n] !== t[n]) return !1;
  6346. return !0
  6347. }
  6348. }, 3558: (e, t) => {
  6349. "use strict";
  6350. Object.defineProperty(t, "__esModule", {value: !0}), t.removeIndexWithoutPreservingOrder = function (e, t) {
  6351. const n = e.pop();
  6352. t < e.length && (e[t] = n)
  6353. }
  6354. }, 7537: (e, t, n) => {
  6355. "use strict";
  6356. var r = n(7914);
  6357. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
  6358. throw(0, o.default)(`Impossible value, the default statement should never be reached for value: ${e}`)
  6359. };
  6360. var o = r(n(2065))
  6361. }, 2089: (e, t, n) => {
  6362. "use strict";
  6363. var r = n(7914);
  6364. Object.defineProperty(t, "__esModule", {value: !0}), t.BASE64_DATA_URL_SCHEME = void 0, t.decodeB64 = function (e) {
  6365. const t = l(e, 43, 47, 61);
  6366. if (t) return t.buffer;
  6367. throw(0, o.default)("Base64.decode given invalid string")
  6368. }, t.decodeB64ToJsArray = function (e) {
  6369. const t = e instanceof ArrayBuffer ? new Uint8Array(e) : l(e, 43, 47, 61);
  6370. return t && Array.from(t)
  6371. }, t.decodeB64UrlSafe = function (e) {
  6372. let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  6373. const n = l(e, 45, 95, t ? 61 : -1);
  6374. if (n) return n.buffer;
  6375. throw(0, o.default)("Base64.decode given invalid string")
  6376. }, t.encodeB64 = s, t.encodeB64UrlSafe = function (e) {
  6377. let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  6378. return a(e, 45, 95, t)
  6379. }, t.isBase64 = void 0, t.randomBase64 = function (e) {
  6380. const t = new Uint8Array(e);
  6381. return self.crypto.getRandomValues(t), s(t)
  6382. }, t.sizeWhenB64Decoded = function (e) {
  6383. return Math.floor(3 * e.length / 4)
  6384. };
  6385. var o = r(n(2065));
  6386. const i = 3e3;
  6387. t.BASE64_DATA_URL_SCHEME = "data:image/jpeg;base64,";
  6388. function s(e) {
  6389. return a(e, 43, 47, !0)
  6390. }
  6391. function a(e, t, n, r) {
  6392. const o = Array.isArray(e) || e instanceof ArrayBuffer ? new Uint8Array(e) : e;
  6393. if (o.length <= i) return c(o, t, n, r);
  6394. {
  6395. const e = [];
  6396. for (let s = 0; s < o.length; s += i) e.push(c(o.subarray(s, s + i), t, n, r));
  6397. return e.join("")
  6398. }
  6399. }
  6400. function c(e, t, n, r) {
  6401. const o = Math.ceil(4 * e.length / 3), i = 4 * Math.ceil(e.length / 3), s = new Array(i);
  6402. for (let t = 0, n = 0; t < i; t += 4, n += 3) {
  6403. const r = e[n] << 16 | e[n + 1] << 8 | e[n + 2];
  6404. s[t] = r >> 18, s[t + 1] = r >> 12 & 63, s[t + 2] = r >> 6 & 63, s[t + 3] = 63 & r
  6405. }
  6406. for (let e = 0; e < o; e++) {
  6407. const r = s[e];
  6408. s[e] = r < 26 ? 65 + r : r < 52 ? 71 + r : r < 62 ? r - 4 : 62 === r ? t : n
  6409. }
  6410. for (let e = o; e < i; e++) s[e] = 61;
  6411. const a = String.fromCharCode.apply(String, s);
  6412. return r ? a : a.substring(0, o)
  6413. }
  6414. function l(e, t, n, r) {
  6415. let o = e.length;
  6416. const i = new Int32Array(o + o % 4);
  6417. for (let s = 0; s < o; s++) {
  6418. const a = e.charCodeAt(s);
  6419. if (65 <= a && a <= 90) i[s] = a - 65; else if (97 <= a && a <= 122) i[s] = a - 71; else if (48 <= a && a <= 57) i[s] = a + 4; else if (a === t) i[s] = 62; else {
  6420. if (a !== n) {
  6421. if (a === r) {
  6422. o = s;
  6423. break
  6424. }
  6425. return null != self.ERROR && __LOG__(4, void 0, new Error)`Found unexpected character code while decoding B64 at index ${s}, length ${o}: ${a}`, null
  6426. }
  6427. i[s] = 63
  6428. }
  6429. }
  6430. const s = i.length / 4;
  6431. for (let e = 0, t = 0; e < s; e++, t += 4) i[e] = i[t] << 18 | i[t + 1] << 12 | i[t + 2] << 6 | i[t + 3];
  6432. const a = Math.floor(3 * o / 4), c = new Uint8Array(a);
  6433. let l = 0, u = 0;
  6434. for (; u + 3 <= a; l++, u += 3) {
  6435. const e = i[l];
  6436. c[u] = e >> 16, c[u + 1] = e >> 8 & 255, c[u + 2] = 255 & e
  6437. }
  6438. switch (a - u) {
  6439. case 2:
  6440. c[u] = i[l] >> 16, c[u + 1] = i[l] >> 8 & 255;
  6441. break;
  6442. case 1:
  6443. c[u] = i[l] >> 16
  6444. }
  6445. return c
  6446. }
  6447. t.isBase64 = e => "string" == typeof e && /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)
  6448. }, 9323: (e, t, n) => {
  6449. "use strict";
  6450. var r = n(7914);
  6451. Object.defineProperty(t, "__esModule", {value: !0}), t.Binary = void 0, t.longFitsInDouble = f, t.numUtf8Bytes = _, t.parseInt64OrThrow = z, t.parseUint64OrThrow = W;
  6452. var o = r(n(2065)), i = n(5982);
  6453. const s = 65533, a = new Uint8Array(10), c = new Uint8Array(0);
  6454. class l {
  6455. constructor() {
  6456. var e = this;
  6457. let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : c,
  6458. n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  6459. this._buffer = new Uint8Array(0), this._readEndIndex = 0, this._writeIndex = 0, this.write = function () {
  6460. for (let t = 0; t < arguments.length; t++) {
  6461. const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
  6462. "string" == typeof n ? e.writeString(n) : "number" == typeof n ? e.writeUint8(n) : n instanceof l ? e.writeBinary(n) : n instanceof ArrayBuffer ? e.writeBuffer(n) : n instanceof Uint8Array && e.writeByteArray(n)
  6463. }
  6464. }, t instanceof ArrayBuffer ? (this._buffer = new Uint8Array(t), this._readEndIndex = this._writeIndex = t.byteLength) : t instanceof Uint8Array && (this._buffer = t, this._readEndIndex = this._writeIndex = t.length), this._bytesTrashed = 0, this._earliestIndex = this._readIndex = 0, this._view = null, this._littleEndian = n, this._hiddenReads = 0, this._hiddenWrites = 0
  6465. }
  6466. size() {
  6467. return this._readEndIndex - this._readIndex
  6468. }
  6469. peek(e, t) {
  6470. this._hiddenReads++;
  6471. const n = this._readIndex, r = this._bytesTrashed;
  6472. try {
  6473. return e(this, t)
  6474. } finally {
  6475. this._hiddenReads--, this._readIndex = n - (this._bytesTrashed - r)
  6476. }
  6477. }
  6478. advance(e) {
  6479. this._shiftReadOrThrow(e)
  6480. }
  6481. readWithViewParser(e, t, n, r) {
  6482. return t(this._getView(), this._shiftReadOrThrow(e), e, n, r)
  6483. }
  6484. readWithBytesParser(e, t, n, r) {
  6485. return t(this._buffer, this._shiftReadOrThrow(e), e, n, r)
  6486. }
  6487. readUint8() {
  6488. return h(this, 1, b, !1)
  6489. }
  6490. readInt8() {
  6491. return h(this, 1, b, !0)
  6492. }
  6493. readUint16() {
  6494. return h(this, 2, m, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
  6495. }
  6496. readInt32() {
  6497. return h(this, 4, g, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
  6498. }
  6499. readUint32() {
  6500. return h(this, 4, v, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
  6501. }
  6502. readInt64() {
  6503. return h(this, 8, y, z, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
  6504. }
  6505. readUint64() {
  6506. return h(this, 8, y, W, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
  6507. }
  6508. readLong(e) {
  6509. return h(this, 8, y, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian)
  6510. }
  6511. readFloat32() {
  6512. return h(this, 4, w, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
  6513. }
  6514. readFloat64() {
  6515. return h(this, 8, S, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
  6516. }
  6517. readVarInt(e) {
  6518. const t = p(this, 0, E, this.size());
  6519. return p(this, t, j, e)
  6520. }
  6521. readBuffer() {
  6522. let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.size();
  6523. return 0 === e ? new ArrayBuffer(0) : p(this, e, k)
  6524. }
  6525. readByteArray() {
  6526. let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.size();
  6527. return 0 === e ? new Uint8Array(0) : p(this, e, A)
  6528. }
  6529. readBinary() {
  6530. let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.size(),
  6531. t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
  6532. if (0 === e) return new l(void 0, t);
  6533. const n = p(this, e, A);
  6534. return new l(n, t)
  6535. }
  6536. indexOf(e) {
  6537. if (0 === e.length) return 0;
  6538. const t = this._buffer, n = this._readEndIndex, r = this._readIndex;
  6539. let o = 0, i = r;
  6540. for (let s = r; s < n; s++) if (t[s] === e[o]) {
  6541. if (0 === o && (i = s), o++, o === e.byteLength) return s - r - e.byteLength + 1
  6542. } else o > 0 && (o = 0, s = i);
  6543. return -1
  6544. }
  6545. readString(e) {
  6546. return p(this, e, T)
  6547. }
  6548. ensureCapacity(e) {
  6549. this._maybeReallocate(this._readIndex + e)
  6550. }
  6551. ensureAdditionalCapacity(e) {
  6552. this._maybeReallocate(this._writeIndex + e)
  6553. }
  6554. writeToView(e, t, n, r) {
  6555. const o = this._shiftWriteMaybeReallocate(e);
  6556. return t(this._getView(), o, e, n, r)
  6557. }
  6558. writeToBytes(e, t, n, r) {
  6559. const o = this._shiftWriteMaybeReallocate(e);
  6560. return t(this._buffer, o, e, n, r)
  6561. }
  6562. writeUint8(e) {
  6563. K(e, 0, 256, "uint8"), P(this, 1, I, e, !1)
  6564. }
  6565. writeInt8(e) {
  6566. K(e, -128, 128, "signed int8"), P(this, 1, I, e, !0)
  6567. }
  6568. writeUint16(e) {
  6569. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
  6570. K(e, 0, 65536, "uint16"), x(this, 2, O, e, t)
  6571. }
  6572. writeInt16(e) {
  6573. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
  6574. K(e, -32768, 32768, "signed int16"), x(this, 2, U, e, t)
  6575. }
  6576. writeUint32(e) {
  6577. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
  6578. K(e, 0, 4294967296, "uint32"), x(this, 4, R, e, t)
  6579. }
  6580. writeInt32(e) {
  6581. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
  6582. K(e, -2147483648, 2147483648, "signed int32"), x(this, 4, C, e, t)
  6583. }
  6584. writeUint64(e) {
  6585. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
  6586. K(e, 0, 0x10000000000000000, "uint64"), x(this, 8, D, e, t)
  6587. }
  6588. writeInt64(e) {
  6589. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
  6590. K(e, -0x8000000000000000, 0x8000000000000000, "signed int64"), x(this, 8, D, e, t)
  6591. }
  6592. writeFloat32(e) {
  6593. x(this, 4, M, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian)
  6594. }
  6595. writeFloat64(e) {
  6596. x(this, 8, $, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian)
  6597. }
  6598. writeVarInt(e) {
  6599. K(e, -0x8000000000000000, 0x8000000000000000, "varint (signed int64)");
  6600. const t = e < 0, n = t ? -e : e;
  6601. let r = Math.floor(n / 4294967296), o = n - 4294967296 * r;
  6602. t && (r = ~r, 0 === o ? r++ : o = -o);
  6603. P(this, F(r, o), L, r, o)
  6604. }
  6605. writeVarIntFromHexLong(e) {
  6606. const t = (0, i.hexLongIsNegative)(e), n = t ? (0, i.negateHexLong)(e) : e,
  6607. r = (0, i.hexLongToHex)(n);
  6608. let o = 0, s = 0;
  6609. for (let e = 0; e < i.NUM_HEX_IN_LONG; e++) o = o << 4 | s >>> 28, s = s << 4 | (0, i.hexAt)(r, e);
  6610. t && (o = ~o, 0 === s ? o++ : s = -s);
  6611. P(this, F(o, s), L, o, s)
  6612. }
  6613. writeBinary(e) {
  6614. const t = e.peek((e => e.readByteArray()));
  6615. if (t.length) {
  6616. const e = this._shiftWriteMaybeReallocate(t.length);
  6617. this._buffer.set(t, e)
  6618. }
  6619. }
  6620. writeBuffer(e) {
  6621. this.writeByteArray(new Uint8Array(e))
  6622. }
  6623. writeByteArray(e) {
  6624. const t = this._shiftWriteMaybeReallocate(e.length);
  6625. this._buffer.set(e, t)
  6626. }
  6627. writeBufferView(e) {
  6628. this.writeByteArray(new Uint8Array(e.buffer, e.byteOffset, e.byteLength))
  6629. }
  6630. writeString(e) {
  6631. P(this, _(e), N, e)
  6632. }
  6633. writeHexLong(e) {
  6634. x(this, 8, J, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian)
  6635. }
  6636. writeBytes() {
  6637. for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
  6638. for (let e = 0; e < t.length; e++) K(t[e], 0, 256, "byte");
  6639. P(this, t.length, B, t)
  6640. }
  6641. writeAtomically(e, t) {
  6642. this._hiddenWrites++;
  6643. let n = this._writeIndex, r = this._bytesTrashed;
  6644. try {
  6645. const o = e(this, t);
  6646. return n = this._writeIndex, r = this._bytesTrashed, o
  6647. } finally {
  6648. this._hiddenWrites--, this._writeIndex = n - (this._bytesTrashed - r)
  6649. }
  6650. }
  6651. writeWithVarIntLength(e, t) {
  6652. const n = this._writeIndex, r = this.writeAtomically(e, t), o = this._writeIndex;
  6653. this.writeVarInt(o - n);
  6654. const i = this._writeIndex - o, s = this._buffer;
  6655. for (let e = 0; e < i; e++) a[e] = s[o + e];
  6656. for (let e = o - 1; e >= n; e--) s[e + i] = s[e];
  6657. for (let e = 0; e < i; e++) s[n + e] = a[e];
  6658. return r
  6659. }
  6660. static build() {
  6661. for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
  6662. let r = 0;
  6663. for (let e = 0; e < t.length; e++) {
  6664. const n = t[e];
  6665. "string" == typeof n ? r += _(n) : "number" == typeof n ? r++ : n instanceof l ? r += n.size() : n instanceof ArrayBuffer ? r += n.byteLength : n instanceof Uint8Array && (r += n.length)
  6666. }
  6667. const o = new l;
  6668. return o.ensureCapacity(r), o.write.apply(o, arguments), o
  6669. }
  6670. _getView() {
  6671. return this._view || (this._view = new DataView(this._buffer.buffer, this._buffer.byteOffset))
  6672. }
  6673. _shiftReadOrThrow(e) {
  6674. if (e < 0) throw(0, o.default)("ReadError: given negative number of bytes to read");
  6675. const t = this._readIndex, n = t + e;
  6676. if (n > this._readEndIndex) throw(0, o.default)(t === this._readEndIndex ? "ReadError: tried to read from depleted binary" : "ReadError: tried to read beyond end of binary");
  6677. return this._readIndex = n, this._hiddenReads || (this._earliestIndex = n), t
  6678. }
  6679. _maybeReallocate(e) {
  6680. const t = this._buffer;
  6681. if (e <= t.length) return e;
  6682. {
  6683. const n = this._earliestIndex, r = e - n, o = Math.max(r, 2 * (t.length - n), 64),
  6684. i = new Uint8Array(o);
  6685. return n ? (i.set(t.subarray(n)), this._bytesTrashed += n, this._readIndex -= n, this._readEndIndex -= n, this._writeIndex -= n, this._earliestIndex = 0) : i.set(t), this._buffer = i, this._view = null, r
  6686. }
  6687. }
  6688. _shiftWriteMaybeReallocate(e) {
  6689. const t = this._maybeReallocate(this._writeIndex + e), n = this._writeIndex;
  6690. return this._writeIndex = t, this._hiddenWrites || (this._readEndIndex = t), n
  6691. }
  6692. }
  6693. t.Binary = l;
  6694. let u = "", d = 0;
  6695. function _(e) {
  6696. if (e === u) return d;
  6697. const t = e.length;
  6698. let n = 0;
  6699. for (let r = 0; r < t; r++) {
  6700. const o = e.charCodeAt(r);
  6701. if (o < 128) n++; else if (o < 2048) n += 2; else if (o < 55296 || 57344 <= o && o <= 65535) n += 3; else if (55296 <= o && o < 56320 && r + 1 !== t) {
  6702. const t = e.charCodeAt(r + 1);
  6703. 56320 <= t && t < 57344 ? (r++, n += 4) : n += 3
  6704. } else n += 3
  6705. }
  6706. return u = e, d = n
  6707. }
  6708. function f(e, t, n) {
  6709. const r = t >> 21;
  6710. if (e) {
  6711. const e = Boolean(2097151 & t || n);
  6712. return 0 === r || -1 === r && e
  6713. }
  6714. return 0 === r
  6715. }
  6716. function h(e, t, n, r, o) {
  6717. return e.readWithViewParser(t, n, r, o)
  6718. }
  6719. function p(e, t, n, r, o) {
  6720. return e.readWithBytesParser(t, n, r, o)
  6721. }
  6722. function b(e, t, n, r) {
  6723. return r ? e.getInt8(t) : e.getUint8(t)
  6724. }
  6725. function m(e, t, n, r) {
  6726. return e.getUint16(t, r)
  6727. }
  6728. function g(e, t, n, r) {
  6729. return e.getInt32(t, r)
  6730. }
  6731. function v(e, t, n, r) {
  6732. return e.getUint32(t, r)
  6733. }
  6734. function y(e, t, n, r, o) {
  6735. return r(e.getInt32(o ? t + 4 : t, o), e.getInt32(o ? t : t + 4, o))
  6736. }
  6737. function w(e, t, n, r) {
  6738. return e.getFloat32(t, r)
  6739. }
  6740. function S(e, t, n, r) {
  6741. return e.getFloat64(t, r)
  6742. }
  6743. function E(e, t, n, r) {
  6744. const i = Math.min(r, 10);
  6745. let s = 0, a = 128;
  6746. for (; s < i && 128 & a;) a = e[t + s++];
  6747. if (10 === s && a > 1) throw(0, o.default)("ParseError: varint exceeds 64 bits");
  6748. return 128 & a ? s + 1 : s
  6749. }
  6750. function j(e, t, n, r) {
  6751. let o = 0, i = 0, s = n;
  6752. 10 === n && (s--, i = 1 & e[t + s]);
  6753. for (let n = s - 1; n >= 0; n--) o = o << 7 | i >>> 25, i = i << 7 | 127 & e[t + n];
  6754. return r(o, i)
  6755. }
  6756. function k(e, t, n) {
  6757. const r = t + e.byteOffset, o = e.buffer;
  6758. return 0 === r && n === o.byteLength ? o : o.slice(r, r + n)
  6759. }
  6760. function A(e, t, n) {
  6761. return e.subarray(t, t + n)
  6762. }
  6763. function T(e, t, n) {
  6764. const r = t + n;
  6765. let o = [], i = null;
  6766. for (let n = t; n < r; n++) {
  6767. o.length > 5e3 && (i || (i = []), i.push(String.fromCharCode.apply(String, o)), o = []);
  6768. const t = 0 | e[n];
  6769. if (0 == (128 & t)) o.push(t); else if (192 == (224 & t)) {
  6770. const i = G(e, n + 1, r);
  6771. if (i) {
  6772. n++;
  6773. const e = (31 & t) << 6 | 63 & i;
  6774. e >= 128 ? o.push(e) : o.push(s)
  6775. } else o.push(s)
  6776. } else if (224 == (240 & t)) {
  6777. const i = G(e, n + 1, r), a = G(e, n + 2, r);
  6778. if (i && a) {
  6779. n += 2;
  6780. const e = (15 & t) << 12 | (63 & i) << 6 | 63 & a;
  6781. e >= 2048 && !(55296 <= e && e < 57344) ? o.push(e) : o.push(s)
  6782. } else i ? (n++, o.push(s)) : o.push(s)
  6783. } else if (240 == (248 & t)) {
  6784. const i = G(e, n + 1, r), a = G(e, n + 2, r), c = G(e, n + 3, r);
  6785. if (i && a && c) {
  6786. n += 3;
  6787. const e = (7 & t) << 18 | (63 & i) << 12 | (63 & a) << 6 | 63 & c;
  6788. if (e >= 65536 && e <= 1114111) {
  6789. const t = e - 65536;
  6790. o.push(55296 | t >> 10, 56320 | 1023 & t)
  6791. } else o.push(s)
  6792. } else i && a ? (n += 2, o.push(s)) : i ? (n++, o.push(s)) : o.push(s)
  6793. } else o.push(s)
  6794. }
  6795. const a = String.fromCharCode.apply(String, o);
  6796. return i ? (i.push(a), i.join("")) : a
  6797. }
  6798. function x(e, t, n, r, o) {
  6799. return e.writeToView(t, n, r, o)
  6800. }
  6801. function P(e, t, n, r, o) {
  6802. return e.writeToBytes(t, n, r, o)
  6803. }
  6804. function I(e, t, n, r) {
  6805. e[t] = r
  6806. }
  6807. function O(e, t, n, r, o) {
  6808. e.setUint16(t, r, o)
  6809. }
  6810. function U(e, t, n, r, o) {
  6811. e.setInt16(t, r, o)
  6812. }
  6813. function R(e, t, n, r, o) {
  6814. e.setUint32(t, r, o)
  6815. }
  6816. function C(e, t, n, r, o) {
  6817. e.setInt32(t, r, o)
  6818. }
  6819. function D(e, t, n, r, o) {
  6820. const i = r < 0, s = i ? -r : r;
  6821. let a = Math.floor(s / 4294967296), c = s - 4294967296 * a;
  6822. i && (a = ~a, 0 === c ? a++ : c = -c), e.setUint32(o ? t + 4 : t, a, o), e.setUint32(o ? t : t + 4, c, o)
  6823. }
  6824. function M(e, t, n, r, o) {
  6825. e.setFloat32(t, r, o)
  6826. }
  6827. function $(e, t, n, r, o) {
  6828. e.setFloat64(t, r, o)
  6829. }
  6830. function L(e, t, n, r, o) {
  6831. let i = r, s = o;
  6832. const a = t + n - 1;
  6833. for (let n = t; n < a; n++) e[n] = 128 | 127 & s, s = i << 25 | s >>> 7, i >>>= 7;
  6834. e[a] = s
  6835. }
  6836. function N(e, t, n, r) {
  6837. let o = t;
  6838. const i = r.length;
  6839. for (let t = 0; t < i; t++) {
  6840. const n = r.charCodeAt(t);
  6841. if (n < 128) e[o++] = n; else if (n < 2048) e[o++] = 192 | n >> 6, e[o++] = 128 | 63 & n; else if (n < 55296 || 57344 <= n) e[o++] = 224 | n >> 12, e[o++] = 128 | n >> 6 & 63, e[o++] = 128 | 63 & n; else if (55296 <= n && n < 56320 && t + 1 !== i) {
  6842. const i = r.charCodeAt(t + 1);
  6843. if (56320 <= i && i < 57344) {
  6844. t++;
  6845. const r = 65536 + ((1023 & n) << 10 | 1023 & i);
  6846. e[o++] = 240 | r >> 18, e[o++] = 128 | r >> 12 & 63, e[o++] = 128 | r >> 6 & 63, e[o++] = 128 | 63 & r
  6847. } else e[o++] = 239, e[o++] = 191, e[o++] = 189
  6848. } else e[o++] = 239, e[o++] = 191, e[o++] = 189
  6849. }
  6850. }
  6851. function J(e, t, n, r, o) {
  6852. const s = (0, i.hexLongIsNegative)(r), a = (0, i.hexLongToHex)(r);
  6853. let c = 0, l = 0;
  6854. for (let e = 0; e < 16; e++) c = c << 4 | l >>> 28, l = l << 4 | (0, i.hexAt)(a, e);
  6855. s && (c = ~c, 0 === l ? c++ : l = -l), e.setUint32(o ? t + 4 : t, c, o), e.setUint32(o ? t : t + 4, l, o)
  6856. }
  6857. function B(e, t, n, r) {
  6858. for (let o = 0; o < n; o++) e[t + o] = r[o]
  6859. }
  6860. function F(e, t) {
  6861. let n, r;
  6862. for (e ? (n = 5, r = e >>> 3) : (n = 1, r = t >>> 7); r;) n++, r >>>= 7;
  6863. return n
  6864. }
  6865. function K(e, t, n, r) {
  6866. if ("number" != typeof e || e != e || Math.floor(e) !== e || e < t || e >= n) throw(0, o.default)("string" == typeof e ? `TyperError WriteError: string "${e}" is not a valid ${r}` : `TypeError WriteError: ${String(e)} is not a valid ${r}`)
  6867. }
  6868. function q(e, t, n) {
  6869. let r;
  6870. r = t >= 0 || e ? t : 4294967296 + t;
  6871. const i = 4294967296 * r + (n >= 0 ? n : 4294967296 + n);
  6872. if (!f(e, t, n)) throw(0, o.default)(`ReadError: integer exceeded 53 bits (${i})`);
  6873. return i
  6874. }
  6875. function z(e, t) {
  6876. return q(!0, e, t)
  6877. }
  6878. function W(e, t) {
  6879. return q(!1, e, t)
  6880. }
  6881. function G(e, t, n) {
  6882. if (t >= n) return 0;
  6883. const r = 0 | e[t];
  6884. return 128 == (192 & r) ? r : 0
  6885. }
  6886. }, 6911: (e, t) => {
  6887. "use strict";
  6888. Object.defineProperty(t, "__esModule", {value: !0}), t.WrappedError = t.UnimplementedMethod = t.TimeoutError = t.HttpError = t.AggregateError = void 0, t.customError = r, t.hasSupressedQuotaExceededError = function () {
  6889. return c
  6890. }, t.obtainErrorSummary = function (e) {
  6891. return JSON.stringify(e, Object.getOwnPropertyNames(e))
  6892. }, t.supressQuotaExceededError = function (e) {
  6893. if (null == e || "QuotaExceededError" !== e.name) throw e;
  6894. c = !0
  6895. };
  6896. const n = Object.create(Error.prototype, {constructor: {value: void 0, writable: !0, configurable: !0}});
  6897. function r(e) {
  6898. let t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1],
  6899. r = arguments.length > 2 ? arguments[2] : void 0;
  6900. function o(n) {
  6901. const r = Error.call(this, n);
  6902. this.message = n, r.name = e, this.name = e, t && (this.stack = r.stack)
  6903. }
  6904. return o.prototype = Object.create(r ? r.prototype : n), o.prototype.constructor = o, o
  6905. }
  6906. class o extends (r("AggregateError", !0)) {
  6907. constructor(e, t) {
  6908. super(null != t && t.length > 0 ? t : function (e) {
  6909. return 0 === e.length ? "No errors" : 1 === e.length ? e[0].message : e.map((e => "- " + e.message)).join("\n")
  6910. }(e)), this.errors = e
  6911. }
  6912. }
  6913. t.AggregateError = o;
  6914. class i extends (r("TimeoutError", !1)) {
  6915. }
  6916. t.TimeoutError = i;
  6917. class s extends (r("HttpError", !1)) {
  6918. constructor(e, t) {
  6919. super(e), this.code = t
  6920. }
  6921. }
  6922. t.HttpError = s;
  6923. class a extends (r("UnimplementedMethod")) {
  6924. }
  6925. t.UnimplementedMethod = a;
  6926. let c = !1;
  6927. class l extends Error {
  6928. constructor(e, t) {
  6929. super(e), this.inner = t
  6930. }
  6931. }
  6932. t.WrappedError = l
  6933. }, 2924: (e, t) => {
  6934. "use strict";
  6935. Object.defineProperty(t, "__esModule", {value: !0}), t.deepEqual = function e(t, n) {
  6936. if (t === n) return !0;
  6937. if (!t || !n || "object" != typeof t && "object" != typeof n) return !1;
  6938. const r = Array.isArray(t), o = Array.isArray(n);
  6939. if (r !== o) return !1;
  6940. let i = !0;
  6941. if (r) {
  6942. const r = t.length;
  6943. if (r !== n.length) return !1;
  6944. for (let o = 0; i && o < r; o++) i = e(t[o], n[o]);
  6945. return i
  6946. }
  6947. const s = Object.keys(t);
  6948. for (let r = 0; i && r < s.length; r++) {
  6949. const o = s[r];
  6950. i = n.propertyIsEnumerable(o) && e(t[o], n[o])
  6951. }
  6952. return i && Object.keys(n).length === s.length
  6953. }
  6954. }, 2065: (e, t) => {
  6955. "use strict";
  6956. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
  6957. const t = new Error(e);
  6958. if (void 0 === t.stack) try {
  6959. throw t
  6960. } catch (e) {
  6961. }
  6962. return t
  6963. }
  6964. }, 9028: (e, t) => {
  6965. "use strict";
  6966. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e, t) {
  6967. return Object.prototype.hasOwnProperty.call(e, t)
  6968. }
  6969. }, 5982: (e, t, n) => {
  6970. "use strict";
  6971. var r = n(7914);
  6972. Object.defineProperty(t, "__esModule", {value: !0}), t.NUM_HEX_IN_LONG = t.HEX_LOWER = void 0, t.bytesToBuffer = function (e) {
  6973. const t = e.buffer;
  6974. return 0 === e.byteOffset && e.length === t.byteLength ? t : t.slice(e.byteOffset, e.byteOffset + e.length)
  6975. }, t.bytesToDebugString = function (e) {
  6976. let t = !0, n = e.length;
  6977. for (; t && n;) {
  6978. const r = e[--n];
  6979. t = 32 <= r && r < 127
  6980. }
  6981. return t ? JSON.stringify(String.fromCharCode.apply(String, e)) : a(e)
  6982. }, t.createHexLong = u, t.createHexLongFrom32Bits = function (e, t) {
  6983. let n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
  6984. const r = p(e), o = p(t);
  6985. return `${n ? "-" : ""}0x${r}${o}`
  6986. }, t.hexAt = c, t.hexLongFromNumber = function (e) {
  6987. const t = e < 0;
  6988. return u(t ? (-e).toString(16) : e.toString(16), t)
  6989. }, t.hexLongIsNegative = f, t.hexLongToHex = _, t.hexOrThrow = l, t.isBiggerHexLong = function (e, t) {
  6990. const n = f(e), r = f(t);
  6991. if (n !== r) return !n;
  6992. const o = _(e) > _(t);
  6993. return n ? !o : o
  6994. }, t.negateHexLong = function (e) {
  6995. return f(e) ? e.slice(1) : "-" + e
  6996. }, t.parseHex = function (e) {
  6997. const t = l(e);
  6998. if (t.length % 2 != 0) throw(0, o.default)(`parseHex given hex "${t}" which is not a multiple of 8-bits.`);
  6999. const n = new Uint8Array(t.length >> 1);
  7000. for (let e = 0, r = 0; e < t.length; e += 2, r++) n[r] = c(t, e) << 4 | c(t, e + 1);
  7001. return n.buffer
  7002. }, t.randomHex = function (e) {
  7003. const t = new Uint8Array(e);
  7004. return self.crypto.getRandomValues(t), a(t)
  7005. }, t.toHex = a, t.toLowerCaseHex = function (e) {
  7006. const t = [];
  7007. for (let n = 0; n < e.length; n++) {
  7008. const r = e[n];
  7009. t.push(s[r >> 4], s[15 & r])
  7010. }
  7011. return String.fromCharCode.apply(String, t)
  7012. };
  7013. var o = r(n(2065));
  7014. t.NUM_HEX_IN_LONG = 16;
  7015. const i = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70],
  7016. s = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102];
  7017. function a(e) {
  7018. const t = [];
  7019. for (let n = 0; n < e.length; n++) {
  7020. const r = e[n];
  7021. t.push(i[r >> 4], i[15 & r])
  7022. }
  7023. return String.fromCharCode.apply(String, t)
  7024. }
  7025. function c(e, t) {
  7026. const n = e.charCodeAt(t);
  7027. return n <= 57 ? n - 48 : n <= 70 ? 10 + n - 65 : 10 + n - 97
  7028. }
  7029. function l(e) {
  7030. if (/[^0-9a-fA-F]/.test(e)) throw(0, o.default)(`"${e}" is not a valid hex`);
  7031. return e
  7032. }
  7033. function u(e) {
  7034. let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
  7035. const n = l(e);
  7036. return h(n, 16), `${t ? "-" : ""}0x${d(n, 16)}`
  7037. }
  7038. function d(e, t) {
  7039. const n = t - e.length;
  7040. let r = e;
  7041. for (let e = 0; e < n; e++) r = "0" + r;
  7042. return r
  7043. }
  7044. function _(e) {
  7045. return e.substring(e.indexOf("0x") + 2)
  7046. }
  7047. function f(e) {
  7048. return "-" === e[0]
  7049. }
  7050. function h(e, t) {
  7051. if (e.length > t) throw(0, o.default)(`"${e}" is longer than ${4 * t} bits.`)
  7052. }
  7053. function p(e) {
  7054. if (e > 4294967295 || e < -4294967296) throw(0, o.default)("uint32ToLowerCaseHex given number over 32 bits");
  7055. return d((e >= 0 ? e : 4294967296 + e).toString(16), 8)
  7056. }
  7057. t.HEX_LOWER = s
  7058. }, 4037: (e, t, n) => {
  7059. "use strict";
  7060. var r = n(7914);
  7061. Object.defineProperty(t, "__esModule", {value: !0}), t.WA_USER_JID_SUFFIX = t.WA_USER_DOMAIN = t.WA_SERVER_JID_SUFFIX = t.WA_NEWSLETTER_JID_DOMAIN = t.SURVEY_USER_JID = t.STATUS_JID = t.PSA_JID = t.MSGR_USER_JID_SUFFIX = t.MSGR_USER_DOMAIN = t.LID_SUFFIX = t.LID_DOMAIN = t.INTEROP_USER_JID_SUFFIX = t.INTEROP_DOMAIN = t.DEFAULT_DEVICE_ID = t.AUTHOR_SYSTEM = t.AUTHOR_ME = void 0, t.asChatJid = function (e) {
  7062. return e === c ? null : e
  7063. }, t.asMulticastJid = function (e) {
  7064. return null == M(e) ? e : null
  7065. }, t.asPhoneChatJid = function (e) {
  7066. return e === c ? null : e
  7067. }, t.asStatusJid = function (e) {
  7068. return e === c ? c : null
  7069. }, t.authorAsPhoneUserJid = function (e) {
  7070. if (e === s || e === a) return null;
  7071. if (!e.endsWith(g)) return null;
  7072. return e
  7073. }, t.authorAsUserJid = function (e) {
  7074. if (e === s || e === a) return null;
  7075. return e
  7076. }, t.authorToUserId = function (e, t) {
  7077. return e === s || e === a ? t : U(e)
  7078. }, t.createJidUtils = function (e) {
  7079. let {platform: t} = e;
  7080. const n = "msgr" === t ? d : g;
  7081. return {
  7082. toUserJid: function (e) {
  7083. return `${e}${n}`
  7084. }, getUserDomain: function () {
  7085. return n
  7086. }, getGroupCallDomain: function () {
  7087. return "@call"
  7088. }
  7089. }
  7090. }, t.defaultDeviceJidForUser = X, t.defaultLidDeviceJidForLidUserJid = function (e) {
  7091. return O(e, 0)
  7092. }, t.defaultMsgrDeviceJidForUser = function (e) {
  7093. return `${I(e)}:0@msgr`
  7094. }, t.defaultPhoneDeviceJidForUser = function (e) {
  7095. return `${I(e)}:0@s.whatsapp.net`
  7096. }, t.extractDeviceIDParts = R, t.extractDeviceId = C, t.extractFromJid = J, t.extractJidFromJidWithType = function (e) {
  7097. return "phoneDevice" === e.jidType || "interopDevice" === e.jidType || "lidDevice" === e.jidType || "msgrDevice" === e.jidType ? e.deviceJid : "lidUser" === e.jidType || "interopUser" === e.jidType || "msgrUser" === e.jidType || "phoneUser" === e.jidType ? e.userJid : "group" === e.jidType ? e.groupJid : "status" === e.jidType ? e.statusJid : "call" === e.jidType ? e.callJid : "newsletter" === e.jidType ? e.newsletterJid : (e.jidType, e.broadcastJid)
  7098. }, t.extractPhoneUserJid = function (e) {
  7099. return L(e)
  7100. }, t.extractUserId = U, t.extractUserJid = L, t.fullFormDeviceJidString = function (e) {
  7101. const {user: t, agent: n = "0", device: r = "0", server: o} = N(e);
  7102. return `${t}.${n}:${r}@${o}`
  7103. }, t.getGroupDomain = function () {
  7104. return l
  7105. }, t.getMsgrUserDomain = function () {
  7106. return d
  7107. }, t.getServerDomain = function () {
  7108. return "@s.whatsapp.net"
  7109. }, t.getWhatsappUserDomain = function () {
  7110. return g
  7111. }, t.groupIdFromJid = function (e) {
  7112. if (e.endsWith(l)) return e.slice(0, -l.length);
  7113. throw(0, i.default)(`groupId called with non-group jid "${e}"`)
  7114. }, t.interpretAndValidateJid = B, t.interpretAsDeviceId = function (e) {
  7115. return e
  7116. }, t.interpretAsGroupJid = G, t.interpretAsNumber = function (e) {
  7117. return e
  7118. }, t.interpretAsPhoneUserJid = function (e) {
  7119. return e.endsWith(g) ? e : null
  7120. }, t.interpretAsUserJid = M, t.isAuthorMe = function (e) {
  7121. return "@me" === e
  7122. }, t.isAuthorSystem = function (e) {
  7123. return "@system" === e
  7124. }, t.isLidUser = function (e) {
  7125. return e.endsWith(E)
  7126. }, t.isPrimaryDevice = function (e) {
  7127. return 0 === C(e)
  7128. }, t.lidFromLidUserJid = $, t.lidOrPhoneFromUserJid = function (e) {
  7129. if (e.endsWith(g)) return D(e);
  7130. if (e.endsWith(E)) return $(e);
  7131. throw(0, i.default)(`lidOrPhoneFromUserJid called with non phone or lid jid "${e}"`)
  7132. }, t.maybeSanitizeLogLineText = function (e) {
  7133. if (!e.includes("@")) return e;
  7134. return e.replace(x, W)
  7135. }, t.parseJidParts = N, t.phoneNumberFromJid = D, t.sanitizeJidForLogging = W, t.stripAgentIdFromPhoneDeviceJid = function (e) {
  7136. const {user: t, device: n = "0", server: r} = N(e);
  7137. return `${t}:${n}@${r}`
  7138. }, t.switchOnChatJidType = Y, t.switchOnJidType = function (e, t) {
  7139. if (e === c) return t.status();
  7140. return Y(e, {
  7141. interopUser: t.interopUser,
  7142. phoneUser: t.phoneUser,
  7143. msgrUser: t.msgrUser,
  7144. lidUser: t.lidUser,
  7145. group: t.group
  7146. })
  7147. }, t.switchOnMsgrChatJidType = function (e, t) {
  7148. if (e.endsWith(d)) return t.user(e);
  7149. if (null != G(e)) return t.group(e);
  7150. throw(0, i.default)(`Can not switch on chat jid ${e}`)
  7151. }, t.switchOnMulticastJidType = function (e, t) {
  7152. if (e === c) return t.multicast(c);
  7153. return H(e, {user: t.user, group: t.multicast})
  7154. }, t.switchOnPhoneChatJidType = H, t.switchOnPhoneJidType = function (e, t) {
  7155. if (e === c) return t.status();
  7156. return H(e, {user: t.user, group: t.group})
  7157. }, t.switchOnUserChatJidType = function (e, t) {
  7158. return Y(e, {
  7159. lidUser: e => t.user(e),
  7160. interopUser: e => t.user(e),
  7161. msgrUser: e => t.user(e),
  7162. phoneUser: e => t.user(e),
  7163. group: e => t.group(e)
  7164. })
  7165. }, t.toBroadcastJid = function (e) {
  7166. return `${e}@broadcast`
  7167. }, t.toDeviceJid = function (e, t) {
  7168. return `${I(e)}:${t}${V(e)}`
  7169. }, t.toGroupJid = function (e) {
  7170. if (e.endsWith(l)) return e;
  7171. return `${e}@g.us`
  7172. }, t.toLidDeviceJid = O, t.toLidUserJid = function (e) {
  7173. return `${e}@lid`
  7174. }, t.toMsgrDeviceJid = function (e, t) {
  7175. return `${I(e)}:${t}@msgr`
  7176. }, t.toMsgrUserJid = P, t.toNewsletterJid = function (e) {
  7177. if (e.endsWith(v)) return e;
  7178. return `${e}@newsletter`
  7179. }, t.toPhoneDeviceJid = function (e, t) {
  7180. return `${I(e)}:${t}@s.whatsapp.net`
  7181. }, t.toPhoneUserJid = function (e) {
  7182. return `${e}@s.whatsapp.net`
  7183. }, t.unsafeCoerceToChatJid = function (e) {
  7184. return e
  7185. }, t.unsafeCoerceToDeviceId = ce, t.unsafeCoerceToDeviceJid = Z, t.unsafeCoerceToGroupJid = ae, t.unsafeCoerceToInteropDeviceJid = te, t.unsafeCoerceToInteropUserJid = ie, t.unsafeCoerceToLidDeviceJid = ne, t.unsafeCoerceToMsgrDeviceJid = ee, t.unsafeCoerceToMsgrUserJid = se, t.unsafeCoerceToNewsletterJid = function (e) {
  7186. return e
  7187. }, t.unsafeCoerceToPhoneDeviceJid = Q, t.unsafeCoerceToPhoneUserJid = oe, t.unsafeCoerceToUserJid = re, t.userIdFromJid = I, t.validateBroadcastJid = q, t.validateCallJid = function (e) {
  7188. return T.test(e) ? e : null
  7189. }, t.validateChatJid = function (e) {
  7190. return K(e) || z(e)
  7191. }, t.validateDeviceJid = function (e) {
  7192. if (w.test(e) || p.test(e) || f.test(e) || k.test(e)) return e;
  7193. if (S.test(e)) return X(e);
  7194. return null
  7195. }, t.validateDomainJid = function (e) {
  7196. return "s.whatsapp.net" === e || "g.us" === e ? e : null
  7197. }, t.validateGroupJid = z, t.validateMulticastJid = function (e) {
  7198. return F(e) || z(e) || q(e) ? e : null
  7199. }, t.validateNewsletterJid = function (e) {
  7200. return y.test(e) ? e : null
  7201. }, t.validateStatusJid = F, t.validateUserJid = K;
  7202. var o = r(n(7537)), i = r(n(2065));
  7203. t.DEFAULT_DEVICE_ID = 0;
  7204. const s = "@me";
  7205. t.AUTHOR_ME = s;
  7206. const a = "@system";
  7207. t.AUTHOR_SYSTEM = a;
  7208. const c = "status@broadcast";
  7209. t.STATUS_JID = c;
  7210. t.PSA_JID = "0@s.whatsapp.net";
  7211. const l = "@g.us", u = /^([1-9][0-9]{0,19}|(?!10)[1-9][0-9]{4,19}-[1-9][0-9]{9})@g.us$/, d = "@msgr";
  7212. t.MSGR_USER_DOMAIN = d;
  7213. t.MSGR_USER_JID_SUFFIX = "msgr";
  7214. const _ = "@interop";
  7215. t.INTEROP_DOMAIN = _;
  7216. t.INTEROP_USER_JID_SUFFIX = "interop";
  7217. const f = /^([1-9][0-9]{0,2}-[1-9][0-9]{0,14}(:[0])?)@interop$/,
  7218. h = /^([1-9][0-9]{0,2}-[1-9][0-9]{0,14}(:[0])?)@interop$/,
  7219. p = /^([1-9][0-9]{0,19}(:[1-9][0-9]{0,2})?)@msgr$/, b = /^([1-9][0-9]{0,19})@msgr$/,
  7220. m = /^([1-9][0-9]{0,19})(:0)?@msgr$/;
  7221. t.WA_SERVER_JID_SUFFIX = "s.whatsapp.net";
  7222. const g = "@s.whatsapp.net";
  7223. t.WA_USER_DOMAIN = g;
  7224. t.WA_USER_JID_SUFFIX = "s.whatsapp.net";
  7225. const v = "@newsletter";
  7226. t.WA_NEWSLETTER_JID_DOMAIN = v;
  7227. const y = /^([1-9][0-9]{0,19})@newsletter$/,
  7228. w = /^(0|((?!10)[1-9][0-9]{4,19}(\.[0-9]{1,2})?(:[0-9]{1,2})))@s.whatsapp.net$/,
  7229. S = /^(0|((?!10)[1-9][0-9]{4,19})(\.[0-9]{1,2})?)@s.whatsapp.net$/, E = "@lid";
  7230. t.LID_DOMAIN = E;
  7231. t.LID_SUFFIX = "lid";
  7232. const j = /^([1-9][0-9]{0,14})@lid$/, k = /^([1-9][0-9]{0,14}(:[0-9]{1,2})?)@lid$/,
  7233. A = /^(status|location|[1-9][0-9]{0,19})@broadcast$/, T = /^([0-9a-fA-F]{18,32})@call$/;
  7234. t.SURVEY_USER_JID = "16505361212@s.whatsapp.net";
  7235. const x = /([0-9a-zA-Z-:]+)@(g\.us|call|s\.whatsapp\.net|broadcast|msgr|lid)/g;
  7236. function P(e) {
  7237. return `${e}@msgr`
  7238. }
  7239. function I(e) {
  7240. if (e.endsWith(g)) return e.slice(0, -g.length);
  7241. if (e.endsWith(d)) return e.slice(0, -d.length);
  7242. if (e.endsWith(_)) return e.slice(0, -_.length);
  7243. if (e.endsWith(E)) return e.slice(0, -E.length);
  7244. throw(0, i.default)(`userIdFromJid called with non-user jid "${e}"`)
  7245. }
  7246. function O(e, t) {
  7247. return `${$(e)}:${t}@lid`
  7248. }
  7249. function U(e) {
  7250. return e.split("@")[0]
  7251. }
  7252. function R(e) {
  7253. const t = e.split("@")[0].split(":"), n = t[0], r = t[1];
  7254. return {userId: n, deviceID: parseInt(r, 10)}
  7255. }
  7256. function C(e) {
  7257. return R(e).deviceID
  7258. }
  7259. function D(e) {
  7260. if (!e.endsWith(g)) throw(0, i.default)(`phoneNumberFromJid called with non-user jid "${e}"`);
  7261. return e.slice(0, -g.length)
  7262. }
  7263. function M(e) {
  7264. return e.endsWith(g) || e.endsWith(_) || e.endsWith(d) || e.endsWith(E) ? e : null
  7265. }
  7266. function $(e) {
  7267. if (!e.endsWith(E)) throw(0, i.default)(`lidFromLidUserJid called with non-LidUserJid "${e}"`);
  7268. return e.slice(0, -E.length)
  7269. }
  7270. function L(e) {
  7271. const t = e.split("@");
  7272. let n = t[0];
  7273. const r = t[1];
  7274. return n = n.split(":")[0], n = n.split(".")[0], `${n}@${r}`
  7275. }
  7276. function N(e) {
  7277. const [t, n] = e.split("@"), [r, o] = t.split(":"), [i, s] = r.split(".");
  7278. return {user: i, device: o, agent: s, server: n}
  7279. }
  7280. function J(e) {
  7281. switch (e.jidType) {
  7282. case"interopUser":
  7283. case"lidUser":
  7284. case"msgrUser":
  7285. case"phoneUser":
  7286. return e.userJid;
  7287. case"group":
  7288. return e.groupJid;
  7289. case"status":
  7290. return e.statusJid;
  7291. case"interopDevice":
  7292. case"lidDevice":
  7293. case"msgrDevice":
  7294. case"phoneDevice":
  7295. return e.deviceJid;
  7296. case"broadcast":
  7297. return e.broadcastJid;
  7298. case"call":
  7299. return e.callJid;
  7300. case"newsletter":
  7301. return e.newsletterJid;
  7302. default:
  7303. return (0, o.default)(e.jidType)
  7304. }
  7305. }
  7306. function B(e) {
  7307. if (e === c) return {jidType: "status", statusJid: c};
  7308. if (S.test(e)) return {jidType: "phoneUser", userJid: e};
  7309. if (h.test(e)) return {jidType: "interopUser", userJid: e};
  7310. if (b.test(e)) return {jidType: "msgrUser", userJid: e};
  7311. if (m.test(e)) {
  7312. return {jidType: "msgrUser", userJid: P(e.substr(0, e.indexOf(":")))}
  7313. }
  7314. return w.test(e) ? {jidType: "phoneDevice", deviceJid: e} : f.test(e) ? {
  7315. jidType: "interopDevice",
  7316. deviceJid: e
  7317. } : p.test(e) ? {jidType: "msgrDevice", deviceJid: e} : u.test(e) ? {
  7318. jidType: "group",
  7319. groupJid: e.endsWith(l) ? e : `${e}@g.us`
  7320. } : A.test(e) ? {jidType: "broadcast", broadcastJid: e} : T.test(e) ? {
  7321. jidType: "call",
  7322. callJid: e
  7323. } : j.test(e) ? {jidType: "lidUser", userJid: e} : k.test(e) ? {
  7324. jidType: "lidDevice",
  7325. deviceJid: e
  7326. } : y.test(e) ? {jidType: "newsletter", newsletterJid: e} : {jidType: "unknown"}
  7327. }
  7328. function F(e) {
  7329. return "status@broadcast" === e ? e : null
  7330. }
  7331. function K(e) {
  7332. if (S.test(e) || h.test(e) || b.test(e) || j.test(e)) return e;
  7333. if (m.test(e)) {
  7334. return P(e.substr(0, e.indexOf(":")))
  7335. }
  7336. return null
  7337. }
  7338. function q(e) {
  7339. return A.test(e) ? e : null
  7340. }
  7341. function z(e) {
  7342. return u.test(e) ? e : null
  7343. }
  7344. function W(e) {
  7345. const t = B(e);
  7346. return "unknown" === t.jidType ? e : "status" === t.jidType ? t.statusJid : (t.jidType, J(t).replace(/^([^@]*)([^@][^@][^@][^@])@(.*)$/, "...$2@$3"))
  7347. }
  7348. function G(e) {
  7349. return e.endsWith(l) ? e : null
  7350. }
  7351. function Y(e, t) {
  7352. if (e.endsWith(g)) return t.phoneUser(e);
  7353. if (e.endsWith(d)) return t.msgrUser(e);
  7354. if (e.endsWith(_)) return t.interopUser(e);
  7355. if (e.endsWith(E)) return t.lidUser(e);
  7356. if (null != G(e)) return t.group(e);
  7357. throw(0, i.default)(`Can not switch on chat jid ${e}`)
  7358. }
  7359. function H(e, t) {
  7360. if (e.endsWith(g)) return t.user(e);
  7361. if (null != G(e)) return t.group(e);
  7362. throw(0, i.default)(`Can not switch on chat jid ${e}`)
  7363. }
  7364. function V(e) {
  7365. if (e.endsWith(g)) return g;
  7366. if (e.endsWith(d)) return d;
  7367. if (e.endsWith(E)) return E;
  7368. throw(0, i.default)(`userDomainFromJid called with non-user jid "${e}"`)
  7369. }
  7370. function X(e) {
  7371. return `${I(e)}:0${V(e)}`
  7372. }
  7373. function Z(e) {
  7374. return e
  7375. }
  7376. function Q(e) {
  7377. return e
  7378. }
  7379. function ee(e) {
  7380. return e
  7381. }
  7382. function te(e) {
  7383. return e
  7384. }
  7385. function ne(e) {
  7386. return e
  7387. }
  7388. function re(e) {
  7389. return e
  7390. }
  7391. function oe(e) {
  7392. return e
  7393. }
  7394. function ie(e) {
  7395. return e
  7396. }
  7397. function se(e) {
  7398. return e
  7399. }
  7400. function ae(e) {
  7401. return e
  7402. }
  7403. function ce(e) {
  7404. return e
  7405. }
  7406. }, 9619: (e, t, n) => {
  7407. "use strict";
  7408. var r = n(7914);
  7409. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
  7410. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "?";
  7411. if (null == e) throw(0, o.default)(`Unexpected null or undefined: ${t}`);
  7412. return e
  7413. };
  7414. var o = r(n(2065))
  7415. }, 2207: (e, t, n) => {
  7416. "use strict";
  7417. var r = n(7914);
  7418. Object.defineProperty(t, "__esModule", {value: !0}), t.asyncChain = function (e, t) {
  7419. if (e.success) return t(e.value);
  7420. return Promise.resolve(e)
  7421. }, t.asyncMapError = u, t.asyncMapResult = c, t.catchError = function (e) {
  7422. return function () {
  7423. var t = (0, o.default)((function* (t) {
  7424. yield u(t, e)
  7425. }));
  7426. return function () {
  7427. return t.apply(this, arguments)
  7428. }
  7429. }()
  7430. }, t.chain = function (e, t) {
  7431. if (e.success) return t(e.value);
  7432. return e
  7433. }, t.makeError = i, t.makeResult = s, t.mapAsyncResult = function () {
  7434. return a.apply(this, arguments)
  7435. }, t.mapError = function (e, t) {
  7436. if (e.success) return s(e.value);
  7437. return i(t(e.error), e.payload)
  7438. }, t.mapResult = function (e, t) {
  7439. if (!e.success) return e;
  7440. return s(t(e.value))
  7441. }, t.onResult = function (e) {
  7442. return t => c(t, e)
  7443. };
  7444. var o = r(n(1504));
  7445. function i(e, t) {
  7446. return null != t ? {success: !1, error: e, payload: t} : {success: !1, error: e}
  7447. }
  7448. function s(e) {
  7449. return {success: !0, value: e}
  7450. }
  7451. function a() {
  7452. return (a = (0, o.default)((function* (e, t) {
  7453. const n = yield e;
  7454. return n.success ? s(t(n.value)) : n
  7455. }))).apply(this, arguments)
  7456. }
  7457. function c() {
  7458. return l.apply(this, arguments)
  7459. }
  7460. function l() {
  7461. return (l = (0, o.default)((function* (e, t) {
  7462. if (!e.success) return e;
  7463. return s(yield t(e.value))
  7464. }))).apply(this, arguments)
  7465. }
  7466. function u() {
  7467. return d.apply(this, arguments)
  7468. }
  7469. function d() {
  7470. return (d = (0, o.default)((function* (e, t) {
  7471. if (e.success) return s(e.value);
  7472. return i(yield t(e.error), e.payload)
  7473. }))).apply(this, arguments)
  7474. }
  7475. }, 8494: (e, t, n) => {
  7476. "use strict";
  7477. var r = n(7914);
  7478. Object.defineProperty(t, "__esModule", {value: !0}), t.ShiftTimer = void 0;
  7479. var o = r(n(2065));
  7480. function i(e) {
  7481. if (!(e >= 0)) throw(0, o.default)("ShiftTimer must be given delay >= 0")
  7482. }
  7483. t.ShiftTimer = class {
  7484. constructor(e) {
  7485. this._timer = 0, this._rafId = 0, this.ts = 0, this._timerTs = 0, this._upperBound = 0, this._lowerBound = 0, this._arg = void 0, this._run = () => {
  7486. const e = this._arg, t = this._foo;
  7487. this._rafId = 0, this._timer = 0, this.ts = 0, this._timerTs = 0, this._upperBound = 0, this._lowerBound = 0, this._arg = void 0, t(e)
  7488. }, this.onOrBefore = (e, t) => {
  7489. i(e);
  7490. const n = Date.now() + e, r = this._upperBound;
  7491. if (0 !== r && r < n) return;
  7492. const o = this._lowerBound;
  7493. 0 !== o && n < o || (this._upperBound = n, this._rafId || this._timer && !(n < this.ts) || this._setDelay(n, e, t))
  7494. }, this.forceRunNow = e => {
  7495. this._timer && clearTimeout(this._timer), this._rafId && cancelAnimationFrame(this._rafId), this._arg = e, this._run()
  7496. }, this.cancel = () => {
  7497. this._timer && clearTimeout(this._timer), this._rafId && cancelAnimationFrame(this._rafId), this._timer = 0, this._rafId = 0, this.ts = 0, this._timerTs = 0, this._upperBound = 0, this._lowerBound = 0, this._arg = void 0
  7498. }, this._foo = e
  7499. }
  7500. onOrBeforeRepaint(e) {
  7501. if (this._rafId) return;
  7502. const t = Date.now(), n = this._lowerBound;
  7503. if (0 !== n && t < n) return;
  7504. const r = this._upperBound;
  7505. (0 === r || t < r) && (this._upperBound = t), this._timer && (clearTimeout(this._timer), this._timer = 0), (!this.ts || this.ts > t) && (this.ts = t), this._arg = e, this._rafId = requestAnimationFrame(this._run)
  7506. }
  7507. onOrAfter(e, t) {
  7508. i(e);
  7509. const n = Date.now() + e, r = this._lowerBound;
  7510. if (0 !== r && n < r) return;
  7511. const o = this._upperBound;
  7512. 0 !== o && o < n || (this._lowerBound = n, (!this._timer || this.ts < n) && this._setDelay(n, e, t))
  7513. }
  7514. debounce(e, t) {
  7515. i(e), this._debounce(Date.now(), e, t)
  7516. }
  7517. debounceAndCap(e, t, n) {
  7518. i(e), i(t);
  7519. const r = Date.now(), o = r + t, s = this._lowerBound, a = this._upperBound;
  7520. (0 === s || s <= o) && (0 === a || o < a) && (this._upperBound = o), this._debounce(r, e, n)
  7521. }
  7522. forceRunNowIfScheduled() {
  7523. this._timer ? (clearTimeout(this._timer), this._run()) : this._rafId && (cancelAnimationFrame(this._rafId), this._run())
  7524. }
  7525. isScheduled() {
  7526. return 0 !== this._timer || 0 !== this._rafId
  7527. }
  7528. _debounce(e, t, n) {
  7529. const r = e + t, o = this._lowerBound;
  7530. if (0 !== o && r < o) return;
  7531. const i = this.ts, s = this._upperBound;
  7532. 0 !== s && s < r ? i < s && this._setDelay(s, s - e, n) : i < r && this._setDelay(r, t, n)
  7533. }
  7534. _setDelay(e, t, n) {
  7535. if (this._rafId && (cancelAnimationFrame(this._rafId), this._rafId = 0), this._arg = n, this.ts = e, this._timer) {
  7536. const t = e - this._timerTs;
  7537. if (-16 < t && t < 16) return;
  7538. clearTimeout(this._timer)
  7539. }
  7540. this._timer = setTimeout(this._run, t), this._timerTs = e
  7541. }
  7542. }
  7543. }, 9987: (e, t, n) => {
  7544. "use strict";
  7545. Object.defineProperty(t, "__esModule", {value: !0}), t.YEAR_SECONDS = t.WEEK_SECONDS = t.WEEK_MILLISECONDS = t.MonotonicTimer = t.MINUTE_SECONDS = t.MINUTE_MILLISECONDS = t.MAX_INT = t.HOUR_SECONDS = t.HOUR_MILLISECONDS = t.FIVE_MINUTES = t.DEFAULT_UNIXTIME = t.DAY_SECONDS = t.DAY_MILLISECONDS = void 0, t.cappedMillisecondsUntil = b, t.castLongIntToUnixTime = function (e) {
  7546. return "number" != typeof e ? (0, r.hexLongIsNegative)(e) ? u : l : f(e)
  7547. }, t.castMilliSecondsToUnixTime = h, t.castMillisTimeToUnixTime = function (e) {
  7548. if (null == e) return e;
  7549. return e > l ? h(e) : f(e)
  7550. }, t.castToMillisTime = p, t.castToUnixTime = f, t.castUnixTimeToMillisTime = function (e) {
  7551. return 1e3 * e
  7552. }, t.convertHexToDate = function (e) {
  7553. const t = Number.parseInt(e, 16);
  7554. if (Number.isFinite(t)) return new Date(1e3 * f(t));
  7555. return null
  7556. }, t.delayUntil = function (e) {
  7557. const t = b(e);
  7558. return new Promise((e => {
  7559. setTimeout(e, t)
  7560. }))
  7561. }, t.fromMillisTime = function (e) {
  7562. return e
  7563. }, t.futureUnixTime = function (e, t) {
  7564. const n = null != t ? t : m();
  7565. return f(Math.ceil(n + Math.max(e, 0)))
  7566. }, t.getClockSkew = function () {
  7567. return _
  7568. }, t.happenedWithin = function (e, t) {
  7569. return w(m(), e, t)
  7570. }, t.happenedWithinAt = w, t.isInFuture = function (e) {
  7571. return g(e) > 0
  7572. }, t.isOverflowTime = function (e) {
  7573. return e < u || e > l
  7574. }, t.isWithinNext24h = function (e) {
  7575. return e - m() <= i
  7576. }, t.midnight = function () {
  7577. return f((new Date).setHours(0, 0, 0, 0) / 1e3 - _)
  7578. }, t.midnightOn = function (e) {
  7579. return f(S(e).setHours(0, 0, 0, 0) / 1e3 - _)
  7580. }, t.millisTime = function () {
  7581. return E() - 1e3 * _
  7582. }, t.monotonicTime = v, t.monotonicTimeSince = y, t.oldest = function (e, t) {
  7583. return e < t ? e : t
  7584. }, t.pastUnixTime = function (e, t) {
  7585. const n = null != t ? t : m();
  7586. return f(Math.ceil(n - Math.max(e, 0)))
  7587. }, t.performanceAbsoluteNow = E, t.sameDay = function (e, t) {
  7588. if (Math.abs(e - t) > i) return !1;
  7589. const n = d.time === e ? d.day : S(e + _).getDay(), r = d.time === t ? d.day : S(t + _).getDay();
  7590. return d.time = t, d.day = r, n === r
  7591. }, t.secondsUntil = g, t.setClockSkew = function (e) {
  7592. _ = e
  7593. }, t.timeSince_USE_ONLY_IF_APPROVED = function (e) {
  7594. return Math.max(m() - e, 0)
  7595. }, t.timeoutFor = function (e, t) {
  7596. const n = m(), r = Math.max(e + t - n, 0);
  7597. return Math.min(1e3 * r, ~(1 << 31))
  7598. }, t.toDate = S, t.toHttpHeaderDate = function (e) {
  7599. return S(e).toUTCString()
  7600. }, t.unixTime = m, t.unixTimeMs = function () {
  7601. return Date.now() - 1e3 * _
  7602. }, t.unixTimeWithoutClockSkewCorrection = function () {
  7603. return f(Date.now() / 1e3)
  7604. }, t.unskewedDate_USE_ONLY_IF_APPROVED = function () {
  7605. return new Date
  7606. };
  7607. var r = n(5982);
  7608. t.MINUTE_SECONDS = 60;
  7609. t.FIVE_MINUTES = 300;
  7610. const o = 3600;
  7611. t.HOUR_SECONDS = o;
  7612. const i = 86400;
  7613. t.DAY_SECONDS = i;
  7614. t.WEEK_SECONDS = 604800;
  7615. t.YEAR_SECONDS = 31536e3;
  7616. t.MINUTE_MILLISECONDS = 6e4;
  7617. const s = 36e5;
  7618. t.HOUR_MILLISECONDS = s;
  7619. const a = 864e5;
  7620. t.DAY_MILLISECONDS = a;
  7621. t.WEEK_MILLISECONDS = 6048e5;
  7622. const c = 1 << 31;
  7623. t.DEFAULT_UNIXTIME = c;
  7624. const l = 2147483647;
  7625. t.MAX_INT = l;
  7626. const u = -2147483647, d = {time: 0, day: -4};
  7627. let _ = 0;
  7628. function f(e) {
  7629. return Math.max(u, Math.min(0 | e, l))
  7630. }
  7631. function h(e) {
  7632. return f(e / 1e3)
  7633. }
  7634. function p(e) {
  7635. return e
  7636. }
  7637. function b(e) {
  7638. const t = Math.max(e - m(), 0);
  7639. return Math.min(1e3 * t, ~(1 << 31))
  7640. }
  7641. function m() {
  7642. return f(Date.now() / 1e3 - _)
  7643. }
  7644. function g(e) {
  7645. return Math.max(e - m(), 0)
  7646. }
  7647. function v() {
  7648. return performance.now()
  7649. }
  7650. function y(e) {
  7651. return Math.floor(performance.now() - e)
  7652. }
  7653. function w(e, t, n) {
  7654. return Math.abs(e - t) <= n
  7655. }
  7656. function S(e) {
  7657. return new Date(1e3 * e)
  7658. }
  7659. function E() {
  7660. return Date.now()
  7661. }
  7662. t.MonotonicTimer = class {
  7663. constructor() {
  7664. const e = v();
  7665. this._initTime = e, this._startTime = e
  7666. }
  7667. reset() {
  7668. this._startTime = v()
  7669. }
  7670. elapsed() {
  7671. return y(this._startTime)
  7672. }
  7673. cumulative() {
  7674. return y(this._initTime)
  7675. }
  7676. }
  7677. }, 7791: (e, t) => {
  7678. "use strict";
  7679. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e, t) {
  7680. const n = [], r = e.length, o = t.length, i = Math.max(r, o);
  7681. for (let s = 0; s < i; s++) s < r && n.push(e[s]), s < o && n.push(t[s]);
  7682. return n
  7683. }
  7684. }, 6432: (e, t) => {
  7685. "use strict";
  7686. function n(e, t) {
  7687. const r = function () {
  7688. for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
  7689. const s = t ? t.apply(this, o) : o[0];
  7690. if (null == s) return e.apply(this, o);
  7691. const a = r.cache;
  7692. if (a.has(s)) return a.get(s);
  7693. const c = e.apply(this, o);
  7694. return r.cache = a.set(s, c) || a, c
  7695. };
  7696. return r.cache = new (n.Cache || Map), r
  7697. }
  7698. Object.defineProperty(t, "__esModule", {value: !0}), t.default = n, n.Cache = Map
  7699. }, 29: (e, t, n) => {
  7700. "use strict";
  7701. Object.defineProperty(t, "__esModule", {value: !0}), t.castTypedArrays = function (e, t) {
  7702. if (t instanceof e) return t;
  7703. if ("string" == typeof t) return new e((0, r.decodeB64)(t));
  7704. return new e(t)
  7705. };
  7706. var r = n(2089)
  7707. }, 8358: (e, t) => {
  7708. "use strict";
  7709. Object.defineProperty(t, "__esModule", {value: !0}), t.concatTypedArrays = function (e, t) {
  7710. let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
  7711. const r = t.reduce(((e, t) => e + t.length), n), o = new e(r);
  7712. let i = 0;
  7713. return t.forEach((e => {
  7714. o.set(e, i), i += e.length
  7715. })), o
  7716. }
  7717. }, 8481: (e, t, n) => {
  7718. "use strict";
  7719. var r = n(7914);
  7720. Object.defineProperty(t, "__esModule", {value: !0}), t.ParsableXmlNode = void 0, t.convertBytesToUint = a;
  7721. var o = r(n(2065)), i = r(n(9028)), s = n(7448);
  7722. function a(e, t) {
  7723. let n = 0;
  7724. for (let r = 0; r < t; r++) n = 256 * n + e[r];
  7725. return n
  7726. }
  7727. t.ParsableXmlNode = class {
  7728. constructor(e, t) {
  7729. this._name = e, this._node = t, this._children = Array.isArray(t.content) ? t.content.map((t => new this.constructor(e, t))) : null
  7730. }
  7731. name() {
  7732. return this._name
  7733. }
  7734. node() {
  7735. return this._node
  7736. }
  7737. hasAttr(e) {
  7738. return (0, i.default)(this._node.attrs, e)
  7739. }
  7740. assertTag(e) {
  7741. this._node.tag !== e && this.throw(`to be <${e}>`)
  7742. }
  7743. tag() {
  7744. return this._node.tag
  7745. }
  7746. maybeChild(e) {
  7747. const t = this._children;
  7748. if (!t) return null;
  7749. for (let n = 0; n < t.length; n++) if (t[n].tag() === e) return t[n];
  7750. return null
  7751. }
  7752. hasChild(e) {
  7753. return !!this.maybeChild(e)
  7754. }
  7755. child(e) {
  7756. const t = this.maybeChild(e);
  7757. return t || this.throw(`to have child <${e}>`)
  7758. }
  7759. assertAttr(e, t) {
  7760. const n = this.attrString(e);
  7761. n !== t && this.throw(`to have "${e}"="${t}", but instead has "${n}"`)
  7762. }
  7763. attrString(e) {
  7764. return (0, i.default)(this._node.attrs, e) ? this.decodeAsString(this._node.attrs[e]) : this.throw(`to have attribute "${e}"`)
  7765. }
  7766. forEachAttributeKey(e) {
  7767. const t = this._node.attrs;
  7768. Object.keys(t).forEach((t => e(t)))
  7769. }
  7770. maybeAttrString(e) {
  7771. return this.hasAttr(e) ? this.decodeAsString(this._node.attrs[e]) : null
  7772. }
  7773. maybeAttrInt(e, t, n) {
  7774. return this.hasAttr(e) ? this.attrInt(e, t, n) : null
  7775. }
  7776. attrEnumValues(e, t, n) {
  7777. const r = new Set(t), o = this.attrString(e);
  7778. if (!r.has(o)) {
  7779. if (null != n) return n;
  7780. const t = Array.from(r).join("|");
  7781. return this.throw(`to have "${e}"={${t}} but has value "${o}"`)
  7782. }
  7783. return o
  7784. }
  7785. attrEnum(e, t) {
  7786. const n = this.attrString(e);
  7787. if (!(0, i.default)(t, n)) {
  7788. const r = Object.keys(t).join("|");
  7789. return this.throw(`to have "${e}"={${r}} but has value "${n}"`)
  7790. }
  7791. return t[n]
  7792. }
  7793. attrEnumOrNullIfUnknown(e, t) {
  7794. const n = this.attrString(e);
  7795. return (0, i.default)(t, n) ? t[n] : null
  7796. }
  7797. attrEnumOrDefault(e, t, n) {
  7798. return this.hasAttr(e) ? this.attrEnum(e, t) : n
  7799. }
  7800. attrInt(e, t, n) {
  7801. const r = this.attrString(e);
  7802. return this._parseInt(r, e, t, n)
  7803. }
  7804. _parseInt(e, t, n, r) {
  7805. const o = parseInt(e, 10);
  7806. return Number.isNaN(o) ? this.throw(`to have "${t}"={integer} but has value "${e}"`) : void 0 !== n && o < n ? this.throw(`to have "${t}"={at least ${n}} but has value ${o}`) : void 0 !== r && o >= r ? this.throw(`to have "${t}"={below ${r}} but has value ${o}`) : o
  7807. }
  7808. forEachChild(e) {
  7809. const t = this._children;
  7810. if (t) t.forEach((t => e(t))); else if (null != this._node.content) return this.throw("to have children")
  7811. }
  7812. forEachChildWithTag(e, t) {
  7813. this.forEachChild((n => {
  7814. n.tag() === e && t(n)
  7815. }))
  7816. }
  7817. mapChildren(e) {
  7818. const t = this._children;
  7819. return t || null == this._node.content ? t ? t.map((t => e(t))) : [] : this.throw("to have children")
  7820. }
  7821. mapChildrenWithTag(e, t) {
  7822. const n = this._children;
  7823. return n || null == this._node.content ? n ? n.filter((t => t.tag() === e)).map((e => t(e))) : [] : this.throw("to have children")
  7824. }
  7825. mapFirstChild(e) {
  7826. const t = this._children;
  7827. return t && 0 !== t.length ? e(t[0]) : this.throw("to have children")
  7828. }
  7829. hasContent() {
  7830. return !this._children && !!this._node.content
  7831. }
  7832. hasChildren() {
  7833. return null != this._children
  7834. }
  7835. getChildren() {
  7836. return this._children
  7837. }
  7838. mapAttrKeys(e) {
  7839. const t = this.getAttrKeys();
  7840. return t && t.length ? t.map(e) : []
  7841. }
  7842. getAttrKeys() {
  7843. return Object.keys(this._node.attrs)
  7844. }
  7845. hasAttrs() {
  7846. return (this._node.attrs ? Object.keys(this._node.attrs) : []).length > 0
  7847. }
  7848. getNode() {
  7849. return this._node
  7850. }
  7851. unsafeSetChildren(e) {
  7852. this._children = e
  7853. }
  7854. unsafeSetNodeContent(e) {
  7855. this._node.content = e
  7856. }
  7857. contentUint(e) {
  7858. return a(this.contentBytes(e), e)
  7859. }
  7860. contentBytes() {
  7861. let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : -1;
  7862. if (this._children) return this.throw("to have binary content, but has children instead");
  7863. if (null != this._node.content) {
  7864. const t = this._node.content;
  7865. return -1 !== e && t.length !== e ? this.throw(`to be ${e} bytes, but got ${t.length} instead`) : t
  7866. }
  7867. return this.throw("to have content")
  7868. }
  7869. contentString() {
  7870. return this._children ? this.throw("to have string content, but has children instead") : null != this._node.content ? this._node.content : this.throw("to have content")
  7871. }
  7872. contentInt(e, t) {
  7873. const n = this.contentString();
  7874. return this._parseInt(n, "content", e, t)
  7875. }
  7876. contentEnum(e) {
  7877. const t = this.contentString();
  7878. if (!(0, i.default)(e, t)) {
  7879. const n = Object.keys(e).join("|");
  7880. return this.throw(`to have content {${n}} but has value "${t}"`)
  7881. }
  7882. return e[t]
  7883. }
  7884. decodeAsString(e) {
  7885. if ("string" != typeof e) throw(0, o.default)(`decodeAsString: attribute is ${typeof e} not a string: ${e}`);
  7886. return e
  7887. }
  7888. throw(e) {
  7889. throw new s.XmlParsingFailure(this._name, `expected <${this._node.tag}> ${e}`)
  7890. }
  7891. toString() {
  7892. return this._node.toString()
  7893. }
  7894. }
  7895. }, 8132: (e, t) => {
  7896. "use strict";
  7897. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
  7898. const t = e.replace(/>\s{0,}</g, "><").replace(/</g, "~::~<").replace(/\s*xmlns:/g, "~::~xmlns:").replace(/\s*xmlns=/g, "~::~xmlns=").split("~::~"),
  7899. n = t.length;
  7900. let r = !1, o = 0, i = "", s = 0;
  7901. const a = ["\n"];
  7902. for (s = 0; s < 100; s++) a.push(a[s] + " ");
  7903. const c = function (e, t) {
  7904. const n = /^<[\w:\-.,]+/.exec(e[t - 1]), r = /^<\/[\w:\-.,]+/.exec(e[t]);
  7905. return null != n && null != r && n[0] === r[0]
  7906. };
  7907. for (s = 0; s < n; s++) t[s].search(/<!/) > -1 ? (i += a[o] + t[s], r = !0, (t[s].search(/-->/) > -1 || t[s].search(/\]>/) > -1 || t[s].search(/!DOCTYPE/) > -1) && (r = !1)) : t[s].search(/-->/) > -1 || t[s].search(/\]>/) > -1 ? (i += t[s], r = !1) : c(t, s) ? (i += t[s], r || o--) : t[s].search(/<\w/) > -1 && -1 === t[s].search(/<\//) && -1 === t[s].search(/\/>/) ? i = i += r ? t[s] : a[o++] + t[s] : t[s].search(/<\w/) > -1 && t[s].search(/<\//) > -1 ? i = i += r ? t[s] : a[o] + t[s] : t[s].search(/<\//) > -1 ? i = i += r ? t[s] : a[0 === o ? o : --o] + t[s] : t[s].search(/\/>/) > -1 ? i = i += r ? t[s] : a[o] + t[s] : t[s].search(/<\?/) > -1 || t[s].search(/xmlns:/) > -1 || t[s].search(/xmlns=/) > -1 ? i += a[o] + t[s] : i += t[s];
  7908. return "\n" === i[0] ? i.slice(1) : i
  7909. }
  7910. }, 3260: (e, t, n) => {
  7911. "use strict";
  7912. Object.defineProperty(t, "__esModule", {value: !0}), t.XmlNode = void 0, t.attrsToString = i, t.uint8ArrayToDebugString = s;
  7913. var r = n(5982);
  7914. const o = {};
  7915. function i(e) {
  7916. const t = Object.keys(e);
  7917. let n = "";
  7918. for (let r = 0; r < t.length; r++) {
  7919. const o = t[r];
  7920. n += ` ${o}="${e[o].toString()}"`
  7921. }
  7922. return n
  7923. }
  7924. function s(e) {
  7925. let t = "";
  7926. return t = 0 === e.length ? "\x3c!-- empty binary --\x3e" : e.length < 50 ? (0, r.bytesToDebugString)(e) : `\x3c!-- ${e.length} bytes --\x3e`, t
  7927. }
  7928. t.XmlNode = class {
  7929. constructor(e) {
  7930. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o,
  7931. n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
  7932. this.tag = e, this.attrs = t, this.content = n
  7933. }
  7934. toString() {
  7935. let e = "<" + this.tag;
  7936. e += i(this.attrs);
  7937. const t = this.content;
  7938. return Array.isArray(t) ? e += `>${t.map(String).join("")}</${this.tag}>` : t instanceof Uint8Array ? e += `>${s(t)}</${this.tag}>` : e += null != t ? `>${String(t)}</${this.tag}>` : " />", e
  7939. }
  7940. }
  7941. }, 7448: (e, t) => {
  7942. "use strict";
  7943. Object.defineProperty(t, "__esModule", {value: !0}), t.XmlParsingFailure = void 0;
  7944. t.XmlParsingFailure = class {
  7945. constructor(e, t) {
  7946. this.parser = e, this.reason = t
  7947. }
  7948. toString() {
  7949. return `XmlParsingFailure: ${this.parser}: ${this.reason}`
  7950. }
  7951. }
  7952. }, 2271: (e, t, n) => {
  7953. "use strict";
  7954. var r = n(5318), o = n(2765), i = r(n(733)), s = r(n(6128));
  7955. if (s.default.Promise.PSD.onunhandled = () => {
  7956. }, s.default.Promise.PSD.txRelaxedDurabilityEnabled = !0, (0, o.isFeatureEnabled)("native_promise_runtime")) {
  7957. const {loadStackPromisePolyfill: e} = n(9069);
  7958. e()
  7959. } else self.Promise = (0, i.default)(n(9909))
  7960. }, 3741: (e, t, n) => {
  7961. "use strict";
  7962. Object.defineProperty(t, "__esModule", {value: !0}), t.getABPropConfigValue = function (e) {
  7963. var t;
  7964. const n = r.ABPropConfigs[e], [i, s, a, c] = n, l = a;
  7965. if (null == o) return l;
  7966. return null !== (t = o(e)) && void 0 !== t ? t : l
  7967. }, t.setGetABPropConfigValueImpl = function (e) {
  7968. o = e
  7969. };
  7970. var r = n(9282);
  7971. let o = null
  7972. }, 9282: (e, t) => {
  7973. "use strict";
  7974. Object.defineProperty(t, "__esModule", {value: !0}), t.ABPropConfigs = void 0;
  7975. t.ABPropConfigs = {
  7976. order_details_total_order_minimum_value: [1719, "float", 1, 1],
  7977. order_details_total_maximum_value: [1684, "float", 5e3, 5e3],
  7978. order_details_total_minimum_value: [1683, "int", 0, 0],
  7979. order_messages_ephemeral_exception_enabled: [3240, "bool", !1, !0],
  7980. in_app_support_v2_enabled: [233, "bool", !1, !1],
  7981. in_app_support_v2_locale_langs: [379, "string", "", ""],
  7982. in_app_support_v2_numbers: [390, "string", "", ""],
  7983. in_app_support_v2_number_prefixes: [1031, "string", "15517868", "15517868"],
  7984. in_app_support_v2_jump_to_group: [819, "bool", !1, !1],
  7985. in_app_support_v2_jump_to_group_wait_time_in_ms: [974, "int", 5e3, 5e3],
  7986. quick_mute_enabled: [2765, "bool", !1, !1],
  7987. groups_dogfooding_ui: [308, "bool", !1, !1],
  7988. md_icdc_enabled: [309, "bool", !1, !1],
  7989. md_icdc_hash_length: [310, "int", 10, 10],
  7990. played_self_enabled: [361, "bool", !1, !1],
  7991. ephemeral_24h_duration: [407, "bool", !1, !0],
  7992. disappearing_mode: [536, "bool", !1, !1],
  7993. payments_expressive_backgrounds_enabled: [605, "bool", !1, !0],
  7994. ephemeral_allow_group_members: [432, "bool", !1, !0],
  7995. business_profile_refresh_m1_enabled: [470, "bool", !1, !0],
  7996. num_days_key_index_list_expiration: [730, "int", 35, 35],
  7997. num_days_before_device_expiry_check: [731, "int", 7, 7],
  7998. media_reupload_limit_mb: [1098, "int", 100, 100],
  7999. portrait_thumb_enabled_chat: [1961, "bool", !1, !0],
  8000. portrait_thumb_enabled_status: [1962, "bool", !1, !0],
  8001. default_video_limit_mb: [3185, "int", 16, 64],
  8002. default_video_limit_mb_newsletter: [4155, "int", 16, 16],
  8003. default_gif_limit_mb: [3656, "int", 16, 64],
  8004. default_audio_limit_mb: [3657, "int", 16, 64],
  8005. default_media_limit_mb: [3660, "int", 16, 64],
  8006. hd_video_label_enabled: [3934, "bool", !1, !0],
  8007. per_send_hd_video_setting_enabled: [3935, "bool", !1, !0],
  8008. per_send_hd_video_setting_for_groups_enabled: [4138, "bool", !1, !0],
  8009. hd_video_min_streaming_bandwidth: [3936, "int", 150, 150],
  8010. hd_video_show_data_warning_dialog: [4152, "bool", !1, !0],
  8011. hd_video_data_warning_max_mb: [4153, "int", 64, 64],
  8012. hd_video_definition_min_edge: [4171, "int", 720, 720],
  8013. hd_video_definition_max_edge: [4172, "int", 864, 864],
  8014. hd_video_definition_min_edge_with_max_edge: [4175, "int", 480, 480],
  8015. message_level_reporting: [535, "bool", !1, !0],
  8016. native_shop_preview_enabled: [636, "bool", !1, !0],
  8017. sync_archive_v2_setting: [736, "bool", !1, !1],
  8018. ptt_conversation_waveform: [637, "bool", !1, !0],
  8019. ptt_waveform_send: [746, "bool", !1, !0],
  8020. adv_v2_m4_m5: [753, "bool", !1, !1],
  8021. adv_v2_m6: [903, "bool", !1, !1],
  8022. ptt_draft_enabled: [777, "bool", !1, !0],
  8023. ptt_pausable_enabled: [871, "bool", !1, !0],
  8024. tos_3_client_gating_biz_initiated_enabled: [953, "bool", !1, !1],
  8025. tos_3_client_gating_enabled: [791, "bool", !1, !1],
  8026. tos_3_client_force_fetch_enabled: [792, "bool", !1, !1],
  8027. tos_client_state_fetch_enabled: [877, "bool", !1, !1],
  8028. tos_client_state_force_fetch_enabled: [878, "bool", !1, !1],
  8029. tos_client_state_fetch_iteration: [908, "int", 0, 0],
  8030. country_client_gating_enabled: [1105, "bool", !1, !1],
  8031. system_msg_numbers_fb_branded: [1035, "string", "16505434800,16503130062,16507885324,16508620604,16504228206,447710173736,16315551023,16505361212,16508129150,16315555102,16315558723,16505212669,16507885280,19032707825,0", "16505434800,16503130062,16507885324,16508620604,16504228206,447710173736,16315551023,16505361212,16508129150,16315555102,16315558723,16505212669,16507885280,19032707825,0"],
  8032. system_msg_numbers_fb_inc: [1036, "string", "", ""],
  8033. log_clock_skew: [1190, "bool", !1, !1],
  8034. trusted_contacts: [794, "bool", !1, !1],
  8035. trusted_contacts_sender: [995, "bool", !1, !1],
  8036. trusted_contacts_ti: [922, "bool", !1, !1],
  8037. tctoken_duration: [865, "int", 604800, 604800],
  8038. tctoken_num_buckets: [909, "int", 4, 4],
  8039. tctoken_duration_sender: [996, "int", 604800, 604800],
  8040. tctoken_num_buckets_sender: [997, "int", 4, 4],
  8041. reactions_receive: [827, "bool", !1, !0],
  8042. reactions_send: [828, "bool", !1, !0],
  8043. reactions_announcement_only: [1150, "bool", !1, !1],
  8044. reaction_cleanup_days: [987, "int", 31, 31],
  8045. reactions_chat_preview: [1605, "bool", !1, !0],
  8046. reactions_animations: [1361, "bool", !1, !0],
  8047. reactions_animations_simple: [1485, "bool", !1, !0],
  8048. md_migration_experience: [861, "int", 2, 2],
  8049. web_abprop_direct_connection_md: [869, "bool", !1, !0],
  8050. media_upload_prekeys_fetch_enabled: [907, "bool", !1, !0],
  8051. reactions_panel_prekeys_fetch_enabled: [1828, "bool", !1, !0],
  8052. status_quick_reply_enabled: [1455, "bool", !1, !0],
  8053. status_quick_reply_receiver_changes_enabled: [1974, "bool", !1, !0],
  8054. ptt_remember_play_position: [952, "bool", !1, !0],
  8055. banned_shops_ux_enabled: [957, "bool", !1, !0],
  8056. group_suspend_v0_enabled: [973, "bool", !1, !0],
  8057. expiring_groups_enabled: [3181, "bool", !1, !1],
  8058. community_breakout_groups_enabled: [3864, "bool", !1, !0],
  8059. parent_group_directory_enabled: [3795, "bool", !1, !0],
  8060. parent_group_view_enabled: [982, "bool", !1, !0],
  8061. parent_group_create_enabled: [1173, "bool", !1, !0],
  8062. parent_group_query_ts: [1228, "int", 0, 0],
  8063. parent_group_link_limit: [1238, "int", 50, 10],
  8064. allow_subgroup_admin_to_unlink: [3054, "bool", !1, !0],
  8065. community_creation_no_add_groups_screen: [3246, "bool", !1, !0],
  8066. community_announcement_group_size_limit: [2774, "int", 5e3, 5e3],
  8067. community_announcement_improvement_m1: [3121, "bool", !1, !0],
  8068. community_announcement_improvement_m2: [3239, "bool", !1, !0],
  8069. community_announcement_improvement_m3: [3380, "bool", !1, !0],
  8070. community_creation_nux_always: [4053, "bool", !1, !1],
  8071. community_creation_nux_count: [4071, "int", 1, 1],
  8072. community_subgroup_icon_variant: [3078, "int", 0, 2],
  8073. community_subgroup_identity_v2: [4160, "bool", !1, !0],
  8074. parent_group_link_limit_community_creation: [1990, "int", 10, 10],
  8075. parent_group_admins_limit: [1655, "int", 20, 20],
  8076. parent_group_view_enabled_for_smb_on_web: [2205, "bool", !1, !0],
  8077. parent_group_create_enabled_for_smb_on_web: [2206, "bool", !1, !0],
  8078. parent_group_create_privacy: [2356, "bool", !1, !0],
  8079. parent_group_min_participants_for_group_entry_point: [2382, "int", 20, 20],
  8080. parent_group_tap_to_request_enabled: [2436, "bool", !1, !0],
  8081. parent_group_tap_to_add_enabled: [2446, "bool", !1, !0],
  8082. parent_group_no_disclaimer: [2447, "bool", !1, !0],
  8083. parent_group_subgroup_filter: [3147, "bool", !1, !1],
  8084. community_groups_navigation: [3023, "bool", !1, !0],
  8085. community_chat_list_tabs: [3748, "bool", !1, !1],
  8086. parent_group_no_subgroup_requirement: [3167, "bool", !1, !0],
  8087. community_admin_promotion_one_time_prompt: [1864, "bool", !1, !1],
  8088. document_preview_caption_changes_enabled: [2307, "bool", !1, !0],
  8089. forwarded_ptt_ui_enabled: [1040, "bool", !1, !0],
  8090. shops_storefront_url_format: [1054, "string", "https://www.facebook.com/%s/shop/", "https://www.facebook.com/%s/shop/"],
  8091. message_count_logging_md_enabled: [1135, "bool", !1, !1],
  8092. url_send_receive_logging_enabled: [2430, "bool", !1, !0],
  8093. inline_video_playback_additional_logging_enabled: [2431, "bool", !1, !0],
  8094. dev_prop_string: [1064, "string", "", ""],
  8095. dev_prop_boolean: [1065, "bool", !1, !1],
  8096. dev_prop_int: [1066, "int", 0, 0],
  8097. dev_prop_float: [1067, "float", 0, 0],
  8098. disable_status_to_non_sub: [3077, "bool", !1, !1],
  8099. order_details_from_cart_enabled: [1107, "bool", !1, !0],
  8100. order_details_custom_item_enabled: [1176, "bool", !1, !0],
  8101. order_details_from_catalog_enabled: [1212, "bool", !1, !0],
  8102. md_app_state_critical_data_processing_logging: [1187, "bool", !1, !0],
  8103. md_app_state_report_md_sync_mutation_stats: [1221, "bool", !1, !0],
  8104. order_management_enabled: [1188, "bool", !1, !1],
  8105. growth_lock_v0_enabled: [1204, "bool", !1, !0],
  8106. smart_filters_enabled_consumer: [1287, "bool", !1, !0],
  8107. inbox_management_filters_m2: [3554, "bool", !1, !1],
  8108. md_offline_v2_m2_enabled: [1517, "int", 10, 10],
  8109. profile_photo_rings_for_status_enabled: [1533, "bool", !1, !0],
  8110. dc_edit_postcode_by_default_enabled: [1534, "bool", !1, !1],
  8111. media_picker_select_limit: [2614, "int", 30, 30],
  8112. media_picker_select_limit_new: [2693, "int", 30, 30],
  8113. chatlist_filters_v1: [1608, "bool", !1, !1],
  8114. community_suspend_v0_enabled: [1653, "bool", !1, !0],
  8115. is_meta_employee_or_internal_tester: [1777, "bool", !1, !1],
  8116. disable_auto_download: [1838, "bool", !1, !1],
  8117. community_tab_m2: [2154, "bool", !1, !0],
  8118. gif_autoplay_enabled: [2281, "bool", !1, !1],
  8119. gif_min_play_loops: [3682, "int", 1, 1],
  8120. gif_max_play_loops: [3683, "int", 3, 3],
  8121. gif_max_play_duration: [3684, "int", 5, 5],
  8122. web_send_only_active_receipts: [1868, "bool", !1, !0],
  8123. num_days_hosted_device_signed_identity_signature_expiration: [2461, "int", 90, 90],
  8124. cag_member_key_rotation_optimization: [2521, "bool", !1, !1],
  8125. elevated_push_names_v2_enabled: [2540, "bool", !1, !1],
  8126. elevated_push_names_v2_m1_follow_up_enabled: [2763, "bool", !1, !1],
  8127. elevated_push_names_v2_m2_enabled: [2904, "bool", !1, !1],
  8128. smb_capi_coexistence_enabled: [2588, "bool", !1, !0],
  8129. smb_client_side_linkshim_enabled: [2633, "bool", !0, !0],
  8130. web_non_blocking_offline_resume_max_message_count: [2508, "int", 1e3, 1e3],
  8131. web_unified_flow: [1809, "int", 0, 0],
  8132. smb_client_side_linkshim_signed_regexp: [2634, "string", "https:\\/\\/n\\.wl\\.co\\/[^/]*\\/[^/]*\\/(.*)$", "https:\\/\\/n\\.wl\\.co\\/[^/]*\\/[^/]*\\/(.*)$"],
  8133. placeholder_message_key_hash_logging: [2639, "bool", !1, !0],
  8134. use_appdata_stanza_on_receiver: [2795, "bool", !1, !1],
  8135. use_appdata_stanza_on_sender: [2796, "bool", !1, !1],
  8136. web_lazy_pull: [2814, "bool", !1, !1],
  8137. msgd_drop_device_notifications: [3806, "bool", !1, !1],
  8138. media_large_file_awareness_popup_enabled: [3061, "bool", !1, !0],
  8139. media_large_file_awareness_popup_file_size_in_MB: [3115, "int", 2048, 2048],
  8140. send_cag_member_revokes_as_GDM: [3069, "bool", !0, !0],
  8141. parent_group_remove_orphaned_members: [3079, "bool", !1, !0],
  8142. community_rich_system_message_enabled: [3292, "bool", !1, !1],
  8143. group_mentions_in_cag: [3097, "bool", !1, !0],
  8144. group_mentions_in_subgroups: [4087, "bool", !1, !0],
  8145. parent_group_home_header_actions_enabled: [3267, "bool", !1, !1],
  8146. non_blocking_resume_from_open_tab_enabled: [3191, "bool", !1, !1],
  8147. non_blocking_resume_from_open_tab_signal_enabled: [3622, "bool", !1, !1],
  8148. smb_catalog_messages_download_thumbnail_on_receiver_enabled: [3247, "bool", !1, !1],
  8149. send_extended_nack_enabled: [3280, "bool", !1, !1],
  8150. send_message_drop_nack_enabled: [3741, "bool", !1, !1],
  8151. send_message_drop_old_couter_nack_enabled: [4213, "bool", !1, !1],
  8152. parent_group_enhanced_description_enabled: [3154, "bool", !1, !0],
  8153. parent_group_info_updates_enabled: [3616, "bool", !1, !1],
  8154. noyb_opt_out_flag: [3488, "bool", !1, !1],
  8155. service_improvement_opt_out_flag: [3664, "bool", !1, !1],
  8156. wa_ctwa_web_entrypoint_home_header_enabled: [3058, "bool", !1, !1],
  8157. wa_ctwa_web_entrypoint_home_header_dropdown_enabled: [3095, "bool", !1, !1],
  8158. wa_ctwa_web_entrypoint_home_banner_enabled: [3096, "bool", !1, !1],
  8159. wa_ctwa_web_entrypoint_home_icon_tooltip_enabled: [3242, "bool", !1, !1],
  8160. wa_ctwa_web_entrypoint_pageless_enabled: [3293, "bool", !1, !1],
  8161. wa_ctwa_web_entrypoint_manage_ads_home_header_dropdown_enabled: [3376, "bool", !1, !1],
  8162. wa_ctwa_web_fetch_linked_accounts_enabled: [3294, "bool", !1, !1],
  8163. report_to_admin_kill_switch: [3695, "bool", !1, !0],
  8164. report_to_admin_enabled: [3696, "bool", !1, !0],
  8165. parent_group_allow_member_added_groups_m1: [3829, "bool", !1, !0],
  8166. parent_group_allow_member_added_groups_m2: [4184, "bool", !1, !0],
  8167. abort_building_e2e_proto_on_error: [3224, "bool", !1, !0],
  8168. abort_decrypting_e2e_on_error: [4055, "bool", !1, !0],
  8169. community_shorter_group_creation_enabled: [3966, "bool", !1, !1],
  8170. community_navigation: [4003, "bool", !1, !1],
  8171. bonsai_enabled: [4010, "bool", !1, !1],
  8172. enable_pnh_for_business: [4151, "bool", !1, !1],
  8173. bonsai_receiver_enabled: [4165, "bool", !1, !1],
  8174. web_mediaretry_notification_nack_enabled: [4206, "bool", !1, !1],
  8175. wa_ctwa_web_thread_ad_attribution_enabled: [2898, "bool", !1, !1],
  8176. wa_ctwa_ads_action_banner_enabled: [1495, "bool", !1, !0],
  8177. wa_ctwa_ads_action_banner_enabled_web: [4021, "bool", !1, !0],
  8178. wa_ctwa_action_banner_logging_enabled_web: [4022, "bool", !1, !0],
  8179. ctwa_data_max_length: [1841, "int", 768, 768],
  8180. wa_ctwa_action_banner_logging_enabled: [1866, "bool", !1, !0],
  8181. wa_ctwa_web_dc_logging_enabled: [2487, "bool", !1, !1],
  8182. ctwa_smb_data_sharing_consent: [2934, "bool", !1, !0],
  8183. ctwa_smb_data_sharing_opt_in_cool_off_period: [3331, "int", 259200, 259200],
  8184. ctwa_consumer_data_sharing_consent: [2935, "bool", !1, !0],
  8185. mark_as_action: [2936, "bool", !1, !0],
  8186. pairless_logging_attribution_window: [3017, "int", 7, 7],
  8187. wa_biz_tool_logging_improvement: [3169, "bool", !1, !0],
  8188. ctwa_additional_label_event_logging_enabled: [3793, "bool", !1, !0],
  8189. ig_reels_music_attribution: [1912, "bool", !1, !0],
  8190. video_stream_buffering_ui_enabled: [2167, "bool", !1, !0],
  8191. original_quality_image_min_edge: [3068, "int", 2560, 2560],
  8192. original_quality_data_warning_max_mb: [3306, "int", 16, 16],
  8193. original_quality_show_data_warning_dialog: [3307, "bool", !1, !0],
  8194. original_quality_minimum_elements_to_show_data_warning_dialog: [3613, "int", 20, 20],
  8195. web_youtube_rcat_consumption_enabled: [2957, "bool", !1, !0],
  8196. web_youtube_rcat_chat_generation_enabled: [3044, "bool", !1, !0],
  8197. autodownload_update_in_group_chat: [3273, "bool", !1, !0],
  8198. enable_receiving_hd_photo_quality: [3116, "bool", !1, !0],
  8199. enable_days_since_receive_logging: [3322, "bool", !1, !0],
  8200. additional_pre_logging_enabled: [3490, "bool", !1, !0],
  8201. client_message_id_media_download_log_enabled: [3820, "bool", !1, !0],
  8202. media_sender_client_logging_enabled: [3491, "bool", !1, !0],
  8203. hqp_log_enabled: [3349, "bool", !1, !0],
  8204. web_fix_media_conn_block_rule_parsing: [3455, "bool", !1, !1],
  8205. youtube_inline_playback_killswitch: [3522, "bool", !1, !1],
  8206. media_engagement_logging_enabled: [3787, "bool", !1, !1],
  8207. show_bottom_sheet_gallery: [3844, "bool", !1, !0],
  8208. status_inline_link_preview_enabled: [1522, "bool", !1, !0],
  8209. text_status_url_logging_enabled: [1851, "bool", !1, !0],
  8210. status_reaction_emojis: [1852, "string", "[128525, 128514, 128558, 128546, 128591, 128079, 127881, 128175]", "[128525, 128514, 128558, 128546, 128591, 128079, 127881, 128175]"],
  8211. status_reply_received_logging_enabled: [1859, "bool", !1, !0],
  8212. status_caption_link_detection_enabled: [2032, "bool", !1, !0],
  8213. status_view_error_type_logging_enabled: [2086, "bool", !0, !0],
  8214. status_from_me_unseen_enabled: [2039, "bool", !1, !0],
  8215. smb_collections_enabled: [451, "bool", !1, !0],
  8216. consumer_collections_enabled: [582, "bool", !1, !0],
  8217. smb_collections_appeal_flow_enabled: [724, "bool", !1, !1],
  8218. smb_multi_device_awareness: [1074, "bool", !1, !0],
  8219. smb_quick_replies_v2_enabled: [875, "bool", !1, !1],
  8220. smb_ecommerce_compliance_india_m4: [1003, "bool", !1, !0],
  8221. smb_ecommerce_compliance_india_m4_5: [1192, "bool", !1, !0],
  8222. smart_filters_enabled: [1015, "bool", !1, !0],
  8223. btm_threads_logging_enabled: [1022, "bool", !1, !0],
  8224. native_commerce_threads_logging_enabled: [1034, "bool", !1, !0],
  8225. threads_logging_observe_list_enabled: [1168, "bool", !1, !0],
  8226. smb_hide_unsupported_currency_price: [1203, "bool", !1, !0],
  8227. hyperlinked_phone_numbers_enabled: [1215, "bool", !1, !1],
  8228. smb_catkit_query_version: [1229, "int", 1, 1],
  8229. smb_phase_out_not_a_business: [1263, "bool", !1, !0],
  8230. smb_phase_out_not_a_business_V2: [1771, "bool", !1, !0],
  8231. smb_threads_logging_enabled: [1251, "bool", !1, !0],
  8232. smb_click_to_chat_logging_enabled: [1252, "bool", !1, !0],
  8233. smb_broadcast_logging_enabled: [1253, "bool", !1, !0],
  8234. smb_status_logging_enabled: [1254, "bool", !1, !0],
  8235. smb_biz_profile_logging_enabled: [1255, "bool", !1, !0],
  8236. smb_registration_flow_logging_enabled: [1256, "bool", !1, !0],
  8237. btm_qpl_enabled: [1272, "bool", !1, !0],
  8238. smb_temp_cover_photo_privacy_messaging: [1913, "bool", !1, !0],
  8239. show_shops_sunset_banner: [1949, "bool", !1, !0],
  8240. vname_logging_and_debugging: [3961, "bool", !0, !0],
  8241. verified_business_numbers: [3969, "string", "{}", '{"paytm":[917531875318, 919004990049]}'],
  8242. verified_business_numbers_for_business_name_update: [4006, "string", "", "917531875318,919004990049"],
  8243. qpl_enabled: [212, "bool", !1, !0],
  8244. qpl_upload_delay: [215, "int", 1440, 1],
  8245. qpl_sampling_as_string: [466, "string", 'json:{"sampling":[]}', 'json:{"sampling":[]}'],
  8246. qpl_initial_upload_delay: [1223, "int", 5, 1],
  8247. is_meta_employee: [1570, "bool", !1, !1],
  8248. should_deregister_on_syncd_fatal: [383, "bool", !0, !0],
  8249. group_catch_up: [559, "bool", !1, !1],
  8250. web_abprop_ctwa_context_compose_enabled: [591, "bool", !1, !1],
  8251. web_abprop_group_description_length: [592, "int", 0, 0],
  8252. web_abprop_ephemeral_messages_allowed_values: [593, "string", "604800", "604800"],
  8253. web_abprop_collections_display: [584, "bool", !1, !1],
  8254. multi_select_from_chat_list: [2312, "bool", !1, !0],
  8255. web_abprop_collections_management: [585, "bool", !1, !1],
  8256. web_abprop_drop_full_history_sync: [600, "bool", !1, !1],
  8257. web_abprop_business_profile_incomplete_nux_banner: [710, "bool", !1, !1],
  8258. web_abprop_product_catalog_nux_banner: [711, "bool", !1, !1],
  8259. web_abprop_click_nux_banner_migration: [712, "bool", !1, !1],
  8260. web_abprop_ecommerce_compliance_india: [717, "bool", !1, !1],
  8261. web_abprop_edit_ecommerce_compliance_india: [826, "bool", !1, !1],
  8262. drop_last_name: [726, "bool", !1, !1],
  8263. web_abprop_catalog_icon_on_top_bar: [734, "bool", !1, !1],
  8264. web_abprop_collections_nux_banner: [741, "bool", !1, !1],
  8265. nfm_rendering_enabled: [760, "bool", !1, !1],
  8266. web_abprop_nux_cart_interstitial: [761, "bool", !1, !1],
  8267. web_abprop_business_profile_refresh_status_enabled: [763, "bool", !1, !1],
  8268. web_abprop_business_profile_refresh_linked_account_enabled: [764, "bool", !1, !1],
  8269. web_abprop_business_profile_refresh_edit_cover_photo_enabled: [765, "bool", !1, !1],
  8270. web_abprop_business_profile_refresh_cover_photo_view_enabled: [766, "bool", !1, !1],
  8271. elevated_important_msg: [809, "bool", !1, !1],
  8272. web_privacy_settings: [837, "bool", !1, !1],
  8273. web_privacy_settings_v2: [1226, "bool", !1, !1],
  8274. web_status_psa: [873, "bool", !1, !1],
  8275. web_status_psa_history_sync: [1095, "bool", !1, !1],
  8276. web_2fa: [1195, "bool", !1, !1],
  8277. web_abprop_stateful_enumeration_enabled: [887, "bool", !0, !0],
  8278. web_abprop_block_catalog_creation_ecommerce_compliance_india: [894, "bool", !1, !1],
  8279. web_sticker_store: [930, "bool", !0, !0],
  8280. web_proactive_prekeys_fetch_group_size_limit: [937, "int", 0, 0],
  8281. web_favorite_stickers: [962, "bool", !1, !1],
  8282. web_orchestrator_enabled_version: [984, "string", "bucket", "bucket"],
  8283. web_wam_v5_enabled: [1033, "bool", !1, !1],
  8284. web_ps_v3_enabled: [1114, "bool", !1, !1],
  8285. web_shop_storefront_message: [1053, "bool", !1, !1],
  8286. web_identity_store_cache: [1078, "bool", !1, !1],
  8287. web_abprop_large_files_encryption_optimization: [1086, "bool", !1, !1],
  8288. web_send_invisible_msg_to_new_groups: [1099, "bool", !1, !1],
  8289. web_send_invisible_msg_min_group_size: [1100, "int", 128, 128],
  8290. web_send_invisible_msg_max_group_size: [1945, "int", 1024, 1024],
  8291. web_init_chat_batch_size: [1171, "int", 100, 100],
  8292. web_init_chat_max_unread_message_count: [1172, "int", 0, 0],
  8293. web_abprop_skip_file_copy_on_attach: [1174, "bool", !1, !1],
  8294. reaction_history_sync: [1179, "bool", !1, !1],
  8295. web_abprop_screen_sharing_enabled: [1189, "bool", !1, !1],
  8296. web_graphql_for_catalog_m1: [1205, "bool", !1, !1],
  8297. web_adaptive_offline_resume_enabled: [1224, "bool", !1, !1],
  8298. web_wa_signal_enabled: [1225, "bool", !1, !1],
  8299. web_gdpr_request_account_info_enabled: [1232, "bool", !1, !1],
  8300. web_new_compose_box_input: [1243, "bool", !0, !0],
  8301. web_abprop_document_resume_upload: [1247, "bool", !1, !1],
  8302. more_reactions_option_desktop_beta_rollout: [1759, "bool", !0, !0],
  8303. reactions_keyboard_hides_three_flags_desktop_beta_rollout: [1796, "bool", !1, !1],
  8304. web_rotate_sender_key_if_sent: [1329, "bool", !1, !1],
  8305. web_lru_cache_optimization: [1339, "bool", !1, !1],
  8306. web_lru_cache_purge_logic_refactor: [1383, "bool", !1, !1],
  8307. companion_min_versions: [1367, "string", "json:[]", "json:[]"],
  8308. comparion_force_upgrade: [1368, "bool", !1, !1],
  8309. web_abprop_business_profile_refresh_linked_accounts_killswitch: [1351, "bool", !1, !1],
  8310. web_default_pull_mode_enabled: [1355, "bool", !1, !1],
  8311. web_abprop_chatd_login_cookie_enabled: [1371, "bool", !1, !1],
  8312. web_prekeys_fetch_first_batch_size: [1373, "float", 0, 0],
  8313. md_app_state_gate_D34336913: [1379, "bool", !1, !1],
  8314. web_address_capture_message_enabled: [1385, "bool", !1, !1],
  8315. syncd_periodic_sync_days: [1400, "int", 0, 0],
  8316. web_enable_hyperlinked_phone_numbers_ps_logging: [1401, "bool", !1, !1],
  8317. web_get_maybe_me_user_optimization_enabled: [1451, "bool", !1, !1],
  8318. web_should_fatal_on_missing_patch: [1461, "bool", !0, !0],
  8319. web_reactions_send_desktop_beta_rollout: [1479, "bool", !0, !0],
  8320. web_abprop_remove_uploaded_files: [1481, "bool", !1, !1],
  8321. web_abprop_remove_downloaded_files: [1496, "bool", !1, !1],
  8322. web_killswitch_s310872_mitigation: [2879, "bool", !1, !1],
  8323. web_new_rich_text_input: [1507, "bool", !0, !0],
  8324. web_syncd_max_mutations_to_process_during_resume: [1513, "int", 1e3, 1e3],
  8325. reactions_skin_tone_aggregation: [1593, "bool", !1, !1],
  8326. message_quick_reply: [1623, "bool", !1, !1],
  8327. web_quantity_controls_enabled: [1659, "bool", !1, !1],
  8328. web_unified_message_processing_enabled: [1633, "bool", !1, !1],
  8329. web_push_notifications: [1643, "bool", !1, !0],
  8330. web_push_notifications_super_users: [3868, "bool", !1, !1],
  8331. web_notification_settings_v2: [1676, "bool", !1, !0],
  8332. web_abprop_device_agnostic_voip: [1675, "bool", !1, !1],
  8333. web_abprop_screen_lock_enabled: [1680, "bool", !1, !1],
  8334. web_command_palette: [1726, "bool", !0, !0],
  8335. web_group_profile_editor: [1745, "bool", !0, !0],
  8336. web_quick_reply_authoring: [1751, "bool", !1, !1],
  8337. web_accidental_delete_for_me: [1752, "bool", !0, !0],
  8338. web_abprop_core_wam_runtime: [1753, "bool", !1, !1],
  8339. web_profile_picture_db_cache_disabled: [1757, "bool", !1, !1],
  8340. web_offline_resume_qpl_enabled: [1773, "bool", !1, !1],
  8341. web_offline_resume_m3_enabled: [1802, "bool", !1, !1],
  8342. web_syncd_fatal_fields_from_L1104589PRV2: [1808, "bool", !1, !1],
  8343. web_media_editor_blur_tool: [1816, "bool", !0, !0],
  8344. web_abprop_mute_notifications_on_app_focus: [1824, "bool", !1, !0],
  8345. web_auto_mute_256_groups_confirmation: [2533, "bool", !1, !1],
  8346. web_multi_skin_toned_emoji_picker: [1850, "bool", !1, !1],
  8347. web_message_send_cache_warming_up: [1894, "bool", !1, !0],
  8348. web_message_send_precalculate_icdc: [2801, "bool", !1, !0],
  8349. web_ptt_streamer_upload: [1902, "bool", !1, !0],
  8350. web_prekey_fetch_cache_warming_up: [1910, "bool", !1, !0],
  8351. web_history_sync_ui: [1911, "bool", !1, !1],
  8352. web_abprop_emoji_experimental_api: [1932, "bool", !1, !1],
  8353. web_new_media_caption_input: [1959, "bool", !0, !0],
  8354. web_chatlist_toggle: [1964, "bool", !1, !0],
  8355. web_electron_deprecation_windows_sideload_stage1_awareness: [1985, "bool", !1, !1],
  8356. web_electron_deprecation_windows_sideload_stage2_compatible_expiry_kickoff: [1986, "bool", !1, !1],
  8357. web_electron_deprecation_windows_sideload_stage2_compatible_expiry_delay: [1987, "int", 0, 0],
  8358. web_electron_deprecation_windows_sideload_stage2_incompatible_expiry_kickoff: [1988, "bool", !1, !1],
  8359. web_electron_deprecation_windows_sideload_stage2_incompatible_expiry_delay: [1989, "int", 0, 0],
  8360. web_message_list_a11y_redesign: [2016, "bool", !0, !0],
  8361. web_enable_profile_pic_thumb_db_caching: [2018, "bool", !1, !1],
  8362. web_enable_biz_catalog_view_ps_logging: [2056, "bool", !0, !0],
  8363. web_abprop_media_links_docs_search: [2063, "bool", !1, !1],
  8364. web_poll_creation_desktop_beta_rollout: [2179, "bool", !1, !1],
  8365. web_poll_receiving_desktop_beta_rollout: [2181, "bool", !1, !1],
  8366. web_file_streaming_upload: [2210, "bool", !1, !1],
  8367. web_new_group_member_search: [2220, "bool", !1, !1],
  8368. web_max_contacts_to_show_common_groups: [2264, "int", 10, 10],
  8369. web_max_found_common_groups_displayed: [2268, "int", 15, 15],
  8370. web_fp_reparsing_for_non_add_ons: [2231, "bool", !1, !1],
  8371. web_message_custom_aria_label: [2280, "bool", !1, !1],
  8372. web_message_list_a11y_redesign_beta_only: [2294, "bool", !0, !0],
  8373. web_poll_spam_report: [2303, "bool", !1, !1],
  8374. web_electron_active_reload: [2322, "bool", !0, !0],
  8375. desktop_upsell_win_butterbar: [2348, "bool", !1, !1],
  8376. desktop_upsell_win_ctas: [2349, "bool", !1, !1],
  8377. desktop_upsell_win_dropdown_btn: [2725, "bool", !1, !1],
  8378. documents_with_captions_send_desktop_beta_rollout: [2486, "bool", !1, !1],
  8379. profile_photo_rings_for_status_on_web_enabled: [2512, "bool", !1, !0],
  8380. voice_status_receipt_on_web_enabled: [2513, "bool", !1, !0],
  8381. web_crypto_library_enabled: [2534, "bool", !1, !1],
  8382. group_chat_profile_pictures_enabled_web_beta_rollout: [2543, "bool", !0, !0],
  8383. web_message_plugin_backend_registration_enabled: [2545, "bool", !1, !1],
  8384. query_verified_name_when_msg_differs: [2549, "bool", !0, !0],
  8385. web_media_auto_download_enabled: [2555, "bool", !1, !0],
  8386. web_media_auto_download_desktop_beta_enabled: [2556, "bool", !1, !0],
  8387. link_preview_wait_time: [2566, "int", 7, 7],
  8388. web_screen_lock_max_retries: [2622, "int", 10, 10],
  8389. forward_media_with_caption_desktop_beta_rollout: [2664, "bool", !0, !0],
  8390. web_new_status_reply_input: [2708, "bool", !0, !0],
  8391. web_display_name_for_enterprise_biz_vlevel_low_killswitch: [2715, "bool", !1, !1],
  8392. web_display_name_for_biz_vlevel_low_killswitch: [2716, "bool", !0, !0],
  8393. web_message_plugin_frontend_registration_enabled: [2793, "bool", !1, !1],
  8394. external_beta_can_join: [3081, "bool", !1, !0],
  8395. web_native_fetch_media_download: [3031, "bool", !1, !1],
  8396. web_image_max_edge: [3042, "int", 1600, 1600],
  8397. web_image_max_hd_edge: [3204, "int", 2560, 2560],
  8398. enable_logging_multi_select_from_chat_list: [3118, "bool", !1, !0],
  8399. web_store_quota_manager_enabled: [3133, "bool", !1, !1],
  8400. web_browser_quota_threshold: [3134, "int", 100, 100],
  8401. web_browser_min_storage_quota: [3135, "int", 5, 5],
  8402. web_original_photo_quality_upload_enabled: [3136, "bool", !1, !1],
  8403. web_deprecate_mms4_hash_based_download: [3152, "bool", !1, !0],
  8404. web_md5_message_key: [3164, "bool", !1, !0],
  8405. web_sha256_message_key: [3729, "bool", !1, !0],
  8406. web_e2e_backfill_expire_time: [3234, "int", 5, 60],
  8407. web_message_table_index_rowid_optimization: [3279, "bool", !1, !1],
  8408. wds_radius_and_casing: [3350, "bool", !1, !0],
  8409. web_attach_menu_redesign: [4032, "bool", !1, !0],
  8410. web_expression_panels: [3420, "bool", !1, !1],
  8411. can_support_web_column_packing: [3600, "bool", !1, !1],
  8412. web_column_data_serialization_enabled: [3970, "bool", !1, !1],
  8413. column_serialization_perf_impact_test: [3973, "bool", !1, !1],
  8414. web_message_edit_receive_desktop_beta_rollout: [3723, "bool", !1, !1],
  8415. web_message_edit_send_desktop_beta_rollout: [3724, "bool", !1, !1],
  8416. web_message_edit_processing_reply_messages: [3883, "bool", !0, !0],
  8417. web_message_processing_cache_size: [3728, "int", 400, 400],
  8418. web_encryption_failed_message_resend: [3779, "bool", !1, !1],
  8419. append_message_when_forwarding_media_desktop_beta: [3818, "bool", !1, !1],
  8420. history_sync_on_demand_timeout_ms: [3882, "int", 1e4, 1e4],
  8421. web_client_pull_timeout_ms: [3890, "int", 1e4, 1e4],
  8422. web_socket_reconnect_enabled: [3892, "bool", !1, !1],
  8423. web_outgoing_message_validation_list: [4019, "string", "[]", "[]"],
  8424. web_device_sync_manager_enabled: [4024, "bool", !1, !1],
  8425. web_draft_message_enabled: [4125, "bool", !1, !1],
  8426. history_sync_loop_interval_ms: [4149, "int", 2e4, 2e4],
  8427. stop_abprops_traffic_in_serverprops_response: [315, "bool", !1, !1],
  8428. chat_upsell_for_1on1_invites: [3689, "bool", !1, !1],
  8429. ugc_participant_limit: [4118, "int", 5, 5],
  8430. group_chat_profile_pictures_enabled: [1825, "bool", !1, !1],
  8431. group_chat_profile_pictures_v2_enabled: [3261, "bool", !1, !1],
  8432. unified_user_profile_navigation_enabled: [3523, "bool", !1, !1],
  8433. view_all_replies_enabled: [4215, "bool", !1, !1],
  8434. ugr_enabled: [3010, "bool", !1, !0],
  8435. ugc_enabled: [3011, "bool", !1, !0],
  8436. reword_subject_to_group_name_enabled: [3088, "bool", !1, !0],
  8437. commerce_metadata_supported_business: [1693, "string", "18785550326,918591749310,917977079770,12245555037,5515997781156,5511989238421,555191894444,905333860133,908502213040,5511916282555,555139214004,555198849745,551147664020,622150851766,551121038525", "18785550326,447766028329,918591749310,917977079770,12245555037,5515997781156,5511989238421,555191894444,905333860133,908502213040,5511916282555,555139214004,555198849745,551147664020,622150851766"],
  8438. in_app_survey_phone_numbers: [1607, "string", "16508638904", "16508638904"],
  8439. order_details_payment_instructions_enabled: [1595, "bool", !1, !0],
  8440. enable_biz_activity_report_request: [455, "bool", !1, !1],
  8441. plm_products_max_batch_fetch_size: [464, "int", 18, 18],
  8442. enable_granular_reject_reasons: [550, "bool", !1, !1],
  8443. elevating_profile_names_enabled: [604, "bool", !1, !1],
  8444. enable_group_profile_editor: [689, "bool", !1, !1],
  8445. csat_message_rating: [690, "bool", !1, !0],
  8446. facebook_link_preview_use_thumbnail: [810, "bool", !1, !0],
  8447. tam_attachment_cache_compaction_enabled: [838, "bool", !1, !1],
  8448. business_threads_logging_enabled: [853, "bool", !1, !1],
  8449. private_stats_biz_view_logging_enabled: [904, "bool", !1, !1],
  8450. group_join_request_m0_anyone_can_join: [2367, "bool", !1, !1],
  8451. group_join_request_m1: [1727, "bool", !1, !1],
  8452. group_join_request_m2: [1728, "bool", !1, !1],
  8453. group_join_request_m2_setting: [1887, "bool", !1, !1],
  8454. group_join_request_m2_logging: [2913, "bool", !1, !1],
  8455. group_join_request_m2_max_pending_participants_limit: [2418, "float", 2, 2],
  8456. group_join_request_m3: [2369, "bool", !1, !1],
  8457. group_join_request_m3_sort_by_time: [3451, "bool", !1, !1],
  8458. group_join_request_m3_invited_tab: [3571, "bool", !1, !1],
  8459. group_join_request_m3_groups_in_common: [3895, "bool", !1, !1],
  8460. group_join_request_m3_banner: [3452, "bool", !1, !1],
  8461. group_join_request_optional_message_soak: [3382, "bool", !1, !1],
  8462. group_join_request_can_view_optional_message: [3383, "bool", !1, !1],
  8463. group_join_request_can_send_optional_message: [3384, "bool", !1, !1],
  8464. group_join_request_m2_pushname: [2376, "bool", !1, !0],
  8465. group_join_request_m2_banner_on_conversation: [2449, "bool", !1, !1],
  8466. group_invite_new_bottom_sheet_enabled: [2749, "bool", !0, !0],
  8467. note_to_self: [1967, "bool", !1, !0],
  8468. note_to_self_entry_point: [2630, "bool", !1, !0],
  8469. no_delete_message_time_limit: [1011, "bool", !1, !1],
  8470. sender_revoke_window_sender: [1333, "bool", !1, !0],
  8471. sender_revoke_window_receiver: [1334, "bool", !1, !0],
  8472. sender_revoke_ui: [1335, "bool", !1, !0],
  8473. admin_revoke_receiver: [1177, "bool", !1, !0],
  8474. admin_revoke_sender: [1292, "bool", !1, !0],
  8475. admin_revoke_history_sync_consumer: [1245, "bool", !1, !0],
  8476. revokes_logging_unsampled: [1865, "bool", !0, !0],
  8477. pinned_messages_m0: [3138, "bool", !1, !1],
  8478. pinned_messages_m1_receiver: [3139, "bool", !1, !1],
  8479. pinned_messages_m1_sender: [3140, "bool", !1, !1],
  8480. pinned_messages_m1_sender_debug_expiry_duration_secs: [3813, "int", 86400, 86400],
  8481. pinned_messages_m2_pin_max: [3732, "int", 1, 1],
  8482. pinned_messages_m2: [3141, "bool", !1, !1],
  8483. admin_hfm_toggle: [1021, "bool", !1, !1],
  8484. csat_message_trigger: [1082, "bool", !1, !0],
  8485. graphql_privacy_imp_m1: [1096, "bool", !1, !1],
  8486. lthash_check_hours: [1104, "int", 0, 0],
  8487. interactive_message_native_flow_killswitch: [1133, "bool", !1, !1],
  8488. sender_key_expired_logging_enabled: [1185, "bool", !1, !1],
  8489. group_size_bypassing_sampling: [1861, "int", 1e5, 1e5],
  8490. group_size_limit: [1304, "int", 257, 257],
  8491. v_id_deprecation_enabled: [2334, "bool", !1, !0],
  8492. proactive_distribute_sender_keys_enabled: [2757, "bool", !1, !0],
  8493. minimum_percentage_to_proactive_distribute_sender_keys: [2860, "int", 200, 50],
  8494. address_message_native_flow_killswitch: [1538, "bool", !1, !1],
  8495. commerce_sanctioned: [1319, "bool", !1, !1],
  8496. commerce_bloks_apps_mapping: [1320, "string", '{"address_message":{"app_id":"com.bloks.www.whatsapp.commerce.address_message","expiration_secs":300,"version":"1.5","supported_businesses":["+918591749310","+917977079770","+12165552716","+918591749310","+917977079770","+919324433533","+917669800185","+919355081749","+917217010106","+912248913727","+912068135414","+918368818019","+917827971992","+917827971988","+911244632002","+919999006542","+917982465931","+911244632030","+918920528558","+911244632026","+918920530301","+15550083895","+12995550004","+6589523673","+6597685939","+6580536071","+6531631404","+6590834813","+6588867112","+16615555837","+12765985268","+18055908026"]},"galaxy_message":{"flow_message_version":{"1":{"min_android_app_supported_version":"2.22.21","min_ios_app_supported_version":"2.22.16"}},"app_id":"com.bloks.www.whatsapp.commerce.galaxy_message","expiration_secs":86400,"version":"1.0","flows":{"5315848498536354":{"supported_businesses":["18785550326","19505550093","18055555085","12115551400","12165554570"]},"384213690506206":{"supported_businesses":["13072224829","908502213040"]},"785254429343710":{"supported_businesses":["13072224829","908502213040"]},"552092896712166":{"supported_businesses":["13072224829","908502213040"]},"659207712435246":{"supported_businesses":["13072224829","908502213040"]},"1218944301990105":{"supported_businesses":["13072224829","908502213040"]},"842529276647219":{"supported_businesses":["908502419528","905333860133"]},"2135286959994016":{"supported_businesses":["908502419528","905333860133"]},"465280328842503":{"supported_businesses":["908502419528","905333860133"]},"554437403152809":{"supported_businesses":["908502419528","905333860133"]},"1503880053408592":{"supported_businesses":["908502419528","905333860133"]},"1177261906521760":{"supported_businesses":["908502419528","905333860133"]},"5199590820090002":{"supported_businesses":["5511989238421"]},"615215783523200":{"supported_businesses":["5511989238421"]},"1160930701174631":{"supported_businesses":["5511989238421","555191894444"]},"2934205950056123":{"supported_businesses":["5511916282555"]},"5324889264212944":{"supported_businesses":["5511916282555"]},"3301029236883120":{"supported_businesses":["555139214004","555198849745"]},"774830743793476":{"supported_businesses":["555139214004","555198849745"]},"1493489641166601":{"supported_businesses":["555139214004","555198849745"]},"1115920052387436":{"supported_businesses":["555139214004","555198849745"]},"611775360605929":{"supported_businesses":["551147664020","551121038525"]},"1283565282457467":{"supported_businesses":["551147664020","551121038525"]},"673695173931335":{"supported_businesses":["551147664020","551121038525"]},"508459817855605":{"supported_businesses":["442034673249","447418310027"]},"639247544356777":{"supported_businesses":["442034673249","447418310027","622150851766"]},"2679509568858534":{"supported_businesses":["442034673249","447418310027","622150851766"]}}}}', '{"address_message":{"app_id":"com.bloks.www.whatsapp.commerce.address_message","expiration_secs":300,"version":"1.5","supported_businesses":["+918591749310","+917977079770","+12165552716","+918591749310","+917977079770","+919324433533","+917669800185","+919355081749","+917217010106","+912248913727","+912068135414","+918368818019","+917827971992","+917827971988","+911244632002","+919999006542","+917982465931","+911244632030","+918920528558","+911244632026","+918920530301","+15550083895","+12995550004","+6589523673","+6597685939","+6580536071","+6531631404","+6590834813","+6588867112","+16615555837","+12765985268","+18055908026"]},"galaxy_message":{"flow_message_version":{"1":{"min_android_app_supported_version":"2.22.21","min_ios_app_supported_version":"2.22.16"}},"app_id":"com.bloks.www.whatsapp.commerce.galaxy_message","expiration_secs":86400,"version":"1.0","flows":{"5315848498536354":{"supported_businesses":["18785550326","19505550093","18055555085","12115551400","12165554570"]},"384213690506206":{"supported_businesses":["13072224829","908502213040"]},"785254429343710":{"supported_businesses":["13072224829","908502213040"]},"552092896712166":{"supported_businesses":["13072224829","908502213040"]},"659207712435246":{"supported_businesses":["13072224829","908502213040"]},"1218944301990105":{"supported_businesses":["13072224829","908502213040"]},"842529276647219":{"supported_businesses":["908502419528","905333860133"]},"2135286959994016":{"supported_businesses":["908502419528","905333860133"]},"465280328842503":{"supported_businesses":["908502419528","905333860133"]},"554437403152809":{"supported_businesses":["908502419528","905333860133"]},"1503880053408592":{"supported_businesses":["908502419528","905333860133"]},"1177261906521760":{"supported_businesses":["908502419528","905333860133"]},"5199590820090002":{"supported_businesses":["5511989238421"]},"615215783523200":{"supported_businesses":["5511989238421"]},"1160930701174631":{"supported_businesses":["5511989238421","555191894444"]},"2934205950056123":{"supported_businesses":["5511916282555"]},"5324889264212944":{"supported_businesses":["5511916282555"]},"3301029236883120":{"supported_businesses":["555139214004","555198849745"]},"774830743793476":{"supported_businesses":["555139214004","555198849745"]},"1493489641166601":{"supported_businesses":["555139214004","555198849745"]},"1115920052387436":{"supported_businesses":["555139214004","555198849745"]},"611775360605929":{"supported_businesses":["551147664020","551121038525"]},"1283565282457467":{"supported_businesses":["551147664020","551121038525"]},"673695173931335":{"supported_businesses":["551147664020","551121038525"]},"508459817855605":{"supported_businesses":["442034673249","447418310027"]},"639247544356777":{"supported_businesses":["442034673249","447418310027","622150851766"]},"2679509568858534":{"supported_businesses":["442034673249","447418310027","622150851766"]}}}}'],
  8497. graphql_privacy_imp_m2: [1327, "bool", !1, !1],
  8498. nux_sync: [1343, "bool", !1, !0],
  8499. in_app_survey_enabled: [1377, "bool", !1, !0],
  8500. poll_creation_enabled: [1394, "bool", !1, !1],
  8501. poll_receiving_enabled: [1395, "bool", !1, !1],
  8502. poll_receiving_cag_enabled: [2737, "bool", !1, !1],
  8503. poll_name_length: [1406, "int", 255, 255],
  8504. poll_option_length: [1407, "int", 100, 100],
  8505. poll_option_count: [1408, "int", 12, 12],
  8506. poll_offline_accuracy: [1409, "int", 30, 30],
  8507. poll_cleanup_days: [1410, "int", 31, 31],
  8508. poll_vote_processing_enabled: [1541, "bool", !1, !1],
  8509. poll_result_details_view_enabled: [1948, "bool", !0, !0],
  8510. poll_creation_one_on_one_chats_enabled: [2194, "bool", !1, !1],
  8511. poll_creation_cag_enabled: [2738, "bool", !1, !1],
  8512. poll_a11y_enabled: [2390, "bool", !1, !0],
  8513. enable_status_reporting: [2728, "bool", !1, !0],
  8514. group_suspend_v1_enabled: [1415, "bool", !1, !0],
  8515. group_suspend_appeal_include_entity_id_enabled: [2057, "bool", !1, !0],
  8516. block_from_chat_list: [2290, "bool", !1, !0],
  8517. community_reporting_ui_upsell_exit: [2818, "bool", !0, !0],
  8518. smb_product_price_label: [1417, "string", "control", "control"],
  8519. interactive_response_message_killswitch: [1435, "bool", !1, !1],
  8520. interactive_response_message_native_flow_killswitch: [1436, "bool", !1, !1],
  8521. biz_api_voip_enabled: [1464, "bool", !1, !0],
  8522. quantity_controls_enabled: [1480, "bool", !1, !0],
  8523. catalog_categories_enabled: [1514, "bool", !1, !0],
  8524. disappearing_messages_chat_picker: [1518, "bool", !1, !1],
  8525. more_reactions_option: [1322, "bool", !1, !1],
  8526. reactions_keyboard_hides_three_flags: [1792, "bool", !1, !1],
  8527. send_reaction_from_details_pane: [2170, "bool", !1, !1],
  8528. silent_group_exit: [1527, "bool", !1, !0],
  8529. silent_group_exit_past_participants: [1528, "bool", !1, !0],
  8530. silent_group_exit_dialog: [1597, "bool", !1, !0],
  8531. silent_group_exit_sync: [1598, "bool", !1, !0],
  8532. silent_group_exit_db: [1613, "bool", !1, !0],
  8533. order_details_quick_pay: [1600, "string", '{"allowed_product_type":"none"}', '{"allowed_product_type":"none"}'],
  8534. incentive_program_logging_enabled: [1599, "bool", !1, !0],
  8535. md_syncd_24_hour_time_format_sync_enabled: [1612, "bool", !1, !1],
  8536. md_link_device_with_phone_number_enabled: [2734, "bool", !1, !1],
  8537. md_link_device_with_phone_number_force_enabled: [3693, "bool", !1, !1],
  8538. send_cart_cta_long_button_enabled: [1660, "bool", !0, !0],
  8539. send_cart_cta_long_button_alternative_text_type: [2153, "int", 0, 0],
  8540. product_search_m1_enabled: [1678, "bool", !1, !0],
  8541. smb_catalog_collections_reordering_enabled: [1688, "bool", !0, !0],
  8542. smb_catalog_collection_items_reordering_enabled: [1794, "bool", !0, !0],
  8543. is_message_secret_enabled: [1707, "bool", !1, !0],
  8544. documents_with_captions_receive: [1749, "bool", !1, !0],
  8545. documents_with_captions_send: [1750, "bool", !1, !0],
  8546. external_payments_supported_business: [1763, "string", "+917000770007", "+918369150604,+917000770007"],
  8547. active_cart_discovery_enabled: [1766, "bool", !1, !0],
  8548. order_details_payment_options: [1767, "string", '{"payment_options":[{"type":"JioPay","url_regex_list":["^https://www.jio.com/.*$","^https://t.jio/.*$","^http://tiny.jio.com/.*$"],"title":{"name":"jiopay_title","default_text":"Pay on Jio.com"},"subtitle":{"name":"jiopay_subtitle","default_text":"Go to Jio.com website"},"button":{"name":"jiopay_button","default_text":"Proceed to Jio.com"}}]}', '{"payment_options":[{"type":"JioPay","url_regex_list":["^https://www.jio.com/.*$","^https://t.jio/.*$","^http://tiny.jio.com/.*$"],"title":{"name":"jiopay_title","default_text":"Pay on Jio.com"},"subtitle":{"name":"jiopay_subtitle","default_text":"Go to Jio.com website"},"button":{"name":"jiopay_button","default_text":"Proceed to Jio.com"}}]}'],
  8549. order_details_payment_protection_link: [3014, "string", "https://faq.whatsapp.com/725152392426717", "https://faq.whatsapp.com/725152392426717"],
  8550. recent_sticker_rollout_phase: [1829, "int", 0, 0],
  8551. enable_client_chat_psa: [1844, "bool", !1, !0],
  8552. enable_chat_psa_auto_play_videos: [3182, "bool", !1, !0],
  8553. enable_chat_psa_forwards: [4033, "bool", !1, !0],
  8554. direct_connection_business_numbers: [1846, "string", "16005554444,918591749310,917977079770", "16005554444,918591749310,917977079770"],
  8555. forward_media_with_captions: [1853, "bool", !1, !1],
  8556. append_message_when_forwarding_media: [3177, "bool", !1, !1],
  8557. append_message_when_forwarding_media_without_caption: [3875, "bool", !1, !1],
  8558. view_all_replies: [4036, "bool", !1, !1],
  8559. share_phone_number_on_cart_send_to_direct_connection_biz_enabled: [1867, "bool", !0, !0],
  8560. voice_status_receipt_enabled: [1875, "bool", !0, !0],
  8561. admin_include_message_secret_in_cag: [1921, "bool", !0, !0],
  8562. md_syncd_primary_version_sync_enabled: [1993, "bool", !1, !1],
  8563. product_catalog_qpl_logging_enabled: [2003, "bool", !1, !0],
  8564. syncd_do_not_fatal_on_snapshot_mac_mismatch_in_patches: [2007, "bool", !1, !1],
  8565. graphql_locale_remapping: [2014, "string", "{}", "{}"],
  8566. product_catalog_qpl_direct_connection_status_logging_enabled: [2024, "bool", !1, !0],
  8567. favorite_sticker_rmr_sync_enabled: [2155, "bool", !1, !1],
  8568. web_link_preview_sync_enabled: [2156, "bool", !1, !0],
  8569. message_edit_receive: [2189, "bool", !1, !0],
  8570. message_edit_send: [2190, "bool", !1, !0],
  8571. caption_edit_receive: [3686, "bool", !1, !1],
  8572. caption_edit_send: [3687, "bool", !1, !1],
  8573. message_edit_window_duration_seconds: [2983, "int", 1200, 1200],
  8574. message_edit_client_entry_point_limit_seconds: [3272, "int", 900, 900],
  8575. prekey_fetch_iq_for_missing_devices_enabled: [2193, "bool", !1, !1],
  8576. extensions_message_support_version: [2306, "string", '{"1":{"min_android_app_supported_version": "2.22.21","min_ios_app_supported_version": "2.22.16"},"2":{"min_android_app_supported_version": "2.22.23.11","min_ios_app_supported_version": "2.23.4"}}', '{"1":{"min_android_app_supported_version": "2.22.21","min_ios_app_supported_version": "2.22.16"},"2":{"min_android_app_supported_version": "2.22.23","min_ios_app_supported_version": "2.23.2"}}'],
  8577. block_from_notification: [2374, "bool", !1, !0],
  8578. four_reactions_in_bubble_enabled: [2378, "bool", !1, !0],
  8579. block_entry_point_logging_enabled: [2522, "bool", !1, !0],
  8580. non_message_data_request_logging_enabled: [2573, "bool", !1, !0],
  8581. polls_fast_follow_enabled: [2661, "bool", !0, !0],
  8582. poll_chatlist_preview_enabled: [2720, "bool", !1, !0],
  8583. polls_search_support_enabled: [2662, "bool", !1, !0],
  8584. attachment_tray_logging_enabled: [2914, "bool", !1, !0],
  8585. polls_reply_support_enabled: [2663, "bool", !1, !0],
  8586. polls_single_option_control_enabled: [3050, "bool", !1, !0],
  8587. polls_single_option_sender_control_enabled: [3433, "bool", !1, !0],
  8588. polls_single_option_reciever_control_enabled: [3434, "bool", !0, !0],
  8589. polls_single_option_receiver_control_enabled: [3437, "bool", !0, !0],
  8590. polls_notification_enabled: [3158, "bool", !1, !1],
  8591. ptt_transcription_enabled: [2890, "bool", !1, !0],
  8592. attach_menu_redesign_enabled: [3223, "bool", !1, !1],
  8593. ts_navigation_community_enabled: [3858, "bool", !1, !1],
  8594. ts_bit_array_enabled: [3859, "bool", !1, !1],
  8595. ts_session_duration_ms: [3860, "int", 6e5, 6e5],
  8596. fullscreen_animation_for_keyword: [2776, "bool", !1, !1],
  8597. syncd_additional_mutations_count: [2777, "int", 1, 1],
  8598. mpm_nfm_enabled: [2811, "bool", !0, !0],
  8599. interactive_template_enabled: [2813, "bool", !0, !0],
  8600. inapp_banner_client_enabled: [2871, "bool", !1, !0],
  8601. quick_promotion_banner_client_enabled: [3712, "bool", !1, !1],
  8602. extensions_template_killswitch: [2885, "bool", !1, !1],
  8603. biz_extensions_metadata_cache_ttl_minutes: [2891, "int", 10080, 10080],
  8604. biz_extensions_metadata_ban_ttl_minutes: [2892, "int", 525600, 525600],
  8605. utm_tracking_enabled: [2895, "bool", !1, !1],
  8606. utm_tracking_expiration_hours: [2896, "int", 24, 24],
  8607. mpm_nfm_forwarding_enabled: [2909, "bool", !1, !1],
  8608. url_hsm_redesign_enabled: [2990, "bool", !1, !0],
  8609. button_url_hsm_redesign_enabled: [2994, "bool", !1, !0],
  8610. is_internal_tester: [2945, "bool", !1, !0],
  8611. report_string_comprehension: [3032, "bool", !1, !0],
  8612. alt_device_linking_enabled: [3128, "bool", !1, !1],
  8613. mute_dialog_description: [3155, "bool", !1, !0],
  8614. mute_always_show_notification_action: [3156, "bool", !1, !0],
  8615. extensions_graphql_cta_disable: [3192, "string", "2498088", "2498088"],
  8616. recent_emojis_sync: [3198, "bool", !1, !1],
  8617. syncd_report_key_stats: [3301, "bool", !1, !0],
  8618. history_sync_on_demand: [3337, "bool", !1, !1],
  8619. history_sync_on_demand_time_boundary_days: [3642, "int", 365, 365],
  8620. history_sync_on_demand_message_count: [3811, "int", 50, 50],
  8621. history_sync_on_demand_with_android_beta: [4135, "bool", !1, !1],
  8622. extensions_beta_logging_enabled: [3348, "bool", !1, !0],
  8623. ptv_sending_enabled: [3354, "bool", !1, !0],
  8624. ptv_receiving_enabled: [3355, "bool", !1, !0],
  8625. ptv_max_duration_seconds: [3356, "int", 60, 60],
  8626. ptv_autoplay_enabled: [3482, "bool", !0, !0],
  8627. ptv_autoplay_loop_limit: [3483, "int", 0, 0],
  8628. template_button_improvements_on: [3444, "bool", !1, !0],
  8629. qp_campaign_client_enabled: [3536, "bool", !1, !1],
  8630. qp_push_notifications_enabled: [4200, "bool", !1, !1],
  8631. animated_emojis_enabled: [3575, "bool", !1, !1],
  8632. placeholder_message_resend: [3579, "bool", !1, !1],
  8633. is_coupon_button_enabled: [3630, "bool", !1, !0],
  8634. coupon_copy_button_url: [3631, "string", "https://www.whatsapp.com/coupon?code=", "https://www.whatsapp.com/coupon?code="],
  8635. placeholder_message_resend_maximum_days_limit: [3639, "int", 14, 14],
  8636. placeholder_chat_open_group_fetch: [3644, "bool", !1, !0],
  8637. placeholder_chat_open_group_fetch_size_limit: [3749, "int", 33, 65],
  8638. high_quality_link_preview_enabled: [3665, "bool", !1, !0],
  8639. orders_expansion_receiver_countries_allowed: [3690, "string", "", ""],
  8640. retry_receipt_error_code_enabled: [3750, "bool", !1, !0],
  8641. orders_expansion_paying_enabled: [3771, "bool", !1, !0],
  8642. cag_message_edit_receive: [4089, "bool", !1, !1],
  8643. cag_message_edit_send: [4090, "bool", !1, !1],
  8644. broadcast_message_edit_receive: [4091, "bool", !1, !1],
  8645. broadcast_message_edit_send: [4092, "bool", !1, !1],
  8646. expanded_text_formatting_enabled: [4093, "bool", !1, !1],
  8647. support_ticket_data_collection_improvements: [4150, "bool", !1, !1],
  8648. link_preview_shimmer_enabled: [4205, "bool", !1, !1],
  8649. member_name_tag_enabled: [4233, "bool", !1, !0],
  8650. support_ticket_stop_uploading_device_logs: [4242, "bool", !1, !1],
  8651. client_group_participants_limit: [618, "int", 257, 257],
  8652. payment_stickers_render_enabled: [812, "bool", !1, !1],
  8653. payments_merchant_global_orders_value_props_banner_enabled: [3744, "bool", !1, !0],
  8654. payments_br_installment_buyer_learn_more_link: [4144, "string", "https://faq.whatsapp.com/1134168457974360", "https://faq.whatsapp.com/1134168457974360"],
  8655. ipayments_br_installment_seller_learn_more_link: [4145, "string", "https://faq.whatsapp.com/253337763937767", "https://faq.whatsapp.com/253337763937767"],
  8656. privacy_allow_contacts_except: [808, "bool", !1, !1],
  8657. primary_feature_sync: [1063, "bool", !1, !0],
  8658. privacy_narrative_v1: [1071, "bool", !1, !1],
  8659. add_dm_to_chat_overflow_menu: [1309, "bool", !1, !1],
  8660. keep_in_chat_receiver: [1352, "bool", !1, !1],
  8661. keep_in_chat_sender: [1353, "bool", !1, !1],
  8662. keep_in_chat_ui_content: [2005, "bool", !1, !1],
  8663. kic_orphan_cleanup_days: [1673, "int", 31, 31],
  8664. supports_keep_in_chat_in_cag: [2844, "bool", !0, !0],
  8665. kic_msg_send_expiry_sec: [4042, "int", 300, 300],
  8666. ddm_reversed_options: [1397, "bool", !1, !1],
  8667. qm_lean_msg: [1645, "bool", !1, !1],
  8668. pnh_historical_mapping_retention_seconds: [1429, "int", 7776e3, 7776e3],
  8669. trusted_contacts_reciprocity: [1437, "bool", !1, !1],
  8670. trusted_contacts_chat_state_optimization: [1566, "string", "old", "old"],
  8671. trusted_contacts_op: [1687, "bool", !1, !0],
  8672. dm_updated_system_message: [1670, "bool", !1, !0],
  8673. keep_in_chat_undo_duration_limit: [1698, "int", 2592e3, 2592e3],
  8674. view_once_sp_receiver: [1710, "bool", !1, !1],
  8675. view_once_sp_sender: [1711, "bool", !1, !1],
  8676. pnh_ctwa: [1823, "bool", !1, !0],
  8677. pnh_indicator: [2245, "bool", !1, !0],
  8678. usync_lid: [1892, "bool", !1, !1],
  8679. pnh_pn_for_lid_chat_sync: [3062, "bool", !1, !0],
  8680. pnh_identity_verification_v3: [2751, "bool", !1, !1],
  8681. share_own_pn_sync: [3070, "bool", !1, !0],
  8682. pnh_companion_history_sync_lid_chat: [3481, "bool", !1, !0],
  8683. pnh_cag_upgrade: [2304, "int", 0, 0],
  8684. cag_reactions_receive: [2035, "bool", !1, !1],
  8685. cag_reactions_send: [2036, "bool", !1, !1],
  8686. pnh_cag_show_masked_members: [2346, "bool", !1, !1],
  8687. calling_privacy_caller_offer: [1970, "bool", !0, !0],
  8688. calling_privacy_caller_send_token: [1971, "bool", !0, !0],
  8689. calling_privacy_callee: [1972, "bool", !1, !0],
  8690. group_add_ack_server: [3624, "bool", !0, !0],
  8691. pnh_cag_future_proof_banner: [2433, "bool", !1, !1],
  8692. pnh_split_threads_detection: [2479, "bool", !1, !1],
  8693. pnh_ctwa_mat_crashlog: [3691, "bool", !0, !0],
  8694. pnh_group_lid: [2507, "int", 0, 0],
  8695. out_of_sync_disappearing_messages_logging: [2561, "bool", !1, !0],
  8696. dm_chat_picker_v2: [2597, "bool", !1, !0],
  8697. dm_additional_durations: [3305, "bool", !1, !1],
  8698. ephemeral_sync_response: [2714, "bool", !1, !1],
  8699. dmcp_manage_storage_LAUNCH: [2919, "bool", !1, !0],
  8700. settings_search: [2800, "bool", !1, !1],
  8701. enable_soox_message_receiving: [2802, "bool", !1, !1],
  8702. enable_soox_message_sending: [2832, "bool", !1, !1],
  8703. pnh_split_thread_case1_detection: [2939, "bool", !1, !0],
  8704. pnh_cag_block_lid_in_limbo: [2962, "bool", !0, !0],
  8705. prekey_fetch_iq_pnh_lid_enabled: [3103, "bool", !1, !1],
  8706. persisted_profile_name: [3366, "bool", !1, !1],
  8707. pnh_identity_verification_v3_pn_generation: [3458, "bool", !1, !1],
  8708. pnh_1on1_lid_expected: [3469, "bool", !1, !0],
  8709. allow_lid_contacts_storage: [3519, "bool", !1, !1],
  8710. allow_lid_contacts_new_1on1_chat: [3751, "bool", !1, !1],
  8711. allow_lid_contacts_add_to_group: [3752, "bool", !1, !1],
  8712. allow_lid_contacts_calling: [3762, "bool", !1, !1],
  8713. allow_lid_contacts_privacy_settings: [3763, "bool", !1, !1],
  8714. allow_share_lid_contacts_vcard: [3789, "bool", !1, !1],
  8715. allow_parse_lid_contacts_vcard: [3790, "bool", !1, !1],
  8716. rabbit_enabled: [3603, "bool", !1, !1],
  8717. pnh_prevent_undefined_lid_chat_origin: [3872, "bool", !1, !1],
  8718. first_message_experience: [3962, "bool", !1, !1],
  8719. privacy_tips_groups_build: [3995, "bool", !1, !1],
  8720. privacy_tips_callers_build: [3996, "bool", !1, !1],
  8721. privacy_tips_status_build: [3997, "bool", !1, !1],
  8722. privacy_tips_profile_build: [3998, "bool", !1, !1],
  8723. unified_e2ee_copy_build: [3999, "bool", !1, !1],
  8724. unified_e2ee_ui_build: [4e3, "bool", !1, !1],
  8725. dm_reliability_refactor: [4131, "bool", !1, !1],
  8726. pnh_1on1_report_lid_message_send: [4178, "bool", !1, !1],
  8727. privacy_tip_expiration_min: [4214, "int", 10080, 10080],
  8728. sticker_md_favorite_stickers_enabled: [864, "bool", !1, !1],
  8729. smb_orange_enabled: [1469, "bool", !1, !1],
  8730. smb_melon_display_enabled: [1483, "bool", !1, !1],
  8731. smb_melon_management_enabled: [1484, "bool", !1, !1],
  8732. call_only_primary_device_limit_exceeded: [1525, "bool", !1, !1],
  8733. smb_premium_md_limit_perf_tracker_enabled: [1591, "bool", !1, !0],
  8734. smb_billing_enabled: [1583, "bool", !1, !1],
  8735. smb_billing_premium_access_config: [1619, "string", "", ""],
  8736. smb_billing_logging_enabled: [1672, "bool", !1, !0],
  8737. smb_melon_logging_enabled: [1669, "bool", !1, !0],
  8738. smb_dcp_enabled: [1701, "bool", !1, !1],
  8739. smb_custom_url_display_v2_enabled: [1849, "bool", !1, !0],
  8740. smb_multi_device_agents_enabled: [1438, "bool", !1, !0],
  8741. smb_multi_device_message_attribution_enabled: [1981, "bool", !1, !0],
  8742. smb_multi_device_agents_logging_enabled: [1671, "bool", !1, !0],
  8743. smb_multi_device_agents_logging_V2_enabled: [1897, "bool", !1, !0],
  8744. smb_md_agent_chat_assignment_enabled: [1798, "bool", !1, !0],
  8745. smb_md_agent_chat_assignment_system_messages_enabled: [2157, "bool", !1, !0],
  8746. smb_md_agent_chat_assignment_system_messages_logging_v2_enabled: [2709, "bool", !1, !0],
  8747. smb_md_agent_chat_assignment_system_messages_chats_reorder_enabled: [2778, "bool", !1, !0],
  8748. smb_md_agent_chat_assignment_chats_reorder_on_chat_assignment_enabled: [2787, "bool", !1, !0],
  8749. smb_md_agent_chat_assignment_chats_reorder_on_chat_unassignment_enabled: [2788, "bool", !1, !0],
  8750. smb_md_agent_chat_assignment_nux_impressions: [2207, "int", 0, 3],
  8751. smb_md_agent_chat_assignment_chat_list_new_label_enabled: [2976, "bool", !1, !0],
  8752. coex_biz_states_sys_msg_enabled: [2320, "bool", !1, !0],
  8753. smb_biz_profile_custom_url: [2582, "bool", !1, !1],
  8754. smb_biz_profile_custom_url_notifications: [2583, "bool", !1, !1],
  8755. smb_md_agent_chat_assignment_notifications_enabled: [2908, "bool", !1, !0],
  8756. smb_marketing_messages_enabled: [3046, "bool", !1, !0],
  8757. smb_marketing_messages_product_ids: [3113, "string", "", ""],
  8758. smb_rambutan_enabled: [3124, "bool", !1, !0],
  8759. smb_rambutan_product_ids: [3125, "string", "", ""],
  8760. smb_premium_messages_spam_report_enabled: [4005, "bool", !1, !0],
  8761. mex_phase3_enabled: [2249, "bool", !1, !1],
  8762. mex_phase3_status_flags: [2250, "int", 0, 0],
  8763. mex_newsletter_killswitch: [3604, "bool", !1, !1],
  8764. mex_newsletter_flags: [3605, "int", 0, 0],
  8765. groove_enabled_web: [2980, "bool", !1, !1],
  8766. newsletter_enabled: [3385, "bool", !1, !1],
  8767. newsletter_enabled_web: [3020, "bool", !1, !1],
  8768. newsletter_reporting_enabled: [3148, "bool", !1, !0],
  8769. newsletter_suspend_enabled: [3149, "bool", !1, !0],
  8770. channels_restricted_updates_enabled: [4219, "bool", !1, !0],
  8771. allow_nl_linkpreview: [3209, "bool", !0, !0],
  8772. newsletter_creation_enabled: [3607, "bool", !1, !1],
  8773. newsletter_media_autodownload_mode: [3778, "int", 3, 3],
  8774. nl_df_gid: [3617, "string", "", ""],
  8775. nl_crt_df_gid: [3618, "string", "", "120363080354356818"],
  8776. newsletter_tos_notice_id: [3810, "string", "20601216", "20601216"],
  8777. newsletter_creation_tos_id: [3834, "string", "20601217", "20601217"],
  8778. newsletter_creation_nux_id: [3835, "string", "20601218", "20601218"],
  8779. channels_enabled: [3877, "int", 0, 0],
  8780. channels_creation_enabled: [3878, "int", 0, 0],
  8781. channels_directory_enabled: [3879, "int", 0, 0],
  8782. show_channels_not_available_dialog: [3880, "bool", !1, !0],
  8783. newsletter_supported_message_types: [3900, "string", '{"supported": [1, 2, 3, 9]}', '{"supported": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]}'],
  8784. channel_supported_message_types: [3919, "string", "1, 2, 3, 9, 10", "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"],
  8785. otp_ttl_inject_receipt_enabled: [3710, "bool", !1, !0],
  8786. unified_otp_copy_code_url: [3827, "string", "https://www.whatsapp.com/otp/copy/", "https://www.whatsapp.com/otp/copy/"],
  8787. unified_otp_retriever_url: [3828, "string", "https://www.whatsapp.com/otp/code", "https://www.whatsapp.com/otp/code"],
  8788. lid_groups_ougtoing_explict_address_mode: [3514, "bool", !1, !0],
  8789. lid_groups_outgoing_explict_address_mode: [3615, "bool", !1, !0],
  8790. lid_groups_new_group_creation: [3645, "bool", !1, !1],
  8791. lid_groups_handle_server_addressing_mode: [3688, "bool", !1, !1],
  8792. lid_groups_create_lid_individual_chats: [3876, "bool", !1, !1],
  8793. lid_groups_outgoing_explicit_address_mode: [3803, "bool", !1, !0],
  8794. lid_groups_aggregate_participant_change_system_message: [3804, "bool", !1, !1],
  8795. lid_groups_message_send_validation: [4162, "bool", !1, !0],
  8796. group_suspend_v2_enabled: [3180, "bool", !1, !0],
  8797. enable_status_report_and_block: [3988, "bool", !1, !0],
  8798. df_config: [3471, "string", "", ""],
  8799. df_enabled: [3472, "bool", !1, !1]
  8800. }
  8801. }, 7674: (e, t) => {
  8802. "use strict";
  8803. Object.defineProperty(t, "__esModule", {value: !0}), t.MMS_URL_MEDIA_TYPE_SEARCH_PARAM = t.IS_MMS_URL_SEARCH_PARAM = void 0;
  8804. t.IS_MMS_URL_SEARCH_PARAM = "__wa-mms";
  8805. t.MMS_URL_MEDIA_TYPE_SEARCH_PARAM = "mms-type"
  8806. }, 2765: (e, t) => {
  8807. "use strict";
  8808. Object.defineProperty(t, "__esModule", {value: !0}), t.debugDisableFeatureFlag = function (e) {
  8809. n[e] = !1
  8810. }, t.debugEnableFeatureFlag = function (e) {
  8811. n[e] = !0
  8812. }, t.isFeatureEnabled = function (e) {
  8813. return n[e]
  8814. }, t.overwriteDebugFeatures = function () {
  8815. };
  8816. const n = {
  8817. a11y_block: !1,
  8818. lid_debug: !1,
  8819. format_bulleted_msg: !1,
  8820. media_existence_check: !1,
  8821. web_voip_voice_call: !1,
  8822. web_voip_video_call: !1,
  8823. youtube_video_preview_without_blur: !1,
  8824. message_add_ons: !1,
  8825. reactions_filter_problematic_flags: !0,
  8826. native_promise_runtime: !0,
  8827. skip_compliance_phone_check: !1,
  8828. debug_commands: !1
  8829. }
  8830. }, 7761: (e, t, n) => {
  8831. "use strict";
  8832. Object.defineProperty(t, "__esModule", {value: !0}), t.canEnableOfflineNotifications = function () {
  8833. const {getABPropConfigValue: e} = n(3741);
  8834. return !1
  8835. }, t.canSupportOfflineNotifications = o;
  8836. var r = n(8745);
  8837. r.UA.isSafari && Number(r.UA.browserVersion.split(".")[0]);
  8838. function o() {
  8839. return !1
  8840. }
  8841. }, 8615: (e, t, n) => {
  8842. "use strict";
  8843. var r = n(5318);
  8844. Object.defineProperty(t, "__esModule", {value: !0}), t.decryptPartialMedia = t.decrypt = t.cleanupCiphertextAndIv = t.HMAC_SIZE = t.BLOCK_SIZE = void 0;
  8845. var o = r(n(8926)), i = n(8358);
  8846. t.BLOCK_SIZE = 16;
  8847. t.HMAC_SIZE = 10;
  8848. const s = function () {
  8849. var e = (0, o.default)((function* (e) {
  8850. const {ciphertext: t, iv: n, mediaKeys: r} = e, {encKey: o} = r;
  8851. try {
  8852. const e = yield self.crypto.subtle.importKey("raw", new Uint8Array(o), "AES-CBC", !1, ["decrypt"]).catch((e => {
  8853. throw __LOG__(2)`decryptPartialMedia:decrypt importKey error: ${String(e)}`, e
  8854. }));
  8855. return self.crypto.subtle.decrypt({name: "AES-CBC", iv: n}, e, t)
  8856. } catch (e) {
  8857. throw __LOG__(2)`decryptPartialMedia:decrypt decrypt error: ${String(e)}`, e
  8858. }
  8859. }));
  8860. return function () {
  8861. return e.apply(this, arguments)
  8862. }
  8863. }();
  8864. t.decrypt = s;
  8865. const a = function () {
  8866. var e = (0, o.default)((function* (e) {
  8867. const {ciphertext: t, mediaKeys: n} = e, {encKey: r} = n,
  8868. o = {name: "AES-CBC", iv: (t instanceof Uint8Array ? t : new Uint8Array(t)).slice(-16)};
  8869. try {
  8870. const e = yield self.crypto.subtle.importKey("raw", new Uint8Array(r), "AES-CBC", !1, ["encrypt"]).catch((e => {
  8871. __LOG__(2)`decryptPartialMedia:getEncryptedPadding importKey error: ${String(e)}`
  8872. })), t = new Uint8Array([]);
  8873. return self.crypto.subtle.encrypt(o, e, t)
  8874. } catch (e) {
  8875. return void __LOG__(2)`decryptPartialMedia:getEncryptedPadding encrypt error: ${String(e)}`
  8876. }
  8877. }));
  8878. return function () {
  8879. return e.apply(this, arguments)
  8880. }
  8881. }(), c = e => {
  8882. const {serverRangeStart: t, ciphertext: n, mediaKeys: r} = e;
  8883. let o = n instanceof Uint8Array ? n : new Uint8Array(n);
  8884. const s = o.byteLength % 16 == 0;
  8885. let c;
  8886. return 0 === t ? c = new Uint8Array(r.iv) : (c = o.slice(0, 16), o = o.slice(16)), s || (o = o.slice(0, o.byteLength - 10)), s ? a({
  8887. ciphertext: o,
  8888. mediaKeys: r
  8889. }).then((e => (o = (0, i.concatTypedArrays)(Uint8Array, [o, new Uint8Array(e)]), {
  8890. ciphertext: o,
  8891. iv: c
  8892. }))) : Promise.resolve({ciphertext: o, iv: c})
  8893. };
  8894. t.cleanupCiphertextAndIv = c;
  8895. const l = function () {
  8896. var e = (0, o.default)((function* (e) {
  8897. let {mediaKeys: t, ciphertext: n} = e;
  8898. const {ciphertext: r, iv: o} = yield c({serverRangeStart: 0, ciphertext: n, mediaKeys: t});
  8899. return s({ciphertext: r, iv: o, mediaKeys: t})
  8900. }));
  8901. return function () {
  8902. return e.apply(this, arguments)
  8903. }
  8904. }();
  8905. t.decryptPartialMedia = l
  8906. }, 346: (e, t, n) => {
  8907. "use strict";
  8908. var r = n(5318);
  8909. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  8910. var o = r(n(2755)), i = r(n(9482));
  8911. let s;
  8912. if ("undefined" != typeof self) s = self; else {
  8913. if (void 0 === n.g) throw(0, i.default)("Couldn't get global object");
  8914. s = n.g
  8915. }
  8916. var a = "AbortController" in s ? s.AbortController : class {
  8917. constructor() {
  8918. this.signal = new o.default
  8919. }
  8920. abort() {
  8921. const e = new Event("abort");
  8922. this.signal.dispatchEvent(e)
  8923. }
  8924. };
  8925. t.default = a
  8926. }, 2755: (e, t, n) => {
  8927. "use strict";
  8928. var r = n(5318);
  8929. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  8930. var o = r(n(8019)), i = class extends o.default {
  8931. constructor() {
  8932. super(), this.aborted = !1
  8933. }
  8934. dispatchEvent(e) {
  8935. return "abort" === e.type && (this.aborted = !0, "function" == typeof this.onabort && this.onabort.call(this, e)), super.dispatchEvent(e)
  8936. }
  8937. toString() {
  8938. return "[object AbortSignal]"
  8939. }
  8940. };
  8941. t.default = i
  8942. }, 8019: (e, t, n) => {
  8943. "use strict";
  8944. var r = n(5318);
  8945. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  8946. var o = r(n(7880));
  8947. t.default = class {
  8948. constructor() {
  8949. this._emitter = new o.default
  8950. }
  8951. addEventListener(e, t) {
  8952. this._emitter.on(e, t, this)
  8953. }
  8954. removeEventListener(e, t) {
  8955. this._emitter.off(e, t, this)
  8956. }
  8957. dispatchEvent(e) {
  8958. return this._emitter.trigger(e.type), !0
  8959. }
  8960. }
  8961. }, 7880: (e, t, n) => {
  8962. "use strict";
  8963. var r = n(5318);
  8964. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  8965. var o = r(n(835)), i = r(n(1609)), s = r(n(1463)), a = r(n(9482));
  8966. const c = /\s+/;
  8967. t.default = class {
  8968. on(e, t, n) {
  8969. if (!t) return this;
  8970. if ("function" != typeof t) throw(0, a.default)("Callback parameter passed is not a function");
  8971. return this._multiEvent(this.on, ...arguments) || this._getOrCreateEvents(e).push({
  8972. callback: t,
  8973. context: n,
  8974. ctx: n || this
  8975. }), this
  8976. }
  8977. once(e, t, n) {
  8978. if (!t) return this;
  8979. if (this._multiEvent(this.once, ...arguments)) return this;
  8980. const r = this, o = (0, s.default)((function () {
  8981. r.off(e, o), t.apply(this, arguments)
  8982. }));
  8983. return o._callback = t, this.on(e, o, n)
  8984. }
  8985. off(e, t, n) {
  8986. const r = this._events;
  8987. if (!r) return this;
  8988. if (this._multiEvent(this.off, ...arguments)) return this;
  8989. if (!e && !t && !n) return this._events = void 0, this;
  8990. const o = e ? [e] : Object.keys(r);
  8991. for (let e = 0; e < o.length; e++) {
  8992. const i = o[e], s = r[i];
  8993. if (s) {
  8994. if (r[i] = [], t || n) for (let e = 0; e < s.length; e++) {
  8995. const o = s[e];
  8996. (t && t !== o.callback && t !== o.callback._callback || n && o.context !== n) && r[i].push(o)
  8997. }
  8998. r[i].length || delete r[i]
  8999. }
  9000. }
  9001. return this
  9002. }
  9003. trigger(e) {
  9004. for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
  9005. if (!this._events) return this;
  9006. if (this._multiEvent(this.trigger, ...arguments)) return this;
  9007. const o = this._getEvents(e), i = this._getEvents("all");
  9008. return o && this._triggerEvents(o, n), i && this._triggerEvents(i, arguments), this
  9009. }
  9010. stopListening(e, t, n) {
  9011. const r = this._listeningTo;
  9012. if (!r) return this;
  9013. const o = null == e ? void 0 : e._listenId, s = o ? {[o]: e} : r;
  9014. for (const e in s) {
  9015. const o = s[e];
  9016. o.off(t, n, this), (!t && !n || (0, i.default)(o._events)) && delete r[e]
  9017. }
  9018. return (0, i.default)(this._listeningTo) && delete this._listeningTo, this
  9019. }
  9020. listenTo(e, t, n) {
  9021. return n ? (this._addListeningTo(e), e.on(t, n, this), this) : this
  9022. }
  9023. listenToOnce(e, t, n) {
  9024. return this._addListeningTo(e), e.once(t, n, this), this
  9025. }
  9026. listenToAndRun(e, t, n) {
  9027. return this.listenTo.apply(this, arguments), n.apply(this), this
  9028. }
  9029. isListening(e) {
  9030. const t = this._events;
  9031. return !!t && ("string" == typeof e ? !!t[e] : (0, i.default)(t))
  9032. }
  9033. _addListeningTo(e) {
  9034. (this._listeningTo || (this._listeningTo = {}))[e._listenId || (e._listenId = (0, o.default)("l"))] = e
  9035. }
  9036. _getOrCreateEvents(e) {
  9037. const t = this._events || (this._events = {});
  9038. return t[e] || (t[e] = [])
  9039. }
  9040. _getEvents(e) {
  9041. if (!e) return;
  9042. const t = this._events;
  9043. return t ? t[e] : void 0
  9044. }
  9045. _multiEvent(e, t) {
  9046. if (c.test(t)) {
  9047. const i = t.split(c);
  9048. for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), o = 2; o < n; o++) r[o - 2] = arguments[o];
  9049. for (let t = 0; t < i.length; t++) e.call(this, i[t], ...r);
  9050. return !0
  9051. }
  9052. return !1
  9053. }
  9054. _triggerEvents(e, t) {
  9055. let n, r = -1;
  9056. const o = e.length, i = t[0], s = t[1], a = t[2];
  9057. switch (t.length) {
  9058. case 0:
  9059. for (; ++r < o;) (n = e[r]).callback.call(n.ctx);
  9060. return;
  9061. case 1:
  9062. for (; ++r < o;) (n = e[r]).callback.call(n.ctx, i);
  9063. return;
  9064. case 2:
  9065. for (; ++r < o;) (n = e[r]).callback.call(n.ctx, i, s);
  9066. return;
  9067. case 3:
  9068. for (; ++r < o;) (n = e[r]).callback.call(n.ctx, i, s, a);
  9069. return;
  9070. default:
  9071. for (; ++r < o;) (n = e[r]).callback.apply(n.ctx, t)
  9072. }
  9073. }
  9074. bind() {
  9075. return this.on(...arguments)
  9076. }
  9077. unbind() {
  9078. return this.off(...arguments)
  9079. }
  9080. removeListener() {
  9081. return this.off(...arguments)
  9082. }
  9083. removeAllListeners() {
  9084. return this.off()
  9085. }
  9086. emit() {
  9087. for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++) t[n - 1] = arguments[n];
  9088. return this.trigger(arguments)
  9089. }
  9090. }
  9091. }, 8745: (e, t, n) => {
  9092. "use strict";
  9093. var r = n(5318);
  9094. Object.defineProperty(t, "__esModule", {value: !0}), t.UA = t.OS_TYPE = t.BROWSER_TYPE = void 0, t.gteVersion = s, t.parseUA = c;
  9095. var o = r(n(2238));
  9096. t.BROWSER_TYPE = {
  9097. CHROME: "chrome",
  9098. CHROMIUM: "chromium",
  9099. FIREFOX: "firefox",
  9100. SAFARI: "safari",
  9101. IE: "ie",
  9102. OPERA: "opera",
  9103. EDGE: "edge"
  9104. };
  9105. function i(e, t) {
  9106. let n, r;
  9107. const o = /(\.0)+[^\.]*$/, i = (e + "").replace(o, "").split("."),
  9108. s = (t + "").replace(o, "").split("."), a = Math.min(i.length, s.length);
  9109. for (n = 0; n < a; n++) if (r = parseInt(i[n], 10) - parseInt(s[n], 10), 0 !== r) return r;
  9110. return i.length - s.length
  9111. }
  9112. function s(e, t) {
  9113. return i(e, t) >= 0
  9114. }
  9115. function a(e, t) {
  9116. return i(e, t) < 0
  9117. }
  9118. function c(e) {
  9119. const t = new o.default;
  9120. t.setUA(e || "");
  9121. const n = (t.getBrowser().name || "").toUpperCase(), r = t.getBrowser().version || "0.0.0",
  9122. i = (t.getEngine().name || "").toUpperCase(), c = (t.getOS().name || "").toUpperCase(),
  9123. l = t.getOS().version || "0.0.0", u = "SAFARI" === n, d = "CHROME" === n, _ = "GECKO" === i,
  9124. f = "BLINK" === i;
  9125. let h = !1;
  9126. switch (c) {
  9127. case"MAC OS":
  9128. d ? h = s(l, "10.10") && s(r, "41.0.0") : s(l, "10.7") && (h = !0);
  9129. break;
  9130. case"WINDOWS":
  9131. s(l, "8.1") && (_ || d && s(r, "41.0.0")) && (h = !0)
  9132. }
  9133. const p = u || d && a(r, "76");
  9134. return {
  9135. isWebkit: !i || "WEBKIT" === i,
  9136. isGecko: _,
  9137. isTrident: "TRIDENT" === i || "EDGEHTML" === i,
  9138. isSafari: u,
  9139. isElectron: !1,
  9140. isBlink: f,
  9141. isBuggyVideoLoad: d && s(r, "76") || f && !d,
  9142. hasEmoji: h,
  9143. troublesWithLotsOfVideos: d,
  9144. supportsEmojiEllipsification: !p,
  9145. isBrokenGetUserMedia: d && a(r, "50"),
  9146. isLocalStorageBroken: u && s(r, "14.1") && a(r, "14.1.2"),
  9147. os: c.toLowerCase(),
  9148. osVersion: l,
  9149. browser: n.toLowerCase(),
  9150. browserVersion: r,
  9151. parser: t,
  9152. isChrome: d
  9153. }
  9154. }
  9155. t.OS_TYPE = {WINDOWS: "windows", MAC: "mac os", CHROMEOS: "chromium os"};
  9156. const l = c("undefined" != typeof self ? self.navigator.userAgent : null);
  9157. t.UA = l
  9158. }, 1054: (e, t, n) => {
  9159. "use strict";
  9160. var r = n(5318);
  9161. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e, t, n) {
  9162. let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : String,
  9163. i = (0, o.default)(e, t.map(r)).join("");
  9164. const s = n ? 4e3 : Number.POSITIVE_INFINITY;
  9165. i.length > s && (i = i.slice(0, s).replace(/\s+$/, " [truncated]"));
  9166. return i
  9167. };
  9168. var o = r(n(7791))
  9169. }, 3948: (e, t, n) => {
  9170. "use strict";
  9171. var r = n(5318);
  9172. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9173. var o = r(n(8926)), i = r(n(9482));
  9174. class s {
  9175. constructor(e) {
  9176. this._handleMessage = e => {
  9177. if (!e.data || !e.data.action) return;
  9178. const t = e.data;
  9179. if (!e.ports || 0 === e.ports.length) return;
  9180. const n = e.ports;
  9181. if (!s.isSW() && window.navigator.serviceWorker && e.source !== window.navigator.serviceWorker.controller) return;
  9182. let r;
  9183. r = "function" == typeof e.waitUntil ? t => e.waitUntil(t) : () => {
  9184. }, r(Promise.resolve(this.requestHandler(t)).then((e => {
  9185. n[0].postMessage(e)
  9186. })).catch((e => {
  9187. n[0].postMessage({error: e && e.toString()})
  9188. })))
  9189. }, this.requestHandler = e
  9190. }
  9191. init() {
  9192. const e = s.isSW() ? self : window.navigator.serviceWorker;
  9193. try {
  9194. if (!e) return;
  9195. e.addEventListener("message", this._handleMessage)
  9196. } catch (e) {
  9197. }
  9198. }
  9199. static isSW() {
  9200. return "undefined" == typeof window
  9201. }
  9202. static getRequestor(e) {
  9203. return s.isSW() ? "string" == typeof e ? self.clients.get(e) : Promise.resolve(e) : window.navigator.serviceWorker ? window.navigator.serviceWorker.ready.then((() => window.navigator.serviceWorker ? window.navigator.serviceWorker.controller : null)) : Promise.resolve(null)
  9204. }
  9205. static broadcast(e, t) {
  9206. return (0, o.default)((function* () {
  9207. if (!s.isSW()) throw(0, i.default)("Broadcast called from non-serviceworker.");
  9208. const n = yield self.clients.matchAll();
  9209. return 0 === n.length ? Promise.reject((0, i.default)("No clients available.")) : Promise.all(n.map((n => s.request(n, e, t))))
  9210. }))()
  9211. }
  9212. static request(e, t, n) {
  9213. const r = new MessageChannel;
  9214. return new Promise(((o, a) => (r.port1.onmessage = e => {
  9215. var t;
  9216. (null === (t = e.data) || void 0 === t ? void 0 : t.error) ? a(e.data.error) : o(e.data)
  9217. }, s.getRequestor(e).then((e => {
  9218. if (!e) return a((0, i.default)("No ServiceWorker controlling this client."));
  9219. e.postMessage({action: t, message: n, version: "2.2322.15"}, [r.port2])
  9220. })))))
  9221. }
  9222. }
  9223. t.default = s
  9224. }, 9194: (e, t) => {
  9225. "use strict";
  9226. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9227. var n = {
  9228. REQUEST_STREAMING_INFO: "GET_STREAMING_INFO",
  9229. REQUEST_RMR: "REQUEST_RMR",
  9230. SEND_STREAMING_CHUNK: "SEND_STREAMING_CHUNK",
  9231. EXP_BACKOFF: "EXP_BACKOFF",
  9232. LOG: "LOG",
  9233. UPLOAD_LOGS: "UPLOAD_LOGS",
  9234. SET_L10N: "SET_L10N",
  9235. STREAMING_SUPPORTED: "STREAMING_SUPPORTED",
  9236. REMOVE_PP: "REMOVE_PP",
  9237. LOGOUT: "LOGOUT",
  9238. CLEAN_ASSETS: "CLEAN_ASSETS",
  9239. ACTIVE_TAB: "ACTIVE_TAB",
  9240. STOP_COMMS: "STOP_COMMS"
  9241. };
  9242. t.default = n
  9243. }, 1373: (e, t) => {
  9244. "use strict";
  9245. let n;
  9246. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9247. try {
  9248. n = self.indexedDB
  9249. } catch (e) {
  9250. }
  9251. var r = n;
  9252. t.default = r
  9253. }, 1157: (e, t, n) => {
  9254. "use strict";
  9255. var r = n(5318);
  9256. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9257. var o = r(n(3948)), i = r(n(9194)), s = r(n(6857));
  9258. class a extends s.default {
  9259. constructor() {
  9260. super(...arguments), this.matchAction = e => e === i.default.ACTIVE_TAB, this.onAction = () => o.default.broadcast(i.default.ACTIVE_TAB)
  9261. }
  9262. }
  9263. t.default = a
  9264. }, 3933: (e, t, n) => {
  9265. "use strict";
  9266. var r = n(5318);
  9267. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9268. var o = r(n(8926)), i = r(n(9194)), s = r(n(6857));
  9269. class a extends s.default {
  9270. constructor() {
  9271. var e;
  9272. super(...arguments), e = this, this.matchFetch = e => {
  9273. const {request: t} = e, n = s.default.parseUrl(t.url);
  9274. return t.method === s.default.RequestType.GET && !!n && n.base === self.registration.scope && !!n.relativePath.match("^img/")
  9275. }, this.onFetch = function () {
  9276. var t = (0, o.default)((function* (t) {
  9277. const {request: n} = t, r = yield e.cache.matchOrFetch(n);
  9278. return r.ok ? r : e.cache.fetchAndPut(n)
  9279. }));
  9280. return function () {
  9281. return t.apply(this, arguments)
  9282. }
  9283. }(), this.matchAction = e => i.default.CLEAN_ASSETS === e, this.onAction = function () {
  9284. var t = (0, o.default)((function* (t, n) {
  9285. const r = new Set(n), o = yield e.cache.keys();
  9286. if (!o) return;
  9287. const i = [];
  9288. return o.forEach((e => {
  9289. const t = e.url.lastIndexOf("/") + 1, n = e.url.slice(t);
  9290. r.has(n) || i.push(e)
  9291. })), Promise.all(i.map((t => e.cache.delete(t))))
  9292. }));
  9293. return function () {
  9294. return t.apply(this, arguments)
  9295. }
  9296. }()
  9297. }
  9298. }
  9299. t.default = a
  9300. }, 2612: (e, t, n) => {
  9301. "use strict";
  9302. var r = n(5318);
  9303. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9304. var o = r(n(3948)), i = r(n(9482));
  9305. t.default = e => {
  9306. self.addEventListener("install", (function (t) {
  9307. __LOG__(2)`Installing...`;
  9308. const n = e.filter((e => e.matchInstall(t))).map((e => Promise.resolve(e.onInstall(t))));
  9309. t.waitUntil(Promise.all(n).then((() => self.skipWaiting())).catch((e => {
  9310. __LOG__(3)`onInstall error: ${String(e)}`
  9311. })))
  9312. })), self.addEventListener("activate", (function (t) {
  9313. __LOG__(2)`Activating...`;
  9314. const n = e.filter((e => e.matchActivate(t))).map((e => e.onActivate(t)));
  9315. t.waitUntil(self.clients.claim().then((() => Promise.all(n))).catch((e => {
  9316. __LOG__(3)`onActivate error: ${e}.`
  9317. })))
  9318. })), self.addEventListener("fetch", (function (t) {
  9319. const n = e.find((e => e.matchFetch(t)));
  9320. if (n) return t.respondWith(n.onFetch(t))
  9321. })), self.addEventListener("push", (function (t) {
  9322. const n = e.find((e => e.matchPush(t)));
  9323. if (n) return n.onPush(t)
  9324. })), self.addEventListener("notificationclick", (function (t) {
  9325. const n = e.find((e => e.matchNotificationClick(t)));
  9326. if (n) return n.onNotificationClick(t)
  9327. }));
  9328. new o.default((t => {
  9329. let {action: n, message: r} = t;
  9330. const o = e.find((e => e.matchAction(n)));
  9331. return o ? o.onAction(n, r) : Promise.reject((0, i.default)(`Invalid Action: ${n}`))
  9332. })).init()
  9333. }
  9334. }, 8043: (e, t, n) => {
  9335. "use strict";
  9336. var r = n(5318);
  9337. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9338. var o = r(n(8926)), i = r(n(9194)), s = r(n(3735)), a = r(n(6857)), c = r(n(5420));
  9339. class l extends a.default {
  9340. constructor(e, t) {
  9341. var n;
  9342. super(e, t), n = this, this.matchInstall = () => !0, this.onInstall = function () {
  9343. var e = (0, o.default)((function* () {
  9344. const e = yield n.store.get("l10n");
  9345. return n.cacheObject.hashedResources.push(...n.cachedL10nHashes(n.cacheObject, e)), n.cache.update(n.cacheObject.hashedResources, n.cacheObject.unhashedResources)
  9346. }));
  9347. return function () {
  9348. return e.apply(this, arguments)
  9349. }
  9350. }(), this.matchActivate = () => !0, this.onActivate = () => this.cache.cleanup(), this.matchFetch = e => {
  9351. const {request: t} = e, n = a.default.parseUrl(t.url);
  9352. return t.method === a.default.RequestType.GET && !this.isCacheStale() && !!n && n.base === self.registration.scope && this.cacheList.has(n.relativePath)
  9353. }, this.onFetch = e => {
  9354. const {request: t} = e, n = a.default.parseUrl(t.url);
  9355. return n ? this.cache.matchOrFetch(t, `${n.base}${n.relativePath}`) : self.fetch(t)
  9356. }, this.matchAction = e => e === i.default.SET_L10N, this.onAction = function () {
  9357. var e = (0, o.default)((function* (e, t) {
  9358. const r = yield n.store.get("l10n");
  9359. if (r && t.locale === r.locale) return;
  9360. const [o] = n.cachedL10nHashes(n.cacheObject, t);
  9361. if (!o) return n.store.delete("l10n");
  9362. const i = `${self.registration.scope}${c.default.getIndexPath(t)}`;
  9363. return Promise.all([n.cache.fetchAndPut(i, self.registration.scope), n.store.put("l10n", {
  9364. locale: t.locale,
  9365. isRTL: t.isRTL
  9366. })])
  9367. }));
  9368. return function () {
  9369. return e.apply(this, arguments)
  9370. }
  9371. }(), this.cacheObject = s.default, this.cacheList = new Set([...this.cacheObject.hashedResources, ...this.cacheObject.unhashedResources, ...Object.keys(this.cacheObject.l10n.locales).map((e => this.cacheObject.l10n.locales[e]))])
  9372. }
  9373. cachedL10nHashes(e) {
  9374. let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
  9375. const {locale: n} = t, r = e.l10n.locales[n];
  9376. return r ? [r] : []
  9377. }
  9378. isCacheStale() {
  9379. return (new Date).getTime() - this.cacheObject.releaseDate >= 2592e6
  9380. }
  9381. }
  9382. t.default = l
  9383. }, 7719: (e, t, n) => {
  9384. "use strict";
  9385. var r = n(5318);
  9386. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9387. var o = r(n(8926)), i = r(n(2083)), s = r(n(5420));
  9388. const a = i.default.prefs, c = self.caches.keys(), l = /wa\d+\.\d+\.\d+(\.[id])?(\.canary)?$/,
  9389. u = ["wa-pp", "wa-assets", "wa-stickers", "wa_web_user_prefs_cache_store"];
  9390. function d(e) {
  9391. this.cacheName = e, this.openCachePromise = self.caches.open(this.cacheName)
  9392. }
  9393. function _() {
  9394. return (_ = (0, o.default)((function* (e) {
  9395. try {
  9396. const t = (yield c).find((t => t !== e && l.test(t)));
  9397. if (t) return new d(t)
  9398. } catch (e) {
  9399. __LOG__(3)`Could not find previous cache, current cache:${this.cacheName}, error: ${e}`
  9400. }
  9401. }))).apply(this, arguments)
  9402. }
  9403. d.prototype = {
  9404. update(e, t) {
  9405. var n = this;
  9406. return (0, o.default)((function* () {
  9407. try {
  9408. const r = yield function () {
  9409. return _.apply(this, arguments)
  9410. }(n.cacheName);
  9411. if (!r) return;
  9412. return __LOG__(2)`Updating cache: ${n.cacheName}`, a.get("l10n").then((o => Promise.all(n.prefetchHashedResources(e, r).concat(n.prefetchUnhashedResources(t, o)))))
  9413. } catch (e) {
  9414. __LOG__(3)`Error occured while updating cache:${n.cacheName}, error: ${e}`
  9415. }
  9416. }))()
  9417. }, prefetchHashedResources(e, t) {
  9418. var n = this;
  9419. return e.map(function () {
  9420. var e = (0, o.default)((function* (e) {
  9421. const r = self.registration.scope + e, o = yield t.match(r).catch((e => {
  9422. __LOG__(3)`Unable to match prev. cache, cache name: ${t.cacheName}, request: ${r}, error: ${e}`
  9423. }));
  9424. return o ? n.put(r, o) : n.fetchAndPut(r)
  9425. }));
  9426. return function () {
  9427. return e.apply(this, arguments)
  9428. }
  9429. }())
  9430. }, prefetchUnhashedResources(e, t) {
  9431. return e.map((e => "" === e ? this.fetchAndPut(self.registration.scope + s.default.getIndexPath(t), self.registration.scope, {cache: "reload"}) : this.fetchAndPut(self.registration.scope + e)))
  9432. }, cleanup() {
  9433. var e = this;
  9434. return (0, o.default)((function* () {
  9435. const t = yield c;
  9436. return Promise.all(t.map((t => {
  9437. if (t !== e.cacheName && !u.includes(t)) return self.caches.delete(t).catch((n => {
  9438. __LOG__(3)`Unable to delete cache: ${t}, current cache: ${e.cacheName}, error: ${n}`
  9439. }))
  9440. })))
  9441. }))()
  9442. }, matchOrFetch(e, t, n) {
  9443. var r = this;
  9444. return (0, o.default)((function* () {
  9445. const o = t || h(e);
  9446. return (yield r.match(o)) || r.fetchAndPut(e, o, n)
  9447. }))()
  9448. }, fetchAndPut(e, t, n) {
  9449. var r = this;
  9450. return (0, o.default)((function* () {
  9451. const o = s.default.manuallyCloneRequest(e, void 0, {redirect: "manual", mode: "cors"});
  9452. try {
  9453. const i = yield self.fetch(o, n);
  9454. if (i.ok) {
  9455. const n = t || h(e);
  9456. r.put(n, i.clone())
  9457. } else "opaqueredirect" !== i.type && __LOG__(3)`Received invalid response, url: ${i.url}, status: ${i.status}, type: ${i.type}`;
  9458. return i
  9459. } catch (t) {
  9460. throw __LOG__(3)`Unable to fetch request: ${h(e)}, error: ${t}`, t
  9461. }
  9462. }))()
  9463. }, reset() {
  9464. return this.openCachePromise = self.caches.delete(this.cacheName).then((() => self.caches.open(this.cacheName)))
  9465. }, match(e, t) {
  9466. var n = this;
  9467. return (0, o.default)((function* () {
  9468. try {
  9469. return (yield n.openCachePromise).match(e, t)
  9470. } catch (t) {
  9471. __LOG__(3)`Unable to match request: ${h(e)}, in cache: ${n.cacheName}, error: ${t}`
  9472. }
  9473. }))()
  9474. }, put(e, t) {
  9475. var n = this;
  9476. return (0, o.default)((function* () {
  9477. try {
  9478. return (yield n.openCachePromise).put(e, t)
  9479. } catch (r) {
  9480. __LOG__(3)`Unable to put in cache: ${n.cacheName}, request: ${h(e)}, response status: ${t.status}, error: ${r}`
  9481. }
  9482. }))()
  9483. }, delete(e, t) {
  9484. var n = this;
  9485. return (0, o.default)((function* () {
  9486. try {
  9487. return (yield n.openCachePromise).delete(e, t)
  9488. } catch (t) {
  9489. __LOG__(3)`Unable to delete request: ${h(e)}, in cache: ${n.cacheName}, error: ${t}`
  9490. }
  9491. }))()
  9492. }, keys(e, t) {
  9493. var n = this;
  9494. return (0, o.default)((function* () {
  9495. try {
  9496. return (yield n.openCachePromise).keys(e, t)
  9497. } catch (t) {
  9498. __LOG__(3)`Unable to match request: ${h(e)}, in cache: ${n.cacheName}, error: ${t}`
  9499. }
  9500. }))()
  9501. }
  9502. };
  9503. var f = d;
  9504. function h(e) {
  9505. return e instanceof Request ? e.url : e
  9506. }
  9507. t.default = f
  9508. }, 3735: (e, t) => {
  9509. "use strict";
  9510. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9511. t.default = {
  9512. version: "2.2322.15",
  9513. hashedResources: ["1761.5e7d20fb4bfddba0ae17.js", "2266.87ab44d761a0ff36c0ea.js", "4106.ff0d3f431c5b61342a25.js", "432.bfe726e73e73d6d5c2ec.js", "4548.792c5da266e5ea08d5f3.js", "4944.cae5d06abb1b7e4ee034.js", "5346.72056a1c38e64d3393ae.js", "6086.14cf80e6ae6763d7a026.js", "6235.962c3cd8f396422e07c2.js", "648.b63736481bc87d180992.js", "app.df22dc4b1b984dc87f36.js", "early_error_handling.02cb80dc4f51c7e6bb93.js", "lazy_loaded_business_direct_utils.a674e7d659e3a15c37a1.js", "lazy_loaded_ca_root_certificates.ab2711e7139ff1b2317d.js", "lazy_loaded_high_priority_components.592036ed08f4319f192f.js", "lazy_loaded_high_priority_components~lazy_loaded_low_priority_components.778d314de8598f8e476e.js", "lazy_loaded_low_priority_components.b59c7aa8144a42461ce9.js", "lazy_loaded_low_priority_components~.3327352a74fdf794715e.js", "lazy_loaded_remove_direct_connection_keys.74bdf19d14b495555def.js", "libsignal-protocol-ee5b8ba.min.js", "main.2c63fbde3a91246a0977.js", "main~.7f1c85285a1a1c6251ed.js", "pdf.worker.96d1bc1f3d0105cd5a81bae7a9dad228.js", "runtime.d9a06bd6a7a484d6e04e.js", "vendor1~app.a91035d81a749b3d5627.js", "vendors~lazy_loaded_business_direct_utils.e24e12d5047d3b57fef7.js", "vendors~lazy_loaded_high_priority_components~lazy_loaded_low_priority_components.e4bc397bdb594c85b9eb.js", "vendors~lazy_loaded_low_priority_components.c8c8d4909f6ad2a4f8fd.js", "vendors~lazy_loaded_relay.924f984ed0bd537f91a5.js", "vendors~main.7e165df5f2eb091c4a6f.js", "vendors~main~.77fd43f3d675e162dcdf.js", "vendors~pdf.9f876162b6247e9c8463.js", "app-397dc77d692df7ff99b6.css", "browsers_2767db756145c71a601d.css", "lazy_loaded_high_priority_components.fcf61e27fd02a625f008.css", "lazy_loaded_low_priority_components.16ba3a1e6485b50fd77c.css", "main.bc3c58bb1ad0ec61786a.css", "main~.2d430bc83a97ffb2016d.css", "stylex-534e186735a7216f8166323ac4f40ec0.css"],
  9514. unhashedResources: ["apple-touch-icon.png", "assets-manifest-2.2322.15.json", "binary-transparency-manifest-2.2322.15.json", "bryndan_write_20e48b2ec8c64b2a1ceb5b28d9bcc9d0.ttf", "crossdomain.xml", "favicon-48x48.ico", "favicon-64x64.ico", "favicon.ico", "manifest-apple.json", "manifest.json", "notification_2a485d84012c106acef03b527bb54635.mp3", "noto_emoji_regular_74a68c7003890e207589ea43dc7572ca.ttf", "robots.txt", "sequential-ptt-end_62ed28be622237546fd39f9468a76a49.mp3", "sequential-ptt-middle_7fa161964e93db72b8d00ae22189d75f.mp3", "whatsapp_pwa_apple_icon_128.png", "whatsapp_pwa_apple_icon_16.png", "whatsapp_pwa_apple_icon_192.png", "whatsapp_pwa_apple_icon_32.png", "whatsapp_pwa_apple_icon_512.png", "whatsapp_pwa_apple_icon_512.svg", "whatsapp_pwa_apple_icon_60.png", "whatsapp_pwa_apple_icon_64.png", "whatsapp_pwa_apple_icon_90.png", "whatsapp_pwa_icon_128.png", "whatsapp_pwa_icon_16.png", "whatsapp_pwa_icon_192.png", "whatsapp_pwa_icon_32.png", "whatsapp_pwa_icon_512.png", "whatsapp_pwa_icon_512.svg", "whatsapp_pwa_icon_60.png", "whatsapp_pwa_icon_64.png", "whatsapp_pwa_icon_90.png", "whatsapp-webclient-login_c09223f0813e7c3adc16476cba2a5d0d.mp4", "whatsapp-webclient-login-hq_0e0caf2391158ebc09fe32edd1022d03.mp4"],
  9515. l10n: {
  9516. locales: {
  9517. "[request].18382cbd2fea006fbd6b.js": "locales/[request].18382cbd2fea006fbd6b.js",
  9518. "af-json.25988698145e9540014c.js": "locales/af-json.25988698145e9540014c.js",
  9519. "af.e1de444c0a8647ad8592.js": "locales/af.e1de444c0a8647ad8592.js",
  9520. "ar-json.711fd42dae4c6fd2f162.js": "locales/ar-json.711fd42dae4c6fd2f162.js",
  9521. "ar-XB.ae1c517c218fe0d934ae.js": "locales/ar-XB.ae1c517c218fe0d934ae.js",
  9522. "ar.7afa30563df2d09f5974.js": "locales/ar.7afa30563df2d09f5974.js",
  9523. "az-json.ac2e57fcbbbbb4413bdf.js": "locales/az-json.ac2e57fcbbbbb4413bdf.js",
  9524. "az.9a308bfcc7e6fe1ce314.js": "locales/az.9a308bfcc7e6fe1ce314.js",
  9525. "bg-json.8c9b9e32ce35abebbcb5.js": "locales/bg-json.8c9b9e32ce35abebbcb5.js",
  9526. "bg.3e588c955726847898dd.js": "locales/bg.3e588c955726847898dd.js",
  9527. "bn-json.aba923e60c7e394e9c69.js": "locales/bn-json.aba923e60c7e394e9c69.js",
  9528. "bn.4e9622e7010ddb1bafc4.js": "locales/bn.4e9622e7010ddb1bafc4.js",
  9529. "ca-json.e1ddd3ad02984ad281a5.js": "locales/ca-json.e1ddd3ad02984ad281a5.js",
  9530. "ca.b1f8ef84dc7a754f1049.js": "locales/ca.b1f8ef84dc7a754f1049.js",
  9531. "cs-json.8f706df20382364fffe1.js": "locales/cs-json.8f706df20382364fffe1.js",
  9532. "cs.b1b5aa06efce7bc00723.js": "locales/cs.b1b5aa06efce7bc00723.js",
  9533. "da-json.68367cd9b489d673a413.js": "locales/da-json.68367cd9b489d673a413.js",
  9534. "da.c761b011b4ef15073c15.js": "locales/da.c761b011b4ef15073c15.js",
  9535. "de-json.635a09ebc28de2716054.js": "locales/de-json.635a09ebc28de2716054.js",
  9536. "de.2daea7fb1d232749e7e0.js": "locales/de.2daea7fb1d232749e7e0.js",
  9537. "el-json.2e2f8bac9a5cd25050cb.js": "locales/el-json.2e2f8bac9a5cd25050cb.js",
  9538. "el.dbed1a635b1e3b124c2a.js": "locales/el.dbed1a635b1e3b124c2a.js",
  9539. "en-json.d665be4bfc342067f9bd.js": "locales/en-json.d665be4bfc342067f9bd.js",
  9540. "en.66eea8a5a56d881e9fb5.js": "locales/en.66eea8a5a56d881e9fb5.js",
  9541. "es-json.216d36ef3b32ec9b6aea.js": "locales/es-json.216d36ef3b32ec9b6aea.js",
  9542. "es.302744be52e19dfe77f5.js": "locales/es.302744be52e19dfe77f5.js",
  9543. "et-json.bb6dcec63eadddda1d57.js": "locales/et-json.bb6dcec63eadddda1d57.js",
  9544. "et.950d6d5e9b3e182d2d0d.js": "locales/et.950d6d5e9b3e182d2d0d.js",
  9545. "fa-json.add0b10bdc06d66bc040.js": "locales/fa-json.add0b10bdc06d66bc040.js",
  9546. "fa.2765a5d3f2fe35345cef.js": "locales/fa.2765a5d3f2fe35345cef.js",
  9547. "fi-json.09e47b9960d46c913a04.js": "locales/fi-json.09e47b9960d46c913a04.js",
  9548. "fi.2d4537f89a43de3872dd.js": "locales/fi.2d4537f89a43de3872dd.js",
  9549. "fil-json.854682a02cf129cd18d5.js": "locales/fil-json.854682a02cf129cd18d5.js",
  9550. "fil.93869691df3d69f56dcc.js": "locales/fil.93869691df3d69f56dcc.js",
  9551. "fr-json.6a722501db21be51bddf.js": "locales/fr-json.6a722501db21be51bddf.js",
  9552. "fr.9ad54fd005bd261a2c22.js": "locales/fr.9ad54fd005bd261a2c22.js",
  9553. "gu-json.05725aa16edac5dc0179.js": "locales/gu-json.05725aa16edac5dc0179.js",
  9554. "gu.fe9673a8abc4ff2f702e.js": "locales/gu.fe9673a8abc4ff2f702e.js",
  9555. "he-json.4de4932347c09714371b.js": "locales/he-json.4de4932347c09714371b.js",
  9556. "he.151c876b8b4c4b66aead.js": "locales/he.151c876b8b4c4b66aead.js",
  9557. "hi-json.04623748ba320e493047.js": "locales/hi-json.04623748ba320e493047.js",
  9558. "hi.0980221bc8f2cab5f61f.js": "locales/hi.0980221bc8f2cab5f61f.js",
  9559. "hr-json.26f4a1ab2c647aeb620e.js": "locales/hr-json.26f4a1ab2c647aeb620e.js",
  9560. "hr.14d9b425ee73b21cb3de.js": "locales/hr.14d9b425ee73b21cb3de.js",
  9561. "hu-json.86402b15e7707a6554b7.js": "locales/hu-json.86402b15e7707a6554b7.js",
  9562. "hu.6367b05eafa33daf0134.js": "locales/hu.6367b05eafa33daf0134.js",
  9563. "id-json.d04a2590e276f1550977.js": "locales/id-json.d04a2590e276f1550977.js",
  9564. "id.3d2aef3be4e2a55eb6c7.js": "locales/id.3d2aef3be4e2a55eb6c7.js",
  9565. "it-json.0e525895f812306e10da.js": "locales/it-json.0e525895f812306e10da.js",
  9566. "it.e11bb1de927b0e193fa7.js": "locales/it.e11bb1de927b0e193fa7.js",
  9567. "ja-json.94a6aa6c1afdfd487041.js": "locales/ja-json.94a6aa6c1afdfd487041.js",
  9568. "ja.d3c8bd01ecc2eab4202a.js": "locales/ja.d3c8bd01ecc2eab4202a.js",
  9569. "kk-json.9c79f3aca84e14358caf.js": "locales/kk-json.9c79f3aca84e14358caf.js",
  9570. "kk.cbd71e0f7a8ba7380ecb.js": "locales/kk.cbd71e0f7a8ba7380ecb.js",
  9571. "kn-json.5419b0bfa599a0891b0b.js": "locales/kn-json.5419b0bfa599a0891b0b.js",
  9572. "kn.0741eab1d4d5eb93fe9a.js": "locales/kn.0741eab1d4d5eb93fe9a.js",
  9573. "ko-json.2a2b0f6065b666b83aac.js": "locales/ko-json.2a2b0f6065b666b83aac.js",
  9574. "ko.c14e0b9005817a0a654c.js": "locales/ko.c14e0b9005817a0a654c.js",
  9575. "lt-json.3e80fa820282c51969f1.js": "locales/lt-json.3e80fa820282c51969f1.js",
  9576. "lt.50f43c6087dfe217236b.js": "locales/lt.50f43c6087dfe217236b.js",
  9577. "lv-json.e733e7592b554576f470.js": "locales/lv-json.e733e7592b554576f470.js",
  9578. "lv.81ab4991a01fdfcd005a.js": "locales/lv.81ab4991a01fdfcd005a.js",
  9579. "mk-json.e3dae2dd84c1c28fd400.js": "locales/mk-json.e3dae2dd84c1c28fd400.js",
  9580. "mk.916f9db6cc9b04ac10a7.js": "locales/mk.916f9db6cc9b04ac10a7.js",
  9581. "ml-json.d3a42aa6a9d2f0d7612c.js": "locales/ml-json.d3a42aa6a9d2f0d7612c.js",
  9582. "ml.6361b66b64879a1a9abc.js": "locales/ml.6361b66b64879a1a9abc.js",
  9583. "mr-json.363fcf59a04eac2783df.js": "locales/mr-json.363fcf59a04eac2783df.js",
  9584. "mr.afc21025144bf7b3c5a3.js": "locales/mr.afc21025144bf7b3c5a3.js",
  9585. "ms-json.57c6062648341831d629.js": "locales/ms-json.57c6062648341831d629.js",
  9586. "ms~main.8fe418f01c90dec0403d.js": "locales/ms~main.8fe418f01c90dec0403d.js",
  9587. "nb-json.574df781e00246579b3e.js": "locales/nb-json.574df781e00246579b3e.js",
  9588. "nb.adbac682b461bab25dac.js": "locales/nb.adbac682b461bab25dac.js",
  9589. "nl-json.64f211438e8c51d31857.js": "locales/nl-json.64f211438e8c51d31857.js",
  9590. "nl.764dcdf8666677f8e83b.js": "locales/nl.764dcdf8666677f8e83b.js",
  9591. "pa-json.04cad7f495f36700584a.js": "locales/pa-json.04cad7f495f36700584a.js",
  9592. "pa.2fbb890b70c4c9f4fa46.js": "locales/pa.2fbb890b70c4c9f4fa46.js",
  9593. "pl-json.772b13461c108f2adbb2.js": "locales/pl-json.772b13461c108f2adbb2.js",
  9594. "pl.3139cdd9c5e11ebac4ce.js": "locales/pl.3139cdd9c5e11ebac4ce.js",
  9595. "pt-BR.6fd32aea57c2f18e6061.js": "locales/pt-BR.6fd32aea57c2f18e6061.js",
  9596. "pt-json.b0dc4a8741ba589e17a1.js": "locales/pt-json.b0dc4a8741ba589e17a1.js",
  9597. "pt.ee7c31962cafb128f961.js": "locales/pt.ee7c31962cafb128f961.js",
  9598. "ro-json.e5d70c52e212ae8440ef.js": "locales/ro-json.e5d70c52e212ae8440ef.js",
  9599. "ro.010cc786b21040eb40a6.js": "locales/ro.010cc786b21040eb40a6.js",
  9600. "ru-json.1f60f8858a0e4b180728.js": "locales/ru-json.1f60f8858a0e4b180728.js",
  9601. "ru.33d803441956998b78da.js": "locales/ru.33d803441956998b78da.js",
  9602. "sk-json.cf010b39a88cca8b24fa.js": "locales/sk-json.cf010b39a88cca8b24fa.js",
  9603. "sk.25bf3a64d629c5e0942e.js": "locales/sk.25bf3a64d629c5e0942e.js",
  9604. "sl-json.6676bc63c7892e7500fb.js": "locales/sl-json.6676bc63c7892e7500fb.js",
  9605. "sl.3a3fd8d08d655df423d8.js": "locales/sl.3a3fd8d08d655df423d8.js",
  9606. "sq-json.b298824d8b51e7071b91.js": "locales/sq-json.b298824d8b51e7071b91.js",
  9607. "sq.8e866488febe21cb2c52.js": "locales/sq.8e866488febe21cb2c52.js",
  9608. "sr-json.eaf850bf121aaf81858f.js": "locales/sr-json.eaf850bf121aaf81858f.js",
  9609. "sr.8e09bc4552e6964cd6a8.js": "locales/sr.8e09bc4552e6964cd6a8.js",
  9610. "sv-json.f3de250c2f26fcf74d1c.js": "locales/sv-json.f3de250c2f26fcf74d1c.js",
  9611. "sv.93bebec1dfd60d563493.js": "locales/sv.93bebec1dfd60d563493.js",
  9612. "sw-json.c01f5483f6489d0feebf.js": "locales/sw-json.c01f5483f6489d0feebf.js",
  9613. "sw.3d2289dbed66a9872e90.js": "locales/sw.3d2289dbed66a9872e90.js",
  9614. "ta-json.87dcf918cd8457a3da64.js": "locales/ta-json.87dcf918cd8457a3da64.js",
  9615. "ta.3304fec957fb8ab4f049.js": "locales/ta.3304fec957fb8ab4f049.js",
  9616. "te-json.fe15e3214a762dc46db8.js": "locales/te-json.fe15e3214a762dc46db8.js",
  9617. "te.00e9a96e0a17e7976e7c.js": "locales/te.00e9a96e0a17e7976e7c.js",
  9618. "th-json.389a71b73cf6942381c6.js": "locales/th-json.389a71b73cf6942381c6.js",
  9619. "th.fe38b005ed7f33460216.js": "locales/th.fe38b005ed7f33460216.js",
  9620. "tr-json.9225266375a6144c40fd.js": "locales/tr-json.9225266375a6144c40fd.js",
  9621. "tr.9fae1603c3d710715181.js": "locales/tr.9fae1603c3d710715181.js",
  9622. "uk-json.896a06e70d5fa7821921.js": "locales/uk-json.896a06e70d5fa7821921.js",
  9623. "uk.8b5df7a0f2e97bac4ed8.js": "locales/uk.8b5df7a0f2e97bac4ed8.js",
  9624. "ur-json.c5c7df488a39b264c1c9.js": "locales/ur-json.c5c7df488a39b264c1c9.js",
  9625. "ur.034f805c78a33ebfa4ed.js": "locales/ur.034f805c78a33ebfa4ed.js",
  9626. "uz-json.cf8ffb2271e0350c737d.js": "locales/uz-json.cf8ffb2271e0350c737d.js",
  9627. "uz.292ac2b45525fe3f21c6.js": "locales/uz.292ac2b45525fe3f21c6.js",
  9628. "vi-json.b3221fce07cc46c1e361.js": "locales/vi-json.b3221fce07cc46c1e361.js",
  9629. "vi.e01bcfa8e063f146da2b.js": "locales/vi.e01bcfa8e063f146da2b.js",
  9630. "zh-CN-json.38d2a410caee876abb49.js": "locales/zh-CN-json.38d2a410caee876abb49.js",
  9631. "zh-CN.222571c4d490e9761bcd.js": "locales/zh-CN.222571c4d490e9761bcd.js",
  9632. "zh-HK-json.7082091be98973ef367c.js": "locales/zh-HK-json.7082091be98973ef367c.js",
  9633. "zh-HK.996fa3b123e393dc5456.js": "locales/zh-HK.996fa3b123e393dc5456.js",
  9634. "zh-TW-json.d423ed1bfe02fcc65122.js": "locales/zh-TW-json.d423ed1bfe02fcc65122.js",
  9635. "zh-TW.a2f4f99ff1e93baf234e.js": "locales/zh-TW.a2f4f99ff1e93baf234e.js"
  9636. }, styles: {}
  9637. },
  9638. releaseDate: 1684798765185
  9639. }
  9640. }, 6857: (e, t, n) => {
  9641. "use strict";
  9642. var r = n(5318);
  9643. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9644. var o = r(n(9482));
  9645. const i = new RegExp(`(${self.registration.scope}|https://web.whatsapp.com/|https://dyn.web.whatsapp.com/)([^?]*)(?:\\?(.*))?`);
  9646. class s {
  9647. static parseUrl(e) {
  9648. const t = e.match(i);
  9649. if (!t) return;
  9650. let n;
  9651. if (t[3]) {
  9652. const r = {}, i = new Set;
  9653. t[3].split("&").forEach((t => {
  9654. const [n, s] = t.split("="), a = n.toLowerCase();
  9655. if (i.has(a)) throw __LOG__(4, void 0, new Error)`Unexpected duplicated query param: ${n}=${s} in the url: ${e}`, (0, o.default)("Detected url with duplicated query param");
  9656. i.add(a), r[n] = s
  9657. })), n = r
  9658. }
  9659. return {base: t[1], relativePath: t[2], queryParams: n}
  9660. }
  9661. static convertToUrl(e, t) {
  9662. const n = Object.keys(t).map((e => [e, t[e]].map(encodeURIComponent).join("="))).join("&");
  9663. return n.length ? e.endsWith("/") ? `${e}?${n}` : `${e}/?${n}` : e
  9664. }
  9665. constructor(e, t) {
  9666. this.matchFetch = () => !1, this.matchAction = () => !1, this.matchInstall = () => !1, this.matchActivate = () => !1, this.matchPush = () => !1, this.matchNotificationClick = () => !1, this.cache = e, this.store = t
  9667. }
  9668. }
  9669. t.default = s, s.RequestType = {GET: "GET"}
  9670. }, 5791: (e, t, n) => {
  9671. "use strict";
  9672. self.__LOG__ = n(4453).cM, self.SEND_LOGS = n(4453).ws
  9673. }, 4453: (e, t, n) => {
  9674. "use strict";
  9675. var r = n(5318);
  9676. t.cM = void 0, t.ws = E;
  9677. var o = r(n(8926)), i = n(480), s = r(n(6432)), a = r(n(1054)), c = r(n(3948)), l = r(n(9194)),
  9678. u = r(n(9482));
  9679. const d = "log", _ = "info", f = "warn", h = "error", p = "errorVerbose", b = 1e3;
  9680. let m, g = [], v = Promise.resolve();
  9681. function y(e) {
  9682. return new Promise((t => {
  9683. self.setTimeout(t, e)
  9684. }))
  9685. }
  9686. (0, i.initTagsLogger)();
  9687. const w = function (e, t) {
  9688. let n, r;
  9689. return function o() {
  9690. if (!n) {
  9691. const i = Array.prototype.slice.call(arguments);
  9692. return n = new Promise((function (e) {
  9693. self.setTimeout((function () {
  9694. n = null, r && (e(o.apply(null, i)), r = !1), e()
  9695. }), t)
  9696. })), Promise.resolve(e.apply(null, i))
  9697. }
  9698. return r = !0, n
  9699. }
  9700. }((function () {
  9701. return S.apply(this, arguments)
  9702. }), 500);
  9703. function S() {
  9704. return (S = (0, o.default)((function* () {
  9705. if (0 !== g.length) try {
  9706. yield c.default.broadcast(l.default.LOG, {buffer: g}), g = []
  9707. } catch (e) {
  9708. }
  9709. }))).apply(this, arguments)
  9710. }
  9711. function E() {
  9712. for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
  9713. return t.length && g.push({level: p, message: t}), m = m || j(), m
  9714. }
  9715. function j() {
  9716. return k.apply(this, arguments)
  9717. }
  9718. function k() {
  9719. return (k = (0, o.default)((function* () {
  9720. let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
  9721. try {
  9722. let t;
  9723. try {
  9724. yield v, t = yield c.default.broadcast(l.default.UPLOAD_LOGS, {buffer: g})
  9725. } catch (n) {
  9726. if (!(e < 3)) throw(0, u.default)("Max generation reached. Failed to upload.");
  9727. yield y(b), t = yield j(e + 1)
  9728. }
  9729. return m = void 0, t
  9730. } catch (e) {
  9731. __LOG__(3)`Unable to send upload request, error: ${e}`, m = void 0
  9732. }
  9733. }))).apply(this, arguments)
  9734. }
  9735. const A = (0, s.default)((function (e) {
  9736. let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
  9737. n = arguments.length > 2 ? arguments[2] : void 0, r = arguments.length > 3 ? arguments[3] : void 0,
  9738. o = arguments.length > 4 ? arguments[4] : void 0;
  9739. return function (i) {
  9740. for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), l = 1; l < s; l++) c[l - 1] = arguments[l];
  9741. const u = (0, a.default)(i, c, !t);
  9742. let d;
  9743. return n && (d = {name: n.name, stack: n.stack}), T(x(e, t), [u], d, r, o), u
  9744. }
  9745. }), ((e, t, n, r, o) => n || o ? null : String(e) + String(Boolean(t)) + String(Boolean(r))));
  9746. function T(e, t, n, r, o) {
  9747. 0 !== t.length && (g.push({
  9748. level: e,
  9749. message: t,
  9750. error: n,
  9751. attachedToSendLogs: r,
  9752. extraTags: o
  9753. }), v = w())
  9754. }
  9755. function x(e, t) {
  9756. switch (e) {
  9757. case 1:
  9758. return _;
  9759. case 2:
  9760. return d;
  9761. case 3:
  9762. return f;
  9763. case 4:
  9764. return t ? p : h
  9765. }
  9766. throw(0, u.default)(`Invalid numeric level ${e}${t ? ", verbose" : ""}`)
  9767. }
  9768. t.cM = A, self.addEventListener("error", (e => {
  9769. E(`Global Scope error: ${String(e.error)}, stack: ${e.error ? e.error.stack : ""}`)
  9770. }))
  9771. }, 3986: (e, t, n) => {
  9772. "use strict";
  9773. var r = n(5318);
  9774. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9775. var o = r(n(6857));
  9776. class i extends o.default {
  9777. constructor() {
  9778. super(...arguments), this.matchNotificationClick = () => !0, this.onNotificationClick = e => {
  9779. }
  9780. }
  9781. }
  9782. t.default = i
  9783. }, 2083: (e, t, n) => {
  9784. "use strict";
  9785. var r = n(5318);
  9786. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9787. var o = r(n(733)), i = function (e, t) {
  9788. if (!t && e && e.__esModule) return e;
  9789. if (null === e || "object" != typeof e && "function" != typeof e) return {default: e};
  9790. var n = s(t);
  9791. if (n && n.has(e)) return n.get(e);
  9792. var r = {}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
  9793. for (var i in e) if ("default" !== i && Object.prototype.hasOwnProperty.call(e, i)) {
  9794. var a = o ? Object.getOwnPropertyDescriptor(e, i) : null;
  9795. a && (a.get || a.set) ? Object.defineProperty(r, i, a) : r[i] = e[i]
  9796. }
  9797. r.default = e, n && n.set(e, r);
  9798. return r
  9799. }(n(3563));
  9800. function s(e) {
  9801. if ("function" != typeof WeakMap) return null;
  9802. var t = new WeakMap, n = new WeakMap;
  9803. return (s = function (e) {
  9804. return e ? n : t
  9805. })(e)
  9806. }
  9807. var a = (0, o.default)(i);
  9808. t.default = a
  9809. }, 3563: (e, t, n) => {
  9810. "use strict";
  9811. var r = n(5318);
  9812. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9813. var o = r(n(8926)), i = r(n(9619)), s = r(n(1373));
  9814. const a = {prefs: {}, pp: {}, stickers: {}};
  9815. let c;
  9816. class l {
  9817. constructor(e) {
  9818. this.storeName = e, this.storeCache = {}
  9819. }
  9820. _callAction(e, t) {
  9821. var n = this;
  9822. return (0, o.default)((function* () {
  9823. const r = (yield c || (c = new Promise(((e, t) => {
  9824. const n = (0, i.default)(s.default, "indexedDB").open("sw", 2);
  9825. n.onupgradeneeded = e => {
  9826. const t = e.target.result;
  9827. e.target.transaction.onerror = e => {
  9828. __LOG__(3)`Unable to upgrade database, error: ${e.target.error}`
  9829. };
  9830. for (const e in a) t.objectStoreNames.contains(e) && t.deleteObjectStore(e), t.createObjectStore(e, a[e])
  9831. }, n.onsuccess = t => {
  9832. e(t.target.result)
  9833. }, n.onerror = e => {
  9834. t(e.target.error)
  9835. }
  9836. })).catch((e => {
  9837. throw __LOG__(3)`Unable to open sw database, error: ${e}`, c = void 0, e
  9838. })))).transaction([n.storeName], "readwrite").objectStore(n.storeName), o = r[e].apply(r, t);
  9839. return new Promise(((e, t) => {
  9840. o.onsuccess = t => {
  9841. e(t.target.result)
  9842. }, o.onerror = e => {
  9843. t(e.target.error)
  9844. }
  9845. }))
  9846. }))()
  9847. }
  9848. get(e) {
  9849. return void 0 !== this.storeCache[e] ? this.storeCache[e] : this.storeCache[e] = this._callAction("get", [e]).catch((t => {
  9850. __LOG__(3)`Unable to fetch from db, object store: ${this.storeName}, key: ${e}, error: ${t}`, this.storeCache[e] = void 0
  9851. }))
  9852. }
  9853. put(e, t) {
  9854. return this.storeCache[e] = Promise.resolve(t), this._callAction("put", [t, e]).catch((n => {
  9855. __LOG__(3)`Unable to put to db, object store: ${this.storeName}, key: ${e}, value: ${t}, error: ${n}`
  9856. }))
  9857. }
  9858. delete(e) {
  9859. return this.storeCache[e] = Promise.resolve(void 0), this._callAction("delete", [e]).catch((t => {
  9860. __LOG__(3)`Unable to delete in db, object store: ${this.storeName}, key: ${e}, error: ${t}`
  9861. }))
  9862. }
  9863. clear() {
  9864. return this.storeCache = {}, this._callAction("clear").catch((e => {
  9865. __LOG__(3)`Unable to clear object store: ${this.storeName}, error: ${e}`
  9866. }))
  9867. }
  9868. }
  9869. const u = {ObjectStore: l};
  9870. for (const e in a) u[e] = new l(e);
  9871. var d = u;
  9872. t.default = d
  9873. }, 6278: (e, t, n) => {
  9874. "use strict";
  9875. var r = n(5318);
  9876. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9877. var o = r(n(8926)), i = r(n(9194)), s = r(n(6857)), a = r(n(5420));
  9878. class c extends s.default {
  9879. constructor() {
  9880. var e;
  9881. super(...arguments), e = this, this.matchFetch = e => {
  9882. const {request: t} = e, n = s.default.parseUrl(t.url);
  9883. return t.method === s.default.RequestType.GET && !!n && ("https://web.whatsapp.com/" === n.base || "https://dyn.web.whatsapp.com/" === n.base) && "pp" === n.relativePath
  9884. }, this.onFetch = function () {
  9885. var t = (0, o.default)((function* (t) {
  9886. const {request: n} = t, r = s.default.parseUrl(n.url);
  9887. if (!r || !r.queryParams) return self.fetch(n);
  9888. const {e: o, t: i, u: c, i: l, n: u} = r.queryParams,
  9889. d = `${r.base}${r.relativePath}?t=${i}&u=${c}&i=${l}&n=${u}`,
  9890. _ = o ? self.decodeURIComponent(o) : n;
  9891. a.default.assertIsAllowedHost(o ? self.decodeURIComponent(o) : n.url);
  9892. const f = yield e.cache.matchOrFetch(_, d);
  9893. return f.ok && e.store.get(c).then((t => {
  9894. if (t !== l) return Promise.all([e.removePPFromCache(c, l), e.store.put(c, l)])
  9895. })), a.default.assertIsAllowedHost(f.url), f
  9896. }));
  9897. return function () {
  9898. return t.apply(this, arguments)
  9899. }
  9900. }(), this.matchAction = e => i.default.REMOVE_PP === e || i.default.LOGOUT === e, this.onAction = (e, t) => {
  9901. switch (e) {
  9902. case i.default.REMOVE_PP: {
  9903. const e = self.encodeURIComponent(t);
  9904. return this.store.get(e).then((t => {
  9905. if (t) return Promise.all([this.removePPFromCache(e, t), this.store.delete(e)])
  9906. })).then((() => {
  9907. }))
  9908. }
  9909. default:
  9910. return Promise.all([this.cache.reset(), this.store.clear()]).then((() => {
  9911. }))
  9912. }
  9913. }
  9914. }
  9915. removePPFromCache(e, t) {
  9916. return Promise.all([this.cache.delete(`https://web.whatsapp.com/pp?t=s&u=${e}&i=${t}`), this.cache.delete(`https://web.whatsapp.com/pp?t=l&u=${e}&i=${t}`), this.cache.delete(`https://dyn.web.whatsapp.com/pp?t=s&u=${e}&i=${t}`), this.cache.delete(`https://dyn.web.whatsapp.com/pp?t=l&u=${e}&i=${t}`)])
  9917. }
  9918. }
  9919. t.default = c
  9920. }, 2100: (e, t, n) => {
  9921. "use strict";
  9922. var r = n(5318);
  9923. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9924. var o = r(n(8926)), i = n(9026), s = (n(7761), r(n(9194))), a = r(n(6857));
  9925. class c extends a.default {
  9926. constructor() {
  9927. super(...arguments), this.matchInstall = () => !0, this.onInstall = () => {
  9928. }, this.matchActivate = () => !0, this.onActivate = () => {
  9929. }, this.matchPush = () => !0, this.onPush = e => {
  9930. const t = function () {
  9931. var e = (0, o.default)((function* () {
  9932. return Promise.resolve()
  9933. }));
  9934. return function () {
  9935. return e.apply(this, arguments)
  9936. }
  9937. }();
  9938. e.waitUntil(t())
  9939. }, this.matchAction = e => e === s.default.STOP_COMMS, this.onAction = function () {
  9940. var e = (0, o.default)((function* () {
  9941. (0, i.getComms)() && (yield(0, i.stopComms)(), __LOG__(2)`[push-notification] Successfully stopped Comms in service worker`)
  9942. }));
  9943. return function () {
  9944. return e.apply(this, arguments)
  9945. }
  9946. }()
  9947. }
  9948. }
  9949. t.default = c
  9950. }, 2543: (e, t, n) => {
  9951. "use strict";
  9952. var r = n(5318);
  9953. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9954. var o = n(7674), i = r(n(6857));
  9955. class s extends i.default {
  9956. constructor() {
  9957. super(...arguments), this.matchFetch = e => {
  9958. const {request: t} = e, n = new URL(t.url), r = new URLSearchParams(n.search);
  9959. return t.method === i.default.RequestType.GET && r.has(o.IS_MMS_URL_SEARCH_PARAM) && (0 === n.pathname.indexOf("/mms/sticker/") || "sticker" === r.get(o.MMS_URL_MEDIA_TYPE_SEARCH_PARAM))
  9960. }, this.onFetch = e => this.cache.matchOrFetch(e.request)
  9961. }
  9962. }
  9963. t.default = s
  9964. }, 5420: (e, t, n) => {
  9965. "use strict";
  9966. var r = n(5318);
  9967. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  9968. var o = r(n(9482));
  9969. function i(e) {
  9970. const t = new URL(e), n = t.host;
  9971. if ("https:" !== t.protocol || !/\.whatsapp\.(net|com)(:\d+)?$/.test(n)) throw __LOG__(4, void 0, new Error, !0)`Unexpected url`, SEND_LOGS("SW: Potential XSS attack"), (0, o.default)("URL is not of allowed host or protocol")
  9972. }
  9973. var s = {
  9974. manuallyCloneRequest: function (e, t, n) {
  9975. let r = n;
  9976. if ("string" == typeof e) {
  9977. r = r || {}, r.credentials = "same-origin";
  9978. const n = null != t ? t : e;
  9979. return i(n), new Request(n, r)
  9980. }
  9981. const o = null != t ? t : e.url;
  9982. return i(o), new Request(o || e.url, {
  9983. method: void 0 === r.method ? e.method : r.method,
  9984. headers: void 0 === r.headers ? e.headers : r.headers,
  9985. mode: void 0 === r.mode ? e.mode : r.mode,
  9986. credentials: "same-origin",
  9987. cache: void 0 === r.cache ? e.cache : r.cache,
  9988. redirect: void 0 === r.redirect ? e.redirect : r.redirect,
  9989. integrity: void 0 === r.integrity ? e.integrity : r.integrity
  9990. })
  9991. }, getIndexPath: function (e) {
  9992. return (null == e ? void 0 : e.locale) ? `%F0%9F%8C%90/${e.locale}` : ""
  9993. }, assertIsAllowedHost: i
  9994. };
  9995. t.default = s
  9996. }, 4414: (e, t, n) => {
  9997. "use strict";
  9998. var r = n(5318);
  9999. Object.defineProperty(t, "__esModule", {value: !0}), t.VideoStreamer = void 0, t.parseClientRange = f;
  10000. var o = r(n(8926)), i = n(9093), s = n(8358), a = n(8615), c = r(n(3948)), l = r(n(9194)), u = r(n(5420)),
  10001. d = r(n(9482));
  10002. const _ = 65536;
  10003. function f(e) {
  10004. const {clientRangeStartString: t, clientRangeEndString: n} = function (e) {
  10005. const t = e.headers.get("Range");
  10006. if (t) {
  10007. const [e, n] = t.replace("bytes=", "").split("-");
  10008. return {clientRangeStartString: e, clientRangeEndString: n}
  10009. }
  10010. const n = new URL(e.url);
  10011. return {
  10012. clientRangeStartString: n.searchParams.get("bytesstart"),
  10013. clientRangeEndString: n.searchParams.get("bytesend")
  10014. }
  10015. }(e), r = parseInt(t, 10), o = parseInt(n, 10);
  10016. return {clientRangeStart: isNaN(r) ? 0 : r, clientRangeEnd: isNaN(o) ? null : o}
  10017. }
  10018. t.VideoStreamer = class {
  10019. constructor(e, t, n) {
  10020. this.generation = 0;
  10021. const {sidecar: r} = t, o = [];
  10022. for (let e = 0; e < r.byteLength; e += a.HMAC_SIZE) o.push(r.slice(e, e + a.HMAC_SIZE));
  10023. this.cryptoKeys = {
  10024. iv: t.iv,
  10025. sidecar: o,
  10026. encKey: t.encKey,
  10027. macKey: t.macKey
  10028. }, this.streamData = n, this.clientId = e
  10029. }
  10030. fetchAndDecrypt(e) {
  10031. var t = this;
  10032. return (0, o.default)((function* () {
  10033. const {clientUrl: n, msgKey: r} = t.streamData, {
  10034. clientRangeStart: o,
  10035. clientRangeEnd: i
  10036. } = f(e), {serverRangeStart: s, serverRangeEnd: u} = t.computeServerRange(o, i),
  10037. d = t.createServerRequest(e, s, u, n), _ = yield self.fetch(d);
  10038. if (404 === _.status) return t.handleRMR(e, r);
  10039. if (_.status >= 400) return __LOG__(2)`sw:videoStreaming:processRequest server returns ${_.status} error`, t.generation++, c.default.request(t.clientId, l.default.EXP_BACKOFF, {generation: t.generation}).then((() => t.fetchAndDecrypt(e)));
  10040. t.generation = 0;
  10041. const h = yield _.arrayBuffer(), p = h.byteLength;
  10042. if (!h || p < a.BLOCK_SIZE) return __LOG__(2)`sw:videoStreaming:processRequest ciphertext is too short - ${p} bytes`, new Response(`Ciphertext is too short - ${p} bytes`, {status: 500});
  10043. yield t.validateSidecar(s, h);
  10044. const {ciphertext: b, iv: m} = yield(0, a.cleanupCiphertextAndIv)({
  10045. serverRangeStart: s,
  10046. ciphertext: h,
  10047. mediaKeys: t.cryptoKeys
  10048. }), g = yield(0, a.decrypt)({ciphertext: b, iv: m, mediaKeys: t.cryptoKeys}),
  10049. v = t.cleanupPlaintext(g, {clientRangeStart: o, clientRangeEnd: i}, {
  10050. serverRangeStart: s,
  10051. serverRangeEnd: u
  10052. }), y = t.createClientResponse(_, v, o);
  10053. return t.sendBackArrayBuffer(o, v), y
  10054. }))()
  10055. }
  10056. handleRMR(e, t) {
  10057. var n = this;
  10058. return (0, o.default)((function* () {
  10059. const r = yield c.default.request(n.clientId, l.default.REQUEST_RMR, {key: t});
  10060. return n.cryptoKeys.encKey = r.encKey, n.cryptoKeys.iv = r.iv, n.streamData.clientUrl = r.clientUrl, n.streamData.size = r.size, n.fetchAndDecrypt(e)
  10061. }))()
  10062. }
  10063. cleanupPlaintext(e, t, n) {
  10064. let {clientRangeStart: r, clientRangeEnd: o} = t, {serverRangeStart: i, serverRangeEnd: s} = n;
  10065. const c = 0 === i ? 0 : r - (i + a.BLOCK_SIZE), l = null != o ? s - o : 0;
  10066. return e.slice(c, e.byteLength - l)
  10067. }
  10068. validateSidecar(e, t) {
  10069. var n = this;
  10070. return (0, o.default)((function* () {
  10071. let r = t;
  10072. const {macKey: o, iv: i, sidecar: c} = n.cryptoKeys;
  10073. let l, u;
  10074. 0 === e ? (l = 0, u = i) : (l = (e + a.BLOCK_SIZE) / _, u = r.slice(0, a.BLOCK_SIZE), r = r.slice(a.BLOCK_SIZE));
  10075. const d = r.byteLength / _, f = yield self.crypto.subtle.importKey("raw", new Uint8Array(o), {
  10076. name: "HMAC",
  10077. hash: {name: "SHA-256"}
  10078. }, !1, ["sign"]), h = [];
  10079. for (let e = 0; e < d; e++) {
  10080. const t = c[l + e], o = e * _, i = r.slice(o, o + _), d = u;
  10081. u = i.slice(_ - a.BLOCK_SIZE, _ - a.BLOCK_SIZE + a.BLOCK_SIZE);
  10082. const p = (0, s.concatTypedArrays)(Uint8Array, [new Uint8Array(d), new Uint8Array(i)]);
  10083. h.push(n.validateChunk(p, f, t))
  10084. }
  10085. return Promise.all(h)
  10086. }))()
  10087. }
  10088. validateChunk(e, t, n) {
  10089. return (0, o.default)((function* () {
  10090. const r = (yield self.crypto.subtle.sign({name: "HMAC"}, t, e)).slice(0, a.HMAC_SIZE);
  10091. if (!(0, i.arrayBuffersEqual)(r, n)) return Promise.reject((0, d.default)("Invalid Chunk: Does not match sidecar."))
  10092. }))()
  10093. }
  10094. createClientResponse(e, t, n) {
  10095. const {size: r} = this.streamData, {
  10096. contentRangeStart: o,
  10097. contentRangeEnd: i
  10098. } = this.getContentRange(n, t), s = new Headers(e.headers);
  10099. s.set("Content-Range", `bytes ${o}-${i}/${r}`), s.set("Content-Length", `${t.byteLength}`);
  10100. return new Response(t, {
  10101. status: 200 === e.status ? 206 : e.status,
  10102. statusText: e.statusText,
  10103. headers: s
  10104. })
  10105. }
  10106. getContentRange(e, t) {
  10107. return {contentRangeStart: e, contentRangeEnd: e + t.byteLength - 1}
  10108. }
  10109. sendBackArrayBuffer(e, t) {
  10110. const {contentRangeStart: n, contentRangeEnd: r} = this.getContentRange(e, t);
  10111. c.default.request(this.clientId, l.default.SEND_STREAMING_CHUNK, {
  10112. msgKey: this.streamData.msgKey,
  10113. data: {start: n, end: r, buffer: t}
  10114. })
  10115. }
  10116. createServerRequest(e, t, n, r) {
  10117. const o = new URL(r);
  10118. o.searchParams.set("bytestart", t.toString()), o.searchParams.set("byteend", n.toString());
  10119. return u.default.manuallyCloneRequest(e, o.toString(), {
  10120. credentials: "omit",
  10121. headers: new Headers({}),
  10122. mode: "cors",
  10123. referrer: e.referrer
  10124. })
  10125. }
  10126. computeServerRange(e, t) {
  10127. let n = e, r = t;
  10128. return n = e ? this.roundDown(e, _) : 0, r = null != t && 0 !== t ? this.roundUp(t, _) - 1 : n + 1572864 - 1, n > 0 && (n -= a.BLOCK_SIZE), {
  10129. serverRangeStart: n,
  10130. serverRangeEnd: r
  10131. }
  10132. }
  10133. roundUp(e, t) {
  10134. return Math.ceil(e / t) * t
  10135. }
  10136. roundDown(e, t) {
  10137. return Math.floor(e / t) * t
  10138. }
  10139. }
  10140. }, 9906: (e, t, n) => {
  10141. "use strict";
  10142. var r = n(5318);
  10143. Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
  10144. var o = r(n(8926)), i = r(n(3948)), s = r(n(9194)), a = r(n(6857)), c = n(4414), l = r(n(9482));
  10145. class u extends a.default {
  10146. constructor() {
  10147. super(...arguments), this.matchFetch = e => {
  10148. const {request: t} = e, n = a.default.parseUrl(t.url);
  10149. return !!(t.method === a.default.RequestType.GET && n && n.queryParams && n.queryParams.key && t.url.match("/stream/video"))
  10150. }, this.onFetch = function () {
  10151. var e = (0, o.default)((function* (e) {
  10152. const {request: t, client: n, clientId: r} = e, o = a.default.parseUrl(t.url),
  10153. u = r || (null == n ? void 0 : n.id);
  10154. if (!u) return Promise.reject((0, l.default)("No client id found."));
  10155. const {
  10156. cryptoKeys: d,
  10157. streamData: _
  10158. } = yield i.default.request(u, s.default.REQUEST_STREAMING_INFO, {key: o.queryParams.key});
  10159. return new c.VideoStreamer(u, d, _).fetchAndDecrypt(t)
  10160. }));
  10161. return function () {
  10162. return e.apply(this, arguments)
  10163. }
  10164. }(), this.matchAction = e => e === s.default.STREAMING_SUPPORTED, this.onAction = () => !(!self.crypto || !self.crypto.subtle && !self.crypto.webkitSubtle)
  10165. }
  10166. }
  10167. t.default = u
  10168. }, 733: (e, t) => {
  10169. "use strict";
  10170. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
  10171. return e.default
  10172. }
  10173. }, 9482: (e, t) => {
  10174. "use strict";
  10175. Object.defineProperty(t, "__esModule", {value: !0}), t.default = function e(t) {
  10176. const n = new Error(t);
  10177. if (void 0 === n.stack) try {
  10178. throw e
  10179. } catch (e) {
  10180. }
  10181. return n
  10182. }
  10183. }, 2329: () => {
  10184. }
  10185. }, t = {};
  10186. function n(r) {
  10187. var o = t[r];
  10188. if (void 0 !== o) return o.exports;
  10189. var i = t[r] = {id: r, loaded: !1, exports: {}};
  10190. return e[r].call(i.exports, i, i.exports, n), i.loaded = !0, i.exports
  10191. }
  10192. n.amdO = {}, n.d = (e, t) => {
  10193. for (var r in t) n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, {enumerable: !0, get: t[r]})
  10194. }, n.g = function () {
  10195. if ("object" == typeof globalThis) return globalThis;
  10196. try {
  10197. return this || new Function("return this")()
  10198. } catch (e) {
  10199. if ("object" == typeof window) return window
  10200. }
  10201. }(), n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), n.r = e => {
  10202. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
  10203. }, n.nmd = e => (e.paths = [], e.children || (e.children = []), e), (() => {
  10204. "use strict";
  10205. var e = n(5318);
  10206. n(2271), n(5791);
  10207. var t = e(n(1157)), r = e(n(3933)), o = e(n(2612)), i = e(n(8043)), s = e(n(7719)), a = e(n(3986)),
  10208. c = e(n(2083)), l = e(n(6278)), u = e(n(2100)), d = e(n(2543)), _ = e(n(9906));
  10209. const f = new s.default("wa-stickers"),
  10210. h = [new l.default(new s.default("wa-pp"), c.default.pp), new _.default, new i.default(new s.default("wa2.2322.15"), c.default.prefs), new r.default(new s.default("wa-assets")), new d.default(f, c.default.stickers), new t.default, new u.default, new a.default];
  10211. __LOG__(2)`sw version: ${"2.2322.15"}`, (0, o.default)(h)
  10212. })()
  10213. })();