@abtnode/blocklet-services 1.17.8-beta-20260106-113136-b3c09e14 → 1.17.8-beta-20260108-120904-21cb5fb6
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/api/util/blocklet-utils.js +9 -4
- package/dist/assets/{AdapterDayjs-DafRMFLg.js → AdapterDayjs-C1bdndja.js} +1 -1
- package/dist/assets/{Google-DRu937I3.js → Google-BI3aC5vK.js} +1 -1
- package/dist/assets/{access-control-cgo5Z15_.js → access-control-BL-PuDiR.js} +1 -1
- package/dist/assets/{actions-Dfiiwkit.js → actions-m1acuA78.js} +1 -1
- package/dist/assets/{add-component-core-BfzNEcS5.js → add-component-core-BzMN094F.js} +1 -1
- package/dist/assets/add-resource-BRF-rYME.js +1 -0
- package/dist/assets/{addon-qN24wAb4.js → addon-yDIBSjIk.js} +1 -1
- package/dist/assets/{advanced-1Vu6rcXU.js → advanced-DEE0XFtQ.js} +1 -1
- package/dist/assets/{aigne-D6MrXXCU.js → aigne-9evgyH7b.js} +1 -1
- package/dist/assets/api-B24x7kOD.js +1 -0
- package/dist/assets/{appearance-DOQHBg9p.js → appearance-C8B414U2.js} +1 -1
- package/dist/assets/{ar-BukCw0OI.js → ar-BHqjWgUQ.js} +2 -2
- package/dist/assets/{audit-logs-ISyoqJFp.js → audit-logs-qNutRhHx.js} +1 -1
- package/dist/assets/{authorize-B9RLEFal.js → authorize-CZSHuYdu.js} +1 -1
- package/dist/assets/{base-chart-DhxjAyBU.js → base-chart-DT--nPCU.js} +1 -1
- package/dist/assets/{base32-_D4eWUeh.js → base32-z3esjJBn.js} +1 -1
- package/dist/assets/{bind-account-CLIjYy96.js → bind-account-QxLU_sxt.js} +1 -1
- package/dist/assets/{branding-iwUveEf5.js → branding-Bk26INk9.js} +1 -1
- package/dist/assets/{branding-C81Kt22j.js → branding-_XszRU-Z.js} +1 -1
- package/dist/assets/branding-tR0gcoY_.js +1 -0
- package/dist/assets/bundle-avatar-2AQWR0ld.js +1 -0
- package/dist/assets/button-LwkniwV9.js +1 -0
- package/dist/assets/{click-to-copy-CMo42VnK.js → click-to-copy-Dk6ZAJOw.js} +1 -1
- package/dist/assets/{omit-CCIQ0Qdi.js → cloneDeep-rgNCMFod.js} +1 -1
- package/dist/assets/{collapse-B7gUzFaX.js → collapse-D72lnPa9.js} +1 -1
- package/dist/assets/{complete-CJ_buCAS.js → complete-CEvsz8uU.js} +2 -2
- package/dist/assets/{component-Dip3v1Iq.js → component-BrZ1DWiw.js} +2 -2
- package/dist/assets/{config-D5KnWqfn.js → config-6tpm84_l.js} +1 -1
- package/dist/assets/{config-D8XZj8JI.js → config-CwlqBQNt.js} +2 -2
- package/dist/assets/config-cdtQwn5t.js +53 -0
- package/dist/assets/{config-navigation-Ni0iczgA.js → config-navigation-CZ9V7otK.js} +2 -2
- package/dist/assets/{config-space-B6_f52sE.js → config-space-CZRqkXsR.js} +1 -1
- package/dist/assets/{confirm-Lb1MrAdS.js → confirm-Ch-CAgUO.js} +1 -1
- package/dist/assets/{connect-JAX_oP3o.js → connect-BNkv99fz.js} +1 -1
- package/dist/assets/connect-CadBIZOq.js +5 -0
- package/dist/assets/connect-i7rkK26L.js +1 -0
- package/dist/assets/connect-to-lX3lujSp.js +1 -0
- package/dist/assets/{content-layout-DmSBGGVm.js → content-layout-Dtfb5X6M.js} +1 -1
- package/dist/assets/{create-passport-svg-5AYzBKFb.js → create-passport-svg-DeDfPZeD.js} +1 -1
- package/dist/assets/{createClass-DXYd7BIe.js → createClass-07c4wbGU.js} +1 -1
- package/dist/assets/{dashboard-C0l2IWWH.js → dashboard-CmJOnF0g.js} +2 -2
- package/dist/assets/{de-Br0tDZam.js → de-QUGQFv2K.js} +1 -1
- package/dist/assets/{delete-confirm-tbfLqDBI.js → delete-confirm-DiU5PO2T.js} +1 -1
- package/dist/assets/{did-address-CsOJBoiY.js → did-address-Cq16cwTy.js} +1 -1
- package/dist/assets/{domain-CnhOsdmM.js → domain-DHqSA0zl.js} +1 -1
- package/dist/assets/{domain-action-card-BsdHbhEi.js → domain-action-card-BsNaII7k.js} +2 -2
- package/dist/assets/domains-BQ_Of9Oo.js +1 -0
- package/dist/assets/{email-Dt_DGuhf.js → email-DXdzQLls.js} +2 -2
- package/dist/assets/{empty-spinner-BYDonf35.js → empty-spinner-BClWI15N.js} +1 -1
- package/dist/assets/engine-D18zeIE7.js +1 -0
- package/dist/assets/{es-D_e0gGgp.js → es-C4w6cL07.js} +2 -2
- package/dist/assets/{exchange-passport-DztKvBat.js → exchange-passport-NOgYhNpm.js} +1 -1
- package/dist/assets/{form-DoC8uBcB.js → form-DhecYoSJ.js} +3 -3
- package/dist/assets/{form-text-input-XjloVwBd.js → form-text-input-BsCymY_c.js} +1 -1
- package/dist/assets/{form-wrapper-PT5ZzMQy.js → form-wrapper-pwkkz4we.js} +1 -1
- package/dist/assets/{fr-DXizOT4b.js → fr-Bq3UipEu.js} +2 -2
- package/dist/assets/{fuel-IaJHNPPW.js → fuel-DgzL5KSX.js} +1 -1
- package/dist/assets/{gen-access-key-BJlDqEhI.js → gen-access-key-BxnyhhCR.js} +1 -1
- package/dist/assets/{gen-simple-access-key-lyiUw0C-.js → gen-simple-access-key-BJI-4yOF.js} +1 -1
- package/dist/assets/get-safe-url-BVTaUfvO.js +1 -0
- package/dist/assets/{hi-D2FEb_Tx.js → hi-DGZy0DLh.js} +2 -2
- package/dist/assets/{home-Bs_5YPbK.js → home-Bibhtg_U.js} +1 -1
- package/dist/assets/{id-Dw9URVwP.js → id-DOzDilAf.js} +2 -2
- package/dist/assets/{iframe-Dqu4MSyW.js → iframe-CqiUrjUO.js} +1 -1
- package/dist/assets/{index-BDH_LtJL.js → index-0ZSFNH-D.js} +1 -1
- package/dist/assets/{index-1HKgA-fz.js → index-BB8sYq-N.js} +1 -1
- package/dist/assets/{index-BWDWEkUF.js → index-BSZ3mQac.js} +2 -2
- package/dist/assets/{index-Dfx19arA.js → index-BhpNA6ar.js} +1 -1
- package/dist/assets/{index-B4YCnemd.js → index-BnOC3Ium.js} +1 -1
- package/dist/assets/index-BszSKE9L.js +1 -0
- package/dist/assets/{index-vP1T6V7V.js → index-CHkWO9t3.js} +4 -4
- package/dist/assets/{index-BsohFwTm.js → index-CaQuyP_U.js} +1 -1
- package/dist/assets/{index-DT5AXPVB.js → index-Cdaohlhu.js} +7 -7
- package/dist/assets/{index-B10SG1vs.js → index-CdsI3g5U.js} +1 -1
- package/dist/assets/index-CsYL8tps.js +1 -0
- package/dist/assets/{index-CRAuhYSg.js → index-D-O_eFad.js} +1 -1
- package/dist/assets/{index-BNhv-9xy.js → index-D88DUiSg.js} +1 -1
- package/dist/assets/{index-TYwJnR0n.js → index-D8NN8LDz.js} +6 -6
- package/dist/assets/{index-CQgzjKgB.js → index-DI4CWTXR.js} +106 -106
- package/dist/assets/{index-BhhZ8IDZ.js → index-DUnMyyWn.js} +9 -9
- package/dist/assets/{index-BSZtxRM0.js → index-D_ckidZn.js} +2 -2
- package/dist/assets/{index-B_SjLIbT.js → index-DlifV2p1.js} +5 -5
- package/dist/assets/{index-dbYkWwF4.js → index-DzdHYw6g.js} +1 -1
- package/dist/assets/{index-Cq6z7yeF.js → index-Ge2WhAk1.js} +4 -4
- package/dist/assets/{index-Cp0b8q3A.js → index-KUC3HPt0.js} +1 -1
- package/dist/assets/index-POuATgdm.js +1 -0
- package/dist/assets/index-TBM4hzrY.js +81 -0
- package/dist/assets/{index-DhHvANH8.js → index-WjASWJcO.js} +4 -4
- package/dist/assets/{index-DctZHPFL.js → index-fC-FqmP3.js} +1 -1
- package/dist/assets/{index-BGhqVqit.js → index-gohmHhDq.js} +1 -1
- package/dist/assets/{index-CRZM3CKo.js → index-hBDzzv6I.js} +1 -1
- package/dist/assets/{index-BWL6HE0j.js → index-iX-pnOjy.js} +1 -1
- package/dist/assets/{index-B7_VUEoc.js → index-jILCQaR3.js} +1 -1
- package/dist/assets/{index-B6DWjLJS.js → index-m_xRKGyG.js} +8 -8
- package/dist/assets/{index-G6Vk78zE.js → index-mt_AKU_F.js} +2 -2
- package/dist/assets/{index-B0Q9wWG1.js → index-oucqu2vy.js} +1 -1
- package/dist/assets/{index-B4KKUWng.js → index-u9tqiWy4.js} +1 -1
- package/dist/assets/{index-BkePHcyK.js → index-uexcv8C-.js} +7 -7
- package/dist/assets/info-outline-rounded-BLwoUxyI.js +1 -0
- package/dist/assets/{invitation-CYFN9u5t.js → invitation-DSs7YT3_.js} +4 -4
- package/dist/assets/{invitations-jY13RXbI.js → invitations-DK7oD-E6.js} +1 -1
- package/dist/assets/{invite-D72FvaiG.js → invite-CdWfDz--.js} +1 -1
- package/dist/assets/{isURL-CJRImg0N.js → isURL-DMMDDAKA.js} +1 -1
- package/dist/assets/{issue-passport-BfqkJF3W.js → issue-passport-yIqheTA0.js} +1 -1
- package/dist/assets/{item-5ZWPft2s.js → item-BV3WfK17.js} +1 -1
- package/dist/assets/{ja-DBxpsmGJ.js → ja-DMq-YXDX.js} +2 -2
- package/dist/assets/{ko-CCAdSyce.js → ko-BrYbXurh.js} +2 -2
- package/dist/assets/{landing-page-DRtId3hN.js → landing-page-BDAr8Hmo.js} +1 -1
- package/dist/assets/{launch-result-message-MNpx7ysR.js → launch-result-message-C04PaKk0.js} +1 -1
- package/dist/assets/{layout-Be1KH57_.js → layout-DzZv-Jny.js} +1 -1
- package/dist/assets/{list-CQtiNSih.js → list-B6eMSw29.js} +1 -1
- package/dist/assets/{list-CHI1rCEg.js → list-BWd3aUjb.js} +2 -2
- package/dist/assets/{list-header-Cl3jykCe.js → list-header-wJF4c6BN.js} +1 -1
- package/dist/assets/localization-oLJXrcTA.js +1 -0
- package/dist/assets/{log-BfCFT05M.js → log-BskdQbRf.js} +1 -1
- package/dist/assets/logger-DhW79f4a.js +1 -0
- package/dist/assets/{login-BtsH3IvI.js → login-CfL0Uf6Y.js} +1 -1
- package/dist/assets/{login-oauth-callback-Ds4uYiRr.js → login-oauth-callback-_6XAZMOE.js} +1 -1
- package/dist/assets/{logo-uploader-lepUW_D7.js → logo-uploader-D5E5QaRF.js} +1 -1
- package/dist/assets/{lost-passport-BtN3h1ya.js → lost-passport-CUtEI06a.js} +1 -1
- package/dist/assets/omit-BeaKJrg9.js +1 -0
- package/dist/assets/{open-window-CNt8gsrN.js → open-window-Bi6zVDJd.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-7TbnqqKX.js → over-due-invoice-payment-B7FQEnNH.js} +1 -1
- package/dist/assets/{overview-Be3tncsL.js → overview-C7QghcRT.js} +1 -1
- package/dist/assets/{page-header-CHAwrgX-.js → page-header-BZv-tfgN.js} +1 -1
- package/dist/assets/passport-B_eTMTmZ.js +1 -0
- package/dist/assets/{passport-item-Bhbm8_m6.js → passport-item-D53yZ-cF.js} +1 -1
- package/dist/assets/{permission-BHvrn0M5.js → permission-DC8i_y8F.js} +1 -1
- package/dist/assets/preferences-DzDUGj-O.js +1 -0
- package/dist/assets/profile-embed-B3QUDkbU.js +1 -0
- package/dist/assets/{provider-icon-DQY2_LaP.js → provider-icon-D15U0Izg.js} +1 -1
- package/dist/assets/{pt-CrMGrBZ6.js → pt-Dl6732JN.js} +2 -2
- package/dist/assets/publish-resource-DCIlLUPS.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-D0JKrMDl.js → react-beautiful-dnd.esm-BwIgGfYj.js} +1 -1
- package/dist/assets/{react-stripe.esm-CVZErl8X.js → react-stripe.esm-5Snjx_mn.js} +1 -1
- package/dist/assets/{required-BQln5OcV.js → required-DHjZE3-Y.js} +1 -1
- package/dist/assets/{ru-up3R57Pv.js → ru-CVUeN9AX.js} +2 -2
- package/dist/assets/{runtime-npJC4gp_.js → runtime-BHekBabT.js} +1 -1
- package/dist/assets/{sanitize-C-shWbtD.js → sanitize-yX1j-ggS.js} +1 -1
- package/dist/assets/sdk-CJUhxOGJ.js +1 -0
- package/dist/assets/{section-jXB9AxBb.js → section-CenHBXqj.js} +1 -1
- package/dist/assets/{security-nSKpCl8B.js → security-BMslI5IZ.js} +3 -3
- package/dist/assets/{session-C2ZBRIpv.js → session-CZpDtsCZ.js} +1 -1
- package/dist/assets/{setup-krkSJpAg.js → setup-CCvGdFDO.js} +1 -1
- package/dist/assets/{shorten-label-C4py9TLA.js → shorten-label-DXFyDHDr.js} +1 -1
- package/dist/assets/{simple-select-i16Vwzvl.js → simple-select-DtCsUIHR.js} +1 -1
- package/dist/assets/{spaces-BdZ_Rv3s.js → spaces-D3H6AchN.js} +1 -1
- package/dist/assets/{start-y3zrboBQ.js → start-SeWUP0mo.js} +4 -4
- package/dist/assets/{starting-progress-DI-J-VlX.js → starting-progress-Y3UjFmoX.js} +1 -1
- package/dist/assets/{status-B8pB_mTB.js → status-MSXp_buG.js} +1 -1
- package/dist/assets/{step-actions-B1ufIDaK.js → step-actions-BNFJWVZI.js} +1 -1
- package/dist/assets/{studio-1jwq0HOw.js → studio-CRjDRBty.js} +1 -1
- package/dist/assets/{switch-CetbUrYR.js → switch-C49IloVU.js} +1 -1
- package/dist/assets/{switch-control-_85hc9FG.js → switch-control-npfWE_aC.js} +1 -1
- package/dist/assets/{table-tips-CMt22HEy.js → table-tips-DMrnJF8e.js} +1 -1
- package/dist/assets/{team-DDjNXwXE.js → team-YWd-FRKh.js} +8 -8
- package/dist/assets/{th-DdNj2Ao6.js → th-32eBNQes.js} +2 -2
- package/dist/assets/{traffic-mcbpWOFq.js → traffic-0IuWlrAD.js} +1 -1
- package/dist/assets/{transfer-C66c3bWd.js → transfer-DRS2VUAN.js} +1 -1
- package/dist/assets/{unsubscribe-Cvz0OKhq.js → unsubscribe-xDow2Z6m.js} +1 -1
- package/dist/assets/{use-app-logo-BuyF983S.js → use-app-logo-hIHAHSSI.js} +1 -1
- package/dist/assets/{use-mobile-BINJTzMb.js → use-mobile-Bz2ML4Gk.js} +1 -1
- package/dist/assets/{use-mobile-D5clNlrm.js → use-mobile-_vjPRYx2.js} +1 -1
- package/dist/assets/{use-server-logo-Pbr_UuiI.js → use-server-logo-Da86xnyt.js} +1 -1
- package/dist/assets/{use-window-close-B16QghYq.js → use-window-close-DUJmRIjM.js} +1 -1
- package/dist/assets/{useAsync-BVTh1KYj.js → useAsync-D0xh4Var.js} +1 -1
- package/dist/assets/{useAsync-ZGLJQow7.js → useAsync-D6IP8T2e.js} +1 -1
- package/dist/assets/{useAsyncRetry-BMmRgSGm.js → useAsyncRetry-B_bXUXWM.js} +1 -1
- package/dist/assets/{useLocalStorage-De-EuH_M.js → useLocalStorage-Brr2PSz9.js} +1 -1
- package/dist/assets/{user-center-DQSoqc_z.js → user-center-COnqQuqE.js} +6 -6
- package/dist/assets/{user-follower-TTyja_sV.js → user-follower-DVX8m-Zk.js} +1 -1
- package/dist/assets/{util-Ff3hwYmy.js → util-Dee1Ybp3.js} +1 -1
- package/dist/assets/{util-DuMKfKo8.js → util-GXkeqbBQ.js} +1 -1
- package/dist/assets/{vendor-arcblock-Cnwtqa7s.js → vendor-arcblock-BCP2x3BR.js} +1 -1
- package/dist/assets/{vendor-hooks-BQWlJm53.js → vendor-hooks-DQAdyHrE.js} +1 -1
- package/dist/assets/{vendor-mui-core-DnR6WYuU.js → vendor-mui-core-CKKG_1TN.js} +2 -2
- package/dist/assets/{vendor-mui-x-CQc01l4r.js → vendor-mui-x-DHGvg6Bj.js} +1 -1
- package/dist/assets/{vendor-utils-DCMKu06e.js → vendor-utils-CUs2ebe7.js} +17 -17
- package/dist/assets/{vendor-ux-B0gV9NvH.js → vendor-ux-DjXlxcvL.js} +115 -115
- package/dist/assets/{vi-HNh41Xxk.js → vi-DF8IinAc.js} +2 -2
- package/dist/assets/{wait-connect-CRZmfXOA.js → wait-connect-CLe9IfYi.js} +1 -1
- package/dist/assets/{wizard-B41kI39b.js → wizard-8Tk0iyxY.js} +1 -1
- package/dist/assets/wizard-components-C10frai0.js +52 -0
- package/dist/assets/wrap-locale-CxYp8fAf.js +1 -0
- package/dist/assets/{zh-BmX_fuoi.js → zh-BRjrClew.js} +1 -1
- package/dist/assets/{zh-MM5bvwO_.js → zh-ByJkLAV1.js} +2 -2
- package/dist/assets/{zh-tw-Dr5DyPwA.js → zh-tw-34G9tsUP.js} +2 -2
- package/dist/index.html +1 -1
- package/package.json +44 -44
- package/dist/assets/add-resource-CYRgZ1ps.js +0 -1
- package/dist/assets/api-DwxIBXZs.js +0 -1
- package/dist/assets/branding-myiZl37D.js +0 -1
- package/dist/assets/bundle-avatar-Cc_6nw01.js +0 -1
- package/dist/assets/button-D-lyR9BW.js +0 -1
- package/dist/assets/cloneDeep-BY8zW7hH.js +0 -1
- package/dist/assets/config-44sI5I0w.js +0 -53
- package/dist/assets/connect-0OZVqJvc.js +0 -1
- package/dist/assets/connect-B9GQZEi7.js +0 -5
- package/dist/assets/connect-to-Djgj6TLg.js +0 -1
- package/dist/assets/domains-DRP2VSvO.js +0 -1
- package/dist/assets/engine-BXGX_w-S.js +0 -1
- package/dist/assets/get-safe-url-BiNPujaX.js +0 -1
- package/dist/assets/index-B9LF8Bep.js +0 -1
- package/dist/assets/index-BmXPp3DU.js +0 -1
- package/dist/assets/index-CI_uwh_J.js +0 -81
- package/dist/assets/index-CbiyJRV7.js +0 -1
- package/dist/assets/info-outline-rounded-BIwvgXCK.js +0 -1
- package/dist/assets/localization-CKE-bHgd.js +0 -1
- package/dist/assets/logger-DU7baop2.js +0 -1
- package/dist/assets/passport-CkJ4B4CG.js +0 -1
- package/dist/assets/preferences-TFWtUYLy.js +0 -1
- package/dist/assets/profile-embed-B9f9hlSS.js +0 -1
- package/dist/assets/publish-resource-CyvkVMG_.js +0 -1
- package/dist/assets/sdk-CoWDgSLO.js +0 -1
- package/dist/assets/wizard-components-Bn72hVOe.js +0 -52
- package/dist/assets/wrap-locale-CF46rj6q.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as U,ax as rr,ak as en,f as ar}from"./vendor-mui-core-DnR6WYuU.js";import{g as bi,d as sr,h as or,f as un,r as L}from"./vendor-react-CTtPmzVP.js";import{z as wi,af as lr,e as fr,n as cr,J as yi}from"./vendor-utils-DCMKu06e.js";import{l as Ie,br as dr,bs as ur,ab as hr}from"./vendor-ux-B0gV9NvH.js";import{aH as _r}from"./index-CQgzjKgB.js";import{l as pr}from"./vendor-hooks-BQWlJm53.js";/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const gr=4,hn=0,_n=1,br=2;function Re(e){let n=e.length;for(;--n>=0;)e[n]=0}const wr=0,xi=1,yr=2,xr=3,mr=258,tn=29,We=256,je=We+1+tn,Se=30,nn=19,mi=2*je+1,be=15,yt=16,Er=7,rn=256,Ei=16,vi=17,Ni=18,Xt=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ct=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),vr=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ki=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Nr=512,le=new Array((je+2)*2);Re(le);const Be=new Array(Se*2);Re(Be);const He=new Array(Nr);Re(He);const Ve=new Array(mr-xr+1);Re(Ve);const an=new Array(tn);Re(an);const dt=new Array(Se);Re(dt);function xt(e,n,t,i,l){this.static_tree=e,this.extra_bits=n,this.extra_base=t,this.elems=i,this.max_length=l,this.has_stree=e&&e.length}let Ti,Ai,Si;function mt(e,n){this.dyn_tree=e,this.max_code=0,this.stat_desc=n}const Oi=e=>e<256?He[e]:He[256+(e>>>7)],Xe=(e,n)=>{e.pending_buf[e.pending++]=n&255,e.pending_buf[e.pending++]=n>>>8&255},K=(e,n,t)=>{e.bi_valid>yt-t?(e.bi_buf|=n<<e.bi_valid&65535,Xe(e,e.bi_buf),e.bi_buf=n>>yt-e.bi_valid,e.bi_valid+=t-yt):(e.bi_buf|=n<<e.bi_valid&65535,e.bi_valid+=t)},ne=(e,n,t)=>{K(e,t[n*2],t[n*2+1])},Fi=(e,n)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--n>0);return t>>>1},kr=e=>{e.bi_valid===16?(Xe(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},Tr=(e,n)=>{const t=n.dyn_tree,i=n.max_code,l=n.stat_desc.static_tree,a=n.stat_desc.has_stree,f=n.stat_desc.extra_bits,s=n.stat_desc.extra_base,c=n.stat_desc.max_length;let r,o,E,_,h,v,T=0;for(_=0;_<=be;_++)e.bl_count[_]=0;for(t[e.heap[e.heap_max]*2+1]=0,r=e.heap_max+1;r<mi;r++)o=e.heap[r],_=t[t[o*2+1]*2+1]+1,_>c&&(_=c,T++),t[o*2+1]=_,!(o>i)&&(e.bl_count[_]++,h=0,o>=s&&(h=f[o-s]),v=t[o*2],e.opt_len+=v*(_+h),a&&(e.static_len+=v*(l[o*2+1]+h)));if(T!==0){do{for(_=c-1;e.bl_count[_]===0;)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[c]--,T-=2}while(T>0);for(_=c;_!==0;_--)for(o=e.bl_count[_];o!==0;)E=e.heap[--r],!(E>i)&&(t[E*2+1]!==_&&(e.opt_len+=(_-t[E*2+1])*t[E*2],t[E*2+1]=_),o--)}},Ii=(e,n,t)=>{const i=new Array(be+1);let l=0,a,f;for(a=1;a<=be;a++)l=l+t[a-1]<<1,i[a]=l;for(f=0;f<=n;f++){let s=e[f*2+1];s!==0&&(e[f*2]=Fi(i[s]++,s))}},Ar=()=>{let e,n,t,i,l;const a=new Array(be+1);for(t=0,i=0;i<tn-1;i++)for(an[i]=t,e=0;e<1<<Xt[i];e++)Ve[t++]=i;for(Ve[t-1]=i,l=0,i=0;i<16;i++)for(dt[i]=l,e=0;e<1<<ct[i];e++)He[l++]=i;for(l>>=7;i<Se;i++)for(dt[i]=l<<7,e=0;e<1<<ct[i]-7;e++)He[256+l++]=i;for(n=0;n<=be;n++)a[n]=0;for(e=0;e<=143;)le[e*2+1]=8,e++,a[8]++;for(;e<=255;)le[e*2+1]=9,e++,a[9]++;for(;e<=279;)le[e*2+1]=7,e++,a[7]++;for(;e<=287;)le[e*2+1]=8,e++,a[8]++;for(Ii(le,je+1,a),e=0;e<Se;e++)Be[e*2+1]=5,Be[e*2]=Fi(e,5);Ti=new xt(le,Xt,We+1,je,be),Ai=new xt(Be,ct,0,Se,be),Si=new xt(new Array(0),vr,0,nn,Er)},Ri=e=>{let n;for(n=0;n<je;n++)e.dyn_ltree[n*2]=0;for(n=0;n<Se;n++)e.dyn_dtree[n*2]=0;for(n=0;n<nn;n++)e.bl_tree[n*2]=0;e.dyn_ltree[rn*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},zi=e=>{e.bi_valid>8?Xe(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},pn=(e,n,t,i)=>{const l=n*2,a=t*2;return e[l]<e[a]||e[l]===e[a]&&i[n]<=i[t]},Et=(e,n,t)=>{const i=e.heap[t];let l=t<<1;for(;l<=e.heap_len&&(l<e.heap_len&&pn(n,e.heap[l+1],e.heap[l],e.depth)&&l++,!pn(n,i,e.heap[l],e.depth));)e.heap[t]=e.heap[l],t=l,l<<=1;e.heap[t]=i},gn=(e,n,t)=>{let i,l,a=0,f,s;if(e.sym_next!==0)do i=e.pending_buf[e.sym_buf+a++]&255,i+=(e.pending_buf[e.sym_buf+a++]&255)<<8,l=e.pending_buf[e.sym_buf+a++],i===0?ne(e,l,n):(f=Ve[l],ne(e,f+We+1,n),s=Xt[f],s!==0&&(l-=an[f],K(e,l,s)),i--,f=Oi(i),ne(e,f,t),s=ct[f],s!==0&&(i-=dt[f],K(e,i,s)));while(a<e.sym_next);ne(e,rn,n)},qt=(e,n)=>{const t=n.dyn_tree,i=n.stat_desc.static_tree,l=n.stat_desc.has_stree,a=n.stat_desc.elems;let f,s,c=-1,r;for(e.heap_len=0,e.heap_max=mi,f=0;f<a;f++)t[f*2]!==0?(e.heap[++e.heap_len]=c=f,e.depth[f]=0):t[f*2+1]=0;for(;e.heap_len<2;)r=e.heap[++e.heap_len]=c<2?++c:0,t[r*2]=1,e.depth[r]=0,e.opt_len--,l&&(e.static_len-=i[r*2+1]);for(n.max_code=c,f=e.heap_len>>1;f>=1;f--)Et(e,t,f);r=a;do f=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Et(e,t,1),s=e.heap[1],e.heap[--e.heap_max]=f,e.heap[--e.heap_max]=s,t[r*2]=t[f*2]+t[s*2],e.depth[r]=(e.depth[f]>=e.depth[s]?e.depth[f]:e.depth[s])+1,t[f*2+1]=t[s*2+1]=r,e.heap[1]=r++,Et(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Tr(e,n),Ii(t,c,e.bl_count)},bn=(e,n,t)=>{let i,l=-1,a,f=n[0*2+1],s=0,c=7,r=4;for(f===0&&(c=138,r=3),n[(t+1)*2+1]=65535,i=0;i<=t;i++)a=f,f=n[(i+1)*2+1],!(++s<c&&a===f)&&(s<r?e.bl_tree[a*2]+=s:a!==0?(a!==l&&e.bl_tree[a*2]++,e.bl_tree[Ei*2]++):s<=10?e.bl_tree[vi*2]++:e.bl_tree[Ni*2]++,s=0,l=a,f===0?(c=138,r=3):a===f?(c=6,r=3):(c=7,r=4))},wn=(e,n,t)=>{let i,l=-1,a,f=n[0*2+1],s=0,c=7,r=4;for(f===0&&(c=138,r=3),i=0;i<=t;i++)if(a=f,f=n[(i+1)*2+1],!(++s<c&&a===f)){if(s<r)do ne(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==l&&(ne(e,a,e.bl_tree),s--),ne(e,Ei,e.bl_tree),K(e,s-3,2)):s<=10?(ne(e,vi,e.bl_tree),K(e,s-3,3)):(ne(e,Ni,e.bl_tree),K(e,s-11,7));s=0,l=a,f===0?(c=138,r=3):a===f?(c=6,r=3):(c=7,r=4)}},Sr=e=>{let n;for(bn(e,e.dyn_ltree,e.l_desc.max_code),bn(e,e.dyn_dtree,e.d_desc.max_code),qt(e,e.bl_desc),n=nn-1;n>=3&&e.bl_tree[ki[n]*2+1]===0;n--);return e.opt_len+=3*(n+1)+5+5+4,n},Or=(e,n,t,i)=>{let l;for(K(e,n-257,5),K(e,t-1,5),K(e,i-4,4),l=0;l<i;l++)K(e,e.bl_tree[ki[l]*2+1],3);wn(e,e.dyn_ltree,n-1),wn(e,e.dyn_dtree,t-1)},Fr=e=>{let n=4093624447,t;for(t=0;t<=31;t++,n>>>=1)if(n&1&&e.dyn_ltree[t*2]!==0)return hn;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return _n;for(t=32;t<We;t++)if(e.dyn_ltree[t*2]!==0)return _n;return hn};let yn=!1;const Ir=e=>{yn||(Ar(),yn=!0),e.l_desc=new mt(e.dyn_ltree,Ti),e.d_desc=new mt(e.dyn_dtree,Ai),e.bl_desc=new mt(e.bl_tree,Si),e.bi_buf=0,e.bi_valid=0,Ri(e)},Ci=(e,n,t,i)=>{K(e,(wr<<1)+(i?1:0),3),zi(e),Xe(e,t),Xe(e,~t),t&&e.pending_buf.set(e.window.subarray(n,n+t),e.pending),e.pending+=t},Rr=e=>{K(e,xi<<1,3),ne(e,rn,le),kr(e)},zr=(e,n,t,i)=>{let l,a,f=0;e.level>0?(e.strm.data_type===br&&(e.strm.data_type=Fr(e)),qt(e,e.l_desc),qt(e,e.d_desc),f=Sr(e),l=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=l&&(l=a)):l=a=t+5,t+4<=l&&n!==-1?Ci(e,n,t,i):e.strategy===gr||a===l?(K(e,(xi<<1)+(i?1:0),3),gn(e,le,Be)):(K(e,(yr<<1)+(i?1:0),3),Or(e,e.l_desc.max_code+1,e.d_desc.max_code+1,f+1),gn(e,e.dyn_ltree,e.dyn_dtree)),Ri(e),i&&zi(e)},Cr=(e,n,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=n,e.pending_buf[e.sym_buf+e.sym_next++]=n>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,n===0?e.dyn_ltree[t*2]++:(e.matches++,n--,e.dyn_ltree[(Ve[t]+We+1)*2]++,e.dyn_dtree[Oi(n)*2]++),e.sym_next===e.sym_end);var Lr=Ir,Pr=Ci,$r=zr,Zr=Cr,Br=Rr,Ur={_tr_init:Lr,_tr_stored_block:Pr,_tr_flush_block:$r,_tr_tally:Zr,_tr_align:Br};const Mr=(e,n,t,i)=>{let l=e&65535|0,a=e>>>16&65535|0,f=0;for(;t!==0;){f=t>2e3?2e3:t,t-=f;do l=l+n[i++]|0,a=a+l|0;while(--f);l%=65521,a%=65521}return l|a<<16|0};var qe=Mr;const jr=()=>{let e,n=[];for(var t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;n[t]=e}return n},Hr=new Uint32Array(jr()),Vr=(e,n,t,i)=>{const l=Hr,a=i+t;e^=-1;for(let f=i;f<a;f++)e=e>>>8^l[(e^n[f])&255];return e^-1};var H=Vr,xe={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Je={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Xr,_tr_stored_block:Gt,_tr_flush_block:qr,_tr_tally:_e,_tr_align:Gr}=Ur,{Z_NO_FLUSH:pe,Z_PARTIAL_FLUSH:Kr,Z_FULL_FLUSH:Yr,Z_FINISH:Q,Z_BLOCK:xn,Z_OK:V,Z_STREAM_END:mn,Z_STREAM_ERROR:ie,Z_DATA_ERROR:Wr,Z_BUF_ERROR:vt,Z_DEFAULT_COMPRESSION:Jr,Z_FILTERED:Qr,Z_HUFFMAN_ONLY:nt,Z_RLE:Dr,Z_FIXED:ea,Z_DEFAULT_STRATEGY:ta,Z_UNKNOWN:na,Z_DEFLATED:_t}=Je,ia=9,ra=15,aa=8,sa=29,oa=256,Kt=oa+1+sa,la=30,fa=19,ca=2*Kt+1,da=15,P=3,he=258,re=he+P+1,ua=32,Oe=42,sn=57,Yt=69,Wt=73,Jt=91,Qt=103,we=113,$e=666,X=1,ze=2,me=3,Ce=4,ha=3,ye=(e,n)=>(e.msg=xe[n],n),En=e=>e*2-(e>4?9:0),ue=e=>{let n=e.length;for(;--n>=0;)e[n]=0},_a=e=>{let n,t,i,l=e.w_size;n=e.hash_size,i=n;do t=e.head[--i],e.head[i]=t>=l?t-l:0;while(--n);n=l,i=n;do t=e.prev[--i],e.prev[i]=t>=l?t-l:0;while(--n)};let pa=(e,n,t)=>(n<<e.hash_shift^t)&e.hash_mask,ge=pa;const W=e=>{const n=e.state;let t=n.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+t),e.next_out),e.next_out+=t,n.pending_out+=t,e.total_out+=t,e.avail_out-=t,n.pending-=t,n.pending===0&&(n.pending_out=0))},J=(e,n)=>{qr(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,n),e.block_start=e.strstart,W(e.strm)},B=(e,n)=>{e.pending_buf[e.pending++]=n},Le=(e,n)=>{e.pending_buf[e.pending++]=n>>>8&255,e.pending_buf[e.pending++]=n&255},Dt=(e,n,t,i)=>{let l=e.avail_in;return l>i&&(l=i),l===0?0:(e.avail_in-=l,n.set(e.input.subarray(e.next_in,e.next_in+l),t),e.state.wrap===1?e.adler=qe(e.adler,n,l,t):e.state.wrap===2&&(e.adler=H(e.adler,n,l,t)),e.next_in+=l,e.total_in+=l,l)},Li=(e,n)=>{let t=e.max_chain_length,i=e.strstart,l,a,f=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-re?e.strstart-(e.w_size-re):0,r=e.window,o=e.w_mask,E=e.prev,_=e.strstart+he;let h=r[i+f-1],v=r[i+f];e.prev_length>=e.good_match&&(t>>=2),s>e.lookahead&&(s=e.lookahead);do if(l=n,!(r[l+f]!==v||r[l+f-1]!==h||r[l]!==r[i]||r[++l]!==r[i+1])){i+=2,l++;do;while(r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&i<_);if(a=he-(_-i),i=_-he,a>f){if(e.match_start=n,f=a,a>=s)break;h=r[i+f-1],v=r[i+f]}}while((n=E[n&o])>c&&--t!==0);return f<=e.lookahead?f:e.lookahead},Fe=e=>{const n=e.w_size;let t,i,l;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-re)&&(e.window.set(e.window.subarray(n,n+n-i),0),e.match_start-=n,e.strstart-=n,e.block_start-=n,e.insert>e.strstart&&(e.insert=e.strstart),_a(e),i+=n),e.strm.avail_in===0)break;if(t=Dt(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=P)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=ge(e,e.ins_h,e.window[l+1]);e.insert&&(e.ins_h=ge(e,e.ins_h,e.window[l+P-1]),e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<P)););}while(e.lookahead<re&&e.strm.avail_in!==0)},Pi=(e,n)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i,l,a,f=0,s=e.strm.avail_in;do{if(i=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,l=e.strstart-e.block_start,i>l+e.strm.avail_in&&(i=l+e.strm.avail_in),i>a&&(i=a),i<t&&(i===0&&n!==Q||n===pe||i!==l+e.strm.avail_in)))break;f=n===Q&&i===l+e.strm.avail_in?1:0,Gt(e,0,0,f),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,W(e.strm),l&&(l>i&&(l=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+l),e.strm.next_out),e.strm.next_out+=l,e.strm.avail_out-=l,e.strm.total_out+=l,e.block_start+=l,i-=l),i&&(Dt(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(f===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),f?Ce:n!==pe&&n!==Q&&e.strm.avail_in===0&&e.strstart===e.block_start?ze:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Dt(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,t=a>e.w_size?e.w_size:a,l=e.strstart-e.block_start,(l>=t||(l||n===Q)&&n!==pe&&e.strm.avail_in===0&&l<=a)&&(i=l>a?a:l,f=n===Q&&e.strm.avail_in===0&&i===l?1:0,Gt(e,e.block_start,i,f),e.block_start+=i,W(e.strm)),f?me:X)},Nt=(e,n)=>{let t,i;for(;;){if(e.lookahead<re){if(Fe(e),e.lookahead<re&&n===pe)return X;if(e.lookahead===0)break}if(t=0,e.lookahead>=P&&(e.ins_h=ge(e,e.ins_h,e.window[e.strstart+P-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-re&&(e.match_length=Li(e,t)),e.match_length>=P)if(i=_e(e,e.strstart-e.match_start,e.match_length-P),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=P){e.match_length--;do e.strstart++,e.ins_h=ge(e,e.ins_h,e.window[e.strstart+P-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ge(e,e.ins_h,e.window[e.strstart+1]);else i=_e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(J(e,!1),e.strm.avail_out===0))return X}return e.insert=e.strstart<P-1?e.strstart:P-1,n===Q?(J(e,!0),e.strm.avail_out===0?me:Ce):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?X:ze},Te=(e,n)=>{let t,i,l;for(;;){if(e.lookahead<re){if(Fe(e),e.lookahead<re&&n===pe)return X;if(e.lookahead===0)break}if(t=0,e.lookahead>=P&&(e.ins_h=ge(e,e.ins_h,e.window[e.strstart+P-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=P-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-re&&(e.match_length=Li(e,t),e.match_length<=5&&(e.strategy===Qr||e.match_length===P&&e.strstart-e.match_start>4096)&&(e.match_length=P-1)),e.prev_length>=P&&e.match_length<=e.prev_length){l=e.strstart+e.lookahead-P,i=_e(e,e.strstart-1-e.prev_match,e.prev_length-P),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=l&&(e.ins_h=ge(e,e.ins_h,e.window[e.strstart+P-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=P-1,e.strstart++,i&&(J(e,!1),e.strm.avail_out===0))return X}else if(e.match_available){if(i=_e(e,0,e.window[e.strstart-1]),i&&J(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return X}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=_e(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<P-1?e.strstart:P-1,n===Q?(J(e,!0),e.strm.avail_out===0?me:Ce):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?X:ze},ga=(e,n)=>{let t,i,l,a;const f=e.window;for(;;){if(e.lookahead<=he){if(Fe(e),e.lookahead<=he&&n===pe)return X;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=P&&e.strstart>0&&(l=e.strstart-1,i=f[l],i===f[++l]&&i===f[++l]&&i===f[++l])){a=e.strstart+he;do;while(i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&l<a);e.match_length=he-(a-l),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=P?(t=_e(e,1,e.match_length-P),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=_e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(J(e,!1),e.strm.avail_out===0))return X}return e.insert=0,n===Q?(J(e,!0),e.strm.avail_out===0?me:Ce):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?X:ze},ba=(e,n)=>{let t;for(;;){if(e.lookahead===0&&(Fe(e),e.lookahead===0)){if(n===pe)return X;break}if(e.match_length=0,t=_e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(J(e,!1),e.strm.avail_out===0))return X}return e.insert=0,n===Q?(J(e,!0),e.strm.avail_out===0?me:Ce):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?X:ze};function te(e,n,t,i,l){this.good_length=e,this.max_lazy=n,this.nice_length=t,this.max_chain=i,this.func=l}const Ze=[new te(0,0,0,0,Pi),new te(4,4,8,4,Nt),new te(4,5,16,8,Nt),new te(4,6,32,32,Nt),new te(4,4,16,16,Te),new te(8,16,32,32,Te),new te(8,16,128,128,Te),new te(8,32,128,256,Te),new te(32,128,258,1024,Te),new te(32,258,258,4096,Te)],wa=e=>{e.window_size=2*e.w_size,ue(e.head),e.max_lazy_match=Ze[e.level].max_lazy,e.good_match=Ze[e.level].good_length,e.nice_match=Ze[e.level].nice_length,e.max_chain_length=Ze[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=P-1,e.match_available=0,e.ins_h=0};function ya(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_t,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(ca*2),this.dyn_dtree=new Uint16Array((2*la+1)*2),this.bl_tree=new Uint16Array((2*fa+1)*2),ue(this.dyn_ltree),ue(this.dyn_dtree),ue(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(da+1),this.heap=new Uint16Array(2*Kt+1),ue(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Kt+1),ue(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Qe=e=>{if(!e)return 1;const n=e.state;return!n||n.strm!==e||n.status!==Oe&&n.status!==sn&&n.status!==Yt&&n.status!==Wt&&n.status!==Jt&&n.status!==Qt&&n.status!==we&&n.status!==$e?1:0},$i=e=>{if(Qe(e))return ye(e,ie);e.total_in=e.total_out=0,e.data_type=na;const n=e.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?sn:n.wrap?Oe:we,e.adler=n.wrap===2?0:1,n.last_flush=-2,Xr(n),V},Zi=e=>{const n=$i(e);return n===V&&wa(e.state),n},xa=(e,n)=>Qe(e)||e.state.wrap!==2?ie:(e.state.gzhead=n,V),Bi=(e,n,t,i,l,a)=>{if(!e)return ie;let f=1;if(n===Jr&&(n=6),i<0?(f=0,i=-i):i>15&&(f=2,i-=16),l<1||l>ia||t!==_t||i<8||i>15||n<0||n>9||a<0||a>ea||i===8&&f!==1)return ye(e,ie);i===8&&(i=9);const s=new ya;return e.state=s,s.strm=e,s.status=Oe,s.wrap=f,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=l+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+P-1)/P),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<l+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=n,s.strategy=a,s.method=t,Zi(e)},ma=(e,n)=>Bi(e,n,_t,ra,aa,ta),Ea=(e,n)=>{if(Qe(e)||n>xn||n<0)return e?ye(e,ie):ie;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===$e&&n!==Q)return ye(e,e.avail_out===0?vt:ie);const i=t.last_flush;if(t.last_flush=n,t.pending!==0){if(W(e),e.avail_out===0)return t.last_flush=-1,V}else if(e.avail_in===0&&En(n)<=En(i)&&n!==Q)return ye(e,vt);if(t.status===$e&&e.avail_in!==0)return ye(e,vt);if(t.status===Oe&&t.wrap===0&&(t.status=we),t.status===Oe){let l=_t+(t.w_bits-8<<4)<<8,a=-1;if(t.strategy>=nt||t.level<2?a=0:t.level<6?a=1:t.level===6?a=2:a=3,l|=a<<6,t.strstart!==0&&(l|=ua),l+=31-l%31,Le(t,l),t.strstart!==0&&(Le(t,e.adler>>>16),Le(t,e.adler&65535)),e.adler=1,t.status=we,W(e),t.pending!==0)return t.last_flush=-1,V}if(t.status===sn){if(e.adler=0,B(t,31),B(t,139),B(t,8),t.gzhead)B(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),B(t,t.gzhead.time&255),B(t,t.gzhead.time>>8&255),B(t,t.gzhead.time>>16&255),B(t,t.gzhead.time>>24&255),B(t,t.level===9?2:t.strategy>=nt||t.level<2?4:0),B(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(B(t,t.gzhead.extra.length&255),B(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=H(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=Yt;else if(B(t,0),B(t,0),B(t,0),B(t,0),B(t,0),B(t,t.level===9?2:t.strategy>=nt||t.level<2?4:0),B(t,ha),t.status=we,W(e),t.pending!==0)return t.last_flush=-1,V}if(t.status===Yt){if(t.gzhead.extra){let l=t.pending,a=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+a>t.pending_buf_size;){let s=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+s),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex+=s,W(e),t.pending!==0)return t.last_flush=-1,V;l=0,a-=s}let f=new Uint8Array(t.gzhead.extra);t.pending_buf.set(f.subarray(t.gzindex,t.gzindex+a),t.pending),t.pending+=a,t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=Wt}if(t.status===Wt){if(t.gzhead.name){let l=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),W(e),t.pending!==0)return t.last_flush=-1,V;l=0}t.gzindex<t.gzhead.name.length?a=t.gzhead.name.charCodeAt(t.gzindex++)&255:a=0,B(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=Jt}if(t.status===Jt){if(t.gzhead.comment){let l=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),W(e),t.pending!==0)return t.last_flush=-1,V;l=0}t.gzindex<t.gzhead.comment.length?a=t.gzhead.comment.charCodeAt(t.gzindex++)&255:a=0,B(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l))}t.status=Qt}if(t.status===Qt){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(W(e),t.pending!==0))return t.last_flush=-1,V;B(t,e.adler&255),B(t,e.adler>>8&255),e.adler=0}if(t.status=we,W(e),t.pending!==0)return t.last_flush=-1,V}if(e.avail_in!==0||t.lookahead!==0||n!==pe&&t.status!==$e){let l=t.level===0?Pi(t,n):t.strategy===nt?ba(t,n):t.strategy===Dr?ga(t,n):Ze[t.level].func(t,n);if((l===me||l===Ce)&&(t.status=$e),l===X||l===me)return e.avail_out===0&&(t.last_flush=-1),V;if(l===ze&&(n===Kr?Gr(t):n!==xn&&(Gt(t,0,0,!1),n===Yr&&(ue(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),W(e),e.avail_out===0))return t.last_flush=-1,V}return n!==Q?V:t.wrap<=0?mn:(t.wrap===2?(B(t,e.adler&255),B(t,e.adler>>8&255),B(t,e.adler>>16&255),B(t,e.adler>>24&255),B(t,e.total_in&255),B(t,e.total_in>>8&255),B(t,e.total_in>>16&255),B(t,e.total_in>>24&255)):(Le(t,e.adler>>>16),Le(t,e.adler&65535)),W(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?V:mn)},va=e=>{if(Qe(e))return ie;const n=e.state.status;return e.state=null,n===we?ye(e,Wr):V},Na=(e,n)=>{let t=n.length;if(Qe(e))return ie;const i=e.state,l=i.wrap;if(l===2||l===1&&i.status!==Oe||i.lookahead)return ie;if(l===1&&(e.adler=qe(e.adler,n,t,0)),i.wrap=0,t>=i.w_size){l===0&&(ue(i.head),i.strstart=0,i.block_start=0,i.insert=0);let c=new Uint8Array(i.w_size);c.set(n.subarray(t-i.w_size,t),0),n=c,t=i.w_size}const a=e.avail_in,f=e.next_in,s=e.input;for(e.avail_in=t,e.next_in=0,e.input=n,Fe(i);i.lookahead>=P;){let c=i.strstart,r=i.lookahead-(P-1);do i.ins_h=ge(i,i.ins_h,i.window[c+P-1]),i.prev[c&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=c,c++;while(--r);i.strstart=c,i.lookahead=P-1,Fe(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=P-1,i.match_available=0,e.next_in=f,e.input=s,e.avail_in=a,i.wrap=l,V};var ka=ma,Ta=Bi,Aa=Zi,Sa=$i,Oa=xa,Fa=Ea,Ia=va,Ra=Na,za="pako deflate (from Nodeca project)",Ue={deflateInit:ka,deflateInit2:Ta,deflateReset:Aa,deflateResetKeep:Sa,deflateSetHeader:Oa,deflate:Fa,deflateEnd:Ia,deflateSetDictionary:Ra,deflateInfo:za};const Ca=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var La=function(e){const n=Array.prototype.slice.call(arguments,1);for(;n.length;){const t=n.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)Ca(t,i)&&(e[i]=t[i])}}return e},Pa=e=>{let n=0;for(let i=0,l=e.length;i<l;i++)n+=e[i].length;const t=new Uint8Array(n);for(let i=0,l=0,a=e.length;i<a;i++){let f=e[i];t.set(f,l),l+=f.length}return t},pt={assign:La,flattenChunks:Pa};let Ui=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ui=!1}const Ge=new Uint8Array(256);for(let e=0;e<256;e++)Ge[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Ge[254]=Ge[254]=1;var $a=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let n,t,i,l,a,f=e.length,s=0;for(l=0;l<f;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<f&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(n=new Uint8Array(s),a=0,l=0;a<s;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<f&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),t<128?n[a++]=t:t<2048?(n[a++]=192|t>>>6,n[a++]=128|t&63):t<65536?(n[a++]=224|t>>>12,n[a++]=128|t>>>6&63,n[a++]=128|t&63):(n[a++]=240|t>>>18,n[a++]=128|t>>>12&63,n[a++]=128|t>>>6&63,n[a++]=128|t&63);return n};const Za=(e,n)=>{if(n<65534&&e.subarray&&Ui)return String.fromCharCode.apply(null,e.length===n?e:e.subarray(0,n));let t="";for(let i=0;i<n;i++)t+=String.fromCharCode(e[i]);return t};var Ba=(e,n)=>{const t=n||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,n));let i,l;const a=new Array(t*2);for(l=0,i=0;i<t;){let f=e[i++];if(f<128){a[l++]=f;continue}let s=Ge[f];if(s>4){a[l++]=65533,i+=s-1;continue}for(f&=s===2?31:s===3?15:7;s>1&&i<t;)f=f<<6|e[i++]&63,s--;if(s>1){a[l++]=65533;continue}f<65536?a[l++]=f:(f-=65536,a[l++]=55296|f>>10&1023,a[l++]=56320|f&1023)}return Za(a,l)},Ua=(e,n)=>{n=n||e.length,n>e.length&&(n=e.length);let t=n-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?n:t+Ge[e[t]]>n?t:n},Ke={string2buf:$a,buf2string:Ba,utf8border:Ua};function Ma(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Mi=Ma;const ji=Object.prototype.toString,{Z_NO_FLUSH:ja,Z_SYNC_FLUSH:Ha,Z_FULL_FLUSH:Va,Z_FINISH:Xa,Z_OK:ut,Z_STREAM_END:qa,Z_DEFAULT_COMPRESSION:Ga,Z_DEFAULT_STRATEGY:Ka,Z_DEFLATED:Ya}=Je;function De(e){this.options=pt.assign({level:Ga,method:Ya,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ka},e||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Mi,this.strm.avail_out=0;let t=Ue.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(t!==ut)throw new Error(xe[t]);if(n.header&&Ue.deflateSetHeader(this.strm,n.header),n.dictionary){let i;if(typeof n.dictionary=="string"?i=Ke.string2buf(n.dictionary):ji.call(n.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(n.dictionary):i=n.dictionary,t=Ue.deflateSetDictionary(this.strm,i),t!==ut)throw new Error(xe[t]);this._dict_set=!0}}De.prototype.push=function(e,n){const t=this.strm,i=this.options.chunkSize;let l,a;if(this.ended)return!1;for(n===~~n?a=n:a=n===!0?Xa:ja,typeof e=="string"?t.input=Ke.string2buf(e):ji.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(a===Ha||a===Va)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(l=Ue.deflate(t,a),l===qa)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),l=Ue.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===ut;if(t.avail_out===0){this.onData(t.output);continue}if(a>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0};De.prototype.onData=function(e){this.chunks.push(e)};De.prototype.onEnd=function(e){e===ut&&(this.result=pt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function on(e,n){const t=new De(n);if(t.push(e,!0),t.err)throw t.msg||xe[t.err];return t.result}function Wa(e,n){return n=n||{},n.raw=!0,on(e,n)}function Ja(e,n){return n=n||{},n.gzip=!0,on(e,n)}var Qa=De,Da=on,es=Wa,ts=Ja,ns={Deflate:Qa,deflate:Da,deflateRaw:es,gzip:ts};const it=16209,is=16191;var rs=function(n,t){let i,l,a,f,s,c,r,o,E,_,h,v,T,I,d,g,N,k,u,p,b,A,y,m;const O=n.state;i=n.next_in,y=n.input,l=i+(n.avail_in-5),a=n.next_out,m=n.output,f=a-(t-n.avail_out),s=a+(n.avail_out-257),c=O.dmax,r=O.wsize,o=O.whave,E=O.wnext,_=O.window,h=O.hold,v=O.bits,T=O.lencode,I=O.distcode,d=(1<<O.lenbits)-1,g=(1<<O.distbits)-1;e:do{v<15&&(h+=y[i++]<<v,v+=8,h+=y[i++]<<v,v+=8),N=T[h&d];t:for(;;){if(k=N>>>24,h>>>=k,v-=k,k=N>>>16&255,k===0)m[a++]=N&65535;else if(k&16){u=N&65535,k&=15,k&&(v<k&&(h+=y[i++]<<v,v+=8),u+=h&(1<<k)-1,h>>>=k,v-=k),v<15&&(h+=y[i++]<<v,v+=8,h+=y[i++]<<v,v+=8),N=I[h&g];n:for(;;){if(k=N>>>24,h>>>=k,v-=k,k=N>>>16&255,k&16){if(p=N&65535,k&=15,v<k&&(h+=y[i++]<<v,v+=8,v<k&&(h+=y[i++]<<v,v+=8)),p+=h&(1<<k)-1,p>c){n.msg="invalid distance too far back",O.mode=it;break e}if(h>>>=k,v-=k,k=a-f,p>k){if(k=p-k,k>o&&O.sane){n.msg="invalid distance too far back",O.mode=it;break e}if(b=0,A=_,E===0){if(b+=r-k,k<u){u-=k;do m[a++]=_[b++];while(--k);b=a-p,A=m}}else if(E<k){if(b+=r+E-k,k-=E,k<u){u-=k;do m[a++]=_[b++];while(--k);if(b=0,E<u){k=E,u-=k;do m[a++]=_[b++];while(--k);b=a-p,A=m}}}else if(b+=E-k,k<u){u-=k;do m[a++]=_[b++];while(--k);b=a-p,A=m}for(;u>2;)m[a++]=A[b++],m[a++]=A[b++],m[a++]=A[b++],u-=3;u&&(m[a++]=A[b++],u>1&&(m[a++]=A[b++]))}else{b=a-p;do m[a++]=m[b++],m[a++]=m[b++],m[a++]=m[b++],u-=3;while(u>2);u&&(m[a++]=m[b++],u>1&&(m[a++]=m[b++]))}}else if((k&64)===0){N=I[(N&65535)+(h&(1<<k)-1)];continue n}else{n.msg="invalid distance code",O.mode=it;break e}break}}else if((k&64)===0){N=T[(N&65535)+(h&(1<<k)-1)];continue t}else if(k&32){O.mode=is;break e}else{n.msg="invalid literal/length code",O.mode=it;break e}break}}while(i<l&&a<s);u=v>>3,i-=u,v-=u<<3,h&=(1<<v)-1,n.next_in=i,n.next_out=a,n.avail_in=i<l?5+(l-i):5-(i-l),n.avail_out=a<s?257+(s-a):257-(a-s),O.hold=h,O.bits=v};const Ae=15,vn=852,Nn=592,kn=0,kt=1,Tn=2,as=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ss=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),os=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ls=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),fs=(e,n,t,i,l,a,f,s)=>{const c=s.bits;let r=0,o=0,E=0,_=0,h=0,v=0,T=0,I=0,d=0,g=0,N,k,u,p,b,A=null,y;const m=new Uint16Array(Ae+1),O=new Uint16Array(Ae+1);let w=null,x,S,F;for(r=0;r<=Ae;r++)m[r]=0;for(o=0;o<i;o++)m[n[t+o]]++;for(h=c,_=Ae;_>=1&&m[_]===0;_--);if(h>_&&(h=_),_===0)return l[a++]=1<<24|64<<16|0,l[a++]=1<<24|64<<16|0,s.bits=1,0;for(E=1;E<_&&m[E]===0;E++);for(h<E&&(h=E),I=1,r=1;r<=Ae;r++)if(I<<=1,I-=m[r],I<0)return-1;if(I>0&&(e===kn||_!==1))return-1;for(O[1]=0,r=1;r<Ae;r++)O[r+1]=O[r]+m[r];for(o=0;o<i;o++)n[t+o]!==0&&(f[O[n[t+o]]++]=o);if(e===kn?(A=w=f,y=20):e===kt?(A=as,w=ss,y=257):(A=os,w=ls,y=0),g=0,o=0,r=E,b=a,v=h,T=0,u=-1,d=1<<h,p=d-1,e===kt&&d>vn||e===Tn&&d>Nn)return 1;for(;;){x=r-T,f[o]+1<y?(S=0,F=f[o]):f[o]>=y?(S=w[f[o]-y],F=A[f[o]-y]):(S=96,F=0),N=1<<r-T,k=1<<v,E=k;do k-=N,l[b+(g>>T)+k]=x<<24|S<<16|F|0;while(k!==0);for(N=1<<r-1;g&N;)N>>=1;if(N!==0?(g&=N-1,g+=N):g=0,o++,--m[r]===0){if(r===_)break;r=n[t+f[o]]}if(r>h&&(g&p)!==u){for(T===0&&(T=h),b+=E,v=r-T,I=1<<v;v+T<_&&(I-=m[v+T],!(I<=0));)v++,I<<=1;if(d+=1<<v,e===kt&&d>vn||e===Tn&&d>Nn)return 1;u=g&p,l[u]=h<<24|v<<16|b-a|0}}return g!==0&&(l[b+g]=r-T<<24|64<<16|0),s.bits=h,0};var Me=fs;const cs=0,Hi=1,Vi=2,{Z_FINISH:An,Z_BLOCK:ds,Z_TREES:rt,Z_OK:Ee,Z_STREAM_END:us,Z_NEED_DICT:hs,Z_STREAM_ERROR:D,Z_DATA_ERROR:Xi,Z_MEM_ERROR:qi,Z_BUF_ERROR:_s,Z_DEFLATED:Sn}=Je,gt=16180,On=16181,Fn=16182,In=16183,Rn=16184,zn=16185,Cn=16186,Ln=16187,Pn=16188,$n=16189,ht=16190,oe=16191,Tt=16192,Zn=16193,At=16194,Bn=16195,Un=16196,Mn=16197,jn=16198,at=16199,st=16200,Hn=16201,Vn=16202,Xn=16203,qn=16204,Gn=16205,St=16206,Kn=16207,Yn=16208,j=16209,Gi=16210,Ki=16211,ps=852,gs=592,bs=15,ws=bs,Wn=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function ys(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ve=e=>{if(!e)return 1;const n=e.state;return!n||n.strm!==e||n.mode<gt||n.mode>Ki?1:0},Yi=e=>{if(ve(e))return D;const n=e.state;return e.total_in=e.total_out=n.total=0,e.msg="",n.wrap&&(e.adler=n.wrap&1),n.mode=gt,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(ps),n.distcode=n.distdyn=new Int32Array(gs),n.sane=1,n.back=-1,Ee},Wi=e=>{if(ve(e))return D;const n=e.state;return n.wsize=0,n.whave=0,n.wnext=0,Yi(e)},Ji=(e,n)=>{let t;if(ve(e))return D;const i=e.state;return n<0?(t=0,n=-n):(t=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?D:(i.window!==null&&i.wbits!==n&&(i.window=null),i.wrap=t,i.wbits=n,Wi(e))},Qi=(e,n)=>{if(!e)return D;const t=new ys;e.state=t,t.strm=e,t.window=null,t.mode=gt;const i=Ji(e,n);return i!==Ee&&(e.state=null),i},xs=e=>Qi(e,ws);let Jn=!0,Ot,Ft;const ms=e=>{if(Jn){Ot=new Int32Array(512),Ft=new Int32Array(32);let n=0;for(;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(Me(Hi,e.lens,0,288,Ot,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;Me(Vi,e.lens,0,32,Ft,0,e.work,{bits:5}),Jn=!1}e.lencode=Ot,e.lenbits=9,e.distcode=Ft,e.distbits=5},Di=(e,n,t,i)=>{let l;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),i>=a.wsize?(a.window.set(n.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(l=a.wsize-a.wnext,l>i&&(l=i),a.window.set(n.subarray(t-i,t-i+l),a.wnext),i-=l,i?(a.window.set(n.subarray(t-i,t),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=l,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=l))),0},Es=(e,n)=>{let t,i,l,a,f,s,c,r,o,E,_,h,v,T,I=0,d,g,N,k,u,p,b,A;const y=new Uint8Array(4);let m,O;const w=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ve(e)||!e.output||!e.input&&e.avail_in!==0)return D;t=e.state,t.mode===oe&&(t.mode=Tt),f=e.next_out,l=e.output,c=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,r=t.hold,o=t.bits,E=s,_=c,A=Ee;e:for(;;)switch(t.mode){case gt:if(t.wrap===0){t.mode=Tt;break}for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.wrap&2&&r===35615){t.wbits===0&&(t.wbits=15),t.check=0,y[0]=r&255,y[1]=r>>>8&255,t.check=H(t.check,y,2,0),r=0,o=0,t.mode=On;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((r&255)<<8)+(r>>8))%31){e.msg="incorrect header check",t.mode=j;break}if((r&15)!==Sn){e.msg="unknown compression method",t.mode=j;break}if(r>>>=4,o-=4,b=(r&15)+8,t.wbits===0&&(t.wbits=b),b>15||b>t.wbits){e.msg="invalid window size",t.mode=j;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=r&512?$n:oe,r=0,o=0;break;case On:for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.flags=r,(t.flags&255)!==Sn){e.msg="unknown compression method",t.mode=j;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=j;break}t.head&&(t.head.text=r>>8&1),t.flags&512&&t.wrap&4&&(y[0]=r&255,y[1]=r>>>8&255,t.check=H(t.check,y,2,0)),r=0,o=0,t.mode=Fn;case Fn:for(;o<32;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.head&&(t.head.time=r),t.flags&512&&t.wrap&4&&(y[0]=r&255,y[1]=r>>>8&255,y[2]=r>>>16&255,y[3]=r>>>24&255,t.check=H(t.check,y,4,0)),r=0,o=0,t.mode=In;case In:for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.head&&(t.head.xflags=r&255,t.head.os=r>>8),t.flags&512&&t.wrap&4&&(y[0]=r&255,y[1]=r>>>8&255,t.check=H(t.check,y,2,0)),r=0,o=0,t.mode=Rn;case Rn:if(t.flags&1024){for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.length=r,t.head&&(t.head.extra_len=r),t.flags&512&&t.wrap&4&&(y[0]=r&255,y[1]=r>>>8&255,t.check=H(t.check,y,2,0)),r=0,o=0}else t.head&&(t.head.extra=null);t.mode=zn;case zn:if(t.flags&1024&&(h=t.length,h>s&&(h=s),h&&(t.head&&(b=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(a,a+h),b)),t.flags&512&&t.wrap&4&&(t.check=H(t.check,i,h,a)),s-=h,a+=h,t.length-=h),t.length))break e;t.length=0,t.mode=Cn;case Cn:if(t.flags&2048){if(s===0)break e;h=0;do b=i[a+h++],t.head&&b&&t.length<65536&&(t.head.name+=String.fromCharCode(b));while(b&&h<s);if(t.flags&512&&t.wrap&4&&(t.check=H(t.check,i,h,a)),s-=h,a+=h,b)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=Ln;case Ln:if(t.flags&4096){if(s===0)break e;h=0;do b=i[a+h++],t.head&&b&&t.length<65536&&(t.head.comment+=String.fromCharCode(b));while(b&&h<s);if(t.flags&512&&t.wrap&4&&(t.check=H(t.check,i,h,a)),s-=h,a+=h,b)break e}else t.head&&(t.head.comment=null);t.mode=Pn;case Pn:if(t.flags&512){for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.wrap&4&&r!==(t.check&65535)){e.msg="header crc mismatch",t.mode=j;break}r=0,o=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=oe;break;case $n:for(;o<32;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}e.adler=t.check=Wn(r),r=0,o=0,t.mode=ht;case ht:if(t.havedict===0)return e.next_out=f,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=r,t.bits=o,hs;e.adler=t.check=1,t.mode=oe;case oe:if(n===ds||n===rt)break e;case Tt:if(t.last){r>>>=o&7,o-=o&7,t.mode=St;break}for(;o<3;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}switch(t.last=r&1,r>>>=1,o-=1,r&3){case 0:t.mode=Zn;break;case 1:if(ms(t),t.mode=at,n===rt){r>>>=2,o-=2;break e}break;case 2:t.mode=Un;break;case 3:e.msg="invalid block type",t.mode=j}r>>>=2,o-=2;break;case Zn:for(r>>>=o&7,o-=o&7;o<32;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if((r&65535)!==(r>>>16^65535)){e.msg="invalid stored block lengths",t.mode=j;break}if(t.length=r&65535,r=0,o=0,t.mode=At,n===rt)break e;case At:t.mode=Bn;case Bn:if(h=t.length,h){if(h>s&&(h=s),h>c&&(h=c),h===0)break e;l.set(i.subarray(a,a+h),f),s-=h,a+=h,c-=h,f+=h,t.length-=h;break}t.mode=oe;break;case Un:for(;o<14;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.nlen=(r&31)+257,r>>>=5,o-=5,t.ndist=(r&31)+1,r>>>=5,o-=5,t.ncode=(r&15)+4,r>>>=4,o-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=j;break}t.have=0,t.mode=Mn;case Mn:for(;t.have<t.ncode;){for(;o<3;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.lens[w[t.have++]]=r&7,r>>>=3,o-=3}for(;t.have<19;)t.lens[w[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,m={bits:t.lenbits},A=Me(cs,t.lens,0,19,t.lencode,0,t.work,m),t.lenbits=m.bits,A){e.msg="invalid code lengths set",t.mode=j;break}t.have=0,t.mode=jn;case jn:for(;t.have<t.nlen+t.ndist;){for(;I=t.lencode[r&(1<<t.lenbits)-1],d=I>>>24,g=I>>>16&255,N=I&65535,!(d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(N<16)r>>>=d,o-=d,t.lens[t.have++]=N;else{if(N===16){for(O=d+2;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(r>>>=d,o-=d,t.have===0){e.msg="invalid bit length repeat",t.mode=j;break}b=t.lens[t.have-1],h=3+(r&3),r>>>=2,o-=2}else if(N===17){for(O=d+3;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}r>>>=d,o-=d,b=0,h=3+(r&7),r>>>=3,o-=3}else{for(O=d+7;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}r>>>=d,o-=d,b=0,h=11+(r&127),r>>>=7,o-=7}if(t.have+h>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=j;break}for(;h--;)t.lens[t.have++]=b}}if(t.mode===j)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=j;break}if(t.lenbits=9,m={bits:t.lenbits},A=Me(Hi,t.lens,0,t.nlen,t.lencode,0,t.work,m),t.lenbits=m.bits,A){e.msg="invalid literal/lengths set",t.mode=j;break}if(t.distbits=6,t.distcode=t.distdyn,m={bits:t.distbits},A=Me(Vi,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,m),t.distbits=m.bits,A){e.msg="invalid distances set",t.mode=j;break}if(t.mode=at,n===rt)break e;case at:t.mode=st;case st:if(s>=6&&c>=258){e.next_out=f,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=r,t.bits=o,rs(e,_),f=e.next_out,l=e.output,c=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,r=t.hold,o=t.bits,t.mode===oe&&(t.back=-1);break}for(t.back=0;I=t.lencode[r&(1<<t.lenbits)-1],d=I>>>24,g=I>>>16&255,N=I&65535,!(d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(g&&(g&240)===0){for(k=d,u=g,p=N;I=t.lencode[p+((r&(1<<k+u)-1)>>k)],d=I>>>24,g=I>>>16&255,N=I&65535,!(k+d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}r>>>=k,o-=k,t.back+=k}if(r>>>=d,o-=d,t.back+=d,t.length=N,g===0){t.mode=Gn;break}if(g&32){t.back=-1,t.mode=oe;break}if(g&64){e.msg="invalid literal/length code",t.mode=j;break}t.extra=g&15,t.mode=Hn;case Hn:if(t.extra){for(O=t.extra;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.length+=r&(1<<t.extra)-1,r>>>=t.extra,o-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=Vn;case Vn:for(;I=t.distcode[r&(1<<t.distbits)-1],d=I>>>24,g=I>>>16&255,N=I&65535,!(d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if((g&240)===0){for(k=d,u=g,p=N;I=t.distcode[p+((r&(1<<k+u)-1)>>k)],d=I>>>24,g=I>>>16&255,N=I&65535,!(k+d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}r>>>=k,o-=k,t.back+=k}if(r>>>=d,o-=d,t.back+=d,g&64){e.msg="invalid distance code",t.mode=j;break}t.offset=N,t.extra=g&15,t.mode=Xn;case Xn:if(t.extra){for(O=t.extra;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.offset+=r&(1<<t.extra)-1,r>>>=t.extra,o-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=j;break}t.mode=qn;case qn:if(c===0)break e;if(h=_-c,t.offset>h){if(h=t.offset-h,h>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=j;break}h>t.wnext?(h-=t.wnext,v=t.wsize-h):v=t.wnext-h,h>t.length&&(h=t.length),T=t.window}else T=l,v=f-t.offset,h=t.length;h>c&&(h=c),c-=h,t.length-=h;do l[f++]=T[v++];while(--h);t.length===0&&(t.mode=st);break;case Gn:if(c===0)break e;l[f++]=t.length,c--,t.mode=st;break;case St:if(t.wrap){for(;o<32;){if(s===0)break e;s--,r|=i[a++]<<o,o+=8}if(_-=c,e.total_out+=_,t.total+=_,t.wrap&4&&_&&(e.adler=t.check=t.flags?H(t.check,l,_,f-_):qe(t.check,l,_,f-_)),_=c,t.wrap&4&&(t.flags?r:Wn(r))!==t.check){e.msg="incorrect data check",t.mode=j;break}r=0,o=0}t.mode=Kn;case Kn:if(t.wrap&&t.flags){for(;o<32;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.wrap&4&&r!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=j;break}r=0,o=0}t.mode=Yn;case Yn:A=us;break e;case j:A=Xi;break e;case Gi:return qi;case Ki:default:return D}return e.next_out=f,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=r,t.bits=o,(t.wsize||_!==e.avail_out&&t.mode<j&&(t.mode<St||n!==An))&&Di(e,e.output,e.next_out,_-e.avail_out),E-=e.avail_in,_-=e.avail_out,e.total_in+=E,e.total_out+=_,t.total+=_,t.wrap&4&&_&&(e.adler=t.check=t.flags?H(t.check,l,_,e.next_out-_):qe(t.check,l,_,e.next_out-_)),e.data_type=t.bits+(t.last?64:0)+(t.mode===oe?128:0)+(t.mode===at||t.mode===At?256:0),(E===0&&_===0||n===An)&&A===Ee&&(A=_s),A},vs=e=>{if(ve(e))return D;let n=e.state;return n.window&&(n.window=null),e.state=null,Ee},Ns=(e,n)=>{if(ve(e))return D;const t=e.state;return(t.wrap&2)===0?D:(t.head=n,n.done=!1,Ee)},ks=(e,n)=>{const t=n.length;let i,l,a;return ve(e)||(i=e.state,i.wrap!==0&&i.mode!==ht)?D:i.mode===ht&&(l=1,l=qe(l,n,t,0),l!==i.check)?Xi:(a=Di(e,n,t,t),a?(i.mode=Gi,qi):(i.havedict=1,Ee))};var Ts=Wi,As=Ji,Ss=Yi,Os=xs,Fs=Qi,Is=Es,Rs=vs,zs=Ns,Cs=ks,Ls="pako inflate (from Nodeca project)",fe={inflateReset:Ts,inflateReset2:As,inflateResetKeep:Ss,inflateInit:Os,inflateInit2:Fs,inflate:Is,inflateEnd:Rs,inflateGetHeader:zs,inflateSetDictionary:Cs,inflateInfo:Ls};function Ps(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var $s=Ps;const er=Object.prototype.toString,{Z_NO_FLUSH:Zs,Z_FINISH:Bs,Z_OK:Ye,Z_STREAM_END:It,Z_NEED_DICT:Rt,Z_STREAM_ERROR:Us,Z_DATA_ERROR:Qn,Z_MEM_ERROR:Ms}=Je;function et(e){this.options=pt.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Mi,this.strm.avail_out=0;let t=fe.inflateInit2(this.strm,n.windowBits);if(t!==Ye)throw new Error(xe[t]);if(this.header=new $s,fe.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=Ke.string2buf(n.dictionary):er.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(t=fe.inflateSetDictionary(this.strm,n.dictionary),t!==Ye)))throw new Error(xe[t])}et.prototype.push=function(e,n){const t=this.strm,i=this.options.chunkSize,l=this.options.dictionary;let a,f,s;if(this.ended)return!1;for(n===~~n?f=n:f=n===!0?Bs:Zs,er.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),a=fe.inflate(t,f),a===Rt&&l&&(a=fe.inflateSetDictionary(t,l),a===Ye?a=fe.inflate(t,f):a===Qn&&(a=Rt));t.avail_in>0&&a===It&&t.state.wrap>0&&e[t.next_in]!==0;)fe.inflateReset(t),a=fe.inflate(t,f);switch(a){case Us:case Qn:case Rt:case Ms:return this.onEnd(a),this.ended=!0,!1}if(s=t.avail_out,t.next_out&&(t.avail_out===0||a===It))if(this.options.to==="string"){let c=Ke.utf8border(t.output,t.next_out),r=t.next_out-c,o=Ke.buf2string(t.output,c);t.next_out=r,t.avail_out=i-r,r&&t.output.set(t.output.subarray(c,c+r),0),this.onData(o)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(a===Ye&&s===0)){if(a===It)return a=fe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};et.prototype.onData=function(e){this.chunks.push(e)};et.prototype.onEnd=function(e){e===Ye&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=pt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ln(e,n){const t=new et(n);if(t.push(e),t.err)throw t.msg||xe[t.err];return t.result}function js(e,n){return n=n||{},n.raw=!0,ln(e,n)}var Hs=et,Vs=ln,Xs=js,qs=ln,Gs={Inflate:Hs,inflate:Vs,inflateRaw:Xs,ungzip:qs};const{Deflate:Ks,deflate:Ys,deflateRaw:Ws,gzip:Js}=ns,{Inflate:Qs,inflate:Ds,inflateRaw:eo,ungzip:to}=Gs;var no=Ks,io=Ys,ro=Ws,ao=Js,so=Qs,oo=Ds,lo=eo,fo=to,co=Je,uo={Deflate:no,deflate:io,deflateRaw:ro,gzip:ao,Inflate:so,inflate:oo,inflateRaw:lo,ungzip:fo,constants:co},ot={exports:{}},zt={},Ct={},Dn;function fn(){return Dn||(Dn=1,function(e){const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i="["+n+"]["+t+"]*",l=new RegExp("^"+i+"$"),a=function(s,c){const r=[];let o=c.exec(s);for(;o;){const E=[];E.startIndex=c.lastIndex-o[0].length;const _=o.length;for(let h=0;h<_;h++)E.push(o[h]);r.push(E),o=c.exec(s)}return r},f=function(s){const c=l.exec(s);return!(c===null||typeof c>"u")};e.isExist=function(s){return typeof s<"u"},e.isEmptyObject=function(s){return Object.keys(s).length===0},e.merge=function(s,c,r){if(c){const o=Object.keys(c),E=o.length;for(let _=0;_<E;_++)r==="strict"?s[o[_]]=[c[o[_]]]:s[o[_]]=c[o[_]]}},e.getValue=function(s){return e.isExist(s)?s:""},e.isName=f,e.getAllMatches=a,e.nameRegexp=i}(Ct)),Ct}var ei;function tr(){if(ei)return zt;ei=1;const e=fn(),n={allowBooleanAttributes:!1,unpairedTags:[]};zt.validate=function(d,g){g=Object.assign({},n,g);const N=[];let k=!1,u=!1;d[0]==="\uFEFF"&&(d=d.substr(1));for(let p=0;p<d.length;p++)if(d[p]==="<"&&d[p+1]==="?"){if(p+=2,p=i(d,p),p.err)return p}else if(d[p]==="<"){let b=p;if(p++,d[p]==="!"){p=l(d,p);continue}else{let A=!1;d[p]==="/"&&(A=!0,p++);let y="";for(;p<d.length&&d[p]!==">"&&d[p]!==" "&&d[p]!==" "&&d[p]!==`
|
|
1
|
+
import{j as U,ax as rr,ak as en,f as ar}from"./vendor-mui-core-CKKG_1TN.js";import{g as bi,d as sr,h as or,f as un,r as L}from"./vendor-react-CTtPmzVP.js";import{A as wi,ag as lr,e as fr,n as cr,K as yi}from"./vendor-utils-CUs2ebe7.js";import{l as Ie,bs as dr,bt as ur,ab as hr}from"./vendor-ux-DjXlxcvL.js";import{aH as _r}from"./index-DI4CWTXR.js";import{l as pr}from"./vendor-hooks-DQAdyHrE.js";/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const gr=4,hn=0,_n=1,br=2;function Re(e){let n=e.length;for(;--n>=0;)e[n]=0}const wr=0,xi=1,yr=2,xr=3,mr=258,tn=29,We=256,je=We+1+tn,Se=30,nn=19,mi=2*je+1,be=15,yt=16,Er=7,rn=256,Ei=16,vi=17,Ni=18,Xt=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ct=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),vr=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ki=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Nr=512,le=new Array((je+2)*2);Re(le);const Be=new Array(Se*2);Re(Be);const He=new Array(Nr);Re(He);const Ve=new Array(mr-xr+1);Re(Ve);const an=new Array(tn);Re(an);const dt=new Array(Se);Re(dt);function xt(e,n,t,i,l){this.static_tree=e,this.extra_bits=n,this.extra_base=t,this.elems=i,this.max_length=l,this.has_stree=e&&e.length}let Ti,Ai,Si;function mt(e,n){this.dyn_tree=e,this.max_code=0,this.stat_desc=n}const Oi=e=>e<256?He[e]:He[256+(e>>>7)],Xe=(e,n)=>{e.pending_buf[e.pending++]=n&255,e.pending_buf[e.pending++]=n>>>8&255},K=(e,n,t)=>{e.bi_valid>yt-t?(e.bi_buf|=n<<e.bi_valid&65535,Xe(e,e.bi_buf),e.bi_buf=n>>yt-e.bi_valid,e.bi_valid+=t-yt):(e.bi_buf|=n<<e.bi_valid&65535,e.bi_valid+=t)},ne=(e,n,t)=>{K(e,t[n*2],t[n*2+1])},Fi=(e,n)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--n>0);return t>>>1},kr=e=>{e.bi_valid===16?(Xe(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},Tr=(e,n)=>{const t=n.dyn_tree,i=n.max_code,l=n.stat_desc.static_tree,a=n.stat_desc.has_stree,f=n.stat_desc.extra_bits,s=n.stat_desc.extra_base,c=n.stat_desc.max_length;let r,o,E,_,h,v,T=0;for(_=0;_<=be;_++)e.bl_count[_]=0;for(t[e.heap[e.heap_max]*2+1]=0,r=e.heap_max+1;r<mi;r++)o=e.heap[r],_=t[t[o*2+1]*2+1]+1,_>c&&(_=c,T++),t[o*2+1]=_,!(o>i)&&(e.bl_count[_]++,h=0,o>=s&&(h=f[o-s]),v=t[o*2],e.opt_len+=v*(_+h),a&&(e.static_len+=v*(l[o*2+1]+h)));if(T!==0){do{for(_=c-1;e.bl_count[_]===0;)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[c]--,T-=2}while(T>0);for(_=c;_!==0;_--)for(o=e.bl_count[_];o!==0;)E=e.heap[--r],!(E>i)&&(t[E*2+1]!==_&&(e.opt_len+=(_-t[E*2+1])*t[E*2],t[E*2+1]=_),o--)}},Ii=(e,n,t)=>{const i=new Array(be+1);let l=0,a,f;for(a=1;a<=be;a++)l=l+t[a-1]<<1,i[a]=l;for(f=0;f<=n;f++){let s=e[f*2+1];s!==0&&(e[f*2]=Fi(i[s]++,s))}},Ar=()=>{let e,n,t,i,l;const a=new Array(be+1);for(t=0,i=0;i<tn-1;i++)for(an[i]=t,e=0;e<1<<Xt[i];e++)Ve[t++]=i;for(Ve[t-1]=i,l=0,i=0;i<16;i++)for(dt[i]=l,e=0;e<1<<ct[i];e++)He[l++]=i;for(l>>=7;i<Se;i++)for(dt[i]=l<<7,e=0;e<1<<ct[i]-7;e++)He[256+l++]=i;for(n=0;n<=be;n++)a[n]=0;for(e=0;e<=143;)le[e*2+1]=8,e++,a[8]++;for(;e<=255;)le[e*2+1]=9,e++,a[9]++;for(;e<=279;)le[e*2+1]=7,e++,a[7]++;for(;e<=287;)le[e*2+1]=8,e++,a[8]++;for(Ii(le,je+1,a),e=0;e<Se;e++)Be[e*2+1]=5,Be[e*2]=Fi(e,5);Ti=new xt(le,Xt,We+1,je,be),Ai=new xt(Be,ct,0,Se,be),Si=new xt(new Array(0),vr,0,nn,Er)},Ri=e=>{let n;for(n=0;n<je;n++)e.dyn_ltree[n*2]=0;for(n=0;n<Se;n++)e.dyn_dtree[n*2]=0;for(n=0;n<nn;n++)e.bl_tree[n*2]=0;e.dyn_ltree[rn*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},zi=e=>{e.bi_valid>8?Xe(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},pn=(e,n,t,i)=>{const l=n*2,a=t*2;return e[l]<e[a]||e[l]===e[a]&&i[n]<=i[t]},Et=(e,n,t)=>{const i=e.heap[t];let l=t<<1;for(;l<=e.heap_len&&(l<e.heap_len&&pn(n,e.heap[l+1],e.heap[l],e.depth)&&l++,!pn(n,i,e.heap[l],e.depth));)e.heap[t]=e.heap[l],t=l,l<<=1;e.heap[t]=i},gn=(e,n,t)=>{let i,l,a=0,f,s;if(e.sym_next!==0)do i=e.pending_buf[e.sym_buf+a++]&255,i+=(e.pending_buf[e.sym_buf+a++]&255)<<8,l=e.pending_buf[e.sym_buf+a++],i===0?ne(e,l,n):(f=Ve[l],ne(e,f+We+1,n),s=Xt[f],s!==0&&(l-=an[f],K(e,l,s)),i--,f=Oi(i),ne(e,f,t),s=ct[f],s!==0&&(i-=dt[f],K(e,i,s)));while(a<e.sym_next);ne(e,rn,n)},qt=(e,n)=>{const t=n.dyn_tree,i=n.stat_desc.static_tree,l=n.stat_desc.has_stree,a=n.stat_desc.elems;let f,s,c=-1,r;for(e.heap_len=0,e.heap_max=mi,f=0;f<a;f++)t[f*2]!==0?(e.heap[++e.heap_len]=c=f,e.depth[f]=0):t[f*2+1]=0;for(;e.heap_len<2;)r=e.heap[++e.heap_len]=c<2?++c:0,t[r*2]=1,e.depth[r]=0,e.opt_len--,l&&(e.static_len-=i[r*2+1]);for(n.max_code=c,f=e.heap_len>>1;f>=1;f--)Et(e,t,f);r=a;do f=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Et(e,t,1),s=e.heap[1],e.heap[--e.heap_max]=f,e.heap[--e.heap_max]=s,t[r*2]=t[f*2]+t[s*2],e.depth[r]=(e.depth[f]>=e.depth[s]?e.depth[f]:e.depth[s])+1,t[f*2+1]=t[s*2+1]=r,e.heap[1]=r++,Et(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Tr(e,n),Ii(t,c,e.bl_count)},bn=(e,n,t)=>{let i,l=-1,a,f=n[0*2+1],s=0,c=7,r=4;for(f===0&&(c=138,r=3),n[(t+1)*2+1]=65535,i=0;i<=t;i++)a=f,f=n[(i+1)*2+1],!(++s<c&&a===f)&&(s<r?e.bl_tree[a*2]+=s:a!==0?(a!==l&&e.bl_tree[a*2]++,e.bl_tree[Ei*2]++):s<=10?e.bl_tree[vi*2]++:e.bl_tree[Ni*2]++,s=0,l=a,f===0?(c=138,r=3):a===f?(c=6,r=3):(c=7,r=4))},wn=(e,n,t)=>{let i,l=-1,a,f=n[0*2+1],s=0,c=7,r=4;for(f===0&&(c=138,r=3),i=0;i<=t;i++)if(a=f,f=n[(i+1)*2+1],!(++s<c&&a===f)){if(s<r)do ne(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==l&&(ne(e,a,e.bl_tree),s--),ne(e,Ei,e.bl_tree),K(e,s-3,2)):s<=10?(ne(e,vi,e.bl_tree),K(e,s-3,3)):(ne(e,Ni,e.bl_tree),K(e,s-11,7));s=0,l=a,f===0?(c=138,r=3):a===f?(c=6,r=3):(c=7,r=4)}},Sr=e=>{let n;for(bn(e,e.dyn_ltree,e.l_desc.max_code),bn(e,e.dyn_dtree,e.d_desc.max_code),qt(e,e.bl_desc),n=nn-1;n>=3&&e.bl_tree[ki[n]*2+1]===0;n--);return e.opt_len+=3*(n+1)+5+5+4,n},Or=(e,n,t,i)=>{let l;for(K(e,n-257,5),K(e,t-1,5),K(e,i-4,4),l=0;l<i;l++)K(e,e.bl_tree[ki[l]*2+1],3);wn(e,e.dyn_ltree,n-1),wn(e,e.dyn_dtree,t-1)},Fr=e=>{let n=4093624447,t;for(t=0;t<=31;t++,n>>>=1)if(n&1&&e.dyn_ltree[t*2]!==0)return hn;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return _n;for(t=32;t<We;t++)if(e.dyn_ltree[t*2]!==0)return _n;return hn};let yn=!1;const Ir=e=>{yn||(Ar(),yn=!0),e.l_desc=new mt(e.dyn_ltree,Ti),e.d_desc=new mt(e.dyn_dtree,Ai),e.bl_desc=new mt(e.bl_tree,Si),e.bi_buf=0,e.bi_valid=0,Ri(e)},Ci=(e,n,t,i)=>{K(e,(wr<<1)+(i?1:0),3),zi(e),Xe(e,t),Xe(e,~t),t&&e.pending_buf.set(e.window.subarray(n,n+t),e.pending),e.pending+=t},Rr=e=>{K(e,xi<<1,3),ne(e,rn,le),kr(e)},zr=(e,n,t,i)=>{let l,a,f=0;e.level>0?(e.strm.data_type===br&&(e.strm.data_type=Fr(e)),qt(e,e.l_desc),qt(e,e.d_desc),f=Sr(e),l=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=l&&(l=a)):l=a=t+5,t+4<=l&&n!==-1?Ci(e,n,t,i):e.strategy===gr||a===l?(K(e,(xi<<1)+(i?1:0),3),gn(e,le,Be)):(K(e,(yr<<1)+(i?1:0),3),Or(e,e.l_desc.max_code+1,e.d_desc.max_code+1,f+1),gn(e,e.dyn_ltree,e.dyn_dtree)),Ri(e),i&&zi(e)},Cr=(e,n,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=n,e.pending_buf[e.sym_buf+e.sym_next++]=n>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,n===0?e.dyn_ltree[t*2]++:(e.matches++,n--,e.dyn_ltree[(Ve[t]+We+1)*2]++,e.dyn_dtree[Oi(n)*2]++),e.sym_next===e.sym_end);var Lr=Ir,Pr=Ci,$r=zr,Zr=Cr,Br=Rr,Ur={_tr_init:Lr,_tr_stored_block:Pr,_tr_flush_block:$r,_tr_tally:Zr,_tr_align:Br};const Mr=(e,n,t,i)=>{let l=e&65535|0,a=e>>>16&65535|0,f=0;for(;t!==0;){f=t>2e3?2e3:t,t-=f;do l=l+n[i++]|0,a=a+l|0;while(--f);l%=65521,a%=65521}return l|a<<16|0};var qe=Mr;const jr=()=>{let e,n=[];for(var t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;n[t]=e}return n},Hr=new Uint32Array(jr()),Vr=(e,n,t,i)=>{const l=Hr,a=i+t;e^=-1;for(let f=i;f<a;f++)e=e>>>8^l[(e^n[f])&255];return e^-1};var H=Vr,xe={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Je={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Xr,_tr_stored_block:Gt,_tr_flush_block:qr,_tr_tally:_e,_tr_align:Gr}=Ur,{Z_NO_FLUSH:pe,Z_PARTIAL_FLUSH:Kr,Z_FULL_FLUSH:Yr,Z_FINISH:Q,Z_BLOCK:xn,Z_OK:V,Z_STREAM_END:mn,Z_STREAM_ERROR:ie,Z_DATA_ERROR:Wr,Z_BUF_ERROR:vt,Z_DEFAULT_COMPRESSION:Jr,Z_FILTERED:Qr,Z_HUFFMAN_ONLY:nt,Z_RLE:Dr,Z_FIXED:ea,Z_DEFAULT_STRATEGY:ta,Z_UNKNOWN:na,Z_DEFLATED:_t}=Je,ia=9,ra=15,aa=8,sa=29,oa=256,Kt=oa+1+sa,la=30,fa=19,ca=2*Kt+1,da=15,P=3,he=258,re=he+P+1,ua=32,Oe=42,sn=57,Yt=69,Wt=73,Jt=91,Qt=103,we=113,$e=666,X=1,ze=2,me=3,Ce=4,ha=3,ye=(e,n)=>(e.msg=xe[n],n),En=e=>e*2-(e>4?9:0),ue=e=>{let n=e.length;for(;--n>=0;)e[n]=0},_a=e=>{let n,t,i,l=e.w_size;n=e.hash_size,i=n;do t=e.head[--i],e.head[i]=t>=l?t-l:0;while(--n);n=l,i=n;do t=e.prev[--i],e.prev[i]=t>=l?t-l:0;while(--n)};let pa=(e,n,t)=>(n<<e.hash_shift^t)&e.hash_mask,ge=pa;const W=e=>{const n=e.state;let t=n.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+t),e.next_out),e.next_out+=t,n.pending_out+=t,e.total_out+=t,e.avail_out-=t,n.pending-=t,n.pending===0&&(n.pending_out=0))},J=(e,n)=>{qr(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,n),e.block_start=e.strstart,W(e.strm)},B=(e,n)=>{e.pending_buf[e.pending++]=n},Le=(e,n)=>{e.pending_buf[e.pending++]=n>>>8&255,e.pending_buf[e.pending++]=n&255},Dt=(e,n,t,i)=>{let l=e.avail_in;return l>i&&(l=i),l===0?0:(e.avail_in-=l,n.set(e.input.subarray(e.next_in,e.next_in+l),t),e.state.wrap===1?e.adler=qe(e.adler,n,l,t):e.state.wrap===2&&(e.adler=H(e.adler,n,l,t)),e.next_in+=l,e.total_in+=l,l)},Li=(e,n)=>{let t=e.max_chain_length,i=e.strstart,l,a,f=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-re?e.strstart-(e.w_size-re):0,r=e.window,o=e.w_mask,E=e.prev,_=e.strstart+he;let h=r[i+f-1],v=r[i+f];e.prev_length>=e.good_match&&(t>>=2),s>e.lookahead&&(s=e.lookahead);do if(l=n,!(r[l+f]!==v||r[l+f-1]!==h||r[l]!==r[i]||r[++l]!==r[i+1])){i+=2,l++;do;while(r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&r[++i]===r[++l]&&i<_);if(a=he-(_-i),i=_-he,a>f){if(e.match_start=n,f=a,a>=s)break;h=r[i+f-1],v=r[i+f]}}while((n=E[n&o])>c&&--t!==0);return f<=e.lookahead?f:e.lookahead},Fe=e=>{const n=e.w_size;let t,i,l;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-re)&&(e.window.set(e.window.subarray(n,n+n-i),0),e.match_start-=n,e.strstart-=n,e.block_start-=n,e.insert>e.strstart&&(e.insert=e.strstart),_a(e),i+=n),e.strm.avail_in===0)break;if(t=Dt(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=P)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=ge(e,e.ins_h,e.window[l+1]);e.insert&&(e.ins_h=ge(e,e.ins_h,e.window[l+P-1]),e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<P)););}while(e.lookahead<re&&e.strm.avail_in!==0)},Pi=(e,n)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i,l,a,f=0,s=e.strm.avail_in;do{if(i=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,l=e.strstart-e.block_start,i>l+e.strm.avail_in&&(i=l+e.strm.avail_in),i>a&&(i=a),i<t&&(i===0&&n!==Q||n===pe||i!==l+e.strm.avail_in)))break;f=n===Q&&i===l+e.strm.avail_in?1:0,Gt(e,0,0,f),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,W(e.strm),l&&(l>i&&(l=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+l),e.strm.next_out),e.strm.next_out+=l,e.strm.avail_out-=l,e.strm.total_out+=l,e.block_start+=l,i-=l),i&&(Dt(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(f===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),f?Ce:n!==pe&&n!==Q&&e.strm.avail_in===0&&e.strstart===e.block_start?ze:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Dt(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,t=a>e.w_size?e.w_size:a,l=e.strstart-e.block_start,(l>=t||(l||n===Q)&&n!==pe&&e.strm.avail_in===0&&l<=a)&&(i=l>a?a:l,f=n===Q&&e.strm.avail_in===0&&i===l?1:0,Gt(e,e.block_start,i,f),e.block_start+=i,W(e.strm)),f?me:X)},Nt=(e,n)=>{let t,i;for(;;){if(e.lookahead<re){if(Fe(e),e.lookahead<re&&n===pe)return X;if(e.lookahead===0)break}if(t=0,e.lookahead>=P&&(e.ins_h=ge(e,e.ins_h,e.window[e.strstart+P-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-re&&(e.match_length=Li(e,t)),e.match_length>=P)if(i=_e(e,e.strstart-e.match_start,e.match_length-P),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=P){e.match_length--;do e.strstart++,e.ins_h=ge(e,e.ins_h,e.window[e.strstart+P-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ge(e,e.ins_h,e.window[e.strstart+1]);else i=_e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(J(e,!1),e.strm.avail_out===0))return X}return e.insert=e.strstart<P-1?e.strstart:P-1,n===Q?(J(e,!0),e.strm.avail_out===0?me:Ce):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?X:ze},Te=(e,n)=>{let t,i,l;for(;;){if(e.lookahead<re){if(Fe(e),e.lookahead<re&&n===pe)return X;if(e.lookahead===0)break}if(t=0,e.lookahead>=P&&(e.ins_h=ge(e,e.ins_h,e.window[e.strstart+P-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=P-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-re&&(e.match_length=Li(e,t),e.match_length<=5&&(e.strategy===Qr||e.match_length===P&&e.strstart-e.match_start>4096)&&(e.match_length=P-1)),e.prev_length>=P&&e.match_length<=e.prev_length){l=e.strstart+e.lookahead-P,i=_e(e,e.strstart-1-e.prev_match,e.prev_length-P),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=l&&(e.ins_h=ge(e,e.ins_h,e.window[e.strstart+P-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=P-1,e.strstart++,i&&(J(e,!1),e.strm.avail_out===0))return X}else if(e.match_available){if(i=_e(e,0,e.window[e.strstart-1]),i&&J(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return X}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=_e(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<P-1?e.strstart:P-1,n===Q?(J(e,!0),e.strm.avail_out===0?me:Ce):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?X:ze},ga=(e,n)=>{let t,i,l,a;const f=e.window;for(;;){if(e.lookahead<=he){if(Fe(e),e.lookahead<=he&&n===pe)return X;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=P&&e.strstart>0&&(l=e.strstart-1,i=f[l],i===f[++l]&&i===f[++l]&&i===f[++l])){a=e.strstart+he;do;while(i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&l<a);e.match_length=he-(a-l),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=P?(t=_e(e,1,e.match_length-P),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=_e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(J(e,!1),e.strm.avail_out===0))return X}return e.insert=0,n===Q?(J(e,!0),e.strm.avail_out===0?me:Ce):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?X:ze},ba=(e,n)=>{let t;for(;;){if(e.lookahead===0&&(Fe(e),e.lookahead===0)){if(n===pe)return X;break}if(e.match_length=0,t=_e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(J(e,!1),e.strm.avail_out===0))return X}return e.insert=0,n===Q?(J(e,!0),e.strm.avail_out===0?me:Ce):e.sym_next&&(J(e,!1),e.strm.avail_out===0)?X:ze};function te(e,n,t,i,l){this.good_length=e,this.max_lazy=n,this.nice_length=t,this.max_chain=i,this.func=l}const Ze=[new te(0,0,0,0,Pi),new te(4,4,8,4,Nt),new te(4,5,16,8,Nt),new te(4,6,32,32,Nt),new te(4,4,16,16,Te),new te(8,16,32,32,Te),new te(8,16,128,128,Te),new te(8,32,128,256,Te),new te(32,128,258,1024,Te),new te(32,258,258,4096,Te)],wa=e=>{e.window_size=2*e.w_size,ue(e.head),e.max_lazy_match=Ze[e.level].max_lazy,e.good_match=Ze[e.level].good_length,e.nice_match=Ze[e.level].nice_length,e.max_chain_length=Ze[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=P-1,e.match_available=0,e.ins_h=0};function ya(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_t,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(ca*2),this.dyn_dtree=new Uint16Array((2*la+1)*2),this.bl_tree=new Uint16Array((2*fa+1)*2),ue(this.dyn_ltree),ue(this.dyn_dtree),ue(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(da+1),this.heap=new Uint16Array(2*Kt+1),ue(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Kt+1),ue(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Qe=e=>{if(!e)return 1;const n=e.state;return!n||n.strm!==e||n.status!==Oe&&n.status!==sn&&n.status!==Yt&&n.status!==Wt&&n.status!==Jt&&n.status!==Qt&&n.status!==we&&n.status!==$e?1:0},$i=e=>{if(Qe(e))return ye(e,ie);e.total_in=e.total_out=0,e.data_type=na;const n=e.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?sn:n.wrap?Oe:we,e.adler=n.wrap===2?0:1,n.last_flush=-2,Xr(n),V},Zi=e=>{const n=$i(e);return n===V&&wa(e.state),n},xa=(e,n)=>Qe(e)||e.state.wrap!==2?ie:(e.state.gzhead=n,V),Bi=(e,n,t,i,l,a)=>{if(!e)return ie;let f=1;if(n===Jr&&(n=6),i<0?(f=0,i=-i):i>15&&(f=2,i-=16),l<1||l>ia||t!==_t||i<8||i>15||n<0||n>9||a<0||a>ea||i===8&&f!==1)return ye(e,ie);i===8&&(i=9);const s=new ya;return e.state=s,s.strm=e,s.status=Oe,s.wrap=f,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=l+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+P-1)/P),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<l+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=n,s.strategy=a,s.method=t,Zi(e)},ma=(e,n)=>Bi(e,n,_t,ra,aa,ta),Ea=(e,n)=>{if(Qe(e)||n>xn||n<0)return e?ye(e,ie):ie;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===$e&&n!==Q)return ye(e,e.avail_out===0?vt:ie);const i=t.last_flush;if(t.last_flush=n,t.pending!==0){if(W(e),e.avail_out===0)return t.last_flush=-1,V}else if(e.avail_in===0&&En(n)<=En(i)&&n!==Q)return ye(e,vt);if(t.status===$e&&e.avail_in!==0)return ye(e,vt);if(t.status===Oe&&t.wrap===0&&(t.status=we),t.status===Oe){let l=_t+(t.w_bits-8<<4)<<8,a=-1;if(t.strategy>=nt||t.level<2?a=0:t.level<6?a=1:t.level===6?a=2:a=3,l|=a<<6,t.strstart!==0&&(l|=ua),l+=31-l%31,Le(t,l),t.strstart!==0&&(Le(t,e.adler>>>16),Le(t,e.adler&65535)),e.adler=1,t.status=we,W(e),t.pending!==0)return t.last_flush=-1,V}if(t.status===sn){if(e.adler=0,B(t,31),B(t,139),B(t,8),t.gzhead)B(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),B(t,t.gzhead.time&255),B(t,t.gzhead.time>>8&255),B(t,t.gzhead.time>>16&255),B(t,t.gzhead.time>>24&255),B(t,t.level===9?2:t.strategy>=nt||t.level<2?4:0),B(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(B(t,t.gzhead.extra.length&255),B(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=H(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=Yt;else if(B(t,0),B(t,0),B(t,0),B(t,0),B(t,0),B(t,t.level===9?2:t.strategy>=nt||t.level<2?4:0),B(t,ha),t.status=we,W(e),t.pending!==0)return t.last_flush=-1,V}if(t.status===Yt){if(t.gzhead.extra){let l=t.pending,a=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+a>t.pending_buf_size;){let s=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+s),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex+=s,W(e),t.pending!==0)return t.last_flush=-1,V;l=0,a-=s}let f=new Uint8Array(t.gzhead.extra);t.pending_buf.set(f.subarray(t.gzindex,t.gzindex+a),t.pending),t.pending+=a,t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=Wt}if(t.status===Wt){if(t.gzhead.name){let l=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),W(e),t.pending!==0)return t.last_flush=-1,V;l=0}t.gzindex<t.gzhead.name.length?a=t.gzhead.name.charCodeAt(t.gzindex++)&255:a=0,B(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=Jt}if(t.status===Jt){if(t.gzhead.comment){let l=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l)),W(e),t.pending!==0)return t.last_flush=-1,V;l=0}t.gzindex<t.gzhead.comment.length?a=t.gzhead.comment.charCodeAt(t.gzindex++)&255:a=0,B(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=H(e.adler,t.pending_buf,t.pending-l,l))}t.status=Qt}if(t.status===Qt){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(W(e),t.pending!==0))return t.last_flush=-1,V;B(t,e.adler&255),B(t,e.adler>>8&255),e.adler=0}if(t.status=we,W(e),t.pending!==0)return t.last_flush=-1,V}if(e.avail_in!==0||t.lookahead!==0||n!==pe&&t.status!==$e){let l=t.level===0?Pi(t,n):t.strategy===nt?ba(t,n):t.strategy===Dr?ga(t,n):Ze[t.level].func(t,n);if((l===me||l===Ce)&&(t.status=$e),l===X||l===me)return e.avail_out===0&&(t.last_flush=-1),V;if(l===ze&&(n===Kr?Gr(t):n!==xn&&(Gt(t,0,0,!1),n===Yr&&(ue(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),W(e),e.avail_out===0))return t.last_flush=-1,V}return n!==Q?V:t.wrap<=0?mn:(t.wrap===2?(B(t,e.adler&255),B(t,e.adler>>8&255),B(t,e.adler>>16&255),B(t,e.adler>>24&255),B(t,e.total_in&255),B(t,e.total_in>>8&255),B(t,e.total_in>>16&255),B(t,e.total_in>>24&255)):(Le(t,e.adler>>>16),Le(t,e.adler&65535)),W(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?V:mn)},va=e=>{if(Qe(e))return ie;const n=e.state.status;return e.state=null,n===we?ye(e,Wr):V},Na=(e,n)=>{let t=n.length;if(Qe(e))return ie;const i=e.state,l=i.wrap;if(l===2||l===1&&i.status!==Oe||i.lookahead)return ie;if(l===1&&(e.adler=qe(e.adler,n,t,0)),i.wrap=0,t>=i.w_size){l===0&&(ue(i.head),i.strstart=0,i.block_start=0,i.insert=0);let c=new Uint8Array(i.w_size);c.set(n.subarray(t-i.w_size,t),0),n=c,t=i.w_size}const a=e.avail_in,f=e.next_in,s=e.input;for(e.avail_in=t,e.next_in=0,e.input=n,Fe(i);i.lookahead>=P;){let c=i.strstart,r=i.lookahead-(P-1);do i.ins_h=ge(i,i.ins_h,i.window[c+P-1]),i.prev[c&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=c,c++;while(--r);i.strstart=c,i.lookahead=P-1,Fe(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=P-1,i.match_available=0,e.next_in=f,e.input=s,e.avail_in=a,i.wrap=l,V};var ka=ma,Ta=Bi,Aa=Zi,Sa=$i,Oa=xa,Fa=Ea,Ia=va,Ra=Na,za="pako deflate (from Nodeca project)",Ue={deflateInit:ka,deflateInit2:Ta,deflateReset:Aa,deflateResetKeep:Sa,deflateSetHeader:Oa,deflate:Fa,deflateEnd:Ia,deflateSetDictionary:Ra,deflateInfo:za};const Ca=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var La=function(e){const n=Array.prototype.slice.call(arguments,1);for(;n.length;){const t=n.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)Ca(t,i)&&(e[i]=t[i])}}return e},Pa=e=>{let n=0;for(let i=0,l=e.length;i<l;i++)n+=e[i].length;const t=new Uint8Array(n);for(let i=0,l=0,a=e.length;i<a;i++){let f=e[i];t.set(f,l),l+=f.length}return t},pt={assign:La,flattenChunks:Pa};let Ui=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ui=!1}const Ge=new Uint8Array(256);for(let e=0;e<256;e++)Ge[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Ge[254]=Ge[254]=1;var $a=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let n,t,i,l,a,f=e.length,s=0;for(l=0;l<f;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<f&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),s+=t<128?1:t<2048?2:t<65536?3:4;for(n=new Uint8Array(s),a=0,l=0;a<s;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<f&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),t<128?n[a++]=t:t<2048?(n[a++]=192|t>>>6,n[a++]=128|t&63):t<65536?(n[a++]=224|t>>>12,n[a++]=128|t>>>6&63,n[a++]=128|t&63):(n[a++]=240|t>>>18,n[a++]=128|t>>>12&63,n[a++]=128|t>>>6&63,n[a++]=128|t&63);return n};const Za=(e,n)=>{if(n<65534&&e.subarray&&Ui)return String.fromCharCode.apply(null,e.length===n?e:e.subarray(0,n));let t="";for(let i=0;i<n;i++)t+=String.fromCharCode(e[i]);return t};var Ba=(e,n)=>{const t=n||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,n));let i,l;const a=new Array(t*2);for(l=0,i=0;i<t;){let f=e[i++];if(f<128){a[l++]=f;continue}let s=Ge[f];if(s>4){a[l++]=65533,i+=s-1;continue}for(f&=s===2?31:s===3?15:7;s>1&&i<t;)f=f<<6|e[i++]&63,s--;if(s>1){a[l++]=65533;continue}f<65536?a[l++]=f:(f-=65536,a[l++]=55296|f>>10&1023,a[l++]=56320|f&1023)}return Za(a,l)},Ua=(e,n)=>{n=n||e.length,n>e.length&&(n=e.length);let t=n-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?n:t+Ge[e[t]]>n?t:n},Ke={string2buf:$a,buf2string:Ba,utf8border:Ua};function Ma(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Mi=Ma;const ji=Object.prototype.toString,{Z_NO_FLUSH:ja,Z_SYNC_FLUSH:Ha,Z_FULL_FLUSH:Va,Z_FINISH:Xa,Z_OK:ut,Z_STREAM_END:qa,Z_DEFAULT_COMPRESSION:Ga,Z_DEFAULT_STRATEGY:Ka,Z_DEFLATED:Ya}=Je;function De(e){this.options=pt.assign({level:Ga,method:Ya,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ka},e||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Mi,this.strm.avail_out=0;let t=Ue.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(t!==ut)throw new Error(xe[t]);if(n.header&&Ue.deflateSetHeader(this.strm,n.header),n.dictionary){let i;if(typeof n.dictionary=="string"?i=Ke.string2buf(n.dictionary):ji.call(n.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(n.dictionary):i=n.dictionary,t=Ue.deflateSetDictionary(this.strm,i),t!==ut)throw new Error(xe[t]);this._dict_set=!0}}De.prototype.push=function(e,n){const t=this.strm,i=this.options.chunkSize;let l,a;if(this.ended)return!1;for(n===~~n?a=n:a=n===!0?Xa:ja,typeof e=="string"?t.input=Ke.string2buf(e):ji.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(a===Ha||a===Va)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(l=Ue.deflate(t,a),l===qa)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),l=Ue.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===ut;if(t.avail_out===0){this.onData(t.output);continue}if(a>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0};De.prototype.onData=function(e){this.chunks.push(e)};De.prototype.onEnd=function(e){e===ut&&(this.result=pt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function on(e,n){const t=new De(n);if(t.push(e,!0),t.err)throw t.msg||xe[t.err];return t.result}function Wa(e,n){return n=n||{},n.raw=!0,on(e,n)}function Ja(e,n){return n=n||{},n.gzip=!0,on(e,n)}var Qa=De,Da=on,es=Wa,ts=Ja,ns={Deflate:Qa,deflate:Da,deflateRaw:es,gzip:ts};const it=16209,is=16191;var rs=function(n,t){let i,l,a,f,s,c,r,o,E,_,h,v,T,I,d,g,N,k,u,p,b,A,y,m;const O=n.state;i=n.next_in,y=n.input,l=i+(n.avail_in-5),a=n.next_out,m=n.output,f=a-(t-n.avail_out),s=a+(n.avail_out-257),c=O.dmax,r=O.wsize,o=O.whave,E=O.wnext,_=O.window,h=O.hold,v=O.bits,T=O.lencode,I=O.distcode,d=(1<<O.lenbits)-1,g=(1<<O.distbits)-1;e:do{v<15&&(h+=y[i++]<<v,v+=8,h+=y[i++]<<v,v+=8),N=T[h&d];t:for(;;){if(k=N>>>24,h>>>=k,v-=k,k=N>>>16&255,k===0)m[a++]=N&65535;else if(k&16){u=N&65535,k&=15,k&&(v<k&&(h+=y[i++]<<v,v+=8),u+=h&(1<<k)-1,h>>>=k,v-=k),v<15&&(h+=y[i++]<<v,v+=8,h+=y[i++]<<v,v+=8),N=I[h&g];n:for(;;){if(k=N>>>24,h>>>=k,v-=k,k=N>>>16&255,k&16){if(p=N&65535,k&=15,v<k&&(h+=y[i++]<<v,v+=8,v<k&&(h+=y[i++]<<v,v+=8)),p+=h&(1<<k)-1,p>c){n.msg="invalid distance too far back",O.mode=it;break e}if(h>>>=k,v-=k,k=a-f,p>k){if(k=p-k,k>o&&O.sane){n.msg="invalid distance too far back",O.mode=it;break e}if(b=0,A=_,E===0){if(b+=r-k,k<u){u-=k;do m[a++]=_[b++];while(--k);b=a-p,A=m}}else if(E<k){if(b+=r+E-k,k-=E,k<u){u-=k;do m[a++]=_[b++];while(--k);if(b=0,E<u){k=E,u-=k;do m[a++]=_[b++];while(--k);b=a-p,A=m}}}else if(b+=E-k,k<u){u-=k;do m[a++]=_[b++];while(--k);b=a-p,A=m}for(;u>2;)m[a++]=A[b++],m[a++]=A[b++],m[a++]=A[b++],u-=3;u&&(m[a++]=A[b++],u>1&&(m[a++]=A[b++]))}else{b=a-p;do m[a++]=m[b++],m[a++]=m[b++],m[a++]=m[b++],u-=3;while(u>2);u&&(m[a++]=m[b++],u>1&&(m[a++]=m[b++]))}}else if((k&64)===0){N=I[(N&65535)+(h&(1<<k)-1)];continue n}else{n.msg="invalid distance code",O.mode=it;break e}break}}else if((k&64)===0){N=T[(N&65535)+(h&(1<<k)-1)];continue t}else if(k&32){O.mode=is;break e}else{n.msg="invalid literal/length code",O.mode=it;break e}break}}while(i<l&&a<s);u=v>>3,i-=u,v-=u<<3,h&=(1<<v)-1,n.next_in=i,n.next_out=a,n.avail_in=i<l?5+(l-i):5-(i-l),n.avail_out=a<s?257+(s-a):257-(a-s),O.hold=h,O.bits=v};const Ae=15,vn=852,Nn=592,kn=0,kt=1,Tn=2,as=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ss=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),os=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ls=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),fs=(e,n,t,i,l,a,f,s)=>{const c=s.bits;let r=0,o=0,E=0,_=0,h=0,v=0,T=0,I=0,d=0,g=0,N,k,u,p,b,A=null,y;const m=new Uint16Array(Ae+1),O=new Uint16Array(Ae+1);let w=null,x,S,F;for(r=0;r<=Ae;r++)m[r]=0;for(o=0;o<i;o++)m[n[t+o]]++;for(h=c,_=Ae;_>=1&&m[_]===0;_--);if(h>_&&(h=_),_===0)return l[a++]=1<<24|64<<16|0,l[a++]=1<<24|64<<16|0,s.bits=1,0;for(E=1;E<_&&m[E]===0;E++);for(h<E&&(h=E),I=1,r=1;r<=Ae;r++)if(I<<=1,I-=m[r],I<0)return-1;if(I>0&&(e===kn||_!==1))return-1;for(O[1]=0,r=1;r<Ae;r++)O[r+1]=O[r]+m[r];for(o=0;o<i;o++)n[t+o]!==0&&(f[O[n[t+o]]++]=o);if(e===kn?(A=w=f,y=20):e===kt?(A=as,w=ss,y=257):(A=os,w=ls,y=0),g=0,o=0,r=E,b=a,v=h,T=0,u=-1,d=1<<h,p=d-1,e===kt&&d>vn||e===Tn&&d>Nn)return 1;for(;;){x=r-T,f[o]+1<y?(S=0,F=f[o]):f[o]>=y?(S=w[f[o]-y],F=A[f[o]-y]):(S=96,F=0),N=1<<r-T,k=1<<v,E=k;do k-=N,l[b+(g>>T)+k]=x<<24|S<<16|F|0;while(k!==0);for(N=1<<r-1;g&N;)N>>=1;if(N!==0?(g&=N-1,g+=N):g=0,o++,--m[r]===0){if(r===_)break;r=n[t+f[o]]}if(r>h&&(g&p)!==u){for(T===0&&(T=h),b+=E,v=r-T,I=1<<v;v+T<_&&(I-=m[v+T],!(I<=0));)v++,I<<=1;if(d+=1<<v,e===kt&&d>vn||e===Tn&&d>Nn)return 1;u=g&p,l[u]=h<<24|v<<16|b-a|0}}return g!==0&&(l[b+g]=r-T<<24|64<<16|0),s.bits=h,0};var Me=fs;const cs=0,Hi=1,Vi=2,{Z_FINISH:An,Z_BLOCK:ds,Z_TREES:rt,Z_OK:Ee,Z_STREAM_END:us,Z_NEED_DICT:hs,Z_STREAM_ERROR:D,Z_DATA_ERROR:Xi,Z_MEM_ERROR:qi,Z_BUF_ERROR:_s,Z_DEFLATED:Sn}=Je,gt=16180,On=16181,Fn=16182,In=16183,Rn=16184,zn=16185,Cn=16186,Ln=16187,Pn=16188,$n=16189,ht=16190,oe=16191,Tt=16192,Zn=16193,At=16194,Bn=16195,Un=16196,Mn=16197,jn=16198,at=16199,st=16200,Hn=16201,Vn=16202,Xn=16203,qn=16204,Gn=16205,St=16206,Kn=16207,Yn=16208,j=16209,Gi=16210,Ki=16211,ps=852,gs=592,bs=15,ws=bs,Wn=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function ys(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ve=e=>{if(!e)return 1;const n=e.state;return!n||n.strm!==e||n.mode<gt||n.mode>Ki?1:0},Yi=e=>{if(ve(e))return D;const n=e.state;return e.total_in=e.total_out=n.total=0,e.msg="",n.wrap&&(e.adler=n.wrap&1),n.mode=gt,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(ps),n.distcode=n.distdyn=new Int32Array(gs),n.sane=1,n.back=-1,Ee},Wi=e=>{if(ve(e))return D;const n=e.state;return n.wsize=0,n.whave=0,n.wnext=0,Yi(e)},Ji=(e,n)=>{let t;if(ve(e))return D;const i=e.state;return n<0?(t=0,n=-n):(t=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?D:(i.window!==null&&i.wbits!==n&&(i.window=null),i.wrap=t,i.wbits=n,Wi(e))},Qi=(e,n)=>{if(!e)return D;const t=new ys;e.state=t,t.strm=e,t.window=null,t.mode=gt;const i=Ji(e,n);return i!==Ee&&(e.state=null),i},xs=e=>Qi(e,ws);let Jn=!0,Ot,Ft;const ms=e=>{if(Jn){Ot=new Int32Array(512),Ft=new Int32Array(32);let n=0;for(;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(Me(Hi,e.lens,0,288,Ot,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;Me(Vi,e.lens,0,32,Ft,0,e.work,{bits:5}),Jn=!1}e.lencode=Ot,e.lenbits=9,e.distcode=Ft,e.distbits=5},Di=(e,n,t,i)=>{let l;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),i>=a.wsize?(a.window.set(n.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(l=a.wsize-a.wnext,l>i&&(l=i),a.window.set(n.subarray(t-i,t-i+l),a.wnext),i-=l,i?(a.window.set(n.subarray(t-i,t),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=l,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=l))),0},Es=(e,n)=>{let t,i,l,a,f,s,c,r,o,E,_,h,v,T,I=0,d,g,N,k,u,p,b,A;const y=new Uint8Array(4);let m,O;const w=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ve(e)||!e.output||!e.input&&e.avail_in!==0)return D;t=e.state,t.mode===oe&&(t.mode=Tt),f=e.next_out,l=e.output,c=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,r=t.hold,o=t.bits,E=s,_=c,A=Ee;e:for(;;)switch(t.mode){case gt:if(t.wrap===0){t.mode=Tt;break}for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.wrap&2&&r===35615){t.wbits===0&&(t.wbits=15),t.check=0,y[0]=r&255,y[1]=r>>>8&255,t.check=H(t.check,y,2,0),r=0,o=0,t.mode=On;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((r&255)<<8)+(r>>8))%31){e.msg="incorrect header check",t.mode=j;break}if((r&15)!==Sn){e.msg="unknown compression method",t.mode=j;break}if(r>>>=4,o-=4,b=(r&15)+8,t.wbits===0&&(t.wbits=b),b>15||b>t.wbits){e.msg="invalid window size",t.mode=j;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=r&512?$n:oe,r=0,o=0;break;case On:for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.flags=r,(t.flags&255)!==Sn){e.msg="unknown compression method",t.mode=j;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=j;break}t.head&&(t.head.text=r>>8&1),t.flags&512&&t.wrap&4&&(y[0]=r&255,y[1]=r>>>8&255,t.check=H(t.check,y,2,0)),r=0,o=0,t.mode=Fn;case Fn:for(;o<32;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.head&&(t.head.time=r),t.flags&512&&t.wrap&4&&(y[0]=r&255,y[1]=r>>>8&255,y[2]=r>>>16&255,y[3]=r>>>24&255,t.check=H(t.check,y,4,0)),r=0,o=0,t.mode=In;case In:for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.head&&(t.head.xflags=r&255,t.head.os=r>>8),t.flags&512&&t.wrap&4&&(y[0]=r&255,y[1]=r>>>8&255,t.check=H(t.check,y,2,0)),r=0,o=0,t.mode=Rn;case Rn:if(t.flags&1024){for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.length=r,t.head&&(t.head.extra_len=r),t.flags&512&&t.wrap&4&&(y[0]=r&255,y[1]=r>>>8&255,t.check=H(t.check,y,2,0)),r=0,o=0}else t.head&&(t.head.extra=null);t.mode=zn;case zn:if(t.flags&1024&&(h=t.length,h>s&&(h=s),h&&(t.head&&(b=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(a,a+h),b)),t.flags&512&&t.wrap&4&&(t.check=H(t.check,i,h,a)),s-=h,a+=h,t.length-=h),t.length))break e;t.length=0,t.mode=Cn;case Cn:if(t.flags&2048){if(s===0)break e;h=0;do b=i[a+h++],t.head&&b&&t.length<65536&&(t.head.name+=String.fromCharCode(b));while(b&&h<s);if(t.flags&512&&t.wrap&4&&(t.check=H(t.check,i,h,a)),s-=h,a+=h,b)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=Ln;case Ln:if(t.flags&4096){if(s===0)break e;h=0;do b=i[a+h++],t.head&&b&&t.length<65536&&(t.head.comment+=String.fromCharCode(b));while(b&&h<s);if(t.flags&512&&t.wrap&4&&(t.check=H(t.check,i,h,a)),s-=h,a+=h,b)break e}else t.head&&(t.head.comment=null);t.mode=Pn;case Pn:if(t.flags&512){for(;o<16;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.wrap&4&&r!==(t.check&65535)){e.msg="header crc mismatch",t.mode=j;break}r=0,o=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=oe;break;case $n:for(;o<32;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}e.adler=t.check=Wn(r),r=0,o=0,t.mode=ht;case ht:if(t.havedict===0)return e.next_out=f,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=r,t.bits=o,hs;e.adler=t.check=1,t.mode=oe;case oe:if(n===ds||n===rt)break e;case Tt:if(t.last){r>>>=o&7,o-=o&7,t.mode=St;break}for(;o<3;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}switch(t.last=r&1,r>>>=1,o-=1,r&3){case 0:t.mode=Zn;break;case 1:if(ms(t),t.mode=at,n===rt){r>>>=2,o-=2;break e}break;case 2:t.mode=Un;break;case 3:e.msg="invalid block type",t.mode=j}r>>>=2,o-=2;break;case Zn:for(r>>>=o&7,o-=o&7;o<32;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if((r&65535)!==(r>>>16^65535)){e.msg="invalid stored block lengths",t.mode=j;break}if(t.length=r&65535,r=0,o=0,t.mode=At,n===rt)break e;case At:t.mode=Bn;case Bn:if(h=t.length,h){if(h>s&&(h=s),h>c&&(h=c),h===0)break e;l.set(i.subarray(a,a+h),f),s-=h,a+=h,c-=h,f+=h,t.length-=h;break}t.mode=oe;break;case Un:for(;o<14;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.nlen=(r&31)+257,r>>>=5,o-=5,t.ndist=(r&31)+1,r>>>=5,o-=5,t.ncode=(r&15)+4,r>>>=4,o-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=j;break}t.have=0,t.mode=Mn;case Mn:for(;t.have<t.ncode;){for(;o<3;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.lens[w[t.have++]]=r&7,r>>>=3,o-=3}for(;t.have<19;)t.lens[w[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,m={bits:t.lenbits},A=Me(cs,t.lens,0,19,t.lencode,0,t.work,m),t.lenbits=m.bits,A){e.msg="invalid code lengths set",t.mode=j;break}t.have=0,t.mode=jn;case jn:for(;t.have<t.nlen+t.ndist;){for(;I=t.lencode[r&(1<<t.lenbits)-1],d=I>>>24,g=I>>>16&255,N=I&65535,!(d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(N<16)r>>>=d,o-=d,t.lens[t.have++]=N;else{if(N===16){for(O=d+2;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(r>>>=d,o-=d,t.have===0){e.msg="invalid bit length repeat",t.mode=j;break}b=t.lens[t.have-1],h=3+(r&3),r>>>=2,o-=2}else if(N===17){for(O=d+3;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}r>>>=d,o-=d,b=0,h=3+(r&7),r>>>=3,o-=3}else{for(O=d+7;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}r>>>=d,o-=d,b=0,h=11+(r&127),r>>>=7,o-=7}if(t.have+h>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=j;break}for(;h--;)t.lens[t.have++]=b}}if(t.mode===j)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=j;break}if(t.lenbits=9,m={bits:t.lenbits},A=Me(Hi,t.lens,0,t.nlen,t.lencode,0,t.work,m),t.lenbits=m.bits,A){e.msg="invalid literal/lengths set",t.mode=j;break}if(t.distbits=6,t.distcode=t.distdyn,m={bits:t.distbits},A=Me(Vi,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,m),t.distbits=m.bits,A){e.msg="invalid distances set",t.mode=j;break}if(t.mode=at,n===rt)break e;case at:t.mode=st;case st:if(s>=6&&c>=258){e.next_out=f,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=r,t.bits=o,rs(e,_),f=e.next_out,l=e.output,c=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,r=t.hold,o=t.bits,t.mode===oe&&(t.back=-1);break}for(t.back=0;I=t.lencode[r&(1<<t.lenbits)-1],d=I>>>24,g=I>>>16&255,N=I&65535,!(d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(g&&(g&240)===0){for(k=d,u=g,p=N;I=t.lencode[p+((r&(1<<k+u)-1)>>k)],d=I>>>24,g=I>>>16&255,N=I&65535,!(k+d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}r>>>=k,o-=k,t.back+=k}if(r>>>=d,o-=d,t.back+=d,t.length=N,g===0){t.mode=Gn;break}if(g&32){t.back=-1,t.mode=oe;break}if(g&64){e.msg="invalid literal/length code",t.mode=j;break}t.extra=g&15,t.mode=Hn;case Hn:if(t.extra){for(O=t.extra;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.length+=r&(1<<t.extra)-1,r>>>=t.extra,o-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=Vn;case Vn:for(;I=t.distcode[r&(1<<t.distbits)-1],d=I>>>24,g=I>>>16&255,N=I&65535,!(d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if((g&240)===0){for(k=d,u=g,p=N;I=t.distcode[p+((r&(1<<k+u)-1)>>k)],d=I>>>24,g=I>>>16&255,N=I&65535,!(k+d<=o);){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}r>>>=k,o-=k,t.back+=k}if(r>>>=d,o-=d,t.back+=d,g&64){e.msg="invalid distance code",t.mode=j;break}t.offset=N,t.extra=g&15,t.mode=Xn;case Xn:if(t.extra){for(O=t.extra;o<O;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}t.offset+=r&(1<<t.extra)-1,r>>>=t.extra,o-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=j;break}t.mode=qn;case qn:if(c===0)break e;if(h=_-c,t.offset>h){if(h=t.offset-h,h>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=j;break}h>t.wnext?(h-=t.wnext,v=t.wsize-h):v=t.wnext-h,h>t.length&&(h=t.length),T=t.window}else T=l,v=f-t.offset,h=t.length;h>c&&(h=c),c-=h,t.length-=h;do l[f++]=T[v++];while(--h);t.length===0&&(t.mode=st);break;case Gn:if(c===0)break e;l[f++]=t.length,c--,t.mode=st;break;case St:if(t.wrap){for(;o<32;){if(s===0)break e;s--,r|=i[a++]<<o,o+=8}if(_-=c,e.total_out+=_,t.total+=_,t.wrap&4&&_&&(e.adler=t.check=t.flags?H(t.check,l,_,f-_):qe(t.check,l,_,f-_)),_=c,t.wrap&4&&(t.flags?r:Wn(r))!==t.check){e.msg="incorrect data check",t.mode=j;break}r=0,o=0}t.mode=Kn;case Kn:if(t.wrap&&t.flags){for(;o<32;){if(s===0)break e;s--,r+=i[a++]<<o,o+=8}if(t.wrap&4&&r!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=j;break}r=0,o=0}t.mode=Yn;case Yn:A=us;break e;case j:A=Xi;break e;case Gi:return qi;case Ki:default:return D}return e.next_out=f,e.avail_out=c,e.next_in=a,e.avail_in=s,t.hold=r,t.bits=o,(t.wsize||_!==e.avail_out&&t.mode<j&&(t.mode<St||n!==An))&&Di(e,e.output,e.next_out,_-e.avail_out),E-=e.avail_in,_-=e.avail_out,e.total_in+=E,e.total_out+=_,t.total+=_,t.wrap&4&&_&&(e.adler=t.check=t.flags?H(t.check,l,_,e.next_out-_):qe(t.check,l,_,e.next_out-_)),e.data_type=t.bits+(t.last?64:0)+(t.mode===oe?128:0)+(t.mode===at||t.mode===At?256:0),(E===0&&_===0||n===An)&&A===Ee&&(A=_s),A},vs=e=>{if(ve(e))return D;let n=e.state;return n.window&&(n.window=null),e.state=null,Ee},Ns=(e,n)=>{if(ve(e))return D;const t=e.state;return(t.wrap&2)===0?D:(t.head=n,n.done=!1,Ee)},ks=(e,n)=>{const t=n.length;let i,l,a;return ve(e)||(i=e.state,i.wrap!==0&&i.mode!==ht)?D:i.mode===ht&&(l=1,l=qe(l,n,t,0),l!==i.check)?Xi:(a=Di(e,n,t,t),a?(i.mode=Gi,qi):(i.havedict=1,Ee))};var Ts=Wi,As=Ji,Ss=Yi,Os=xs,Fs=Qi,Is=Es,Rs=vs,zs=Ns,Cs=ks,Ls="pako inflate (from Nodeca project)",fe={inflateReset:Ts,inflateReset2:As,inflateResetKeep:Ss,inflateInit:Os,inflateInit2:Fs,inflate:Is,inflateEnd:Rs,inflateGetHeader:zs,inflateSetDictionary:Cs,inflateInfo:Ls};function Ps(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var $s=Ps;const er=Object.prototype.toString,{Z_NO_FLUSH:Zs,Z_FINISH:Bs,Z_OK:Ye,Z_STREAM_END:It,Z_NEED_DICT:Rt,Z_STREAM_ERROR:Us,Z_DATA_ERROR:Qn,Z_MEM_ERROR:Ms}=Je;function et(e){this.options=pt.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Mi,this.strm.avail_out=0;let t=fe.inflateInit2(this.strm,n.windowBits);if(t!==Ye)throw new Error(xe[t]);if(this.header=new $s,fe.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=Ke.string2buf(n.dictionary):er.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(t=fe.inflateSetDictionary(this.strm,n.dictionary),t!==Ye)))throw new Error(xe[t])}et.prototype.push=function(e,n){const t=this.strm,i=this.options.chunkSize,l=this.options.dictionary;let a,f,s;if(this.ended)return!1;for(n===~~n?f=n:f=n===!0?Bs:Zs,er.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),a=fe.inflate(t,f),a===Rt&&l&&(a=fe.inflateSetDictionary(t,l),a===Ye?a=fe.inflate(t,f):a===Qn&&(a=Rt));t.avail_in>0&&a===It&&t.state.wrap>0&&e[t.next_in]!==0;)fe.inflateReset(t),a=fe.inflate(t,f);switch(a){case Us:case Qn:case Rt:case Ms:return this.onEnd(a),this.ended=!0,!1}if(s=t.avail_out,t.next_out&&(t.avail_out===0||a===It))if(this.options.to==="string"){let c=Ke.utf8border(t.output,t.next_out),r=t.next_out-c,o=Ke.buf2string(t.output,c);t.next_out=r,t.avail_out=i-r,r&&t.output.set(t.output.subarray(c,c+r),0),this.onData(o)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(a===Ye&&s===0)){if(a===It)return a=fe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};et.prototype.onData=function(e){this.chunks.push(e)};et.prototype.onEnd=function(e){e===Ye&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=pt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ln(e,n){const t=new et(n);if(t.push(e),t.err)throw t.msg||xe[t.err];return t.result}function js(e,n){return n=n||{},n.raw=!0,ln(e,n)}var Hs=et,Vs=ln,Xs=js,qs=ln,Gs={Inflate:Hs,inflate:Vs,inflateRaw:Xs,ungzip:qs};const{Deflate:Ks,deflate:Ys,deflateRaw:Ws,gzip:Js}=ns,{Inflate:Qs,inflate:Ds,inflateRaw:eo,ungzip:to}=Gs;var no=Ks,io=Ys,ro=Ws,ao=Js,so=Qs,oo=Ds,lo=eo,fo=to,co=Je,uo={Deflate:no,deflate:io,deflateRaw:ro,gzip:ao,Inflate:so,inflate:oo,inflateRaw:lo,ungzip:fo,constants:co},ot={exports:{}},zt={},Ct={},Dn;function fn(){return Dn||(Dn=1,function(e){const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i="["+n+"]["+t+"]*",l=new RegExp("^"+i+"$"),a=function(s,c){const r=[];let o=c.exec(s);for(;o;){const E=[];E.startIndex=c.lastIndex-o[0].length;const _=o.length;for(let h=0;h<_;h++)E.push(o[h]);r.push(E),o=c.exec(s)}return r},f=function(s){const c=l.exec(s);return!(c===null||typeof c>"u")};e.isExist=function(s){return typeof s<"u"},e.isEmptyObject=function(s){return Object.keys(s).length===0},e.merge=function(s,c,r){if(c){const o=Object.keys(c),E=o.length;for(let _=0;_<E;_++)r==="strict"?s[o[_]]=[c[o[_]]]:s[o[_]]=c[o[_]]}},e.getValue=function(s){return e.isExist(s)?s:""},e.isName=f,e.getAllMatches=a,e.nameRegexp=i}(Ct)),Ct}var ei;function tr(){if(ei)return zt;ei=1;const e=fn(),n={allowBooleanAttributes:!1,unpairedTags:[]};zt.validate=function(d,g){g=Object.assign({},n,g);const N=[];let k=!1,u=!1;d[0]==="\uFEFF"&&(d=d.substr(1));for(let p=0;p<d.length;p++)if(d[p]==="<"&&d[p+1]==="?"){if(p+=2,p=i(d,p),p.err)return p}else if(d[p]==="<"){let b=p;if(p++,d[p]==="!"){p=l(d,p);continue}else{let A=!1;d[p]==="/"&&(A=!0,p++);let y="";for(;p<d.length&&d[p]!==">"&&d[p]!==" "&&d[p]!==" "&&d[p]!==`
|
|
2
2
|
`&&d[p]!=="\r";p++)y+=d[p];if(y=y.trim(),y[y.length-1]==="/"&&(y=y.substring(0,y.length-1),p--),!v(y)){let w;return y.trim().length===0?w="Invalid space after '<'.":w="Tag '"+y+"' is an invalid name.",_("InvalidTag",w,T(d,p))}const m=s(d,p);if(m===!1)return _("InvalidAttr","Attributes for '"+y+"' have open quote.",T(d,p));let O=m.value;if(p=m.index,O[O.length-1]==="/"){const w=p-O.length;O=O.substring(0,O.length-1);const x=r(O,g);if(x===!0)k=!0;else return _(x.err.code,x.err.msg,T(d,w+x.err.line))}else if(A)if(m.tagClosed){if(O.trim().length>0)return _("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",T(d,b));if(N.length===0)return _("InvalidTag","Closing tag '"+y+"' has not been opened.",T(d,b));{const w=N.pop();if(y!==w.tagName){let x=T(d,w.tagStartPos);return _("InvalidTag","Expected closing tag '"+w.tagName+"' (opened in line "+x.line+", col "+x.col+") instead of closing tag '"+y+"'.",T(d,b))}N.length==0&&(u=!0)}}else return _("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",T(d,p));else{const w=r(O,g);if(w!==!0)return _(w.err.code,w.err.msg,T(d,p-O.length+w.err.line));if(u===!0)return _("InvalidXml","Multiple possible root nodes found.",T(d,p));g.unpairedTags.indexOf(y)!==-1||N.push({tagName:y,tagStartPos:b}),k=!0}for(p++;p<d.length;p++)if(d[p]==="<")if(d[p+1]==="!"){p++,p=l(d,p);continue}else if(d[p+1]==="?"){if(p=i(d,++p),p.err)return p}else break;else if(d[p]==="&"){const w=E(d,p);if(w==-1)return _("InvalidChar","char '&' is not expected.",T(d,p));p=w}else if(u===!0&&!t(d[p]))return _("InvalidXml","Extra text at the end",T(d,p));d[p]==="<"&&p--}}else{if(t(d[p]))continue;return _("InvalidChar","char '"+d[p]+"' is not expected.",T(d,p))}if(k){if(N.length==1)return _("InvalidTag","Unclosed tag '"+N[0].tagName+"'.",T(d,N[0].tagStartPos));if(N.length>0)return _("InvalidXml","Invalid '"+JSON.stringify(N.map(p=>p.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return _("InvalidXml","Start tag expected.",1);return!0};function t(d){return d===" "||d===" "||d===`
|
|
3
3
|
`||d==="\r"}function i(d,g){const N=g;for(;g<d.length;g++)if(d[g]=="?"||d[g]==" "){const k=d.substr(N,g-N);if(g>5&&k==="xml")return _("InvalidXml","XML declaration allowed only at the start of the document.",T(d,g));if(d[g]=="?"&&d[g+1]==">"){g++;break}else continue}return g}function l(d,g){if(d.length>g+5&&d[g+1]==="-"&&d[g+2]==="-"){for(g+=3;g<d.length;g++)if(d[g]==="-"&&d[g+1]==="-"&&d[g+2]===">"){g+=2;break}}else if(d.length>g+8&&d[g+1]==="D"&&d[g+2]==="O"&&d[g+3]==="C"&&d[g+4]==="T"&&d[g+5]==="Y"&&d[g+6]==="P"&&d[g+7]==="E"){let N=1;for(g+=8;g<d.length;g++)if(d[g]==="<")N++;else if(d[g]===">"&&(N--,N===0))break}else if(d.length>g+9&&d[g+1]==="["&&d[g+2]==="C"&&d[g+3]==="D"&&d[g+4]==="A"&&d[g+5]==="T"&&d[g+6]==="A"&&d[g+7]==="["){for(g+=8;g<d.length;g++)if(d[g]==="]"&&d[g+1]==="]"&&d[g+2]===">"){g+=2;break}}return g}const a='"',f="'";function s(d,g){let N="",k="",u=!1;for(;g<d.length;g++){if(d[g]===a||d[g]===f)k===""?k=d[g]:k!==d[g]||(k="");else if(d[g]===">"&&k===""){u=!0;break}N+=d[g]}return k!==""?!1:{value:N,index:g,tagClosed:u}}const c=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function r(d,g){const N=e.getAllMatches(d,c),k={};for(let u=0;u<N.length;u++){if(N[u][1].length===0)return _("InvalidAttr","Attribute '"+N[u][2]+"' has no space in starting.",I(N[u]));if(N[u][3]!==void 0&&N[u][4]===void 0)return _("InvalidAttr","Attribute '"+N[u][2]+"' is without value.",I(N[u]));if(N[u][3]===void 0&&!g.allowBooleanAttributes)return _("InvalidAttr","boolean attribute '"+N[u][2]+"' is not allowed.",I(N[u]));const p=N[u][2];if(!h(p))return _("InvalidAttr","Attribute '"+p+"' is an invalid name.",I(N[u]));if(!k.hasOwnProperty(p))k[p]=1;else return _("InvalidAttr","Attribute '"+p+"' is repeated.",I(N[u]))}return!0}function o(d,g){let N=/\d/;for(d[g]==="x"&&(g++,N=/[\da-fA-F]/);g<d.length;g++){if(d[g]===";")return g;if(!d[g].match(N))break}return-1}function E(d,g){if(g++,d[g]===";")return-1;if(d[g]==="#")return g++,o(d,g);let N=0;for(;g<d.length;g++,N++)if(!(d[g].match(/\w/)&&N<20)){if(d[g]===";")break;return-1}return g}function _(d,g,N){return{err:{code:d,msg:g,line:N.line||N,col:N.col}}}function h(d){return e.isName(d)}function v(d){return e.isName(d)}function T(d,g){const N=d.substring(0,g).split(/\r?\n/);return{line:N.length,col:N[N.length-1].length+1}}function I(d){return d.startIndex+d[1].length}return zt}var lt={},ti;function ho(){if(ti)return lt;ti=1;const e={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,i){return i},attributeValueProcessor:function(t,i){return i},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,i,l){return t}},n=function(t){return Object.assign({},e,t)};return lt.buildOptions=n,lt.defaultOptions=e,lt}var Lt,ni;function _o(){if(ni)return Lt;ni=1;class e{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,i){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:i})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}return Lt=e,Lt}var Pt,ii;function po(){if(ii)return Pt;ii=1;const e=fn();function n(r,o){const E={};if(r[o+3]==="O"&&r[o+4]==="C"&&r[o+5]==="T"&&r[o+6]==="Y"&&r[o+7]==="P"&&r[o+8]==="E"){o=o+9;let _=1,h=!1,v=!1,T="";for(;o<r.length;o++)if(r[o]==="<"&&!v){if(h&&l(r,o))o+=7,[entityName,val,o]=t(r,o+1),val.indexOf("&")===-1&&(E[c(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(h&&a(r,o))o+=8;else if(h&&f(r,o))o+=8;else if(h&&s(r,o))o+=9;else if(i)v=!0;else throw new Error("Invalid DOCTYPE");_++,T=""}else if(r[o]===">"){if(v?r[o-1]==="-"&&r[o-2]==="-"&&(v=!1,_--):_--,_===0)break}else r[o]==="["?h=!0:T+=r[o];if(_!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:E,i:o}}function t(r,o){let E="";for(;o<r.length&&r[o]!=="'"&&r[o]!=='"';o++)E+=r[o];if(E=E.trim(),E.indexOf(" ")!==-1)throw new Error("External entites are not supported");const _=r[o++];let h="";for(;o<r.length&&r[o]!==_;o++)h+=r[o];return[E,h,o]}function i(r,o){return r[o+1]==="!"&&r[o+2]==="-"&&r[o+3]==="-"}function l(r,o){return r[o+1]==="!"&&r[o+2]==="E"&&r[o+3]==="N"&&r[o+4]==="T"&&r[o+5]==="I"&&r[o+6]==="T"&&r[o+7]==="Y"}function a(r,o){return r[o+1]==="!"&&r[o+2]==="E"&&r[o+3]==="L"&&r[o+4]==="E"&&r[o+5]==="M"&&r[o+6]==="E"&&r[o+7]==="N"&&r[o+8]==="T"}function f(r,o){return r[o+1]==="!"&&r[o+2]==="A"&&r[o+3]==="T"&&r[o+4]==="T"&&r[o+5]==="L"&&r[o+6]==="I"&&r[o+7]==="S"&&r[o+8]==="T"}function s(r,o){return r[o+1]==="!"&&r[o+2]==="N"&&r[o+3]==="O"&&r[o+4]==="T"&&r[o+5]==="A"&&r[o+6]==="T"&&r[o+7]==="I"&&r[o+8]==="O"&&r[o+9]==="N"}function c(r){if(e.isName(r))return r;throw new Error(`Invalid entity name ${r}`)}return Pt=n,Pt}var $t,ri;function go(){if(ri)return $t;ri=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const t={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function i(a,f={}){if(f=Object.assign({},t,f),!a||typeof a!="string")return a;let s=a.trim();if(f.skipLike!==void 0&&f.skipLike.test(s))return a;if(f.hex&&e.test(s))return Number.parseInt(s,16);{const c=n.exec(s);if(c){const r=c[1],o=c[2];let E=l(c[3]);const _=c[4]||c[6];if(!f.leadingZeros&&o.length>0&&r&&s[2]!==".")return a;if(!f.leadingZeros&&o.length>0&&!r&&s[1]!==".")return a;{const h=Number(s),v=""+h;return v.search(/[eE]/)!==-1||_?f.eNotation?h:a:s.indexOf(".")!==-1?v==="0"&&E===""||v===E||r&&v==="-"+E?h:a:o?E===v||r+E===v?h:a:s===v||s===r+v?h:a}}else return a}}function l(a){return a&&a.indexOf(".")!==-1&&(a=a.replace(/0+$/,""),a==="."?a="0":a[0]==="."?a="0"+a:a[a.length-1]==="."&&(a=a.substr(0,a.length-1))),a}return $t=i,$t}var Zt,ai;function nr(){if(ai)return Zt;ai=1;function e(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const i of n)if(typeof i=="string"&&t===i||i instanceof RegExp&&i.test(t))return!0}:()=>!1}return Zt=e,Zt}var Bt,si;function bo(){if(si)return Bt;si=1;const e=fn(),n=_o(),t=po(),i=go(),l=nr();class a{constructor(p){this.options=p,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(b,A)=>String.fromCharCode(Number.parseInt(A,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(b,A)=>String.fromCharCode(Number.parseInt(A,16))}},this.addExternalEntities=f,this.parseXml=E,this.parseTextData=s,this.resolveNameSpace=c,this.buildAttributesMap=o,this.isItStopNode=T,this.replaceEntitiesValue=h,this.readStopNodeData=N,this.saveTextToParentTag=v,this.addChild=_,this.ignoreAttributesFn=l(this.options.ignoreAttributes)}}function f(u){const p=Object.keys(u);for(let b=0;b<p.length;b++){const A=p[b];this.lastEntities[A]={regex:new RegExp("&"+A+";","g"),val:u[A]}}}function s(u,p,b,A,y,m,O){if(u!==void 0&&(this.options.trimValues&&!A&&(u=u.trim()),u.length>0)){O||(u=this.replaceEntitiesValue(u));const w=this.options.tagValueProcessor(p,u,b,y,m);return w==null?u:typeof w!=typeof u||w!==u?w:this.options.trimValues?k(u,this.options.parseTagValue,this.options.numberParseOptions):u.trim()===u?k(u,this.options.parseTagValue,this.options.numberParseOptions):u}}function c(u){if(this.options.removeNSPrefix){const p=u.split(":"),b=u.charAt(0)==="/"?"/":"";if(p[0]==="xmlns")return"";p.length===2&&(u=b+p[1])}return u}const r=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function o(u,p,b){if(this.options.ignoreAttributes!==!0&&typeof u=="string"){const A=e.getAllMatches(u,r),y=A.length,m={};for(let O=0;O<y;O++){const w=this.resolveNameSpace(A[O][1]);if(this.ignoreAttributesFn(w,p))continue;let x=A[O][4],S=this.options.attributeNamePrefix+w;if(w.length)if(this.options.transformAttributeName&&(S=this.options.transformAttributeName(S)),S==="__proto__"&&(S="#__proto__"),x!==void 0){this.options.trimValues&&(x=x.trim()),x=this.replaceEntitiesValue(x);const F=this.options.attributeValueProcessor(w,x,p);F==null?m[S]=x:typeof F!=typeof x||F!==x?m[S]=F:m[S]=k(x,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(m[S]=!0)}if(!Object.keys(m).length)return;if(this.options.attributesGroupName){const O={};return O[this.options.attributesGroupName]=m,O}return m}}const E=function(u){u=u.replace(/\r\n?/g,`
|
|
4
4
|
`);const p=new n("!xml");let b=p,A="",y="";for(let m=0;m<u.length;m++)if(u[m]==="<")if(u[m+1]==="/"){const w=d(u,">",m,"Closing Tag is not closed.");let x=u.substring(m+2,w).trim();if(this.options.removeNSPrefix){const R=x.indexOf(":");R!==-1&&(x=x.substr(R+1))}this.options.transformTagName&&(x=this.options.transformTagName(x)),b&&(A=this.saveTextToParentTag(A,b,y));const S=y.substring(y.lastIndexOf(".")+1);if(x&&this.options.unpairedTags.indexOf(x)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${x}>`);let F=0;S&&this.options.unpairedTags.indexOf(S)!==-1?(F=y.lastIndexOf(".",y.lastIndexOf(".")-1),this.tagsNodeStack.pop()):F=y.lastIndexOf("."),y=y.substring(0,F),b=this.tagsNodeStack.pop(),A="",m=w}else if(u[m+1]==="?"){let w=g(u,m,!1,"?>");if(!w)throw new Error("Pi Tag is not closed.");if(A=this.saveTextToParentTag(A,b,y),!(this.options.ignoreDeclaration&&w.tagName==="?xml"||this.options.ignorePiTags)){const x=new n(w.tagName);x.add(this.options.textNodeName,""),w.tagName!==w.tagExp&&w.attrExpPresent&&(x[":@"]=this.buildAttributesMap(w.tagExp,y,w.tagName)),this.addChild(b,x,y)}m=w.closeIndex+1}else if(u.substr(m+1,3)==="!--"){const w=d(u,"-->",m+4,"Comment is not closed.");if(this.options.commentPropName){const x=u.substring(m+4,w-2);A=this.saveTextToParentTag(A,b,y),b.add(this.options.commentPropName,[{[this.options.textNodeName]:x}])}m=w}else if(u.substr(m+1,2)==="!D"){const w=t(u,m);this.docTypeEntities=w.entities,m=w.i}else if(u.substr(m+1,2)==="!["){const w=d(u,"]]>",m,"CDATA is not closed.")-2,x=u.substring(m+9,w);A=this.saveTextToParentTag(A,b,y);let S=this.parseTextData(x,b.tagname,y,!0,!1,!0,!0);S==null&&(S=""),this.options.cdataPropName?b.add(this.options.cdataPropName,[{[this.options.textNodeName]:x}]):b.add(this.options.textNodeName,S),m=w+2}else{let w=g(u,m,this.options.removeNSPrefix),x=w.tagName;const S=w.rawTagName;let F=w.tagExp,R=w.attrExpPresent,C=w.closeIndex;this.options.transformTagName&&(x=this.options.transformTagName(x)),b&&A&&b.tagname!=="!xml"&&(A=this.saveTextToParentTag(A,b,y,!1));const Z=b;if(Z&&this.options.unpairedTags.indexOf(Z.tagname)!==-1&&(b=this.tagsNodeStack.pop(),y=y.substring(0,y.lastIndexOf("."))),x!==p.tagname&&(y+=y?"."+x:x),this.isItStopNode(this.options.stopNodes,y,x)){let M="";if(F.length>0&&F.lastIndexOf("/")===F.length-1)x[x.length-1]==="/"?(x=x.substr(0,x.length-1),y=y.substr(0,y.length-1),F=x):F=F.substr(0,F.length-1),m=w.closeIndex;else if(this.options.unpairedTags.indexOf(x)!==-1)m=w.closeIndex;else{const ee=this.readStopNodeData(u,S,C+1);if(!ee)throw new Error(`Unexpected end of ${S}`);m=ee.i,M=ee.tagContent}const q=new n(x);x!==F&&R&&(q[":@"]=this.buildAttributesMap(F,y,x)),M&&(M=this.parseTextData(M,x,y,!0,R,!0,!0)),y=y.substr(0,y.lastIndexOf(".")),q.add(this.options.textNodeName,M),this.addChild(b,q,y)}else{if(F.length>0&&F.lastIndexOf("/")===F.length-1){x[x.length-1]==="/"?(x=x.substr(0,x.length-1),y=y.substr(0,y.length-1),F=x):F=F.substr(0,F.length-1),this.options.transformTagName&&(x=this.options.transformTagName(x));const M=new n(x);x!==F&&R&&(M[":@"]=this.buildAttributesMap(F,y,x)),this.addChild(b,M,y),y=y.substr(0,y.lastIndexOf("."))}else{const M=new n(x);this.tagsNodeStack.push(b),x!==F&&R&&(M[":@"]=this.buildAttributesMap(F,y,x)),this.addChild(b,M,y),b=M}A="",m=C}}else A+=u[m];return p.child};function _(u,p,b){const A=this.options.updateTag(p.tagname,b,p[":@"]);A===!1||(typeof A=="string"&&(p.tagname=A),u.addChild(p))}const h=function(u){if(this.options.processEntities){for(let p in this.docTypeEntities){const b=this.docTypeEntities[p];u=u.replace(b.regx,b.val)}for(let p in this.lastEntities){const b=this.lastEntities[p];u=u.replace(b.regex,b.val)}if(this.options.htmlEntities)for(let p in this.htmlEntities){const b=this.htmlEntities[p];u=u.replace(b.regex,b.val)}u=u.replace(this.ampEntity.regex,this.ampEntity.val)}return u};function v(u,p,b,A){return u&&(A===void 0&&(A=Object.keys(p.child).length===0),u=this.parseTextData(u,p.tagname,b,!1,p[":@"]?Object.keys(p[":@"]).length!==0:!1,A),u!==void 0&&u!==""&&p.add(this.options.textNodeName,u),u=""),u}function T(u,p,b){const A="*."+b;for(const y in u){const m=u[y];if(A===m||p===m)return!0}return!1}function I(u,p,b=">"){let A,y="";for(let m=p;m<u.length;m++){let O=u[m];if(A)O===A&&(A="");else if(O==='"'||O==="'")A=O;else if(O===b[0])if(b[1]){if(u[m+1]===b[1])return{data:y,index:m}}else return{data:y,index:m};else O===" "&&(O=" ");y+=O}}function d(u,p,b,A){const y=u.indexOf(p,b);if(y===-1)throw new Error(A);return y+p.length-1}function g(u,p,b,A=">"){const y=I(u,p+1,A);if(!y)return;let m=y.data;const O=y.index,w=m.search(/\s/);let x=m,S=!0;w!==-1&&(x=m.substring(0,w),m=m.substring(w+1).trimStart());const F=x;if(b){const R=x.indexOf(":");R!==-1&&(x=x.substr(R+1),S=x!==y.data.substr(R+1))}return{tagName:x,tagExp:m,closeIndex:O,attrExpPresent:S,rawTagName:F}}function N(u,p,b){const A=b;let y=1;for(;b<u.length;b++)if(u[b]==="<")if(u[b+1]==="/"){const m=d(u,">",b,`${p} is not closed`);if(u.substring(b+2,m).trim()===p&&(y--,y===0))return{tagContent:u.substring(A,b),i:m};b=m}else if(u[b+1]==="?")b=d(u,"?>",b+1,"StopNode is not closed.");else if(u.substr(b+1,3)==="!--")b=d(u,"-->",b+3,"StopNode is not closed.");else if(u.substr(b+1,2)==="![")b=d(u,"]]>",b,"StopNode is not closed.")-2;else{const m=g(u,b,">");m&&((m&&m.tagName)===p&&m.tagExp[m.tagExp.length-1]!=="/"&&y++,b=m.closeIndex)}}function k(u,p,b){if(p&&typeof u=="string"){const A=u.trim();return A==="true"?!0:A==="false"?!1:i(u,b)}else return e.isExist(u)?u:""}return Bt=a,Bt}var Ut={},oi;function wo(){if(oi)return Ut;oi=1;function e(a,f){return n(a,f)}function n(a,f,s){let c;const r={};for(let o=0;o<a.length;o++){const E=a[o],_=t(E);let h="";if(s===void 0?h=_:h=s+"."+_,_===f.textNodeName)c===void 0?c=E[_]:c+=""+E[_];else{if(_===void 0)continue;if(E[_]){let v=n(E[_],f,h);const T=l(v,f);E[":@"]?i(v,E[":@"],h,f):Object.keys(v).length===1&&v[f.textNodeName]!==void 0&&!f.alwaysCreateTextNode?v=v[f.textNodeName]:Object.keys(v).length===0&&(f.alwaysCreateTextNode?v[f.textNodeName]="":v=""),r[_]!==void 0&&r.hasOwnProperty(_)?(Array.isArray(r[_])||(r[_]=[r[_]]),r[_].push(v)):f.isArray(_,h,T)?r[_]=[v]:r[_]=v}}}return typeof c=="string"?c.length>0&&(r[f.textNodeName]=c):c!==void 0&&(r[f.textNodeName]=c),r}function t(a){const f=Object.keys(a);for(let s=0;s<f.length;s++){const c=f[s];if(c!==":@")return c}}function i(a,f,s,c){if(f){const r=Object.keys(f),o=r.length;for(let E=0;E<o;E++){const _=r[E];c.isArray(_,s+"."+_,!0,!0)?a[_]=[f[_]]:a[_]=f[_]}}}function l(a,f){const{textNodeName:s}=f,c=Object.keys(a).length;return!!(c===0||c===1&&(a[s]||typeof a[s]=="boolean"||a[s]===0))}return Ut.prettify=e,Ut}var Mt,li;function yo(){if(li)return Mt;li=1;const{buildOptions:e}=ho(),n=bo(),{prettify:t}=wo(),i=tr();class l{constructor(f){this.externalEntities={},this.options=e(f)}parse(f,s){if(typeof f!="string")if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(s){s===!0&&(s={});const o=i.validate(f,s);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}const c=new n(this.options);c.addExternalEntities(this.externalEntities);const r=c.parseXml(f);return this.options.preserveOrder||r===void 0?r:t(r,this.options)}addEntity(f,s){if(s.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(s==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[f]=s}}return Mt=l,Mt}var jt,fi;function xo(){if(fi)return jt;fi=1;const e=`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i,bX as e,bn as a,W as s}from"./vendor-mui-core-
|
|
1
|
+
import{j as i,bX as e,bn as a,W as s}from"./vendor-mui-core-CKKG_1TN.js";import{l}from"./vendor-ux-DjXlxcvL.js";const r=l(t=>i.jsx(a,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.primary.main,opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:t.palette.primary.main,border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.grey[200],opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function c({labelProps:t=null,...o}){return t?i.jsx(e,{control:i.jsx(r,{...o}),...t}):i.jsx(r,{...o})}c.propTypes={labelProps:s.object};export{c as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,at as r}from"./vendor-mui-core-CKKG_1TN.js";import{r as s}from"./vendor-react-CTtPmzVP.js";import{b9 as a}from"./vendor-ux-DjXlxcvL.js";import{W as n}from"./index-DI4CWTXR.js";import"./vendor-utils-CUs2ebe7.js";import"./vendor-hooks-DQAdyHrE.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BCP2x3BR.js";function l(){const{t:o}=s.useContext(a);return t.jsx(p,{style:{paddingTop:"25vh"},children:t.jsx(n,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const p=r.main``;export{l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as x}from"./vendor-react-CTtPmzVP.js";import{j as e,W as d,am as mt,ak as N,T as Q,U as ke,y as Fe,bk as Ve,b$ as Re,bX as Te,a5 as Ie,Q as Ce,dH as Pe,aN as Ee,a6 as Ge,D as Qe,cD as ht,ad as Xe,e4 as gt,e5 as xt,at as ae,b4 as He,n as bt,J as yt,x as jt,bZ as St,M as qe,cB as vt}from"./vendor-mui-core-DnR6WYuU.js";import{e as ee,l as Ct,v as pe}from"./vendor-utils-DCMKu06e.js";import{W as q,b9 as Nt,V as Y,df as wt,m as Ye,$ as Ze,F as Ae,b2 as Je,bD as be,aZ as Rt,bb as Tt,bj as It,bt as Et}from"./vendor-ux-B0gV9NvH.js";import{Z as At,Q as H,c as E,C as Dt,a1 as Ue}from"./index-CQgzjKgB.js";import{a as X,g as De}from"./vendor-hooks-BQWlJm53.js";import{S as me}from"./shorten-label-C4py9TLA.js";import{v as et}from"./index-BWDWEkUF.js";import{R as tt,A as Ot,S as Lt,a as kt,B as Ft}from"./list-CHI1rCEg.js";import{i as Pt,e as _t,N as Bt}from"./team-DDjNXwXE.js";import{W as zt}from"./did-address-CsOJBoiY.js";import{p as st}from"./util-DuMKfKo8.js";import{D as Wt,g as Mt}from"./traffic-mcbpWOFq.js";import{B as nt}from"./bundle-avatar-Cc_6nw01.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-Cnwtqa7s.js";import"./server-logo-notext.svg-BLAdvsmP.js";import"./session-C2ZBRIpv.js";import"./isURL-CJRImg0N.js";import"./use-app-logo-BuyF983S.js";import"./base32-_D4eWUeh.js";import"./useAsyncRetry-BMmRgSGm.js";import"./useAsync-ZGLJQow7.js";import"./iframe-Dqu4MSyW.js";import"./index-Cp0b8q3A.js";import"./index-DBs9Ljax.js";import"./base-chart-DhxjAyBU.js";import"./index-BsohFwTm.js";import"./vendor-mui-x-CQc01l4r.js";import"./AdapterDayjs-DafRMFLg.js";const at=x.createContext({}),{Provider:Kt,Consumer:Hs}=at;function Ht({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:i}}=At(),[l,b]=x.useState([]),[m,S]=x.useState({total:0,pageSize:20,pageCount:0,page:1}),h=X(()=>s.meta?.did,[s]),[y,v]=x.useState([]),[P,F]=x.useState({}),w=X(()=>l.length?new Set(l.map(p=>p.id)):new Set,[l]),U=async({page:p=1,pageSize:g=20,...T}={})=>{if(!h)return[];try{const D={paging:{page:p,pageSize:g},...T,teamDid:h,dateRange:T.dateRange?[H(T.dateRange[0]).toISOString(),H(T.dateRange[1]).toISOString()]:void 0},{dids:O,...z}=D;let _="";O&&O.includes("system")&&(_="system");const ie=O?O.filter(oe=>oe!=="system"):[],se={...z,source:_,componentDids:ie},J=await n.getNotificationSendLog({input:se});return F(se),b(J.list),S(J.paging),J.list}catch(D){return q.error(D.message),[]}},M=async()=>{const p=await n.getNotificationComponents({input:{teamDid:h}});v(p.componentDids)},L=x.useCallback(p=>{const g=s.children.find(T=>T.meta?.did===p);if(g)return g.ancestors=[s],g},[s]),k=async({notificationId:p,receivers:g,channels:T,...D})=>{await n.resendNotification({input:{teamDid:h,notificationId:p,receivers:g,channels:T.map(O=>O==="wallet"?E.NOTIFICATION_SEND_CHANNEL.WALLET:O==="pushKit"?E.NOTIFICATION_SEND_CHANNEL.PUSH:O),...D}})},$=x.useCallback(async p=>(await n.getUser({input:{teamDid:h,user:{did:p},options:{enableConnectedAccount:!0}}})).user,[n,h]),V=x.useCallback(async({page:p=1,pageSize:g=20,...T}={})=>{try{const D={paging:{page:p,pageSize:g},...T,userName:T.searchText||"",teamDid:h,dateRange:T.dateRange?[H(T.dateRange[0]).toISOString(),H(T.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:D})}catch(D){throw q.error(D.message),D}},[n,h]);x.useEffect(()=>{h&&M()},[h]),i(E.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,p=>{w.has(p.notificationId)&&U(P)},[w,P]),i(E.EVENTS.NOTIFICATION_BLOCKLET_CREATE,p=>{w.has(p.id)||U(P)},[w,P]);const Z={fetch:U,data:l,paging:m,blocklet:s,getComponent:L,resendNotification:k,getUser:$,componentDids:y,getReceivers:V,inService:r,teamDid:h};return e.jsx(Kt,{value:{notificationRecords:Z},children:t})}function _e(){const{notificationRecords:t}=x.useContext(at);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const qt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(Nt,{type:qt[t],children:t})}const Ut=(t,s,n="")=>{if(!n||!s)return"";switch(n){case E.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function it(t,s,n={}){const{status:r,updatedAt:i,reason:l="",channel:b="wallet"}=n,m=i?t("notification.sendStatus.sentTime",{date:Dt(i,s)}):"",S=Ut(t,b,l);return r===E.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:m,reason:S}:r===E.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:m}:{status:"pending",title:t("notification.sendStatus.pending"),reason:S,sentTime:m}}const Oe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Le=["wallet","pushKit","email"],$e=["info","success","error","warning"],ot=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},rt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},$t=(t,s)=>{const n=ee(s,"extra.notifications.email",!0);return{available:ot(t),enabled:n}},Vt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:rt(t),enabled:n}},Gt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),Qt=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),ge=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),Xt=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],xe=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},Yt=(t,s="")=>{if(s&&Le.includes(s)){const l=`${s}SendRecord`,b=ee(t,l,[]);return xe(b)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return xe(l)}const i={};return Le.forEach(l=>{const b=`${l}SendRecord`,m=ee(t,b,[]),S=xe(m);i[l]=S}),r.length>0&&r.forEach(l=>{const b=n[l]??[],m=xe(b);i[l]=m}),i},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},je=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},Zt=t=>{switch(t){case E.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case E.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case E.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case E.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},lt=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:i,title:l="",sentTime:b="",reason:m=""}=t,S=[l,m].filter(Boolean).join(", ");return e.jsx(mt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(Q,{color:"inherit",sx:{fontSize:12},children:S}),e.jsx("span",{children:b})]}):null,arrow:!0,placement:"top",children:e.jsxs(N,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(N,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(N,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Oe[i]}}),e.jsx(N,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Oe[i]}})]}),e.jsx(Q,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Se.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Se({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:i}=Y();return e.jsxs(N,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(Q,{children:[s,": "]}),t.map(l=>{const b=it(r,i,{status:l});return e.jsx(ke,{size:"small",label:e.jsx(N,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:b,enableTooltip:!1,children:b.title})}),onDelete:m=>n(m,l)},l)})]})}Be.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function Be({filterList:t,onChange:s,index:n,column:r,filterValues:i,label:l,renderLabel:b}){return e.jsxs(Fe,{className:"filter-container",children:[e.jsx(Ve,{component:"legend",children:l}),e.jsx(Re,{row:!0,children:i.map(m=>e.jsx(Te,{control:e.jsx(Ie,{checked:t[n].indexOf(m.value??m)>-1,onChange:S=>{const h=[...t];S.target.checked?h[n]=[...h[n],m.value??m]:h[n]=h[n].filter(y=>y!==(m.value??m)),s(h[n],n,r)},name:m.value??m}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:b(m)})},m.value??m))})]})}function we(t){return e.jsx(Be,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:i}){const{t:l,locale:b}=Y(),m=it(l,b,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(N,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:m,showTitle:!0}),m.status!=="success"&&e.jsx(Ce,{className:"resend-btn",size:"small",startIcon:e.jsx(Pe,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:i,children:l("notification.resend")})]})}ze.propTypes={value:d.array.isRequired,onChange:d.func};function ze({value:t,onChange:s}){const{locale:n}=Y(),r=H().toDate(),[i,l]=x.useState(null),b=x.useCallback(h=>{l(i?null:h.currentTarget)},[i]),m=!!i,S=x.useCallback(h=>{if(!h.startDate||!h.endDate){q.error("Please select a date range");return}if(H(h.startDate).isAfter(h.endDate)||!H(h.startDate).isValid()||!H(h.endDate).isValid()){q.error("Invalid date range");return}s([h.startDate,h.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(Q,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ce,{onClick:b,variant:"outlined",size:"small",color:"inherit",children:[Ue(t[0],n)," - ",Ue(t[1],n)]})}),e.jsx(Ee,{open:m,anchorEl:i,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Wt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:b,definedRanges:Mt(r),onChange:S})})]})}We.propTypes={itemComponent:d.elementType.isRequired};function We({itemComponent:t,...s}){const{t:n}=Y();return!s?.filterList?.filter(i=>i.length).length?null:e.jsxs(N,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(wt.TableFilterList,{...s,ItemComponent:t})})]})}function Me({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const i=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(ke,{label:t,variant:"outlined",...i&&l?{onDelete:i}:{}})}Me.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const Jt=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];ct.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function ct({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Y(),[i,l]=x.useState(Jt),[b,m]=x.useState(!0),S=(y,v)=>{v.checked=y.target.checked;const P=i.map(F=>({...F,checked:F.value===v.value?v.checked:F.checked}));l(P)},h=y=>{y.stopPropagation(),n({channels:i.filter(v=>v.checked).map(v=>v.value),isResendFailedOnly:b})};return e.jsxs(N,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(Q,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(N,{className:"choose-channel",children:e.jsxs(Fe,{component:"fieldset",variant:"standard",children:[e.jsx(Ve,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Re,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:i.map(y=>e.jsx(Te,{control:e.jsx(Ie,{checked:y.checked,onChange:v=>S(v,y),name:y.value}),label:y.label},y.value))})]})}),e.jsx(N,{className:"resend-config-footer",children:e.jsx(Re,{children:e.jsx(Te,{control:e.jsx(Ie,{checked:b,onChange:y=>m(y.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(N,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ce,{onClick:y=>{y.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ce,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Ge,{size:16}),r("common.confirm")]})]})]})}dt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function dt({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:i}=Y(),l=Qe(),b=x.useMemo(()=>Ye(l,lt()),[l]),{getReceivers:m,inService:S,teamDid:h,getUser:y,blocklet:v}=_e(),[P,F]=x.useState(!1),[w,U]=x.useState([]),M=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[k,$]=x.useState(null),[V,Z]=x.useState({total:0,pageSize:10,pageCount:0,page:1}),[p,g]=x.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[T,D]=x.useState([]),O=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],z=async()=>{if(!P&&t)try{F(!0);const a=await m({notificationId:t,...p}),o=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,S)}}));U(o),Z(a.paging),F(!1)}catch(a){q.error(a.message),F(!1)}};x.useEffect(()=>{z()},[p]);const _=a=>{a.stopPropagation();const o=a.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ie=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(Pe,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:_,children:r("notification.resend")})}):null,se={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:V.page-1,rowsPerPage:V.pageSize,count:V.total,searchText:p.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:T,onRowSelectionChange:(a,o)=>{D(o.map(c=>c.dataIndex))},customToolbarSelect:ie},J=({page:a,rowsPerPage:o,searchText:c,filterList:C})=>{const[,B=[],G=[],K=[]]=C;p.pageSize!==o?g(W=>({...W,pageSize:o,page:1})):p.page!==a+1?g(W=>({...W,page:a+1})):p.searchText!==c?g(W=>({...W,searchText:c,page:1})):pe(B,p.walletSendStatus)?pe(G,p.pushKitSendStatus)?pe(K,p.emailSendStatus)||g(W=>({...W,emailSendStatus:K,page:1})):g(W=>({...W,pushKitSendStatus:G,page:1})):g(W=>({...W,walletSendStatus:B,page:1}))},oe=x.useCallback(async(a,o)=>{if(!o)return!1;const c=await y(o);return c?a==="wallet"?Gt(c):a==="email"?$t(v,c):a==="pushKit"?Vt(v,c):a==="webhook"?Qt(c):!0:!1},[y,v]),Ne=x.useCallback(a=>Xt(r,a),[r]),f=()=>{M.anchorEl=null,M.position=null,$(null)},u=()=>{L.anchorEl=null,L.position=null},j=async(a,o,c=!0,C="")=>{if(!(!o.length||!a.length))try{s(a,o,c,C),L.anchorEl||(await ge(.5),f())}catch(B){console.error("handleResend error",{error:B})}},I=async({channels:a,isResendFailedOnly:o})=>{const c=T.map(C=>w[C].receiver);await j(a,c,o),await ge(.5),u(),D([])},A=async(a,o=[],c=!0)=>{try{await j(["webhook"],[a.receiver],c,o)}catch(C){q.error(C.response?C.response.statusText:C.message)}},R=async(a,o,c,C=[],B=!0)=>{if(a.stopPropagation(),Yt(o,c)>=4){q.warning(r("notification.resendLimit"));return}if(!Le.includes(c)){await A(o,C,B);return}if(a){const K=a.currentTarget,W=K.getBoundingClientRect();M.anchorEl=K,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}$({channel:c});try{const K=await oe(c,o.receiver);await ge(1),$({channel:c,result:K}),(typeof K=="boolean"&&K||Ct(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[o.receiver],B),L.anchorEl||(await ge(.5),f()))}catch(K){q.error(K.message)}},re=a=>{g(o=>({...o,dateRange:a,page:1}))},ne=(a,o,c,C)=>{a.stopPropagation();const B=c.filter(G=>G!==o);g(G=>({...G,[C]:B,page:1}))},le=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:o,receiver:c}=w[a];return o?e.jsxs(N,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(zt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:p.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Wallet",filterList:a,onChange:o,index:c,column:C,filterValues:O})},customBodyRenderLite:a=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"wallet",onResend:B=>R(B,w[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"pushkit",onResend:B=>R(B,w[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:p.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Push Kit",filterList:a,onChange:o,index:c,column:C,filterValues:O})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"email",onResend:B=>R(B,w[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:p.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Email",filterList:a,onChange:o,index:c,column:C,filterValues:O})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:o}=w[a];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[C,B]=c,G=B[0];return e.jsx(N,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(N,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:C},C),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:K=>R(K,w[a],"webhook",[C],!1)})]},C)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:o}=w[a];return e.jsx(tt,{value:o,locale:i,shouldUpdate:!0})}}}],[w,i,p,r]),ft=[e.jsx(ze,{value:p.dateRange,onChange:re},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:P,startIcon:e.jsx(ht,{}),onClick:()=>z(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(N,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(ts,{children:e.jsxs(Xe,{theme:b,children:[e.jsx(Je,{className:"receivers-table",locale:i,loading:P,columns:le,data:w,onChange:J,options:se,customButtons:ft,components:{TableFilterList:a=>e.jsx(We,{...a,itemComponent:o=>e.jsx(Me,{...o,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ee,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ss,{children:[e.jsxs(Q,{variant:"body1",component:"div",className:"check-title",children:[k?.channel," Checking"]}),e.jsx(N,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:Ne(k?.channel).map(a=>{const{type:o,pass:c,fail:C}=a;return!k?.result||k?.result?.[o]?e.jsxs(Q,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:k?.result?.[o]?be.success.main:"inherit"},children:[k?.result?e.jsx(gt,{}):e.jsx(Ge,{size:12,sx:{color:be.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs(Q,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:be.error.main},children:[e.jsx(xt,{}),e.jsx("span",{children:C})]},o)})})]})}),L.anchorEl&&e.jsx(Ee,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:u,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(ct,{loading:n,onCancel:u,onConfirm:I})})]})})})}const es=x.memo(dt),ts=ae.div`
|
|
1
|
+
import{r as x}from"./vendor-react-CTtPmzVP.js";import{j as e,W as d,am as mt,ak as N,T as Y,U as ke,y as Fe,bk as Ve,b$ as Re,bX as Te,a5 as Ie,Q as Ce,dH as Pe,aN as Ee,a6 as Ge,D as Ye,cD as ht,ad as Qe,e5 as gt,e6 as xt,at as ae,b4 as He,n as bt,J as yt,x as jt,bZ as St,M as qe,cB as vt}from"./vendor-mui-core-CKKG_1TN.js";import{e as ee,l as Ct,w as pe}from"./vendor-utils-CUs2ebe7.js";import{W as q,ba as Nt,V as X,dg as wt,m as Xe,Y as Ze,F as Ae,b3 as Je,bE as be,a_ as Rt,bc as Tt,bk as It,bu as Et}from"./vendor-ux-DjXlxcvL.js";import{Z as At,Q as H,c as E,C as Dt,a1 as Ue}from"./index-DI4CWTXR.js";import{a as Q,g as De}from"./vendor-hooks-DQAdyHrE.js";import{S as me}from"./shorten-label-DXFyDHDr.js";import{v as et}from"./index-BSZ3mQac.js";import{R as tt,A as Ot,S as Lt,a as kt,B as Ft}from"./list-BWd3aUjb.js";import{i as Pt,e as _t,N as Bt}from"./team-YWd-FRKh.js";import{W as zt}from"./did-address-Cq16cwTy.js";import{p as st}from"./util-GXkeqbBQ.js";import{D as Wt,g as Mt}from"./traffic-0IuWlrAD.js";import{B as nt}from"./bundle-avatar-2AQWR0ld.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BCP2x3BR.js";import"./server-logo-notext.svg-BLAdvsmP.js";import"./session-CZpDtsCZ.js";import"./isURL-DMMDDAKA.js";import"./use-app-logo-hIHAHSSI.js";import"./base32-z3esjJBn.js";import"./useAsyncRetry-B_bXUXWM.js";import"./useAsync-D6IP8T2e.js";import"./iframe-CqiUrjUO.js";import"./index-KUC3HPt0.js";import"./index-DBs9Ljax.js";import"./base-chart-DT--nPCU.js";import"./index-CaQuyP_U.js";import"./vendor-mui-x-DHGvg6Bj.js";import"./AdapterDayjs-C1bdndja.js";const at=x.createContext({}),{Provider:Kt,Consumer:Hs}=at;function Ht({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:i}}=At(),[l,b]=x.useState([]),[m,S]=x.useState({total:0,pageSize:20,pageCount:0,page:1}),h=Q(()=>s.meta?.did,[s]),[y,v]=x.useState([]),[P,F]=x.useState({}),w=Q(()=>l.length?new Set(l.map(p=>p.id)):new Set,[l]),U=async({page:p=1,pageSize:g=20,...T}={})=>{if(!h)return[];try{const D={paging:{page:p,pageSize:g},...T,teamDid:h,dateRange:T.dateRange?[H(T.dateRange[0]).toISOString(),H(T.dateRange[1]).toISOString()]:void 0},{dids:O,...z}=D;let _="";O&&O.includes("system")&&(_="system");const ie=O?O.filter(oe=>oe!=="system"):[],se={...z,source:_,componentDids:ie},J=await n.getNotificationSendLog({input:se});return F(se),b(J.list),S(J.paging),J.list}catch(D){return q.error(D.message),[]}},M=async()=>{const p=await n.getNotificationComponents({input:{teamDid:h}});v(p.componentDids)},L=x.useCallback(p=>{const g=s.children.find(T=>T.meta?.did===p);if(g)return g.ancestors=[s],g},[s]),k=async({notificationId:p,receivers:g,channels:T,...D})=>{await n.resendNotification({input:{teamDid:h,notificationId:p,receivers:g,channels:T.map(O=>O==="wallet"?E.NOTIFICATION_SEND_CHANNEL.WALLET:O==="pushKit"?E.NOTIFICATION_SEND_CHANNEL.PUSH:O),...D}})},$=x.useCallback(async p=>(await n.getUser({input:{teamDid:h,user:{did:p},options:{enableConnectedAccount:!0}}})).user,[n,h]),V=x.useCallback(async({page:p=1,pageSize:g=20,...T}={})=>{try{const D={paging:{page:p,pageSize:g},...T,userName:T.searchText||"",teamDid:h,dateRange:T.dateRange?[H(T.dateRange[0]).toISOString(),H(T.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:D})}catch(D){throw q.error(D.message),D}},[n,h]);x.useEffect(()=>{h&&M()},[h]),i(E.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,p=>{w.has(p.notificationId)&&U(P)},[w,P]),i(E.EVENTS.NOTIFICATION_BLOCKLET_CREATE,p=>{w.has(p.id)||U(P)},[w,P]);const Z={fetch:U,data:l,paging:m,blocklet:s,getComponent:L,resendNotification:k,getUser:$,componentDids:y,getReceivers:V,inService:r,teamDid:h};return e.jsx(Kt,{value:{notificationRecords:Z},children:t})}function _e(){const{notificationRecords:t}=x.useContext(at);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const qt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(Nt,{type:qt[t],children:t})}const Ut=(t,s,n="")=>{if(!n||!s)return"";switch(n){case E.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case E.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function it(t,s,n={}){const{status:r,updatedAt:i,reason:l="",channel:b="wallet"}=n,m=i?t("notification.sendStatus.sentTime",{date:Dt(i,s)}):"",S=Ut(t,b,l);return r===E.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:m,reason:S}:r===E.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:m}:{status:"pending",title:t("notification.sendStatus.pending"),reason:S,sentTime:m}}const Oe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Le=["wallet","pushKit","email"],$e=["info","success","error","warning"],ot=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},rt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},$t=(t,s)=>{const n=ee(s,"extra.notifications.email",!0);return{available:ot(t),enabled:n}},Vt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:rt(t),enabled:n}},Gt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),Yt=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),ge=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),Qt=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],xe=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},Xt=(t,s="")=>{if(s&&Le.includes(s)){const l=`${s}SendRecord`,b=ee(t,l,[]);return xe(b)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return xe(l)}const i={};return Le.forEach(l=>{const b=`${l}SendRecord`,m=ee(t,b,[]),S=xe(m);i[l]=S}),r.length>0&&r.forEach(l=>{const b=n[l]??[],m=xe(b);i[l]=m}),i},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},je=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},Zt=t=>{switch(t){case E.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case E.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case E.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case E.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},lt=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:i,title:l="",sentTime:b="",reason:m=""}=t,S=[l,m].filter(Boolean).join(", ");return e.jsx(mt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:S}),e.jsx("span",{children:b})]}):null,arrow:!0,placement:"top",children:e.jsxs(N,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(N,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(N,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Oe[i]}}),e.jsx(N,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Oe[i]}})]}),e.jsx(Y,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Se.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Se({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:i}=X();return e.jsxs(N,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(Y,{children:[s,": "]}),t.map(l=>{const b=it(r,i,{status:l});return e.jsx(ke,{size:"small",label:e.jsx(N,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:b,enableTooltip:!1,children:b.title})}),onDelete:m=>n(m,l)},l)})]})}Be.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function Be({filterList:t,onChange:s,index:n,column:r,filterValues:i,label:l,renderLabel:b}){return e.jsxs(Fe,{className:"filter-container",children:[e.jsx(Ve,{component:"legend",children:l}),e.jsx(Re,{row:!0,children:i.map(m=>e.jsx(Te,{control:e.jsx(Ie,{checked:t[n].indexOf(m.value??m)>-1,onChange:S=>{const h=[...t];S.target.checked?h[n]=[...h[n],m.value??m]:h[n]=h[n].filter(y=>y!==(m.value??m)),s(h[n],n,r)},name:m.value??m}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:b(m)})},m.value??m))})]})}function we(t){return e.jsx(Be,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:i}){const{t:l,locale:b}=X(),m=it(l,b,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(N,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:m,showTitle:!0}),m.status!=="success"&&e.jsx(Ce,{className:"resend-btn",size:"small",startIcon:e.jsx(Pe,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:i,children:l("notification.resend")})]})}ze.propTypes={value:d.array.isRequired,onChange:d.func};function ze({value:t,onChange:s}){const{locale:n}=X(),r=H().toDate(),[i,l]=x.useState(null),b=x.useCallback(h=>{l(i?null:h.currentTarget)},[i]),m=!!i,S=x.useCallback(h=>{if(!h.startDate||!h.endDate){q.error("Please select a date range");return}if(H(h.startDate).isAfter(h.endDate)||!H(h.startDate).isValid()||!H(h.endDate).isValid()){q.error("Invalid date range");return}s([h.startDate,h.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(Y,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ce,{onClick:b,variant:"outlined",size:"small",color:"inherit",children:[Ue(t[0],n)," - ",Ue(t[1],n)]})}),e.jsx(Ee,{open:m,anchorEl:i,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Wt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:b,definedRanges:Mt(r),onChange:S})})]})}We.propTypes={itemComponent:d.elementType.isRequired};function We({itemComponent:t,...s}){const{t:n}=X();return!s?.filterList?.filter(i=>i.length).length?null:e.jsxs(N,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(wt.TableFilterList,{...s,ItemComponent:t})})]})}function Me({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const i=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(ke,{label:t,variant:"outlined",...i&&l?{onDelete:i}:{}})}Me.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const Jt=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];ct.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function ct({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=X(),[i,l]=x.useState(Jt),[b,m]=x.useState(!0),S=(y,v)=>{v.checked=y.target.checked;const P=i.map(F=>({...F,checked:F.value===v.value?v.checked:F.checked}));l(P)},h=y=>{y.stopPropagation(),n({channels:i.filter(v=>v.checked).map(v=>v.value),isResendFailedOnly:b})};return e.jsxs(N,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(Y,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(N,{className:"choose-channel",children:e.jsxs(Fe,{component:"fieldset",variant:"standard",children:[e.jsx(Ve,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Re,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:i.map(y=>e.jsx(Te,{control:e.jsx(Ie,{checked:y.checked,onChange:v=>S(v,y),name:y.value}),label:y.label},y.value))})]})}),e.jsx(N,{className:"resend-config-footer",children:e.jsx(Re,{children:e.jsx(Te,{control:e.jsx(Ie,{checked:b,onChange:y=>m(y.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(N,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ce,{onClick:y=>{y.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ce,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Ge,{size:16}),r("common.confirm")]})]})]})}dt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function dt({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:i}=X(),l=Ye(),b=x.useMemo(()=>Xe(l,lt()),[l]),{getReceivers:m,inService:S,teamDid:h,getUser:y,blocklet:v}=_e(),[P,F]=x.useState(!1),[w,U]=x.useState([]),M=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[k,$]=x.useState(null),[V,Z]=x.useState({total:0,pageSize:10,pageCount:0,page:1}),[p,g]=x.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[T,D]=x.useState([]),O=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],z=async()=>{if(!P&&t)try{F(!0);const a=await m({notificationId:t,...p}),o=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,S)}}));U(o),Z(a.paging),F(!1)}catch(a){q.error(a.message),F(!1)}};x.useEffect(()=>{z()},[p]);const _=a=>{a.stopPropagation();const o=a.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ie=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(Pe,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:_,children:r("notification.resend")})}):null,se={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:V.page-1,rowsPerPage:V.pageSize,count:V.total,searchText:p.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:T,onRowSelectionChange:(a,o)=>{D(o.map(c=>c.dataIndex))},customToolbarSelect:ie},J=({page:a,rowsPerPage:o,searchText:c,filterList:C})=>{const[,B=[],G=[],K=[]]=C;p.pageSize!==o?g(W=>({...W,pageSize:o,page:1})):p.page!==a+1?g(W=>({...W,page:a+1})):p.searchText!==c?g(W=>({...W,searchText:c,page:1})):pe(B,p.walletSendStatus)?pe(G,p.pushKitSendStatus)?pe(K,p.emailSendStatus)||g(W=>({...W,emailSendStatus:K,page:1})):g(W=>({...W,pushKitSendStatus:G,page:1})):g(W=>({...W,walletSendStatus:B,page:1}))},oe=x.useCallback(async(a,o)=>{if(!o)return!1;const c=await y(o);return c?a==="wallet"?Gt(c):a==="email"?$t(v,c):a==="pushKit"?Vt(v,c):a==="webhook"?Yt(c):!0:!1},[y,v]),Ne=x.useCallback(a=>Qt(r,a),[r]),f=()=>{M.anchorEl=null,M.position=null,$(null)},u=()=>{L.anchorEl=null,L.position=null},j=async(a,o,c=!0,C="")=>{if(!(!o.length||!a.length))try{s(a,o,c,C),L.anchorEl||(await ge(.5),f())}catch(B){console.error("handleResend error",{error:B})}},I=async({channels:a,isResendFailedOnly:o})=>{const c=T.map(C=>w[C].receiver);await j(a,c,o),await ge(.5),u(),D([])},A=async(a,o=[],c=!0)=>{try{await j(["webhook"],[a.receiver],c,o)}catch(C){q.error(C.response?C.response.statusText:C.message)}},R=async(a,o,c,C=[],B=!0)=>{if(a.stopPropagation(),Xt(o,c)>=4){q.warning(r("notification.resendLimit"));return}if(!Le.includes(c)){await A(o,C,B);return}if(a){const K=a.currentTarget,W=K.getBoundingClientRect();M.anchorEl=K,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}$({channel:c});try{const K=await oe(c,o.receiver);await ge(1),$({channel:c,result:K}),(typeof K=="boolean"&&K||Ct(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[o.receiver],B),L.anchorEl||(await ge(.5),f()))}catch(K){q.error(K.message)}},re=a=>{g(o=>({...o,dateRange:a,page:1}))},ne=(a,o,c,C)=>{a.stopPropagation();const B=c.filter(G=>G!==o);g(G=>({...G,[C]:B,page:1}))},le=Q(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:o,receiver:c}=w[a];return o?e.jsxs(N,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(zt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:p.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Wallet",filterList:a,onChange:o,index:c,column:C,filterValues:O})},customBodyRenderLite:a=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"wallet",onResend:B=>R(B,w[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"pushkit",onResend:B=>R(B,w[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:p.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Push Kit",filterList:a,onChange:o,index:c,column:C,filterValues:O})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:C}=w[a];return e.jsx(ce,{status:o,updatedAt:c,reason:C,channel:"email",onResend:B=>R(B,w[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:p.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(Se,{list:a,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),ne(o,c,le[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:O,fullWidth:!0,logic:je,display:(a,o,c,C)=>e.jsx(we,{label:"Email",filterList:a,onChange:o,index:c,column:C,filterValues:O})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:o}=w[a];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[C,B]=c,G=B[0];return e.jsx(N,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(N,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:C},C),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:K=>R(K,w[a],"webhook",[C],!1)})]},C)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:o}=w[a];return e.jsx(tt,{value:o,locale:i,shouldUpdate:!0})}}}],[w,i,p,r]),ft=[e.jsx(ze,{value:p.dateRange,onChange:re},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:P,startIcon:e.jsx(ht,{}),onClick:()=>z(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(N,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(ts,{children:e.jsxs(Qe,{theme:b,children:[e.jsx(Je,{className:"receivers-table",locale:i,loading:P,columns:le,data:w,onChange:J,options:se,customButtons:ft,components:{TableFilterList:a=>e.jsx(We,{...a,itemComponent:o=>e.jsx(Me,{...o,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ee,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:f,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(ss,{children:[e.jsxs(Y,{variant:"body1",component:"div",className:"check-title",children:[k?.channel," Checking"]}),e.jsx(N,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:Ne(k?.channel).map(a=>{const{type:o,pass:c,fail:C}=a;return!k?.result||k?.result?.[o]?e.jsxs(Y,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:k?.result?.[o]?be.success.main:"inherit"},children:[k?.result?e.jsx(gt,{}):e.jsx(Ge,{size:12,sx:{color:be.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs(Y,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:be.error.main},children:[e.jsx(xt,{}),e.jsx("span",{children:C})]},o)})})]})}),L.anchorEl&&e.jsx(Ee,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:u,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(ct,{loading:n,onCancel:u,onConfirm:I})})]})})})}const es=x.memo(dt),ts=ae.div`
|
|
2
2
|
td.MuiTableCell-footer {
|
|
3
3
|
border: none !important;
|
|
4
4
|
}
|
|
@@ -27,7 +27,7 @@ import{r as x}from"./vendor-react-CTtPmzVP.js";import{j as e,W as d,am as mt,ak
|
|
|
27
27
|
}
|
|
28
28
|
font-size: 12px;
|
|
29
29
|
}
|
|
30
|
-
`,fe=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function ns(t){const{wallet:s,push:n,email:r,webhook:i}=t;return[{name:"Wallet",value:e.jsx(de,{item:s})},{name:"Push",value:e.jsx(de,{item:n})},{name:"Email",value:e.jsx(de,{item:r})},...i.total>0?[{name:"Webhook",value:e.jsx(de,{item:i,isWebhook:!0})}]:[]]}function as(t,s,n){const{wallet:r,push:i,email:l,webhook:b}=t;return[{name:"Wallet",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.WALLET,item:r,onResend:s})},{name:"Push",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.PUSH,item:i,onResend:s})},{name:"Email",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:s})},...b.total>0?[{name:"Webhook",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:b,isWebhook:!0,onResend:s})}]:[]]}Ke.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};de.propTypes={item:d.object.isRequired,isWebhook:d.bool};function de({item:t,isWebhook:s=!1}){const{t:n}=
|
|
30
|
+
`,fe=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function ns(t){const{wallet:s,push:n,email:r,webhook:i}=t;return[{name:"Wallet",value:e.jsx(de,{item:s})},{name:"Push",value:e.jsx(de,{item:n})},{name:"Email",value:e.jsx(de,{item:r})},...i.total>0?[{name:"Webhook",value:e.jsx(de,{item:i,isWebhook:!0})}]:[]]}function as(t,s,n){const{wallet:r,push:i,email:l,webhook:b}=t;return[{name:"Wallet",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.WALLET,item:r,onResend:s})},{name:"Push",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.PUSH,item:i,onResend:s})},{name:"Email",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:s})},...b.total>0?[{name:"Webhook",value:e.jsx(ue,{loading:n,channel:E.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:b,isWebhook:!0,onResend:s})}]:[]]}Ke.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};de.propTypes={item:d.object.isRequired,isWebhook:d.bool};function de({item:t,isWebhook:s=!1}){const{t:n}=X(),r=s?t.success.length:t.success,i=t.total,l=r===i?"success":"failed";return e.jsx(N,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2},children:e.jsx(N,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsxs(te,{config:{status:l},enableTooltip:!1,children:[fe(r)," / ",fe(i)," ",n("notification.sendStatus.success")]})})})}ue.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};function ue({channel:t=E.NOTIFICATION_SEND_CHANNEL.WALLET,item:s,isWebhook:n=!1,onResend:r=()=>{},loading:i=!1}){const{t:l}=X(),{success:b,failed:m,pending:S}=s,h=Zt(t),y=n?b.length:b,v=n?m.length:m,P=n?S.length:S,F=async L=>{L.stopPropagation();const k=n?[...new Set([...b,...m].map($=>$))]:[];await r([t],[],!0,k)},w=y+v,U=w>0?y/w*100:0,M=w>0?v/w*100:0;return e.jsxs(is,{successRatio:U,failedRatio:M,children:[e.jsxs(Y,{variant:"h6",children:[h," (",s.total,")"]}),e.jsxs(Y,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Oe.success,fontWeight:600,fontSize:24},children:fe(y)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(N,{className:"unsent-area",children:[e.jsxs(N,{children:[e.jsxs(te,{config:{status:"failed"},enableTooltip:!1,children:[fe(v)," ",l("notification.sendStatus.failed")]}),e.jsxs(te,{config:{status:"pending"},enableTooltip:!1,children:[fe(P)," ",l("notification.sendStatus.pending")]})]}),v>0&&e.jsx(N,{className:"resend-btn",children:e.jsx(Ae,{size:"small",color:"primary",loading:i,variant:"contained",startIcon:e.jsx(Pe,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:F,children:l("notification.resend")})})]})]})}function Ke({statistics:t,mode:s="simple",onResend:n=()=>{},resending:r=!1}){const i=Q(()=>s==="simple"?ns(t):as(t,n,r),[t,s]);return s==="simple"?e.jsx("div",{children:i.map(l=>e.jsx(et,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(He,{container:!0,spacing:2,children:i.map(l=>e.jsx(He,{size:{md:4,sm:6,xs:12},children:l.value},l.name))})}const is=ae(N)`
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: column;
|
|
33
33
|
align-items: flex-start;
|
|
@@ -45,7 +45,7 @@ import{r as x}from"./vendor-react-CTtPmzVP.js";import{j as e,W as d,am as mt,ak
|
|
|
45
45
|
bottom: 0;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
`;ut.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function ut({notification:t,onCancel:s=()=>{},blocklet:n,tab:r="info"}){const{t:i,locale:l}=
|
|
48
|
+
`;ut.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function ut({notification:t,onCancel:s=()=>{},blocklet:n,tab:r="info"}){const{t:i,locale:l}=X(),{getComponent:b,resendNotification:m}=_e(),[S,h]=x.useState(!1),y=Q(()=>b(t.componentDid)||n,[n,t.componentDid]),v=De({tab:r||"info"}),P=x.useCallback(async(p,g,T=!0,D=[])=>{if(!p.length||!t.id)return;const O=g.length>0?g:t?.receivers?.map(_=>_.receiver);if(!O.length)return;let z=[...p];if(z.includes(E.NOTIFICATION_SEND_CHANNEL.PUSH)&&!rt(n)&&(q.warning(i("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),z=z.filter(_=>_!==E.NOTIFICATION_SEND_CHANNEL.PUSH)),z.includes(E.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ot(n)&&(q.warning(i("notification.sendStatus.reason.unavailable",{channel:"Email"})),z=z.filter(_=>_!==E.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!z.length)try{h(!0),await m({notificationId:t.id,receivers:O,channels:z,resendFailedOnly:T,...z.includes("webhook")&&D.length?{webhookUrls:D}:{}}),q.success("Message has been sent!")}catch(_){console.error("handleResend error",{error:_}),q.error(_.response?_.response.statusText:_.message)}finally{h(!1)}},[n,t.id,t?.receivers,m,i]),F=Q(()=>Pt(t),[t]),w=Q(()=>_t(t),[t]),U=Q(()=>F?t?.actorInfo:[],[t]),M=Q(()=>n?.did||n?.meta?.did||"",[n]);function L(){return[{name:i("notification.from"),value:F&&w?e.jsx(Ot,{actors:U,teamDid:M,size:32,showName:!0}):e.jsx(Lt,{size:32,blocklet:y,showName:!0,hideDot:!0})},{name:i("notification.notificationTitle"),value:e.jsx(me,{maxLength:50,children:t.title})},{name:i("notification.body"),value:F?e.jsx(kt,{notification:t,blocklet:n}):e.jsx(Bt,{notification:t,rows:0})},{name:i("notification.severity"),value:e.jsx(he,{severity:t.severity})},{name:i("notification.createdAt"),value:e.jsx(It,{value:t.createdAt,locale:l,shouldUpdate:!0,type:"all"})}].map(g=>e.jsx(et,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:g.name,children:g.value},g.name))}const k={info:{label:i("common.basicInfo"),value:"info",component:L},receivers:{label:i("notification.receiver"),value:"receivers"},statistics:{label:i("notification.statistics"),value:"statistics"}},$=Object.values(k).map(({label:p,value:g})=>({label:p,value:g})),V=k[v.tab]||k.info,Z=p=>{v.tab=p};return e.jsx(Rt,{title:i("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{v.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(rs,{children:[e.jsx(N,{className:"tabs",sx:{mx:3},children:e.jsx(Tt,{tabs:$,current:v.tab,onChange:Z,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[v.tab==="receivers"&&e.jsx(es,{notificationId:t.id,resending:S,handleResend:P}),v.tab==="statistics"&&e.jsx(Ke,{statistics:t.statistics,mode:"detail",resending:S,onResend:P}),v.tab==="info"&&e.jsx(V.component,{})]})]})})}const os=x.memo(ut),rs=ae.div`
|
|
49
49
|
& > .notification-row {
|
|
50
50
|
padding: 0;
|
|
51
51
|
}
|
|
@@ -92,7 +92,7 @@ import{r as x}from"./vendor-react-CTtPmzVP.js";import{j as e,W as d,am as mt,ak
|
|
|
92
92
|
overflow: hidden;
|
|
93
93
|
text-overflow: ellipsis;
|
|
94
94
|
}
|
|
95
|
-
`;function ve({blocklet:t=null,label:s=""}){return e.jsx(ls,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(nt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||t.meta?.title})]}):e.jsx("span",{className:"name",children:s})})}pt.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function pt({list:t,label:s,onDelete:n=()=>{}}){return e.jsxs(N,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(
|
|
95
|
+
`;function ve({blocklet:t=null,label:s=""}){return e.jsx(ls,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(nt,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||t.meta?.title})]}):e.jsx("span",{className:"name",children:s})})}pt.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function pt({list:t,label:s,onDelete:n=()=>{}}){return e.jsxs(N,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(Y,{children:[s,": "]}),t.map(r=>e.jsx(ke,{size:"small",label:e.jsx(N,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(he,{severity:r})}),onDelete:i=>n(i,r)},r))]})}function cs(t){return e.jsx(Be,{...t,renderLabel:s=>e.jsx(he,{severity:s})})}function ds({customTableButtons:t}){const{t:s,locale:n}=X(),r=Ye(),i=yt(r.breakpoints.down("sm")),l=x.useMemo(()=>Xe(r,lt()),[r]),[b,m]=x.useState(!1),{data:S,paging:h,blocklet:y,fetch:v,getComponent:P,componentDids:F,inService:w,teamDid:U}=_e(),M=x.useRef(null),[L,k]=x.useState(null),[$,V]=x.useState("info"),Z=`notification-records-${y.meta?.did}`,p=Et(Z),[g,T]=x.useState({pageSize:p.rowsPerPage||10,page:p.page?p.page+1:1,dids:p.dids||[],dateRange:p.dateRange||[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),D=Q(()=>{if(!y.children||!y.children.length)return[];const f=[];return y.children.forEach(u=>{const j=u.did||u.meta?.did;F.includes(j)&&(u.ancestors=[y],f.push(u))}),f},[F,y]),O=async f=>{try{m(!0),await v(f),m(!1)}finally{m(!1)}};x.useEffect(()=>{O(g)},[g]),x.useEffect(()=>{const f=S.find(u=>u.id===L?.id);L&&f&&k({...f})},[S]);const z=(f,u,j,I)=>{f.stopPropagation();const A=j.filter(R=>R!==u);T(R=>({...R,[I]:A,page:1}))},_=({page:f,rowsPerPage:u,filterList:j})=>{const[I=[],,,,A=[]]=j;g.pageSize!==u?T(R=>({...R,pageSize:u,page:1})):g.page!==f+1?T(R=>({...R,page:f+1})):pe(g.dids,I)?pe(g.severities,A)||T(R=>({...R,severities:A,page:1})):T(R=>({...R,dids:I,page:1}))},ie=x.useCallback(()=>{k(null),V("info")},[]),se=x.useCallback(()=>{v(g)},[v,g]),J=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:f=>f.map((u,j)=>{if(u==="system")return e.jsx("span",{children:s("notification.system")},`system-${j}`);const I=D.find(A=>(A.did||A.meta?.did)===u);return e.jsx(ve,{blocklet:I,label:I?.title||I?.meta?.title},u)}),update:(f,u,j)=>(f[j].splice(u,1),f)},filterOptions:{names:D,logic:(f,u)=>u.length?!u.includes(f):!1,display:(f,u,j,I)=>e.jsxs(Fe,{style:{width:"380px"},children:[e.jsx(jt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(St,{multiple:!0,value:f[j],renderValue:A=>e.jsx(N,{style:{overflow:"hidden",textOverflow:"ellipsis"},sx:{display:"flex",gap:1,alignItems:"center"},children:A.map(R=>{if(R==="system")return e.jsx("span",{children:s("notification.system")},R);const re=D.find(ne=>(ne.did||ne.meta?.did)===R);return e.jsx(ve,{blocklet:re,label:re?.title||re?.meta?.title},R)})}),onChange:A=>{f[j]=A.target.value,u(f[j],j,I)},children:[e.jsx(qe,{value:"system",children:s("notification.system")}),D.map(A=>{const R=A.did||A.meta?.did;return e.jsx(qe,{value:R,children:e.jsx(ve,{blocklet:A,label:A.title||A.meta?.title})},R)})]})]})},customBodyRenderLite:f=>{const u=S[f],j=P(u.componentDid);return e.jsxs(N,{sx:{display:"flex",alignItems:"center",gap:1},children:[j?e.jsx(nt,{size:32,blocklet:j,ancestors:j.ancestors??[]}):e.jsx(Ft,{blocklet:y,size:32}),e.jsx(me,{maxLength:50,children:j?.meta?.title||y?.meta?.title})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:f=>{const u=S[f],{receivers:j}=u;return e.jsx(vt,{total:j.length,renderSurplus:I=>I<100?e.jsxs("span",{children:["+",I]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:I=>{I.stopPropagation(),k(u),V("receivers")},children:j.map(I=>{const{receiverUser:A}=I,R=st(A.avatar,U,w);return e.jsx(Ze,{alt:A.fullName,src:`${R}?imageFilter=resize&w=48&h=48`,size:32,did:I.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},I.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:f=>{const u=S[f];return e.jsx(N,{onClick:j=>{j.stopPropagation(),k(u),V("statistics")},children:e.jsx(Ke,{statistics:u.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:f=>{const u=S[f];return e.jsx(me,{maxLength:50,children:u.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:f=>{const u=S[f];return e.jsx(he,{severity:u.severity})},filter:!0,filterType:"custom",filterList:g.severities??[],customFilterListOptions:{render:f=>e.jsx(pt,{list:f,label:s("notification.severity"),onDelete:(u,j)=>{u.stopPropagation(),z(u,j,J[4].options.filterList,"severities")}}),update:ye},filterOptions:{names:$e,fullWidth:!0,logic:je,display:(f,u,j,I)=>e.jsx(cs,{label:s("notification.severity"),filterList:f,onChange:u,index:j,column:I,filterValues:$e})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:f=>{const{createdAt:u}=S[f];return e.jsx(tt,{value:u,locale:n,shouldUpdate:!0})}}}],oe=f=>{T(u=>({...u,dateRange:f,page:1}))},Ne=[...t||[]];return e.jsxs(N,{ref:M,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(us,{isBreakpointsDownSm:i,children:e.jsx(Qe,{theme:l,children:e.jsx(Je,{className:"main-table",verticalKeyWidth:100,loading:b,locale:n,columns:J,data:S,durable:Z,onChange:_,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:h.page-1,rowsPerPage:h.pageSize,count:h.total,...p,onRowClick:(f,{dataIndex:u})=>{k(S[u])}},title:e.jsx(ze,{value:g.dateRange,onChange:oe}),customButtons:Ne,components:{TableFilterList:f=>e.jsx(We,{...f,itemComponent:u=>e.jsx(Me,{...u,canDelete:j=>j?.columnNames?.[j?.index||0]?.name==="sender"})})}})})}),L&&e.jsx(os,{refresh:se,onCancel:ie,notification:L,blocklet:y,tab:$})]})}const us=ae.div`
|
|
96
96
|
td.MuiTableCell-footer {
|
|
97
97
|
border: none !important;
|
|
98
98
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as oT,F as $m,G as Xm,H as Zm}from"./vendor-hooks-
|
|
1
|
+
import{E as oT,F as $m,G as Xm,H as Zm}from"./vendor-hooks-DQAdyHrE.js";import{B as qm}from"./vendor-utils-CUs2ebe7.js";import{g as jL,a as JL,r as QL}from"./vendor-react-CTtPmzVP.js";/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|