123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512 |
- // node_modules/@vue/devtools-shared/dist/index.js
- var __create = Object.create;
- var __defProp = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames = Object.getOwnPropertyNames;
- var __getProtoOf = Object.getPrototypeOf;
- var __hasOwnProp = Object.prototype.hasOwnProperty;
- var __esm = (fn, res) => function __init() {
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
- };
- var __commonJS = (cb, mod) => function __require() {
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp(target2, "default", { value: mod, enumerable: true }) : target2,
- mod
- ));
- var init_esm_shims = __esm({
- "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@22.10.1__@swc+core@1.5.29_jiti@2.0.0_p_swvvp2d4pgn6xuiiec4l4x2i7a/node_modules/tsup/assets/esm_shims.js"() {
- "use strict";
- }
- });
- var require_rfdc = __commonJS({
- "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(exports, module) {
- "use strict";
- init_esm_shims();
- module.exports = rfdc2;
- function copyBuffer(cur) {
- if (cur instanceof Buffer) {
- return Buffer.from(cur);
- }
- return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
- }
- function rfdc2(opts) {
- opts = opts || {};
- if (opts.circles) return rfdcCircles(opts);
- const constructorHandlers = /* @__PURE__ */ new Map();
- constructorHandlers.set(Date, (o) => new Date(o));
- constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
- constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
- if (opts.constructorHandlers) {
- for (const handler2 of opts.constructorHandlers) {
- constructorHandlers.set(handler2[0], handler2[1]);
- }
- }
- let handler = null;
- return opts.proto ? cloneProto : clone;
- function cloneArray(a, fn) {
- const keys = Object.keys(a);
- const a2 = new Array(keys.length);
- for (let i = 0; i < keys.length; i++) {
- const k = keys[i];
- const cur = a[k];
- if (typeof cur !== "object" || cur === null) {
- a2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- a2[k] = handler(cur, fn);
- } else if (ArrayBuffer.isView(cur)) {
- a2[k] = copyBuffer(cur);
- } else {
- a2[k] = fn(cur);
- }
- }
- return a2;
- }
- function clone(o) {
- if (typeof o !== "object" || o === null) return o;
- if (Array.isArray(o)) return cloneArray(o, clone);
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
- return handler(o, clone);
- }
- const o2 = {};
- for (const k in o) {
- if (Object.hasOwnProperty.call(o, k) === false) continue;
- const cur = o[k];
- if (typeof cur !== "object" || cur === null) {
- o2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- o2[k] = handler(cur, clone);
- } else if (ArrayBuffer.isView(cur)) {
- o2[k] = copyBuffer(cur);
- } else {
- o2[k] = clone(cur);
- }
- }
- return o2;
- }
- function cloneProto(o) {
- if (typeof o !== "object" || o === null) return o;
- if (Array.isArray(o)) return cloneArray(o, cloneProto);
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
- return handler(o, cloneProto);
- }
- const o2 = {};
- for (const k in o) {
- const cur = o[k];
- if (typeof cur !== "object" || cur === null) {
- o2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- o2[k] = handler(cur, cloneProto);
- } else if (ArrayBuffer.isView(cur)) {
- o2[k] = copyBuffer(cur);
- } else {
- o2[k] = cloneProto(cur);
- }
- }
- return o2;
- }
- }
- function rfdcCircles(opts) {
- const refs = [];
- const refsNew = [];
- const constructorHandlers = /* @__PURE__ */ new Map();
- constructorHandlers.set(Date, (o) => new Date(o));
- constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
- constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
- if (opts.constructorHandlers) {
- for (const handler2 of opts.constructorHandlers) {
- constructorHandlers.set(handler2[0], handler2[1]);
- }
- }
- let handler = null;
- return opts.proto ? cloneProto : clone;
- function cloneArray(a, fn) {
- const keys = Object.keys(a);
- const a2 = new Array(keys.length);
- for (let i = 0; i < keys.length; i++) {
- const k = keys[i];
- const cur = a[k];
- if (typeof cur !== "object" || cur === null) {
- a2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- a2[k] = handler(cur, fn);
- } else if (ArrayBuffer.isView(cur)) {
- a2[k] = copyBuffer(cur);
- } else {
- const index = refs.indexOf(cur);
- if (index !== -1) {
- a2[k] = refsNew[index];
- } else {
- a2[k] = fn(cur);
- }
- }
- }
- return a2;
- }
- function clone(o) {
- if (typeof o !== "object" || o === null) return o;
- if (Array.isArray(o)) return cloneArray(o, clone);
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
- return handler(o, clone);
- }
- const o2 = {};
- refs.push(o);
- refsNew.push(o2);
- for (const k in o) {
- if (Object.hasOwnProperty.call(o, k) === false) continue;
- const cur = o[k];
- if (typeof cur !== "object" || cur === null) {
- o2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- o2[k] = handler(cur, clone);
- } else if (ArrayBuffer.isView(cur)) {
- o2[k] = copyBuffer(cur);
- } else {
- const i = refs.indexOf(cur);
- if (i !== -1) {
- o2[k] = refsNew[i];
- } else {
- o2[k] = clone(cur);
- }
- }
- }
- refs.pop();
- refsNew.pop();
- return o2;
- }
- function cloneProto(o) {
- if (typeof o !== "object" || o === null) return o;
- if (Array.isArray(o)) return cloneArray(o, cloneProto);
- if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
- return handler(o, cloneProto);
- }
- const o2 = {};
- refs.push(o);
- refsNew.push(o2);
- for (const k in o) {
- const cur = o[k];
- if (typeof cur !== "object" || cur === null) {
- o2[k] = cur;
- } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
- o2[k] = handler(cur, cloneProto);
- } else if (ArrayBuffer.isView(cur)) {
- o2[k] = copyBuffer(cur);
- } else {
- const i = refs.indexOf(cur);
- if (i !== -1) {
- o2[k] = refsNew[i];
- } else {
- o2[k] = cloneProto(cur);
- }
- }
- }
- refs.pop();
- refsNew.pop();
- return o2;
- }
- }
- }
- });
- init_esm_shims();
- init_esm_shims();
- init_esm_shims();
- var isBrowser = typeof navigator !== "undefined";
- var target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
- var isInChromePanel = typeof target.chrome !== "undefined" && !!target.chrome.devtools;
- var isInIframe = isBrowser && target.self !== target.top;
- var _a;
- var isInElectron = typeof navigator !== "undefined" && ((_a = navigator.userAgent) == null ? void 0 : _a.toLowerCase().includes("electron"));
- var isNuxtApp = typeof window !== "undefined" && !!window.__NUXT__;
- init_esm_shims();
- var import_rfdc = __toESM(require_rfdc(), 1);
- var classifyRE = /(?:^|[-_/])(\w)/g;
- function toUpper(_, c) {
- return c ? c.toUpperCase() : "";
- }
- function classify(str) {
- return str && `${str}`.replace(classifyRE, toUpper);
- }
- function basename(filename, ext) {
- let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
- if (normalizedFilename.endsWith(`index${ext}`)) {
- normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
- }
- const lastSlashIndex = normalizedFilename.lastIndexOf("/");
- const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
- if (ext) {
- const extIndex = baseNameWithExt.lastIndexOf(ext);
- return baseNameWithExt.substring(0, extIndex);
- }
- return "";
- }
- var HTTP_URL_RE = /^https?:\/\//;
- function isUrlString(str) {
- return str.startsWith("/") || HTTP_URL_RE.test(str);
- }
- var deepClone = (0, import_rfdc.default)({ circles: true });
- // node_modules/perfect-debounce/dist/index.mjs
- var DEBOUNCE_DEFAULTS = {
- trailing: true
- };
- function debounce(fn, wait = 25, options = {}) {
- options = { ...DEBOUNCE_DEFAULTS, ...options };
- if (!Number.isFinite(wait)) {
- throw new TypeError("Expected `wait` to be a finite number");
- }
- let leadingValue;
- let timeout;
- let resolveList = [];
- let currentPromise;
- let trailingArgs;
- const applyFn = (_this, args) => {
- currentPromise = _applyPromised(fn, _this, args);
- currentPromise.finally(() => {
- currentPromise = null;
- if (options.trailing && trailingArgs && !timeout) {
- const promise = applyFn(_this, trailingArgs);
- trailingArgs = null;
- return promise;
- }
- });
- return currentPromise;
- };
- return function(...args) {
- if (currentPromise) {
- if (options.trailing) {
- trailingArgs = args;
- }
- return currentPromise;
- }
- return new Promise((resolve) => {
- const shouldCallNow = !timeout && options.leading;
- clearTimeout(timeout);
- timeout = setTimeout(() => {
- timeout = null;
- const promise = options.leading ? leadingValue : applyFn(this, args);
- for (const _resolve of resolveList) {
- _resolve(promise);
- }
- resolveList = [];
- }, wait);
- if (shouldCallNow) {
- leadingValue = applyFn(this, args);
- resolve(leadingValue);
- } else {
- resolveList.push(resolve);
- }
- });
- };
- }
- async function _applyPromised(fn, _this, args) {
- return await fn.apply(_this, args);
- }
- // node_modules/hookable/dist/index.mjs
- function flatHooks(configHooks, hooks2 = {}, parentName) {
- for (const key in configHooks) {
- const subHook = configHooks[key];
- const name = parentName ? `${parentName}:${key}` : key;
- if (typeof subHook === "object" && subHook !== null) {
- flatHooks(subHook, hooks2, name);
- } else if (typeof subHook === "function") {
- hooks2[name] = subHook;
- }
- }
- return hooks2;
- }
- var defaultTask = { run: (function_) => function_() };
- var _createTask = () => defaultTask;
- var createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
- function serialTaskCaller(hooks2, args) {
- const name = args.shift();
- const task = createTask(name);
- return hooks2.reduce(
- (promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))),
- Promise.resolve()
- );
- }
- function parallelTaskCaller(hooks2, args) {
- const name = args.shift();
- const task = createTask(name);
- return Promise.all(hooks2.map((hook2) => task.run(() => hook2(...args))));
- }
- function callEachWith(callbacks, arg0) {
- for (const callback of [...callbacks]) {
- callback(arg0);
- }
- }
- var Hookable = class {
- constructor() {
- this._hooks = {};
- this._before = void 0;
- this._after = void 0;
- this._deprecatedMessages = void 0;
- this._deprecatedHooks = {};
- this.hook = this.hook.bind(this);
- this.callHook = this.callHook.bind(this);
- this.callHookWith = this.callHookWith.bind(this);
- }
- hook(name, function_, options = {}) {
- if (!name || typeof function_ !== "function") {
- return () => {
- };
- }
- const originalName = name;
- let dep;
- while (this._deprecatedHooks[name]) {
- dep = this._deprecatedHooks[name];
- name = dep.to;
- }
- if (dep && !options.allowDeprecated) {
- let message = dep.message;
- if (!message) {
- message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
- }
- if (!this._deprecatedMessages) {
- this._deprecatedMessages = /* @__PURE__ */ new Set();
- }
- if (!this._deprecatedMessages.has(message)) {
- console.warn(message);
- this._deprecatedMessages.add(message);
- }
- }
- if (!function_.name) {
- try {
- Object.defineProperty(function_, "name", {
- get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
- configurable: true
- });
- } catch {
- }
- }
- this._hooks[name] = this._hooks[name] || [];
- this._hooks[name].push(function_);
- return () => {
- if (function_) {
- this.removeHook(name, function_);
- function_ = void 0;
- }
- };
- }
- hookOnce(name, function_) {
- let _unreg;
- let _function = (...arguments_) => {
- if (typeof _unreg === "function") {
- _unreg();
- }
- _unreg = void 0;
- _function = void 0;
- return function_(...arguments_);
- };
- _unreg = this.hook(name, _function);
- return _unreg;
- }
- removeHook(name, function_) {
- if (this._hooks[name]) {
- const index = this._hooks[name].indexOf(function_);
- if (index !== -1) {
- this._hooks[name].splice(index, 1);
- }
- if (this._hooks[name].length === 0) {
- delete this._hooks[name];
- }
- }
- }
- deprecateHook(name, deprecated) {
- this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
- const _hooks = this._hooks[name] || [];
- delete this._hooks[name];
- for (const hook2 of _hooks) {
- this.hook(name, hook2);
- }
- }
- deprecateHooks(deprecatedHooks) {
- Object.assign(this._deprecatedHooks, deprecatedHooks);
- for (const name in deprecatedHooks) {
- this.deprecateHook(name, deprecatedHooks[name]);
- }
- }
- addHooks(configHooks) {
- const hooks2 = flatHooks(configHooks);
- const removeFns = Object.keys(hooks2).map(
- (key) => this.hook(key, hooks2[key])
- );
- return () => {
- for (const unreg of removeFns.splice(0, removeFns.length)) {
- unreg();
- }
- };
- }
- removeHooks(configHooks) {
- const hooks2 = flatHooks(configHooks);
- for (const key in hooks2) {
- this.removeHook(key, hooks2[key]);
- }
- }
- removeAllHooks() {
- for (const key in this._hooks) {
- delete this._hooks[key];
- }
- }
- callHook(name, ...arguments_) {
- arguments_.unshift(name);
- return this.callHookWith(serialTaskCaller, name, ...arguments_);
- }
- callHookParallel(name, ...arguments_) {
- arguments_.unshift(name);
- return this.callHookWith(parallelTaskCaller, name, ...arguments_);
- }
- callHookWith(caller, name, ...arguments_) {
- const event = this._before || this._after ? { name, args: arguments_, context: {} } : void 0;
- if (this._before) {
- callEachWith(this._before, event);
- }
- const result = caller(
- name in this._hooks ? [...this._hooks[name]] : [],
- arguments_
- );
- if (result instanceof Promise) {
- return result.finally(() => {
- if (this._after && event) {
- callEachWith(this._after, event);
- }
- });
- }
- if (this._after && event) {
- callEachWith(this._after, event);
- }
- return result;
- }
- beforeEach(function_) {
- this._before = this._before || [];
- this._before.push(function_);
- return () => {
- if (this._before !== void 0) {
- const index = this._before.indexOf(function_);
- if (index !== -1) {
- this._before.splice(index, 1);
- }
- }
- };
- }
- afterEach(function_) {
- this._after = this._after || [];
- this._after.push(function_);
- return () => {
- if (this._after !== void 0) {
- const index = this._after.indexOf(function_);
- if (index !== -1) {
- this._after.splice(index, 1);
- }
- }
- };
- }
- };
- function createHooks() {
- return new Hookable();
- }
- // node_modules/birpc/dist/index.mjs
- var { clearTimeout: clearTimeout2, setTimeout: setTimeout2 } = globalThis;
- var random = Math.random.bind(Math);
- // node_modules/@vue/devtools-kit/dist/index.js
- var __create2 = Object.create;
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __getProtoOf2 = Object.getPrototypeOf;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __esm2 = (fn, res) => function __init() {
- return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
- };
- var __commonJS2 = (cb, mod) => function __require() {
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
- };
- var __copyProps2 = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toESM2 = (mod, isNodeMode, target22) => (target22 = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target22, "default", { value: mod, enumerable: true }) : target22,
- mod
- ));
- var init_esm_shims2 = __esm2({
- "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@22.10.1__@swc+core@1.5.29_jiti@2.0.0_p_swvvp2d4pgn6xuiiec4l4x2i7a/node_modules/tsup/assets/esm_shims.js"() {
- "use strict";
- }
- });
- var require_speakingurl = __commonJS2({
- "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(exports, module) {
- "use strict";
- init_esm_shims2();
- (function(root) {
- "use strict";
- var charMap = {
- // latin
- "À": "A",
- "Á": "A",
- "Â": "A",
- "Ã": "A",
- "Ä": "Ae",
- "Å": "A",
- "Æ": "AE",
- "Ç": "C",
- "È": "E",
- "É": "E",
- "Ê": "E",
- "Ë": "E",
- "Ì": "I",
- "Í": "I",
- "Î": "I",
- "Ï": "I",
- "Ð": "D",
- "Ñ": "N",
- "Ò": "O",
- "Ó": "O",
- "Ô": "O",
- "Õ": "O",
- "Ö": "Oe",
- "Ő": "O",
- "Ø": "O",
- "Ù": "U",
- "Ú": "U",
- "Û": "U",
- "Ü": "Ue",
- "Ű": "U",
- "Ý": "Y",
- "Þ": "TH",
- "ß": "ss",
- "à": "a",
- "á": "a",
- "â": "a",
- "ã": "a",
- "ä": "ae",
- "å": "a",
- "æ": "ae",
- "ç": "c",
- "è": "e",
- "é": "e",
- "ê": "e",
- "ë": "e",
- "ì": "i",
- "í": "i",
- "î": "i",
- "ï": "i",
- "ð": "d",
- "ñ": "n",
- "ò": "o",
- "ó": "o",
- "ô": "o",
- "õ": "o",
- "ö": "oe",
- "ő": "o",
- "ø": "o",
- "ù": "u",
- "ú": "u",
- "û": "u",
- "ü": "ue",
- "ű": "u",
- "ý": "y",
- "þ": "th",
- "ÿ": "y",
- "ẞ": "SS",
- // language specific
- // Arabic
- "ا": "a",
- "أ": "a",
- "إ": "i",
- "آ": "aa",
- "ؤ": "u",
- "ئ": "e",
- "ء": "a",
- "ب": "b",
- "ت": "t",
- "ث": "th",
- "ج": "j",
- "ح": "h",
- "خ": "kh",
- "د": "d",
- "ذ": "th",
- "ر": "r",
- "ز": "z",
- "س": "s",
- "ش": "sh",
- "ص": "s",
- "ض": "dh",
- "ط": "t",
- "ظ": "z",
- "ع": "a",
- "غ": "gh",
- "ف": "f",
- "ق": "q",
- "ك": "k",
- "ل": "l",
- "م": "m",
- "ن": "n",
- "ه": "h",
- "و": "w",
- "ي": "y",
- "ى": "a",
- "ة": "h",
- "ﻻ": "la",
- "ﻷ": "laa",
- "ﻹ": "lai",
- "ﻵ": "laa",
- // Persian additional characters than Arabic
- "گ": "g",
- "چ": "ch",
- "پ": "p",
- "ژ": "zh",
- "ک": "k",
- "ی": "y",
- // Arabic diactrics
- "َ": "a",
- "ً": "an",
- "ِ": "e",
- "ٍ": "en",
- "ُ": "u",
- "ٌ": "on",
- "ْ": "",
- // Arabic numbers
- "٠": "0",
- "١": "1",
- "٢": "2",
- "٣": "3",
- "٤": "4",
- "٥": "5",
- "٦": "6",
- "٧": "7",
- "٨": "8",
- "٩": "9",
- // Persian numbers
- "۰": "0",
- "۱": "1",
- "۲": "2",
- "۳": "3",
- "۴": "4",
- "۵": "5",
- "۶": "6",
- "۷": "7",
- "۸": "8",
- "۹": "9",
- // Burmese consonants
- "က": "k",
- "ခ": "kh",
- "ဂ": "g",
- "ဃ": "ga",
- "င": "ng",
- "စ": "s",
- "ဆ": "sa",
- "ဇ": "z",
- "စျ": "za",
- "ည": "ny",
- "ဋ": "t",
- "ဌ": "ta",
- "ဍ": "d",
- "ဎ": "da",
- "ဏ": "na",
- "တ": "t",
- "ထ": "ta",
- "ဒ": "d",
- "ဓ": "da",
- "န": "n",
- "ပ": "p",
- "ဖ": "pa",
- "ဗ": "b",
- "ဘ": "ba",
- "မ": "m",
- "ယ": "y",
- "ရ": "ya",
- "လ": "l",
- "ဝ": "w",
- "သ": "th",
- "ဟ": "h",
- "ဠ": "la",
- "အ": "a",
- // consonant character combos
- "ြ": "y",
- "ျ": "ya",
- "ွ": "w",
- "ြွ": "yw",
- "ျွ": "ywa",
- "ှ": "h",
- // independent vowels
- "ဧ": "e",
- "၏": "-e",
- "ဣ": "i",
- "ဤ": "-i",
- "ဉ": "u",
- "ဦ": "-u",
- "ဩ": "aw",
- "သြော": "aw",
- "ဪ": "aw",
- // numbers
- "၀": "0",
- "၁": "1",
- "၂": "2",
- "၃": "3",
- "၄": "4",
- "၅": "5",
- "၆": "6",
- "၇": "7",
- "၈": "8",
- "၉": "9",
- // virama and tone marks which are silent in transliteration
- "္": "",
- "့": "",
- "း": "",
- // Czech
- "č": "c",
- "ď": "d",
- "ě": "e",
- "ň": "n",
- "ř": "r",
- "š": "s",
- "ť": "t",
- "ů": "u",
- "ž": "z",
- "Č": "C",
- "Ď": "D",
- "Ě": "E",
- "Ň": "N",
- "Ř": "R",
- "Š": "S",
- "Ť": "T",
- "Ů": "U",
- "Ž": "Z",
- // Dhivehi
- "ހ": "h",
- "ށ": "sh",
- "ނ": "n",
- "ރ": "r",
- "ބ": "b",
- "ޅ": "lh",
- "ކ": "k",
- "އ": "a",
- "ވ": "v",
- "މ": "m",
- "ފ": "f",
- "ދ": "dh",
- "ތ": "th",
- "ލ": "l",
- "ގ": "g",
- "ޏ": "gn",
- "ސ": "s",
- "ޑ": "d",
- "ޒ": "z",
- "ޓ": "t",
- "ޔ": "y",
- "ޕ": "p",
- "ޖ": "j",
- "ޗ": "ch",
- "ޘ": "tt",
- "ޙ": "hh",
- "ޚ": "kh",
- "ޛ": "th",
- "ޜ": "z",
- "ޝ": "sh",
- "ޞ": "s",
- "ޟ": "d",
- "ޠ": "t",
- "ޡ": "z",
- "ޢ": "a",
- "ޣ": "gh",
- "ޤ": "q",
- "ޥ": "w",
- "ަ": "a",
- "ާ": "aa",
- "ި": "i",
- "ީ": "ee",
- "ު": "u",
- "ޫ": "oo",
- "ެ": "e",
- "ޭ": "ey",
- "ޮ": "o",
- "ޯ": "oa",
- "ް": "",
- // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian
- // National system (2002)
- "ა": "a",
- "ბ": "b",
- "გ": "g",
- "დ": "d",
- "ე": "e",
- "ვ": "v",
- "ზ": "z",
- "თ": "t",
- "ი": "i",
- "კ": "k",
- "ლ": "l",
- "მ": "m",
- "ნ": "n",
- "ო": "o",
- "პ": "p",
- "ჟ": "zh",
- "რ": "r",
- "ს": "s",
- "ტ": "t",
- "უ": "u",
- "ფ": "p",
- "ქ": "k",
- "ღ": "gh",
- "ყ": "q",
- "შ": "sh",
- "ჩ": "ch",
- "ც": "ts",
- "ძ": "dz",
- "წ": "ts",
- "ჭ": "ch",
- "ხ": "kh",
- "ჯ": "j",
- "ჰ": "h",
- // Greek
- "α": "a",
- "β": "v",
- "γ": "g",
- "δ": "d",
- "ε": "e",
- "ζ": "z",
- "η": "i",
- "θ": "th",
- "ι": "i",
- "κ": "k",
- "λ": "l",
- "μ": "m",
- "ν": "n",
- "ξ": "ks",
- "ο": "o",
- "π": "p",
- "ρ": "r",
- "σ": "s",
- "τ": "t",
- "υ": "y",
- "φ": "f",
- "χ": "x",
- "ψ": "ps",
- "ω": "o",
- "ά": "a",
- "έ": "e",
- "ί": "i",
- "ό": "o",
- "ύ": "y",
- "ή": "i",
- "ώ": "o",
- "ς": "s",
- "ϊ": "i",
- "ΰ": "y",
- "ϋ": "y",
- "ΐ": "i",
- "Α": "A",
- "Β": "B",
- "Γ": "G",
- "Δ": "D",
- "Ε": "E",
- "Ζ": "Z",
- "Η": "I",
- "Θ": "TH",
- "Ι": "I",
- "Κ": "K",
- "Λ": "L",
- "Μ": "M",
- "Ν": "N",
- "Ξ": "KS",
- "Ο": "O",
- "Π": "P",
- "Ρ": "R",
- "Σ": "S",
- "Τ": "T",
- "Υ": "Y",
- "Φ": "F",
- "Χ": "X",
- "Ψ": "PS",
- "Ω": "O",
- "Ά": "A",
- "Έ": "E",
- "Ί": "I",
- "Ό": "O",
- "Ύ": "Y",
- "Ή": "I",
- "Ώ": "O",
- "Ϊ": "I",
- "Ϋ": "Y",
- // Latvian
- "ā": "a",
- // 'č': 'c', // duplicate
- "ē": "e",
- "ģ": "g",
- "ī": "i",
- "ķ": "k",
- "ļ": "l",
- "ņ": "n",
- // 'š': 's', // duplicate
- "ū": "u",
- // 'ž': 'z', // duplicate
- "Ā": "A",
- // 'Č': 'C', // duplicate
- "Ē": "E",
- "Ģ": "G",
- "Ī": "I",
- "Ķ": "k",
- "Ļ": "L",
- "Ņ": "N",
- // 'Š': 'S', // duplicate
- "Ū": "U",
- // 'Ž': 'Z', // duplicate
- // Macedonian
- "Ќ": "Kj",
- "ќ": "kj",
- "Љ": "Lj",
- "љ": "lj",
- "Њ": "Nj",
- "њ": "nj",
- "Тс": "Ts",
- "тс": "ts",
- // Polish
- "ą": "a",
- "ć": "c",
- "ę": "e",
- "ł": "l",
- "ń": "n",
- // 'ó': 'o', // duplicate
- "ś": "s",
- "ź": "z",
- "ż": "z",
- "Ą": "A",
- "Ć": "C",
- "Ę": "E",
- "Ł": "L",
- "Ń": "N",
- "Ś": "S",
- "Ź": "Z",
- "Ż": "Z",
- // Ukranian
- "Є": "Ye",
- "І": "I",
- "Ї": "Yi",
- "Ґ": "G",
- "є": "ye",
- "і": "i",
- "ї": "yi",
- "ґ": "g",
- // Romanian
- "ă": "a",
- "Ă": "A",
- "ș": "s",
- "Ș": "S",
- // 'ş': 's', // duplicate
- // 'Ş': 'S', // duplicate
- "ț": "t",
- "Ț": "T",
- "ţ": "t",
- "Ţ": "T",
- // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian
- // ICAO
- "а": "a",
- "б": "b",
- "в": "v",
- "г": "g",
- "д": "d",
- "е": "e",
- "ё": "yo",
- "ж": "zh",
- "з": "z",
- "и": "i",
- "й": "i",
- "к": "k",
- "л": "l",
- "м": "m",
- "н": "n",
- "о": "o",
- "п": "p",
- "р": "r",
- "с": "s",
- "т": "t",
- "у": "u",
- "ф": "f",
- "х": "kh",
- "ц": "c",
- "ч": "ch",
- "ш": "sh",
- "щ": "sh",
- "ъ": "",
- "ы": "y",
- "ь": "",
- "э": "e",
- "ю": "yu",
- "я": "ya",
- "А": "A",
- "Б": "B",
- "В": "V",
- "Г": "G",
- "Д": "D",
- "Е": "E",
- "Ё": "Yo",
- "Ж": "Zh",
- "З": "Z",
- "И": "I",
- "Й": "I",
- "К": "K",
- "Л": "L",
- "М": "M",
- "Н": "N",
- "О": "O",
- "П": "P",
- "Р": "R",
- "С": "S",
- "Т": "T",
- "У": "U",
- "Ф": "F",
- "Х": "Kh",
- "Ц": "C",
- "Ч": "Ch",
- "Ш": "Sh",
- "Щ": "Sh",
- "Ъ": "",
- "Ы": "Y",
- "Ь": "",
- "Э": "E",
- "Ю": "Yu",
- "Я": "Ya",
- // Serbian
- "ђ": "dj",
- "ј": "j",
- // 'љ': 'lj', // duplicate
- // 'њ': 'nj', // duplicate
- "ћ": "c",
- "џ": "dz",
- "Ђ": "Dj",
- "Ј": "j",
- // 'Љ': 'Lj', // duplicate
- // 'Њ': 'Nj', // duplicate
- "Ћ": "C",
- "Џ": "Dz",
- // Slovak
- "ľ": "l",
- "ĺ": "l",
- "ŕ": "r",
- "Ľ": "L",
- "Ĺ": "L",
- "Ŕ": "R",
- // Turkish
- "ş": "s",
- "Ş": "S",
- "ı": "i",
- "İ": "I",
- // 'ç': 'c', // duplicate
- // 'Ç': 'C', // duplicate
- // 'ü': 'u', // duplicate, see langCharMap
- // 'Ü': 'U', // duplicate, see langCharMap
- // 'ö': 'o', // duplicate, see langCharMap
- // 'Ö': 'O', // duplicate, see langCharMap
- "ğ": "g",
- "Ğ": "G",
- // Vietnamese
- "ả": "a",
- "Ả": "A",
- "ẳ": "a",
- "Ẳ": "A",
- "ẩ": "a",
- "Ẩ": "A",
- "đ": "d",
- "Đ": "D",
- "ẹ": "e",
- "Ẹ": "E",
- "ẽ": "e",
- "Ẽ": "E",
- "ẻ": "e",
- "Ẻ": "E",
- "ế": "e",
- "Ế": "E",
- "ề": "e",
- "Ề": "E",
- "ệ": "e",
- "Ệ": "E",
- "ễ": "e",
- "Ễ": "E",
- "ể": "e",
- "Ể": "E",
- "ỏ": "o",
- "ọ": "o",
- "Ọ": "o",
- "ố": "o",
- "Ố": "O",
- "ồ": "o",
- "Ồ": "O",
- "ổ": "o",
- "Ổ": "O",
- "ộ": "o",
- "Ộ": "O",
- "ỗ": "o",
- "Ỗ": "O",
- "ơ": "o",
- "Ơ": "O",
- "ớ": "o",
- "Ớ": "O",
- "ờ": "o",
- "Ờ": "O",
- "ợ": "o",
- "Ợ": "O",
- "ỡ": "o",
- "Ỡ": "O",
- "Ở": "o",
- "ở": "o",
- "ị": "i",
- "Ị": "I",
- "ĩ": "i",
- "Ĩ": "I",
- "ỉ": "i",
- "Ỉ": "i",
- "ủ": "u",
- "Ủ": "U",
- "ụ": "u",
- "Ụ": "U",
- "ũ": "u",
- "Ũ": "U",
- "ư": "u",
- "Ư": "U",
- "ứ": "u",
- "Ứ": "U",
- "ừ": "u",
- "Ừ": "U",
- "ự": "u",
- "Ự": "U",
- "ữ": "u",
- "Ữ": "U",
- "ử": "u",
- "Ử": "ư",
- "ỷ": "y",
- "Ỷ": "y",
- "ỳ": "y",
- "Ỳ": "Y",
- "ỵ": "y",
- "Ỵ": "Y",
- "ỹ": "y",
- "Ỹ": "Y",
- "ạ": "a",
- "Ạ": "A",
- "ấ": "a",
- "Ấ": "A",
- "ầ": "a",
- "Ầ": "A",
- "ậ": "a",
- "Ậ": "A",
- "ẫ": "a",
- "Ẫ": "A",
- // 'ă': 'a', // duplicate
- // 'Ă': 'A', // duplicate
- "ắ": "a",
- "Ắ": "A",
- "ằ": "a",
- "Ằ": "A",
- "ặ": "a",
- "Ặ": "A",
- "ẵ": "a",
- "Ẵ": "A",
- "⓪": "0",
- "①": "1",
- "②": "2",
- "③": "3",
- "④": "4",
- "⑤": "5",
- "⑥": "6",
- "⑦": "7",
- "⑧": "8",
- "⑨": "9",
- "⑩": "10",
- "⑪": "11",
- "⑫": "12",
- "⑬": "13",
- "⑭": "14",
- "⑮": "15",
- "⑯": "16",
- "⑰": "17",
- "⑱": "18",
- "⑲": "18",
- "⑳": "18",
- "⓵": "1",
- "⓶": "2",
- "⓷": "3",
- "⓸": "4",
- "⓹": "5",
- "⓺": "6",
- "⓻": "7",
- "⓼": "8",
- "⓽": "9",
- "⓾": "10",
- "⓿": "0",
- "⓫": "11",
- "⓬": "12",
- "⓭": "13",
- "⓮": "14",
- "⓯": "15",
- "⓰": "16",
- "⓱": "17",
- "⓲": "18",
- "⓳": "19",
- "⓴": "20",
- "Ⓐ": "A",
- "Ⓑ": "B",
- "Ⓒ": "C",
- "Ⓓ": "D",
- "Ⓔ": "E",
- "Ⓕ": "F",
- "Ⓖ": "G",
- "Ⓗ": "H",
- "Ⓘ": "I",
- "Ⓙ": "J",
- "Ⓚ": "K",
- "Ⓛ": "L",
- "Ⓜ": "M",
- "Ⓝ": "N",
- "Ⓞ": "O",
- "Ⓟ": "P",
- "Ⓠ": "Q",
- "Ⓡ": "R",
- "Ⓢ": "S",
- "Ⓣ": "T",
- "Ⓤ": "U",
- "Ⓥ": "V",
- "Ⓦ": "W",
- "Ⓧ": "X",
- "Ⓨ": "Y",
- "Ⓩ": "Z",
- "ⓐ": "a",
- "ⓑ": "b",
- "ⓒ": "c",
- "ⓓ": "d",
- "ⓔ": "e",
- "ⓕ": "f",
- "ⓖ": "g",
- "ⓗ": "h",
- "ⓘ": "i",
- "ⓙ": "j",
- "ⓚ": "k",
- "ⓛ": "l",
- "ⓜ": "m",
- "ⓝ": "n",
- "ⓞ": "o",
- "ⓟ": "p",
- "ⓠ": "q",
- "ⓡ": "r",
- "ⓢ": "s",
- "ⓣ": "t",
- "ⓤ": "u",
- "ⓦ": "v",
- "ⓥ": "w",
- "ⓧ": "x",
- "ⓨ": "y",
- "ⓩ": "z",
- // symbols
- "“": '"',
- "”": '"',
- "‘": "'",
- "’": "'",
- "∂": "d",
- "ƒ": "f",
- "™": "(TM)",
- "©": "(C)",
- "œ": "oe",
- "Œ": "OE",
- "®": "(R)",
- "†": "+",
- "℠": "(SM)",
- "…": "...",
- "˚": "o",
- "º": "o",
- "ª": "a",
- "•": "*",
- "၊": ",",
- "။": ".",
- // currency
- "$": "USD",
- "€": "EUR",
- "₢": "BRN",
- "₣": "FRF",
- "£": "GBP",
- "₤": "ITL",
- "₦": "NGN",
- "₧": "ESP",
- "₩": "KRW",
- "₪": "ILS",
- "₫": "VND",
- "₭": "LAK",
- "₮": "MNT",
- "₯": "GRD",
- "₱": "ARS",
- "₲": "PYG",
- "₳": "ARA",
- "₴": "UAH",
- "₵": "GHS",
- "¢": "cent",
- "¥": "CNY",
- "元": "CNY",
- "円": "YEN",
- "﷼": "IRR",
- "₠": "EWE",
- "฿": "THB",
- "₨": "INR",
- "₹": "INR",
- "₰": "PF",
- "₺": "TRY",
- "؋": "AFN",
- "₼": "AZN",
- "лв": "BGN",
- "៛": "KHR",
- "₡": "CRC",
- "₸": "KZT",
- "ден": "MKD",
- "zł": "PLN",
- "₽": "RUB",
- "₾": "GEL"
- };
- var lookAheadCharArray = [
- // burmese
- "်",
- // Dhivehi
- "ް"
- ];
- var diatricMap = {
- // Burmese
- // dependent vowels
- "ာ": "a",
- "ါ": "a",
- "ေ": "e",
- "ဲ": "e",
- "ိ": "i",
- "ီ": "i",
- "ို": "o",
- "ု": "u",
- "ူ": "u",
- "ေါင်": "aung",
- "ော": "aw",
- "ော်": "aw",
- "ေါ": "aw",
- "ေါ်": "aw",
- "်": "်",
- // this is special case but the character will be converted to latin in the code
- "က်": "et",
- "ိုက်": "aik",
- "ောက်": "auk",
- "င်": "in",
- "ိုင်": "aing",
- "ောင်": "aung",
- "စ်": "it",
- "ည်": "i",
- "တ်": "at",
- "ိတ်": "eik",
- "ုတ်": "ok",
- "ွတ်": "ut",
- "ေတ်": "it",
- "ဒ်": "d",
- "ိုဒ်": "ok",
- "ုဒ်": "ait",
- "န်": "an",
- "ာန်": "an",
- "ိန်": "ein",
- "ုန်": "on",
- "ွန်": "un",
- "ပ်": "at",
- "ိပ်": "eik",
- "ုပ်": "ok",
- "ွပ်": "ut",
- "န်ုပ်": "nub",
- "မ်": "an",
- "ိမ်": "ein",
- "ုမ်": "on",
- "ွမ်": "un",
- "ယ်": "e",
- "ိုလ်": "ol",
- "ဉ်": "in",
- "ံ": "an",
- "ိံ": "ein",
- "ုံ": "on",
- // Dhivehi
- "ައް": "ah",
- "ަށް": "ah"
- };
- var langCharMap = {
- "en": {},
- // default language
- "az": {
- // Azerbaijani
- "ç": "c",
- "ə": "e",
- "ğ": "g",
- "ı": "i",
- "ö": "o",
- "ş": "s",
- "ü": "u",
- "Ç": "C",
- "Ə": "E",
- "Ğ": "G",
- "İ": "I",
- "Ö": "O",
- "Ş": "S",
- "Ü": "U"
- },
- "cs": {
- // Czech
- "č": "c",
- "ď": "d",
- "ě": "e",
- "ň": "n",
- "ř": "r",
- "š": "s",
- "ť": "t",
- "ů": "u",
- "ž": "z",
- "Č": "C",
- "Ď": "D",
- "Ě": "E",
- "Ň": "N",
- "Ř": "R",
- "Š": "S",
- "Ť": "T",
- "Ů": "U",
- "Ž": "Z"
- },
- "fi": {
- // Finnish
- // 'å': 'a', duplicate see charMap/latin
- // 'Å': 'A', duplicate see charMap/latin
- "ä": "a",
- // ok
- "Ä": "A",
- // ok
- "ö": "o",
- // ok
- "Ö": "O"
- // ok
- },
- "hu": {
- // Hungarian
- "ä": "a",
- // ok
- "Ä": "A",
- // ok
- // 'á': 'a', duplicate see charMap/latin
- // 'Á': 'A', duplicate see charMap/latin
- "ö": "o",
- // ok
- "Ö": "O",
- // ok
- // 'ő': 'o', duplicate see charMap/latin
- // 'Ő': 'O', duplicate see charMap/latin
- "ü": "u",
- "Ü": "U",
- "ű": "u",
- "Ű": "U"
- },
- "lt": {
- // Lithuanian
- "ą": "a",
- "č": "c",
- "ę": "e",
- "ė": "e",
- "į": "i",
- "š": "s",
- "ų": "u",
- "ū": "u",
- "ž": "z",
- "Ą": "A",
- "Č": "C",
- "Ę": "E",
- "Ė": "E",
- "Į": "I",
- "Š": "S",
- "Ų": "U",
- "Ū": "U"
- },
- "lv": {
- // Latvian
- "ā": "a",
- "č": "c",
- "ē": "e",
- "ģ": "g",
- "ī": "i",
- "ķ": "k",
- "ļ": "l",
- "ņ": "n",
- "š": "s",
- "ū": "u",
- "ž": "z",
- "Ā": "A",
- "Č": "C",
- "Ē": "E",
- "Ģ": "G",
- "Ī": "i",
- "Ķ": "k",
- "Ļ": "L",
- "Ņ": "N",
- "Š": "S",
- "Ū": "u",
- "Ž": "Z"
- },
- "pl": {
- // Polish
- "ą": "a",
- "ć": "c",
- "ę": "e",
- "ł": "l",
- "ń": "n",
- "ó": "o",
- "ś": "s",
- "ź": "z",
- "ż": "z",
- "Ą": "A",
- "Ć": "C",
- "Ę": "e",
- "Ł": "L",
- "Ń": "N",
- "Ó": "O",
- "Ś": "S",
- "Ź": "Z",
- "Ż": "Z"
- },
- "sv": {
- // Swedish
- // 'å': 'a', duplicate see charMap/latin
- // 'Å': 'A', duplicate see charMap/latin
- "ä": "a",
- // ok
- "Ä": "A",
- // ok
- "ö": "o",
- // ok
- "Ö": "O"
- // ok
- },
- "sk": {
- // Slovak
- "ä": "a",
- "Ä": "A"
- },
- "sr": {
- // Serbian
- "љ": "lj",
- "њ": "nj",
- "Љ": "Lj",
- "Њ": "Nj",
- "đ": "dj",
- "Đ": "Dj"
- },
- "tr": {
- // Turkish
- "Ü": "U",
- "Ö": "O",
- "ü": "u",
- "ö": "o"
- }
- };
- var symbolMap = {
- "ar": {
- "∆": "delta",
- "∞": "la-nihaya",
- "♥": "hob",
- "&": "wa",
- "|": "aw",
- "<": "aqal-men",
- ">": "akbar-men",
- "∑": "majmou",
- "¤": "omla"
- },
- "az": {},
- "ca": {
- "∆": "delta",
- "∞": "infinit",
- "♥": "amor",
- "&": "i",
- "|": "o",
- "<": "menys que",
- ">": "mes que",
- "∑": "suma dels",
- "¤": "moneda"
- },
- "cs": {
- "∆": "delta",
- "∞": "nekonecno",
- "♥": "laska",
- "&": "a",
- "|": "nebo",
- "<": "mensi nez",
- ">": "vetsi nez",
- "∑": "soucet",
- "¤": "mena"
- },
- "de": {
- "∆": "delta",
- "∞": "unendlich",
- "♥": "Liebe",
- "&": "und",
- "|": "oder",
- "<": "kleiner als",
- ">": "groesser als",
- "∑": "Summe von",
- "¤": "Waehrung"
- },
- "dv": {
- "∆": "delta",
- "∞": "kolunulaa",
- "♥": "loabi",
- "&": "aai",
- "|": "noonee",
- "<": "ah vure kuda",
- ">": "ah vure bodu",
- "∑": "jumula",
- "¤": "faisaa"
- },
- "en": {
- "∆": "delta",
- "∞": "infinity",
- "♥": "love",
- "&": "and",
- "|": "or",
- "<": "less than",
- ">": "greater than",
- "∑": "sum",
- "¤": "currency"
- },
- "es": {
- "∆": "delta",
- "∞": "infinito",
- "♥": "amor",
- "&": "y",
- "|": "u",
- "<": "menos que",
- ">": "mas que",
- "∑": "suma de los",
- "¤": "moneda"
- },
- "fa": {
- "∆": "delta",
- "∞": "bi-nahayat",
- "♥": "eshgh",
- "&": "va",
- "|": "ya",
- "<": "kamtar-az",
- ">": "bishtar-az",
- "∑": "majmooe",
- "¤": "vahed"
- },
- "fi": {
- "∆": "delta",
- "∞": "aarettomyys",
- "♥": "rakkaus",
- "&": "ja",
- "|": "tai",
- "<": "pienempi kuin",
- ">": "suurempi kuin",
- "∑": "summa",
- "¤": "valuutta"
- },
- "fr": {
- "∆": "delta",
- "∞": "infiniment",
- "♥": "Amour",
- "&": "et",
- "|": "ou",
- "<": "moins que",
- ">": "superieure a",
- "∑": "somme des",
- "¤": "monnaie"
- },
- "ge": {
- "∆": "delta",
- "∞": "usasruloba",
- "♥": "siqvaruli",
- "&": "da",
- "|": "an",
- "<": "naklebi",
- ">": "meti",
- "∑": "jami",
- "¤": "valuta"
- },
- "gr": {},
- "hu": {
- "∆": "delta",
- "∞": "vegtelen",
- "♥": "szerelem",
- "&": "es",
- "|": "vagy",
- "<": "kisebb mint",
- ">": "nagyobb mint",
- "∑": "szumma",
- "¤": "penznem"
- },
- "it": {
- "∆": "delta",
- "∞": "infinito",
- "♥": "amore",
- "&": "e",
- "|": "o",
- "<": "minore di",
- ">": "maggiore di",
- "∑": "somma",
- "¤": "moneta"
- },
- "lt": {
- "∆": "delta",
- "∞": "begalybe",
- "♥": "meile",
- "&": "ir",
- "|": "ar",
- "<": "maziau nei",
- ">": "daugiau nei",
- "∑": "suma",
- "¤": "valiuta"
- },
- "lv": {
- "∆": "delta",
- "∞": "bezgaliba",
- "♥": "milestiba",
- "&": "un",
- "|": "vai",
- "<": "mazak neka",
- ">": "lielaks neka",
- "∑": "summa",
- "¤": "valuta"
- },
- "my": {
- "∆": "kwahkhyaet",
- "∞": "asaonasme",
- "♥": "akhyait",
- "&": "nhin",
- "|": "tho",
- "<": "ngethaw",
- ">": "kyithaw",
- "∑": "paungld",
- "¤": "ngwekye"
- },
- "mk": {},
- "nl": {
- "∆": "delta",
- "∞": "oneindig",
- "♥": "liefde",
- "&": "en",
- "|": "of",
- "<": "kleiner dan",
- ">": "groter dan",
- "∑": "som",
- "¤": "valuta"
- },
- "pl": {
- "∆": "delta",
- "∞": "nieskonczonosc",
- "♥": "milosc",
- "&": "i",
- "|": "lub",
- "<": "mniejsze niz",
- ">": "wieksze niz",
- "∑": "suma",
- "¤": "waluta"
- },
- "pt": {
- "∆": "delta",
- "∞": "infinito",
- "♥": "amor",
- "&": "e",
- "|": "ou",
- "<": "menor que",
- ">": "maior que",
- "∑": "soma",
- "¤": "moeda"
- },
- "ro": {
- "∆": "delta",
- "∞": "infinit",
- "♥": "dragoste",
- "&": "si",
- "|": "sau",
- "<": "mai mic ca",
- ">": "mai mare ca",
- "∑": "suma",
- "¤": "valuta"
- },
- "ru": {
- "∆": "delta",
- "∞": "beskonechno",
- "♥": "lubov",
- "&": "i",
- "|": "ili",
- "<": "menshe",
- ">": "bolshe",
- "∑": "summa",
- "¤": "valjuta"
- },
- "sk": {
- "∆": "delta",
- "∞": "nekonecno",
- "♥": "laska",
- "&": "a",
- "|": "alebo",
- "<": "menej ako",
- ">": "viac ako",
- "∑": "sucet",
- "¤": "mena"
- },
- "sr": {},
- "tr": {
- "∆": "delta",
- "∞": "sonsuzluk",
- "♥": "ask",
- "&": "ve",
- "|": "veya",
- "<": "kucuktur",
- ">": "buyuktur",
- "∑": "toplam",
- "¤": "para birimi"
- },
- "uk": {
- "∆": "delta",
- "∞": "bezkinechnist",
- "♥": "lubov",
- "&": "i",
- "|": "abo",
- "<": "menshe",
- ">": "bilshe",
- "∑": "suma",
- "¤": "valjuta"
- },
- "vn": {
- "∆": "delta",
- "∞": "vo cuc",
- "♥": "yeu",
- "&": "va",
- "|": "hoac",
- "<": "nho hon",
- ">": "lon hon",
- "∑": "tong",
- "¤": "tien te"
- }
- };
- var uricChars = [";", "?", ":", "@", "&", "=", "+", "$", ",", "/"].join("");
- var uricNoSlashChars = [";", "?", ":", "@", "&", "=", "+", "$", ","].join("");
- var markChars = [".", "!", "~", "*", "'", "(", ")"].join("");
- var getSlug = function getSlug2(input, opts) {
- var separator = "-";
- var result = "";
- var diatricString = "";
- var convertSymbols = true;
- var customReplacements = {};
- var maintainCase;
- var titleCase;
- var truncate;
- var uricFlag;
- var uricNoSlashFlag;
- var markFlag;
- var symbol;
- var langChar;
- var lucky;
- var i;
- var ch;
- var l;
- var lastCharWasSymbol;
- var lastCharWasDiatric;
- var allowedChars = "";
- if (typeof input !== "string") {
- return "";
- }
- if (typeof opts === "string") {
- separator = opts;
- }
- symbol = symbolMap.en;
- langChar = langCharMap.en;
- if (typeof opts === "object") {
- maintainCase = opts.maintainCase || false;
- customReplacements = opts.custom && typeof opts.custom === "object" ? opts.custom : customReplacements;
- truncate = +opts.truncate > 1 && opts.truncate || false;
- uricFlag = opts.uric || false;
- uricNoSlashFlag = opts.uricNoSlash || false;
- markFlag = opts.mark || false;
- convertSymbols = opts.symbols === false || opts.lang === false ? false : true;
- separator = opts.separator || separator;
- if (uricFlag) {
- allowedChars += uricChars;
- }
- if (uricNoSlashFlag) {
- allowedChars += uricNoSlashChars;
- }
- if (markFlag) {
- allowedChars += markChars;
- }
- symbol = opts.lang && symbolMap[opts.lang] && convertSymbols ? symbolMap[opts.lang] : convertSymbols ? symbolMap.en : {};
- langChar = opts.lang && langCharMap[opts.lang] ? langCharMap[opts.lang] : opts.lang === false || opts.lang === true ? {} : langCharMap.en;
- if (opts.titleCase && typeof opts.titleCase.length === "number" && Array.prototype.toString.call(opts.titleCase)) {
- opts.titleCase.forEach(function(v) {
- customReplacements[v + ""] = v + "";
- });
- titleCase = true;
- } else {
- titleCase = !!opts.titleCase;
- }
- if (opts.custom && typeof opts.custom.length === "number" && Array.prototype.toString.call(opts.custom)) {
- opts.custom.forEach(function(v) {
- customReplacements[v + ""] = v + "";
- });
- }
- Object.keys(customReplacements).forEach(function(v) {
- var r;
- if (v.length > 1) {
- r = new RegExp("\\b" + escapeChars(v) + "\\b", "gi");
- } else {
- r = new RegExp(escapeChars(v), "gi");
- }
- input = input.replace(r, customReplacements[v]);
- });
- for (ch in customReplacements) {
- allowedChars += ch;
- }
- }
- allowedChars += separator;
- allowedChars = escapeChars(allowedChars);
- input = input.replace(/(^\s+|\s+$)/g, "");
- lastCharWasSymbol = false;
- lastCharWasDiatric = false;
- for (i = 0, l = input.length; i < l; i++) {
- ch = input[i];
- if (isReplacedCustomChar(ch, customReplacements)) {
- lastCharWasSymbol = false;
- } else if (langChar[ch]) {
- ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? " " + langChar[ch] : langChar[ch];
- lastCharWasSymbol = false;
- } else if (ch in charMap) {
- if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
- diatricString += ch;
- ch = "";
- } else if (lastCharWasDiatric === true) {
- ch = diatricMap[diatricString] + charMap[ch];
- diatricString = "";
- } else {
- ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? " " + charMap[ch] : charMap[ch];
- }
- lastCharWasSymbol = false;
- lastCharWasDiatric = false;
- } else if (ch in diatricMap) {
- diatricString += ch;
- ch = "";
- if (i === l - 1) {
- ch = diatricMap[diatricString];
- }
- lastCharWasDiatric = true;
- } else if (
- // process symbol chars
- symbol[ch] && !(uricFlag && uricChars.indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars.indexOf(ch) !== -1)
- ) {
- ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];
- ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : "";
- lastCharWasSymbol = true;
- } else {
- if (lastCharWasDiatric === true) {
- ch = diatricMap[diatricString] + ch;
- diatricString = "";
- lastCharWasDiatric = false;
- } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) {
- ch = " " + ch;
- }
- lastCharWasSymbol = false;
- }
- result += ch.replace(new RegExp("[^\\w\\s" + allowedChars + "_-]", "g"), separator);
- }
- if (titleCase) {
- result = result.replace(/(\w)(\S*)/g, function(_, i2, r) {
- var j = i2.toUpperCase() + (r !== null ? r : "");
- return Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0 ? j : j.toLowerCase();
- });
- }
- result = result.replace(/\s+/g, separator).replace(new RegExp("\\" + separator + "+", "g"), separator).replace(new RegExp("(^\\" + separator + "+|\\" + separator + "+$)", "g"), "");
- if (truncate && result.length > truncate) {
- lucky = result.charAt(truncate) === separator;
- result = result.slice(0, truncate);
- if (!lucky) {
- result = result.slice(0, result.lastIndexOf(separator));
- }
- }
- if (!maintainCase && !titleCase) {
- result = result.toLowerCase();
- }
- return result;
- };
- var createSlug = function createSlug2(opts) {
- return function getSlugWithConfig(input) {
- return getSlug(input, opts);
- };
- };
- var escapeChars = function escapeChars2(input) {
- return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
- };
- var isReplacedCustomChar = function(ch, customReplacements) {
- for (var c in customReplacements) {
- if (customReplacements[c] === ch) {
- return true;
- }
- }
- };
- if (typeof module !== "undefined" && module.exports) {
- module.exports = getSlug;
- module.exports.createSlug = createSlug;
- } else if (typeof define !== "undefined" && define.amd) {
- define([], function() {
- return getSlug;
- });
- } else {
- try {
- if (root.getSlug || root.createSlug) {
- throw "speakingurl: globals exists /(getSlug|createSlug)/";
- } else {
- root.getSlug = getSlug;
- root.createSlug = createSlug;
- }
- } catch (e) {
- }
- }
- })(exports);
- }
- });
- var require_speakingurl2 = __commonJS2({
- "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(exports, module) {
- "use strict";
- init_esm_shims2();
- module.exports = require_speakingurl();
- }
- });
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- function getComponentTypeName(options) {
- var _a25;
- const name = options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;
- if (name === "index" && ((_a25 = options.__file) == null ? void 0 : _a25.endsWith("index.vue"))) {
- return "";
- }
- return name;
- }
- function getComponentFileName(options) {
- const file = options.__file;
- if (file)
- return classify(basename(file, ".vue"));
- }
- function saveComponentGussedName(instance, name) {
- instance.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = name;
- return name;
- }
- function getAppRecord(instance) {
- if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__)
- return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
- else if (instance.root)
- return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
- }
- async function getComponentId(options) {
- const { app, uid, instance } = options;
- try {
- if (instance.__VUE_DEVTOOLS_NEXT_UID__)
- return instance.__VUE_DEVTOOLS_NEXT_UID__;
- const appRecord = await getAppRecord(app);
- if (!appRecord)
- return null;
- const isRoot = appRecord.rootInstance === instance;
- return `${appRecord.id}:${isRoot ? "root" : uid}`;
- } catch (e) {
- }
- }
- function isFragment(instance) {
- var _a25, _b25;
- const subTreeType = (_a25 = instance.subTree) == null ? void 0 : _a25.type;
- const appRecord = getAppRecord(instance);
- if (appRecord) {
- return ((_b25 = appRecord == null ? void 0 : appRecord.types) == null ? void 0 : _b25.Fragment) === subTreeType;
- }
- return false;
- }
- function getInstanceName(instance) {
- var _a25, _b25, _c;
- const name = getComponentTypeName((instance == null ? void 0 : instance.type) || {});
- if (name)
- return name;
- if ((instance == null ? void 0 : instance.root) === instance)
- return "Root";
- for (const key in (_b25 = (_a25 = instance.parent) == null ? void 0 : _a25.type) == null ? void 0 : _b25.components) {
- if (instance.parent.type.components[key] === (instance == null ? void 0 : instance.type))
- return saveComponentGussedName(instance, key);
- }
- for (const key in (_c = instance.appContext) == null ? void 0 : _c.components) {
- if (instance.appContext.components[key] === (instance == null ? void 0 : instance.type))
- return saveComponentGussedName(instance, key);
- }
- const fileName = getComponentFileName((instance == null ? void 0 : instance.type) || {});
- if (fileName)
- return fileName;
- return "Anonymous Component";
- }
- function getComponentInstance(appRecord, instanceId) {
- instanceId = instanceId || `${appRecord.id}:root`;
- const instance = appRecord.instanceMap.get(instanceId);
- return instance || appRecord.instanceMap.get(":root");
- }
- function createRect() {
- const rect = {
- top: 0,
- bottom: 0,
- left: 0,
- right: 0,
- get width() {
- return rect.right - rect.left;
- },
- get height() {
- return rect.bottom - rect.top;
- }
- };
- return rect;
- }
- var range;
- function getTextRect(node) {
- if (!range)
- range = document.createRange();
- range.selectNode(node);
- return range.getBoundingClientRect();
- }
- function getFragmentRect(vnode) {
- const rect = createRect();
- if (!vnode.children)
- return rect;
- for (let i = 0, l = vnode.children.length; i < l; i++) {
- const childVnode = vnode.children[i];
- let childRect;
- if (childVnode.component) {
- childRect = getComponentBoundingRect(childVnode.component);
- } else if (childVnode.el) {
- const el = childVnode.el;
- if (el.nodeType === 1 || el.getBoundingClientRect)
- childRect = el.getBoundingClientRect();
- else if (el.nodeType === 3 && el.data.trim())
- childRect = getTextRect(el);
- }
- if (childRect)
- mergeRects(rect, childRect);
- }
- return rect;
- }
- function mergeRects(a, b) {
- if (!a.top || b.top < a.top)
- a.top = b.top;
- if (!a.bottom || b.bottom > a.bottom)
- a.bottom = b.bottom;
- if (!a.left || b.left < a.left)
- a.left = b.left;
- if (!a.right || b.right > a.right)
- a.right = b.right;
- return a;
- }
- var DEFAULT_RECT = {
- top: 0,
- left: 0,
- right: 0,
- bottom: 0,
- width: 0,
- height: 0
- };
- function getComponentBoundingRect(instance) {
- const el = instance.subTree.el;
- if (typeof window === "undefined") {
- return DEFAULT_RECT;
- }
- if (isFragment(instance))
- return getFragmentRect(instance.subTree);
- else if ((el == null ? void 0 : el.nodeType) === 1)
- return el == null ? void 0 : el.getBoundingClientRect();
- else if (instance.subTree.component)
- return getComponentBoundingRect(instance.subTree.component);
- else
- return DEFAULT_RECT;
- }
- init_esm_shims2();
- function getRootElementsFromComponentInstance(instance) {
- if (isFragment(instance))
- return getFragmentRootElements(instance.subTree);
- if (!instance.subTree)
- return [];
- return [instance.subTree.el];
- }
- function getFragmentRootElements(vnode) {
- if (!vnode.children)
- return [];
- const list = [];
- vnode.children.forEach((childVnode) => {
- if (childVnode.component)
- list.push(...getRootElementsFromComponentInstance(childVnode.component));
- else if (childVnode == null ? void 0 : childVnode.el)
- list.push(childVnode.el);
- });
- return list;
- }
- var CONTAINER_ELEMENT_ID = "__vue-devtools-component-inspector__";
- var CARD_ELEMENT_ID = "__vue-devtools-component-inspector__card__";
- var COMPONENT_NAME_ELEMENT_ID = "__vue-devtools-component-inspector__name__";
- var INDICATOR_ELEMENT_ID = "__vue-devtools-component-inspector__indicator__";
- var containerStyles = {
- display: "block",
- zIndex: 2147483640,
- position: "fixed",
- backgroundColor: "#42b88325",
- border: "1px solid #42b88350",
- borderRadius: "5px",
- transition: "all 0.1s ease-in",
- pointerEvents: "none"
- };
- var cardStyles = {
- fontFamily: "Arial, Helvetica, sans-serif",
- padding: "5px 8px",
- borderRadius: "4px",
- textAlign: "left",
- position: "absolute",
- left: 0,
- color: "#e9e9e9",
- fontSize: "14px",
- fontWeight: 600,
- lineHeight: "24px",
- backgroundColor: "#42b883",
- boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
- };
- var indicatorStyles = {
- display: "inline-block",
- fontWeight: 400,
- fontStyle: "normal",
- fontSize: "12px",
- opacity: 0.7
- };
- function getContainerElement() {
- return document.getElementById(CONTAINER_ELEMENT_ID);
- }
- function getCardElement() {
- return document.getElementById(CARD_ELEMENT_ID);
- }
- function getIndicatorElement() {
- return document.getElementById(INDICATOR_ELEMENT_ID);
- }
- function getNameElement() {
- return document.getElementById(COMPONENT_NAME_ELEMENT_ID);
- }
- function getStyles(bounds) {
- return {
- left: `${Math.round(bounds.left * 100) / 100}px`,
- top: `${Math.round(bounds.top * 100) / 100}px`,
- width: `${Math.round(bounds.width * 100) / 100}px`,
- height: `${Math.round(bounds.height * 100) / 100}px`
- };
- }
- function create(options) {
- var _a25;
- const containerEl = document.createElement("div");
- containerEl.id = (_a25 = options.elementId) != null ? _a25 : CONTAINER_ELEMENT_ID;
- Object.assign(containerEl.style, {
- ...containerStyles,
- ...getStyles(options.bounds),
- ...options.style
- });
- const cardEl = document.createElement("span");
- cardEl.id = CARD_ELEMENT_ID;
- Object.assign(cardEl.style, {
- ...cardStyles,
- top: options.bounds.top < 35 ? 0 : "-35px"
- });
- const nameEl = document.createElement("span");
- nameEl.id = COMPONENT_NAME_ELEMENT_ID;
- nameEl.innerHTML = `<${options.name}> `;
- const indicatorEl = document.createElement("i");
- indicatorEl.id = INDICATOR_ELEMENT_ID;
- indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
- Object.assign(indicatorEl.style, indicatorStyles);
- cardEl.appendChild(nameEl);
- cardEl.appendChild(indicatorEl);
- containerEl.appendChild(cardEl);
- document.body.appendChild(containerEl);
- return containerEl;
- }
- function update(options) {
- const containerEl = getContainerElement();
- const cardEl = getCardElement();
- const nameEl = getNameElement();
- const indicatorEl = getIndicatorElement();
- if (containerEl) {
- Object.assign(containerEl.style, {
- ...containerStyles,
- ...getStyles(options.bounds)
- });
- Object.assign(cardEl.style, {
- top: options.bounds.top < 35 ? 0 : "-35px"
- });
- nameEl.innerHTML = `<${options.name}> `;
- indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
- }
- }
- function highlight(instance) {
- const bounds = getComponentBoundingRect(instance);
- if (!bounds.width && !bounds.height)
- return;
- const name = getInstanceName(instance);
- const container = getContainerElement();
- container ? update({ bounds, name }) : create({ bounds, name });
- }
- function unhighlight() {
- const el = getContainerElement();
- if (el)
- el.style.display = "none";
- }
- var inspectInstance = null;
- function inspectFn(e) {
- const target22 = e.target;
- if (target22) {
- const instance = target22.__vueParentComponent;
- if (instance) {
- inspectInstance = instance;
- const el = instance.vnode.el;
- if (el) {
- const bounds = getComponentBoundingRect(instance);
- const name = getInstanceName(instance);
- const container = getContainerElement();
- container ? update({ bounds, name }) : create({ bounds, name });
- }
- }
- }
- }
- function selectComponentFn(e, cb) {
- var _a25;
- e.preventDefault();
- e.stopPropagation();
- if (inspectInstance) {
- const app = (_a25 = activeAppRecord.value) == null ? void 0 : _a25.app;
- getComponentId({
- app,
- uid: app.uid,
- instance: inspectInstance
- }).then((id) => {
- cb(id);
- });
- }
- }
- var inspectComponentHighLighterSelectFn = null;
- function cancelInspectComponentHighLighter() {
- unhighlight();
- window.removeEventListener("mouseover", inspectFn);
- window.removeEventListener("click", inspectComponentHighLighterSelectFn, true);
- inspectComponentHighLighterSelectFn = null;
- }
- function inspectComponentHighLighter() {
- window.addEventListener("mouseover", inspectFn);
- return new Promise((resolve) => {
- function onSelect(e) {
- e.preventDefault();
- e.stopPropagation();
- selectComponentFn(e, (id) => {
- window.removeEventListener("click", onSelect, true);
- inspectComponentHighLighterSelectFn = null;
- window.removeEventListener("mouseover", inspectFn);
- const el = getContainerElement();
- if (el)
- el.style.display = "none";
- resolve(JSON.stringify({ id }));
- });
- }
- inspectComponentHighLighterSelectFn = onSelect;
- window.addEventListener("click", onSelect, true);
- });
- }
- function scrollToComponent(options) {
- const instance = getComponentInstance(activeAppRecord.value, options.id);
- if (instance) {
- const [el] = getRootElementsFromComponentInstance(instance);
- if (typeof el.scrollIntoView === "function") {
- el.scrollIntoView({
- behavior: "smooth"
- });
- } else {
- const bounds = getComponentBoundingRect(instance);
- const scrollTarget = document.createElement("div");
- const styles = {
- ...getStyles(bounds),
- position: "absolute"
- };
- Object.assign(scrollTarget.style, styles);
- document.body.appendChild(scrollTarget);
- scrollTarget.scrollIntoView({
- behavior: "smooth"
- });
- setTimeout(() => {
- document.body.removeChild(scrollTarget);
- }, 2e3);
- }
- setTimeout(() => {
- const bounds = getComponentBoundingRect(instance);
- if (bounds.width || bounds.height) {
- const name = getInstanceName(instance);
- const el2 = getContainerElement();
- el2 ? update({ ...options, name, bounds }) : create({ ...options, name, bounds });
- setTimeout(() => {
- if (el2)
- el2.style.display = "none";
- }, 1500);
- }
- }, 1200);
- }
- }
- init_esm_shims2();
- var _a2;
- var _b;
- (_b = (_a2 = target).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null ? _b : _a2.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true;
- function waitForInspectorInit(cb) {
- let total = 0;
- const timer = setInterval(() => {
- if (target.__VUE_INSPECTOR__) {
- clearInterval(timer);
- total += 30;
- cb();
- }
- if (total >= /* 5s */
- 5e3)
- clearInterval(timer);
- }, 30);
- }
- function setupInspector() {
- const inspector = target.__VUE_INSPECTOR__;
- const _openInEditor = inspector.openInEditor;
- inspector.openInEditor = async (...params) => {
- inspector.disable();
- _openInEditor(...params);
- };
- }
- function getComponentInspector() {
- return new Promise((resolve) => {
- function setup() {
- setupInspector();
- resolve(target.__VUE_INSPECTOR__);
- }
- if (!target.__VUE_INSPECTOR__) {
- waitForInspectorInit(() => {
- setup();
- });
- } else {
- setup();
- }
- });
- }
- init_esm_shims2();
- init_esm_shims2();
- function isReadonly(value) {
- return !!(value && value[
- "__v_isReadonly"
- /* IS_READONLY */
- ]);
- }
- function isReactive(value) {
- if (isReadonly(value)) {
- return isReactive(value[
- "__v_raw"
- /* RAW */
- ]);
- }
- return !!(value && value[
- "__v_isReactive"
- /* IS_REACTIVE */
- ]);
- }
- function isRef(r) {
- return !!(r && r.__v_isRef === true);
- }
- function toRaw(observed) {
- const raw = observed && observed[
- "__v_raw"
- /* RAW */
- ];
- return raw ? toRaw(raw) : observed;
- }
- var Fragment = Symbol.for("v-fgt");
- var StateEditor = class {
- constructor() {
- this.refEditor = new RefStateEditor();
- }
- set(object, path, value, cb) {
- const sections = Array.isArray(path) ? path : path.split(".");
- const markRef = false;
- while (sections.length > 1) {
- const section = sections.shift();
- if (object instanceof Map)
- object = object.get(section);
- if (object instanceof Set)
- object = Array.from(object.values())[section];
- else object = object[section];
- if (this.refEditor.isRef(object))
- object = this.refEditor.get(object);
- }
- const field = sections[0];
- const item = this.refEditor.get(object)[field];
- if (cb) {
- cb(object, field, value);
- } else {
- if (this.refEditor.isRef(item))
- this.refEditor.set(item, value);
- else if (markRef)
- object[field] = value;
- else
- object[field] = value;
- }
- }
- get(object, path) {
- const sections = Array.isArray(path) ? path : path.split(".");
- for (let i = 0; i < sections.length; i++) {
- if (object instanceof Map)
- object = object.get(sections[i]);
- else
- object = object[sections[i]];
- if (this.refEditor.isRef(object))
- object = this.refEditor.get(object);
- if (!object)
- return void 0;
- }
- return object;
- }
- has(object, path, parent = false) {
- if (typeof object === "undefined")
- return false;
- const sections = Array.isArray(path) ? path.slice() : path.split(".");
- const size = !parent ? 1 : 2;
- while (object && sections.length > size) {
- const section = sections.shift();
- object = object[section];
- if (this.refEditor.isRef(object))
- object = this.refEditor.get(object);
- }
- return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
- }
- createDefaultSetCallback(state) {
- return (object, field, value) => {
- if (state.remove || state.newKey) {
- if (Array.isArray(object))
- object.splice(field, 1);
- else if (toRaw(object) instanceof Map)
- object.delete(field);
- else if (toRaw(object) instanceof Set)
- object.delete(Array.from(object.values())[field]);
- else Reflect.deleteProperty(object, field);
- }
- if (!state.remove) {
- const target22 = object[state.newKey || field];
- if (this.refEditor.isRef(target22))
- this.refEditor.set(target22, value);
- else if (toRaw(object) instanceof Map)
- object.set(state.newKey || field, value);
- else if (toRaw(object) instanceof Set)
- object.add(value);
- else
- object[state.newKey || field] = value;
- }
- };
- }
- };
- var RefStateEditor = class {
- set(ref, value) {
- if (isRef(ref)) {
- ref.value = value;
- } else {
- if (ref instanceof Set && Array.isArray(value)) {
- ref.clear();
- value.forEach((v) => ref.add(v));
- return;
- }
- const currentKeys = Object.keys(value);
- if (ref instanceof Map) {
- const previousKeysSet2 = new Set(ref.keys());
- currentKeys.forEach((key) => {
- ref.set(key, Reflect.get(value, key));
- previousKeysSet2.delete(key);
- });
- previousKeysSet2.forEach((key) => ref.delete(key));
- return;
- }
- const previousKeysSet = new Set(Object.keys(ref));
- currentKeys.forEach((key) => {
- Reflect.set(ref, key, Reflect.get(value, key));
- previousKeysSet.delete(key);
- });
- previousKeysSet.forEach((key) => Reflect.deleteProperty(ref, key));
- }
- }
- get(ref) {
- return isRef(ref) ? ref.value : ref;
- }
- isRef(ref) {
- return isRef(ref) || isReactive(ref);
- }
- };
- var stateEditor = new StateEditor();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var TIMELINE_LAYERS_STATE_STORAGE_ID = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
- function getTimelineLayersStateFromStorage() {
- if (!isBrowser || typeof localStorage === "undefined" || localStorage === null) {
- return {
- recordingState: false,
- mouseEventEnabled: false,
- keyboardEventEnabled: false,
- componentEventEnabled: false,
- performanceEventEnabled: false,
- selected: ""
- };
- }
- const state = localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID);
- return state ? JSON.parse(state) : {
- recordingState: false,
- mouseEventEnabled: false,
- keyboardEventEnabled: false,
- componentEventEnabled: false,
- performanceEventEnabled: false,
- selected: ""
- };
- }
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var _a22;
- var _b2;
- (_b2 = (_a22 = target).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null ? _b2 : _a22.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = [];
- var devtoolsTimelineLayers = new Proxy(target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
- get(target22, prop, receiver) {
- return Reflect.get(target22, prop, receiver);
- }
- });
- function addTimelineLayer(options, descriptor) {
- devtoolsState.timelineLayersState[descriptor.id] = false;
- devtoolsTimelineLayers.push({
- ...options,
- descriptorId: descriptor.id,
- appRecord: getAppRecord(descriptor.app)
- });
- }
- var _a3;
- var _b3;
- (_b3 = (_a3 = target).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null ? _b3 : _a3.__VUE_DEVTOOLS_KIT_INSPECTOR__ = [];
- var devtoolsInspector = new Proxy(target.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
- get(target22, prop, receiver) {
- return Reflect.get(target22, prop, receiver);
- }
- });
- var callInspectorUpdatedHook = debounce(() => {
- devtoolsContext.hooks.callHook("sendInspectorToClient", getActiveInspectors());
- });
- function addInspector(inspector, descriptor) {
- var _a25, _b25;
- devtoolsInspector.push({
- options: inspector,
- descriptor,
- treeFilterPlaceholder: (_a25 = inspector.treeFilterPlaceholder) != null ? _a25 : "Search tree...",
- stateFilterPlaceholder: (_b25 = inspector.stateFilterPlaceholder) != null ? _b25 : "Search state...",
- treeFilter: "",
- selectedNodeId: "",
- appRecord: getAppRecord(descriptor.app)
- });
- callInspectorUpdatedHook();
- }
- function getActiveInspectors() {
- return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== "components").map((inspector) => {
- var _a25;
- const descriptor = inspector.descriptor;
- const options = inspector.options;
- return {
- id: options.id,
- label: options.label,
- logo: descriptor.logo,
- icon: `custom-ic-baseline-${(_a25 = options == null ? void 0 : options.icon) == null ? void 0 : _a25.replace(/_/g, "-")}`,
- packageName: descriptor.packageName,
- homepage: descriptor.homepage,
- pluginId: descriptor.id
- };
- });
- }
- function getInspector(id, app) {
- return devtoolsInspector.find((inspector) => inspector.options.id === id && (app ? inspector.descriptor.app === app : true));
- }
- var DevToolsV6PluginAPIHookKeys = ((DevToolsV6PluginAPIHookKeys2) => {
- DevToolsV6PluginAPIHookKeys2["VISIT_COMPONENT_TREE"] = "visitComponentTree";
- DevToolsV6PluginAPIHookKeys2["INSPECT_COMPONENT"] = "inspectComponent";
- DevToolsV6PluginAPIHookKeys2["EDIT_COMPONENT_STATE"] = "editComponentState";
- DevToolsV6PluginAPIHookKeys2["GET_INSPECTOR_TREE"] = "getInspectorTree";
- DevToolsV6PluginAPIHookKeys2["GET_INSPECTOR_STATE"] = "getInspectorState";
- DevToolsV6PluginAPIHookKeys2["EDIT_INSPECTOR_STATE"] = "editInspectorState";
- DevToolsV6PluginAPIHookKeys2["INSPECT_TIMELINE_EVENT"] = "inspectTimelineEvent";
- DevToolsV6PluginAPIHookKeys2["TIMELINE_CLEARED"] = "timelineCleared";
- DevToolsV6PluginAPIHookKeys2["SET_PLUGIN_SETTINGS"] = "setPluginSettings";
- return DevToolsV6PluginAPIHookKeys2;
- })(DevToolsV6PluginAPIHookKeys || {});
- var DevToolsContextHookKeys = ((DevToolsContextHookKeys2) => {
- DevToolsContextHookKeys2["ADD_INSPECTOR"] = "addInspector";
- DevToolsContextHookKeys2["SEND_INSPECTOR_TREE"] = "sendInspectorTree";
- DevToolsContextHookKeys2["SEND_INSPECTOR_STATE"] = "sendInspectorState";
- DevToolsContextHookKeys2["CUSTOM_INSPECTOR_SELECT_NODE"] = "customInspectorSelectNode";
- DevToolsContextHookKeys2["TIMELINE_LAYER_ADDED"] = "timelineLayerAdded";
- DevToolsContextHookKeys2["TIMELINE_EVENT_ADDED"] = "timelineEventAdded";
- DevToolsContextHookKeys2["GET_COMPONENT_INSTANCES"] = "getComponentInstances";
- DevToolsContextHookKeys2["GET_COMPONENT_BOUNDS"] = "getComponentBounds";
- DevToolsContextHookKeys2["GET_COMPONENT_NAME"] = "getComponentName";
- DevToolsContextHookKeys2["COMPONENT_HIGHLIGHT"] = "componentHighlight";
- DevToolsContextHookKeys2["COMPONENT_UNHIGHLIGHT"] = "componentUnhighlight";
- return DevToolsContextHookKeys2;
- })(DevToolsContextHookKeys || {});
- var DevToolsMessagingHookKeys = ((DevToolsMessagingHookKeys2) => {
- DevToolsMessagingHookKeys2["SEND_INSPECTOR_TREE_TO_CLIENT"] = "sendInspectorTreeToClient";
- DevToolsMessagingHookKeys2["SEND_INSPECTOR_STATE_TO_CLIENT"] = "sendInspectorStateToClient";
- DevToolsMessagingHookKeys2["SEND_TIMELINE_EVENT_TO_CLIENT"] = "sendTimelineEventToClient";
- DevToolsMessagingHookKeys2["SEND_INSPECTOR_TO_CLIENT"] = "sendInspectorToClient";
- DevToolsMessagingHookKeys2["SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT"] = "sendActiveAppUpdatedToClient";
- DevToolsMessagingHookKeys2["DEVTOOLS_STATE_UPDATED"] = "devtoolsStateUpdated";
- DevToolsMessagingHookKeys2["DEVTOOLS_CONNECTED_UPDATED"] = "devtoolsConnectedUpdated";
- DevToolsMessagingHookKeys2["ROUTER_INFO_UPDATED"] = "routerInfoUpdated";
- return DevToolsMessagingHookKeys2;
- })(DevToolsMessagingHookKeys || {});
- function createDevToolsCtxHooks() {
- const hooks2 = createHooks();
- hooks2.hook("addInspector", ({ inspector, plugin }) => {
- addInspector(inspector, plugin.descriptor);
- });
- const debounceSendInspectorTree = debounce(async ({ inspectorId, plugin }) => {
- var _a25;
- if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
- return;
- const inspector = getInspector(inspectorId, plugin.descriptor.app);
- const _payload = {
- app: plugin.descriptor.app,
- inspectorId,
- filter: (inspector == null ? void 0 : inspector.treeFilter) || "",
- rootNodes: []
- };
- await new Promise((resolve) => {
- hooks2.callHookWith(
- async (callbacks) => {
- await Promise.all(callbacks.map((cb) => cb(_payload)));
- resolve();
- },
- "getInspectorTree"
- /* GET_INSPECTOR_TREE */
- );
- });
- hooks2.callHookWith(
- async (callbacks) => {
- await Promise.all(callbacks.map((cb) => cb({
- inspectorId,
- rootNodes: _payload.rootNodes
- })));
- },
- "sendInspectorTreeToClient"
- /* SEND_INSPECTOR_TREE_TO_CLIENT */
- );
- }, 120);
- hooks2.hook("sendInspectorTree", debounceSendInspectorTree);
- const debounceSendInspectorState = debounce(async ({ inspectorId, plugin }) => {
- var _a25;
- if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app) || devtoolsState.highPerfModeEnabled)
- return;
- const inspector = getInspector(inspectorId, plugin.descriptor.app);
- const _payload = {
- app: plugin.descriptor.app,
- inspectorId,
- nodeId: (inspector == null ? void 0 : inspector.selectedNodeId) || "",
- state: null
- };
- const ctx = {
- currentTab: `custom-inspector:${inspectorId}`
- };
- if (_payload.nodeId) {
- await new Promise((resolve) => {
- hooks2.callHookWith(
- async (callbacks) => {
- await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
- resolve();
- },
- "getInspectorState"
- /* GET_INSPECTOR_STATE */
- );
- });
- }
- hooks2.callHookWith(
- async (callbacks) => {
- await Promise.all(callbacks.map((cb) => cb({
- inspectorId,
- nodeId: _payload.nodeId,
- state: _payload.state
- })));
- },
- "sendInspectorStateToClient"
- /* SEND_INSPECTOR_STATE_TO_CLIENT */
- );
- }, 120);
- hooks2.hook("sendInspectorState", debounceSendInspectorState);
- hooks2.hook("customInspectorSelectNode", ({ inspectorId, nodeId, plugin }) => {
- const inspector = getInspector(inspectorId, plugin.descriptor.app);
- if (!inspector)
- return;
- inspector.selectedNodeId = nodeId;
- });
- hooks2.hook("timelineLayerAdded", ({ options, plugin }) => {
- addTimelineLayer(options, plugin.descriptor);
- });
- hooks2.hook("timelineEventAdded", ({ options, plugin }) => {
- var _a25;
- const internalLayerIds = ["performance", "component-event", "keyboard", "mouse"];
- if (devtoolsState.highPerfModeEnabled || !((_a25 = devtoolsState.timelineLayersState) == null ? void 0 : _a25[plugin.descriptor.id]) && !internalLayerIds.includes(options.layerId))
- return;
- hooks2.callHookWith(
- async (callbacks) => {
- await Promise.all(callbacks.map((cb) => cb(options)));
- },
- "sendTimelineEventToClient"
- /* SEND_TIMELINE_EVENT_TO_CLIENT */
- );
- });
- hooks2.hook("getComponentInstances", async ({ app }) => {
- const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
- if (!appRecord)
- return null;
- const appId = appRecord.id.toString();
- const instances = [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
- return instances;
- });
- hooks2.hook("getComponentBounds", async ({ instance }) => {
- const bounds = getComponentBoundingRect(instance);
- return bounds;
- });
- hooks2.hook("getComponentName", ({ instance }) => {
- const name = getInstanceName(instance);
- return name;
- });
- hooks2.hook("componentHighlight", ({ uid }) => {
- const instance = activeAppRecord.value.instanceMap.get(uid);
- if (instance) {
- highlight(instance);
- }
- });
- hooks2.hook("componentUnhighlight", () => {
- unhighlight();
- });
- return hooks2;
- }
- var _a4;
- var _b4;
- (_b4 = (_a4 = target).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null ? _b4 : _a4.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [];
- var _a5;
- var _b5;
- (_b5 = (_a5 = target).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null ? _b5 : _a5.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {};
- var _a6;
- var _b6;
- (_b6 = (_a6 = target).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null ? _b6 : _a6.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "";
- var _a7;
- var _b7;
- (_b7 = (_a7 = target).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null ? _b7 : _a7.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = [];
- var _a8;
- var _b8;
- (_b8 = (_a8 = target).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null ? _b8 : _a8.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = [];
- var STATE_KEY = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
- function initStateFactory() {
- return {
- connected: false,
- clientConnected: false,
- vitePluginDetected: true,
- appRecords: [],
- activeAppRecordId: "",
- tabs: [],
- commands: [],
- highPerfModeEnabled: true,
- devtoolsClientDetected: {},
- perfUniqueGroupId: 0,
- timelineLayersState: getTimelineLayersStateFromStorage()
- };
- }
- var _a9;
- var _b9;
- (_b9 = (_a9 = target)[STATE_KEY]) != null ? _b9 : _a9[STATE_KEY] = initStateFactory();
- var callStateUpdatedHook = debounce((state) => {
- devtoolsContext.hooks.callHook("devtoolsStateUpdated", { state });
- });
- var callConnectedUpdatedHook = debounce((state, oldState) => {
- devtoolsContext.hooks.callHook("devtoolsConnectedUpdated", { state, oldState });
- });
- var devtoolsAppRecords = new Proxy(target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
- get(_target, prop, receiver) {
- if (prop === "value")
- return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__;
- return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__[prop];
- }
- });
- var activeAppRecord = new Proxy(target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, {
- get(_target, prop, receiver) {
- if (prop === "value")
- return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__;
- else if (prop === "id")
- return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__;
- return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[prop];
- }
- });
- function updateAllStates() {
- callStateUpdatedHook({
- ...target[STATE_KEY],
- appRecords: devtoolsAppRecords.value,
- activeAppRecordId: activeAppRecord.id,
- tabs: target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
- commands: target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
- });
- }
- function setActiveAppRecord(app) {
- target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = app;
- updateAllStates();
- }
- function setActiveAppRecordId(id) {
- target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = id;
- updateAllStates();
- }
- var devtoolsState = new Proxy(target[STATE_KEY], {
- get(target22, property) {
- if (property === "appRecords") {
- return devtoolsAppRecords;
- } else if (property === "activeAppRecordId") {
- return activeAppRecord.id;
- } else if (property === "tabs") {
- return target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
- } else if (property === "commands") {
- return target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
- }
- return target[STATE_KEY][property];
- },
- deleteProperty(target22, property) {
- delete target22[property];
- return true;
- },
- set(target22, property, value) {
- const oldState = { ...target[STATE_KEY] };
- target22[property] = value;
- target[STATE_KEY][property] = value;
- return true;
- }
- });
- function onDevToolsConnected(fn) {
- return new Promise((resolve) => {
- if (devtoolsState.connected) {
- fn();
- resolve();
- }
- devtoolsContext.hooks.hook("devtoolsConnectedUpdated", ({ state }) => {
- if (state.connected) {
- fn();
- resolve();
- }
- });
- });
- }
- var resolveIcon = (icon) => {
- if (!icon)
- return;
- if (icon.startsWith("baseline-")) {
- return `custom-ic-${icon}`;
- }
- if (icon.startsWith("i-") || isUrlString(icon))
- return icon;
- return `custom-ic-baseline-${icon}`;
- };
- function addCustomTab(tab) {
- const tabs = target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
- if (tabs.some((t) => t.name === tab.name))
- return;
- tabs.push({
- ...tab,
- icon: resolveIcon(tab.icon)
- });
- updateAllStates();
- }
- function addCustomCommand(action) {
- const commands = target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
- if (commands.some((t) => t.id === action.id))
- return;
- commands.push({
- ...action,
- icon: resolveIcon(action.icon),
- children: action.children ? action.children.map((child) => ({
- ...child,
- icon: resolveIcon(child.icon)
- })) : void 0
- });
- updateAllStates();
- }
- function removeCustomCommand(actionId) {
- const commands = target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
- const index = commands.findIndex((t) => t.id === actionId);
- if (index === -1)
- return;
- commands.splice(index, 1);
- updateAllStates();
- }
- function openInEditor(options = {}) {
- var _a25, _b25, _c;
- const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
- if (file) {
- if (host === "chrome-extension") {
- const fileName = file.replace(/\\/g, "\\\\");
- const _baseUrl = (_b25 = (_a25 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a25.openInEditorHost) != null ? _b25 : "/";
- fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
- if (!response.ok) {
- const msg = `Opening component ${fileName} failed`;
- console.log(`%c${msg}`, "color:red");
- }
- });
- } else if (devtoolsState.vitePluginDetected) {
- const _baseUrl = (_c = target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;
- target.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
- }
- }
- }
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var _a10;
- var _b10;
- (_b10 = (_a10 = target).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null ? _b10 : _a10.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = [];
- var devtoolsPluginBuffer = new Proxy(target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
- get(target22, prop, receiver) {
- return Reflect.get(target22, prop, receiver);
- }
- });
- function _getSettings(settings) {
- const _settings = {};
- Object.keys(settings).forEach((key) => {
- _settings[key] = settings[key].defaultValue;
- });
- return _settings;
- }
- function getPluginLocalKey(pluginId) {
- return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
- }
- function getPluginSettingsOptions(pluginId) {
- var _a25, _b25, _c;
- const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => {
- var _a26;
- return item2[0].id === pluginId && !!((_a26 = item2[0]) == null ? void 0 : _a26.settings);
- })) == null ? void 0 : _a25[0]) != null ? _b25 : null;
- return (_c = item == null ? void 0 : item.settings) != null ? _c : null;
- }
- function getPluginSettings(pluginId, fallbackValue) {
- var _a25, _b25, _c;
- const localKey = getPluginLocalKey(pluginId);
- if (localKey) {
- const localSettings = localStorage.getItem(localKey);
- if (localSettings) {
- return JSON.parse(localSettings);
- }
- }
- if (pluginId) {
- const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => item2[0].id === pluginId)) == null ? void 0 : _a25[0]) != null ? _b25 : null;
- return _getSettings((_c = item == null ? void 0 : item.settings) != null ? _c : {});
- }
- return _getSettings(fallbackValue);
- }
- function initPluginSettings(pluginId, settings) {
- const localKey = getPluginLocalKey(pluginId);
- const localSettings = localStorage.getItem(localKey);
- if (!localSettings) {
- localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));
- }
- }
- function setPluginSettings(pluginId, key, value) {
- const localKey = getPluginLocalKey(pluginId);
- const localSettings = localStorage.getItem(localKey);
- const parsedLocalSettings = JSON.parse(localSettings || "{}");
- const updated = {
- ...parsedLocalSettings,
- [key]: value
- };
- localStorage.setItem(localKey, JSON.stringify(updated));
- devtoolsContext.hooks.callHookWith(
- (callbacks) => {
- callbacks.forEach((cb) => cb({
- pluginId,
- key,
- oldValue: parsedLocalSettings[key],
- newValue: value,
- settings: updated
- }));
- },
- "setPluginSettings"
- /* SET_PLUGIN_SETTINGS */
- );
- }
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var _a11;
- var _b11;
- var devtoolsHooks = (_b11 = (_a11 = target).__VUE_DEVTOOLS_HOOK) != null ? _b11 : _a11.__VUE_DEVTOOLS_HOOK = createHooks();
- var on = {
- vueAppInit(fn) {
- devtoolsHooks.hook("app:init", fn);
- },
- vueAppUnmount(fn) {
- devtoolsHooks.hook("app:unmount", fn);
- },
- vueAppConnected(fn) {
- devtoolsHooks.hook("app:connected", fn);
- },
- componentAdded(fn) {
- return devtoolsHooks.hook("component:added", fn);
- },
- componentEmit(fn) {
- return devtoolsHooks.hook("component:emit", fn);
- },
- componentUpdated(fn) {
- return devtoolsHooks.hook("component:updated", fn);
- },
- componentRemoved(fn) {
- return devtoolsHooks.hook("component:removed", fn);
- },
- setupDevtoolsPlugin(fn) {
- devtoolsHooks.hook("devtools-plugin:setup", fn);
- },
- perfStart(fn) {
- return devtoolsHooks.hook("perf:start", fn);
- },
- perfEnd(fn) {
- return devtoolsHooks.hook("perf:end", fn);
- }
- };
- var hook = {
- on,
- setupDevToolsPlugin(pluginDescriptor, setupFn) {
- return devtoolsHooks.callHook("devtools-plugin:setup", pluginDescriptor, setupFn);
- }
- };
- var DevToolsV6PluginAPI = class {
- constructor({ plugin, ctx }) {
- this.hooks = ctx.hooks;
- this.plugin = plugin;
- }
- get on() {
- return {
- // component inspector
- visitComponentTree: (handler) => {
- this.hooks.hook("visitComponentTree", handler);
- },
- inspectComponent: (handler) => {
- this.hooks.hook("inspectComponent", handler);
- },
- editComponentState: (handler) => {
- this.hooks.hook("editComponentState", handler);
- },
- // custom inspector
- getInspectorTree: (handler) => {
- this.hooks.hook("getInspectorTree", handler);
- },
- getInspectorState: (handler) => {
- this.hooks.hook("getInspectorState", handler);
- },
- editInspectorState: (handler) => {
- this.hooks.hook("editInspectorState", handler);
- },
- // timeline
- inspectTimelineEvent: (handler) => {
- this.hooks.hook("inspectTimelineEvent", handler);
- },
- timelineCleared: (handler) => {
- this.hooks.hook("timelineCleared", handler);
- },
- // settings
- setPluginSettings: (handler) => {
- this.hooks.hook("setPluginSettings", handler);
- }
- };
- }
- // component inspector
- notifyComponentUpdate(instance) {
- var _a25;
- if (devtoolsState.highPerfModeEnabled) {
- return;
- }
- const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
- if (inspector == null ? void 0 : inspector.id) {
- if (instance) {
- const args = [
- instance.appContext.app,
- instance.uid,
- (_a25 = instance.parent) == null ? void 0 : _a25.uid,
- instance
- ];
- devtoolsHooks.callHook("component:updated", ...args);
- } else {
- devtoolsHooks.callHook(
- "component:updated"
- /* COMPONENT_UPDATED */
- );
- }
- this.hooks.callHook("sendInspectorState", { inspectorId: inspector.id, plugin: this.plugin });
- }
- }
- // custom inspector
- addInspector(options) {
- this.hooks.callHook("addInspector", { inspector: options, plugin: this.plugin });
- if (this.plugin.descriptor.settings) {
- initPluginSettings(options.id, this.plugin.descriptor.settings);
- }
- }
- sendInspectorTree(inspectorId) {
- if (devtoolsState.highPerfModeEnabled) {
- return;
- }
- this.hooks.callHook("sendInspectorTree", { inspectorId, plugin: this.plugin });
- }
- sendInspectorState(inspectorId) {
- if (devtoolsState.highPerfModeEnabled) {
- return;
- }
- this.hooks.callHook("sendInspectorState", { inspectorId, plugin: this.plugin });
- }
- selectInspectorNode(inspectorId, nodeId) {
- this.hooks.callHook("customInspectorSelectNode", { inspectorId, nodeId, plugin: this.plugin });
- }
- visitComponentTree(payload) {
- return this.hooks.callHook("visitComponentTree", payload);
- }
- // timeline
- now() {
- if (devtoolsState.highPerfModeEnabled) {
- return 0;
- }
- return Date.now();
- }
- addTimelineLayer(options) {
- this.hooks.callHook("timelineLayerAdded", { options, plugin: this.plugin });
- }
- addTimelineEvent(options) {
- if (devtoolsState.highPerfModeEnabled) {
- return;
- }
- this.hooks.callHook("timelineEventAdded", { options, plugin: this.plugin });
- }
- // settings
- getSettings(pluginId) {
- return getPluginSettings(pluginId != null ? pluginId : this.plugin.descriptor.id, this.plugin.descriptor.settings);
- }
- // utilities
- getComponentInstances(app) {
- return this.hooks.callHook("getComponentInstances", { app });
- }
- getComponentBounds(instance) {
- return this.hooks.callHook("getComponentBounds", { instance });
- }
- getComponentName(instance) {
- return this.hooks.callHook("getComponentName", { instance });
- }
- highlightElement(instance) {
- const uid = instance.__VUE_DEVTOOLS_NEXT_UID__;
- return this.hooks.callHook("componentHighlight", { uid });
- }
- unhighlightElement() {
- return this.hooks.callHook(
- "componentUnhighlight"
- /* COMPONENT_UNHIGHLIGHT */
- );
- }
- };
- var DevToolsPluginAPI = DevToolsV6PluginAPI;
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var UNDEFINED = "__vue_devtool_undefined__";
- var INFINITY = "__vue_devtool_infinity__";
- var NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
- var NAN = "__vue_devtool_nan__";
- init_esm_shims2();
- init_esm_shims2();
- var tokenMap = {
- [UNDEFINED]: "undefined",
- [NAN]: "NaN",
- [INFINITY]: "Infinity",
- [NEGATIVE_INFINITY]: "-Infinity"
- };
- var reversedTokenMap = Object.entries(tokenMap).reduce((acc, [key, value]) => {
- acc[value] = key;
- return acc;
- }, {});
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var _a12;
- var _b12;
- (_b12 = (_a12 = target).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null ? _b12 : _a12.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set();
- function setupDevToolsPlugin(pluginDescriptor, setupFn) {
- return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
- }
- function callDevToolsPluginSetupFn(plugin, app) {
- const [pluginDescriptor, setupFn] = plugin;
- if (pluginDescriptor.app !== app)
- return;
- const api = new DevToolsPluginAPI({
- plugin: {
- setupFn,
- descriptor: pluginDescriptor
- },
- ctx: devtoolsContext
- });
- if (pluginDescriptor.packageName === "vuex") {
- api.on.editInspectorState((payload) => {
- api.sendInspectorState(payload.inspectorId);
- });
- }
- setupFn(api);
- }
- function registerDevToolsPlugin(app) {
- if (target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app) || devtoolsState.highPerfModeEnabled)
- return;
- target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
- devtoolsPluginBuffer.forEach((plugin) => {
- callDevToolsPluginSetupFn(plugin, app);
- });
- }
- init_esm_shims2();
- init_esm_shims2();
- var ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
- var ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
- var _a13;
- var _b13;
- (_b13 = (_a13 = target)[ROUTER_INFO_KEY]) != null ? _b13 : _a13[ROUTER_INFO_KEY] = {
- currentRoute: null,
- routes: []
- };
- var _a14;
- var _b14;
- (_b14 = (_a14 = target)[ROUTER_KEY]) != null ? _b14 : _a14[ROUTER_KEY] = {};
- var devtoolsRouterInfo = new Proxy(target[ROUTER_INFO_KEY], {
- get(target22, property) {
- return target[ROUTER_INFO_KEY][property];
- }
- });
- var devtoolsRouter = new Proxy(target[ROUTER_KEY], {
- get(target22, property) {
- if (property === "value") {
- return target[ROUTER_KEY];
- }
- }
- });
- function getRoutes(router) {
- const routesMap = /* @__PURE__ */ new Map();
- return ((router == null ? void 0 : router.getRoutes()) || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
- }
- function filterRoutes(routes) {
- return routes.map((item) => {
- let { path, name, children, meta } = item;
- if (children == null ? void 0 : children.length)
- children = filterRoutes(children);
- return {
- path,
- name,
- children,
- meta
- };
- });
- }
- function filterCurrentRoute(route) {
- if (route) {
- const { fullPath, hash, href, path, name, matched, params, query } = route;
- return {
- fullPath,
- hash,
- href,
- path,
- name,
- params,
- query,
- matched: filterRoutes(matched)
- };
- }
- return route;
- }
- function normalizeRouterInfo(appRecord, activeAppRecord2) {
- function init() {
- var _a25;
- const router = (_a25 = appRecord.app) == null ? void 0 : _a25.config.globalProperties.$router;
- const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);
- const routes = filterRoutes(getRoutes(router));
- const c = console.warn;
- console.warn = () => {
- };
- target[ROUTER_INFO_KEY] = {
- currentRoute: currentRoute ? deepClone(currentRoute) : {},
- routes: deepClone(routes)
- };
- target[ROUTER_KEY] = router;
- console.warn = c;
- }
- init();
- hook.on.componentUpdated(debounce(() => {
- var _a25;
- if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
- return;
- init();
- if (devtoolsState.highPerfModeEnabled)
- return;
- devtoolsContext.hooks.callHook("routerInfoUpdated", { state: target[ROUTER_INFO_KEY] });
- }, 200));
- }
- function createDevToolsApi(hooks2) {
- return {
- // get inspector tree
- async getInspectorTree(payload) {
- const _payload = {
- ...payload,
- app: activeAppRecord.value.app,
- rootNodes: []
- };
- await new Promise((resolve) => {
- hooks2.callHookWith(
- async (callbacks) => {
- await Promise.all(callbacks.map((cb) => cb(_payload)));
- resolve();
- },
- "getInspectorTree"
- /* GET_INSPECTOR_TREE */
- );
- });
- return _payload.rootNodes;
- },
- // get inspector state
- async getInspectorState(payload) {
- const _payload = {
- ...payload,
- app: activeAppRecord.value.app,
- state: null
- };
- const ctx = {
- currentTab: `custom-inspector:${payload.inspectorId}`
- };
- await new Promise((resolve) => {
- hooks2.callHookWith(
- async (callbacks) => {
- await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
- resolve();
- },
- "getInspectorState"
- /* GET_INSPECTOR_STATE */
- );
- });
- return _payload.state;
- },
- // edit inspector state
- editInspectorState(payload) {
- const stateEditor2 = new StateEditor();
- const _payload = {
- ...payload,
- app: activeAppRecord.value.app,
- set: (obj, path = payload.path, value = payload.state.value, cb) => {
- stateEditor2.set(obj, path, value, cb || stateEditor2.createDefaultSetCallback(payload.state));
- }
- };
- hooks2.callHookWith(
- (callbacks) => {
- callbacks.forEach((cb) => cb(_payload));
- },
- "editInspectorState"
- /* EDIT_INSPECTOR_STATE */
- );
- },
- // send inspector state
- sendInspectorState(inspectorId) {
- const inspector = getInspector(inspectorId);
- hooks2.callHook("sendInspectorState", { inspectorId, plugin: {
- descriptor: inspector.descriptor,
- setupFn: () => ({})
- } });
- },
- // inspect component inspector
- inspectComponentInspector() {
- return inspectComponentHighLighter();
- },
- // cancel inspect component inspector
- cancelInspectComponentInspector() {
- return cancelInspectComponentHighLighter();
- },
- // get component render code
- getComponentRenderCode(id) {
- const instance = getComponentInstance(activeAppRecord.value, id);
- if (instance)
- return !((instance == null ? void 0 : instance.type) instanceof Function) ? instance.render.toString() : instance.type.toString();
- },
- // scroll to component
- scrollToComponent(id) {
- return scrollToComponent({ id });
- },
- // open in editor
- openInEditor,
- // get vue inspector
- getVueInspector: getComponentInspector,
- // toggle app
- toggleApp(id) {
- const appRecord = devtoolsAppRecords.value.find((record) => record.id === id);
- if (appRecord) {
- setActiveAppRecordId(id);
- setActiveAppRecord(appRecord);
- normalizeRouterInfo(appRecord, activeAppRecord);
- callInspectorUpdatedHook();
- registerDevToolsPlugin(appRecord.app);
- }
- },
- // inspect dom
- inspectDOM(instanceId) {
- const instance = getComponentInstance(activeAppRecord.value, instanceId);
- if (instance) {
- const [el] = getRootElementsFromComponentInstance(instance);
- if (el) {
- target.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
- }
- }
- },
- updatePluginSettings(pluginId, key, value) {
- setPluginSettings(pluginId, key, value);
- },
- getPluginSettings(pluginId) {
- return {
- options: getPluginSettingsOptions(pluginId),
- values: getPluginSettings(pluginId)
- };
- }
- };
- }
- init_esm_shims2();
- var _a15;
- var _b15;
- (_b15 = (_a15 = target).__VUE_DEVTOOLS_ENV__) != null ? _b15 : _a15.__VUE_DEVTOOLS_ENV__ = {
- vitePluginDetected: false
- };
- var hooks = createDevToolsCtxHooks();
- var _a16;
- var _b16;
- (_b16 = (_a16 = target).__VUE_DEVTOOLS_KIT_CONTEXT__) != null ? _b16 : _a16.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
- hooks,
- get state() {
- return {
- ...devtoolsState,
- activeAppRecordId: activeAppRecord.id,
- activeAppRecord: activeAppRecord.value,
- appRecords: devtoolsAppRecords.value
- };
- },
- api: createDevToolsApi(hooks)
- };
- var devtoolsContext = target.__VUE_DEVTOOLS_KIT_CONTEXT__;
- init_esm_shims2();
- var import_speakingurl = __toESM2(require_speakingurl2(), 1);
- var _a17;
- var _b17;
- var appRecordInfo = (_b17 = (_a17 = target).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__) != null ? _b17 : _a17.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ = {
- id: 0,
- appIds: /* @__PURE__ */ new Set()
- };
- function onDevToolsClientConnected(fn) {
- return new Promise((resolve) => {
- if (devtoolsState.connected && devtoolsState.clientConnected) {
- fn();
- resolve();
- return;
- }
- devtoolsContext.hooks.hook("devtoolsConnectedUpdated", ({ state }) => {
- if (state.connected && state.clientConnected) {
- fn();
- resolve();
- }
- });
- });
- }
- init_esm_shims2();
- function toggleHighPerfMode(state) {
- devtoolsState.highPerfModeEnabled = state != null ? state : !devtoolsState.highPerfModeEnabled;
- if (!state && activeAppRecord.value) {
- registerDevToolsPlugin(activeAppRecord.value.app);
- }
- }
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- function updateDevToolsClientDetected(params) {
- devtoolsState.devtoolsClientDetected = {
- ...devtoolsState.devtoolsClientDetected,
- ...params
- };
- const devtoolsClientVisible = Object.values(devtoolsState.devtoolsClientDetected).some(Boolean);
- toggleHighPerfMode(!devtoolsClientVisible);
- }
- var _a18;
- var _b18;
- (_b18 = (_a18 = target).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null ? _b18 : _a18.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = updateDevToolsClientDetected;
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var DoubleIndexedKV = class {
- constructor() {
- this.keyToValue = /* @__PURE__ */ new Map();
- this.valueToKey = /* @__PURE__ */ new Map();
- }
- set(key, value) {
- this.keyToValue.set(key, value);
- this.valueToKey.set(value, key);
- }
- getByKey(key) {
- return this.keyToValue.get(key);
- }
- getByValue(value) {
- return this.valueToKey.get(value);
- }
- clear() {
- this.keyToValue.clear();
- this.valueToKey.clear();
- }
- };
- var Registry = class {
- constructor(generateIdentifier) {
- this.generateIdentifier = generateIdentifier;
- this.kv = new DoubleIndexedKV();
- }
- register(value, identifier) {
- if (this.kv.getByValue(value)) {
- return;
- }
- if (!identifier) {
- identifier = this.generateIdentifier(value);
- }
- this.kv.set(identifier, value);
- }
- clear() {
- this.kv.clear();
- }
- getIdentifier(value) {
- return this.kv.getByValue(value);
- }
- getValue(identifier) {
- return this.kv.getByKey(identifier);
- }
- };
- var ClassRegistry = class extends Registry {
- constructor() {
- super((c) => c.name);
- this.classToAllowedProps = /* @__PURE__ */ new Map();
- }
- register(value, options) {
- if (typeof options === "object") {
- if (options.allowProps) {
- this.classToAllowedProps.set(value, options.allowProps);
- }
- super.register(value, options.identifier);
- } else {
- super.register(value, options);
- }
- }
- getAllowedProps(value) {
- return this.classToAllowedProps.get(value);
- }
- };
- init_esm_shims2();
- init_esm_shims2();
- function valuesOfObj(record) {
- if ("values" in Object) {
- return Object.values(record);
- }
- const values = [];
- for (const key in record) {
- if (record.hasOwnProperty(key)) {
- values.push(record[key]);
- }
- }
- return values;
- }
- function find(record, predicate) {
- const values = valuesOfObj(record);
- if ("find" in values) {
- return values.find(predicate);
- }
- const valuesNotNever = values;
- for (let i = 0; i < valuesNotNever.length; i++) {
- const value = valuesNotNever[i];
- if (predicate(value)) {
- return value;
- }
- }
- return void 0;
- }
- function forEach(record, run) {
- Object.entries(record).forEach(([key, value]) => run(value, key));
- }
- function includes(arr, value) {
- return arr.indexOf(value) !== -1;
- }
- function findArr(record, predicate) {
- for (let i = 0; i < record.length; i++) {
- const value = record[i];
- if (predicate(value)) {
- return value;
- }
- }
- return void 0;
- }
- var CustomTransformerRegistry = class {
- constructor() {
- this.transfomers = {};
- }
- register(transformer) {
- this.transfomers[transformer.name] = transformer;
- }
- findApplicable(v) {
- return find(this.transfomers, (transformer) => transformer.isApplicable(v));
- }
- findByName(name) {
- return this.transfomers[name];
- }
- };
- init_esm_shims2();
- init_esm_shims2();
- var getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
- var isUndefined = (payload) => typeof payload === "undefined";
- var isNull = (payload) => payload === null;
- var isPlainObject2 = (payload) => {
- if (typeof payload !== "object" || payload === null)
- return false;
- if (payload === Object.prototype)
- return false;
- if (Object.getPrototypeOf(payload) === null)
- return true;
- return Object.getPrototypeOf(payload) === Object.prototype;
- };
- var isEmptyObject = (payload) => isPlainObject2(payload) && Object.keys(payload).length === 0;
- var isArray = (payload) => Array.isArray(payload);
- var isString = (payload) => typeof payload === "string";
- var isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
- var isBoolean = (payload) => typeof payload === "boolean";
- var isRegExp = (payload) => payload instanceof RegExp;
- var isMap = (payload) => payload instanceof Map;
- var isSet = (payload) => payload instanceof Set;
- var isSymbol = (payload) => getType(payload) === "Symbol";
- var isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
- var isError = (payload) => payload instanceof Error;
- var isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
- var isPrimitive2 = (payload) => isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
- var isBigint = (payload) => typeof payload === "bigint";
- var isInfinite = (payload) => payload === Infinity || payload === -Infinity;
- var isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
- var isURL = (payload) => payload instanceof URL;
- init_esm_shims2();
- var escapeKey = (key) => key.replace(/\./g, "\\.");
- var stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
- var parsePath = (string) => {
- const result = [];
- let segment = "";
- for (let i = 0; i < string.length; i++) {
- let char = string.charAt(i);
- const isEscapedDot = char === "\\" && string.charAt(i + 1) === ".";
- if (isEscapedDot) {
- segment += ".";
- i++;
- continue;
- }
- const isEndOfSegment = char === ".";
- if (isEndOfSegment) {
- result.push(segment);
- segment = "";
- continue;
- }
- segment += char;
- }
- const lastSegment = segment;
- result.push(lastSegment);
- return result;
- };
- init_esm_shims2();
- function simpleTransformation(isApplicable, annotation, transform, untransform) {
- return {
- isApplicable,
- annotation,
- transform,
- untransform
- };
- }
- var simpleRules = [
- simpleTransformation(isUndefined, "undefined", () => null, () => void 0),
- simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
- if (typeof BigInt !== "undefined") {
- return BigInt(v);
- }
- console.error("Please add a BigInt polyfill.");
- return v;
- }),
- simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
- simpleTransformation(isError, "Error", (v, superJson) => {
- const baseError = {
- name: v.name,
- message: v.message
- };
- superJson.allowedErrorProps.forEach((prop) => {
- baseError[prop] = v[prop];
- });
- return baseError;
- }, (v, superJson) => {
- const e = new Error(v.message);
- e.name = v.name;
- e.stack = v.stack;
- superJson.allowedErrorProps.forEach((prop) => {
- e[prop] = v[prop];
- });
- return e;
- }),
- simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
- const body = regex.slice(1, regex.lastIndexOf("/"));
- const flags = regex.slice(regex.lastIndexOf("/") + 1);
- return new RegExp(body, flags);
- }),
- simpleTransformation(
- isSet,
- "set",
- // (sets only exist in es6+)
- // eslint-disable-next-line es5/no-es6-methods
- (v) => [...v.values()],
- (v) => new Set(v)
- ),
- simpleTransformation(isMap, "map", (v) => [...v.entries()], (v) => new Map(v)),
- simpleTransformation((v) => isNaNValue(v) || isInfinite(v), "number", (v) => {
- if (isNaNValue(v)) {
- return "NaN";
- }
- if (v > 0) {
- return "Infinity";
- } else {
- return "-Infinity";
- }
- }, Number),
- simpleTransformation((v) => v === 0 && 1 / v === -Infinity, "number", () => {
- return "-0";
- }, Number),
- simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
- ];
- function compositeTransformation(isApplicable, annotation, transform, untransform) {
- return {
- isApplicable,
- annotation,
- transform,
- untransform
- };
- }
- var symbolRule = compositeTransformation((s, superJson) => {
- if (isSymbol(s)) {
- const isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
- return isRegistered;
- }
- return false;
- }, (s, superJson) => {
- const identifier = superJson.symbolRegistry.getIdentifier(s);
- return ["symbol", identifier];
- }, (v) => v.description, (_, a, superJson) => {
- const value = superJson.symbolRegistry.getValue(a[1]);
- if (!value) {
- throw new Error("Trying to deserialize unknown symbol");
- }
- return value;
- });
- var constructorToName = [
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- Uint8ClampedArray
- ].reduce((obj, ctor) => {
- obj[ctor.name] = ctor;
- return obj;
- }, {});
- var typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
- const ctor = constructorToName[a[1]];
- if (!ctor) {
- throw new Error("Trying to deserialize unknown typed array");
- }
- return new ctor(v);
- });
- function isInstanceOfRegisteredClass(potentialClass, superJson) {
- if (potentialClass == null ? void 0 : potentialClass.constructor) {
- const isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
- return isRegistered;
- }
- return false;
- }
- var classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {
- const identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
- return ["class", identifier];
- }, (clazz, superJson) => {
- const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
- if (!allowedProps) {
- return { ...clazz };
- }
- const result = {};
- allowedProps.forEach((prop) => {
- result[prop] = clazz[prop];
- });
- return result;
- }, (v, a, superJson) => {
- const clazz = superJson.classRegistry.getValue(a[1]);
- if (!clazz) {
- throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
- }
- return Object.assign(Object.create(clazz.prototype), v);
- });
- var customRule = compositeTransformation((value, superJson) => {
- return !!superJson.customTransformerRegistry.findApplicable(value);
- }, (value, superJson) => {
- const transformer = superJson.customTransformerRegistry.findApplicable(value);
- return ["custom", transformer.name];
- }, (value, superJson) => {
- const transformer = superJson.customTransformerRegistry.findApplicable(value);
- return transformer.serialize(value);
- }, (v, a, superJson) => {
- const transformer = superJson.customTransformerRegistry.findByName(a[1]);
- if (!transformer) {
- throw new Error("Trying to deserialize unknown custom value");
- }
- return transformer.deserialize(v);
- });
- var compositeRules = [classRule, symbolRule, customRule, typedArrayRule];
- var transformValue = (value, superJson) => {
- const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));
- if (applicableCompositeRule) {
- return {
- value: applicableCompositeRule.transform(value, superJson),
- type: applicableCompositeRule.annotation(value, superJson)
- };
- }
- const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));
- if (applicableSimpleRule) {
- return {
- value: applicableSimpleRule.transform(value, superJson),
- type: applicableSimpleRule.annotation
- };
- }
- return void 0;
- };
- var simpleRulesByAnnotation = {};
- simpleRules.forEach((rule) => {
- simpleRulesByAnnotation[rule.annotation] = rule;
- });
- var untransformValue = (json, type, superJson) => {
- if (isArray(type)) {
- switch (type[0]) {
- case "symbol":
- return symbolRule.untransform(json, type, superJson);
- case "class":
- return classRule.untransform(json, type, superJson);
- case "custom":
- return customRule.untransform(json, type, superJson);
- case "typed-array":
- return typedArrayRule.untransform(json, type, superJson);
- default:
- throw new Error("Unknown transformation: " + type);
- }
- } else {
- const transformation = simpleRulesByAnnotation[type];
- if (!transformation) {
- throw new Error("Unknown transformation: " + type);
- }
- return transformation.untransform(json, superJson);
- }
- };
- init_esm_shims2();
- var getNthKey = (value, n) => {
- const keys = value.keys();
- while (n > 0) {
- keys.next();
- n--;
- }
- return keys.next().value;
- };
- function validatePath(path) {
- if (includes(path, "__proto__")) {
- throw new Error("__proto__ is not allowed as a property");
- }
- if (includes(path, "prototype")) {
- throw new Error("prototype is not allowed as a property");
- }
- if (includes(path, "constructor")) {
- throw new Error("constructor is not allowed as a property");
- }
- }
- var getDeep = (object, path) => {
- validatePath(path);
- for (let i = 0; i < path.length; i++) {
- const key = path[i];
- if (isSet(object)) {
- object = getNthKey(object, +key);
- } else if (isMap(object)) {
- const row = +key;
- const type = +path[++i] === 0 ? "key" : "value";
- const keyOfRow = getNthKey(object, row);
- switch (type) {
- case "key":
- object = keyOfRow;
- break;
- case "value":
- object = object.get(keyOfRow);
- break;
- }
- } else {
- object = object[key];
- }
- }
- return object;
- };
- var setDeep = (object, path, mapper) => {
- validatePath(path);
- if (path.length === 0) {
- return mapper(object);
- }
- let parent = object;
- for (let i = 0; i < path.length - 1; i++) {
- const key = path[i];
- if (isArray(parent)) {
- const index = +key;
- parent = parent[index];
- } else if (isPlainObject2(parent)) {
- parent = parent[key];
- } else if (isSet(parent)) {
- const row = +key;
- parent = getNthKey(parent, row);
- } else if (isMap(parent)) {
- const isEnd = i === path.length - 2;
- if (isEnd) {
- break;
- }
- const row = +key;
- const type = +path[++i] === 0 ? "key" : "value";
- const keyOfRow = getNthKey(parent, row);
- switch (type) {
- case "key":
- parent = keyOfRow;
- break;
- case "value":
- parent = parent.get(keyOfRow);
- break;
- }
- }
- }
- const lastKey = path[path.length - 1];
- if (isArray(parent)) {
- parent[+lastKey] = mapper(parent[+lastKey]);
- } else if (isPlainObject2(parent)) {
- parent[lastKey] = mapper(parent[lastKey]);
- }
- if (isSet(parent)) {
- const oldValue = getNthKey(parent, +lastKey);
- const newValue = mapper(oldValue);
- if (oldValue !== newValue) {
- parent.delete(oldValue);
- parent.add(newValue);
- }
- }
- if (isMap(parent)) {
- const row = +path[path.length - 2];
- const keyToRow = getNthKey(parent, row);
- const type = +lastKey === 0 ? "key" : "value";
- switch (type) {
- case "key": {
- const newKey = mapper(keyToRow);
- parent.set(newKey, parent.get(keyToRow));
- if (newKey !== keyToRow) {
- parent.delete(keyToRow);
- }
- break;
- }
- case "value": {
- parent.set(keyToRow, mapper(parent.get(keyToRow)));
- break;
- }
- }
- }
- return object;
- };
- function traverse(tree, walker2, origin = []) {
- if (!tree) {
- return;
- }
- if (!isArray(tree)) {
- forEach(tree, (subtree, key) => traverse(subtree, walker2, [...origin, ...parsePath(key)]));
- return;
- }
- const [nodeValue, children] = tree;
- if (children) {
- forEach(children, (child, key) => {
- traverse(child, walker2, [...origin, ...parsePath(key)]);
- });
- }
- walker2(nodeValue, origin);
- }
- function applyValueAnnotations(plain, annotations, superJson) {
- traverse(annotations, (type, path) => {
- plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));
- });
- return plain;
- }
- function applyReferentialEqualityAnnotations(plain, annotations) {
- function apply(identicalPaths, path) {
- const object = getDeep(plain, parsePath(path));
- identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
- plain = setDeep(plain, identicalObjectPath, () => object);
- });
- }
- if (isArray(annotations)) {
- const [root, other] = annotations;
- root.forEach((identicalPath) => {
- plain = setDeep(plain, parsePath(identicalPath), () => plain);
- });
- if (other) {
- forEach(other, apply);
- }
- } else {
- forEach(annotations, apply);
- }
- return plain;
- }
- var isDeep = (object, superJson) => isPlainObject2(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
- function addIdentity(object, path, identities) {
- const existingSet = identities.get(object);
- if (existingSet) {
- existingSet.push(path);
- } else {
- identities.set(object, [path]);
- }
- }
- function generateReferentialEqualityAnnotations(identitites, dedupe) {
- const result = {};
- let rootEqualityPaths = void 0;
- identitites.forEach((paths) => {
- if (paths.length <= 1) {
- return;
- }
- if (!dedupe) {
- paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);
- }
- const [representativePath, ...identicalPaths] = paths;
- if (representativePath.length === 0) {
- rootEqualityPaths = identicalPaths.map(stringifyPath);
- } else {
- result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
- }
- });
- if (rootEqualityPaths) {
- if (isEmptyObject(result)) {
- return [rootEqualityPaths];
- } else {
- return [rootEqualityPaths, result];
- }
- } else {
- return isEmptyObject(result) ? void 0 : result;
- }
- }
- var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
- var _a25;
- const primitive = isPrimitive2(object);
- if (!primitive) {
- addIdentity(object, path, identities);
- const seen = seenObjects.get(object);
- if (seen) {
- return dedupe ? {
- transformedValue: null
- } : seen;
- }
- }
- if (!isDeep(object, superJson)) {
- const transformed2 = transformValue(object, superJson);
- const result2 = transformed2 ? {
- transformedValue: transformed2.value,
- annotations: [transformed2.type]
- } : {
- transformedValue: object
- };
- if (!primitive) {
- seenObjects.set(object, result2);
- }
- return result2;
- }
- if (includes(objectsInThisPath, object)) {
- return {
- transformedValue: null
- };
- }
- const transformationResult = transformValue(object, superJson);
- const transformed = (_a25 = transformationResult == null ? void 0 : transformationResult.value) != null ? _a25 : object;
- const transformedValue = isArray(transformed) ? [] : {};
- const innerAnnotations = {};
- forEach(transformed, (value, index) => {
- if (index === "__proto__" || index === "constructor" || index === "prototype") {
- throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
- }
- const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
- transformedValue[index] = recursiveResult.transformedValue;
- if (isArray(recursiveResult.annotations)) {
- innerAnnotations[index] = recursiveResult.annotations;
- } else if (isPlainObject2(recursiveResult.annotations)) {
- forEach(recursiveResult.annotations, (tree, key) => {
- innerAnnotations[escapeKey(index) + "." + key] = tree;
- });
- }
- });
- const result = isEmptyObject(innerAnnotations) ? {
- transformedValue,
- annotations: !!transformationResult ? [transformationResult.type] : void 0
- } : {
- transformedValue,
- annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
- };
- if (!primitive) {
- seenObjects.set(object, result);
- }
- return result;
- };
- init_esm_shims2();
- init_esm_shims2();
- function getType2(payload) {
- return Object.prototype.toString.call(payload).slice(8, -1);
- }
- function isArray2(payload) {
- return getType2(payload) === "Array";
- }
- function isPlainObject3(payload) {
- if (getType2(payload) !== "Object")
- return false;
- const prototype = Object.getPrototypeOf(payload);
- return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
- }
- function isNull2(payload) {
- return getType2(payload) === "Null";
- }
- function isOneOf(a, b, c, d, e) {
- return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
- }
- function isUndefined2(payload) {
- return getType2(payload) === "Undefined";
- }
- var isNullOrUndefined = isOneOf(isNull2, isUndefined2);
- function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
- const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
- if (propType === "enumerable")
- carry[key] = newVal;
- if (includeNonenumerable && propType === "nonenumerable") {
- Object.defineProperty(carry, key, {
- value: newVal,
- enumerable: false,
- writable: true,
- configurable: true
- });
- }
- }
- function copy(target22, options = {}) {
- if (isArray2(target22)) {
- return target22.map((item) => copy(item, options));
- }
- if (!isPlainObject3(target22)) {
- return target22;
- }
- const props = Object.getOwnPropertyNames(target22);
- const symbols = Object.getOwnPropertySymbols(target22);
- return [...props, ...symbols].reduce((carry, key) => {
- if (isArray2(options.props) && !options.props.includes(key)) {
- return carry;
- }
- const val = target22[key];
- const newVal = copy(val, options);
- assignProp(carry, key, newVal, target22, options.nonenumerable);
- return carry;
- }, {});
- }
- var SuperJSON = class {
- /**
- * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
- */
- constructor({ dedupe = false } = {}) {
- this.classRegistry = new ClassRegistry();
- this.symbolRegistry = new Registry((s) => {
- var _a25;
- return (_a25 = s.description) != null ? _a25 : "";
- });
- this.customTransformerRegistry = new CustomTransformerRegistry();
- this.allowedErrorProps = [];
- this.dedupe = dedupe;
- }
- serialize(object) {
- const identities = /* @__PURE__ */ new Map();
- const output = walker(object, identities, this, this.dedupe);
- const res = {
- json: output.transformedValue
- };
- if (output.annotations) {
- res.meta = {
- ...res.meta,
- values: output.annotations
- };
- }
- const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
- if (equalityAnnotations) {
- res.meta = {
- ...res.meta,
- referentialEqualities: equalityAnnotations
- };
- }
- return res;
- }
- deserialize(payload) {
- const { json, meta } = payload;
- let result = copy(json);
- if (meta == null ? void 0 : meta.values) {
- result = applyValueAnnotations(result, meta.values, this);
- }
- if (meta == null ? void 0 : meta.referentialEqualities) {
- result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
- }
- return result;
- }
- stringify(object) {
- return JSON.stringify(this.serialize(object));
- }
- parse(string) {
- return this.deserialize(JSON.parse(string));
- }
- registerClass(v, options) {
- this.classRegistry.register(v, options);
- }
- registerSymbol(v, identifier) {
- this.symbolRegistry.register(v, identifier);
- }
- registerCustom(transformer, name) {
- this.customTransformerRegistry.register({
- name,
- ...transformer
- });
- }
- allowErrorProps(...props) {
- this.allowedErrorProps.push(...props);
- }
- };
- SuperJSON.defaultInstance = new SuperJSON();
- SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
- SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
- SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
- SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
- SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
- SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
- SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
- SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
- var serialize = SuperJSON.serialize;
- var deserialize = SuperJSON.deserialize;
- var stringify = SuperJSON.stringify;
- var parse = SuperJSON.parse;
- var registerClass = SuperJSON.registerClass;
- var registerCustom = SuperJSON.registerCustom;
- var registerSymbol = SuperJSON.registerSymbol;
- var allowErrorProps = SuperJSON.allowErrorProps;
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var _a19;
- var _b19;
- (_b19 = (_a19 = target).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__) != null ? _b19 : _a19.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ = [];
- var _a20;
- var _b20;
- (_b20 = (_a20 = target).__VUE_DEVTOOLS_KIT_RPC_CLIENT__) != null ? _b20 : _a20.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ = null;
- var _a21;
- var _b21;
- (_b21 = (_a21 = target).__VUE_DEVTOOLS_KIT_RPC_SERVER__) != null ? _b21 : _a21.__VUE_DEVTOOLS_KIT_RPC_SERVER__ = null;
- var _a222;
- var _b22;
- (_b22 = (_a222 = target).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__) != null ? _b22 : _a222.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ = null;
- var _a23;
- var _b23;
- (_b23 = (_a23 = target).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__) != null ? _b23 : _a23.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ = null;
- var _a24;
- var _b24;
- (_b24 = (_a24 = target).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__) != null ? _b24 : _a24.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ = null;
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- init_esm_shims2();
- var MAX_SERIALIZED_SIZE = 2 * 1024 * 1024;
- export {
- addCustomCommand,
- addCustomTab,
- onDevToolsClientConnected,
- onDevToolsConnected,
- removeCustomCommand,
- setupDevToolsPlugin,
- setupDevToolsPlugin as setupDevtoolsPlugin
- };
- //# sourceMappingURL=vitepress___@vue_devtools-api.js.map
|