@zeniai/web-app-ui 5.3.52-qa → 5.3.53-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-BFD6zGSo.js → AccountMappingScreen-B05quPfB.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen--CUkwe-7.js → ActualMatchingMatchDetailScreen-D94Dqvel.js} +1 -1
- package/dist/assets/AddressRoutes-BBXKWkgP.js +1 -0
- package/dist/assets/AddressScreen-DkOVp1Il.js +9 -0
- package/dist/assets/AiCfoScreen-Dj6jKppq.js +22 -0
- package/dist/assets/{AppDrawer-BioYAA8q.js → AppDrawer-DB1lzCTO.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CbgUcPPn.js → BillPayApprovalRoutes-vJIdZGym.js} +1 -1
- package/dist/assets/BillPayRoutes-Ie8KE_Pm.js +119 -0
- package/dist/assets/{BusinessVerificationPageScreen-_lNpLbtb.js → BusinessVerificationPageScreen-Bh9Wow-A.js} +2 -2
- package/dist/assets/CardsAiCfoScreen-Hsh2FpvU.js +14 -0
- package/dist/assets/{ChargeCardRoutes-Cm8gRyWo.js → ChargeCardRoutes-0m2CNq4x.js} +8 -8
- package/dist/assets/CompanyPassportScreen-Cvbu6LUT.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-CvbL5gXS.js → ConnectionAuthScreen-CRvnQSlr.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-SW-uc7QE.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CFt1axWu.js → CustomerOnboardingRoutes-kZOJ1QhA.js} +3 -3
- package/dist/assets/{DashboardRoutes-B_RKHDQw.js → DashboardRoutes-DTB-wwS1.js} +3 -3
- package/dist/assets/{DefaultTenantHome-CzERteR_.js → DefaultTenantHome-CTOQPic5.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DdGRU08t.js → DomesticWireDetailScreen-DgaHcUL_.js} +3 -3
- package/dist/assets/{DrawerScreen-BkWdrsyD.js → DrawerScreen-BeSv1Aix.js} +1 -1
- package/dist/assets/EntityDetailRoutes-D5eIJPR7.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-90qVj0mK.js → ExpenseAutomationRoutes-DHppK74x.js} +7 -7
- package/dist/assets/FeaturePreviewScreen-vWprV4-Z.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-CThBYwg5.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-Bd8tLMl8.js → InboxNotificationsProvider-D6QvVVj8.js} +1 -1
- package/dist/assets/{InvoicingRoutes-CexYyC5q.js → InvoicingRoutes-DvFmEcE9.js} +2 -2
- package/dist/assets/MagicLinkRoutes-B1yYt0y7.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CZM8ZeV4.js +12 -0
- package/dist/assets/MobileAppDrawer-D3MVdjfj.js +1 -0
- package/dist/assets/NotFoundScreen-BG5HsGgf.js +1 -0
- package/dist/assets/{NotificationRoutes-bEJ4pL_q.js → NotificationRoutes-3MhigWw8.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CH9GHZTu.js → OAuthConsentScreen-Br6J-Kjw.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-BT242PEu.js +1 -0
- package/dist/assets/{PaymentLinkScreen-Dgt4_0Sf.js → PaymentLinkScreen-D304LK9q.js} +4 -4
- package/dist/assets/{PeopleRoutes-B9g6bB_r.js → PeopleRoutes-Cs1oFIJn.js} +5 -5
- package/dist/assets/PerformanceRoutes-DevypuzE.js +1 -0
- package/dist/assets/{Preview-Bt5Z89U4.js → Preview-CDuSXomS.js} +1 -1
- package/dist/assets/QBOConnectionScreen-CXR9MUeu.js +100 -0
- package/dist/assets/ReimbursementApprovalRoutes-CADwX7m0.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-uAvwHmVJ.js → ReimbursementApprovalRuleDetailScreen-C__AcyMO.js} +1 -1
- package/dist/assets/ReimbursementRoutes-DE9--ARn.js +68 -0
- package/dist/assets/{ReportsRoutes-ByrzWoSX.js → ReportsRoutes-B_EvlWob.js} +1 -1
- package/dist/assets/RewardsRoutes-fsFKnuDQ.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CcW917MW.js → ScheduleDetailsPrepaidExpensesScreen-270QQSkr.js} +5 -5
- package/dist/assets/ScreenRoutes-B0DNEVGO.js +2 -0
- package/dist/assets/{SettingsRoutes-DCgOWsFJ.js → SettingsRoutes-DjTGDDEp.js} +6 -6
- package/dist/assets/{SetupPagesScreen-CgVfrQ5w.js → SetupPagesScreen-mQ33CI-8.js} +5 -5
- package/dist/assets/SignInScreen-BVOxylXT.js +1 -0
- package/dist/assets/SignOutScreen-BXBPUD_K.js +9 -0
- package/dist/assets/TaskListScreen-_mHmu42Q.js +9 -0
- package/dist/assets/TaskRoutes-DRFV_DYt.js +9 -0
- package/dist/assets/TransactionDetailRoutes-BqJM9clh.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DHysjIND.js → TransactionDetailScreen-Dmc1SB66.js} +2 -2
- package/dist/assets/TransactionListRoutes-2uPIfsci.js +1 -0
- package/dist/assets/{TreasuryRoutes-0_eMw0Wx.js → TreasuryRoutes-C62UHGaV.js} +3 -3
- package/dist/assets/{VendorsRoutes-B3eT8rLn.js → VendorsRoutes-Dp-COjet.js} +12 -12
- package/dist/assets/WiseConfirmationScreen-DEQwqZwF.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BNdYEOcI.js → ZeniAccountRoutes-DjudE9ka.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-fuK8OSl5.js +9 -0
- package/dist/assets/{accountMappingHelper-DQktkWkn.js → accountMappingHelper-DNRaFM1C.js} +1 -1
- package/dist/assets/{analytics-GZ8dIY_c.js → analytics-Y9Rn1Gu7.js} +1 -1
- package/dist/assets/analyticsHelper-Czpx502m.js +1 -0
- package/dist/assets/{core-DOBELRta.js → core-Dh_SHcAD.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DjVlhgki.js → decodeURIComponentSafe-B9wRnGXi.js} +1 -1
- package/dist/assets/{dnd-0MaFz9wL.js → dnd-CwwWYFuT.js} +1 -1
- package/dist/assets/{empty-DsXUnWhI.js → empty-BT_7GI6y.js} +1 -1
- package/dist/assets/{empty-C3pt8GU3.js → empty-XI8MiQF0.js} +1 -1
- package/dist/assets/{emptyVideoElement-DObxt-h2.js → emptyVideoElement-JNmKZqZz.js} +1 -1
- package/dist/assets/epic-COW9EFJg.js +2 -0
- package/dist/assets/expenseAutomationHelper-jy143DnO.js +1 -0
- package/dist/assets/{getLocaleForTenant-U4ff53sp.js → getLocaleForTenant-BTnTjmTv.js} +1 -1
- package/dist/assets/{index-px1SxWJw.js → index-8Q8Cb_pA.js} +1 -1
- package/dist/assets/index-B23hmQHl.js +1 -0
- package/dist/assets/{index-BmFszw0H.js → index-C4rZANm7.js} +1 -1
- package/dist/assets/{index-D0or4oV9.js → index-CHaKE3QQ.js} +12169 -12162
- package/dist/assets/{index-rIJ81ix1.js → index-D3h8toFn.js} +1 -1
- package/dist/assets/{index-1mAhqt2L.js → index-DOYaY83A.js} +1 -1
- package/dist/assets/{index-JlXkO7-y.js → index-DTprL6g9.js} +1 -1
- package/dist/assets/{index-F4l7OCjI.js → index-D_bKIveY.js} +2 -2
- package/dist/assets/{lexical-CAgOy6Q-.js → lexical-CaftfZ9D.js} +1 -1
- package/dist/assets/{liveblocks-BPL36a6x.js → liveblocks-DR8KfETq.js} +1 -1
- package/dist/assets/{lottie-38LSfraF.js → lottie-ODKvpFjz.js} +1 -1
- package/dist/assets/{mui-wO6EIETx.js → mui-BYn_Ugho.js} +1 -1
- package/dist/assets/{pathToGoBack-BTiQNxwp.js → pathToGoBack-BiqpVJeS.js} +1 -1
- package/dist/assets/{pdf-B2N0erO1.js → pdf-DnQo5-Qw.js} +3 -3
- package/dist/assets/{pdf-lib-Ct6vdrHd.js → pdf-lib-DdZd3IiB.js} +1 -1
- package/dist/assets/{plaid-C-eBmVPr.js → plaid-Dw8l1kdg.js} +1 -1
- package/dist/assets/{pusher-Qt-2jBy4.js → pusher-CewboUYG.js} +1 -1
- package/dist/assets/{react-D0sfM7Iy.js → react-8By583h-.js} +1 -1
- package/dist/assets/{react-DSWUEYTa.js → react-B8IvMjeE.js} +1 -1
- package/dist/assets/{react-BogDsHCA.js → react-BgmP_PBP.js} +1 -1
- package/dist/assets/{react-ByoUrZyD.js → react-CWd2ZkNi.js} +1 -1
- package/dist/assets/{react-9dynYr-j.js → react-gSPYEWZo.js} +1 -1
- package/dist/assets/{react-ofgvrscL.js → react-ygIo2ccY.js} +1 -1
- package/dist/assets/{recharts-Sp9X2zHo.js → recharts-BTL88W4R.js} +1 -1
- package/dist/assets/{routePaths-DTZH71MW.js → routePaths-DXpM4tZj.js} +1 -1
- package/dist/assets/{sentry-_x3Yh1Jc.js → sentry-FwaDhTzy.js} +1 -1
- package/dist/assets/{stripSplatSuffix-bz-VGo3l.js → stripSplatSuffix-CvpfThkG.js} +1 -1
- package/dist/assets/{url-DBFa8kl5.js → url-DHu7Ejzz.js} +1 -1
- package/dist/assets/{url-DW2CK7rX.js → url-DybJ-sxa.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-uLKulkDS.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BHQEdJfL.js → useAiCfoDashboardSuggestedQuestionsChips-CJfIwtxx.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-PLm72Ozi.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-CLlJNBdI.js → useChargeCardPusherEvents-LUqnb4UF.js} +1 -1
- package/dist/assets/{useDeviceId-EJu2KjP1.js → useDeviceId-CUJxM_KE.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-CKnBwo84.js +1 -0
- package/dist/assets/{useInitialThreadRequest-DYGeNL0J.js → useInitialThreadRequest-DLA6PIFe.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-CxAfFVI5.js → useTaskManagerAccess-D4PJ1zkK.js} +1 -1
- package/dist/assets/useTaskManagerPusherEvents-DchZU-tO.js +1 -0
- package/dist/assets/utils-DEAaFgLU.js +36 -0
- package/dist/assets/{withTransactionSidePanel-CQ96RPah.js → withTransactionSidePanel-DLRTZIl6.js} +6 -6
- package/dist/assets/{zeni-epic-state-DXFYDM66.js → zeni-epic-state-DJh0-ZeR.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-IFU8jeyM.js +0 -1
- package/dist/assets/AddressScreen-C5gOC9K1.js +0 -9
- package/dist/assets/AiCfoScreen-Dk4NZsn4.js +0 -22
- package/dist/assets/BillPayRoutes-BLaPoSH3.js +0 -119
- package/dist/assets/CardsAiCfoScreen-_v8KOvIs.js +0 -14
- package/dist/assets/CompanyPassportScreen-LNhKVlPD.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-1_BAWSpj.js +0 -1
- package/dist/assets/EntityDetailRoutes-BJQ1CgrE.js +0 -1
- package/dist/assets/FeaturePreviewScreen-DmuM1Efe.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-D5Csp1UO.js +0 -1
- package/dist/assets/MagicLinkRoutes-JEaRIrxB.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-DwZW3Erw.js +0 -12
- package/dist/assets/MobileAppDrawer-C-ti4sM2.js +0 -1
- package/dist/assets/NotFoundScreen-3qucmnjW.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BuxQksyO.js +0 -1
- package/dist/assets/PerformanceRoutes-hC8UVG3D.js +0 -1
- package/dist/assets/QBOConnectionScreen-BT2gd9dq.js +0 -100
- package/dist/assets/ReimbursementApprovalRoutes-CoFA16rX.js +0 -1
- package/dist/assets/ReimbursementRoutes-BnvmE75X.js +0 -68
- package/dist/assets/RewardsRoutes-BrjKJijg.js +0 -1
- package/dist/assets/ScreenRoutes-BgjTH3MD.js +0 -2
- package/dist/assets/SignInScreen-QbBLEpYE.js +0 -1
- package/dist/assets/SignOutScreen-Cg98jLSX.js +0 -9
- package/dist/assets/TaskListScreen-BKRaew41.js +0 -9
- package/dist/assets/TaskRoutes-tj9-zwIR.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BSNaBZbG.js +0 -1
- package/dist/assets/TransactionListRoutes-BcKO42ff.js +0 -1
- package/dist/assets/WiseConfirmationScreen-DJ2wN1Fx.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-Cua_2c_y.js +0 -9
- package/dist/assets/analyticsHelper-DnGDW6mo.js +0 -1
- package/dist/assets/epic-BqUfEKD1.js +0 -2
- package/dist/assets/expenseAutomationHelper-CRKfrxDD.js +0 -1
- package/dist/assets/index-C_zqEcVM.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-CtxH6NWw.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-eAE85_k_.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-DfrDVqu0.js +0 -1
- package/dist/assets/utils-BU0XThgM.js +0 -36
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-BPL36a6x.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-_x3Yh1Jc.js";import{L as dt,b$ as Tc,fF as Ac,TO as Rc,UE as kl,c8 as Tl}from"./zeni-epic-state-DXFYDM66.js";import{a as lt,b as Al,c as Rl,d as Il,e as un,f as Pl,g as Nl,h as Ll,i as Vt,j as Ic,k as oe,l as je,m as $l,o as Yt,p as ue,q as Ml}from"./utils-BU0XThgM.js";import{r as cn}from"./empty-C3pt8GU3.js";import{r as Cl,a as Dl,b as Fl,c as Bl}from"./pdf-lib-Ct6vdrHd.js";import{r as Ul}from"./index-C_zqEcVM.js";import{r as ql}from"./index-rIJ81ix1.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-DOBELRta.js";import{u as Vl,z as Pc,L as Yl,al as Kl,am as Wl,Z as Jl,C as Xl}from"./index-D0or4oV9.js";import"./mui-wO6EIETx.js";import{d as Pe}from"./decodeURIComponentSafe-DjVlhgki.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="fde36da3-f325-4db7-9f86-33a283c26228",t._sentryDebugIdIdentifier="sentry-dbid-fde36da3-f325-4db7-9f86-33a283c26228")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,In,Pn,Nn,Ne,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,zn,Le,Zn,Hn,Vn,Yn,Kn,Wn,Jn,$e,Xn,Qn,to,eo,ro,no,oo,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(jn)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function u(r,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},u(r,e)}function d(r){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var a,p=o(r);if(e){var h=o(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(m,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(m)})(this,a)}}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(r)}jn=1;var c,i,n={};function s(r,e,a){a||(a=Error);var p=(function(h){(function(l,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(y&&y.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),y&&u(l,y)})(g,h);var m,b=d(g);function g(l,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(l,y,v)),S.code=r,S}return m=g,Object.defineProperty(m,"prototype",{writable:!1}),m})(a);n[r]=p}function f(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,m;if(c===void 0&&(c=ie()),c(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,l,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-l.length,y)===l})(r," argument"))m="The ".concat(r," ").concat(p," ").concat(f(e,"type"));else{var b=(function(g,l,y){return typeof y!="number"&&(y=0),!(y+l.length>g.length)&&g.indexOf(l,y)!==-1})(r,".")?"property":"argument";m='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(f(e,"type"))}return m+=". Received type ".concat(t(a))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";i===void 0&&(i=lt());var p=i.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),s("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(m){return'"'.concat(m,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),De.codes=n,De}function Ql(){if(kn)return xn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function u(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){d(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function d(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function o(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,c(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function i(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function s(k){var E=typeof Map=="function"?new Map:void 0;return s=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return f(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},s(k)}function f(k,E,j){return f=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},f.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}kn=1;var h=lt().inspect,m=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",l="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
|
-
`),I=_(E).split(`
|
|
3
|
-
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
|
-
|
|
5
|
-
`)+"".concat(A[0]," !== ").concat(I[0],`
|
|
6
|
-
`)}else if(j!=="strictEqualObject"&&V<(Q.stderr&&Q.stderr.isTTY?Q.stderr.columns:80)){for(;A[0][R]===I[0][R];)R++;R>2&&(B=`
|
|
7
|
-
`.concat((function(W,K){if(K=Math.floor(K),W.length==0||K==0)return"";var et=W.length*K;for(K=Math.floor(Math.log(K)/Math.log(2));K;)W+=W,K--;return W+W.substring(0,et-W.length)})(" ",R),"^"),R=0)}}for(var J=A[A.length-1],F=I[I.length-1];J===F&&(R++<2?N=`
|
|
8
|
-
`.concat(J).concat(N):x=J,A.pop(),I.pop(),A.length!==0&&I.length!==0);)J=A[A.length-1],F=I[I.length-1];var L=Math.max(A.length,I.length);if(L===0){var U=G.split(`
|
|
9
|
-
`);if(U.length>30)for(U[26]="".concat(g,"...").concat(v);U.length>27;)U.pop();return"".concat(S.notIdentical,`
|
|
10
|
-
|
|
11
|
-
`).concat(U.join(`
|
|
12
|
-
`),`
|
|
13
|
-
`)}R>3&&(N=`
|
|
14
|
-
`.concat(g,"...").concat(v).concat(N),P=!0),x!==""&&(N=`
|
|
15
|
-
`.concat(x).concat(N),x="");var Z=0,q=S[j]+`
|
|
16
|
-
`.concat(l,"+ actual").concat(v," ").concat(y,"- expected").concat(v),Y=" ".concat(g,"...").concat(v," Lines skipped");for(R=0;R<L;R++){var C=R-$;if(A.length<R+1)C>1&&R>2&&(C>4?(O+=`
|
|
17
|
-
`.concat(g,"...").concat(v),P=!0):C>3&&(O+=`
|
|
18
|
-
`.concat(I[R-2]),Z++),O+=`
|
|
19
|
-
`.concat(I[R-1]),Z++),$=R,x+=`
|
|
20
|
-
`.concat(y,"-").concat(v," ").concat(I[R]),Z++;else if(I.length<R+1)C>1&&R>2&&(C>4?(O+=`
|
|
21
|
-
`.concat(g,"...").concat(v),P=!0):C>3&&(O+=`
|
|
22
|
-
`.concat(A[R-2]),Z++),O+=`
|
|
23
|
-
`.concat(A[R-1]),Z++),$=R,O+=`
|
|
24
|
-
`.concat(l,"+").concat(v," ").concat(A[R]),Z++;else{var T=I[R],D=A[R],H=D!==T&&(!b(D,",")||D.slice(0,-1)!==T);H&&b(T,",")&&T.slice(0,-1)===D&&(H=!1,D+=","),H?(C>1&&R>2&&(C>4?(O+=`
|
|
25
|
-
`.concat(g,"...").concat(v),P=!0):C>3&&(O+=`
|
|
26
|
-
`.concat(A[R-2]),Z++),O+=`
|
|
27
|
-
`.concat(A[R-1]),Z++),$=R,O+=`
|
|
28
|
-
`.concat(l,"+").concat(v," ").concat(D),x+=`
|
|
29
|
-
`.concat(y,"-").concat(v," ").concat(T),Z+=2):(O+=x,x="",C!==1&&R!==0||(O+=`
|
|
30
|
-
`.concat(D),Z++))}if(Z>20&&R<L-2)return"".concat(q).concat(Y,`
|
|
31
|
-
`).concat(O,`
|
|
32
|
-
`).concat(g,"...").concat(v).concat(x,`
|
|
33
|
-
`)+"".concat(g,"...").concat(v)}return"".concat(q).concat(P?Y:"",`
|
|
34
|
-
`).concat(O).concat(x).concat(N).concat(B)}var z=(function(k,E){(function(N,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(P&&P.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),P&&e(N,P)})($,k);var j,x,O=(j=$,x=r(),function(){var N,P=a(j);if(x){var G=a(this).constructor;N=Reflect.construct(P,arguments,G)}else N=P.apply(this,arguments);return i(this,N)});function $(N){var P;if((function(q,Y){if(!(q instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,$),p(N)!=="object"||N===null)throw new m("options","Object",N);var G=N.message,A=N.operator,I=N.stackStartFn,R=N.actual,B=N.expected,V=Error.stackTraceLimit;if(Error.stackTraceLimit=0,G!=null)P=O.call(this,String(G));else if(Q.stderr&&Q.stderr.isTTY&&(Q.stderr&&Q.stderr.getColorDepth&&Q.stderr.getColorDepth()!==1?(g="\x1B[34m",l="\x1B[32m",v="\x1B[39m",y="\x1B[31m"):(g="",l="",v="",y="")),p(R)==="object"&&R!==null&&p(B)==="object"&&B!==null&&"stack"in R&&R instanceof Error&&"stack"in B&&B instanceof Error&&(R=w(R),B=w(B)),A==="deepStrictEqual"||A==="strictEqual")P=O.call(this,M(R,B,A));else if(A==="notDeepStrictEqual"||A==="notStrictEqual"){var J=S[A],F=_(R).split(`
|
|
35
|
-
`);if(A==="notStrictEqual"&&p(R)==="object"&&R!==null&&(J=S.notStrictEqualObject),F.length>30)for(F[26]="".concat(g,"...").concat(v);F.length>27;)F.pop();P=F.length===1?O.call(this,"".concat(J," ").concat(F[0])):O.call(this,"".concat(J,`
|
|
36
|
-
|
|
37
|
-
`).concat(F.join(`
|
|
38
|
-
`),`
|
|
39
|
-
`))}else{var L=_(R),U="",Z=S[A];A==="notDeepEqual"||A==="notEqual"?(L="".concat(S[A],`
|
|
40
|
-
|
|
41
|
-
`).concat(L)).length>1024&&(L="".concat(L.slice(0,1021),"...")):(U="".concat(_(B)),L.length>512&&(L="".concat(L.slice(0,509),"...")),U.length>512&&(U="".concat(U.slice(0,509),"...")),A==="deepEqual"||A==="equal"?L="".concat(Z,`
|
|
42
|
-
|
|
43
|
-
`).concat(L,`
|
|
44
|
-
|
|
45
|
-
should equal
|
|
46
|
-
|
|
47
|
-
`):U=" ".concat(A," ").concat(U)),P=O.call(this,"".concat(L).concat(U))}return Error.stackTraceLimit=V,P.generatedMessage=!G,Object.defineProperty(n(P),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),P.code="ERR_ASSERTION",P.actual=R,P.expected=B,P.operator=A,Error.captureStackTrace&&Error.captureStackTrace(n(P),I),P.stack,P.name="AssertionError",i(P)}return o($,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:E,value:function(N,P){return h(this,u(u({},P),{},{customInspect:!1,depth:0}))}}]),$})(s(Error),h.custom);return xn=z}function Lc(){if(An)return Tn;An=1;var t=Object.prototype.toString;return Tn=function(u){var d=t.call(u),o=d==="[object Arguments]";return o||(o=d!=="[object Array]"&&u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&t.call(u.callee)==="[object Function]"),o}}function tf(){if(In)return Rn;var t;if(In=1,!Object.keys){var u=Object.prototype.hasOwnProperty,d=Object.prototype.toString,o=Lc(),c=Object.prototype.propertyIsEnumerable,i=!c.call({toString:null},"toString"),n=c.call((function(){}),"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(a){var p=a.constructor;return p&&p.prototype===a},r={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=(function(){if(typeof window>"u")return!1;for(var a in window)try{if(!r["$"+a]&&u.call(window,a)&&window[a]!==null&&typeof window[a]=="object")try{f(window[a])}catch{return!0}}catch{return!0}return!1})();t=function(a){var p=a!==null&&typeof a=="object",h=d.call(a)==="[object Function]",m=o(a),b=p&&d.call(a)==="[object String]",g=[];if(!p&&!h&&!m)throw new TypeError("Object.keys called on a non-object");var l=n&&h;if(b&&a.length>0&&!u.call(a,0))for(var y=0;y<a.length;++y)g.push(String(y));if(m&&a.length>0)for(var v=0;v<a.length;++v)g.push(String(v));else for(var S in a)l&&S==="prototype"||!u.call(a,S)||g.push(String(S));if(i)for(var w=(function(M){if(typeof window>"u"||!e)return f(M);try{return f(M)}catch{return!1}})(a),_=0;_<s.length;++_)w&&s[_]==="constructor"||!u.call(a,s[_])||g.push(s[_]);return g}}return Rn=t}function $c(){if(Nn)return Pn;Nn=1;var t=Array.prototype.slice,u=Lc(),d=Object.keys,o=d?function(i){return d(i)}:tf(),c=Object.keys;return o.shim=function(){if(Object.keys){var i=(function(){var n=Object.keys(arguments);return n&&n.length===arguments.length})(1,2);i||(Object.keys=function(n){return u(n)?c(t.call(n)):c(n)})}else Object.keys=o;return Object.keys||o},Pn=o}function ef(){if(Mn)return $n;Mn=1;var t=(function(){if(Ln)return Ne;Ln=1;var u=$c(),d=Al()(),o=Rl(),c=Il(),i=o("Array.prototype.push"),n=o("Object.prototype.propertyIsEnumerable"),s=d?c.getOwnPropertySymbols:null;return Ne=function(f,r){if(f==null)throw new TypeError("target must be an object");var e=c(f);if(arguments.length===1)return e;for(var a=1;a<arguments.length;++a){var p=c(arguments[a]),h=u(p),m=d&&(c.getOwnPropertySymbols||s);if(m)for(var b=m(p),g=0;g<b.length;++g){var l=b[g];n(p,l)&&i(h,l)}for(var y=0;y<h.length;++y){var v=h[y];if(n(p,v)){var S=p[v];e[v]=S}}}return e},Ne})();return $n=function(){return Object.assign?(function(){if(!Object.assign)return!1;for(var u="abcdefghijklmnopqrst",d=u.split(""),o={},c=0;c<d.length;++c)o[d[c]]=d[c];var i=Object.assign({},o),n="";for(var s in i)n+=s;return u!==n})()||(function(){if(!Object.assign||!Object.preventExtensions)return!1;var u=Object.preventExtensions({1:2});try{Object.assign(u,"xy")}catch{return u[1]==="y"}return!1})()?t:Object.assign:t}}function Mc(){if(Dn)return Cn;Dn=1;var t=function(u){return u!=u};return Cn=function(u,d){return u===0&&d===0?1/u==1/d:u===d||!(!t(u)||!t(d))}}function en(){if(Bn)return Fn;Bn=1;var t=Mc();return Fn=function(){return typeof Object.is=="function"?Object.is:t}}function ve(){if(zn)return Gn;zn=1;var t=$c(),u=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",d=Object.prototype.toString,o=Array.prototype.concat,c=Ll(),i=Nl()(),n=function(f,r,e,a){if(r in f){if(a===!0){if(f[r]===e)return}else if(typeof(p=a)!="function"||d.call(p)!=="[object Function]"||!a())return}var p;i?c(f,r,e,!0):c(f,r,e)},s=function(f,r){var e=arguments.length>2?arguments[2]:{},a=t(r);u&&(a=o.call(a,Object.getOwnPropertySymbols(r)));for(var p=0;p<a.length;p+=1)n(f,a[p],r[a[p]],e[a[p]])};return s.supportsDescriptors=!!i,Gn=s}function rf(){if(Vn)return Hn;Vn=1;var t=ve(),u=un(),d=Mc(),o=en(),c=(function(){if(Zn)return Le;Zn=1;var n=en(),s=ve();return Le=function(){var f=n();return s(Object,{is:f},{is:function(){return Object.is!==f}}),f},Le})(),i=u(o(),Object);return t(i,{getPolyfill:o,implementation:d,shim:c}),Hn=i}function Cc(){return Kn?Yn:(Kn=1,Yn=function(t){return t!=t})}function Dc(){if(Jn)return Wn;Jn=1;var t=Cc();return Wn=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:t}}function nf(){if(Xn)return $e;Xn=1;var t=ve(),u=Dc();return $e=function(){var d=u();return t(Number,{isNaN:d},{isNaN:function(){return Number.isNaN!==d}}),d},$e}function of(){if(ro)return eo;function t(F,L){return(function(U){if(Array.isArray(U))return U})(F)||(function(U,Z){var q=U==null?null:typeof Symbol<"u"&&U[Symbol.iterator]||U["@@iterator"];if(q!=null){var Y,C,T,D,H=[],W=!0,K=!1;try{if(T=(q=q.call(U)).next,Z!==0)for(;!(W=(Y=T.call(q)).done)&&(H.push(Y.value),H.length!==Z);W=!0);}catch(et){K=!0,C=et}finally{try{if(!W&&q.return!=null&&(D=q.return(),Object(D)!==D))return}finally{if(K)throw C}}return H}})(F,L)||(function(U,Z){if(U){if(typeof U=="string")return u(U,Z);var q=Object.prototype.toString.call(U).slice(8,-1);if(q==="Object"&&U.constructor&&(q=U.constructor.name),q==="Map"||q==="Set")return Array.from(U);if(q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(q))return u(U,Z)}})(F,L)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function u(F,L){(L==null||L>F.length)&&(L=F.length);for(var U=0,Z=new Array(L);U<L;U++)Z[U]=F[U];return Z}function d(F){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},d(F)}ro=1;var o=/a/g.flags!==void 0,c=function(F){var L=[];return F.forEach((function(U){return L.push(U)})),L},i=function(F){var L=[];return F.forEach((function(U,Z){return L.push([Z,U])})),L},n=Object.is?Object.is:rf(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:(function(){if(to)return Qn;to=1;var F=un(),L=ve(),U=Cc(),Z=Dc(),q=nf(),Y=F(Z(),Number);return L(Y,{getPolyfill:Z,implementation:U,shim:q}),Qn=Y})();function r(F){return F.call.bind(F)}var e=r(Object.prototype.hasOwnProperty),a=r(Object.prototype.propertyIsEnumerable),p=r(Object.prototype.toString),h=lt().types,m=h.isAnyArrayBuffer,b=h.isArrayBufferView,g=h.isDate,l=h.isMap,y=h.isRegExp,v=h.isSet,S=h.isNativeError,w=h.isBoxedPrimitive,_=h.isNumberObject,M=h.isStringObject,z=h.isBooleanObject,k=h.isBigIntObject,E=h.isSymbolObject,j=h.isFloat32Array,x=h.isFloat64Array;function O(F){if(F.length===0||F.length>10)return!0;for(var L=0;L<F.length;L++){var U=F.charCodeAt(L);if(U<48||U>57)return!0}return F.length===10&&F>=Math.pow(2,32)}function $(F){return Object.keys(F).filter(O).concat(s(F).filter(Object.prototype.propertyIsEnumerable.bind(F)))}function N(F,L){if(F===L)return 0;for(var U=F.length,Z=L.length,q=0,Y=Math.min(U,Z);q<Y;++q)if(F[q]!==L[q]){U=F[q],Z=L[q];break}return U<Z?-1:Z<U?1:0}function P(F,L,U,Z){if(F===L)return F!==0||!U||n(F,L);if(U){if(d(F)!=="object")return typeof F=="number"&&f(F)&&f(L);if(d(L)!=="object"||F===null||L===null||Object.getPrototypeOf(F)!==Object.getPrototypeOf(L))return!1}else{if(F===null||d(F)!=="object")return(L===null||d(L)!=="object")&&F==L;if(L===null||d(L)!=="object")return!1}var q,Y,C,T,D=p(F);if(D!==p(L))return!1;if(Array.isArray(F)){if(F.length!==L.length)return!1;var H=$(F),W=$(L);return H.length===W.length&&A(F,L,U,Z,1,H)}if(D==="[object Object]"&&(!l(F)&&l(L)||!v(F)&&v(L)))return!1;if(g(F)){if(!g(L)||Date.prototype.getTime.call(F)!==Date.prototype.getTime.call(L))return!1}else if(y(F)){if(!y(L)||(C=F,T=L,!(o?C.source===T.source&&C.flags===T.flags:RegExp.prototype.toString.call(C)===RegExp.prototype.toString.call(T))))return!1}else if(S(F)||F instanceof Error){if(F.message!==L.message||F.name!==L.name)return!1}else{if(b(F)){if(U||!j(F)&&!x(F)){if(!(function(X,tt){return X.byteLength===tt.byteLength&&N(new Uint8Array(X.buffer,X.byteOffset,X.byteLength),new Uint8Array(tt.buffer,tt.byteOffset,tt.byteLength))===0})(F,L))return!1}else if(!(function(X,tt){if(X.byteLength!==tt.byteLength)return!1;for(var nt=0;nt<X.byteLength;nt++)if(X[nt]!==tt[nt])return!1;return!0})(F,L))return!1;var K=$(F),et=$(L);return K.length===et.length&&A(F,L,U,Z,0,K)}if(v(F))return!(!v(L)||F.size!==L.size)&&A(F,L,U,Z,2);if(l(F))return!(!l(L)||F.size!==L.size)&&A(F,L,U,Z,3);if(m(F)){if(Y=L,(q=F).byteLength!==Y.byteLength||N(new Uint8Array(q),new Uint8Array(Y))!==0)return!1}else if(w(F)&&!(function(X,tt){return _(X)?_(tt)&&n(Number.prototype.valueOf.call(X),Number.prototype.valueOf.call(tt)):M(X)?M(tt)&&String.prototype.valueOf.call(X)===String.prototype.valueOf.call(tt):z(X)?z(tt)&&Boolean.prototype.valueOf.call(X)===Boolean.prototype.valueOf.call(tt):k(X)?k(tt)&&BigInt.prototype.valueOf.call(X)===BigInt.prototype.valueOf.call(tt):E(tt)&&Symbol.prototype.valueOf.call(X)===Symbol.prototype.valueOf.call(tt)})(F,L))return!1}return A(F,L,U,Z,0)}function G(F,L){return L.filter((function(U){return a(F,U)}))}function A(F,L,U,Z,q,Y){if(arguments.length===5){Y=Object.keys(F);var C=Object.keys(L);if(Y.length!==C.length)return!1}for(var T=0;T<Y.length;T++)if(!e(L,Y[T]))return!1;if(U&&arguments.length===5){var D=s(F);if(D.length!==0){var H=0;for(T=0;T<D.length;T++){var W=D[T];if(a(F,W)){if(!a(L,W))return!1;Y.push(W),H++}else if(a(L,W))return!1}var K=s(L);if(D.length!==K.length&&G(L,K).length!==H)return!1}else{var et=s(L);if(et.length!==0&&G(L,et).length!==0)return!1}}if(Y.length===0&&(q===0||q===1&&F.length===0||F.size===0))return!0;if(Z===void 0)Z={val1:new Map,val2:new Map,position:0};else{var X=Z.val1.get(F);if(X!==void 0){var tt=Z.val2.get(L);if(tt!==void 0)return X===tt}Z.position++}Z.val1.set(F,Z.position),Z.val2.set(L,Z.position);var nt=(function(ot,st,gt,At,vt,bt){var it=0;if(bt===2){if(!(function(mt,It,jt,Pt){for(var ut=null,Kt=c(mt),Ct=0;Ct<Kt.length;Ct++){var xt=Kt[Ct];if(d(xt)==="object"&&xt!==null)ut===null&&(ut=new Set),ut.add(xt);else if(!It.has(xt)){if(jt||!B(mt,It,xt))return!1;ut===null&&(ut=new Set),ut.add(xt)}}if(ut!==null){for(var St=c(It),Ft=0;Ft<St.length;Ft++){var Nt=St[Ft];if(d(Nt)==="object"&&Nt!==null){if(!I(ut,Nt,jt,Pt))return!1}else if(!jt&&!mt.has(Nt)&&!I(ut,Nt,jt,Pt))return!1}return ut.size===0}return!0})(ot,st,gt,vt))return!1}else if(bt===3){if(!(function(mt,It,jt,Pt){for(var ut=null,Kt=i(mt),Ct=0;Ct<Kt.length;Ct++){var xt=t(Kt[Ct],2),St=xt[0],Ft=xt[1];if(d(St)==="object"&&St!==null)ut===null&&(ut=new Set),ut.add(St);else{var Nt=It.get(St);if(Nt===void 0&&!It.has(St)||!P(Ft,Nt,jt,Pt)){if(jt||!V(mt,It,St,Ft,Pt))return!1;ut===null&&(ut=new Set),ut.add(St)}}}if(ut!==null){for(var wn=i(It),Re=0;Re<wn.length;Re++){var En=t(wn[Re],2),Bt=En[0],Ie=En[1];if(d(Bt)==="object"&&Bt!==null){if(!J(ut,mt,Bt,Ie,jt,Pt))return!1}else if(!(jt||mt.has(Bt)&&P(mt.get(Bt),Ie,!1,Pt)||J(ut,mt,Bt,Ie,!1,Pt)))return!1}return ut.size===0}return!0})(ot,st,gt,vt))return!1}else if(bt===1)for(;it<ot.length;it++){if(!e(ot,it)){if(e(st,it))return!1;for(var ht=Object.keys(ot);it<ht.length;it++){var rt=ht[it];if(!e(st,rt)||!P(ot[rt],st[rt],gt,vt))return!1}return ht.length===Object.keys(st).length}if(!e(st,it)||!P(ot[it],st[it],gt,vt))return!1}for(it=0;it<At.length;it++){var Rt=At[it];if(!P(ot[Rt],st[Rt],gt,vt))return!1}return!0})(F,L,U,Y,Z,q);return Z.val1.delete(F),Z.val2.delete(L),nt}function I(F,L,U,Z){for(var q=c(F),Y=0;Y<q.length;Y++){var C=q[Y];if(P(L,C,U,Z))return F.delete(C),!0}return!1}function R(F){switch(d(F)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":F=+F;case"number":if(f(F))return!1}return!0}function B(F,L,U){var Z=R(U);return Z??(L.has(Z)&&!F.has(Z))}function V(F,L,U,Z,q){var Y=R(U);if(Y!=null)return Y;var C=L.get(Y);return!(C===void 0&&!L.has(Y)||!P(Z,C,!1,q))&&!F.has(Y)&&P(Z,C,!1,q)}function J(F,L,U,Z,q,Y){for(var C=c(F),T=0;T<C.length;T++){var D=C[T];if(P(U,D,q,Y)&&P(Z,L.get(D),q,Y))return F.delete(D),!0}return!1}return eo={isDeepEqual:function(F,L){return P(F,L,!1)},isDeepStrictEqual:function(F,L){return P(F,L,!0)}}}function ie(){if(no)return Ce.exports;function t(A){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},t(A)}function u(A,I,R){return Object.defineProperty(A,"prototype",{writable:!1}),A}no=1;var d,o,c=Nc().codes,i=c.ERR_AMBIGUOUS_ARGUMENT,n=c.ERR_INVALID_ARG_TYPE,s=c.ERR_INVALID_ARG_VALUE,f=c.ERR_INVALID_RETURN_VALUE,r=c.ERR_MISSING_ARGS,e=Ql(),a=lt().inspect,p=lt().types,h=p.isPromise,m=p.isRegExp,b=ef()(),g=en()(),l=(function(){if(qn)return Un;qn=1;var A=Pl(),I=un(),R=I(A("String.prototype.indexOf"));return Un=function(B,V){var J=A(B,!!V);return typeof J=="function"&&R(B,".prototype.")>-1?I(J):J}})()("RegExp.prototype.test");function y(){var A=of();d=A.isDeepEqual,o=A.isDeepStrictEqual}var v=!1,S=Ce.exports=z,w={};function _(A){throw A.message instanceof Error?A.message:new e(A)}function M(A,I,R,B){if(!R){var V=!1;if(I===0)V=!0,B="No value argument passed to `assert.ok()`";else if(B instanceof Error)throw B;var J=new e({actual:R,expected:!0,message:B,operator:"==",stackStartFn:A});throw J.generatedMessage=V,J}}function z(){for(var A=arguments.length,I=new Array(A),R=0;R<A;R++)I[R]=arguments[R];M.apply(void 0,[z,I.length].concat(I))}S.fail=function A(I,R,B,V,J){var F,L=arguments.length;if(L===0?F="Failed":L===1?(B=I,I=void 0):(v===!1&&(v=!0,(Q.emitWarning?Q.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),L===2&&(V="!=")),B instanceof Error)throw B;var U={actual:I,expected:R,operator:V===void 0?"fail":V,stackStartFn:J||A};B!==void 0&&(U.message=B);var Z=new e(U);throw F&&(Z.message=F,Z.generatedMessage=!0),Z},S.AssertionError=e,S.ok=z,S.equal=function A(I,R,B){if(arguments.length<2)throw new r("actual","expected");I!=R&&_({actual:I,expected:R,message:B,operator:"==",stackStartFn:A})},S.notEqual=function A(I,R,B){if(arguments.length<2)throw new r("actual","expected");I==R&&_({actual:I,expected:R,message:B,operator:"!=",stackStartFn:A})},S.deepEqual=function A(I,R,B){if(arguments.length<2)throw new r("actual","expected");d===void 0&&y(),d(I,R)||_({actual:I,expected:R,message:B,operator:"deepEqual",stackStartFn:A})},S.notDeepEqual=function A(I,R,B){if(arguments.length<2)throw new r("actual","expected");d===void 0&&y(),d(I,R)&&_({actual:I,expected:R,message:B,operator:"notDeepEqual",stackStartFn:A})},S.deepStrictEqual=function A(I,R,B){if(arguments.length<2)throw new r("actual","expected");d===void 0&&y(),o(I,R)||_({actual:I,expected:R,message:B,operator:"deepStrictEqual",stackStartFn:A})},S.notDeepStrictEqual=function A(I,R,B){if(arguments.length<2)throw new r("actual","expected");d===void 0&&y(),o(I,R)&&_({actual:I,expected:R,message:B,operator:"notDeepStrictEqual",stackStartFn:A})},S.strictEqual=function A(I,R,B){if(arguments.length<2)throw new r("actual","expected");g(I,R)||_({actual:I,expected:R,message:B,operator:"strictEqual",stackStartFn:A})},S.notStrictEqual=function A(I,R,B){if(arguments.length<2)throw new r("actual","expected");g(I,R)&&_({actual:I,expected:R,message:B,operator:"notStrictEqual",stackStartFn:A})};var k=u((function A(I,R,B){var V=this;(function(J,F){if(!(J instanceof F))throw new TypeError("Cannot call a class as a function")})(this,A),R.forEach((function(J){J in I&&(B!==void 0&&typeof B[J]=="string"&&m(I[J])&&l(I[J],B[J])?V[J]=B[J]:V[J]=I[J])}))}));function E(A,I,R,B){if(typeof I!="function"){if(m(I))return l(I,A);if(arguments.length===2)throw new n("expected",["Function","RegExp"],I);if(t(A)!=="object"||A===null){var V=new e({actual:A,expected:I,message:R,operator:"deepStrictEqual",stackStartFn:B});throw V.operator=B.name,V}var J=Object.keys(I);if(I instanceof Error)J.push("name","message");else if(J.length===0)throw new s("error",I,"may not be an empty object");return d===void 0&&y(),J.forEach((function(F){typeof A[F]=="string"&&m(I[F])&&l(I[F],A[F])||(function(L,U,Z,q,Y,C){if(!(Z in L)||!o(L[Z],U[Z])){if(!q){var T=new k(L,Y),D=new k(U,Y,L),H=new e({actual:T,expected:D,operator:"deepStrictEqual",stackStartFn:C});throw H.actual=L,H.expected=U,H.operator=C.name,H}_({actual:L,expected:U,message:q,operator:C.name,stackStartFn:C})}})(A,I,F,R,J,B)})),!0}return I.prototype!==void 0&&A instanceof I||!Error.isPrototypeOf(I)&&I.call({},A)===!0}function j(A){if(typeof A!="function")throw new n("fn","Function",A);try{A()}catch(I){return I}return w}function x(A){return h(A)||A!==null&&t(A)==="object"&&typeof A.then=="function"&&typeof A.catch=="function"}function O(A){return Promise.resolve().then((function(){var I;if(typeof A=="function"){if(!x(I=A()))throw new f("instance of Promise","promiseFn",I)}else{if(!x(A))throw new n("promiseFn",["Function","Promise"],A);I=A}return Promise.resolve().then((function(){return I})).then((function(){return w})).catch((function(R){return R}))}))}function $(A,I,R,B){if(typeof R=="string"){if(arguments.length===4)throw new n("error",["Object","Error","Function","RegExp"],R);if(t(I)==="object"&&I!==null){if(I.message===R)throw new i("error/message",'The error message "'.concat(I.message,'" is identical to the message.'))}else if(I===R)throw new i("error/message",'The error "'.concat(I,'" is identical to the message.'));B=R,R=void 0}else if(R!=null&&t(R)!=="object"&&typeof R!="function")throw new n("error",["Object","Error","Function","RegExp"],R);if(I===w){var V="";R&&R.name&&(V+=" (".concat(R.name,")")),V+=B?": ".concat(B):".";var J=A.name==="rejects"?"rejection":"exception";_({actual:void 0,expected:R,operator:A.name,message:"Missing expected ".concat(J).concat(V),stackStartFn:A})}if(R&&!E(I,R,B,A))throw I}function N(A,I,R,B){if(I!==w){if(typeof R=="string"&&(B=R,R=void 0),!R||E(I,R)){var V=B?": ".concat(B):".",J=A.name==="doesNotReject"?"rejection":"exception";_({actual:I,expected:R,operator:A.name,message:"Got unwanted ".concat(J).concat(V,`
|
|
49
|
-
`)+'Actual message: "'.concat(I&&I.message,'"'),stackStartFn:A})}throw I}}function P(A,I,R,B,V){if(!m(I))throw new n("regexp","RegExp",I);var J=V==="match";if(typeof A!="string"||l(I,A)!==J){if(R instanceof Error)throw R;var F=!R;R=R||(typeof A!="string"?'The "string" argument must be of type string. Received type '+"".concat(t(A)," (").concat(a(A),")"):(J?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(a(I),`. Input:
|
|
50
|
-
|
|
51
|
-
`).concat(a(A),`
|
|
52
|
-
`));var L=new e({actual:A,expected:I,message:R,operator:V,stackStartFn:B});throw L.generatedMessage=F,L}}function G(){for(var A=arguments.length,I=new Array(A),R=0;R<A;R++)I[R]=arguments[R];M.apply(void 0,[G,I.length].concat(I))}return S.throws=function A(I){for(var R=arguments.length,B=new Array(R>1?R-1:0),V=1;V<R;V++)B[V-1]=arguments[V];$.apply(void 0,[A,j(I)].concat(B))},S.rejects=function A(I){for(var R=arguments.length,B=new Array(R>1?R-1:0),V=1;V<R;V++)B[V-1]=arguments[V];return O(I).then((function(J){return $.apply(void 0,[A,J].concat(B))}))},S.doesNotThrow=function A(I){for(var R=arguments.length,B=new Array(R>1?R-1:0),V=1;V<R;V++)B[V-1]=arguments[V];N.apply(void 0,[A,j(I)].concat(B))},S.doesNotReject=function A(I){for(var R=arguments.length,B=new Array(R>1?R-1:0),V=1;V<R;V++)B[V-1]=arguments[V];return O(I).then((function(J){return N.apply(void 0,[A,J].concat(B))}))},S.ifError=function A(I){if(I!=null){var R="ifError got unwanted exception: ";t(I)==="object"&&typeof I.message=="string"?I.message.length===0&&I.constructor?R+=I.constructor.name:R+=I.message:R+=a(I);var B=new e({actual:I,expected:null,operator:"ifError",message:R,stackStartFn:A}),V=I.stack;if(typeof V=="string"){var J=V.split(`
|
|
53
|
-
`);J.shift();for(var F=B.stack.split(`
|
|
54
|
-
`),L=0;L<J.length;L++){var U=F.indexOf(J[L]);if(U!==-1){F=F.slice(0,U);break}}B.stack="".concat(F.join(`
|
|
55
|
-
`),`
|
|
56
|
-
`).concat(J.join(`
|
|
57
|
-
`))}throw B}},S.match=function A(I,R,B){P(I,R,B,A,"match")},S.doesNotMatch=function A(I,R,B){P(I,R,B,A,"doesNotMatch")},S.strict=b(G,S,{equal:S.strictEqual,deepEqual:S.deepStrictEqual,notEqual:S.notStrictEqual,notDeepEqual:S.notDeepStrictEqual}),S.strict.strict=S.strict,Ce.exports}function sf(){return oo||(oo=1,(function(t,u){var d=ie();function o(c){d(typeof c=="string","the list of characters must be a string!");var i=dt.byteLength(c);return function(n){d(typeof(n=n||10)=="number"&&n>=0,"the length of the random string must be a number!");for(var s="",f=0;f<n;f++)s+=c[Math.floor(i*Math.random())];return s}}(u=t.exports=o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")).base62=u,u.base36=o("abcdefghijklmnopqrstuvwxyz0123456789"),u.base10=o("0123456789"),u.create=o})(Me,Me.exports)),Me.exports}var io,so,ao,uo,Fe,co,fe={exports:{}},he={exports:{}};function af(){if(io)return he.exports;io=1;var t=Vt(),u=t.randomBytes===t.pseudoRandomBytes?1:3;function d(o,c,i){t.randomBytes(o,(function(n,s){return n?--c?void setTimeout(d.bind(null,o,c,i),10):i(n):i(null,s)}))}return he.exports=function(o,c){if(c!==void 0&&typeof c!="function")throw new TypeError("argument callback must be a function");if(!c&&!kc.Promise)throw new TypeError("argument callback is required");return c?d(o,u,c):new Promise((function(i,n){d(o,u,(function(s,f){if(s)return n(s);i(f)}))}))},he.exports.sync=function(o){for(var c=null,i=0;i<u;i++)try{return t.randomBytes(o)}catch(n){c=n}throw c},he.exports}function uf(){if(uo)return ao;uo=1;var t=Vt();return ao=function(u,d){var o=String(u),c=String(d),i=t.pseudoRandomBytes(32);return(function(n,s){if(n.length!==s.length)return!1;if(t.timingSafeEqual)return t.timingSafeEqual(n,s);for(var f=0;f<n.length;f++)if(n[f]!==s[f])return!1;return!0})(t.createHmac("sha256",i).update(o).digest(),t.createHmac("sha256",i).update(c).digest())&&u===d}}function cf(){if(co)return Fe;co=1;var t=sf(),u=(function(){if(so)return fe.exports;so=1;var f=af(),r=/=+$/,e=/\+/g,a=/\//g;function p(m,b){f(m,(function(g,l){if(g)return b(g);b(null,h(l))}))}function h(m){return m.toString("base64").replace(r,"").replace(e,"-").replace(a,"_")}return fe.exports=function(m,b){if(b!==void 0&&typeof b!="function")throw new TypeError("argument callback must be a function");if(!b&&!kc.Promise)throw new TypeError("argument callback is required");return b?p(m,b):new Promise((function(g,l){p(m,(function(y,v){if(y)return l(y);g(v)}))}))},fe.exports.sync=function(m){return h(f.sync(m))},fe.exports})(),d=uf(),o=Vt(),c=/=/g,i=/\+/g,n=/\//g;function s(f){if(!(this instanceof s))return new s(f);var r=f||{},e=r.saltLength!==void 0?r.saltLength:8;if(typeof e!="number"||!isFinite(e)||e<1)throw new TypeError("option saltLength must be finite number > 1");var a=r.secretLength!==void 0?r.secretLength:18;if(typeof a!="number"||!isFinite(a)||a<1)throw new TypeError("option secretLength must be finite number > 1");this.saltLength=e,this.secretLength=a}return Fe=s,s.prototype.create=function(f){if(!f||typeof f!="string")throw new TypeError("argument secret is required");return this._tokenize(f,t(this.saltLength))},s.prototype.secret=function(f){return u(this.secretLength,f)},s.prototype.secretSync=function(){return u.sync(this.secretLength)},s.prototype._tokenize=function(f,r){return r+"-"+(e=r+"-"+f,o.createHash("sha1").update(e,"ascii").digest("base64").replace(i,"-").replace(n,"_").replace(c,""));var e},s.prototype.verify=function(f,r){if(!f||typeof f!="string"||!r||typeof r!="string")return!1;var e=r.indexOf("-");if(e===-1)return!1;var a=r.substr(0,e),p=this._tokenize(f,a);return d(r,p)},Fe}var lo,fo,ho={};function lf(){return fo?lo:(fo=1,lo=t=>encodeURIComponent(t).replace(/[!'()*]/g,(u=>`%${u.charCodeAt(0).toString(16).toUpperCase()}`)))}const po=new RegExp("(%[a-f0-9]{2})+","gi"),ff=/^[a-f\d]{2}$/i;function mo(t,u){if(t.codePointAt(u)!==37||u+3>t.length)return;const d=t.slice(u+1,u+3);return ff.test(d)?{byte:Number.parseInt(d,16),next:u+3}:void 0}function hf(t){return t>=128&&t<=191}function pf(t){try{return decodeURIComponent(t)}catch{let d="",o=0;for(;o<t.length;){if(t.codePointAt(o)!==37){d+=t.charAt(o),o++;continue}const c=mo(t,o);if(!c){d+=t.charAt(o),o++;continue}const i=(u=c.byte)<=127?1:u>=194&&u<=223?2:u>=224&&u<=239?3:u>=240&&u<=244?4:0;if(i===0){d+=t.slice(o,o+3),o+=3;continue}let n=c.next,s=!0;for(let f=1;f<i;f++){const r=mo(t,n);if(!r||!hf(r.byte)){s=!1;break}n=r.next}if(s){const f=t.slice(o,n);try{d+=decodeURIComponent(f),o=n;continue}catch{}}d+=t.slice(o,o+3),o+=3}return d}var u}const df=an(Object.freeze(Object.defineProperty({__proto__:null,default:function(t){if(typeof t!="string")throw new TypeError(`Expected \`encodedURI\` to be of type \`string\`, got \`${typeof t}\``);try{return decodeURIComponent(t)}catch{return(function(u){const d={"%FE%FF":"��","%FF%FE":"��"};let o=po.exec(u);for(;o;){try{d[o[0]]=decodeURIComponent(o[0])}catch{const i=pf(o[0]);i!==o[0]&&(d[o[0]]=i)}o=po.exec(u)}d["%C2"]="�";const c=Object.keys(d);for(const i of c)u=u.replace(new RegExp(i,"g"),d[i]);return u})(t)}}},Symbol.toStringTag,{value:"Module"})));var yo,go,vo,bo,wo;function mf(){return go?yo:(go=1,yo=(t,u)=>{if(typeof t!="string"||typeof u!="string")throw new TypeError("Expected the arguments to be of type `string`");if(u==="")return[t];const d=t.indexOf(u);return d===-1?[t]:[t.slice(0,d),t.slice(d+u.length)]})}function yf(){return wo||(wo=1,(function(t){const u=lf(),d=df,o=mf(),c=bo?vo:(bo=1,vo=function(h,m){for(var b={},g=Object.keys(h),l=Array.isArray(m),y=0;y<g.length;y++){var v=g[y],S=h[v];(l?m.indexOf(v)!==-1:m(v,S,h))&&(b[v]=S)}return b});function i(h){if(typeof h!="string"||h.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function n(h,m){return m.encode?m.strict?u(h):encodeURIComponent(h):h}function s(h,m){return m.decode?d(h):h}function f(h){return Array.isArray(h)?h.sort():typeof h=="object"?f(Object.keys(h)).sort(((m,b)=>Number(m)-Number(b))).map((m=>h[m])):h}function r(h){const m=h.indexOf("#");return m!==-1&&(h=h.slice(0,m)),h}function e(h){const m=(h=r(h)).indexOf("?");return m===-1?"":h.slice(m+1)}function a(h,m){return m.parseNumbers&&!Number.isNaN(Number(h))&&typeof h=="string"&&h.trim()!==""?h=Number(h):!m.parseBooleans||h===null||h.toLowerCase()!=="true"&&h.toLowerCase()!=="false"||(h=h.toLowerCase()==="true"),h}function p(h,m){i((m=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},m)).arrayFormatSeparator);const b=(function(l){let y;switch(l.arrayFormat){case"index":return(v,S,w)=>{y=/\[(\d*)\]$/.exec(v),v=v.replace(/\[\d*\]$/,""),y?(w[v]===void 0&&(w[v]={}),w[v][y[1]]=S):w[v]=S};case"bracket":return(v,S,w)=>{y=/(\[\])$/.exec(v),v=v.replace(/\[\]$/,""),y?w[v]!==void 0?w[v]=[].concat(w[v],S):w[v]=[S]:w[v]=S};case"comma":case"separator":return(v,S,w)=>{const _=typeof S=="string"&&S.includes(l.arrayFormatSeparator),M=typeof S=="string"&&!_&&s(S,l).includes(l.arrayFormatSeparator);S=M?s(S,l):S;const z=_||M?S.split(l.arrayFormatSeparator).map((k=>s(k,l))):S===null?S:s(S,l);w[v]=z};default:return(v,S,w)=>{w[v]!==void 0?w[v]=[].concat(w[v],S):w[v]=S}}})(m),g=Object.create(null);if(typeof h!="string"||!(h=h.trim().replace(/^[?#&]/,"")))return g;for(const l of h.split("&")){if(l==="")continue;let[y,v]=o(m.decode?l.replace(/\+/g," "):l,"=");v=v===void 0?null:["comma","separator"].includes(m.arrayFormat)?v:s(v,m),b(s(y,m),v,g)}for(const l of Object.keys(g)){const y=g[l];if(typeof y=="object"&&y!==null)for(const v of Object.keys(y))y[v]=a(y[v],m);else g[l]=a(y,m)}return m.sort===!1?g:(m.sort===!0?Object.keys(g).sort():Object.keys(g).sort(m.sort)).reduce(((l,y)=>{const v=g[y];return v&&typeof v=="object"&&!Array.isArray(v)?l[y]=f(v):l[y]=v,l}),Object.create(null))}t.extract=e,t.parse=p,t.stringify=(h,m)=>{if(!h)return"";i((m=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},m)).arrayFormatSeparator);const b=v=>m.skipNull&&h[v]==null||m.skipEmptyString&&h[v]==="",g=(function(v){switch(v.arrayFormat){case"index":return S=>(w,_)=>{const M=w.length;return _===void 0||v.skipNull&&_===null||v.skipEmptyString&&_===""?w:_===null?[...w,[n(S,v),"[",M,"]"].join("")]:[...w,[n(S,v),"[",n(M,v),"]=",n(_,v)].join("")]};case"bracket":return S=>(w,_)=>_===void 0||v.skipNull&&_===null||v.skipEmptyString&&_===""?w:_===null?[...w,[n(S,v),"[]"].join("")]:[...w,[n(S,v),"[]=",n(_,v)].join("")];case"comma":case"separator":return S=>(w,_)=>_==null||_.length===0?w:w.length===0?[[n(S,v),"=",n(_,v)].join("")]:[[w,n(_,v)].join(v.arrayFormatSeparator)];default:return S=>(w,_)=>_===void 0||v.skipNull&&_===null||v.skipEmptyString&&_===""?w:_===null?[...w,n(S,v)]:[...w,[n(S,v),"=",n(_,v)].join("")]}})(m),l={};for(const v of Object.keys(h))b(v)||(l[v]=h[v]);const y=Object.keys(l);return m.sort!==!1&&y.sort(m.sort),y.map((v=>{const S=h[v];return S===void 0?"":S===null?n(v,m):Array.isArray(S)?S.reduce(g(v),[]).join("&"):n(v,m)+"="+n(S,m)})).filter((v=>v.length>0)).join("&")},t.parseUrl=(h,m)=>{m=Object.assign({decode:!0},m);const[b,g]=o(h,"#");return Object.assign({url:b.split("?")[0]||"",query:p(e(h),m)},m&&m.parseFragmentIdentifier&&g?{fragmentIdentifier:s(g,m)}:{})},t.stringifyUrl=(h,m)=>{m=Object.assign({encode:!0,strict:!0},m);const b=r(h.url).split("?")[0]||"",g=t.extract(h.url),l=t.parse(g,{sort:!1}),y=Object.assign(l,h.query);let v=t.stringify(y,m);v&&(v=`?${v}`);let S=(function(w){let _="";const M=w.indexOf("#");return M!==-1&&(_=w.slice(M)),_})(h.url);return h.fragmentIdentifier&&(S=`#${n(h.fragmentIdentifier,m)}`),`${b}${v}${S}`},t.pick=(h,m,b)=>{b=Object.assign({parseFragmentIdentifier:!0},b);const{url:g,query:l,fragmentIdentifier:y}=t.parseUrl(h,b);return t.stringifyUrl({url:g,query:c(l,m),fragmentIdentifier:y},b)},t.exclude=(h,m,b)=>{const g=Array.isArray(m)?l=>!m.includes(l):(l,y)=>!m(l,y);return t.pick(h,g,b)}})(ho)),ho}var Eo,Ut={},qt={},_o={},Wt={};function Fc(){return Eo?Wt:(Eo=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.Emitter=class{constructor(){this._=[],this.$=Object.create(null)}on(t,u){(this.$[t]=this.$[t]||[]).push(u)}off(t,u){const d=this.$[t];d&&d.splice(d.indexOf(u)>>>0,1)}each(t){this._.push(t)}none(t){this._.splice(this._.indexOf(t)>>>0,1)}emit(t,...u){const d=this.$[t];d&&d.slice().forEach((o=>o(...u))),this._.slice().forEach((o=>o({type:t,args:u})))}},Wt.once=function(t,u,d){function o(...c){return t.off(u,o),d(...c)}return t.on(u,o),o},Wt)}var So,Be={},Oo,Gt={},jo,pe={};function be(){if(jo)return pe;jo=1,Object.defineProperty(pe,"__esModule",{value:!0});class t{constructor(d){this.object=Object.create(null),d&&this.extend(d)}set(d,o){this.object[d.toLowerCase()]=Array.isArray(o)?o.map(String):String(o)}append(d,o){const c=d.toLowerCase(),i=this.object[c];if(i===void 0)Array.isArray(o)?this.object[c]=o.map(String):this.object[c]=String(o);else if(Array.isArray(i))if(Array.isArray(o))for(const n of o)i.push(String(n));else i.push(String(o));else this.object[c]=Array.isArray(o)?[i,...o.map(String)]:[i,String(o)]}get(d){const o=this.object[d.toLowerCase()];return o===void 0?null:Array.isArray(o)?o[0]:o}getAll(d){const o=this.object[d.toLowerCase()];return o===void 0?[]:Array.isArray(o)?[...o]:[o]}has(d){return d.toLowerCase()in this.object}delete(d){delete this.object[d.toLowerCase()]}*entries(){yield*Object.entries(this.object)}*keys(){yield*Object.keys(this.object)}*values(){yield*Object.values(this.object)}clear(){this.object=Object.create(null)}asObject(){return Object.assign(Object.create(null),this.object)}extend(d){if(Symbol.iterator in d)for(const[o,c]of d)this.append(o,c);else if(d instanceof t)for(const[o,c]of d.entries())this.append(o,c);else for(const o of Object.keys(d)){const c=d[o];c!==void 0&&this.append(o,c)}}clone(){return new t(this.object)}}return pe.Headers=t,pe}var xo,Jt={};function we(){if(xo)return Jt;xo=1,Object.defineProperty(Jt,"__esModule",{value:!0});const t=Fc();class u extends t.Emitter{constructor(){super(),this.aborted=!1,t.once(this,"abort",(()=>this.aborted=!0))}}return Jt.Signal=u,Jt.AbortController=class{constructor(){this.signal=new u}abort(){this.signal.emit("abort")}},Jt}var ko,To,Ao={};function Bc(){return ko||(ko=1,(function(t){function u(d){const{$rawBody:o}=d;if(o===t.kBodyUsed)throw new TypeError("Body already used");if(o===t.kBodyDestroyed)throw new TypeError("Body is destroyed");return o}Object.defineProperty(t,"__esModule",{value:!0}),t.kBodyUsed=Symbol("bodyUsed"),t.kBodyDestroyed=Symbol("bodyDestroyed"),t.useRawBody=function(d){const o=u(d);return o===null?null:(d.$rawBody=t.kBodyUsed,o)},t.getRawBody=u})(Ao)),Ao}function Ro(){return To||(To=1,(function(t){function u(b){for(var g in b)t.hasOwnProperty(g)||(t[g]=b[g])}Object.defineProperty(t,"__esModule",{value:!0});const d=Fc(),o=(So||(So=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.byteLength=function(b){if(!b)return 0;for(var g=(b=b.toString()).length,l=b.length;l--;){var y=b.charCodeAt(l);56320<=y&&y<=57343&&l--,127<y&&y<=2047?g++:2047<y&&y<=65535&&(g+=2)}return g}),Be),c=(Oo||(Oo=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.expectNever=Gt.expectType=void 0,Gt.expectType=b=>{},Gt.expectNever=b=>{throw new TypeError("Unexpected value: "+b)}),Gt),i=be(),n=we(),s=Bc();function f(b){const g=new DataView(b);return new TextDecoder("utf-8").decode(g)}function r(b){return new TextEncoder().encode(b)}function e(b){const g=b.getReader();return(function l(y){return g.read().then((v=>{if(v.done)return y;const S=v.value,w=new Uint8Array(y.byteLength+S.byteLength);return w.set(y,0),w.set(S,y.byteLength),l(w)}))})(new Uint8Array(0))}u(be()),u(we());class a{constructor(g){const l=g===void 0?null:g;this.$rawBody=l}get bodyUsed(){return this.$rawBody===s.kBodyUsed||this.$rawBody===s.kBodyDestroyed}json(){return this.text().then((g=>JSON.parse(g)))}text(){const g=s.useRawBody(this);return g===null?Promise.resolve(""):typeof g=="string"?Promise.resolve(g):g instanceof ArrayBuffer?Promise.resolve(f(g)):e(g).then(f)}arrayBuffer(){const g=s.useRawBody(this);return g===null?Promise.resolve(new ArrayBuffer(0)):g instanceof ArrayBuffer?Promise.resolve(g):typeof g=="string"?Promise.resolve(r(g).buffer):e(g)}readableStream(){const g=s.useRawBody(this);return g===null?new ReadableStream({start(l){l.close()}}):typeof g=="string"?new ReadableStream({start(l){l.enqueue(r(g)),l.close()}}):g instanceof ArrayBuffer?new ReadableStream({start(l){l.enqueue(new Uint8Array(g)),l.close()}}):g}clone(){const g=s.getRawBody(this);if(g instanceof ReadableStream){const[l,y]=g.tee();return this.$rawBody=l,new a(y)}return new a(g)}destroy(){const g=s.getRawBody(this);return this.$rawBody=s.kBodyDestroyed,g instanceof ReadableStream?g.cancel():Promise.resolve()}}t.Body=a;class p extends a{constructor(g,l={}){const y=typeof g=="string"?void 0:g.clone(),v=l.body||(y?s.getRawBody(y):null),S=y&&!l.headers?y.headers:m(v,l.headers,l.omitDefaultHeaders===!0);super(v),this.url=typeof g=="string"?g:g.url,this.method=l.method||y&&y.method||"GET",this.signal=l.signal||y&&y.signal||new n.Signal,this.headers=S,this.trailer=y&&!l.trailer?y.trailer:Promise.resolve(l.trailer).then((w=>new i.Headers(w))),d.once(this.signal,"abort",(()=>this.destroy()))}clone(){const g=super.clone();return new p(this.url,{body:s.getRawBody(g),headers:this.headers.clone(),omitDefaultHeaders:!0,method:this.method,signal:this.signal,trailer:this.trailer.then((l=>l.clone()))})}}t.Request=p;class h extends a{get ok(){return this.status>=200&&this.status<300}constructor(g,l={}){const y=m(g,l.headers,l.omitDefaultHeaders===!0);super(g),this.status=l.status||200,this.statusText=l.statusText||"",this.headers=y,this.trailer=Promise.resolve(l.trailer).then((v=>new i.Headers(v)))}clone(){const g=super.clone();return new h(s.getRawBody(g),{status:this.status,statusText:this.statusText,headers:this.headers.clone(),omitDefaultHeaders:!0,trailer:this.trailer.then((l=>l.clone()))})}}function m(b,g,l){const y=new i.Headers(g);if(b==null)return y;if(typeof b=="string")return l||y.has("Content-Type")||y.set("Content-Type","text/plain"),l||y.has("Content-Length")||y.set("Content-Length",o.byteLength(b).toString()),y;if(l||y.has("Content-Type")||y.set("Content-Type","application/octet-stream"),b instanceof ArrayBuffer)return l||y.has("Content-Length")||y.set("Content-Length",String(b.byteLength)),y;if(b instanceof ReadableStream)return y;throw c.expectType(b),new TypeError("Unknown body type")}t.Response=h})(_o)),_o}var Io,wt={},Po,No,Lo,Xt={};function rn(){return Po||(Po=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.toFetch=void 0,Xt.toFetch=function(t,u){function d(){throw new TypeError("Invalid middleware stack, missing transport function")}return function(...o){const c=o.length===1&&o[0]instanceof u?o[0]:new u(...o);return t(c,d)}}),Xt}function gf(){return No||(No=1,(function(t){var u=qt&&qt.__createBinding||(Object.create?function(n,s,f,r){r===void 0&&(r=f),Object.defineProperty(n,r,{enumerable:!0,get:function(){return s[f]}})}:function(n,s,f,r){r===void 0&&(r=f),n[r]=s[f]}),d=qt&&qt.__exportStar||function(n,s){for(var f in n)f==="default"||Object.prototype.hasOwnProperty.call(s,f)||u(s,n,f)};Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=t.middleware=t.XhrResponse=t.transport=t.Request=void 0;const o=Ro();Object.defineProperty(t,"Request",{enumerable:!0,get:function(){return o.Request}});const c=(function(){if(Io)return wt;Io=1,Object.defineProperty(wt,"__esModule",{value:!0});const n=Ro(),s=Bc();class f extends n.Response{constructor(l,y){super(l,y),this.url=y.url}}wt.XhrResponse=f;class r extends Error{constructor(l,y){super(y),this.request=l,this.code="EBLOCKED"}}wt.BlockedRequestError=r;class e extends Error{constructor(l,y){super(y),this.request=l,this.code="EINVALID"}}wt.InvalidRequestError=e;class a extends Error{constructor(l,y){super(y),this.request=l,this.code="EUNAVAILABLE"}}wt.ConnectionError=a;class p extends Error{constructor(l,y){super(y),this.request=l,this.code="ECSP"}}wt.CSPError=p;class h extends Error{constructor(l,y){super(y),this.request=l,this.code="ETYPE"}}wt.TypeError=h;class m extends Error{constructor(l,y){super(y),this.request=l,this.code="EABORT"}}function b(g){const l=[],y=g.split(/\r?\n/);for(const v of y)if(v){const S=v.indexOf(":"),w=v.substr(0,S).trim(),_=v.substr(S+1).trim();l.push([w,_])}return l}return wt.AbortError=m,wt.transport=function(g={}){return function(l){return new Promise((function(y,v){const S=g.type||"arraybuffer",w=l.method.toUpperCase();if(l.signal.aborted)return v(new m(l,"Request has been aborted"));if(window.location.protocol==="https:"&&l.url.startsWith("http:"))return v(new r(l,`The connection to "${l.url}" is blocked`));if(/^https?\:\/*(?:[~#\\\?;\:]|$)/.test(l.url))return v(new e(l,`Refusing to connect to "${l.url}"`));const _=new XMLHttpRequest;let M=!1;function z(){const k=new f(S==="text"?_.responseText:_.response,{status:_.status===1223?204:_.status,statusText:_.statusText,headers:b(_.getAllResponseHeaders()),omitDefaultHeaders:!0,url:_.responseURL});return l.signal.emit("responseStarted"),l.signal.emit("responseEnded"),y(k)}_.onload=z,_.onabort=z,_.onerror=function(){return v(new a(l,`Unable to connect to "${l.url}"`))},_.onprogress=k=>{l.signal.emit("requestBytes",k.loaded)},w!=="GET"&&w!=="HEAD"&&_.upload&&(M=!0,_.upload.onprogress=k=>{l.signal.emit("responseBytes",k.loaded)},_.upload.onloadend=()=>{l.signal.emit("requestEnded")});try{_.open(w,l.url)}catch{return v(new p(l,`Refused to connect to "${l.url}"`))}if(g.withCredentials&&(_.withCredentials=!0),g.overrideMimeType&&_.overrideMimeType(g.overrideMimeType),S!=="text")try{_.responseType=S}finally{if(_.responseType!==S)return v(new h(l,`Unsupported type: ${S}`))}for(const[k,E]of l.headers.entries())if(Array.isArray(E))for(const j of E)_.setRequestHeader(k,j);else _.setRequestHeader(k,E);l.signal.emit("requestStarted"),M||l.signal.emit("requestEnded"),l.signal.on("abort",(()=>_.abort())),_.send(s.useRawBody(l))}))}},wt})();Object.defineProperty(t,"transport",{enumerable:!0,get:function(){return c.transport}}),Object.defineProperty(t,"XhrResponse",{enumerable:!0,get:function(){return c.XhrResponse}});const i=rn();d(rn(),t),d(we(),t),d(be(),t),t.middleware=c.transport(),t.fetch=i.toFetch(t.middleware,o.Request)})(qt)),qt}var $o,ct={};function Dt(){return $o||($o=1,ct.endianness=function(){return"LE"},ct.hostname=function(){return typeof location<"u"?location.hostname:""},ct.loadavg=function(){return[]},ct.uptime=function(){return 0},ct.freemem=function(){return Number.MAX_VALUE},ct.totalmem=function(){return Number.MAX_VALUE},ct.cpus=function(){return[]},ct.type=function(){return"Browser"},ct.release=function(){return typeof navigator<"u"?navigator.appVersion:""},ct.networkInterfaces=ct.getNetworkInterfaces=function(){return{}},ct.arch=function(){return"javascript"},ct.platform=function(){return"browser"},ct.tmpdir=ct.tmpDir=function(){return"/tmp"},ct.EOL=`
|
|
58
|
-
`,ct.homedir=function(){return"/"}),ct}var Ue,Mo,Co={},de={};function yt(){if(Mo)return Ue;function t(s){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(s)}function u(s,f,r){return f=i(f),(function(e,a){if(a&&(t(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p})(e)})(s,o()?Reflect.construct(f,r||[],i(s).constructor):f.apply(s,r))}function d(s){var f=typeof Map=="function"?new Map:void 0;return d=function(r){if(r===null||!(function(a){try{return Function.toString.call(a).indexOf("[native code]")!==-1}catch{return typeof a=="function"}})(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(f!==void 0){if(f.has(r))return f.get(r);f.set(r,e)}function e(){return(function(a,p,h){if(o())return Reflect.construct.apply(null,arguments);var m=[null];m.push.apply(m,p);var b=new(a.bind.apply(a,m));return h&&c(b,h.prototype),b})(r,arguments,i(this).constructor)}return e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),c(e,r)},d(s)}function o(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(o=function(){return!!s})()}function c(s,f){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},c(s,f)}function i(s){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},i(s)}Mo=1;var n=(function(s){function f(e){var a;return(function(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")})(this,f),a=u(this,f,[`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
59
|
-
Found: `.concat(e.toString().split(`
|
|
60
|
-
`)[0],`
|
|
61
|
-
`)]),Error.captureStackTrace(a,f),a}return(function(e,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&c(e,a)})(f,s),r=f,Object.defineProperty(r,"prototype",{writable:!1}),r;var r})(d(Error));return Ue=function(s){if(s.length>2)throw new n(s);function f(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}function r(e){return new f(e)}return f.prototype.transform=s,r.Format=f,r},Ue}var Do,Fo,Bo,Uo,qo,Qt={exports:{}},Go={exports:{}},zo={exports:{}},Zo={exports:{}};function vf(){return Do||(Do=1,(function(t){var u={};t.exports=u;var d={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(d).forEach((function(o){var c=d[o],i=u[o]=[];i.open="\x1B["+c[0]+"m",i.close="\x1B["+c[1]+"m"}))})(Zo)),Zo.exports}function bf(){return Bo?Fo:(Bo=1,Fo=function(t,u){var d=(u=u||Q.argv||[]).indexOf("--"),o=/^-{1,2}/.test(t)?"":"--",c=u.indexOf(o+t);return c!==-1&&(d===-1||c<d)})}function wf(){if(qo)return Uo;qo=1;var t=Dt(),u=bf(),d={},o=void 0;function c(i){var n=(function(s){if(o===!1)return 0;if(u("color=16m")||u("color=full")||u("color=truecolor"))return 3;if(u("color=256"))return 2;if(s&&!s.isTTY&&o!==!0)return 0;var f=o?1:0;if(Q.platform==="win32"){var r=t.release().split(".");return Number(Q.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in d)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(a){return a in d}))||d.CI_NAME==="codeship"?1:f;if("TEAMCITY_VERSION"in d)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in d){var e=parseInt((d.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(d.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(d.TERM)||"COLORTERM"in d?1:f})(i);return(function(s){return s!==0&&{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}})(n)}return u("no-color")||u("no-colors")||u("color=false")?o=!1:(u("color")||u("colors")||u("color=true")||u("color=always"))&&(o=!0),"FORCE_COLOR"in d&&(o=d.FORCE_COLOR.length===0||parseInt(d.FORCE_COLOR,10)!==0),Uo={supportsColor:c,stdout:c(Q.stdout),stderr:c(Q.stderr)}}var Ho,Vo={exports:{}},Yo,Ko={exports:{}},Wo,Jo={exports:{}},Xo,Qo={exports:{}},ti,ei={exports:{}},ri,ni,oi,ii={exports:{}};function Ef(){return ni||(ni=1,(function(t){var u={};t.exports=u,u.themes={};var d=lt(),o=u.styles=vf(),c=Object.defineProperties,i=new RegExp(/[\r\n]+/g);u.supportsColor=wf().supportsColor,u.enabled===void 0&&(u.enabled=u.supportsColor()!==!1),u.enable=function(){u.enabled=!0},u.disable=function(){u.enabled=!1},u.stripColors=u.strip=function(m){return(""+m).replace(/\x1B\[\d+m/g,"")},u.stylize=function(m,b){if(!u.enabled)return m+"";var g=o[b];return!g&&b in u?u[b](m):g.open+m+g.close};var n=/[|\\{}()[\]^$+*?.]/g;function s(m){var b=function g(){return a.apply(g,arguments)};return b._styles=m,b.__proto__=e,b}var f,r=(f={},o.grey=o.gray,Object.keys(o).forEach((function(m){o[m].closeRe=new RegExp((function(b){if(typeof b!="string")throw new TypeError("Expected a string");return b.replace(n,"\\$&")})(o[m].close),"g"),f[m]={get:function(){return s(this._styles.concat(m))}}})),f),e=c((function(){}),r);function a(){var m=Array.prototype.slice.call(arguments).map((function(v){return v!=null&&v.constructor===String?v:d.inspect(v)})).join(" ");if(!u.enabled||!m)return m;for(var b=m.indexOf(`
|
|
62
|
-
`)!=-1,g=this._styles,l=g.length;l--;){var y=o[g[l]];m=y.open+m.replace(y.closeRe,y.open)+y.close,b&&(m=m.replace(i,(function(v){return y.close+v+y.open})))}return m}u.setTheme=function(m){if(typeof m!="string")for(var b in m)(function(g){u[g]=function(l){if(typeof m[g]=="object"){var y=l;for(var v in m[g])y=u[m[g][v]](y);return y}return u[m[g]](l)}})(b);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var p=function(m,b){var g=b.split("");return(g=g.map(m)).join("")};for(var h in u.trap=(Ho||(Ho=1,Vo.exports=function(m,b){var g="";m=(m=m||"Run the trap, drop the bass").split("");var l={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:["Ƶ","ɀ"]};return m.forEach((function(y){y=y.toLowerCase();var v=l[y]||[" "],S=Math.floor(Math.random()*v.length);g+=l[y]!==void 0?l[y][S]:y})),g}),Vo.exports),u.zalgo=(Yo||(Yo=1,Ko.exports=function(m,b){m=m||" he is here ";var g={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},l=[].concat(g.up,g.down,g.mid);function y(S){return Math.floor(Math.random()*S)}function v(S){var w=!1;return l.filter((function(_){w=_===S})),w}return(function(S,w){var _,M,z="";for(M in(w=w||{}).up=w.up===void 0||w.up,w.mid=w.mid===void 0||w.mid,w.down=w.down===void 0||w.down,w.size=w.size!==void 0?w.size:"maxi",S=S.split(""))if(!v(M)){switch(z+=S[M],_={up:0,down:0,mid:0},w.size){case"mini":_.up=y(8),_.mid=y(2),_.down=y(8);break;case"maxi":_.up=y(16)+3,_.mid=y(4)+1,_.down=y(64)+3;break;default:_.up=y(8)+1,_.mid=y(6)/2,_.down=y(8)+1}var k=["up","mid","down"];for(var E in k)for(var j=k[E],x=0;x<=_[j];x++)w[j]&&(z+=g[j][y(g[j].length)])}return z})(m,b)}),Ko.exports),u.maps={},u.maps.america=(Wo||(Wo=1,Jo.exports=function(m){return function(b,g,l){if(b===" ")return b;switch(g%3){case 0:return m.red(b);case 1:return m.white(b);case 2:return m.blue(b)}}}),Jo.exports)(u),u.maps.zebra=(Xo||(Xo=1,Qo.exports=function(m){return function(b,g,l){return g%2==0?b:m.inverse(b)}}),Qo.exports)(u),u.maps.rainbow=(ti||(ti=1,ei.exports=function(m){var b=["red","yellow","green","blue","magenta"];return function(g,l,y){return g===" "?g:m[b[l++%b.length]](g)}}),ei.exports)(u),u.maps.random=(ri||(ri=1,ii.exports=function(m){var b=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(g,l,y){return g===" "?g:m[b[Math.round(Math.random()*(b.length-2))]](g)}}),ii.exports)(u),u.maps)(function(m){u[m]=function(b){return p(u.maps[m],b)}})(h);c(u,(function(){var m={};return Object.keys(r).forEach((function(b){m[b]={get:function(){return s([b])}}})),m})())})(zo)),zo.exports}function Uc(){return oi||(oi=1,(function(t){var u=Ef();t.exports=u})(Go)),Go.exports}var si,ai={},ui={},qe={},ci,Ge={},li,fi,hi,pi,ze,di,mi,yi,Ze={};function _f(){return fi||(fi=1,t=ui,Object.defineProperty(t,"cli",{value:(si||(si=1,qe.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},qe.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}),qe)}),Object.defineProperty(t,"npm",{value:(ci||(ci=1,Ge.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},Ge.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}),Ge)}),Object.defineProperty(t,"syslog",{value:(li||(li=1,Ze.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},Ze.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}),Ze)})),ui;var t}function at(){return hi||(hi=1,t=ai,Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:_f()})),ai;var t}function nn(){if(pi)return Qt.exports;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function u(r,e){for(var a=0;a<e.length;a++){var p=e[a];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(r,d(p.key),p)}}function d(r){var e=(function(a,p){if(t(a)!="object"||!a)return a;var h=a[Symbol.toPrimitive];if(h!==void 0){var m=h.call(a,p);if(t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return t(e)=="symbol"?e:e+""}pi=1;var o=Uc(),c=at(),i=c.LEVEL,n=c.MESSAGE;o.enabled=!0;var s=/\s+/,f=(function(){function r(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")})(this,r),h.colors&&this.addColors(h.colors),this.options=h}return e=r,p=[{key:"addColors",value:function(h){var m=Object.keys(h).reduce((function(b,g){return b[g]=s.test(h[g])?h[g].split(s):h[g],b}),{});return r.allColors=Object.assign({},r.allColors||{},m),r.allColors}}],(a=[{key:"addColors",value:function(h){return r.addColors(h)}},{key:"colorize",value:function(h,m,b){if(b===void 0&&(b=m),!Array.isArray(r.allColors[h]))return o[r.allColors[h]](b);for(var g=0,l=r.allColors[h].length;g<l;g++)b=o[r.allColors[h][g]](b);return b}},{key:"transform",value:function(h,m){return m.all&&typeof h[n]=="string"&&(h[n]=this.colorize(h[i],h.level,h[n])),(m.level||m.all||!m.message)&&(h.level=this.colorize(h[i],h.level)),(m.all||m.message)&&(h.message=this.colorize(h[i],h.level,h.message)),h}}])&&u(e.prototype,a),p&&u(e,p),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,a,p})();return Qt.exports=function(r){return new f(r)},Qt.exports.Colorizer=Qt.exports.Format=f,Qt.exports}function Sf(){if(yi)return mi;yi=1;var t=yt();return mi=t((function(u){return u.message=" ".concat(u.message),u}))}var gi,vi,me={exports:{}},te={exports:{}};function qc(){if(gi)return te.exports;function t(e){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t(e)}function u(e){return(function(a){if(Array.isArray(a))return d(a)})(e)||(function(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)})(e)||(function(a,p){if(a){if(typeof a=="string")return d(a,p);var h={}.toString.call(a).slice(8,-1);return h==="Object"&&a.constructor&&(h=a.constructor.name),h==="Map"||h==="Set"?Array.from(a):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?d(a,p):void 0}})(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function d(e,a){(a==null||a>e.length)&&(a=e.length);for(var p=0,h=Array(a);p<a;p++)h[p]=e[p];return h}function o(e,a){for(var p=0;p<a.length;p++){var h=a[p];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(e,c(h.key),h)}}function c(e){var a=(function(p,h){if(t(p)!="object"||!p)return p;var m=p[Symbol.toPrimitive];if(m!==void 0){var b=m.call(p,h);if(t(b)!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)})(e,"string");return t(a)=="symbol"?a:a+""}gi=1;var i=at(),n=i.configs,s=i.LEVEL,f=i.MESSAGE,r=(function(){function e(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{levels:n.npm.levels};(function(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")})(this,e),this.paddings=e.paddingForLevels(m.levels,m.filler),this.options=m}return a=e,h=[{key:"getLongestLevel",value:function(m){var b=Object.keys(m).map((function(g){return g.length}));return Math.max.apply(Math,u(b))}},{key:"paddingForLevel",value:function(m,b,g){var l=g+1-m.length,y=Math.floor(l/b.length);return"".concat(b).concat(b.repeat(y)).slice(0,l)}},{key:"paddingForLevels",value:function(m){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" ",g=e.getLongestLevel(m);return Object.keys(m).reduce((function(l,y){return l[y]=e.paddingForLevel(y,b,g),l}),{})}}],(p=[{key:"transform",value:function(m,b){return m.message="".concat(this.paddings[m[s]]).concat(m.message),m[f]&&(m[f]="".concat(this.paddings[m[s]]).concat(m[f])),m}}])&&o(a.prototype,p),h&&o(a,h),Object.defineProperty(a,"prototype",{writable:!1}),a;var a,p,h})();return te.exports=function(e){return new r(e)},te.exports.Padder=te.exports.Format=r,te.exports}function Of(){if(vi)return me.exports;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function u(r,e,a){return e&&(function(p,h){for(var m=0;m<h.length;m++){var b=h[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,d(b.key),b)}})(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function d(r){var e=(function(a,p){if(t(a)!="object"||!a)return a;var h=a[Symbol.toPrimitive];if(h!==void 0){var m=h.call(a,p);if(t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return t(e)=="symbol"?e:e+""}vi=1;var o=nn().Colorizer,c=qc().Padder,i=at(),n=i.configs,s=i.MESSAGE,f=(function(){return u((function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")})(this,r),e.levels||(e.levels=n.cli.levels),this.colorizer=new o(e),this.padder=new c(e),this.options=e}),[{key:"transform",value:function(r,e){return this.colorizer.transform(this.padder.transform(r,e),e),r[s]="".concat(r.level,":").concat(r.message),r}}])})();return me.exports=function(r){return new f(r)},me.exports.Format=f,me.exports}var bi,wi,Ei,ye={exports:{}};function jf(){if(bi)return ye.exports;bi=1;var t=yt();function u(o){if(o.every(d))return function(c){for(var i=c,n=0;n<o.length;n++)if(!(i=o[n].transform(i,o[n].options)))return!1;return i}}function d(o){if(typeof o.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
64
|
-
`));return!0}return ye.exports=function(){for(var o=arguments.length,c=new Array(o),i=0;i<o;i++)c[i]=arguments[i];var n=t(u(c)),s=n();return s.Format=n.Format,s},ye.exports.cascade=u,ye.exports}function xf(){if(Ei)return wi;function t(n){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t(n)}function u(n,s,f){return(s=(function(r){var e=(function(a,p){if(t(a)!="object"||!a)return a;var h=a[Symbol.toPrimitive];if(h!==void 0){var m=h.call(a,p);if(t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(a)})(r,"string");return t(e)=="symbol"?e:e+""})(s))in n?Object.defineProperty(n,s,{value:f,enumerable:!0,configurable:!0,writable:!0}):n[s]=f,n}Ei=1;var d=yt(),o=at(),c=o.LEVEL,i=o.MESSAGE;return wi=d((function(n,s){var f=s.stack,r=s.cause;if(n instanceof Error){var e=Object.assign({},n,u(u(u({level:n.level},c,n[c]||n.level),"message",n.message),i,n[i]||n.message));return f&&(e.stack=n.stack),r&&(e.cause=n.cause),e}if(!(n.message instanceof Error))return n;var a=n.message;return Object.assign(n,a),n.message=a.message,n[i]=a.message,f&&(n.stack=a.stack),r&&(n.cause=a.cause),n}))}var _i,Si,Oi,ji,xi,ki,Ti,He,Ai,Ri,Ii,Pi,Ni,Ve,Li,Ye={exports:{}};function ce(){return _i||(_i=1,(function(t,u){const{hasOwnProperty:d}=Object.prototype,o=p();o.configure=p,o.stringify=o,o.default=o,u.stringify=o,u.configure=p,t.exports=o;const c=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function i(h){return h.length<5e3&&!c.test(h)?`"${h}"`:JSON.stringify(h)}function n(h,m){if(h.length>200||m)return h.sort(m);for(let b=1;b<h.length;b++){const g=h[b];let l=b;for(;l!==0&&h[l-1]>g;)h[l]=h[l-1],l--;h[l]=g}return h}const s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function f(h){return s.call(h)!==void 0&&h.length!==0}function r(h,m,b){h.length<b&&(b=h.length);const g=m===","?"":" ";let l=`"0":${g}${h[0]}`;for(let y=1;y<b;y++)l+=`${m}"${y}":${g}${h[y]}`;return l}function e(h,m){let b;if(d.call(h,m)){if(b=h[m],typeof b!="number")throw new TypeError(`The "${m}" argument must be of type number`);if(!Number.isInteger(b))throw new TypeError(`The "${m}" argument must be an integer`);if(b<1)throw new RangeError(`The "${m}" argument must be >= 1`)}return b===void 0?1/0:b}function a(h){return h===1?"1 item":`${h} items`}function p(h){const m=(function(k){if(d.call(k,"strict")){const E=k.strict;if(typeof E!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(E)return j=>{let x="Object can not safely be stringified. Received type "+typeof j;throw typeof j!="function"&&(x+=` (${j.toString()})`),new Error(x)}}})(h={...h});m&&(h.bigint===void 0&&(h.bigint=!1),"circularValue"in h||(h.circularValue=Error));const b=(function(k){if(d.call(k,"circularValue")){const E=k.circularValue;if(typeof E=="string")return`"${E}"`;if(E==null)return E;if(E===Error||E===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'})(h),g=(function(k,E){let j;if(d.call(k,E)&&(j=k[E],typeof j!="boolean"))throw new TypeError(`The "${E}" argument must be of type boolean`);return j===void 0||j})(h,"bigint"),l=(function(k){let E;if(d.call(k,"deterministic")&&(E=k.deterministic,typeof E!="boolean"&&typeof E!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return E===void 0||E})(h),y=typeof l=="function"?l:void 0,v=e(h,"maximumDepth"),S=e(h,"maximumBreadth");function w(k,E,j,x,O,$){let N=E[k];switch(typeof N=="object"&&N!==null&&typeof N.toJSON=="function"&&(N=N.toJSON(k)),N=x.call(E,k,N),typeof N){case"string":return i(N);case"object":{if(N===null)return"null";if(j.indexOf(N)!==-1)return b;let P="",G=",";const A=$;if(Array.isArray(N)){if(N.length===0)return"[]";if(v<j.length+1)return'"[Array]"';j.push(N),O!==""&&(P+=`
|
|
65
|
-
${$+=O}`,G=`,
|
|
66
|
-
${$}`);const F=Math.min(N.length,S);let L=0;for(;L<F-1;L++){const Z=w(String(L),N,j,x,O,$);P+=Z!==void 0?Z:"null",P+=G}const U=w(String(L),N,j,x,O,$);return P+=U!==void 0?U:"null",N.length-1>S&&(P+=`${G}"... ${a(N.length-S-1)} not stringified"`),O!==""&&(P+=`
|
|
67
|
-
${A}`),j.pop(),`[${P}]`}let I=Object.keys(N);const R=I.length;if(R===0)return"{}";if(v<j.length+1)return'"[Object]"';let B="",V="";O!==""&&(G=`,
|
|
68
|
-
${$+=O}`,B=" ");const J=Math.min(R,S);l&&!f(N)&&(I=n(I,y)),j.push(N);for(let F=0;F<J;F++){const L=I[F],U=w(L,N,j,x,O,$);U!==void 0&&(P+=`${V}${i(L)}:${B}${U}`,V=G)}return R>S&&(P+=`${V}"...":${B}"${a(R-S)} not stringified"`,V=G),O!==""&&V.length>1&&(P=`
|
|
69
|
-
${$}${P}
|
|
70
|
-
${A}`),j.pop(),`{${P}}`}case"number":return isFinite(N)?String(N):m?m(N):"null";case"boolean":return N===!0?"true":"false";case"undefined":return;case"bigint":if(g)return String(N);default:return m?m(N):void 0}}function _(k,E,j,x,O,$){switch(typeof E=="object"&&E!==null&&typeof E.toJSON=="function"&&(E=E.toJSON(k)),typeof E){case"string":return i(E);case"object":{if(E===null)return"null";if(j.indexOf(E)!==-1)return b;const N=$;let P="",G=",";if(Array.isArray(E)){if(E.length===0)return"[]";if(v<j.length+1)return'"[Array]"';j.push(E),O!==""&&(P+=`
|
|
71
|
-
${$+=O}`,G=`,
|
|
72
|
-
${$}`);const R=Math.min(E.length,S);let B=0;for(;B<R-1;B++){const J=_(String(B),E[B],j,x,O,$);P+=J!==void 0?J:"null",P+=G}const V=_(String(B),E[B],j,x,O,$);return P+=V!==void 0?V:"null",E.length-1>S&&(P+=`${G}"... ${a(E.length-S-1)} not stringified"`),O!==""&&(P+=`
|
|
73
|
-
${N}`),j.pop(),`[${P}]`}j.push(E);let A="";O!==""&&(G=`,
|
|
74
|
-
${$+=O}`,A=" ");let I="";for(const R of x){const B=_(R,E[R],j,x,O,$);B!==void 0&&(P+=`${I}${i(R)}:${A}${B}`,I=G)}return O!==""&&I.length>1&&(P=`
|
|
75
|
-
${$}${P}
|
|
76
|
-
${N}`),j.pop(),`{${P}}`}case"number":return isFinite(E)?String(E):m?m(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(g)return String(E);default:return m?m(E):void 0}}function M(k,E,j,x,O){switch(typeof E){case"string":return i(E);case"object":{if(E===null)return"null";if(typeof E.toJSON=="function"){if(typeof(E=E.toJSON(k))!="object")return M(k,E,j,x,O);if(E===null)return"null"}if(j.indexOf(E)!==-1)return b;const $=O;if(Array.isArray(E)){if(E.length===0)return"[]";if(v<j.length+1)return'"[Array]"';j.push(E);let B=`
|
|
77
|
-
${O+=x}`;const V=`,
|
|
78
|
-
${O}`,J=Math.min(E.length,S);let F=0;for(;F<J-1;F++){const U=M(String(F),E[F],j,x,O);B+=U!==void 0?U:"null",B+=V}const L=M(String(F),E[F],j,x,O);return B+=L!==void 0?L:"null",E.length-1>S&&(B+=`${V}"... ${a(E.length-S-1)} not stringified"`),B+=`
|
|
79
|
-
${$}`,j.pop(),`[${B}]`}let N=Object.keys(E);const P=N.length;if(P===0)return"{}";if(v<j.length+1)return'"[Object]"';const G=`,
|
|
80
|
-
${O+=x}`;let A="",I="",R=Math.min(P,S);f(E)&&(A+=r(E,G,S),N=N.slice(E.length),R-=E.length,I=G),l&&(N=n(N,y)),j.push(E);for(let B=0;B<R;B++){const V=N[B],J=M(V,E[V],j,x,O);J!==void 0&&(A+=`${I}${i(V)}: ${J}`,I=G)}return P>S&&(A+=`${I}"...": "${a(P-S)} not stringified"`,I=G),I!==""&&(A=`
|
|
81
|
-
${O}${A}
|
|
82
|
-
${$}`),j.pop(),`{${A}}`}case"number":return isFinite(E)?String(E):m?m(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(g)return String(E);default:return m?m(E):void 0}}function z(k,E,j){switch(typeof E){case"string":return i(E);case"object":{if(E===null)return"null";if(typeof E.toJSON=="function"){if(typeof(E=E.toJSON(k))!="object")return z(k,E,j);if(E===null)return"null"}if(j.indexOf(E)!==-1)return b;let x="";const O=E.length!==void 0;if(O&&Array.isArray(E)){if(E.length===0)return"[]";if(v<j.length+1)return'"[Array]"';j.push(E);const A=Math.min(E.length,S);let I=0;for(;I<A-1;I++){const B=z(String(I),E[I],j);x+=B!==void 0?B:"null",x+=","}const R=z(String(I),E[I],j);return x+=R!==void 0?R:"null",E.length-1>S&&(x+=`,"... ${a(E.length-S-1)} not stringified"`),j.pop(),`[${x}]`}let $=Object.keys(E);const N=$.length;if(N===0)return"{}";if(v<j.length+1)return'"[Object]"';let P="",G=Math.min(N,S);O&&f(E)&&(x+=r(E,",",S),$=$.slice(E.length),G-=E.length,P=","),l&&($=n($,y)),j.push(E);for(let A=0;A<G;A++){const I=$[A],R=z(I,E[I],j);R!==void 0&&(x+=`${P}${i(I)}:${R}`,P=",")}return N>S&&(x+=`${P}"...":"${a(N-S)} not stringified"`),j.pop(),`{${x}}`}case"number":return isFinite(E)?String(E):m?m(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(g)return String(E);default:return m?m(E):void 0}}return function(k,E,j){if(arguments.length>1){let x="";if(typeof j=="number"?x=" ".repeat(Math.min(j,10)):typeof j=="string"&&(x=j.slice(0,10)),E!=null){if(typeof E=="function")return w("",{"":k},[],E,x,"");if(Array.isArray(E))return _("",k,[],(function(O){const $=new Set;for(const N of O)typeof N!="string"&&typeof N!="number"||$.add(String(N));return $})(E),x,"")}if(x.length!==0)return M("",k,[],x,"")}return z("",k,[])}}})(Ye,Ye.exports)),Ye.exports}function kf(){if(Oi)return Si;Oi=1;var t=yt(),u=at().MESSAGE,d=ce();function o(c,i){return typeof i=="bigint"?i.toString():i}return Si=t((function(c,i){var n=d.configure(i);return c[u]=n(c,i.replacer||o,i.space),c}))}function Tf(){if(xi)return ji;xi=1;var t=yt();return ji=t((function(u,d){return d.message?(u.message="[".concat(d.label,"] ").concat(u.message),u):(u.label=d.label,u)}))}function Af(){if(Ti)return ki;Ti=1;var t=yt(),u=at().MESSAGE,d=ce();return ki=t((function(o){var c={};return o.message&&(c["@message"]=o.message,delete o.message),o.timestamp&&(c["@timestamp"]=o.timestamp,delete o.timestamp),c["@fields"]=o,o[u]=d(c),o}))}function Rf(){if(Ai)return He;function t(o){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(o)}function u(o,c,i){return(c=(function(n){var s=(function(f,r){if(t(f)!="object"||!f)return f;var e=f[Symbol.toPrimitive];if(e!==void 0){var a=e.call(f,r);if(t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(f)})(n,"string");return t(s)=="symbol"?s:s+""})(c))in o?Object.defineProperty(o,c,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[c]=i,o}Ai=1;var d=yt();return He=d((function(o){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i="metadata";c.key&&(i=c.key);var n=[];return c.fillExcept||c.fillWith||(n.push("level"),n.push("message")),c.fillExcept&&(n=c.fillExcept),n.length>0?(function(s,f,r){var e=f.reduce((function(p,h){return p[h]=s[h],delete s[h],p}),{}),a=Object.keys(s).reduce((function(p,h){return p[h]=s[h],delete s[h],p}),{});return Object.assign(s,e,u({},r,a)),s})(o,n,i):c.fillWith?(function(s,f,r){return s[r]=f.reduce((function(e,a){return e[a]=s[a],delete s[a],e}),{}),s})(o,c.fillWith,i):o})),He}function Gc(){if(Ii)return Ri;Ii=1;var t=1e3,u=60*t,d=60*u,o=24*d,c=7*o,i=365.25*o;function n(s,f,r,e){var a=f>=1.5*r;return Math.round(s/r)+" "+e+(a?"s":"")}return Ri=function(s,f){f=f||{};var r=typeof s;if(r==="string"&&s.length>0)return(function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var p=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*c;case"days":case"day":case"d":return p*o;case"hours":case"hour":case"hrs":case"hr":case"h":return p*d;case"minutes":case"minute":case"mins":case"min":case"m":return p*u;case"seconds":case"second":case"secs":case"sec":case"s":return p*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}})(s);if(r==="number"&&isFinite(s))return f.long?(function(e){var a=Math.abs(e);return a>=o?n(e,a,o,"day"):a>=d?n(e,a,d,"hour"):a>=u?n(e,a,u,"minute"):a>=t?n(e,a,t,"second"):e+" ms"})(s):(function(e){var a=Math.abs(e);return a>=o?Math.round(e/o)+"d":a>=d?Math.round(e/d)+"h":a>=u?Math.round(e/u)+"m":a>=t?Math.round(e/t)+"s":e+"ms"})(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}function If(){if(Ni)return Pi;Ni=1;var t=void 0,u=yt(),d=Gc();return Pi=u((function(o){var c=+new Date;return t.diff=c-(t.prevTime||c),t.prevTime=c,o.ms="+".concat(d(t.diff)),o}))}function Pf(){if(Li)return Ve;Li=1;var t=lt().inspect,u=yt(),d=at(),o=d.LEVEL,c=d.MESSAGE,i=d.SPLAT;return Ve=u((function(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=Object.assign({},n);return delete f[o],delete f[c],delete f[i],n[c]=t(f,!1,s.depth||null,s.colorize),n})),Ve}var $i,Mi,Ci,Di,Fi,ee={exports:{}};function Nf(){if($i)return ee.exports;function t(i){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t(i)}function u(i,n,s){return n&&(function(f,r){for(var e=0;e<r.length;e++){var a=r[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,d(a.key),a)}})(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i}function d(i){var n=(function(s,f){if(t(s)!="object"||!s)return s;var r=s[Symbol.toPrimitive];if(r!==void 0){var e=r.call(s,f);if(t(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)})(i,"string");return t(n)=="symbol"?n:n+""}$i=1;var o=at().MESSAGE,c=(function(){return u((function i(n){(function(s,f){if(!(s instanceof f))throw new TypeError("Cannot call a class as a function")})(this,i),this.template=n}),[{key:"transform",value:function(i){return i[o]=this.template(i),i}}])})();return ee.exports=function(i){return new c(i)},ee.exports.Printf=ee.exports.Format=c,ee.exports}function Lf(){if(Ci)return Mi;Ci=1;var t=yt(),u=at().MESSAGE,d=ce();return Mi=t((function(o){var c=d(Object.assign({},o,{level:void 0,message:void 0,splat:void 0})),i=o.padding&&o.padding[o.level]||"";return o[u]=c!=="{}"?"".concat(o.level,":").concat(i," ").concat(o.message," ").concat(c):"".concat(o.level,":").concat(i," ").concat(o.message),o}))}function $f(){if(Fi)return Di;function t(e){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t(e)}function u(e){return(function(a){if(Array.isArray(a))return d(a)})(e)||(function(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)})(e)||(function(a,p){if(a){if(typeof a=="string")return d(a,p);var h={}.toString.call(a).slice(8,-1);return h==="Object"&&a.constructor&&(h=a.constructor.name),h==="Map"||h==="Set"?Array.from(a):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?d(a,p):void 0}})(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
83
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function d(e,a){(a==null||a>e.length)&&(a=e.length);for(var p=0,h=Array(a);p<a;p++)h[p]=e[p];return h}function o(e,a,p){return a&&(function(h,m){for(var b=0;b<m.length;b++){var g=m[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,c(g.key),g)}})(e.prototype,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var a=(function(p,h){if(t(p)!="object"||!p)return p;var m=p[Symbol.toPrimitive];if(m!==void 0){var b=m.call(p,h);if(t(b)!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)})(e,"string");return t(a)=="symbol"?a:a+""}Fi=1;var i=lt(),n=at().SPLAT,s=/%[scdjifoO%]/g,f=/%%/g,r=(function(){return o((function e(a){(function(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),this.options=a}),[{key:"_splat",value:function(e,a){var p=e.message,h=e[n]||e.splat||[],m=p.match(f),b=m&&m.length||0,g=a.length-b-h.length,l=g<0?h.splice(g,-1*g):[],y=l.length;if(y)for(var v=0;v<y;v++)Object.assign(e,l[v]);return e.message=i.format.apply(i,[p].concat(u(h))),e}},{key:"transform",value:function(e){var a=e.message,p=e[n]||e.splat;if(!p||!p.length)return e;var h=a&&a.match&&a.match(s);if(!h&&(p||p.length)){var m=p.length>1?p.splice(0):p,b=m.length;if(b)for(var g=0;g<b;g++)Object.assign(e,m[g]);return e}return h?this._splat(e,h):e}}])})();return Di=function(e){return new r(e)}}var zc=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,$t="\\d\\d?",Lt="\\d\\d",ne="[^\\s]+",Zc=/\[([^]*?)\]/gm;function Hc(t,u){for(var d=[],o=0,c=t.length;o<c;o++)d.push(t[o].substr(0,u));return d}var Bi=function(t){return function(u,d){var o=d[t].map((function(i){return i.toLowerCase()})),c=o.indexOf(u.toLowerCase());return c>-1?c:null}};function Mt(t){for(var u=[],d=1;d<arguments.length;d++)u[d-1]=arguments[d];for(var o=0,c=u;o<c.length;o++){var i=c[o];for(var n in i)t[n]=i[n]}return t}var Ui=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Vc=["January","February","March","April","May","June","July","August","September","October","November","December"],Mf=Hc(Vc,3),ln={dayNamesShort:Hc(Ui,3),dayNames:Ui,monthNamesShort:Mf,monthNames:Vc,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},Ee=Mt({},ln),Yc=function(t){return Ee=Mt(Ee,t)},qi=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},pt=function(t,u){for(u===void 0&&(u=2),t=String(t);t.length<u;)t="0"+t;return t},Cf={D:function(t){return String(t.getDate())},DD:function(t){return pt(t.getDate())},Do:function(t,u){return u.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return pt(t.getDay())},ddd:function(t,u){return u.dayNamesShort[t.getDay()]},dddd:function(t,u){return u.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return pt(t.getMonth()+1)},MMM:function(t,u){return u.monthNamesShort[t.getMonth()]},MMMM:function(t,u){return u.monthNames[t.getMonth()]},YY:function(t){return pt(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return pt(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return pt(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return pt(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return pt(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return pt(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return pt(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return pt(t.getMilliseconds(),3)},a:function(t,u){return t.getHours()<12?u.amPm[0]:u.amPm[1]},A:function(t,u){return t.getHours()<12?u.amPm[0].toUpperCase():u.amPm[1].toUpperCase()},ZZ:function(t){var u=t.getTimezoneOffset();return(u>0?"-":"+")+pt(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4)},Z:function(t){var u=t.getTimezoneOffset();return(u>0?"-":"+")+pt(Math.floor(Math.abs(u)/60),2)+":"+pt(Math.abs(u)%60,2)}},Gi=function(t){return+t-1},zi=[null,$t],Zi=[null,ne],Hi=["isPm",ne,function(t,u){var d=t.toLowerCase();return d===u.amPm[0]?0:d===u.amPm[1]?1:null}],Vi=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var u=(t+"").match(/([+-]|\d\d)/gi);if(u){var d=60*+u[1]+parseInt(u[2],10);return u[0]==="+"?d:-d}return 0}],Df={D:["day",$t],DD:["day",Lt],Do:["day",$t+ne,function(t){return parseInt(t,10)}],M:["month",$t,Gi],MM:["month",Lt,Gi],YY:["year",Lt,function(t){var u=+(""+new Date().getFullYear()).substr(0,2);return+(""+(+t>68?u-1:u)+t)}],h:["hour",$t,void 0,"isPm"],hh:["hour",Lt,void 0,"isPm"],H:["hour",$t],HH:["hour",Lt],m:["minute",$t],mm:["minute",Lt],s:["second",$t],ss:["second",Lt],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond",Lt,function(t){return 10*+t}],SSS:["millisecond","\\d{3}"],d:zi,dd:zi,ddd:Zi,dddd:Zi,MMM:["month",ne,Bi("monthNamesShort")],MMMM:["month",ne,Bi("monthNames")],a:Hi,A:Hi,ZZ:Vi,Z:Vi},_e={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Kc=function(t){return Mt(_e,t)},Wc=function(t,u,d){if(u===void 0&&(u=_e.default),d===void 0&&(d={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var o=[];u=(u=_e[u]||u).replace(Zc,(function(i,n){return o.push(n),"@@@"}));var c=Mt(Mt({},Ee),d);return(u=u.replace(zc,(function(i){return Cf[i](t,c)}))).replace(/@@@/g,(function(){return o.shift()}))};function Jc(t,u,d){if(d===void 0&&(d={}),typeof u!="string")throw new Error("Invalid format in fecha parse");if(u=_e[u]||u,t.length>1e3)return null;var o={year:new Date().getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},c=[],i=[],n=u.replace(Zc,(function(v,S){return i.push(qi(S)),"@@@"})),s={},f={};n=qi(n).replace(zc,(function(v){var S=Df[v],w=S[0],_=S[1],M=S[3];if(s[w])throw new Error("Invalid format. "+w+" specified twice in format");return s[w]=!0,M&&(f[M]=!0),c.push(S),"("+_+")"})),Object.keys(f).forEach((function(v){if(!s[v])throw new Error("Invalid format. "+v+" is required in specified format")})),n=n.replace(/@@@/g,(function(){return i.shift()}));var r=t.match(new RegExp(n,"i"));if(!r)return null;for(var e,a=Mt(Mt({},Ee),d),p=1;p<r.length;p++){var h=c[p-1],m=h[0],b=h[2],g=b?b(r[p],a):+r[p];if(g==null)return null;o[m]=g}if(o.isPm===1&&o.hour!=null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===0&&+o.hour==12&&(o.hour=0),o.timezoneOffset==null){e=new Date(o.year,o.month,o.day,o.hour,o.minute,o.second,o.millisecond);for(var l=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],y=(p=0,l.length);p<y;p++)if(s[l[p][0]]&&o[l[p][0]]!==e[l[p][1]]())return null}else if(e=new Date(Date.UTC(o.year,o.month,o.day,o.hour,o.minute-o.timezoneOffset,o.second,o.millisecond)),o.month>11||o.month<0||o.day>31||o.day<1||o.hour>23||o.hour<0||o.minute>59||o.minute<0||o.second>59||o.second<0)return null;return e}var Ff={format:Wc,parse:Jc,defaultI18n:ln,setGlobalDateI18n:Yc,setGlobalDateMasks:Kc};const Bf=an(Object.freeze(Object.defineProperty({__proto__:null,assign:Mt,default:Ff,defaultI18n:ln,format:Wc,parse:Jc,setGlobalDateI18n:Yc,setGlobalDateMasks:Kc},Symbol.toStringTag,{value:"Module"})));var Ke,Yi,Ki,Wi,Ji;function Uf(){if(Yi)return Ke;Yi=1;var t=Bf,u=yt();return Ke=u((function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o.format&&(d.timestamp=typeof o.format=="function"?o.format():t.format(new Date,o.format)),d.timestamp||(d.timestamp=new Date().toISOString()),o.alias&&(d[o.alias]=d.timestamp),d})),Ke}function qf(){if(Wi)return Ki;Wi=1;var t=Uc(),u=yt(),d=at().MESSAGE;return Ki=u((function(o,c){return c.level!==!1&&(o.level=t.strip(o.level)),c.message!==!1&&(o.message=t.strip(String(o.message))),c.raw!==!1&&o[d]&&(o[d]=t.strip(String(o[d]))),o}))}function Xc(){if(Ji)return de;Ji=1;var t=de.format=yt();return de.levels=(function(){if(di)return ze;di=1;var u=nn().Colorizer;return ze=function(d){return u.addColors(d.colors||d),d},ze})(),Object.defineProperty(t,"align",{value:Sf()}),Object.defineProperty(t,"cli",{value:Of()}),Object.defineProperty(t,"colorize",{value:nn()}),Object.defineProperty(t,"combine",{value:jf()}),Object.defineProperty(t,"errors",{value:xf()}),Object.defineProperty(t,"json",{value:kf()}),Object.defineProperty(t,"label",{value:Tf()}),Object.defineProperty(t,"logstash",{value:Af()}),Object.defineProperty(t,"metadata",{value:Rf()}),Object.defineProperty(t,"ms",{value:If()}),Object.defineProperty(t,"padLevels",{value:qc()}),Object.defineProperty(t,"prettyPrint",{value:Pf()}),Object.defineProperty(t,"printf",{value:Nf()}),Object.defineProperty(t,"simple",{value:Lf()}),Object.defineProperty(t,"splat",{value:$f()}),Object.defineProperty(t,"timestamp",{value:Uf()}),Object.defineProperty(t,"uncolorize",{value:qf()}),de}var Xi,Qi={};function Qc(){return Xi||(Xi=1,(function(t){var u=lt().format;t.warn={deprecated:function(d){return function(){throw new Error(u("{ %s } was removed in winston@3.0.0.",d))}},useFormat:function(d){return function(){throw new Error([u("{ %s } was removed in winston@3.0.0.",d),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
84
|
-
`))}},forFunctions:function(d,o,c){c.forEach((function(i){d[i]=t.warn[o](i)}))},forProperties:function(d,o,c){c.forEach((function(i){var n=t.warn[o](i);Object.defineProperty(d,i,{get:n,set:n})}))}}})(Qi)),Qi}const Gf="3.17.0";var ts,es={},We={exports:{}},Je={exports:{}};function rs(){if(ts)return Je.exports;ts=1;var t=lt(),u=Ic(),d=at().LEVEL,o=Je.exports=function(){var c=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};u.call(this,{objectMode:!0,highWaterMark:i.highWaterMark}),this.format=i.format,this.level=i.level,this.handleExceptions=i.handleExceptions,this.handleRejections=i.handleRejections,this.silent=i.silent,i.log&&(this.log=i.log),i.logv&&(this.logv=i.logv),i.close&&(this.close=i.close),this.once("pipe",(function(n){c.levels=n.levels,c.parent=n})),this.once("unpipe",(function(n){n===c.parent&&(c.parent=null,c.close&&c.close())}))};return t.inherits(o,u),o.prototype._write=function(c,i,n){if(this.silent||c.exception===!0&&!this.handleExceptions)return n(null);var s=this.level||this.parent&&this.parent.level;if(!s||this.levels[s]>=this.levels[c[d]]){if(c&&!this.format)return this.log(c,n);var f=void 0,r=void 0;try{r=this.format.transform(Object.assign({},c),this.format.options)}catch(e){f=e}if(f||!r){if(n(),f)throw f;return}return this.log(r,n)}return this._writableState.sync=!1,n(null)},o.prototype._writev=function(c,i){if(this.logv){var n=c.filter(this._accept,this);return n.length?this.logv(n,i):i(null)}for(var s=0;s<c.length;s++)if(this._accept(c[s]))if(!c[s].chunk||this.format){var f=void 0,r=void 0;try{r=this.format.transform(Object.assign({},c[s].chunk),this.format.options)}catch(e){f=e}if(f||!r){if(c[s].callback(),f)throw i(null),f}else this.log(r,c[s].callback)}else this.log(c[s].chunk,c[s].callback);return i(null)},o.prototype._accept=function(c){var i=c.chunk;if(this.silent)return!1;var n=this.level||this.parent&&this.parent.level;return!(i.exception!==!0&&n&&!(this.levels[n]>=this.levels[i[d]])||!this.handleExceptions&&i.exception===!0)},o.prototype._nop=function(){},Je.exports}var ns,os,Xe,is,ss,as,Qe={exports:{}};function le(){return os||(os=1,We.exports=rs(),We.exports.LegacyTransportStream=(function(){if(ns)return Qe.exports;ns=1;var t=lt(),u=at().LEVEL,d=rs(),o=Qe.exports=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(d.call(this,c),!c.transport||typeof c.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=c.transport,this.level=this.level||c.transport.level,this.handleExceptions=this.handleExceptions||c.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=(function(i){this.emit("error",i,this.transport)}).bind(this),this.transport.on("error",this.transport.__winstonError))};return t.inherits(o,d),o.prototype._write=function(c,i,n){if(this.silent||c.exception===!0&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[c[u]])&&this.transport.log(c[u],c.message,c,this._nop),n(null)},o.prototype._writev=function(c,i){for(var n=0;n<c.length;n++)this._accept(c[n])&&(this.transport.log(c[n].chunk[u],c[n].chunk.message,c[n].chunk,this._nop),c[n].callback());return i(null)},o.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
85
|
-
`))},o.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},Qe.exports})()),We.exports}function zf(){if(is)return Xe;function t(p){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},t(p)}function u(p,h,m){return h&&(function(b,g){for(var l=0;l<g.length;l++){var y=g[l];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(b,d(y.key),y)}})(p.prototype,h),Object.defineProperty(p,"prototype",{writable:!1}),p}function d(p){var h=(function(m,b){if(t(m)!="object"||!m)return m;var g=m[Symbol.toPrimitive];if(g!==void 0){var l=g.call(m,b);if(t(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(m)})(p,"string");return t(h)=="symbol"?h:h+""}function o(p,h,m){return h=i(h),(function(b,g){if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(b)})(p,c()?Reflect.construct(h,m||[],i(p).constructor):h.apply(p,m))}function c(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(c=function(){return!!p})()}function i(p){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(h){return h.__proto__||Object.getPrototypeOf(h)},i(p)}function n(p,h){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,b){return m.__proto__=b,m},n(p,h)}is=1;var s=Dt(),f=at(),r=f.LEVEL,e=f.MESSAGE,a=le();return Xe=(function(p){function h(){var m,b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(function(g,l){if(!(g instanceof l))throw new TypeError("Cannot call a class as a function")})(this,h),(m=o(this,h,[b])).name=b.name||"console",m.stderrLevels=m._stringArrayToSet(b.stderrLevels),m.consoleWarnLevels=m._stringArrayToSet(b.consoleWarnLevels),m.eol=typeof b.eol=="string"?b.eol:s.EOL,m.forceConsole=b.forceConsole||!1,m._consoleLog=console.log.bind(console),m._consoleWarn=console.warn.bind(console),m._consoleError=console.error.bind(console),m.setMaxListeners(30),m}return(function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),b&&n(m,b)})(h,p),u(h,[{key:"log",value:function(m,b){var g=this;return setImmediate((function(){return g.emit("logged",m)})),this.stderrLevels[m[r]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(m[e]).concat(this.eol)):this._consoleError(m[e]),void(b&&b())):this.consoleWarnLevels[m[r]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(m[e]).concat(this.eol)):this._consoleWarn(m[e]),void(b&&b())):(console._stdout&&!this.forceConsole?console._stdout.write("".concat(m[e]).concat(this.eol)):this._consoleLog(m[e]),void(b&&b()))}},{key:"_stringArrayToSet",value:function(m,b){if(!m)return{};if(b=b||"Cannot make set from type other than Array of string elements",!Array.isArray(m))throw new Error(b);return m.reduce((function(g,l){if(typeof l!="string")throw new Error(b);return g[l]=!0,g}),{})}}])})(a),Xe}function tl(){if(as)return ss;function t(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function u(o,c){for(var i,n="",s=0,f=-1,r=0,e=0;e<=o.length;++e){if(e<o.length)i=o.charCodeAt(e);else{if(i===47)break;i=47}if(i===47){if(!(f===e-1||r===1))if(f!==e-1&&r===2){if(n.length<2||s!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var a=n.lastIndexOf("/");if(a!==n.length-1){a===-1?(n="",s=0):s=(n=n.slice(0,a)).length-1-n.lastIndexOf("/"),f=e,r=0;continue}}else if(n.length===2||n.length===1){n="",s=0,f=e,r=0;continue}}c&&(n.length>0?n+="/..":n="..",s=2)}else n.length>0?n+="/"+o.slice(f+1,e):n=o.slice(f+1,e),s=e-f-1;f=e,r=0}else i===46&&r!==-1?++r:r=-1}return n}as=1;var d={resolve:function(){for(var o,c="",i=!1,n=arguments.length-1;n>=-1&&!i;n--){var s;n>=0?s=arguments[n]:(o===void 0&&(o=Q.cwd()),s=o),t(s),s.length!==0&&(c=s+"/"+c,i=s.charCodeAt(0)===47)}return c=u(c,!i),i?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(o){if(t(o),o.length===0)return".";var c=o.charCodeAt(0)===47,i=o.charCodeAt(o.length-1)===47;return(o=u(o,!c)).length!==0||c||(o="."),o.length>0&&i&&(o+="/"),c?"/"+o:o},isAbsolute:function(o){return t(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,c=0;c<arguments.length;++c){var i=arguments[c];t(i),i.length>0&&(o===void 0?o=i:o+="/"+i)}return o===void 0?".":d.normalize(o)},relative:function(o,c){if(t(o),t(c),o===c||(o=d.resolve(o))===(c=d.resolve(c)))return"";for(var i=1;i<o.length&&o.charCodeAt(i)===47;++i);for(var n=o.length,s=n-i,f=1;f<c.length&&c.charCodeAt(f)===47;++f);for(var r=c.length-f,e=s<r?s:r,a=-1,p=0;p<=e;++p){if(p===e){if(r>e){if(c.charCodeAt(f+p)===47)return c.slice(f+p+1);if(p===0)return c.slice(f+p)}else s>e&&(o.charCodeAt(i+p)===47?a=p:p===0&&(a=0));break}var h=o.charCodeAt(i+p);if(h!==c.charCodeAt(f+p))break;h===47&&(a=p)}var m="";for(p=i+a+1;p<=n;++p)p!==n&&o.charCodeAt(p)!==47||(m.length===0?m+="..":m+="/..");return m.length>0?m+c.slice(f+a):(f+=a,c.charCodeAt(f)===47&&++f,c.slice(f))},_makeLong:function(o){return o},dirname:function(o){if(t(o),o.length===0)return".";for(var c=o.charCodeAt(0),i=c===47,n=-1,s=!0,f=o.length-1;f>=1;--f)if((c=o.charCodeAt(f))===47){if(!s){n=f;break}}else s=!1;return n===-1?i?"/":".":i&&n===1?"//":o.slice(0,n)},basename:function(o,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');t(o);var i,n=0,s=-1,f=!0;if(c!==void 0&&c.length>0&&c.length<=o.length){if(c.length===o.length&&c===o)return"";var r=c.length-1,e=-1;for(i=o.length-1;i>=0;--i){var a=o.charCodeAt(i);if(a===47){if(!f){n=i+1;break}}else e===-1&&(f=!1,e=i+1),r>=0&&(a===c.charCodeAt(r)?--r==-1&&(s=i):(r=-1,s=e))}return n===s?s=e:s===-1&&(s=o.length),o.slice(n,s)}for(i=o.length-1;i>=0;--i)if(o.charCodeAt(i)===47){if(!f){n=i+1;break}}else s===-1&&(f=!1,s=i+1);return s===-1?"":o.slice(n,s)},extname:function(o){t(o);for(var c=-1,i=0,n=-1,s=!0,f=0,r=o.length-1;r>=0;--r){var e=o.charCodeAt(r);if(e!==47)n===-1&&(s=!1,n=r+1),e===46?c===-1?c=r:f!==1&&(f=1):c!==-1&&(f=-1);else if(!s){i=r+1;break}}return c===-1||n===-1||f===0||f===1&&c===n-1&&c===i+1?"":o.slice(c,n)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return(function(c,i){var n=i.dir||i.root,s=i.base||(i.name||"")+(i.ext||"");return n?n===i.root?n+s:n+c+s:s})("/",o)},parse:function(o){t(o);var c={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return c;var i,n=o.charCodeAt(0),s=n===47;s?(c.root="/",i=1):i=0;for(var f=-1,r=0,e=-1,a=!0,p=o.length-1,h=0;p>=i;--p)if((n=o.charCodeAt(p))!==47)e===-1&&(a=!1,e=p+1),n===46?f===-1?f=p:h!==1&&(h=1):f!==-1&&(h=-1);else if(!a){r=p+1;break}return f===-1||e===-1||h===0||h===1&&f===e-1&&f===r+1?e!==-1&&(c.base=c.name=r===0&&s?o.slice(1,e):o.slice(r,e)):(r===0&&s?(c.name=o.slice(1,f),c.base=o.slice(1,e)):(c.name=o.slice(r,f),c.base=o.slice(r,e)),c.ext=o.slice(f,e)),r>0?c.dir=o.slice(0,r-1):s&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};return d.posix=d,ss=d}var us,tr={exports:{}},er={exports:{}},rr={exports:{}};function fn(){return us||(us=1,t=rr,u=rr.exports,Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){return d&&typeof d.length=="number"&&d.length>=0&&d.length%1==0},t.exports=u.default),rr.exports;var t,u}var cs,Ot={},nr={exports:{}},or={exports:{}},ls,fs,hs,kt={};function Zf(){return fs||(fs=1,(function(t,u){Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(r){return(0,i.isAsync)(r)?function(...e){const a=e.pop();return s(r.apply(this,e),a)}:(0,o.default)((function(e,a){var p;try{p=r.apply(this,e)}catch(h){return a(h)}if(p&&typeof p.then=="function")return s(p,a);a(null,p)}))};var d=(function(){return cs||(cs=1,r=or,e=or.exports,Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(a){return function(...p){var h=p.pop();return a.call(this,p,h)}},r.exports=e.default),or.exports;var r,e})(),o=n(d),c=n((function(){if(ls)return kt;ls=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.fallback=h,kt.wrap=m;var r,e=kt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,a=kt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,p=kt.hasNextTick=typeof Q=="object"&&typeof Q.nextTick=="function";function h(b){setTimeout(b,0)}function m(b){return(g,...l)=>b((()=>g(...l)))}return r=e?queueMicrotask:a?setImmediate:p?Q.nextTick:h,kt.default=m(r),kt})()),i=Ht();function n(r){return r&&r.__esModule?r:{default:r}}function s(r,e){return r.then((a=>{f(e,null,a)}),(a=>{f(e,a&&(a instanceof Error||a.message)?a:new Error(a))}))}function f(r,e,a){try{r(e,a)}catch(p){(0,c.default)((h=>{throw h}),p)}}t.exports=u.default})(nr,nr.exports)),nr.exports}function Ht(){if(hs)return Ot;hs=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.isAsyncIterable=Ot.isAsyncGenerator=Ot.isAsync=void 0;var t,u=Zf(),d=(t=u)&&t.__esModule?t:{default:t};function o(c){return c[Symbol.toStringTag]==="AsyncFunction"}return Ot.default=function(c){if(typeof c!="function")throw new Error("expected a function");return o(c)?(0,d.default)(c):c},Ot.isAsync=o,Ot.isAsyncGenerator=function(c){return c[Symbol.toStringTag]==="AsyncGenerator"},Ot.isAsyncIterable=function(c){return typeof c[Symbol.asyncIterator]=="function"},Ot}var ps,ds,ir={exports:{}};function se(){return ps||(ps=1,t=ir,u=ir.exports,Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d,o){if(o||(o=d.length),!o)throw new Error("arity is undefined");return function(...c){return typeof c[o-1]=="function"?d.apply(this,c):new Promise(((i,n)=>{c[o-1]=(s,...f)=>{if(s)return n(s);i(f.length>1?f:f[0])},d.apply(this,c)}))}},t.exports=u.default),ir.exports;var t,u}var ms,sr={exports:{}},ar={exports:{}},ur={exports:{}},cr={exports:{}};function el(){return ms||(ms=1,t=cr,u=cr.exports,Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){function o(...c){if(d!==null){var i=d;d=null,i.apply(this,c)}}return Object.assign(o,d),o},t.exports=u.default),cr.exports;var t,u}var ys,gs,lr={exports:{}},fr={exports:{}};function Hf(){return gs||(gs=1,(function(t,u){Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(n){if((0,d.default)(n))return(function(p){var h=-1,m=p.length;return function(){return++h<m?{value:p[h],key:h}:null}})(n);var s=(0,c.default)(n);return s?(function(p){var h=-1;return function(){var m=p.next();return m.done?null:(h++,{value:m.value,key:h})}})(s):(f=n,r=f?Object.keys(f):[],e=-1,a=r.length,function p(){var h=r[++e];return h==="__proto__"?p():e<a?{value:f[h],key:h}:null});var f,r,e,a};var d=i(fn()),o=(function(){return ys||(ys=1,n=fr,s=fr.exports,Object.defineProperty(s,"__esModule",{value:!0}),s.default=function(f){return f[Symbol.iterator]&&f[Symbol.iterator]()},n.exports=s.default),fr.exports;var n,s})(),c=i(o);function i(n){return n&&n.__esModule?n:{default:n}}t.exports=u.default})(lr,lr.exports)),lr.exports}var vs,hr={exports:{}};function rl(){return vs||(vs=1,t=hr,u=hr.exports,Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(d){return function(...o){if(d===null)throw new Error("Callback was already called.");var c=d;d=null,c.apply(this,o)}},t.exports=u.default),hr.exports;var t,u}var bs,ws,Es,_s,Ss,Os,pr={exports:{}},dr={exports:{}};function on(){return bs||(bs=1,(function(t,u){Object.defineProperty(u,"__esModule",{value:!0}),u.default={},t.exports=u.default})(dr,dr.exports)),dr.exports}function Vf(){return Es||(Es=1,(function(t,u){Object.defineProperty(u,"__esModule",{value:!0});var d=r(el()),o=r(Hf()),c=r(rl()),i=Ht(),n=(ws||(ws=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(m,b,g,l){let y=!1,v=!1,S=!1,w=0,_=0;function M(){w>=b||S||y||(S=!0,m.next().then((({value:E,done:j})=>{if(!v&&!y){if(S=!1,j)return y=!0,void(w<=0&&l(null));w++,g(E,_,z),_++,M()}})).catch(k))}function z(E,j){if(w-=1,!v)return E?k(E):E===!1?(y=!0,void(v=!0)):j===h.default||y&&w<=0?(y=!0,l(null)):void M()}function k(E){v||(S=!1,y=!0,l(E))}M()};var p,h=(p=on())&&p.__esModule?p:{default:p};e.exports=a.default})(pr,pr.exports)),pr.exports),s=r(n),f=r(on());function r(e){return e&&e.__esModule?e:{default:e}}u.default=e=>(a,p,h)=>{if(h=(0,d.default)(h),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!a)return h(null);if((0,i.isAsyncGenerator)(a))return(0,s.default)(a,e,p,h);if((0,i.isAsyncIterable)(a))return(0,s.default)(a[Symbol.asyncIterator](),e,p,h);var m=(0,o.default)(a),b=!1,g=!1,l=0,y=!1;function v(w,_){if(!g)if(l-=1,w)b=!0,h(w);else if(w===!1)b=!0,g=!0;else{if(_===f.default||b&&l<=0)return b=!0,h(null);y||S()}}function S(){for(y=!0;l<e&&!b;){var w=m();if(w===null)return b=!0,void(l<=0&&h(null));l+=1,p(w.value,w.key,(0,c.default)(v))}y=!1}S()},t.exports=u.default})(ur,ur.exports)),ur.exports}function nl(){return _s||(_s=1,(function(t,u){Object.defineProperty(u,"__esModule",{value:!0});var d=i(Vf()),o=i(Ht()),c=i(se());function i(n){return n&&n.__esModule?n:{default:n}}u.default=(0,c.default)((function(n,s,f,r){return(0,d.default)(s)(n,(0,o.default)(f),r)}),4),t.exports=u.default})(ar,ar.exports)),ar.exports}function Yf(){return Os||(Os=1,(function(t,u){Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(s,f){return(0,o.default)(i.default,s,f)};var d=(ds||(ds=1,(function(s,f){Object.defineProperty(f,"__esModule",{value:!0});var r=p(fn()),e=p(Ht()),a=p(se());function p(h){return h&&h.__esModule?h:{default:h}}f.default=(0,a.default)(((h,m,b)=>{var g=(0,r.default)(m)?[]:{};h(m,((l,y,v)=>{(0,e.default)(l)(((S,...w)=>{w.length<2&&([w]=w),g[y]=w,v(S)}))}),(l=>b(l,g)))}),3),s.exports=f.default})(er,er.exports)),er.exports),o=n(d),c=(Ss||(Ss=1,(function(s,f){Object.defineProperty(f,"__esModule",{value:!0});var r=a(nl()),e=a(se());function a(p){return p&&p.__esModule?p:{default:p}}f.default=(0,e.default)((function(p,h,m){return(0,r.default)(p,1,h,m)}),3),s.exports=f.default})(sr,sr.exports)),sr.exports),i=n(c);function n(s){return s&&s.__esModule?s:{default:s}}t.exports=u.default})(tr,tr.exports)),tr.exports}var js,xs,ks={},Ts={};function Kf(){return js||(js=1,(function(t){var u=ie(),d=Bl(),o=Cl(),c=Dl(),i=Fl();for(var n in i)t[n]=i[n];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function s(f){if(typeof f!="number"||f<t.DEFLATE||f>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=f,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}s.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,u(this.init_done,"close before init"),u(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||c.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},s.prototype.write=function(f,r,e,a,p,h,m){return this._write(!0,f,r,e,a,p,h,m)},s.prototype.writeSync=function(f,r,e,a,p,h,m){return this._write(!1,f,r,e,a,p,h,m)},s.prototype._write=function(f,r,e,a,p,h,m,b){if(u.equal(arguments.length,8),u(this.init_done,"write before init"),u(this.mode!==t.NONE,"already finalized"),u.equal(!1,this.write_in_progress,"write already in progress"),u.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,u.equal(!1,r===void 0,"must provide flush value"),this.write_in_progress=!0,r!==t.Z_NO_FLUSH&&r!==t.Z_PARTIAL_FLUSH&&r!==t.Z_SYNC_FLUSH&&r!==t.Z_FULL_FLUSH&&r!==t.Z_FINISH&&r!==t.Z_BLOCK)throw new Error("Invalid flush value");if(e==null&&(e=dt.alloc(0),p=0,a=0),this.strm.avail_in=p,this.strm.input=e,this.strm.next_in=a,this.strm.avail_out=b,this.strm.output=h,this.strm.next_out=m,this.flush=r,!f)return this._process(),this._checkError()?this._afterSync():void 0;var g=this;return Q.nextTick((function(){g._process(),g._after()})),this},s.prototype._afterSync=function(){var f=this.strm.avail_out,r=this.strm.avail_in;return this.write_in_progress=!1,[r,f]},s.prototype._process=function(){var f=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(f=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(f===null)break;if(this.strm.input[f]!==31){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,f++,this.strm.avail_in===1)break;case 1:if(f===null)break;this.strm.input[f]===139?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=c.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=c.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=c.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=c.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},s.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},s.prototype._after=function(){if(this._checkError()){var f=this.strm.avail_out,r=this.strm.avail_in;this.write_in_progress=!1,this.callback(r,f),this.pending_close&&this.close()}},s.prototype._error=function(f){this.strm.msg&&(f=this.strm.msg),this.onerror(f,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},s.prototype.init=function(f,r,e,a,p){u(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),u(f>=8&&f<=15,"invalid windowBits"),u(r>=-1&&r<=9,"invalid compression level"),u(e>=1&&e<=9,"invalid memlevel"),u(a===t.Z_FILTERED||a===t.Z_HUFFMAN_ONLY||a===t.Z_RLE||a===t.Z_FIXED||a===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,f,e,a,p),this._setDictionary()},s.prototype.params=function(){throw new Error("deflateParams Not supported")},s.prototype.reset=function(){this._reset(),this._setDictionary()},s.prototype._init=function(f,r,e,a,p){switch(this.level=f,this.windowBits=r,this.memLevel=e,this.strategy=a,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new d,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=c.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=p,this.write_in_progress=!1,this.init_done=!0},s.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},s.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=c.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=s})(Ts)),Ts}var As,Rs,Is,Ps,Ns,mr,Ls,yr,$s,gr,Ms,Cs,Ds,vr,Fs,Bs,Us={exports:{}};function Wf(){if(Rs)return As;Rs=1;var t=[],u=[],d=function(){};function o(p){return!~t.indexOf(p)&&(t.push(p),!0)}function c(p){d=p}function i(p){for(var h=[],m=0;m<t.length;m++)if(t[m].async)h.push(t[m]);else if(t[m](p))return!0;return!!h.length&&new Promise((function(b){Promise.all(h.map((function(g){return g(p)}))).then((function(g){b(g.some(Boolean))}))}))}function n(p){return!~u.indexOf(p)&&(u.push(p),!0)}function s(){d.apply(d,arguments)}function f(p){for(var h=0;h<u.length;h++)p=u[h].apply(u[h],arguments);return p}function r(p,h){var m=Object.prototype.hasOwnProperty;for(var b in h)m.call(h,b)&&(p[b]=h[b]);return p}function e(p){return p.enabled=!1,p.modify=n,p.set=c,p.use=o,r((function(){return!1}),p)}function a(p){return p.enabled=!0,p.modify=n,p.set=c,p.use=o,r((function(){var h=Array.prototype.slice.call(arguments,0);return s.call(s,p,f(h,p)),!0}),p)}return As=function(p){return p.introduce=r,p.enabled=i,p.process=f,p.modify=n,p.write=s,p.nope=e,p.yep=a,p.set=c,p.use=o,p}}function xe(){return Ns||(Ns=1,Us.exports=(function(){if(Ps)return Is;Ps=1;var t=Wf()((function u(d,o){return(o=o||{}).namespace=d,o.prod=!0,o.dev=!1,o.force||u.force?u.yep(o):u.nope(o)}));return Is=t})()),Us.exports}function Jf(){if(Ls)return mr;Ls=1;var t=cn(),u=$l().StringDecoder,d=Yt().Stream;function o(){}return mr=function(c,i){var n=dt.alloc(65536),s=new u("utf8"),f=new d,r="",e=0,a=0;return c.start===-1&&delete c.start,f.readable=!0,f.destroy=function(){f.destroyed=!0,f.emit("end"),f.emit("close")},t.open(c.file,"a+","0644",(function(p,h){if(p)return i?i(p):f.emit("error",p),void f.destroy();(function m(){if(!f.destroyed)return t.read(h,n,0,n.length,e,(function(b,g){if(b)return i?i(b):f.emit("error",b),void f.destroy();if(!g)return r&&((c.start==null||a>c.start)&&(i?i(null,r):f.emit("line",r)),a++,r=""),setTimeout(m,1e3);var l=s.write(n.slice(0,g));i||f.emit("data",l);for(var y=(l=(r+l).split(/\n+/)).length-1,v=0;v<y;v++)(c.start==null||a>c.start)&&(i?i(null,l[v]):f.emit("line",l[v])),a++;return r=l[y],e+=g,m()}));t.close(h,o)})()})),i?f.destroy:f},mr}function Xf(){if($s)return yr;function t(v){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},t(v)}function u(v,S,w){return S&&(function(_,M){for(var z=0;z<M.length;z++){var k=M[z];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(_,d(k.key),k)}})(v.prototype,S),Object.defineProperty(v,"prototype",{writable:!1}),v}function d(v){var S=(function(w,_){if(t(w)!="object"||!w)return w;var M=w[Symbol.toPrimitive];if(M!==void 0){var z=M.call(w,_);if(t(z)!="object")return z;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(w)})(v,"string");return t(S)=="symbol"?S:S+""}function o(v,S,w){return S=i(S),(function(_,M){if(M&&(t(M)=="object"||typeof M=="function"))return M;if(M!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z})(_)})(v,c()?Reflect.construct(S,w||[],i(v).constructor):S.apply(v,w))}function c(){try{var v=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(c=function(){return!!v})()}function i(v){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},i(v)}function n(v,S){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,_){return w.__proto__=_,w},n(v,S)}$s=1;var s=cn(),f=tl(),r=Yf(),e=(xs||(xs=1,(function(v){var S=oe().Buffer,w=je().Transform,_=Kf(),M=lt(),z=ie().ok,k=oe().kMaxLength,E="Cannot create final Buffer. It would be larger than 0x"+k.toString(16)+" bytes";_.Z_MIN_WINDOWBITS=8,_.Z_MAX_WINDOWBITS=15,_.Z_DEFAULT_WINDOWBITS=15,_.Z_MIN_CHUNK=64,_.Z_MAX_CHUNK=1/0,_.Z_DEFAULT_CHUNK=16384,_.Z_MIN_MEMLEVEL=1,_.Z_MAX_MEMLEVEL=9,_.Z_DEFAULT_MEMLEVEL=8,_.Z_MIN_LEVEL=-1,_.Z_MAX_LEVEL=9,_.Z_DEFAULT_LEVEL=_.Z_DEFAULT_COMPRESSION;for(var j=Object.keys(_),x=0;x<j.length;x++){var O=j[x];O.match(/^Z/)&&Object.defineProperty(v,O,{enumerable:!0,value:_[O],writable:!1})}for(var $={Z_OK:_.Z_OK,Z_STREAM_END:_.Z_STREAM_END,Z_NEED_DICT:_.Z_NEED_DICT,Z_ERRNO:_.Z_ERRNO,Z_STREAM_ERROR:_.Z_STREAM_ERROR,Z_DATA_ERROR:_.Z_DATA_ERROR,Z_MEM_ERROR:_.Z_MEM_ERROR,Z_BUF_ERROR:_.Z_BUF_ERROR,Z_VERSION_ERROR:_.Z_VERSION_ERROR},N=Object.keys($),P=0;P<N.length;P++){var G=N[P];$[$[G]]=G}function A(T,D,H){var W=[],K=0;function et(){for(var tt;(tt=T.read())!==null;)W.push(tt),K+=tt.length;T.once("readable",et)}function X(){var tt,nt=null;K>=k?nt=new RangeError(E):tt=S.concat(W,K),W=[],T.close(),H(nt,tt)}T.on("error",(function(tt){T.removeListener("end",X),T.removeListener("readable",et),H(tt)})),T.on("end",X),T.end(D),et()}function I(T,D){if(typeof D=="string"&&(D=S.from(D)),!S.isBuffer(D))throw new TypeError("Not a string or buffer");var H=T._finishFlushFlag;return T._processChunk(D,H)}function R(T){if(!(this instanceof R))return new R(T);q.call(this,T,_.DEFLATE)}function B(T){if(!(this instanceof B))return new B(T);q.call(this,T,_.INFLATE)}function V(T){if(!(this instanceof V))return new V(T);q.call(this,T,_.GZIP)}function J(T){if(!(this instanceof J))return new J(T);q.call(this,T,_.GUNZIP)}function F(T){if(!(this instanceof F))return new F(T);q.call(this,T,_.DEFLATERAW)}function L(T){if(!(this instanceof L))return new L(T);q.call(this,T,_.INFLATERAW)}function U(T){if(!(this instanceof U))return new U(T);q.call(this,T,_.UNZIP)}function Z(T){return T===_.Z_NO_FLUSH||T===_.Z_PARTIAL_FLUSH||T===_.Z_SYNC_FLUSH||T===_.Z_FULL_FLUSH||T===_.Z_FINISH||T===_.Z_BLOCK}function q(T,D){var H=this;if(this._opts=T=T||{},this._chunkSize=T.chunkSize||v.Z_DEFAULT_CHUNK,w.call(this,T),T.flush&&!Z(T.flush))throw new Error("Invalid flush flag: "+T.flush);if(T.finishFlush&&!Z(T.finishFlush))throw new Error("Invalid flush flag: "+T.finishFlush);if(this._flushFlag=T.flush||_.Z_NO_FLUSH,this._finishFlushFlag=T.finishFlush!==void 0?T.finishFlush:_.Z_FINISH,T.chunkSize&&(T.chunkSize<v.Z_MIN_CHUNK||T.chunkSize>v.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+T.chunkSize);if(T.windowBits&&(T.windowBits<v.Z_MIN_WINDOWBITS||T.windowBits>v.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+T.windowBits);if(T.level&&(T.level<v.Z_MIN_LEVEL||T.level>v.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+T.level);if(T.memLevel&&(T.memLevel<v.Z_MIN_MEMLEVEL||T.memLevel>v.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+T.memLevel);if(T.strategy&&T.strategy!=v.Z_FILTERED&&T.strategy!=v.Z_HUFFMAN_ONLY&&T.strategy!=v.Z_RLE&&T.strategy!=v.Z_FIXED&&T.strategy!=v.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+T.strategy);if(T.dictionary&&!S.isBuffer(T.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new _.Zlib(D);var W=this;this._hadError=!1,this._handle.onerror=function(X,tt){Y(W),W._hadError=!0;var nt=new Error(X);nt.errno=tt,nt.code=v.codes[tt],W.emit("error",nt)};var K=v.Z_DEFAULT_COMPRESSION;typeof T.level=="number"&&(K=T.level);var et=v.Z_DEFAULT_STRATEGY;typeof T.strategy=="number"&&(et=T.strategy),this._handle.init(T.windowBits||v.Z_DEFAULT_WINDOWBITS,K,T.memLevel||v.Z_DEFAULT_MEMLEVEL,et,T.dictionary),this._buffer=S.allocUnsafe(this._chunkSize),this._offset=0,this._level=K,this._strategy=et,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!H._handle},configurable:!0,enumerable:!0})}function Y(T,D){D&&Q.nextTick(D),T._handle&&(T._handle.close(),T._handle=null)}function C(T){T.emit("close")}Object.defineProperty(v,"codes",{enumerable:!0,value:Object.freeze($),writable:!1}),v.Deflate=R,v.Inflate=B,v.Gzip=V,v.Gunzip=J,v.DeflateRaw=F,v.InflateRaw=L,v.Unzip=U,v.createDeflate=function(T){return new R(T)},v.createInflate=function(T){return new B(T)},v.createDeflateRaw=function(T){return new F(T)},v.createInflateRaw=function(T){return new L(T)},v.createGzip=function(T){return new V(T)},v.createGunzip=function(T){return new J(T)},v.createUnzip=function(T){return new U(T)},v.deflate=function(T,D,H){return typeof D=="function"&&(H=D,D={}),A(new R(D),T,H)},v.deflateSync=function(T,D){return I(new R(D),T)},v.gzip=function(T,D,H){return typeof D=="function"&&(H=D,D={}),A(new V(D),T,H)},v.gzipSync=function(T,D){return I(new V(D),T)},v.deflateRaw=function(T,D,H){return typeof D=="function"&&(H=D,D={}),A(new F(D),T,H)},v.deflateRawSync=function(T,D){return I(new F(D),T)},v.unzip=function(T,D,H){return typeof D=="function"&&(H=D,D={}),A(new U(D),T,H)},v.unzipSync=function(T,D){return I(new U(D),T)},v.inflate=function(T,D,H){return typeof D=="function"&&(H=D,D={}),A(new B(D),T,H)},v.inflateSync=function(T,D){return I(new B(D),T)},v.gunzip=function(T,D,H){return typeof D=="function"&&(H=D,D={}),A(new J(D),T,H)},v.gunzipSync=function(T,D){return I(new J(D),T)},v.inflateRaw=function(T,D,H){return typeof D=="function"&&(H=D,D={}),A(new L(D),T,H)},v.inflateRawSync=function(T,D){return I(new L(D),T)},M.inherits(q,w),q.prototype.params=function(T,D,H){if(T<v.Z_MIN_LEVEL||T>v.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+T);if(D!=v.Z_FILTERED&&D!=v.Z_HUFFMAN_ONLY&&D!=v.Z_RLE&&D!=v.Z_FIXED&&D!=v.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+D);if(this._level!==T||this._strategy!==D){var W=this;this.flush(_.Z_SYNC_FLUSH,(function(){z(W._handle,"zlib binding closed"),W._handle.params(T,D),W._hadError||(W._level=T,W._strategy=D,H&&H())}))}else Q.nextTick(H)},q.prototype.reset=function(){return z(this._handle,"zlib binding closed"),this._handle.reset()},q.prototype._flush=function(T){this._transform(S.alloc(0),"",T)},q.prototype.flush=function(T,D){var H=this,W=this._writableState;(typeof T=="function"||T===void 0&&!D)&&(D=T,T=_.Z_FULL_FLUSH),W.ended?D&&Q.nextTick(D):W.ending?D&&this.once("end",D):W.needDrain?D&&this.once("drain",(function(){return H.flush(T,D)})):(this._flushFlag=T,this.write(S.alloc(0),"",D))},q.prototype.close=function(T){Y(this,T),Q.nextTick(C,this)},q.prototype._transform=function(T,D,H){var W,K=this._writableState,et=(K.ending||K.ended)&&(!T||K.length===T.length);return T===null||S.isBuffer(T)?this._handle?(et?W=this._finishFlushFlag:(W=this._flushFlag,T.length>=K.length&&(this._flushFlag=this._opts.flush||_.Z_NO_FLUSH)),void this._processChunk(T,W,H)):H(new Error("zlib binding closed")):H(new Error("invalid input"))},q.prototype._processChunk=function(T,D,H){var W=T&&T.length,K=this._chunkSize-this._offset,et=0,X=this,tt=typeof H=="function";if(!tt){var nt,ot=[],st=0;this.on("error",(function(it){nt=it})),z(this._handle,"zlib binding closed");do var gt=this._handle.writeSync(D,T,et,W,this._buffer,this._offset,K);while(!this._hadError&&bt(gt[0],gt[1]));if(this._hadError)throw nt;if(st>=k)throw Y(this),new RangeError(E);var At=S.concat(ot,st);return Y(this),At}z(this._handle,"zlib binding closed");var vt=this._handle.write(D,T,et,W,this._buffer,this._offset,K);function bt(it,ht){if(this&&(this.buffer=null,this.callback=null),!X._hadError){var rt=K-ht;if(z(rt>=0,"have should not go down"),rt>0){var Rt=X._buffer.slice(X._offset,X._offset+rt);X._offset+=rt,tt?X.push(Rt):(ot.push(Rt),st+=Rt.length)}if((ht===0||X._offset>=X._chunkSize)&&(K=X._chunkSize,X._offset=0,X._buffer=S.allocUnsafe(X._chunkSize)),ht===0){if(et+=W-it,W=it,!tt)return!0;var mt=X._handle.write(D,T,et,W,X._buffer,X._offset,X._chunkSize);return mt.callback=bt,void(mt.buffer=T)}if(!tt)return!1;H()}}vt.buffer=T,vt.callback=bt},M.inherits(R,q),M.inherits(B,q),M.inherits(V,q),M.inherits(J,q),M.inherits(F,q),M.inherits(L,q),M.inherits(U,q)})(ks)),ks),a=at().MESSAGE,p=Yt(),h=p.Stream,m=p.PassThrough,b=le(),g=xe()("winston:file"),l=Dt(),y=Jf();return yr=(function(v){function S(){var w,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};function M(z){for(var k=arguments.length,E=new Array(k>1?k-1:0),j=1;j<k;j++)E[j-1]=arguments[j];E.slice(1).forEach((function(x){if(_[x])throw new Error("Cannot set ".concat(x," and ").concat(z," together"))}))}if((function(z,k){if(!(z instanceof k))throw new TypeError("Cannot call a class as a function")})(this,S),(w=o(this,S,[_])).name=_.name||"file",w._stream=new m,w._stream.setMaxListeners(30),w._onError=w._onError.bind(w),_.filename||_.dirname)M("filename or dirname","stream"),w._basename=w.filename=_.filename?f.basename(_.filename):"winston.log",w.dirname=_.dirname||f.dirname(_.filename),w.options=_.options||{flags:"a"};else{if(!_.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),M("stream","filename","maxsize"),w._dest=w._stream.pipe(w._setupStream(_.stream)),w.dirname=f.dirname(w._dest.path)}return w.maxsize=_.maxsize||null,w.rotationFormat=_.rotationFormat||!1,w.zippedArchive=_.zippedArchive||!1,w.maxFiles=_.maxFiles||null,w.eol=typeof _.eol=="string"?_.eol:l.EOL,w.tailable=_.tailable||!1,w.lazy=_.lazy||!1,w._size=0,w._pendingSize=0,w._created=0,w._drain=!1,w._opening=!1,w._ending=!1,w._fileExist=!1,w.dirname&&w._createLogDirIfNotExist(w.dirname),w.lazy||w.open(),w}return(function(w,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(_&&_.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),Object.defineProperty(w,"prototype",{writable:!1}),_&&n(w,_)})(S,v),u(S,[{key:"finishIfEnding",value:function(){var w=this;this._ending&&(this._opening?this.once("open",(function(){w._stream.once("finish",(function(){return w.emit("finish")})),setImmediate((function(){return w._stream.end()}))})):(this._stream.once("finish",(function(){return w.emit("finish")})),setImmediate((function(){return w._stream.end()}))))}},{key:"log",value:function(w){var _=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};if(this.silent)return M(),!0;if(this._drain)this._stream.once("drain",(function(){_._drain=!1,_.log(w,M)}));else{if(!this._rotate){if(this.lazy){if(!this._fileExist)return this._opening||this.open(),void this.once("open",(function(){_._fileExist=!0,_.log(w,M)}));if(this._needsNewFile(this._pendingSize))return void this._dest.once("close",(function(){_._opening||_.open(),_.once("open",(function(){_.log(w,M)}))}))}var z="".concat(w[a]).concat(this.eol),k=dt.byteLength(z);this._pendingSize+=k,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var E=this._stream.write(z,(function(){var j=this;this._size+=k,this._pendingSize-=k,g("logged %s %s",this._size,z),this.emit("logged",w),this._rotate||this._opening||this._needsNewFile()&&(this.lazy?this._endStream((function(){j.emit("fileclosed")})):(this._rotate=!0,this._endStream((function(){return j._rotateFile()}))))}).bind(this));return E?M():(this._drain=!0,this._stream.once("drain",(function(){_._drain=!1,M()}))),g("written",E,this._drain),this.finishIfEnding(),E}this._stream.once("rotate",(function(){_._rotate=!1,_.log(w,M)}))}}},{key:"query",value:function(w,_){typeof w=="function"&&(_=w,w={}),w=(function(O){return O=O||{},O.rows=O.rows||O.limit||10,O.start=O.start||0,O.until=O.until||new Date,t(O.until)!=="object"&&(O.until=new Date(O.until)),O.from=O.from||O.until-864e5,t(O.from)!=="object"&&(O.from=new Date(O.from)),O.order=O.order||"desc",O})(w);var M=f.join(this.dirname,this.filename),z="",k=[],E=0,j=s.createReadStream(M,{encoding:"utf8"});function x(O,$){try{var N=JSON.parse(O);(function(P){if(P&&t(P)==="object"){var G=new Date(P.timestamp);if(!(w.from&&G<w.from||w.until&&G>w.until||w.level&&w.level!==P.level))return!0}})(N)&&(function(P){if(w.rows&&k.length>=w.rows&&w.order!=="desc")return void(j.readable&&j.destroy());w.fields&&(P=w.fields.reduce((function(G,A){return G[A]=P[A],G}),{})),w.order==="desc"&&k.length>=w.rows&&k.shift(),k.push(P)})(N)}catch(P){$||j.emit("error",P)}}j.on("error",(function(O){if(j.readable&&j.destroy(),_)return O.code!=="ENOENT"?_(O):_(null,k)})),j.on("data",(function(O){for(var $=(O=(z+O).split(/\n+/)).length-1,N=0;N<$;N++)(!w.start||E>=w.start)&&x(O[N]),E++;z=O[$]})),j.on("close",(function(){z&&x(z,!0),w.order==="desc"&&(k=k.reverse()),_&&_(null,k)}))}},{key:"stream",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=f.join(this.dirname,this.filename),M=new h,z={file:_,start:w.start};return M.destroy=y(z,(function(k,E){if(k)return M.emit("error",k);try{M.emit("data",E),E=JSON.parse(E),M.emit("log",E)}catch(j){M.emit("error",j)}})),M}},{key:"open",value:function(){var w=this;this.filename&&(this._opening||(this._opening=!0,this.stat((function(_,M){if(_)return w.emit("error",_);g("stat done: %s { size: %s }",w.filename,M),w._size=M,w._dest=w._createStream(w._stream),w._opening=!1,w.once("open",(function(){w._stream.emit("rotate")||(w._rotate=!1)}))}))))}},{key:"stat",value:function(w){var _=this,M=this._getFile(),z=f.join(this.dirname,M);s.stat(z,(function(k,E){return k&&k.code==="ENOENT"?(g("ENOENT ok",z),_.filename=M,w(null,0)):k?(g("err ".concat(k.code," ").concat(z)),w(k)):!E||_._needsNewFile(E.size)?_._incFile((function(){return _.stat(w)})):(_.filename=M,void w(null,E.size))}))}},{key:"close",value:function(w){var _=this;this._stream&&this._stream.end((function(){w&&w(),_.emit("flush"),_.emit("closed")}))}},{key:"_needsNewFile",value:function(w){return w=w||this._size,this.maxsize&&w>=this.maxsize}},{key:"_onError",value:function(w){this.emit("error",w)}},{key:"_setupStream",value:function(w){return w.on("error",this._onError),w}},{key:"_cleanupStream",value:function(w){return w.removeListener("error",this._onError),w.destroy(),w}},{key:"_rotateFile",value:function(){var w=this;this._incFile((function(){return w.open()}))}},{key:"_endStream",value:function(){var w=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end((function(){w._cleanupStream(w._dest),_()}))):_()}},{key:"_createStream",value:function(w){var _=this,M=f.join(this.dirname,this.filename);g("create stream start",M,this.options);var z=s.createWriteStream(M,this.options).on("error",(function(k){return g(k)})).on("close",(function(){return g("close",z.path,z.bytesWritten)})).on("open",(function(){g("file open ok",M),_.emit("open",M),w.pipe(z),_.rotatedWhileOpening&&(_._stream=new m,_._stream.setMaxListeners(30),_._rotateFile(),_.rotatedWhileOpening=!1,_._cleanupStream(z),w.end())}));return g("create stream ok",M),z}},{key:"_incFile",value:function(w){g("_incFile",this.filename);var _=f.extname(this._basename),M=f.basename(this._basename,_),z=[];this.zippedArchive&&z.push((function(k){var E=this._created>0&&!this.tailable?this._created:"";this._compressFile(f.join(this.dirname,"".concat(M).concat(E).concat(_)),f.join(this.dirname,"".concat(M).concat(E).concat(_,".gz")),k)}).bind(this)),z.push((function(k){this.tailable?this._checkMaxFilesTailable(_,M,k):(this._created+=1,this._checkMaxFilesIncrementing(_,M,k))}).bind(this)),r(z,w)}},{key:"_getFile",value:function(){var w=f.extname(this._basename),_=f.basename(this._basename,w),M=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?"".concat(_).concat(M).concat(w):"".concat(_).concat(w)}},{key:"_checkMaxFilesIncrementing",value:function(w,_,M){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(M);var z=this._created-this.maxFiles,k=z!==0?z:"",E=this.zippedArchive?".gz":"",j="".concat(_).concat(k).concat(w).concat(E),x=f.join(this.dirname,j);s.unlink(x,M)}},{key:"_checkMaxFilesTailable",value:function(w,_,M){var z=this,k=[];if(this.maxFiles){for(var E=this.zippedArchive?".gz":"",j=this.maxFiles-1;j>1;j--)k.push((function(x,O){var $=this,N="".concat(_).concat(x-1).concat(w).concat(E),P=f.join(this.dirname,N);s.exists(P,(function(G){if(!G)return O(null);N="".concat(_).concat(x).concat(w).concat(E),s.rename(P,f.join($.dirname,N),O)}))}).bind(this,j));r(k,(function(){s.rename(f.join(z.dirname,"".concat(_).concat(w).concat(E)),f.join(z.dirname,"".concat(_,"1").concat(w).concat(E)),M)}))}}},{key:"_compressFile",value:function(w,_,M){s.access(w,s.F_OK,(function(z){if(z)return M();var k=e.createGzip(),E=s.createReadStream(w),j=s.createWriteStream(_);j.on("finish",(function(){s.unlink(w,M)})),E.pipe(k).pipe(j)}))}},{key:"_createLogDirIfNotExist",value:function(w){s.existsSync(w)||s.mkdirSync(w,{recursive:!0})}}])})(b),yr}function Qf(){if(Ms)return gr;function t(b){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},t(b)}function u(b,g){var l=Object.keys(b);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(b);g&&(y=y.filter((function(v){return Object.getOwnPropertyDescriptor(b,v).enumerable}))),l.push.apply(l,y)}return l}function d(b){for(var g=1;g<arguments.length;g++){var l=arguments[g]!=null?arguments[g]:{};g%2?u(Object(l),!0).forEach((function(y){o(b,y,l[y])})):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(l)):u(Object(l)).forEach((function(y){Object.defineProperty(b,y,Object.getOwnPropertyDescriptor(l,y))}))}return b}function o(b,g,l){return(g=i(g))in b?Object.defineProperty(b,g,{value:l,enumerable:!0,configurable:!0,writable:!0}):b[g]=l,b}function c(b,g,l){return g&&(function(y,v){for(var S=0;S<v.length;S++){var w=v[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,i(w.key),w)}})(b.prototype,g),Object.defineProperty(b,"prototype",{writable:!1}),b}function i(b){var g=(function(l,y){if(t(l)!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var S=v.call(l,y);if(t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)})(b,"string");return t(g)=="symbol"?g:g+""}function n(b,g,l){return g=f(g),(function(y,v){if(v&&(t(v)=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S})(y)})(b,s()?Reflect.construct(g,l||[],f(b).constructor):g.apply(b,l))}function s(){try{var b=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(s=function(){return!!b})()}function f(b){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},f(b)}function r(b,g){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,y){return l.__proto__=y,l},r(b,g)}Ms=1;var e=Ul(),a=ql(),p=Yt().Stream,h=le(),m=ce().configure;return gr=(function(b){function g(){var l,y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(function(v,S){if(!(v instanceof S))throw new TypeError("Cannot call a class as a function")})(this,g),(l=n(this,g,[y])).options=y,l.name=y.name||"http",l.ssl=!!y.ssl,l.host=y.host||"localhost",l.port=y.port,l.auth=y.auth,l.path=y.path||"",l.maximumDepth=y.maximumDepth,l.agent=y.agent,l.headers=y.headers||{},l.headers["content-type"]="application/json",l.batch=y.batch||!1,l.batchInterval=y.batchInterval||5e3,l.batchCount=y.batchCount||10,l.batchOptions=[],l.batchTimeoutID=-1,l.batchCallback={},l.port||(l.port=l.ssl?443:80),l}return(function(l,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(y&&y.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),y&&r(l,y)})(g,b),c(g,[{key:"log",value:function(l,y){var v=this;this._request(l,null,null,(function(S,w){w&&w.statusCode!==200&&(S=new Error("Invalid HTTP Status Code: ".concat(w.statusCode))),S?v.emit("warn",S):v.emit("logged",l)})),y&&setImmediate(y)}},{key:"query",value:function(l,y){typeof l=="function"&&(y=l,l={});var v=(l={method:"query",params:this.normalizeQuery(l)}).params.auth||null;delete l.params.auth;var S=l.params.path||null;delete l.params.path,this._request(l,v,S,(function(w,_,M){if(_&&_.statusCode!==200&&(w=new Error("Invalid HTTP Status Code: ".concat(_.statusCode))),w)return y(w);if(typeof M=="string")try{M=JSON.parse(M)}catch(z){return y(z)}y(null,M)}))}},{key:"stream",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=new p,v=(l={method:"stream",params:l}).params.path||null;delete l.params.path;var S=l.params.auth||null;delete l.params.auth;var w="",_=this._request(l,S,v);return y.destroy=function(){return _.destroy()},_.on("data",(function(M){for(var z=(M=(w+M).split(/\n+/)).length-1,k=0;k<z;k++)try{y.emit("log",JSON.parse(M[k]))}catch(E){y.emit("error",E)}w=M[z]})),_.on("error",(function(M){return y.emit("error",M)})),y}},{key:"_request",value:function(l,y,v,S){l=l||{},y=y||this.auth,v=v||this.path||"",this.batch?this._doBatch(l,S,y,v):this._doRequest(l,S,y,v)}},{key:"_doBatch",value:function(l,y,v,S){if(this.batchOptions.push(l),this.batchOptions.length===1){var w=this;this.batchCallback=y,this.batchTimeoutID=setTimeout((function(){w.batchTimeoutID=-1,w._doBatchRequest(w.batchCallback,v,S)}),this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,v,S)}},{key:"_doBatchRequest",value:function(l,y,v){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);var S=this.batchOptions.slice();this.batchOptions=[],this._doRequest(S,l,y,v)}},{key:"_doRequest",value:function(l,y,v,S){var w=Object.assign({},this.headers);v&&v.bearer&&(w.Authorization="Bearer ".concat(v.bearer));var _=(this.ssl?a:e).request(d(d({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(S.replace(/^\//,"")),headers:w,auth:v&&v.username&&v.password?"".concat(v.username,":").concat(v.password):"",agent:this.agent}));_.on("error",y),_.on("response",(function(z){return z.on("end",(function(){return y(null,z)})).resume()}));var M=m(d({},this.maximumDepth&&{maximumDepth:this.maximumDepth}));_.end(dt.from(M(l,this.options.replacer),"utf8"))}}])})(h),gr}function ol(){if(Ds)return Cs;Ds=1;const t=u=>u!==null&&typeof u=="object"&&typeof u.pipe=="function";return t.writable=u=>t(u)&&u.writable!==!1&&typeof u._write=="function"&&typeof u._writableState=="object",t.readable=u=>t(u)&&u.readable!==!1&&typeof u._read=="function"&&typeof u._readableState=="object",t.duplex=u=>t.writable(u)&&t.readable(u),t.transform=u=>t.duplex(u)&&typeof u._transform=="function",Cs=t}function th(){if(Fs)return vr;function t(a){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},t(a)}function u(a,p,h){return p&&(function(m,b){for(var g=0;g<b.length;g++){var l=b[g];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,d(l.key),l)}})(a.prototype,p),Object.defineProperty(a,"prototype",{writable:!1}),a}function d(a){var p=(function(h,m){if(t(h)!="object"||!h)return h;var b=h[Symbol.toPrimitive];if(b!==void 0){var g=b.call(h,m);if(t(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(h)})(a,"string");return t(p)=="symbol"?p:p+""}function o(a,p,h){return p=i(p),(function(m,b){if(b&&(t(b)=="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(m)})(a,c()?Reflect.construct(p,h||[],i(a).constructor):p.apply(a,h))}function c(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(c=function(){return!!a})()}function i(a){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(p){return p.__proto__||Object.getPrototypeOf(p)},i(a)}function n(a,p){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,m){return h.__proto__=m,h},n(a,p)}Fs=1;var s=ol(),f=at().MESSAGE,r=Dt(),e=le();return vr=(function(a){function p(){var h,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if((function(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")})(this,p),h=o(this,p,[m]),!m.stream||!s(m.stream))throw new Error("options.stream is required.");return h._stream=m.stream,h._stream.setMaxListeners(1/0),h.isObjectMode=m.stream._writableState.objectMode,h.eol=typeof m.eol=="string"?m.eol:r.EOL,h}return(function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(m&&m.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),m&&n(h,m)})(p,a),u(p,[{key:"log",value:function(h,m){var b=this;if(setImmediate((function(){return b.emit("logged",h)})),this.isObjectMode)return this._stream.write(h),void(m&&m());this._stream.write("".concat(h[f]).concat(this.eol)),m&&m()}}])})(e),vr}var qs,zt={};function hn(){if(qs)return zt;qs=1;var t=Xc(),u=at().configs;return zt.cli=t.levels(u.cli),zt.npm=t.levels(u.npm),zt.syslog=t.levels(u.syslog),zt.addColors=t.levels,zt}var Gs,br={exports:{}},wr={exports:{}},zs,Zs,Hs,Vs,Er,Ys,_r={exports:{}};function pn(){return Zs||(Zs=1,(function(t,u){Object.defineProperty(u,"__esModule",{value:!0});var d=(Gs||(Gs=1,(function(r,e){Object.defineProperty(e,"__esModule",{value:!0});var a=y(fn()),p=y(on()),h=y(nl()),m=y(el()),b=y(rl()),g=y(Ht()),l=y(se());function y(w){return w&&w.__esModule?w:{default:w}}function v(w,_,M){M=(0,m.default)(M);var z=0,k=0,{length:E}=w,j=!1;function x(O,$){O===!1&&(j=!0),j!==!0&&(O?M(O):++k!==E&&$!==p.default||M(null))}for(E===0&&M(null);z<E;z++)_(w[z],z,(0,b.default)(x))}function S(w,_,M){return(0,h.default)(w,1/0,_,M)}e.default=(0,l.default)((function(w,_,M){return((0,a.default)(w)?v:S)(w,(0,g.default)(_),M)}),3),r.exports=e.default})(wr,wr.exports)),wr.exports),o=f(d),c=(function(){return zs||(zs=1,r=_r,e=_r.exports,Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(a){return(p,h,m)=>a(p,m)},r.exports=e.default),_r.exports;var r,e})(),i=f(c),n=f(Ht()),s=f(se());function f(r){return r&&r.__esModule?r:{default:r}}u.default=(0,s.default)((function(r,e,a){return(0,o.default)(r,(0,i.default)((0,n.default)(e)),a)}),3),t.exports=u.default})(br,br.exports)),br.exports}function il(){if(Ys)return Er;Ys=1;var t=(function(){if(Vs)return Hs;Vs=1;var u=Object.prototype.toString;return Hs=function(d){if(typeof d.displayName=="string"&&d.constructor.name)return d.displayName;if(typeof d.name=="string"&&d.name)return d.name;if(typeof d=="object"&&d.constructor&&typeof d.constructor.name=="string")return d.constructor.name;var o=d.toString(),c=u.call(d).slice(8,-1);return(o=c==="Function"?o.substring(o.indexOf("(")+1,o.indexOf(")")):c)||"anonymous"}})();return Er=function(u){var d,o=0;function c(){return o||(o=1,d=u.apply(this,arguments),u=null),d}return c.displayName=t(u),c},Er}var Ks,Ws,Js,Sr,Xs,Qs,ta,Or,ea,ra={};function sl(){return Ks||(Ks=1,(function(t){function u(d){for(var o in d)this[o]=d[o]}t.get=function(d){var o=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var c={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,f){return f},Error.captureStackTrace(c,d||t.get);var n=c.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=o,n},t.parse=function(d){if(!d.stack)return[];var o=this;return d.stack.split(`
|
|
86
|
-
`).slice(1).map((function(c){if(c.match(/^\s*[-]{4,}$/))return o._createParsedCallSite({fileName:c,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var i=c.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(i){var n=null,s=null,f=null,r=null,e=null,a=i[5]==="native";if(i[1]){var p=(f=i[1]).lastIndexOf(".");if(f[p-1]=="."&&p--,p>0){n=f.substr(0,p),s=f.substr(p+1);var h=n.indexOf(".Module");h>0&&(f=f.substr(h+1),n=n.substr(0,h))}r=null}s&&(r=n,e=s),s==="<anonymous>"&&(e=null,f=null);var m={fileName:i[2]||null,lineNumber:parseInt(i[3],10)||null,functionName:f,typeName:r,methodName:e,columnNumber:parseInt(i[4],10)||null,native:a};return o._createParsedCallSite(m)}})).filter((function(c){return!!c}))},["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(d){u.prototype[d]=null,u.prototype["get"+d[0].toUpperCase()+d.substr(1)]=function(){return this[d]}})),["topLevel","eval","native","constructor"].forEach((function(d){u.prototype[d]=!1,u.prototype["is"+d[0].toUpperCase()+d.substr(1)]=function(){return this[d]}})),t._createParsedCallSite=function(d){return new u(d)}})(ra)),ra}function eh(){if(Js)return Ws;function t(f){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t(f)}function u(f,r,e){return r&&(function(a,p){for(var h=0;h<p.length;h++){var m=p[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(a,d(m.key),m)}})(f.prototype,r),Object.defineProperty(f,"prototype",{writable:!1}),f}function d(f){var r=(function(e,a){if(t(e)!="object"||!e)return e;var p=e[Symbol.toPrimitive];if(p!==void 0){var h=p.call(e,a);if(t(h)!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)})(f,"string");return t(r)=="symbol"?r:r+""}function o(f,r,e){return r=i(r),(function(a,p){if(p&&(t(p)=="object"||typeof p=="function"))return p;if(p!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h})(a)})(f,c()?Reflect.construct(r,e||[],i(f).constructor):r.apply(f,e))}function c(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(c=function(){return!!f})()}function i(f){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},i(f)}function n(f,r){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,a){return e.__proto__=a,e},n(f,r)}Js=1;var s=Yt().Writable;return Ws=(function(f){function r(e){var a;if((function(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")})(this,r),a=o(this,r,[{objectMode:!0}]),!e)throw new Error("ExceptionStream requires a TransportStream instance.");return a.handleExceptions=!0,a.transport=e,a}return(function(e,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&n(e,a)})(r,f),u(r,[{key:"_write",value:function(e,a,p){return e.exception?this.transport.log(e,p):(p(),!0)}}])})(s)}function al(){if(Xs)return Sr;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function u(r,e,a){return e&&(function(p,h){for(var m=0;m<h.length;m++){var b=h[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,d(b.key),b)}})(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function d(r){var e=(function(a,p){if(t(a)!="object"||!a)return a;var h=a[Symbol.toPrimitive];if(h!==void 0){var m=h.call(a,p);if(t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return t(e)=="symbol"?e:e+""}Xs=1;var o=Dt(),c=pn(),i=xe()("winston:exception"),n=il(),s=sl(),f=eh();return Sr=(function(){return u((function r(e){if((function(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")})(this,r),!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}),[{key:"handle",value:function(){for(var r=this,e=arguments.length,a=new Array(e),p=0;p<e;p++)a[p]=arguments[p];a.forEach((function(h){if(Array.isArray(h))return h.forEach((function(m){return r._addHandler(m)}));r._addHandler(h)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),Q.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var r=this;this.catcher&&(Q.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(e){return r.logger.unpipe(e)})))}},{key:"getAllInfo",value:function(r){var e=null;return r&&(e=typeof r=="string"?r:r.message),{error:r,level:"error",message:["uncaughtException: ".concat(e||"(no error message)"),r&&r.stack||" No stack trace"].join(`
|
|
87
|
-
`),stack:r&&r.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(r)}}},{key:"getProcessInfo",value:function(){return{pid:Q.pid,uid:Q.getuid?Q.getuid():null,gid:Q.getgid?Q.getgid():null,cwd:Q.cwd(),execPath:Q.execPath,version:Q.version,argv:Q.argv,memoryUsage:Q.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:o.loadavg(),uptime:o.uptime()}}},{key:"getTrace",value:function(r){return(r?s.parse(r):s.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(r){if(!this.handlers.has(r)){r.handleExceptions=!0;var e=new f(r);this.handlers.set(r,e),this.logger.pipe(e)}}},{key:"_uncaughtException",value:function(r){var e,a=this.getAllInfo(r),p=this._getExceptionHandlers(),h=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(r):this.logger.exitOnError;function m(){i("doExit",h),i("process._exiting",Q._exiting),h&&!Q._exiting&&(e&&clearTimeout(e),Q.exit(1))}if(!p.length&&h&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),h=!1),!p||p.length===0)return Q.nextTick(m);c(p,(function(b,g){var l=n(g),y=b.transport||b;function v(S){return function(){i(S),l()}}y._ending=!0,y.once("finish",v("finished")),y.once("error",v("error"))}),(function(){return h&&m()})),this.logger.log(a),h&&(e=setTimeout(m,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter((function(r){return(r.transport||r).handleExceptions}))}}])})(),Sr}function rh(){if(ta)return Qs;function t(f){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t(f)}function u(f,r,e){return r&&(function(a,p){for(var h=0;h<p.length;h++){var m=p[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(a,d(m.key),m)}})(f.prototype,r),Object.defineProperty(f,"prototype",{writable:!1}),f}function d(f){var r=(function(e,a){if(t(e)!="object"||!e)return e;var p=e[Symbol.toPrimitive];if(p!==void 0){var h=p.call(e,a);if(t(h)!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)})(f,"string");return t(r)=="symbol"?r:r+""}function o(f,r,e){return r=i(r),(function(a,p){if(p&&(t(p)=="object"||typeof p=="function"))return p;if(p!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h})(a)})(f,c()?Reflect.construct(r,e||[],i(f).constructor):r.apply(f,e))}function c(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(c=function(){return!!f})()}function i(f){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},i(f)}function n(f,r){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,a){return e.__proto__=a,e},n(f,r)}ta=1;var s=Yt().Writable;return Qs=(function(f){function r(e){var a;if((function(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")})(this,r),a=o(this,r,[{objectMode:!0}]),!e)throw new Error("RejectionStream requires a TransportStream instance.");return a.handleRejections=!0,a.transport=e,a}return(function(e,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&n(e,a)})(r,f),u(r,[{key:"_write",value:function(e,a,p){return e.rejection?this.transport.log(e,p):(p(),!0)}}])})(s)}function ul(){if(ea)return Or;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function u(r,e,a){return e&&(function(p,h){for(var m=0;m<h.length;m++){var b=h[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,d(b.key),b)}})(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function d(r){var e=(function(a,p){if(t(a)!="object"||!a)return a;var h=a[Symbol.toPrimitive];if(h!==void 0){var m=h.call(a,p);if(t(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(r,"string");return t(e)=="symbol"?e:e+""}ea=1;var o=Dt(),c=pn(),i=xe()("winston:rejection"),n=il(),s=sl(),f=rh();return Or=(function(){return u((function r(e){if((function(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")})(this,r),!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}),[{key:"handle",value:function(){for(var r=this,e=arguments.length,a=new Array(e),p=0;p<e;p++)a[p]=arguments[p];a.forEach((function(h){if(Array.isArray(h))return h.forEach((function(m){return r._addHandler(m)}));r._addHandler(h)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),Q.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var r=this;this.catcher&&(Q.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(e){return r.logger.unpipe(e)})))}},{key:"getAllInfo",value:function(r){var e=null;return r&&(e=typeof r=="string"?r:r.message),{error:r,level:"error",message:["unhandledRejection: ".concat(e||"(no error message)"),r&&r.stack||" No stack trace"].join(`
|
|
88
|
-
`),stack:r&&r.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(r)}}},{key:"getProcessInfo",value:function(){return{pid:Q.pid,uid:Q.getuid?Q.getuid():null,gid:Q.getgid?Q.getgid():null,cwd:Q.cwd(),execPath:Q.execPath,version:Q.version,argv:Q.argv,memoryUsage:Q.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:o.loadavg(),uptime:o.uptime()}}},{key:"getTrace",value:function(r){return(r?s.parse(r):s.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(r){if(!this.handlers.has(r)){r.handleRejections=!0;var e=new f(r);this.handlers.set(r,e),this.logger.pipe(e)}}},{key:"_unhandledRejection",value:function(r){var e,a=this.getAllInfo(r),p=this._getRejectionHandlers(),h=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(r):this.logger.exitOnError;function m(){i("doExit",h),i("process._exiting",Q._exiting),h&&!Q._exiting&&(e&&clearTimeout(e),Q.exit(1))}if(!p.length&&h&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),h=!1),!p||p.length===0)return Q.nextTick(m);c(p,(function(b,g){var l=n(g),y=b.transport||b;function v(S){return function(){i(S),l()}}y._ending=!0,y.once("finish",v("finished")),y.once("error",v("error"))}),(function(){return h&&m()})),this.logger.log(a),h&&(e=setTimeout(m,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter((function(r){return(r.transport||r).handleRejections}))}}])})(),Or}var na,oa,ia,sa,aa,ua,ca,la,fa,ha,jr,pa,xr,da,ma,kr={exports:{}},Tr={exports:{}};function nh(){if(oa)return kr.exports;oa=1;const t=lt(),{LEVEL:u}=at(),d=(function(){if(na)return Tr.exports;na=1;const c=lt(),i=Ic(),{LEVEL:n}=at(),s=Tr.exports=function(f={}){i.call(this,{objectMode:!0,highWaterMark:f.highWaterMark}),this.format=f.format,this.level=f.level,this.handleExceptions=f.handleExceptions,this.handleRejections=f.handleRejections,this.silent=f.silent,f.log&&(this.log=f.log),f.logv&&(this.logv=f.logv),f.close&&(this.close=f.close),this.once("pipe",(r=>{this.levels=r.levels,this.parent=r})),this.once("unpipe",(r=>{r===this.parent&&(this.parent=null,this.close&&this.close())}))};return c.inherits(s,i),s.prototype._write=function(f,r,e){if(this.silent||f.exception===!0&&!this.handleExceptions)return e(null);const a=this.level||this.parent&&this.parent.level;if(!a||this.levels[a]>=this.levels[f[n]]){if(f&&!this.format)return this.log(f,e);let p,h;try{h=this.format.transform(Object.assign({},f),this.format.options)}catch(m){p=m}if(p||!h){if(e(),p)throw p;return}return this.log(h,e)}return this._writableState.sync=!1,e(null)},s.prototype._writev=function(f,r){if(this.logv){const e=f.filter(this._accept,this);return e.length?this.logv(e,r):r(null)}for(let e=0;e<f.length;e++){if(!this._accept(f[e]))continue;if(f[e].chunk&&!this.format){this.log(f[e].chunk,f[e].callback);continue}let a,p;try{p=this.format.transform(Object.assign({},f[e].chunk),this.format.options)}catch(h){a=h}if(a||!p){if(f[e].callback(),a)throw r(null),a}else this.log(p,f[e].callback)}return r(null)},s.prototype._accept=function(f){const r=f.chunk;if(this.silent)return!1;const e=this.level||this.parent&&this.parent.level;return!(r.exception!==!0&&e&&!(this.levels[e]>=this.levels[r[n]])||!this.handleExceptions&&r.exception===!0)},s.prototype._nop=function(){},Tr.exports})(),o=kr.exports=function(c={}){if(d.call(this,c),!c.transport||typeof c.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=c.transport,this.level=this.level||c.transport.level,this.handleExceptions=this.handleExceptions||c.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=(function(i){this.emit("error",i,this.transport)}).bind(this),this.transport.on("error",this.transport.__winstonError))};return t.inherits(o,d),o.prototype._write=function(c,i,n){if(this.silent||c.exception===!0&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[c[u]])&&this.transport.log(c[u],c.message,c,this._nop),n(null)},o.prototype._writev=function(c,i){for(let n=0;n<c.length;n++)this._accept(c[n])&&(this.transport.log(c[n].chunk[u],c[n].chunk.message,c[n].chunk,this._nop),c[n].callback());return i(null)},o.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
89
|
-
`))},o.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},kr.exports}function oh(){if(sa)return ia;function t(c){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t(c)}function u(c,i,n){return i&&(function(s,f){for(var r=0;r<f.length;r++){var e=f[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(s,d(e.key),e)}})(c.prototype,i),Object.defineProperty(c,"prototype",{writable:!1}),c}function d(c){var i=(function(n,s){if(t(n)!="object"||!n)return n;var f=n[Symbol.toPrimitive];if(f!==void 0){var r=f.call(n,s);if(t(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(c,"string");return t(i)=="symbol"?i:i+""}sa=1;var o=(function(){return u((function c(i){(function(s,f){if(!(s instanceof f))throw new TypeError("Cannot call a class as a function")})(this,c);var n=dn();if(t(i)!=="object"||Array.isArray(i)||!(i instanceof n))throw new Error("Logger is required for profiling");this.logger=i,this.start=Date.now()}),[{key:"done",value:function(){for(var c=arguments.length,i=new Array(c),n=0;n<c;n++)i[n]=arguments[n];typeof i[i.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),i.pop());var s=t(i[i.length-1])==="object"?i.pop():{};return s.level=s.level||"info",s.durationMs=Date.now()-this.start,this.logger.write(s)}}])})();return ia=o}function ih(){if(ua)return aa;ua=1;class t extends Error{constructor(d){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
90
|
-
Found: ${d.toString().split(`
|
|
91
|
-
`)[0]}
|
|
92
|
-
`),Error.captureStackTrace(this,t)}}return aa=u=>{if(u.length>2)throw new t(u);function d(c={}){this.options=c}function o(c){return new d(c)}return d.prototype.transform=u,o.Format=d,o}}function dn(){if(ha)return fa;function t(k,E,j){return(E=o(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function u(k){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},u(k)}function d(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,o(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function o(k){var E=(function(j,x){if(u(j)!="object"||!j)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(u($)!="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return u(E)=="symbol"?E:E+""}function c(k,E,j){return E=n(E),(function(x,O){if(O&&(u(O)=="object"||typeof O=="function"))return O;if(O!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function($){if($===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $})(x)})(k,i()?Reflect.construct(E,j||[],n(k).constructor):E.apply(k,j))}function i(){try{var k=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(i=function(){return!!k})()}function n(k){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},n(k)}function s(k,E){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},s(k,E)}ha=1;var f=Yt(),r=f.Stream,e=f.Transform,a=pn(),p=at(),h=p.LEVEL,m=p.SPLAT,b=ol(),g=al(),l=ul(),y=nh(),v=oh(),S=Qc().warn,w=hn(),_=/%[scdjifoO%]/g,M=(function(k){function E(j){var x;return(function(O,$){if(!(O instanceof $))throw new TypeError("Cannot call a class as a function")})(this,E),(x=c(this,E,[{objectMode:!0}])).configure(j),x}return(function(j,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");j.prototype=Object.create(x&&x.prototype,{constructor:{value:j,writable:!0,configurable:!0}}),Object.defineProperty(j,"prototype",{writable:!1}),x&&s(j,x)})(E,k),d(E,[{key:"child",value:function(j){var x=this;return Object.create(x,{write:{value:function(O){var $=Object.assign({},j,O);O instanceof Error&&($.stack=O.stack,$.message=O.message),x.write($)}}})}},{key:"configure",value:function(){var j=this,x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=x.silent,$=x.format,N=x.defaultMeta,P=x.levels,G=x.level,A=G===void 0?"info":G,I=x.exitOnError,R=I===void 0||I,B=x.transports,V=x.colors,J=x.emitErrs,F=x.formatters,L=x.padLevels,U=x.rewriters,Z=x.stripColors,q=x.exceptionHandlers,Y=x.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=O,this.format=$||this.format||(function(){if(la)return ca;la=1;const C=ih(),{MESSAGE:T}=at(),D=ce();function H(W,K){return typeof K=="bigint"?K.toString():K}return ca=C(((W,K)=>{const et=D.configure(K);return W[T]=et(W,K.replacer||H,K.space),W}))})()(),this.defaultMeta=N||null,this.levels=P||this.levels||w.npm.levels,this.level=A,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new g(this),this.rejections=new l(this),this.profilers={},this.exitOnError=R,B&&(B=Array.isArray(B)?B:[B]).forEach((function(C){return j.add(C)})),V||J||F||L||U||Z)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
93
|
-
`));q&&this.exceptions.handle(q),Y&&this.rejections.handle(Y)}},{key:"isLevelEnabled",value:function(j){var x=this,O=z(this.levels,j);if(O===null)return!1;var $=z(this.levels,this.level);return $!==null&&(this.transports&&this.transports.length!==0?this.transports.findIndex((function(N){var P=z(x.levels,N.level);return P===null&&(P=$),P>=O}))!==-1:$>=O)}},{key:"log",value:function(j,x){for(var O=arguments.length,$=new Array(O>2?O-2:0),N=2;N<O;N++)$[N-2]=arguments[N];if(arguments.length===1)return j[h]=j.level,this._addDefaultMeta(j),this.write(j),this;if(arguments.length===2)return x&&u(x)==="object"?(x[h]=x.level=j,this._addDefaultMeta(x),this.write(x),this):(x=t(t(t({},h,j),"level",j),"message",x),this._addDefaultMeta(x),this.write(x),this);var P=$[0];if(u(P)==="object"&&P!==null&&!(x&&x.match&&x.match(_))){var G=Object.assign({},this.defaultMeta,P,t(t(t(t({},h,j),m,$),"level",j),"message",x));return P.message&&(G.message="".concat(G.message," ").concat(P.message)),P.stack&&(G.stack=P.stack),P.cause&&(G.cause=P.cause),this.write(G),this}return this.write(Object.assign({},this.defaultMeta,t(t(t(t({},h,j),m,$),"level",j),"message",x))),this}},{key:"_transform",value:function(j,x,O){if(this.silent)return O();j[h]||(j[h]=j.level),this.levels[j[h]]||this.levels[j[h]]===0||console.error("[winston] Unknown logger level: %s",j[h]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",j);try{this.push(this.format.transform(j,this.format.options))}finally{this._writableState.sync=!1,O()}}},{key:"_final",value:function(j){var x=this.transports.slice();a(x,(function(O,$){if(!O||O.finished)return setImmediate($);O.once("finish",$),O.end()}),j)}},{key:"add",value:function(j){var x=!b(j)||j.log.length>2?new y({transport:j}):j;if(!x._writableState||!x._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",x),this._onEvent("warn",x),this.pipe(x),j.handleExceptions&&this.exceptions.handle(),j.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(j){if(!j)return this;var x=j;return(!b(j)||j.log.length>2)&&(x=this.transports.filter((function(O){return O.transport===j}))[0]),x&&this.unpipe(x),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){S.deprecated("setLevels")}},{key:"query",value:function(j,x){typeof j=="function"&&(x=j,j={}),j=j||{};var O={},$=Object.assign({},j.query||{});a(this.transports.filter((function(N){return!!N.query})),(function(N,P){(function(G,A){j.query&&typeof G.formatQuery=="function"&&(j.query=G.formatQuery($)),G.query(j,(function(I,R){if(I)return A(I);typeof G.formatResults=="function"&&(R=G.formatResults(R,j.format)),A(null,R)}))})(N,(function(G,A){P&&((A=G||A)&&(O[N.name]=A),P()),P=null}))}),(function(){return x(null,O)}))}},{key:"stream",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=new r,O=[];return x._streams=O,x.destroy=function(){for(var $=O.length;$--;)O[$].destroy()},this.transports.filter((function($){return!!$.stream})).forEach((function($){var N=$.stream(j);N&&(O.push(N),N.on("log",(function(P){P.transport=P.transport||[],P.transport.push($.name),x.emit("log",P)})),N.on("error",(function(P){P.transport=P.transport||[],P.transport.push($.name),x.emit("error",P)})))})),x}},{key:"startTimer",value:function(){return new v(this)}},{key:"profile",value:function(j){var x=Date.now();if(this.profilers[j]){var O=this.profilers[j];delete this.profilers[j];for(var $=arguments.length,N=new Array($>1?$-1:0),P=1;P<$;P++)N[P-1]=arguments[P];typeof N[N.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),N.pop());var G=u(N[N.length-1])==="object"?N.pop():{};return G.level=G.level||"info",G.durationMs=x-O,G.message=G.message||j,this.write(G)}return this.profilers[j]=x,this}},{key:"handleExceptions",value:function(){var j;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(j=this.exceptions).handle.apply(j,arguments)}},{key:"unhandleExceptions",value:function(){var j;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(j=this.exceptions).unhandle.apply(j,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
94
|
-
`))}},{key:"_onEvent",value:function(j,x){x["__winston"+j]||(x["__winston"+j]=(function(O){j!=="error"||this.transports.includes(x)||this.add(x),this.emit(j,O,x)}).bind(this),x.on(j,x["__winston"+j]))}},{key:"_addDefaultMeta",value:function(j){this.defaultMeta&&Object.assign(j,this.defaultMeta)}}])})(e);function z(k,E){var j=k[E];return j||j===0?j:null}return Object.defineProperty(M.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var k=this._readableState.pipes;return Array.isArray(k)?k:[k].filter(Boolean)}}),fa=M}function cl(){if(pa)return jr;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function u(r,e,a){return e=o(e),(function(p,h){if(h&&(t(h)=="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(p)})(r,d()?Reflect.construct(e,a||[],o(r).constructor):e.apply(r,a))}function d(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(d=function(){return!!r})()}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(r)}function c(r,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},c(r,e)}pa=1;var i=at().LEVEL,n=hn(),s=dn(),f=xe()("winston:create-logger");return jr=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.levels=r.levels||n.npm.levels;var e=(function(p){function h(b){return(function(g,l){if(!(g instanceof l))throw new TypeError("Cannot call a class as a function")})(this,h),u(this,h,[b])}return(function(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),g&&c(b,g)})(h,p),m=h,Object.defineProperty(m,"prototype",{writable:!1}),m;var m})(s),a=new e(r);return Object.keys(r.levels).forEach((function(p){f('Define prototype method for "%s"',p),p!=="log"?(e.prototype[p]=function(){for(var h=this||a,m=arguments.length,b=new Array(m),g=0;g<m;g++)b[g]=arguments[g];if(b.length===1){var l=b[0],y=l&&l.message&&l||{message:l};return y.level=y[i]=p,h._addDefaultMeta(y),h.write(y),this||a}return b.length===0?(h.log(p,""),h):h.log.apply(h,[p].concat(b))},e.prototype[(function(h){return"is"+h.charAt(0).toUpperCase()+h.slice(1)+"Enabled"})(p)]=function(){return(this||a).isLevelEnabled(p)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),a},jr}function sh(){if(da)return xr;function t(c){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t(c)}function u(c,i,n){return i&&(function(s,f){for(var r=0;r<f.length;r++){var e=f[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(s,d(e.key),e)}})(c.prototype,i),Object.defineProperty(c,"prototype",{writable:!1}),c}function d(c){var i=(function(n,s){if(t(n)!="object"||!n)return n;var f=n[Symbol.toPrimitive];if(f!==void 0){var r=f.call(n,s);if(t(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(c,"string");return t(i)=="symbol"?i:i+""}da=1;var o=cl();return xr=(function(){return u((function c(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(function(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")})(this,c),this.loggers=new Map,this.options=i}),[{key:"add",value:function(c,i){var n=this;if(!this.loggers.has(c)){var s=(i=Object.assign({},i||this.options)).transports||this.options.transports;i.transports=s?Array.isArray(s)?s.slice():[s]:[];var f=o(i);f.on("close",(function(){return n._delete(c)})),this.loggers.set(c,f)}return this.loggers.get(c)}},{key:"get",value:function(c,i){return this.add(c,i)}},{key:"has",value:function(c){return!!this.loggers.has(c)}},{key:"close",value:function(c){var i=this;if(c)return this._removeLogger(c);this.loggers.forEach((function(n,s){return i._removeLogger(s)}))}},{key:"_removeLogger",value:function(c){this.loggers.has(c)&&(this.loggers.get(c).close(),this._delete(c))}},{key:"_delete",value:function(c){this.loggers.delete(c)}}])})(),xr}function ah(){return ma||(ma=1,(function(t){var u=Xc(),d=Qc().warn;t.version=Gf,t.transports=(function(){return Bs||(Bs=1,c=es,Object.defineProperty(c,"Console",{configurable:!0,enumerable:!0,get:function(){return zf()}}),Object.defineProperty(c,"File",{configurable:!0,enumerable:!0,get:function(){return Xf()}}),Object.defineProperty(c,"Http",{configurable:!0,enumerable:!0,get:function(){return Qf()}}),Object.defineProperty(c,"Stream",{configurable:!0,enumerable:!0,get:function(){return th()}})),es;var c})(),t.config=hn(),t.addColors=u.levels,t.format=u.format,t.createLogger=cl(),t.Logger=dn(),t.ExceptionHandler=al(),t.RejectionHandler=ul(),t.Container=sh(),t.Transport=le(),t.loggers=new t.Container;var o=t.createLogger();Object.keys(t.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((function(c){return t[c]=function(){return o[c].apply(o,arguments)}})),Object.defineProperty(t,"level",{get:function(){return o.level},set:function(c){o.level=c}}),Object.defineProperty(t,"exceptions",{get:function(){return o.exceptions}}),Object.defineProperty(t,"rejections",{get:function(){return o.rejections}}),["exitOnError"].forEach((function(c){Object.defineProperty(t,c,{get:function(){return o[c]},set:function(i){o[c]=i}})})),Object.defineProperty(t,"default",{get:function(){return{exceptionHandlers:o.exceptionHandlers,rejectionHandlers:o.rejectionHandlers,transports:o.transports}}}),d.deprecated(t,"setLevels"),d.forFunctions(t,"useFormat",["cli"]),d.forProperties(t,"useFormat",["padLevels","stripColors"]),d.forFunctions(t,"deprecated",["addRewriter","addFilter","clone","extend"]),d.forProperties(t,"deprecated",["emitErrs","levelLength"])})(Co)),Co}var ya,ga,va,ba,wa,Ea,_a={exports:{}};function ke(){if(ga)return ya;ga=1;var t=function(u,d){Error.call(this,u),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=u,d&&(this.inner=d)};return(t.prototype=Object.create(Error.prototype)).constructor=t,ya=t}function ll(){if(ba)return va;ba=1;var t=ke(),u=function(d,o){t.call(this,d),this.name="NotBeforeError",this.date=o};return(u.prototype=Object.create(t.prototype)).constructor=u,va=u}function fl(){if(Ea)return wa;Ea=1;var t=ke(),u=function(d,o){t.call(this,d),this.name="TokenExpiredError",this.expiredAt=o};return(u.prototype=Object.create(t.prototype)).constructor=u,wa=u}var Sa,Oa,ja,xa,ka,Ta,Ar,Aa,Ra,Ia,Pa,Na,La,$a,Ma,Ca,Da,Fa,Ba,Rr,Ua,Tt={};function hl(){if(Oa)return Sa;Oa=1;var t=ue().Buffer,u=je();function d(o){if(this.buffer=null,this.writable=!0,this.readable=!0,!o)return this.buffer=t.alloc(0),this;if(typeof o.pipe=="function")return this.buffer=t.alloc(0),o.pipe(this),this;if(o.length||typeof o=="object")return this.buffer=o,this.writable=!1,Q.nextTick((function(){this.emit("end",o),this.readable=!1,this.emit("close")}).bind(this)),this;throw new TypeError("Unexpected data type ("+typeof o+")")}return lt().inherits(d,u),d.prototype.write=function(o){this.buffer=t.concat([this.buffer,t.from(o)]),this.emit("data",o)},d.prototype.end=function(o){o&&this.write(o),this.emit("end",o),this.emit("close"),this.writable=!1,this.readable=!1},Sa=d}function uh(){if(Ta)return ka;Ta=1;var t=ue().Buffer,u=(function(){if(xa)return ja;function i(s){return(s/8|0)+(s%8==0?0:1)}xa=1;var n={ES256:i(256),ES384:i(384),ES512:i(521)};return ja=function(s){var f=n[s];if(f)return f;throw new Error('Unknown algorithm "'+s+'"')}})(),d=128;function o(i){if(t.isBuffer(i))return i;if(typeof i=="string")return t.from(i,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function c(i,n,s){for(var f=0;n+f<s&&i[n+f]===0;)++f;return i[n+f]>=d&&--f,f}return ka={derToJose:function(i,n){i=o(i);var s=u(n),f=s+1,r=i.length,e=0;if(i[e++]!==48)throw new Error('Could not find expected "seq"');var a=i[e++];if(a===129&&(a=i[e++]),r-e<a)throw new Error('"seq" specified length of "'+a+'", only "'+(r-e)+'" remaining');if(i[e++]!==2)throw new Error('Could not find expected "int" for "r"');var p=i[e++];if(r-e-2<p)throw new Error('"r" specified length of "'+p+'", only "'+(r-e-2)+'" available');if(f<p)throw new Error('"r" specified length of "'+p+'", max of "'+f+'" is acceptable');var h=e;if(e+=p,i[e++]!==2)throw new Error('Could not find expected "int" for "s"');var m=i[e++];if(r-e!==m)throw new Error('"s" specified length of "'+m+'", expected "'+(r-e)+'"');if(f<m)throw new Error('"s" specified length of "'+m+'", max of "'+f+'" is acceptable');var b=e;if((e+=m)!==r)throw new Error('Expected to consume entire buffer, but "'+(r-e)+'" bytes remain');var g=s-p,l=s-m,y=t.allocUnsafe(g+p+l+m);for(e=0;e<g;++e)y[e]=0;i.copy(y,e,h+Math.max(-g,0),h+p);for(var v=e=s;e<v+l;++e)y[e]=0;return i.copy(y,e,b+Math.max(-l,0),b+m),y=(y=y.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(i,n){i=o(i);var s=u(n),f=i.length;if(f!==2*s)throw new TypeError('"'+n+'" signatures must be "'+2*s+'" bytes, saw "'+f+'"');var r=c(i,0,s),e=c(i,s,i.length),a=s-r,p=s-e,h=2+a+1+1+p,m=h<d,b=t.allocUnsafe((m?2:3)+h),g=0;return b[g++]=48,m?b[g++]=h:(b[g++]=129,b[g++]=255&h),b[g++]=2,b[g++]=a,r<0?(b[g++]=0,g+=i.copy(b,g,0,s)):g+=i.copy(b,g,r,s),b[g++]=2,b[g++]=p,e<0?(b[g++]=0,i.copy(b,g,s)):i.copy(b,g,s+e),b}}}function pl(){if(Ia)return Ra;Ia=1;var t,u=ue().Buffer,d=Vt(),o=uh(),c=lt(),i="secret must be a string or buffer",n="key must be a string or a buffer",s=typeof d.createPublicKey=="function";function f(k){if(!u.isBuffer(k)&&typeof k!="string"&&(!s||typeof k!="object"||typeof k.type!="string"||typeof k.asymmetricKeyType!="string"||typeof k.export!="function"))throw p(n)}function r(k){if(!u.isBuffer(k)&&typeof k!="string"&&typeof k!="object")throw p("key must be a string, a buffer or an object")}function e(k){return k.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function a(k){var E=4-(k=k.toString()).length%4;if(E!==4)for(var j=0;j<E;++j)k+="=";return k.replace(/\-/g,"+").replace(/_/g,"/")}function p(k){var E=[].slice.call(arguments,1),j=c.format.bind(c,k).apply(null,E);return new TypeError(j)}function h(k){var E;return E=k,u.isBuffer(E)||typeof E=="string"||(k=JSON.stringify(k)),k}function m(k){return function(E,j){(function(O){if(!u.isBuffer(O)){if(typeof O=="string")return O;if(!s||typeof O!="object"||O.type!=="secret"||typeof O.export!="function")throw p(i)}})(j),E=h(E);var x=d.createHmac("sha"+k,j);return e((x.update(E),x.digest("base64")))}}s&&(n+=" or a KeyObject",i+="or a KeyObject");var b="timingSafeEqual"in d?function(k,E){return k.byteLength===E.byteLength&&d.timingSafeEqual(k,E)}:function(k,E){return t||(t=(function(){if(Aa)return Ar;Aa=1;var j=oe().Buffer,x=oe().SlowBuffer;function O(P,G){if(!j.isBuffer(P)||!j.isBuffer(G)||P.length!==G.length)return!1;for(var A=0,I=0;I<P.length;I++)A|=P[I]^G[I];return A===0}Ar=O,O.install=function(){j.prototype.equal=x.prototype.equal=function(P){return O(this,P)}};var $=j.prototype.equal,N=x.prototype.equal;return O.restore=function(){j.prototype.equal=$,x.prototype.equal=N},Ar})()),t(k,E)};function g(k){return function(E,j,x){var O=m(k)(E,x);return b(u.from(j),u.from(O))}}function l(k){return function(E,j){r(j),E=h(E);var x=d.createSign("RSA-SHA"+k);return e((x.update(E),x.sign(j,"base64")))}}function y(k){return function(E,j,x){f(x),E=h(E),j=a(j);var O=d.createVerify("RSA-SHA"+k);return O.update(E),O.verify(x,j,"base64")}}function v(k){return function(E,j){r(j),E=h(E);var x=d.createSign("RSA-SHA"+k);return e((x.update(E),x.sign({key:j,padding:d.constants.RSA_PKCS1_PSS_PADDING,saltLength:d.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function S(k){return function(E,j,x){f(x),E=h(E),j=a(j);var O=d.createVerify("RSA-SHA"+k);return O.update(E),O.verify({key:x,padding:d.constants.RSA_PKCS1_PSS_PADDING,saltLength:d.constants.RSA_PSS_SALTLEN_DIGEST},j,"base64")}}function w(k){var E=l(k);return function(){var j=E.apply(null,arguments);return j=o.derToJose(j,"ES"+k)}}function _(k){var E=y(k);return function(j,x,O){return x=o.joseToDer(x,"ES"+k).toString("base64"),E(j,x,O)}}function M(){return function(){return""}}function z(){return function(k,E){return E===""}}return Ra=function(k){var E={hs:m,rs:l,ps:v,es:w,none:M},j={hs:g,rs:y,ps:S,es:_,none:z},x=k.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!x)throw p(`"%s" is not a valid algorithm.
|
|
95
|
-
Supported algorithms are:
|
|
96
|
-
"HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,k);var O=(x[1]||x[3]).toLowerCase(),$=x[2];return{sign:E[O]($),verify:j[O]($)}}}function dl(){if(Na)return Pa;Na=1;var t=oe().Buffer;return Pa=function(u){return typeof u=="string"?u:typeof u=="number"||t.isBuffer(u)?u.toString():JSON.stringify(u)}}function ch(){if($a)return La;$a=1;var t=ue().Buffer,u=hl(),d=pl(),o=je(),c=dl(),i=lt();function n(r,e){return t.from(r,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function s(r){var e=r.header,a=r.payload,p=r.secret||r.privateKey,h=r.encoding,m=d(e.alg),b=(function(l,y,v){v=v||"utf8";var S=n(c(l),"binary"),w=n(c(y),v);return i.format("%s.%s",S,w)})(e,a,h),g=m.sign(b,p);return i.format("%s.%s",b,g)}function f(r){var e=r.secret;if(e=(e=e??r.privateKey)==null?r.key:e,/^hs/i.test(r.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var a=new u(e);this.readable=!0,this.header=r.header,this.encoding=r.encoding,this.secret=this.privateKey=this.key=a,this.payload=new u(r.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}return i.inherits(f,o),f.prototype.sign=function(){try{var r=s({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",r),this.emit("data",r),this.emit("end"),this.readable=!1,r}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},f.sign=s,La=f}function lh(){if(Ca)return Ma;Ca=1;var t=ue().Buffer,u=hl(),d=pl(),o=je(),c=dl(),i=lt(),n=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function s(m){if((function(b){return Object.prototype.toString.call(b)==="[object Object]"})(m))return m;try{return JSON.parse(m)}catch{return}}function f(m){var b=m.split(".",1)[0];return s(t.from(b,"base64").toString("binary"))}function r(m){return m.split(".")[2]}function e(m){return n.test(m)&&!!f(m)}function a(m,b,g){if(!b){var l=new Error("Missing algorithm parameter for jws.verify");throw l.code="MISSING_ALGORITHM",l}var y=r(m=c(m)),v=(function(S){return S.split(".",2).join(".")})(m);return d(b).verify(v,y,g)}function p(m,b){if(b=b||{},!e(m=c(m)))return null;var g=f(m);if(!g)return null;var l=(function(y,v){v=v||"utf8";var S=y.split(".")[1];return t.from(S,"base64").toString(v)})(m);return(g.typ==="JWT"||b.json)&&(l=JSON.parse(l,b.encoding)),{header:g,payload:l,signature:r(m)}}function h(m){var b=(m=m||{}).secret;if(b=(b=b??m.publicKey)==null?m.key:b,/^hs/i.test(m.algorithm)===!0&&b==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var g=new u(b);this.readable=!0,this.algorithm=m.algorithm,this.encoding=m.encoding,this.secret=this.publicKey=this.key=g,this.signature=new u(m.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}return i.inherits(h,o),h.prototype.verify=function(){try{var m=a(this.signature.buffer,this.algorithm,this.key.buffer),b=p(this.signature.buffer,this.encoding);return this.emit("done",m,b),this.emit("data",m),this.emit("end"),this.readable=!1,m}catch(g){this.readable=!1,this.emit("error",g),this.emit("close")}},h.decode=p,h.isValid=e,h.verify=a,Ma=h}function mn(){if(Da)return Tt;Da=1;var t=ch(),u=lh();return Tt.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],Tt.sign=t.sign,Tt.verify=u.verify,Tt.decode=u.decode,Tt.isValid=u.isValid,Tt.createSign=function(d){return new t(d)},Tt.createVerify=function(d){return new u(d)},Tt}function ml(){if(Ba)return Fa;Ba=1;var t=mn();return Fa=function(u,d){d=d||{};var o=t.decode(u,d);if(!o)return null;var c=o.payload;if(typeof c=="string")try{var i=JSON.parse(c);i!==null&&typeof i=="object"&&(c=i)}catch{}return d.complete===!0?{header:o.header,payload:c,signature:o.signature}:c}}function yl(){if(Ua)return Rr;Ua=1;var t=Gc();return Rr=function(u,d){var o=d||Math.floor(Date.now()/1e3);if(typeof u=="string"){var c=t(u);return c===void 0?void 0:Math.floor(o+c/1e3)}return typeof u=="number"?o+u:void 0},Rr}var qa,Ga,za,Za,Ha,Va,Ya,Ka,Wa,Ja,Xa,Ir,Qa,Pr,tu,Nr,eu,Lr,ru,nu,ou,iu,su,au,uu,cu,lu,$r,fu,hu,pu,du,mu,yu,gu,vu,bu,wu,Eu,_u,Su,Ou,ju,xu,ku,Tu,Au,Ru,Iu,Pu,Nu,Lu,$u,Mu,Cu,Mr,Du,Fu,Bu,Cr,Uu,qu,Gu,Dr,zu,Fr,Zu,Br,Hu,Ur,Vu,qr,Yu,Gr,Ku,zr,Wu,Zr,Ju,Hr,Xu,Vr,Qu,Yr,tc,ec,rc,Kr,nc,oc,ic,sc,ac,uc,cc,lc,fc,hc,pc,dc,mc,Wr,yc,Jr={exports:{}};function Te(){return Ga?qa:(Ga=1,qa={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2})}function Ae(){if(Za)return za;Za=1;var t={};return za=typeof Q=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...d)=>console.error("SEMVER",...d):()=>{}}function ae(){return Ha||(Ha=1,(function(t,u){const{MAX_SAFE_COMPONENT_LENGTH:d}=Te(),o=Ae(),c=(u=t.exports={}).re=[],i=u.safeRe=[],n=u.src=[],s=u.t={};let f=0;const r=(e,a,p)=>{const h=a.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),m=f++;o(e,m,a),s[e]=m,n[m]=a,c[m]=new RegExp(a,p?"g":void 0),i[m]=new RegExp(h,p?"g":void 0)};r("NUMERICIDENTIFIER","0|[1-9]\\d*"),r("NUMERICIDENTIFIERLOOSE","[0-9]+"),r("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),r("MAINVERSION",`(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})`),r("MAINVERSIONLOOSE",`(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})`),r("PRERELEASEIDENTIFIER",`(?:${n[s.NUMERICIDENTIFIER]}|${n[s.NONNUMERICIDENTIFIER]})`),r("PRERELEASEIDENTIFIERLOOSE",`(?:${n[s.NUMERICIDENTIFIERLOOSE]}|${n[s.NONNUMERICIDENTIFIER]})`),r("PRERELEASE",`(?:-(${n[s.PRERELEASEIDENTIFIER]}(?:\\.${n[s.PRERELEASEIDENTIFIER]})*))`),r("PRERELEASELOOSE",`(?:-?(${n[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[s.PRERELEASEIDENTIFIERLOOSE]})*))`),r("BUILDIDENTIFIER","[0-9A-Za-z-]+"),r("BUILD",`(?:\\+(${n[s.BUILDIDENTIFIER]}(?:\\.${n[s.BUILDIDENTIFIER]})*))`),r("FULLPLAIN",`v?${n[s.MAINVERSION]}${n[s.PRERELEASE]}?${n[s.BUILD]}?`),r("FULL",`^${n[s.FULLPLAIN]}$`),r("LOOSEPLAIN",`[v=\\s]*${n[s.MAINVERSIONLOOSE]}${n[s.PRERELEASELOOSE]}?${n[s.BUILD]}?`),r("LOOSE",`^${n[s.LOOSEPLAIN]}$`),r("GTLT","((?:<|>)?=?)"),r("XRANGEIDENTIFIERLOOSE",`${n[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),r("XRANGEIDENTIFIER",`${n[s.NUMERICIDENTIFIER]}|x|X|\\*`),r("XRANGEPLAIN",`[v=\\s]*(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:${n[s.PRERELEASE]})?${n[s.BUILD]}?)?)?`),r("XRANGEPLAINLOOSE",`[v=\\s]*(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:${n[s.PRERELEASELOOSE]})?${n[s.BUILD]}?)?)?`),r("XRANGE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAIN]}$`),r("XRANGELOOSE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAINLOOSE]}$`),r("COERCE",`(^|[^\\d])(\\d{1,${d}})(?:\\.(\\d{1,${d}}))?(?:\\.(\\d{1,${d}}))?(?:$|[^\\d])`),r("COERCERTL",n[s.COERCE],!0),r("LONETILDE","(?:~>?)"),r("TILDETRIM",`(\\s*)${n[s.LONETILDE]}\\s+`,!0),u.tildeTrimReplace="$1~",r("TILDE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAIN]}$`),r("TILDELOOSE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAINLOOSE]}$`),r("LONECARET","(?:\\^)"),r("CARETTRIM",`(\\s*)${n[s.LONECARET]}\\s+`,!0),u.caretTrimReplace="$1^",r("CARET",`^${n[s.LONECARET]}${n[s.XRANGEPLAIN]}$`),r("CARETLOOSE",`^${n[s.LONECARET]}${n[s.XRANGEPLAINLOOSE]}$`),r("COMPARATORLOOSE",`^${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]})$|^$`),r("COMPARATOR",`^${n[s.GTLT]}\\s*(${n[s.FULLPLAIN]})$|^$`),r("COMPARATORTRIM",`(\\s*)${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]}|${n[s.XRANGEPLAIN]})`,!0),u.comparatorTrimReplace="$1$2$3",r("HYPHENRANGE",`^\\s*(${n[s.XRANGEPLAIN]})\\s+-\\s+(${n[s.XRANGEPLAIN]})\\s*$`),r("HYPHENRANGELOOSE",`^\\s*(${n[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[s.XRANGEPLAINLOOSE]})\\s*$`),r("STAR","(<|>)?=?\\s*\\*"),r("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),r("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Jr,Jr.exports)),Jr.exports}function yn(){if(Ya)return Va;Ya=1;const t=Object.freeze({loose:!0}),u=Object.freeze({});return Va=d=>d?typeof d!="object"?t:d:u}function gl(){if(Wa)return Ka;Wa=1;const t=/^[0-9]+$/,u=(d,o)=>{const c=t.test(d),i=t.test(o);return c&&i&&(d=+d,o=+o),d===o?0:c&&!i?-1:i&&!c?1:d<o?-1:1};return Ka={compareIdentifiers:u,rcompareIdentifiers:(d,o)=>u(o,d)}}function ft(){if(Xa)return Ja;Xa=1;const t=Ae(),{MAX_LENGTH:u,MAX_SAFE_INTEGER:d}=Te(),{safeRe:o,t:c}=ae(),i=yn(),{compareIdentifiers:n}=gl();class s{constructor(r,e){if(e=i(e),r instanceof s){if(r.loose===!!e.loose&&r.includePrerelease===!!e.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>u)throw new TypeError(`version is longer than ${u} characters`);t("SemVer",r,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const a=r.trim().match(e.loose?o[c.LOOSE]:o[c.FULL]);if(!a)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>d||this.major<0)throw new TypeError("Invalid major version");if(this.minor>d||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>d||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map((p=>{if(/^[0-9]+$/.test(p)){const h=+p;if(h>=0&&h<d)return h}return p})):this.prerelease=[],this.build=a[5]?a[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(t("SemVer.compare",this.version,this.options,r),!(r instanceof s)){if(typeof r=="string"&&r===this.version)return 0;r=new s(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof s||(r=new s(r,this.options)),n(this.major,r.major)||n(this.minor,r.minor)||n(this.patch,r.patch)}comparePre(r){if(r instanceof s||(r=new s(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let e=0;do{const a=this.prerelease[e],p=r.prerelease[e];if(t("prerelease compare",e,a,p),a===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(a===void 0)return-1;if(a!==p)return n(a,p)}while(++e)}compareBuild(r){r instanceof s||(r=new s(r,this.options));let e=0;do{const a=this.build[e],p=r.build[e];if(t("prerelease compare",e,a,p),a===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(a===void 0)return-1;if(a!==p)return n(a,p)}while(++e)}inc(r,e,a){switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,a);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,a);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,a),this.inc("pre",e,a);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e,a),this.inc("pre",e,a);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const p=Number(a)?1:0;if(!e&&a===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[p];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(e===this.prerelease.join(".")&&a===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(p)}}if(e){let h=[e,p];a===!1&&(h=[e]),n(this.prerelease[0],e)===0?isNaN(this.prerelease[1])&&(this.prerelease=h):this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ja=s}function Zt(){if(Qa)return Ir;Qa=1;const t=ft();return Ir=(u,d,o=!1)=>{if(u instanceof t)return u;try{return new t(u,d)}catch(c){if(!o)return null;throw c}},Ir}function _t(){if(pu)return hu;pu=1;const t=ft();return hu=(u,d,o)=>new t(u,o).compare(new t(d,o))}function Xr(){if(bu)return vu;bu=1;const t=ft();return vu=(u,d,o)=>{const c=new t(u,o),i=new t(d,o);return c.compare(i)||c.compareBuild(i)}}function Se(){if(ju)return Ou;ju=1;const t=_t();return Ou=(u,d,o)=>t(u,d,o)>0}function gn(){if(ku)return xu;ku=1;const t=_t();return xu=(u,d,o)=>t(u,d,o)<0}function vl(){if(Au)return Tu;Au=1;const t=_t();return Tu=(u,d,o)=>t(u,d,o)===0}function bl(){if(Iu)return Ru;Iu=1;const t=_t();return Ru=(u,d,o)=>t(u,d,o)!==0}function vn(){if(Nu)return Pu;Nu=1;const t=_t();return Pu=(u,d,o)=>t(u,d,o)>=0}function bn(){if($u)return Lu;$u=1;const t=_t();return Lu=(u,d,o)=>t(u,d,o)<=0}function wl(){if(Cu)return Mu;Cu=1;const t=vl(),u=bl(),d=Se(),o=vn(),c=gn(),i=bn();return Mu=(n,s,f,r)=>{switch(s){case"===":return typeof n=="object"&&(n=n.version),typeof f=="object"&&(f=f.version),n===f;case"!==":return typeof n=="object"&&(n=n.version),typeof f=="object"&&(f=f.version),n!==f;case"":case"=":case"==":return t(n,f,r);case"!=":return u(n,f,r);case">":return d(n,f,r);case">=":return o(n,f,r);case"<":return c(n,f,r);case"<=":return i(n,f,r);default:throw new TypeError(`Invalid operator: ${s}`)}}}function fh(){if(Uu)return Cr;function t(i){var n=this;if(n instanceof t||(n=new t),n.tail=null,n.head=null,n.length=0,i&&typeof i.forEach=="function")i.forEach((function(r){n.push(r)}));else if(arguments.length>0)for(var s=0,f=arguments.length;s<f;s++)n.push(arguments[s]);return n}function u(i,n,s){var f=n===i.head?new c(s,null,n,i):new c(s,n,n.next,i);return f.next===null&&(i.tail=f),f.prev===null&&(i.head=f),i.length++,f}function d(i,n){i.tail=new c(n,i.tail,null,i),i.head||(i.head=i.tail),i.length++}function o(i,n){i.head=new c(n,null,i.head,i),i.tail||(i.tail=i.head),i.length++}function c(i,n,s,f){if(!(this instanceof c))return new c(i,n,s,f);this.list=f,this.value=i,n?(n.next=this,this.prev=n):this.prev=null,s?(s.prev=this,this.next=s):this.next=null}Uu=1,Cr=t,t.Node=c,t.create=t,t.prototype.removeNode=function(i){if(i.list!==this)throw new Error("removing node which does not belong to this list");var n=i.next,s=i.prev;return n&&(n.prev=s),s&&(s.next=n),i===this.head&&(this.head=n),i===this.tail&&(this.tail=s),i.list.length--,i.next=null,i.prev=null,i.list=null,n},t.prototype.unshiftNode=function(i){if(i!==this.head){i.list&&i.list.removeNode(i);var n=this.head;i.list=this,i.next=n,n&&(n.prev=i),this.head=i,this.tail||(this.tail=i),this.length++}},t.prototype.pushNode=function(i){if(i!==this.tail){i.list&&i.list.removeNode(i);var n=this.tail;i.list=this,i.prev=n,n&&(n.next=i),this.tail=i,this.head||(this.head=i),this.length++}},t.prototype.push=function(){for(var i=0,n=arguments.length;i<n;i++)d(this,arguments[i]);return this.length},t.prototype.unshift=function(){for(var i=0,n=arguments.length;i<n;i++)o(this,arguments[i]);return this.length},t.prototype.pop=function(){if(this.tail){var i=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,i}},t.prototype.shift=function(){if(this.head){var i=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,i}},t.prototype.forEach=function(i,n){n=n||this;for(var s=this.head,f=0;s!==null;f++)i.call(n,s.value,f,this),s=s.next},t.prototype.forEachReverse=function(i,n){n=n||this;for(var s=this.tail,f=this.length-1;s!==null;f--)i.call(n,s.value,f,this),s=s.prev},t.prototype.get=function(i){for(var n=0,s=this.head;s!==null&&n<i;n++)s=s.next;if(n===i&&s!==null)return s.value},t.prototype.getReverse=function(i){for(var n=0,s=this.tail;s!==null&&n<i;n++)s=s.prev;if(n===i&&s!==null)return s.value},t.prototype.map=function(i,n){n=n||this;for(var s=new t,f=this.head;f!==null;)s.push(i.call(n,f.value,this)),f=f.next;return s},t.prototype.mapReverse=function(i,n){n=n||this;for(var s=new t,f=this.tail;f!==null;)s.push(i.call(n,f.value,this)),f=f.prev;return s},t.prototype.reduce=function(i,n){var s,f=this.head;if(arguments.length>1)s=n;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");f=this.head.next,s=this.head.value}for(var r=0;f!==null;r++)s=i(s,f.value,r),f=f.next;return s},t.prototype.reduceReverse=function(i,n){var s,f=this.tail;if(arguments.length>1)s=n;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");f=this.tail.prev,s=this.tail.value}for(var r=this.length-1;f!==null;r--)s=i(s,f.value,r),f=f.prev;return s},t.prototype.toArray=function(){for(var i=new Array(this.length),n=0,s=this.head;s!==null;n++)i[n]=s.value,s=s.next;return i},t.prototype.toArrayReverse=function(){for(var i=new Array(this.length),n=0,s=this.tail;s!==null;n++)i[n]=s.value,s=s.prev;return i},t.prototype.slice=function(i,n){(n=n||this.length)<0&&(n+=this.length),(i=i||0)<0&&(i+=this.length);var s=new t;if(n<i||n<0)return s;i<0&&(i=0),n>this.length&&(n=this.length);for(var f=0,r=this.head;r!==null&&f<i;f++)r=r.next;for(;r!==null&&f<n;f++,r=r.next)s.push(r.value);return s},t.prototype.sliceReverse=function(i,n){(n=n||this.length)<0&&(n+=this.length),(i=i||0)<0&&(i+=this.length);var s=new t;if(n<i||n<0)return s;i<0&&(i=0),n>this.length&&(n=this.length);for(var f=this.length,r=this.tail;r!==null&&f>n;f--)r=r.prev;for(;r!==null&&f>i;f--,r=r.prev)s.push(r.value);return s},t.prototype.splice=function(i,n,...s){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var f=0,r=this.head;r!==null&&f<i;f++)r=r.next;var e=[];for(f=0;r&&f<n;f++)e.push(r.value),r=this.removeNode(r);for(r===null&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev),f=0;f<s.length;f++)r=u(this,r,s[f]);return e},t.prototype.reverse=function(){for(var i=this.head,n=this.tail,s=i;s!==null;s=s.prev){var f=s.prev;s.prev=s.next,s.next=f}return this.head=n,this.tail=i,this};try{(Bu?Fu:(Bu=1,Fu=function(i){i.prototype[Symbol.iterator]=function*(){for(let n=this.head;n;n=n.next)yield n.value}}))(t)}catch{}return Cr}function Et(){if(zu)return Dr;zu=1;class t{constructor(O,$){if($=d($),O instanceof t)return O.loose===!!$.loose&&O.includePrerelease===!!$.includePrerelease?O:new t(O.raw,$);if(O instanceof o)return this.raw=O.value,this.set=[[O]],this.format(),this;if(this.options=$,this.loose=!!$.loose,this.includePrerelease=!!$.includePrerelease,this.raw=O.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((N=>this.parseRange(N))).filter((N=>N.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const N=this.set[0];if(this.set=this.set.filter((P=>!h(P[0]))),this.set.length===0)this.set=[N];else if(this.set.length>1){for(const P of this.set)if(P.length===1&&m(P[0])){this.set=[P];break}}}this.format()}format(){return this.range=this.set.map((O=>O.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(O){const $=((this.options.includePrerelease&&a)|(this.options.loose&&p))+":"+O,N=u.get($);if(N)return N;const P=this.options.loose,G=P?n[s.HYPHENRANGELOOSE]:n[s.HYPHENRANGE];O=O.replace(G,E(this.options.includePrerelease)),c("hyphen replace",O),O=O.replace(n[s.COMPARATORTRIM],f),c("comparator trim",O);let A=(O=(O=O.replace(n[s.TILDETRIM],r)).replace(n[s.CARETTRIM],e)).split(" ").map((V=>g(V,this.options))).join(" ").split(/\s+/).map((V=>k(V,this.options)));P&&(A=A.filter((V=>(c("loose invalid filter",V,this.options),!!V.match(n[s.COMPARATORLOOSE]))))),c("range list",A);const I=new Map,R=A.map((V=>new o(V,this.options)));for(const V of R){if(h(V))return[V];I.set(V.value,V)}I.size>1&&I.has("")&&I.delete("");const B=[...I.values()];return u.set($,B),B}intersects(O,$){if(!(O instanceof t))throw new TypeError("a Range is required");return this.set.some((N=>b(N,$)&&O.set.some((P=>b(P,$)&&N.every((G=>P.every((A=>G.intersects(A,$)))))))))}test(O){if(!O)return!1;if(typeof O=="string")try{O=new i(O,this.options)}catch{return!1}for(let $=0;$<this.set.length;$++)if(j(this.set[$],O,this.options))return!0;return!1}}Dr=t;const u=new((function(){if(Gu)return qu;Gu=1;const x=fh(),O=Symbol("max"),$=Symbol("length"),N=Symbol("lengthCalculator"),P=Symbol("allowStale"),G=Symbol("maxAge"),A=Symbol("dispose"),I=Symbol("noDisposeOnSet"),R=Symbol("lruList"),B=Symbol("cache"),V=Symbol("updateAgeOnGet"),J=()=>1,F=(C,T,D)=>{const H=C[B].get(T);if(H){const W=H.value;if(L(C,W)){if(Z(C,H),!C[P])return}else D&&(C[V]&&(H.value.now=Date.now()),C[R].unshiftNode(H));return W.value}},L=(C,T)=>{if(!T||!T.maxAge&&!C[G])return!1;const D=Date.now()-T.now;return T.maxAge?D>T.maxAge:C[G]&&D>C[G]},U=C=>{if(C[$]>C[O])for(let T=C[R].tail;C[$]>C[O]&&T!==null;){const D=T.prev;Z(C,T),T=D}},Z=(C,T)=>{if(T){const D=T.value;C[A]&&C[A](D.key,D.value),C[$]-=D.length,C[B].delete(D.key),C[R].removeNode(T)}};class q{constructor(T,D,H,W,K){this.key=T,this.value=D,this.length=H,this.now=W,this.maxAge=K||0}}const Y=(C,T,D,H)=>{let W=D.value;L(C,W)&&(Z(C,D),C[P]||(W=void 0)),W&&T.call(H,W.value,W.key,C)};return qu=class{constructor(C){if(typeof C=="number"&&(C={max:C}),C||(C={}),C.max&&(typeof C.max!="number"||C.max<0))throw new TypeError("max must be a non-negative number");this[O]=C.max||1/0;const T=C.length||J;if(this[N]=typeof T!="function"?J:T,this[P]=C.stale||!1,C.maxAge&&typeof C.maxAge!="number")throw new TypeError("maxAge must be a number");this[G]=C.maxAge||0,this[A]=C.dispose,this[I]=C.noDisposeOnSet||!1,this[V]=C.updateAgeOnGet||!1,this.reset()}set max(C){if(typeof C!="number"||C<0)throw new TypeError("max must be a non-negative number");this[O]=C||1/0,U(this)}get max(){return this[O]}set allowStale(C){this[P]=!!C}get allowStale(){return this[P]}set maxAge(C){if(typeof C!="number")throw new TypeError("maxAge must be a non-negative number");this[G]=C,U(this)}get maxAge(){return this[G]}set lengthCalculator(C){typeof C!="function"&&(C=J),C!==this[N]&&(this[N]=C,this[$]=0,this[R].forEach((T=>{T.length=this[N](T.value,T.key),this[$]+=T.length}))),U(this)}get lengthCalculator(){return this[N]}get length(){return this[$]}get itemCount(){return this[R].length}rforEach(C,T){T=T||this;for(let D=this[R].tail;D!==null;){const H=D.prev;Y(this,C,D,T),D=H}}forEach(C,T){T=T||this;for(let D=this[R].head;D!==null;){const H=D.next;Y(this,C,D,T),D=H}}keys(){return this[R].toArray().map((C=>C.key))}values(){return this[R].toArray().map((C=>C.value))}reset(){this[A]&&this[R]&&this[R].length&&this[R].forEach((C=>this[A](C.key,C.value))),this[B]=new Map,this[R]=new x,this[$]=0}dump(){return this[R].map((C=>!L(this,C)&&{k:C.key,v:C.value,e:C.now+(C.maxAge||0)})).toArray().filter((C=>C))}dumpLru(){return this[R]}set(C,T,D){if((D=D||this[G])&&typeof D!="number")throw new TypeError("maxAge must be a number");const H=D?Date.now():0,W=this[N](T,C);if(this[B].has(C)){if(W>this[O])return Z(this,this[B].get(C)),!1;const et=this[B].get(C).value;return this[A]&&(this[I]||this[A](C,et.value)),et.now=H,et.maxAge=D,et.value=T,this[$]+=W-et.length,et.length=W,this.get(C),U(this),!0}const K=new q(C,T,W,H,D);return K.length>this[O]?(this[A]&&this[A](C,T),!1):(this[$]+=K.length,this[R].unshift(K),this[B].set(C,this[R].head),U(this),!0)}has(C){if(!this[B].has(C))return!1;const T=this[B].get(C).value;return!L(this,T)}get(C){return F(this,C,!0)}peek(C){return F(this,C,!1)}pop(){const C=this[R].tail;return C?(Z(this,C),C.value):null}del(C){Z(this,this[B].get(C))}load(C){this.reset();const T=Date.now();for(let D=C.length-1;D>=0;D--){const H=C[D],W=H.e||0;if(W===0)this.set(H.k,H.v);else{const K=W-T;K>0&&this.set(H.k,H.v,K)}}}prune(){this[B].forEach(((C,T)=>F(this,T,!1)))}}})())({max:1e3}),d=yn(),o=Oe(),c=Ae(),i=ft(),{safeRe:n,t:s,comparatorTrimReplace:f,tildeTrimReplace:r,caretTrimReplace:e}=ae(),{FLAG_INCLUDE_PRERELEASE:a,FLAG_LOOSE:p}=Te(),h=x=>x.value==="<0.0.0-0",m=x=>x.value==="",b=(x,O)=>{let $=!0;const N=x.slice();let P=N.pop();for(;$&&N.length;)$=N.every((G=>P.intersects(G,O))),P=N.pop();return $},g=(x,O)=>(c("comp",x,O),x=S(x,O),c("caret",x),x=y(x,O),c("tildes",x),x=_(x,O),c("xrange",x),x=z(x,O),c("stars",x),x),l=x=>!x||x.toLowerCase()==="x"||x==="*",y=(x,O)=>x.trim().split(/\s+/).map(($=>v($,O))).join(" "),v=(x,O)=>{const $=O.loose?n[s.TILDELOOSE]:n[s.TILDE];return x.replace($,((N,P,G,A,I)=>{let R;return c("tilde",x,N,P,G,A,I),l(P)?R="":l(G)?R=`>=${P}.0.0 <${+P+1}.0.0-0`:l(A)?R=`>=${P}.${G}.0 <${P}.${+G+1}.0-0`:I?(c("replaceTilde pr",I),R=`>=${P}.${G}.${A}-${I} <${P}.${+G+1}.0-0`):R=`>=${P}.${G}.${A} <${P}.${+G+1}.0-0`,c("tilde return",R),R}))},S=(x,O)=>x.trim().split(/\s+/).map(($=>w($,O))).join(" "),w=(x,O)=>{c("caret",x,O);const $=O.loose?n[s.CARETLOOSE]:n[s.CARET],N=O.includePrerelease?"-0":"";return x.replace($,((P,G,A,I,R)=>{let B;return c("caret",x,P,G,A,I,R),l(G)?B="":l(A)?B=`>=${G}.0.0${N} <${+G+1}.0.0-0`:l(I)?B=G==="0"?`>=${G}.${A}.0${N} <${G}.${+A+1}.0-0`:`>=${G}.${A}.0${N} <${+G+1}.0.0-0`:R?(c("replaceCaret pr",R),B=G==="0"?A==="0"?`>=${G}.${A}.${I}-${R} <${G}.${A}.${+I+1}-0`:`>=${G}.${A}.${I}-${R} <${G}.${+A+1}.0-0`:`>=${G}.${A}.${I}-${R} <${+G+1}.0.0-0`):(c("no pr"),B=G==="0"?A==="0"?`>=${G}.${A}.${I}${N} <${G}.${A}.${+I+1}-0`:`>=${G}.${A}.${I}${N} <${G}.${+A+1}.0-0`:`>=${G}.${A}.${I} <${+G+1}.0.0-0`),c("caret return",B),B}))},_=(x,O)=>(c("replaceXRanges",x,O),x.split(/\s+/).map(($=>M($,O))).join(" ")),M=(x,O)=>{x=x.trim();const $=O.loose?n[s.XRANGELOOSE]:n[s.XRANGE];return x.replace($,((N,P,G,A,I,R)=>{c("xRange",x,N,P,G,A,I,R);const B=l(G),V=B||l(A),J=V||l(I),F=J;return P==="="&&F&&(P=""),R=O.includePrerelease?"-0":"",B?N=P===">"||P==="<"?"<0.0.0-0":"*":P&&F?(V&&(A=0),I=0,P===">"?(P=">=",V?(G=+G+1,A=0,I=0):(A=+A+1,I=0)):P==="<="&&(P="<",V?G=+G+1:A=+A+1),P==="<"&&(R="-0"),N=`${P+G}.${A}.${I}${R}`):V?N=`>=${G}.0.0${R} <${+G+1}.0.0-0`:J&&(N=`>=${G}.${A}.0${R} <${G}.${+A+1}.0-0`),c("xRange return",N),N}))},z=(x,O)=>(c("replaceStars",x,O),x.trim().replace(n[s.STAR],"")),k=(x,O)=>(c("replaceGTE0",x,O),x.trim().replace(n[O.includePrerelease?s.GTE0PRE:s.GTE0],"")),E=x=>(O,$,N,P,G,A,I,R,B,V,J,F,L)=>`${$=l(N)?"":l(P)?`>=${N}.0.0${x?"-0":""}`:l(G)?`>=${N}.${P}.0${x?"-0":""}`:A?`>=${$}`:`>=${$}${x?"-0":""}`} ${R=l(B)?"":l(V)?`<${+B+1}.0.0-0`:l(J)?`<${B}.${+V+1}.0-0`:F?`<=${B}.${V}.${J}-${F}`:x?`<${B}.${V}.${+J+1}-0`:`<=${R}`}`.trim(),j=(x,O,$)=>{for(let N=0;N<x.length;N++)if(!x[N].test(O))return!1;if(O.prerelease.length&&!$.includePrerelease){for(let N=0;N<x.length;N++)if(c(x[N].semver),x[N].semver!==o.ANY&&x[N].semver.prerelease.length>0){const P=x[N].semver;if(P.major===O.major&&P.minor===O.minor&&P.patch===O.patch)return!0}return!1}return!0};return Dr}function Oe(){if(Zu)return Fr;Zu=1;const t=Symbol("SemVer ANY");class u{static get ANY(){return t}constructor(e,a){if(a=d(a),e instanceof u){if(e.loose===!!a.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),n("comparator",e,a),this.options=a,this.loose=!!a.loose,this.parse(e),this.semver===t?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}parse(e){const a=this.options.loose?o[c.COMPARATORLOOSE]:o[c.COMPARATOR],p=e.match(a);if(!p)throw new TypeError(`Invalid comparator: ${e}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new s(p[2],this.options.loose):this.semver=t}toString(){return this.value}test(e){if(n("Comparator.test",e,this.options.loose),this.semver===t||e===t)return!0;if(typeof e=="string")try{e=new s(e,this.options)}catch{return!1}return i(e,this.operator,this.semver,this.options)}intersects(e,a){if(!(e instanceof u))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""||new f(e.value,a).test(this.value):e.operator===""?e.value===""||new f(this.value,a).test(e.semver):(!(a=d(a)).includePrerelease||this.value!=="<0.0.0-0"&&e.value!=="<0.0.0-0")&&!(!a.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||!!(i(this.semver,"<",e.semver,a)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(i(this.semver,">",e.semver,a)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}Fr=u;const d=yn(),{safeRe:o,t:c}=ae(),i=wl(),n=Ae(),s=ft(),f=Et();return Fr}function ge(){if(Hu)return Br;Hu=1;const t=Et();return Br=(u,d,o)=>{try{d=new t(d,o)}catch{return!1}return d.test(u)},Br}function hh(){if(Ju)return Zr;Ju=1;const t=Et();return Zr=(u,d)=>{try{return new t(u,d).range||"*"}catch{return null}},Zr}function Qr(){if(Xu)return Hr;Xu=1;const t=ft(),u=Oe(),{ANY:d}=u,o=Et(),c=ge(),i=Se(),n=gn(),s=bn(),f=vn();return Hr=(r,e,a,p)=>{let h,m,b,g,l;switch(r=new t(r,p),e=new o(e,p),a){case">":h=i,m=s,b=n,g=">",l=">=";break;case"<":h=n,m=f,b=i,g="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(r,e,p))return!1;for(let y=0;y<e.set.length;++y){const v=e.set[y];let S=null,w=null;if(v.forEach((_=>{_.semver===d&&(_=new u(">=0.0.0")),S=S||_,w=w||_,h(_.semver,S.semver,p)?S=_:b(_.semver,w.semver,p)&&(w=_)})),S.operator===g||S.operator===l||(!w.operator||w.operator===g)&&m(r,w.semver)||w.operator===l&&b(r,w.semver))return!1}return!0},Hr}function sn(){if(ac)return sc;ac=1;const t=ae(),u=Te(),d=ft(),o=gl(),c=Zt(),i=(function(){if(tu)return Pr;tu=1;const L=Zt();return Pr=(U,Z)=>{const q=L(U,Z);return q?q.version:null},Pr})(),n=(function(){if(eu)return Nr;eu=1;const L=Zt();return Nr=(U,Z)=>{const q=L(U.trim().replace(/^[=v]+/,""),Z);return q?q.version:null},Nr})(),s=(function(){if(ru)return Lr;ru=1;const L=ft();return Lr=(U,Z,q,Y,C)=>{typeof q=="string"&&(C=Y,Y=q,q=void 0);try{return new L(U instanceof L?U.version:U,q).inc(Z,Y,C).version}catch{return null}},Lr})(),f=(function(){if(ou)return nu;ou=1;const L=Zt();return nu=(U,Z)=>{const q=L(U,null,!0),Y=L(Z,null,!0),C=q.compare(Y);if(C===0)return null;const T=C>0,D=T?q:Y,H=T?Y:q,W=!!D.prerelease.length;if(H.prerelease.length&&!W)return H.patch||H.minor?D.patch?"patch":D.minor?"minor":"major":"major";const K=W?"pre":"";return q.major!==Y.major?K+"major":q.minor!==Y.minor?K+"minor":q.patch!==Y.patch?K+"patch":"prerelease"}})(),r=(function(){if(su)return iu;su=1;const L=ft();return iu=(U,Z)=>new L(U,Z).major})(),e=(function(){if(uu)return au;uu=1;const L=ft();return au=(U,Z)=>new L(U,Z).minor})(),a=(function(){if(lu)return cu;lu=1;const L=ft();return cu=(U,Z)=>new L(U,Z).patch})(),p=(function(){if(fu)return $r;fu=1;const L=Zt();return $r=(U,Z)=>{const q=L(U,Z);return q&&q.prerelease.length?q.prerelease:null},$r})(),h=_t(),m=(function(){if(mu)return du;mu=1;const L=_t();return du=(U,Z,q)=>L(Z,U,q)})(),b=(function(){if(gu)return yu;gu=1;const L=_t();return yu=(U,Z)=>L(U,Z,!0)})(),g=Xr(),l=(function(){if(Eu)return wu;Eu=1;const L=Xr();return wu=(U,Z)=>U.sort(((q,Y)=>L(q,Y,Z)))})(),y=(function(){if(Su)return _u;Su=1;const L=Xr();return _u=(U,Z)=>U.sort(((q,Y)=>L(Y,q,Z)))})(),v=Se(),S=gn(),w=vl(),_=bl(),M=vn(),z=bn(),k=wl(),E=(function(){if(Du)return Mr;Du=1;const L=ft(),U=Zt(),{safeRe:Z,t:q}=ae();return Mr=(Y,C)=>{if(Y instanceof L)return Y;if(typeof Y=="number"&&(Y=String(Y)),typeof Y!="string")return null;let T=null;if((C=C||{}).rtl){let D;for(;(D=Z[q.COERCERTL].exec(Y))&&(!T||T.index+T[0].length!==Y.length);)T&&D.index+D[0].length===T.index+T[0].length||(T=D),Z[q.COERCERTL].lastIndex=D.index+D[1].length+D[2].length;Z[q.COERCERTL].lastIndex=-1}else T=Y.match(Z[q.COERCE]);return T===null?null:U(`${T[2]}.${T[3]||"0"}.${T[4]||"0"}`,C)},Mr})(),j=Oe(),x=Et(),O=ge(),$=(function(){if(Vu)return Ur;Vu=1;const L=Et();return Ur=(U,Z)=>new L(U,Z).set.map((q=>q.map((Y=>Y.value)).join(" ").trim().split(" "))),Ur})(),N=(function(){if(Yu)return qr;Yu=1;const L=ft(),U=Et();return qr=(Z,q,Y)=>{let C=null,T=null,D=null;try{D=new U(q,Y)}catch{return null}return Z.forEach((H=>{D.test(H)&&(C&&T.compare(H)!==-1||(C=H,T=new L(C,Y)))})),C},qr})(),P=(function(){if(Ku)return Gr;Ku=1;const L=ft(),U=Et();return Gr=(Z,q,Y)=>{let C=null,T=null,D=null;try{D=new U(q,Y)}catch{return null}return Z.forEach((H=>{D.test(H)&&(C&&T.compare(H)!==1||(C=H,T=new L(C,Y)))})),C},Gr})(),G=(function(){if(Wu)return zr;Wu=1;const L=ft(),U=Et(),Z=Se();return zr=(q,Y)=>{q=new U(q,Y);let C=new L("0.0.0");if(q.test(C)||(C=new L("0.0.0-0"),q.test(C)))return C;C=null;for(let T=0;T<q.set.length;++T){const D=q.set[T];let H=null;D.forEach((W=>{const K=new L(W.semver.version);switch(W.operator){case">":K.prerelease.length===0?K.patch++:K.prerelease.push(0),K.raw=K.format();case"":case">=":H&&!Z(K,H)||(H=K);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${W.operator}`)}})),!H||C&&!Z(C,H)||(C=H)}return C&&q.test(C)?C:null},zr})(),A=hh(),I=Qr(),R=(function(){if(Qu)return Vr;Qu=1;const L=Qr();return Vr=(U,Z,q)=>L(U,Z,">",q),Vr})(),B=(function(){if(tc)return Yr;tc=1;const L=Qr();return Yr=(U,Z,q)=>L(U,Z,"<",q),Yr})(),V=(function(){if(rc)return ec;rc=1;const L=Et();return ec=(U,Z,q)=>(U=new L(U,q),Z=new L(Z,q),U.intersects(Z,q))})(),J=(function(){if(nc)return Kr;nc=1;const L=ge(),U=_t();return Kr=(Z,q,Y)=>{const C=[];let T=null,D=null;const H=Z.sort(((X,tt)=>U(X,tt,Y)));for(const X of H)L(X,q,Y)?(D=X,T||(T=X)):(D&&C.push([T,D]),D=null,T=null);T&&C.push([T,null]);const W=[];for(const[X,tt]of C)X===tt?W.push(X):tt||X!==H[0]?tt?X===H[0]?W.push(`<=${tt}`):W.push(`${X} - ${tt}`):W.push(`>=${X}`):W.push("*");const K=W.join(" || "),et=typeof q.raw=="string"?q.raw:String(q);return K.length<et.length?K:q},Kr})(),F=(function(){if(ic)return oc;ic=1;const L=Et(),U=Oe(),{ANY:Z}=U,q=ge(),Y=_t(),C=[new U(">=0.0.0-0")],T=[new U(">=0.0.0")],D=(K,et,X)=>{if(K===et)return!0;if(K.length===1&&K[0].semver===Z){if(et.length===1&&et[0].semver===Z)return!0;K=X.includePrerelease?C:T}if(et.length===1&&et[0].semver===Z){if(X.includePrerelease)return!0;et=T}const tt=new Set;let nt,ot,st,gt,At,vt,bt;for(const rt of K)rt.operator===">"||rt.operator===">="?nt=H(nt,rt,X):rt.operator==="<"||rt.operator==="<="?ot=W(ot,rt,X):tt.add(rt.semver);if(tt.size>1||nt&&ot&&(st=Y(nt.semver,ot.semver,X),st>0||st===0&&(nt.operator!==">="||ot.operator!=="<=")))return null;for(const rt of tt){if(nt&&!q(rt,String(nt),X)||ot&&!q(rt,String(ot),X))return null;for(const Rt of et)if(!q(rt,String(Rt),X))return!1;return!0}let it=!(!ot||X.includePrerelease||!ot.semver.prerelease.length)&&ot.semver,ht=!(!nt||X.includePrerelease||!nt.semver.prerelease.length)&&nt.semver;it&&it.prerelease.length===1&&ot.operator==="<"&&it.prerelease[0]===0&&(it=!1);for(const rt of et){if(bt=bt||rt.operator===">"||rt.operator===">=",vt=vt||rt.operator==="<"||rt.operator==="<=",nt){if(ht&&rt.semver.prerelease&&rt.semver.prerelease.length&&rt.semver.major===ht.major&&rt.semver.minor===ht.minor&&rt.semver.patch===ht.patch&&(ht=!1),rt.operator===">"||rt.operator===">="){if(gt=H(nt,rt,X),gt===rt&>!==nt)return!1}else if(nt.operator===">="&&!q(nt.semver,String(rt),X))return!1}if(ot){if(it&&rt.semver.prerelease&&rt.semver.prerelease.length&&rt.semver.major===it.major&&rt.semver.minor===it.minor&&rt.semver.patch===it.patch&&(it=!1),rt.operator==="<"||rt.operator==="<="){if(At=W(ot,rt,X),At===rt&&At!==ot)return!1}else if(ot.operator==="<="&&!q(ot.semver,String(rt),X))return!1}if(!rt.operator&&(ot||nt)&&st!==0)return!1}return!(nt&&vt&&!ot&&st!==0||ot&&bt&&!nt&&st!==0||ht||it)},H=(K,et,X)=>{if(!K)return et;const tt=Y(K.semver,et.semver,X);return tt>0?K:tt<0||et.operator===">"&&K.operator===">="?et:K},W=(K,et,X)=>{if(!K)return et;const tt=Y(K.semver,et.semver,X);return tt<0?K:tt>0||et.operator==="<"&&K.operator==="<="?et:K};return oc=(K,et,X={})=>{if(K===et)return!0;K=new L(K,X),et=new L(et,X);let tt=!1;t:for(const nt of K.set){for(const ot of et.set){const st=D(nt,ot,X);if(tt=tt||st!==null,st)continue t}if(tt)return!1}return!0}})();return sc={parse:c,valid:i,clean:n,inc:s,diff:f,major:r,minor:e,patch:a,prerelease:p,compare:h,rcompare:m,compareLoose:b,compareBuild:g,sort:l,rsort:y,gt:v,lt:S,eq:w,neq:_,gte:M,lte:z,cmp:k,coerce:E,Comparator:j,Range:x,satisfies:O,toComparators:$,maxSatisfying:N,minSatisfying:P,minVersion:G,validRange:A,outside:I,gtr:R,ltr:B,intersects:V,simplifyRange:J,subset:F,SemVer:d,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:u.SEMVER_SPEC_VERSION,RELEASE_TYPES:u.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}}function El(){if(pc)return hc;pc=1;const t=(function(){return cc?uc:(cc=1,uc=sn().satisfies(Q.version,">=15.7.0"))})(),u=(function(){return fc?lc:(fc=1,lc=sn().satisfies(Q.version,">=16.9.0"))})(),d={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},o={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};return hc=function(c,i){if(!c||!i)return;const n=i.asymmetricKeyType;if(!n)return;const s=d[n];if(!s)throw new Error(`Unknown key type "${n}".`);if(!s.includes(c))throw new Error(`"alg" parameter for "${n}" key type must be one of: ${s.join(", ")}.`);if(t)switch(n){case"ec":const f=i.asymmetricKeyDetails.namedCurve,r=o[c];if(f!==r)throw new Error(`"alg" parameter "${c}" requires curve "${r}".`);break;case"rsa-pss":if(u){const e=parseInt(c.slice(-3),10),{hashAlgorithm:a,mgf1HashAlgorithm:p,saltLength:h}=i.asymmetricKeyDetails;if(a!==`sha${e}`||p!==a)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${c}.`);if(h!==void 0&&h>e>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${c}.`)}}}}function _l(){if(mc)return dc;mc=1;var t=sn();return dc=t.satisfies(Q.version,"^6.12.0 || >=8.0.0")}function ph(){if(yc)return Wr;yc=1;const t=ke(),u=ll(),d=fl(),o=ml(),c=yl(),i=El(),n=_l(),s=mn(),{KeyObject:f,createSecretKey:r,createPublicKey:e}=Vt(),a=["RS256","RS384","RS512"],p=["ES256","ES384","ES512"],h=["RS256","RS384","RS512"],m=["HS256","HS384","HS512"];return n&&(a.splice(a.length,0,"PS256","PS384","PS512"),h.splice(h.length,0,"PS256","PS384","PS512")),Wr=function(b,g,l,y){let v;if(typeof l!="function"||y||(y=l,l={}),l||(l={}),l=Object.assign({},l),v=y||function(k,E){if(k)throw k;return E},l.clockTimestamp&&typeof l.clockTimestamp!="number")return v(new t("clockTimestamp must be a number"));if(l.nonce!==void 0&&(typeof l.nonce!="string"||l.nonce.trim()===""))return v(new t("nonce must be a non-empty string"));if(l.allowInvalidAsymmetricKeyTypes!==void 0&&typeof l.allowInvalidAsymmetricKeyTypes!="boolean")return v(new t("allowInvalidAsymmetricKeyTypes must be a boolean"));const S=l.clockTimestamp||Math.floor(Date.now()/1e3);if(!b)return v(new t("jwt must be provided"));if(typeof b!="string")return v(new t("jwt must be a string"));const w=b.split(".");if(w.length!==3)return v(new t("jwt malformed"));let _;try{_=o(b,{complete:!0})}catch(k){return v(k)}if(!_)return v(new t("invalid token"));const M=_.header;let z;if(typeof g=="function"){if(!y)return v(new t("verify must be called asynchronous if secret or public key is provided as a callback"));z=g}else z=function(k,E){return E(null,g)};return z(M,(function(k,E){if(k)return v(new t("error in secret or public key callback: "+k.message));const j=w[2].trim()!=="";if(!j&&E)return v(new t("jwt signature is required"));if(j&&!E)return v(new t("secret or public key must be provided"));if(!j&&!l.algorithms)return v(new t('please specify "none" in "algorithms" to verify unsigned tokens'));if(E!=null&&!(E instanceof f))try{E=e(E)}catch{try{E=r(typeof E=="string"?dt.from(E):E)}catch{return v(new t("secretOrPublicKey is not valid key material"))}}if(l.algorithms||(E.type==="secret"?l.algorithms=m:["rsa","rsa-pss"].includes(E.asymmetricKeyType)?l.algorithms=h:E.asymmetricKeyType==="ec"?l.algorithms=p:l.algorithms=a),l.algorithms.indexOf(_.header.alg)===-1)return v(new t("invalid algorithm"));if(M.alg.startsWith("HS")&&E.type!=="secret")return v(new t(`secretOrPublicKey must be a symmetric key when using ${M.alg}`));if(/^(?:RS|PS|ES)/.test(M.alg)&&E.type!=="public")return v(new t(`secretOrPublicKey must be an asymmetric key when using ${M.alg}`));if(!l.allowInvalidAsymmetricKeyTypes)try{i(M.alg,E)}catch($){return v($)}let x;try{x=s.verify(b,_.header.alg,E)}catch($){return v($)}if(!x)return v(new t("invalid signature"));const O=_.payload;if(O.nbf!==void 0&&!l.ignoreNotBefore){if(typeof O.nbf!="number")return v(new t("invalid nbf value"));if(O.nbf>S+(l.clockTolerance||0))return v(new u("jwt not active",new Date(1e3*O.nbf)))}if(O.exp!==void 0&&!l.ignoreExpiration){if(typeof O.exp!="number")return v(new t("invalid exp value"));if(S>=O.exp+(l.clockTolerance||0))return v(new d("jwt expired",new Date(1e3*O.exp)))}if(l.audience){const $=Array.isArray(l.audience)?l.audience:[l.audience];if(!(Array.isArray(O.aud)?O.aud:[O.aud]).some((function(N){return $.some((function(P){return P instanceof RegExp?P.test(N):P===N}))})))return v(new t("jwt audience invalid. expected: "+$.join(" or ")))}if(l.issuer&&(typeof l.issuer=="string"&&O.iss!==l.issuer||Array.isArray(l.issuer)&&l.issuer.indexOf(O.iss)===-1))return v(new t("jwt issuer invalid. expected: "+l.issuer));if(l.subject&&O.sub!==l.subject)return v(new t("jwt subject invalid. expected: "+l.subject));if(l.jwtid&&O.jti!==l.jwtid)return v(new t("jwt jwtid invalid. expected: "+l.jwtid));if(l.nonce&&O.nonce!==l.nonce)return v(new t("jwt nonce invalid. expected: "+l.nonce));if(l.maxAge){if(typeof O.iat!="number")return v(new t("iat required when maxAge is specified"));const $=c(l.maxAge,O.iat);if($===void 0)return v(new t('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(S>=$+(l.clockTolerance||0))return v(new d("maxAge exceeded",new Date(1e3*$)))}if(l.complete===!0){const $=_.signature;return v(null,{header:M,payload:O,signature:$})}return v(null,O)}))},Wr}const dh=an(Ml);var tn,gc,vc,bc,wc;function mh(){if(gc)return tn;gc=1;const t=yl(),u=_l(),d=El(),o=mn(),{includes:c,isBoolean:i,isInteger:n,isNumber:s,isPlainObject:f,isString:r,once:e}=dh,{KeyObject:a,createSecretKey:p,createPrivateKey:h}=Vt(),m=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];u&&m.splice(3,0,"PS256","PS384","PS512");const b={expiresIn:{isValid:function(S){return n(S)||r(S)&&S},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(S){return n(S)||r(S)&&S},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(S){return r(S)||Array.isArray(S)},message:'"audience" must be a string or array'},algorithm:{isValid:c.bind(null,m),message:'"algorithm" must be a valid string enum value'},header:{isValid:f,message:'"header" must be an object'},encoding:{isValid:r,message:'"encoding" must be a string'},issuer:{isValid:r,message:'"issuer" must be a string'},subject:{isValid:r,message:'"subject" must be a string'},jwtid:{isValid:r,message:'"jwtid" must be a string'},noTimestamp:{isValid:i,message:'"noTimestamp" must be a boolean'},keyid:{isValid:r,message:'"keyid" must be a string'},mutatePayload:{isValid:i,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:i,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:i,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},g={iat:{isValid:s,message:'"iat" should be a number of seconds'},exp:{isValid:s,message:'"exp" should be a number of seconds'},nbf:{isValid:s,message:'"nbf" should be a number of seconds'}};function l(S,w,_,M){if(!f(_))throw new Error('Expected "'+M+'" to be a plain object.');Object.keys(_).forEach((function(z){const k=S[z];if(k){if(!k.isValid(_[z]))throw new Error(k.message)}else if(!w)throw new Error('"'+z+'" is not allowed in "'+M+'"')}))}const y={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},v=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];return tn=function(S,w,_,M){typeof _=="function"?(M=_,_={}):_=_||{};const z=typeof S=="object"&&!dt.isBuffer(S),k=Object.assign({alg:_.algorithm||"HS256",typ:z?"JWT":void 0,kid:_.keyid},_.header);function E(O){if(M)return M(O);throw O}if(!w&&_.algorithm!=="none")return E(new Error("secretOrPrivateKey must have a value"));if(w!=null&&!(w instanceof a))try{w=h(w)}catch{try{w=p(typeof w=="string"?dt.from(w):w)}catch{return E(new Error("secretOrPrivateKey is not valid key material"))}}if(k.alg.startsWith("HS")&&w.type!=="secret")return E(new Error(`secretOrPrivateKey must be a symmetric key when using ${k.alg}`));if(/^(?:RS|PS|ES)/.test(k.alg)){if(w.type!=="private")return E(new Error(`secretOrPrivateKey must be an asymmetric key when using ${k.alg}`));if(!_.allowInsecureKeySizes&&!k.alg.startsWith("ES")&&w.asymmetricKeyDetails!==void 0&&w.asymmetricKeyDetails.modulusLength<2048)return E(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${k.alg}`))}if(S===void 0)return E(new Error("payload is required"));if(z){try{(function(O){l(g,!0,O,"payload")})(S)}catch(O){return E(O)}_.mutatePayload||(S=Object.assign({},S))}else{const O=v.filter((function($){return _[$]!==void 0}));if(O.length>0)return E(new Error("invalid "+O.join(",")+" option for "+typeof S+" payload"))}if(S.exp!==void 0&&_.expiresIn!==void 0)return E(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(S.nbf!==void 0&&_.notBefore!==void 0)return E(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{(function(O){l(b,!1,O,"options")})(_)}catch(O){return E(O)}if(!_.allowInvalidAsymmetricKeyTypes)try{d(k.alg,w)}catch(O){return E(O)}const j=S.iat||Math.floor(Date.now()/1e3);if(_.noTimestamp?delete S.iat:z&&(S.iat=j),_.notBefore!==void 0){try{S.nbf=t(_.notBefore,j)}catch(O){return E(O)}if(S.nbf===void 0)return E(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(_.expiresIn!==void 0&&typeof S=="object"){try{S.exp=t(_.expiresIn,j)}catch(O){return E(O)}if(S.exp===void 0)return E(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(y).forEach((function(O){const $=y[O];if(_[O]!==void 0){if(S[$]!==void 0)return E(new Error('Bad "options.'+O+'" option. The payload already has an "'+$+'" property.'));S[$]=_[O]}}));const x=_.encoding||"utf8";if(typeof M!="function"){let O=o.sign({header:k,payload:S,secret:w,encoding:x});if(!_.allowInsecureKeySizes&&/^(?:RS|PS)/.test(k.alg)&&O.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${k.alg}`);return O}M=M&&e(M),o.createSign({header:k,privateKey:w,payload:S,encoding:x}).once("error",M).once("done",(function(O){if(!_.allowInsecureKeySizes&&/^(?:RS|PS)/.test(k.alg)&&O.length<256)return M(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${k.alg}`));M(null,O)}))},tn}const yh={version:"0.0.4"};var Ec,_c,Sc,Oc,jc,xc,gh=(function(){if(xc)return jc;xc=1;const t=(Sn||(Sn=1,u=On,d=window,c=typeof(o=d.atob)=="function"?o:typeof dt=="function"?function(l){return new dt(l,"base64").toString("binary")}:typeof d.base64js=="object"?function(l){var y=d.base64js.b64ToByteArray(l);return Array.prototype.map.call(y,(function(v){return String.fromCharCode(v)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")},d.atob=c,u&&u.exports&&(u.exports=c)),On.exports);var u,d,o,c;const i=cf(),n=yf(),s=(Lo||(Lo=1,(function(l){var y=Ut&&Ut.__createBinding||(Object.create?function(w,_,M,z){z===void 0&&(z=M),Object.defineProperty(w,z,{enumerable:!0,get:function(){return _[M]}})}:function(w,_,M,z){z===void 0&&(z=M),w[z]=_[M]}),v=Ut&&Ut.__exportStar||function(w,_){for(var M in w)M==="default"||Object.prototype.hasOwnProperty.call(_,M)||y(_,w,M)};Object.defineProperty(l,"__esModule",{value:!0}),l.middleware=l.fetch=void 0;const S=gf();v(rn(),l),v(we(),l),v(be(),l),l.fetch=S.fetch,l.middleware=S.middleware})(Ut)),Ut),f=Dt(),r=ah(),e=tl(),a=cn(),p=(function(){return vc||(vc=1,(l=_a).exports={verify:ph(),sign:mh(),JsonWebTokenError:ke(),NotBeforeError:ll(),TokenExpiredError:fl()},Object.defineProperty(l.exports,"decode",{enumerable:!1,value:ml()})),_a.exports;var l})(),h=(function(){if(wc)return bc;function l(y){this.token=y.token||"",this.response=y.response||"",this.body=y.responseText||"",this.json=null,this.intuit_tid=y.intuit_tid||""}return wc=1,l.prototype.processResponse=function(y){this.response=y||"",this.body=y&&y.body||"",this.json=this.body&&this.isJson()?JSON.parse(this.body):null,this.intuit_tid=y&&y.headers&&y.headers.intuit_tid||""},l.prototype.getToken=function(){return this.token.getToken()},l.prototype.text=function(){return this.body},l.prototype.status=function(){return this.response.status},l.prototype.headers=function(){return this.response.headers},l.prototype.valid=function(){return this.response&&Number(this.response.status)>=200&&Number(this.response.status)<300},l.prototype.getJson=function(){if(!this.isJson())throw new Error("AuthResponse is not JSON");return this.json||(this.json=this.body?JSON.parse(this.body):null),this.json},l.prototype.get_intuit_tid=function(){return this.intuit_tid},l.prototype.isContentType=function(y){return this.getContentType().indexOf(y)>-1},l.prototype.getContentType=function(){return this.response.get(l._contentType)||""},l.prototype.isJson=function(){return this.isContentType("application/json")},l._contentType="Content-Type",l._jsonContentType="application/json",l._urlencodedContentType="application/x-www-form-urlencoded",bc=l})(),m=yh,b=(function(){if(_c)return Ec;function l(y){y=y||{},this.realmId=y.realmId||"",this.token_type=y.token_type||"",this.access_token=y.access_token||"",this.refresh_token=y.refresh_token||"",this.expires_in=y.expires_in||0,this.x_refresh_token_expires_in=y.x_refresh_token_expires_in||0,this.id_token=y.id_token||"",this.latency=y.latency||6e4,this.createdAt=y.createdAt||Date.now()}return _c=1,l.prototype.accessToken=function(){return this.getToken().access_token},l.prototype.refreshToken=function(){return this.getToken().refresh_token},l.prototype.tokenType=function(){return this.getToken().token_type},l.prototype.getToken=function(){return{token_type:this.token_type,access_token:this.access_token,expires_in:this.expires_in,refresh_token:this.refresh_token,x_refresh_token_expires_in:this.x_refresh_token_expires_in,realmId:this.realmId,id_token:this.id_token,createdAt:this.createdAt}},l.prototype.setToken=function(y){return this.access_token=y.access_token,this.refresh_token=y.refresh_token,this.token_type=y.token_type,this.expires_in=y.expires_in,this.x_refresh_token_expires_in=y.x_refresh_token_expires_in,this.id_token=y.id_token||"",this.createdAt=y.createdAt||Date.now(),this},l.prototype.clearToken=function(){return this.access_token="",this.refresh_token="",this.token_type="",this.expires_in=0,this.x_refresh_token_expires_in=0,this.id_token="",this.createdAt=0,this},l.prototype._checkExpiry=function(y){return this.createdAt+1e3*y-this.latency>Date.now()},l.prototype.isAccessTokenValid=function(){return this._checkExpiry(this.expires_in)},l.prototype.isRefreshTokenValid=function(){return this._checkExpiry(this.x_refresh_token_expires_in)},Ec=l})();function g(l){if(this.environment=l.environment,this.clientId=l.clientId,this.clientSecret=l.clientSecret,this.redirectUri=l.redirectUri,this.token=new b(l.token),this.logging=!(!Object.prototype.hasOwnProperty.call(l,"logging")||l.logging!==!0),this.logger=null,this.state=new i,this.logging){const y="./logs";a.existsSync(y)||a.mkdirSync(y),this.logger=r.createLogger({level:"info",format:r.format.combine(r.format.timestamp(),r.format.printf((v=>`${v.timestamp} ${v.level}: ${v.message}`))),transports:[new r.transports.File({filename:e.join(y,"oAuthClient-log.log")})]})}}return g.cacheId="cacheID",g.authorizeEndpoint="https://appcenter.intuit.com/connect/oauth2",g.tokenEndpoint="https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",g.revokeEndpoint="https://developer.api.intuit.com/v2/oauth2/tokens/revoke",g.userinfo_endpoint_production="https://accounts.platform.intuit.com/v1/openid_connect/userinfo",g.userinfo_endpoint_sandbox="https://sandbox-accounts.platform.intuit.com/v1/openid_connect/userinfo",g.migrate_sandbox="https://developer-sandbox.api.intuit.com/v2/oauth2/tokens/migrate",g.migrate_production="https://developer.api.intuit.com/v2/oauth2/tokens/migrate",g.environment={sandbox:"https://sandbox-quickbooks.api.intuit.com/",production:"https://quickbooks.api.intuit.com/"},g.jwks_uri="https://oauth.platform.intuit.com/op/v1/jwks",g.scopes={Accounting:"com.intuit.quickbooks.accounting",Payment:"com.intuit.quickbooks.payment",Payroll:"com.intuit.quickbooks.payroll",TimeTracking:"com.intuit.quickbooks.payroll.timetracking",Benefits:"com.intuit.quickbooks.payroll.benefits",Profile:"profile",Email:"email",Phone:"phone",Address:"address",OpenId:"openid",Intuit_name:"intuit_name"},g.user_agent=`Intuit-OAuthClient-JS_${m.version}_${f.type()}_${f.release()}_${f.platform()}`,g.prototype.setAuthorizeURLs=function(l){if(!l)throw new Error("Provide the custom authorize URL's");return g.authorizeEndpoint=l.authorizeEndpoint,g.tokenEndpoint=l.tokenEndpoint,g.revokeEndpoint=l.revokeEndpoint,this.environment==="sandbox"?g.userinfo_endpoint_sandbox=l.userInfoEndpoint:g.userinfo_endpoint_production=l.userInfoEndpoint,this},g.prototype.authorizeUri=function(l){if(!(l=l||{}).scope)throw new Error("Provide the scopes");const y=`${g.authorizeEndpoint}?${n.stringify({response_type:"code",redirect_uri:this.redirectUri,client_id:this.clientId,scope:Array.isArray(l.scope)?l.scope.join(" "):l.scope,state:l.state||this.state.create(this.state.secretSync())})}`;return this.log("info","The Authorize Uri is :",y),y},g.prototype.createToken=function(l){return new Promise((y=>{if(!l)throw new Error("Provide the Uri");const v=n.parse(l.split("?").reverse()[0]);this.getToken().realmId=v.realmId?v.realmId:"","state"in v&&(this.getToken().state=v.state);const S={};v.code&&(S.grant_type="authorization_code",S.code=v.code,S.redirect_uri=v.redirectUri||this.redirectUri);const w={url:g.tokenEndpoint,body:S,method:"POST",headers:{Authorization:`Basic ${this.authHeader()}`,"Content-Type":h._urlencodedContentType,Accept:h._jsonContentType,"User-Agent":g.user_agent}};y(this.getTokenRequest(w))})).then((y=>{const v=y.json?y:null,S=v&&v.getJson()||y;return this.token.setToken(S),this.log("info","Create Token response is : ",JSON.stringify(v,null,2)),v})).catch((y=>{throw this.log("error","Create Token () threw an exception : ",JSON.stringify(y,null,2)),y}))},g.prototype.refresh=function(){return new Promise((l=>{this.validateToken();const y={grant_type:"refresh_token"};y.refresh_token=this.getToken().refresh_token;const v={url:g.tokenEndpoint,body:y,method:"POST",headers:{Authorization:`Basic ${this.authHeader()}`,"Content-Type":h._urlencodedContentType,Accept:h._jsonContentType,"User-Agent":g.user_agent}};l(this.getTokenRequest(v))})).then((l=>{const y=l.json?l:null,v=y&&y.getJson()||l;return this.token.setToken(v),this.log("info","Refresh Token () response is : ",JSON.stringify(y,null,2)),y})).catch((l=>{throw this.log("error","Refresh Token () threw an exception : ",JSON.stringify(l,null,2)),l}))},g.prototype.refreshUsingToken=function(l){return new Promise((y=>{if(!l)throw new Error("The Refresh token is missing");const v={grant_type:"refresh_token"};v.refresh_token=l;const S={url:g.tokenEndpoint,body:v,method:"POST",headers:{Authorization:`Basic ${this.authHeader()}`,"Content-Type":h._urlencodedContentType,Accept:h._jsonContentType,"User-Agent":g.user_agent}};y(this.getTokenRequest(S))})).then((y=>{const v=y.json?y:null,S=v&&v.getJson()||y;return this.token.setToken(S),this.log("info","Refresh usingToken () response is : ",JSON.stringify(v,null,2)),v})).catch((y=>{throw this.log("error","Refresh Token () threw an exception : ",JSON.stringify(y,null,2)),y}))},g.prototype.revoke=function(l){return new Promise((y=>{l=l||{};const v={};v.token=l.access_token||l.refresh_token||(this.getToken().isAccessTokenValid()?this.getToken().access_token:this.getToken().refresh_token);const S={url:g.revokeEndpoint,body:v,method:"POST",headers:{Authorization:`Basic ${this.authHeader()}`,Accept:h._jsonContentType,"Content-Type":h._jsonContentType,"User-Agent":g.user_agent}};y(this.getTokenRequest(S))})).then((y=>(this.token.clearToken(),this.log("info","Revoke Token () response is : ",JSON.stringify(y,null,2)),y))).catch((y=>{throw this.log("error","Revoke Token () threw an exception : ",JSON.stringify(y,null,2)),y}))},g.prototype.getUserInfo=function(){return new Promise((l=>{const y={url:this.environment==="sandbox"?g.userinfo_endpoint_sandbox:g.userinfo_endpoint_production,method:"GET",headers:{Authorization:`Bearer ${this.token.access_token}`,Accept:h._jsonContentType,"User-Agent":g.user_agent}};l(this.getTokenRequest(y))})).then((l=>{const y=l.json?l:null;return this.log("info","The Get User Info () response is : ",JSON.stringify(y,null,2)),y})).catch((l=>{throw this.log("error","Get User Info () threw an exception : ",JSON.stringify(l,null,2)),l}))},g.prototype.makeApiCall=function(l){return new Promise((y=>{const v=(l=l||{}).transport?l.transport:s.createTransport({type:"text"}),S=l.headers&&typeof l.headers=="object"?Object.assign({},{Authorization:`Bearer ${this.getToken().access_token}`,Accept:h._jsonContentType,"User-Agent":g.user_agent},l.headers):Object.assign({},{Authorization:`Bearer ${this.getToken().access_token}`,Accept:h._jsonContentType,"User-Agent":g.user_agent}),w={url:l.url,method:l.method||"GET",headers:S,transport:v};l.body&&(w.body=l.body),y(this.getTokenRequest(w))})).then((y=>(this.log("info","The makeAPICall () response is : ",JSON.stringify(y,null,2)),y))).catch((y=>{throw this.log("error","Get makeAPICall () threw an exception : ",JSON.stringify(y,null,2)),y}))},g.prototype.validateIdToken=function(l={}){return new Promise((y=>{if(!this.getToken().id_token)throw new Error("The bearer token does not have id_token");const v=this.getToken().id_token||l.id_token,S=v.split("."),w=JSON.parse(t(S[0])),_=JSON.parse(t(S[1]));if(_.iss!=="https://oauth.platform.intuit.com/op/v1"||!_.aud.find((z=>z===this.clientId))||_.exp<Date.now()/1e3)return!1;const M={url:g.jwks_uri,method:"GET",headers:{Accept:h._jsonContentType,"User-Agent":g.user_agent}};return y(this.getKeyFromJWKsURI(v,w.kid,M))})).then((y=>(this.log("info","The validateIdToken () response is : ",JSON.stringify(y,null,2)),!!y))).catch((y=>{throw this.log("error","The validateIdToken () threw an exception : ",JSON.stringify(y,null,2)),y}))},g.prototype.getValidatedIdToken=function(l={}){return new Promise((y=>{if(!this.getToken().id_token)throw new Error("The bearer token does not have id_token");const v=this.getToken().id_token||l.id_token,S=v.split("."),w=JSON.parse(t(S[0])),_=JSON.parse(t(S[1]));if(_.iss!=="https://oauth.platform.intuit.com/op/v1"||!_.aud.find((z=>z===this.clientId))||_.exp<Date.now()/1e3)return!1;const M={url:g.jwks_uri,method:"GET",headers:{Accept:h._jsonContentType,"User-Agent":g.user_agent}};return y(this.getKeyFromJWKsURI(v,w.kid,M))})).then((y=>(this.log("info","The validateIdToken () response is : ",JSON.stringify(y,null,2)),y))).catch((y=>{throw this.log("error","The validateIdToken () threw an exception : ",JSON.stringify(y,null,2)),y}))},g.prototype.getIdTokenComponents=async function(l={}){if(!this.getToken().id_token)throw new Error("The bearer token does not have id_token");const y=(this.getToken().id_token||l.id_token).split("."),v=JSON.parse(t(y[0])),S=JSON.parse(t(y[1]));if(S.iss!=="https://oauth.platform.intuit.com/op/v1")throw new Error('The issuer is not as mentioned in "issuer"');if(!S.aud.find((w=>w===this.clientId)))throw new Error("The aud field in idToken does not contain application's clientId");if(S.exp<Date.now()/1e3)throw new Error("The timestamp has elapsed");return{id_token_header:v,id_token_payload:S}},g.prototype.getKeyFromJWKsURI=function(l,y,v){return new Promise((S=>{S(this.loadResponse(v))})).then((S=>{if(Number(S.status)!==200)throw new Error("Could not reach JWK endpoint");const w=JSON.parse(S.body).keys.find((M=>M.kid===y)),_=this.getPublicKey(w.n,w.e);return p.verify(l,_)})).catch((S=>{throw S=this.createError(S),this.log("error","The getKeyFromJWKsURI () threw an exception : ",JSON.stringify(S,null,2)),S}))},g.prototype.getPublicKey=function(l,y){return(function(){if(Oc)return Sc;function S(M){var z=M[0];return z<"0"||z>"7"?"00"+M:M}function w(M){var z=M.toString(16);return z.length%2?"0"+z:z}function _(M){if(M<=127)return w(M);var z=w(M);return w(128+z.length/2)+z}return Oc=1,Sc=function(M,z){var k=dt.from(M,"base64"),E=dt.from(z,"base64"),j=k.toString("hex"),x=E.toString("hex");j=S(j),x=S(x);var O=j.length/2,$=x.length/2,N=_(O),P=_($),G="30"+_(O+$+N.length/2+P.length/2+2)+"02"+N+j+"02"+P+x;return`-----BEGIN RSA PUBLIC KEY-----
|
|
97
|
-
`+dt.from(G,"hex").toString("base64").match(/.{1,64}/g).join(`
|
|
98
|
-
`)+`
|
|
99
|
-
-----END RSA PUBLIC KEY-----
|
|
100
|
-
`}})()(l,y)},g.prototype.getTokenRequest=function(l){const y=new h({token:this.token});return new Promise((v=>{v(this.loadResponse(l))})).then((v=>{if(y.processResponse(v),!y.valid())throw new Error("Response has an Error");return y})).catch((v=>{throw v.authResponse||(v=this.createError(v,y)),v}))},g.prototype.validateToken=function(){if(!this.token.refreshToken())throw new Error("The Refresh token is missing");if(!this.token.isRefreshTokenValid())throw new Error("The Refresh token is invalid, please Authorize again.")},g.prototype.loadResponse=function(l){return s.get(l).then((y=>y))},g.prototype.loadResponseFromJWKsURI=function(l){return s.get(l).then((y=>y))},g.prototype.createError=function(l,y){return y&&y.body!==""?(l.authResponse=y,l.originalMessage=l.message,l.error="","error"in y.getJson()?l.error=y.getJson().error:y.response.statusText?l.error=y.response.statusText:l.message&&(l.error=l.message),l.error_description="","error_description"in y.getJson()?l.error_description=y.getJson().error_description:y.response.statusText&&(l.error_description=y.response.statusText),l.intuit_tid=y.headers().intuit_tid,l):(l.error=y&&y.response.statusText||l.message||"",l.authResponse=y||"",l.intuit_tid=y&&y.headers()&&y.headers().intuit_tid||"",l.originalMessage=l.message||"",l.error_description=y&&y.response.statusText||"",l)},g.prototype.isAccessTokenValid=function(){return this.token.isAccessTokenValid()},g.prototype.getToken=function(){return this.token},g.prototype.setToken=function(l){return this.token=new b(l),this.token},g.prototype.authHeader=function(){const l=`${this.clientId}:${this.clientSecret}`;return typeof btoa=="function"?btoa(l):dt.from(l).toString("base64")},g.prototype.log=function(l,y,v){this.logging&&this.logger.log(l,y+v)},jc=g})();const re=jl(gh),Sl=(()=>{let t,u,d=!1;return{isInitiated:d,init:(o,c)=>{u=new re({clientId:Jl.quickbooksKey,clientSecret:"",environment:Wl,redirectUri:window.location.origin+o}),t=u.authorizeUri({state:c,scope:[re.scopes.Accounting,re.scopes.OpenId,re.scopes.Email,re.scopes.Profile,"project-management.project"]}),d=!0},handleClick:()=>{window.open(t,"_self","noopener")}}})(),vh=Hl((function(t){const u=Ac(t),d=u?.companyName??"",o=Rc(t).tenantsInOrder.length>1,c=Tl(u?.userRole??[]),i=u.externalConnections?.saveConnectionState;return{companyName:d,isGoBackAllowed:o,isAdmin:c,saveConnectionState:i}}),(function(t,u){const{tenantsInOrder:d,navigate:o,currentTenant:c}=u;return{handleOnConnectClick:()=>{Sl.handleClick()},handleGoBack:()=>{const i=d[0].tenantEmailDomain!==c.tenantEmailDomain?d[0]:d[1];Xl({dispatch:t,navigate:o,pathToNavigate:`/${i.tenantEmailDomain}`,selectedTenant:i,signedInUser:Pc.getSignedInUser()})}}}))(Kl);function bh(t){const u=Tc(t,!0).query,d=u.code,o=u.realmId,c=u.state;return{code:d!=null?Pe(d):"",realmId:o!=null?Pe(o):"",state:c!=null?Pe(c):""}}function Nh(){const t=Gl(),u=zl(),d=Zl(),{code:o,realmId:c,state:i}=bh(u.search),{setLoading:n,clearAllLoading:s}=Vl(),f=_n((b=>Ac(b))),r=_n((b=>Rc(b).tenantsInOrder)),e=f.externalConnections?.accounting[0],a=e?.connectionType,p=e?.connectionName,h=e?.connectionId??"",m=Pc.getSignedInUser()?.userId??"";return xl.useEffect((()=>{wh(o,c,i,h,m)===!0&&f.externalConnections?.saveConnectionState!=="In-Progress"?(n(Yl.CONNECTION_AUTH),d(kl(f.tenantId,{connection_type:a??"accounting",connection_name:p??"quickbooks_online",authorization_code:o,realm_id:c,connection_id:h,user_id:m},Tc(window.location.origin+"/connection/auth"),f.companyId)),t(u.pathname)):(s(),Sl.init("/connection/auth",f.tenantEmailDomain))}),[o,c,i,h,m,f.tenantId,f.companyId,f.externalConnections?.saveConnectionState,u.pathname]),Ol.jsx(vh,{navigate:t,tenantsInOrder:r,currentTenant:f})}const wh=(t,u,d,o,c)=>t!=""&&u!=""&&d!=""&&o!=null&&o!=""&&c!=null&&c!="";export{Nh as Q,bh as g,wh as h,Sl as q};
|