@abtnode/webapp 1.16.33 → 1.16.34-beta-20241120-080738-bbbe036c
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/README.md +1 -1
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-1IpBHqiQ.js → Add-Dh_DeTW0.js} +1 -1
- package/dist/assets/{ArrowDropDown-CO_v_gGe.js → ArrowDropDown-CFRRmuNz.js} +1 -1
- package/dist/assets/{Autocomplete-BNAhky76.js → Autocomplete-BBeQ6-hj.js} +1 -1
- package/dist/assets/{Breadcrumbs-bwWUdzXH.js → Breadcrumbs-la_h0jmE.js} +1 -1
- package/dist/assets/{ButtonGroup-6y7yf9hV.js → ButtonGroup-stQLgH3W.js} +1 -1
- package/dist/assets/{CSSTransition-DnBIou_i.js → CSSTransition-CLx0i89t.js} +1 -1
- package/dist/assets/{CheckCircle-D7oERMFD.js → CheckCircle-Cnr4La0N.js} +1 -1
- package/dist/assets/{ChevronLeft-BphFdKoe.js → ChevronLeft-46fJs4Nx.js} +1 -1
- package/dist/assets/{ChevronRight-CLG1ay4A.js → ChevronRight-CAETeava.js} +1 -1
- package/dist/assets/{Close-DaUTq1SJ.js → Close-DTQrAVX4.js} +1 -1
- package/dist/assets/{Delete-Ctg2zeKs.js → Delete-BF5FxXLc.js} +1 -1
- package/dist/assets/{DeleteOutline-BlYvTbWy.js → DeleteOutline-DPxWTBB6.js} +1 -1
- package/dist/assets/{Done-CaIeE7qp.js → Done-DOjWCsLg.js} +1 -1
- package/dist/assets/{Edit-Df1qVd3M.js → Edit-B3-Fr9Tj.js} +1 -1
- package/dist/assets/{EditIcon-RrUDe7G9.js → EditIcon-BrPLxRwL.js} +1 -1
- package/dist/assets/{ExpandMore-v0D4A-jC.js → ExpandMore-CVyKHY4x.js} +1 -1
- package/dist/assets/{Google-1CqVsK9-.js → Google-Cnxb_l0p.js} +1 -1
- package/dist/assets/{HelpOutline-D2GlWrSn.js → HelpOutline-6TC2ROi9.js} +1 -1
- package/dist/assets/{Https-CnQMz8bU.js → Https-DnghL9tF.js} +1 -1
- package/dist/assets/{InputAdornment-CZ1xQxbJ.js → InputAdornment-BZCjodnq.js} +1 -1
- package/dist/assets/{InputLabel-CBKMP0kd.js → InputLabel-do0oj_cA.js} +1 -1
- package/dist/assets/{LastPage-O0R3NHtX.js → LastPage-BUGLoStw.js} +1 -1
- package/dist/assets/{Launch-BSF3J60R.js → Launch-DFcuOomh.js} +1 -1
- package/dist/assets/{Link-v9IWh6cd.js → Link-CSWVpt77.js} +1 -1
- package/dist/assets/{ListSubheader-CIqta_y7.js → ListSubheader-UNIM44v3.js} +1 -1
- package/dist/assets/{LoadingButton-DyT3S3FL.js → LoadingButton-D_RPeOOx.js} +1 -1
- package/dist/assets/{LockIcon-YcQjwpaB.js → LockIcon-B1ad8URq.js} +1 -1
- package/dist/assets/{Loop-CyRqHFwv.js → Loop-WIH3HPCS.js} +1 -1
- package/dist/assets/{MoreHoriz-BuJY4jyH.js → MoreHoriz-Du5Tf-OZ.js} +1 -1
- package/dist/assets/{MoreVert-B-UcAPyF.js → MoreVert-CQDScAiQ.js} +1 -1
- package/dist/assets/{Pagination-DCfuW4XM.js → Pagination-BcMuhf2X.js} +1 -1
- package/dist/assets/{Public-Dwmx99ns.js → Public-CP2wvAUH.js} +1 -1
- package/dist/assets/{SchemaReference.es-MroxBk7t.js → SchemaReference.es-SxViH3rT.js} +1 -1
- package/dist/assets/{Search-cMjY7-w9.js → Search-DIjK_pEi.js} +1 -1
- package/dist/assets/{Select-DMrgQlpi.js → Select-BjFMRCFC.js} +1 -1
- package/dist/assets/{Skeleton-D9vyaoYF.js → Skeleton-CWJ5kMp8.js} +1 -1
- package/dist/assets/{Slider-Dkmvlog2.js → Slider-Doh2hHer.js} +1 -1
- package/dist/assets/{Stepper-4TPScSpn.js → Stepper-DcyZplpy.js} +1 -1
- package/dist/assets/{TextField-Ck96Zj1i.js → TextField-CffC6XHW.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-Bx3WaqEd.js → ToggleButtonGroup-DPzxadRI.js} +1 -1
- package/dist/assets/{ViewColumn-Dh3y3SOn.js → ViewColumn-81MArwOv.js} +1 -1
- package/dist/assets/{ViewList-CSwdI9xa.js → ViewList-C2PZp7Ah.js} +1 -1
- package/dist/assets/{_createAggregator-CC8samq7.js → _createAggregator-h86wTnGB.js} +1 -1
- package/dist/assets/{actions-DCoY4ND_.js → actions-Bx59OiFa.js} +1 -1
- package/dist/assets/actions-j2SGu6Ou.js +11 -0
- package/dist/assets/{agreement-Dm4gD1iv.js → agreement-XlWwj2S4.js} +1 -1
- package/dist/assets/api-Di8RsrU-.js +1 -0
- package/dist/assets/{app-avatar-rCMCHSVi.js → app-avatar-kyTZFM62.js} +1 -1
- package/dist/assets/{audit-logs-7Liwu019.js → audit-logs-CqPNdVpf.js} +1 -1
- package/dist/assets/{base32-7h1_w7qX.js → base32-Kw73pSzm.js} +1 -1
- package/dist/assets/blocklet-CpvMNcyR.js +1 -0
- package/dist/assets/{brace-fold.es-Cu37dStD.js → brace-fold.es-dNadKjdU.js} +1 -1
- package/dist/assets/{bundle-avatar-BGPsgY2n.js → bundle-avatar-DVvrB_hk.js} +1 -1
- package/dist/assets/{chart-CVsNPRkp.js → chart-8UOrjLJn.js} +1 -1
- package/dist/assets/{click-to-copy-A5WCwDlw.js → click-to-copy-BHPvbJ6H.js} +1 -1
- package/dist/assets/{closebrackets.es-CTJZzL0l.js → closebrackets.es-Cy6yh08f.js} +1 -1
- package/dist/assets/{codemirror.es-DNZDhAgz.js → codemirror.es-22B2FS1I.js} +1 -1
- package/dist/assets/{comment.es-FqVc1tUC.js → comment.es-CPuWlK9d.js} +1 -1
- package/dist/assets/{config-navigation-TqkqgYat.js → config-navigation-B8rbcuth.js} +1 -1
- package/dist/assets/{connect-to-BYaKsqLT.js → connect-to-iWwfwBUr.js} +1 -1
- package/dist/assets/{delete-confirm-CSfka7us.js → delete-confirm-BvTjtXVg.js} +1 -1
- package/dist/assets/{detail-Cl_ipErR.js → detail-CbgKOW0-.js} +3 -3
- package/dist/assets/{dialog.es-B2g1Md2H.js → dialog.es-C2q4_MT5.js} +1 -1
- package/dist/assets/{download-rfA-BgeB.js → download-B57AHfX0.js} +1 -1
- package/dist/assets/emotion-react.browser.esm-7BXVq9Fp.js +1 -0
- package/dist/assets/{foldgutter.es-CDRazssP.js → foldgutter.es-YTVPMmZG.js} +1 -1
- package/dist/assets/getValidReactChildren-B0SBEHgb.js +1 -0
- package/dist/assets/{hint.es-DPt0iO5-.js → hint.es-DzlqosAN.js} +1 -1
- package/dist/assets/{hint.es2-Cb56J6wD.js → hint.es2-C0dFJXPn.js} +1 -1
- package/dist/assets/{iframe-Dkdmu2fU.js → iframe-CNi4eFHU.js} +1 -1
- package/dist/assets/{index-r95Ymzg4.js → index--381hgpI.js} +1 -1
- package/dist/assets/{index-CpGwNSQ5.js → index-0asJnBTm.js} +1 -1
- package/dist/assets/{index-Ca9M3B8h.js → index-2wQ3tu6m.js} +1 -1
- package/dist/assets/{index-DB5iie93.js → index-B0wMsD8P.js} +3 -3
- package/dist/assets/{index-CId0olRH.js → index-BD-_sxeY.js} +1 -1
- package/dist/assets/{index-DYxj4bsg.js → index-BJnzhtRd.js} +3 -3
- package/dist/assets/{index-BHnQz9ut.js → index-BLAXOuyV.js} +1 -1
- package/dist/assets/{index-BkQeHFWv.js → index-BMDwhPjF.js} +1 -1
- package/dist/assets/{index-Cx0pTn8V.js → index-BPwHguXO.js} +1 -1
- package/dist/assets/{index-C_H-un3r.js → index-BRubCfOC.js} +1 -1
- package/dist/assets/{index-D8yTZoR9.js → index-BTUjLSxo.js} +1 -1
- package/dist/assets/{index-D6rWCRih.js → index-BZIaRptn.js} +1 -1
- package/dist/assets/{index-B4FJ57Sl.js → index-B_neISJG.js} +1 -1
- package/dist/assets/{index-BvGfyxwm.js → index-BfSSkn6W.js} +1 -1
- package/dist/assets/{index-BessETTM.js → index-Bgd6dClm.js} +1 -1
- package/dist/assets/{index-Deih0d9w.js → index-BkDozNly.js} +1 -1
- package/dist/assets/{index-BALhaKtR.js → index-BkrLS-vH.js} +1 -1
- package/dist/assets/{index-BmJR2grL.js → index-Btxwim6f.js} +3 -3
- package/dist/assets/{index-Bn9YgWiZ.js → index-BweS_goE.js} +1 -1
- package/dist/assets/{index-j0AXsS2r.js → index-BxngBW5S.js} +1 -1
- package/dist/assets/{index-fqtLEedX.js → index-C0airVMt.js} +1 -1
- package/dist/assets/{index-CFR1XYQc.js → index-C4dTigzK.js} +1 -1
- package/dist/assets/{index-D4yD9wCL.js → index-CMZcjkA4.js} +1 -1
- package/dist/assets/{index-BcaBGkyp.js → index-CP7qtUGh.js} +1 -1
- package/dist/assets/{index-B3esz3LS.js → index-CTU8UxFT.js} +1 -1
- package/dist/assets/{index-B2tDACFP.js → index-Cb9RaNpS.js} +1 -1
- package/dist/assets/{index-67oWSwtN.js → index-Cbh5ETtr.js} +1 -1
- package/dist/assets/{index-DMjshc-U.js → index-CcXQVpnD.js} +1 -1
- package/dist/assets/{index-msCsCKKf.js → index-ChZGJi2F.js} +1 -1
- package/dist/assets/index-CkXRE3yy.js +5 -0
- package/dist/assets/{index-xwOBGVcu.js → index-D-ozzI7w.js} +1 -1
- package/dist/assets/{index-BkDbIMQb.js → index-DEPIq3Ep.js} +3 -3
- package/dist/assets/{index-DhjpRk6v.js → index-DHcEznQE.js} +1 -1
- package/dist/assets/{index-kGpBMKCz.js → index-DHf3-jHo.js} +1 -1
- package/dist/assets/{index-D-hrDvN6.js → index-DVCF6ypc.js} +1 -1
- package/dist/assets/{index-DtvC5owf.js → index-DpaWBoah.js} +1 -1
- package/dist/assets/{index-Fu4xuw11.js → index-DrtnF2Ne.js} +1 -1
- package/dist/assets/{index-DLagUrz3.js → index-T3PzDQk5.js} +1 -1
- package/dist/assets/{index-CNd74BR0.js → index-Un4UNZxQ.js} +1 -1
- package/dist/assets/{index-DfFXqsLX.js → index-bw-c4iIy.js} +1 -1
- package/dist/assets/{index-qcRGUCNe.js → index-c9RCKtxM.js} +5 -5
- package/dist/assets/{index-Bl77Q4pX.js → index-cFdzntdI.js} +1 -1
- package/dist/assets/{index-DVhqctGu.js → index-cJ8AIyQl.js} +1 -1
- package/dist/assets/index-srZBzsVC.js +23 -0
- package/dist/assets/{index-B6A5anpq.js → index-z7L9EHH-.js} +1 -1
- package/dist/assets/{index.esm-COz0rluF.js → index.esm-Ckwd_Oui.js} +1 -1
- package/dist/assets/{info-addon.es-BKKs8WFv.js → info-addon.es-BohNUKc-.js} +1 -1
- package/dist/assets/{info.es-C7gsHsn9.js → info.es-BnW1Do_Y.js} +1 -1
- package/dist/assets/{install-from-url-q76xLrvq.js → install-from-url-BiicPj9r.js} +1 -1
- package/dist/assets/{invitation-BW39GEcj.js → invitation-B6Icjnbl.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-DWPB--12.js → is-path-prefix-equal-C2z6ul9S.js} +1 -1
- package/dist/assets/{item-DVTe-0gW.js → item-CtFxCPVi.js} +4 -4
- package/dist/assets/{javascript.es-CeTA0JKb.js → javascript.es-BwfQfmqf.js} +1 -1
- package/dist/assets/{jump-to-line.es-a_ngctA3.js → jump-to-line.es-DW43cy5p.js} +1 -1
- package/dist/assets/{jump.es-BWFjhcCo.js → jump.es-BUWLv8sH.js} +1 -1
- package/dist/assets/{lint.es-0gIIjnyf.js → lint.es-CUD4uJk8.js} +1 -1
- package/dist/assets/{lint.es2-CK1foe9-.js → lint.es2-Ctzkd-tt.js} +1 -1
- package/dist/assets/{lint.es3-B47_eujS.js → lint.es3-D6NsAVnc.js} +1 -1
- package/dist/assets/{list-header-CAC5y8Zb.js → list-header-D2LZ98zO.js} +1 -1
- package/dist/assets/{log-D9Z8kQgA.js → log-BUmAf7kF.js} +1 -1
- package/dist/assets/{logo-uploader-BGLx9vI_.js → logo-uploader-C63-zwbL.js} +3 -3
- package/dist/assets/{lottie-react.esm-BJprpjVk.js → lottie-react.esm-ZfnMm-33.js} +1 -1
- package/dist/assets/{matchbrackets.es-UzgJNlKv.js → matchbrackets.es-CqNvocTD.js} +1 -1
- package/dist/assets/{memory-ZSDA0OPQ.js → memory-Bd4JzDMd.js} +1 -1
- package/dist/assets/{mode.es-1zi4TBuR.js → mode.es-CGqn8n8L.js} +1 -1
- package/dist/assets/{mode.es2-BYT5Jd2Q.js → mode.es2-CMlQj1rc.js} +1 -1
- package/dist/assets/{mode.es3-BQkosdMI.js → mode.es3-BKGLApK7.js} +1 -1
- package/dist/assets/{onlineParser.es-BQLNL2qV.js → onlineParser.es-CmEFRZkl.js} +1 -1
- package/dist/assets/{overview-21qvx5BN.js → overview-DyU-Gr76.js} +1 -1
- package/dist/assets/{redux-D0hsiq_w.js → redux-uxGspPZE.js} +1 -1
- package/dist/assets/{resource-dialog-BoHq8v69.js → resource-dialog-BUSTiKav.js} +1 -1
- package/dist/assets/{runtime-Bd-F8WXx.js → runtime-rQYdRlsi.js} +1 -1
- package/dist/assets/{schema-B0T6A2Gz.js → schema-BDun2IRa.js} +1 -1
- package/dist/assets/sdk-DOSc1EPd.js +1 -0
- package/dist/assets/{search.es-BRUyj6I8.js → search.es-D6OrQ2zK.js} +1 -1
- package/dist/assets/{searchcursor.es-DzF-ECNC.js → searchcursor.es-BLA8FXL_.js} +1 -1
- package/dist/assets/{service-CufKunUa.js → service-nYvoJZ4V.js} +1 -1
- package/dist/assets/{shorten-label-BmNhwxO2.js → shorten-label-DZ9hQKJE.js} +1 -1
- package/dist/assets/{show-hint.es-_DytH3OZ.js → show-hint.es-CBMrYmmg.js} +1 -1
- package/dist/assets/{simple-select-DQMt4spB.js → simple-select-wsKOgQkD.js} +1 -1
- package/dist/assets/{slicedToArray-BsFyrH9P.js → slicedToArray-CDGik_Tm.js} +1 -1
- package/dist/assets/{spaces-BH8l3rDt.js → spaces-DztvnP2G.js} +1 -1
- package/dist/assets/{status-BwD-EBJu.js → status-_kkqAfEb.js} +1 -1
- package/dist/assets/{sublime.es-Dwi03jzh.js → sublime.es-CUR6yVxx.js} +1 -1
- package/dist/assets/{switch-control-B41nAAlH.js → switch-control-xOZw1m8W.js} +1 -1
- package/dist/assets/{table-icons-DLP-yfOz.js → table-icons-CBn5a_I0.js} +1 -1
- package/dist/assets/{team-C9C-b8dk.js → team-DvBIHwmh.js} +1 -1
- package/dist/assets/{toUpper-CRVjMgiU.js → toUpper-BOYZhoca.js} +1 -1
- package/dist/assets/{traffic-2e_bhX4O.js → traffic-BLoZjYrO.js} +1 -1
- package/dist/assets/{trim-a3cAMo7n.js → trim-BIGD4a61.js} +1 -1
- package/dist/assets/{uniqBy-COL9eNcG.js → uniqBy-4pHrjjeb.js} +1 -1
- package/dist/assets/{url-evaluation-_cliB2H6.js → url-evaluation-C1MAR5hw.js} +1 -1
- package/dist/assets/{url-join-BN5FuiJc.js → url-join-pEynD2Ji.js} +1 -1
- package/dist/assets/{useLocalStorage-BHwD0007.js → useLocalStorage-CQuk9gV7.js} +1 -1
- package/dist/assets/{useThemeProps-D02eSTIA.js → useThemeProps-BHp4rQcT.js} +1 -1
- package/dist/assets/{util-dakRC-rv.js → util-D9I2y3jU.js} +1 -1
- package/dist/assets/{wait-container-CvST8QRD.js → wait-container-BCP-KbSz.js} +1 -1
- package/dist/assets/{withStyles-GBXoa1NK.js → withStyles-7lCw-2jD.js} +1 -1
- package/dist/assets/{wrap-locale-_cUmGXc1.js → wrap-locale-Drqc-Zcp.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/actions-CYK55IDo.js +0 -11
- package/dist/assets/api-C59NHs3o.js +0 -1
- package/dist/assets/blocklet-q3h8NbCP.js +0 -1
- package/dist/assets/emotion-react.browser.esm-BNqOuiVX.js +0 -1
- package/dist/assets/getValidReactChildren-BxcBBj68.js +0 -1
- package/dist/assets/index-Bh8rfP9m.js +0 -23
- package/dist/assets/index-DoOoNVVw.js +0 -6
- package/dist/assets/sdk-CFjHlo2e.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
var dm=Object.defineProperty;var hm=(i,e,t)=>e in i?dm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Ae=(i,e,t)=>hm(i,typeof e!="symbol"?e+"":e,t);import{bM as mm,j as we,g as Ut,jD as fm,jE as rp,jF as gm,jG as vm,cO as lp,eP as $s,eQ as ui,jA as Uo,P as N,r as ne,cQ as Yl,a4 as Kl,C as bm,fb as cp,fM as ym,bq as up,aS as xm,am as wm,H as _m,jH as Ql,ci as Sm,j5 as Zl,a1 as Jl,eI as Pm,N as Mo,a5 as Fm,m as Cm,k as Em,jI as Tm,jJ as km,et as Am}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B0wMsD8P.js","./index-BJnzhtRd.js","./index-BEj64JY8.css","./TextField-CffC6XHW.js","./Select-BjFMRCFC.js","./InputLabel-do0oj_cA.js","./status-_kkqAfEb.js","./Delete-BF5FxXLc.js","./url-evaluation-C1MAR5hw.js","./Slider-Doh2hHer.js","./Skeleton-CWJ5kMp8.js","./Close-DTQrAVX4.js","./url-join-pEynD2Ji.js","./index-BMDwhPjF.js","./_createAggregator-h86wTnGB.js","./index-T3PzDQk5.js","./index-C4dTigzK.js","./index-BxngBW5S.js","./ExpandMore-CVyKHY4x.js","./resource-dialog-BUSTiKav.js","./index-DHcEznQE.js","./emotion-react.browser.esm-7BXVq9Fp.js","./index-srZBzsVC.js","./HelpOutline-6TC2ROi9.js","./index-Cb9RaNpS.js","./ButtonGroup-stQLgH3W.js","./getValidReactChildren-B0SBEHgb.js","./index-BLAXOuyV.js","./index-cJ8AIyQl.js","./index-CMZcjkA4.js","./index-DpaWBoah.js","./index-D-ozzI7w.js","./useThemeProps-BHp4rQcT.js","./index-CcXQVpnD.js","./redux-uxGspPZE.js","./ViewColumn-81MArwOv.js","./LastPage-BUGLoStw.js","./Search-DIjK_pEi.js","./MoreVert-CQDScAiQ.js","./uniqBy-4pHrjjeb.js","./toUpper-BOYZhoca.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var dm=Object.defineProperty;var hm=(i,e,t)=>e in i?dm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Ae=(i,e,t)=>hm(i,typeof e!="symbol"?e+"":e,t);import{bM as mm,j as we,g as Ut,jD as fm,jE as rp,jF as gm,jG as vm,cO as lp,eP as $s,eQ as ui,jA as Uo,P as N,r as ne,cQ as Yl,a4 as Kl,C as bm,fb as cp,fM as ym,bq as up,aS as xm,am as wm,H as _m,jH as Ql,ci as Sm,j5 as Zl,a1 as Jl,eI as Pm,N as Mo,a5 as Fm,m as Cm,k as Em,jI as Tm,jJ as km,et as Am}from"./index-BJnzhtRd.js";import{j as gs}from"./url-join-pEynD2Ji.js";import{p as Dm}from"./index-BMDwhPjF.js";import{_ as Om,u as Rm}from"./_createAggregator-h86wTnGB.js";import{a as Im}from"./index-T3PzDQk5.js";import{c as Be}from"./index-C4dTigzK.js";import"./index-BxngBW5S.js";import{W as Um}from"./resource-dialog-BUSTiKav.js";import"./index-BLAXOuyV.js";import"./index-cJ8AIyQl.js";import"./index-CMZcjkA4.js";import"./index-DpaWBoah.js";import"./index-D-ozzI7w.js";import{a as pp}from"./uniqBy-4pHrjjeb.js";import{t as Mm}from"./toUpper-BOYZhoca.js";const Nm=mm(we.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined");var Lm=fm,Bm=Om,zm=Bm(function(i,e,t){Lm(i,t,e)}),jm=zm;const dp=Ut(jm);function Rn(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var $m=0;function hp(i){return"__private_"+$m+++"_"+i}function Hm(i,e,t){const a=[];return i.forEach(n=>typeof n!="string"?a.push(n):e[Symbol.split](n).forEach((s,o,r)=>{s!==""&&a.push(s),o<r.length-1&&a.push(t)})),a}/**
|
|
3
3
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
4
4
|
* and replaces it with values from options `{smart_count: 5}`
|
|
5
5
|
*
|
|
@@ -53,5 +53,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
53
53
|
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>
|
|
54
54
|
</div>
|
|
55
55
|
`,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));Ae(this,"convertImgToObject",Uo(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(u=>u.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=Hh(s.originalname),[".mp4",".webm"].find(u=>{var d;return(d=a.src)==null?void 0:d.endsWith(u)})){const u=document.createElement("video");u.src=a.src,u.width=a.width,u.height=a.height,u.autoplay=!0,u.setAttribute("playsinline","playsinline"),u.muted=!0,u.loop=!0,u.style="pointer-events: none;",o.appendChild(u)}else{const u=document.createElement("object");u.data=n,u.type=s.mimetype||"image/png",u.alt=s.originalname,u.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",u.loading="lazy",o.appendChild(u)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));Ae(this,"resetState",()=>{this.uploadedAPIData={...qu},this.uploaded.setPluginState({...Wu}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.uploadedAPIData={...qu},this.addUploadItemFlag=!0,this.icon=()=>ve("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ve("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),ve("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),ve("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ve("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(t){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),ve("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new Vr(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...Wu}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const Vu={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,componentDid:"",components:[]},Gu={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},qh={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},_w={...qh,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class Sw extends Pe{constructor(t,a){super(t,a);Ae(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await ca.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=t.components||[],this.apiData.componentDid=t.componentDid||"",this.apiData.files=pp([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=xn(s,0,0,It);return n=xn(s,400,0,It),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});Ae(this,"resetState",()=>{this.apiData={...Vu},this.resources.setPluginState({...Gu})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.componentDid="",this.apiData={...Vu},this.icon=()=>ve("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[ve("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),ve("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),ve("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(t){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),ve("div",{id:"resources",className:"uploaded",children:[ve("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ve("button",{style:this.apiData.componentDid===a.did?_w:qh,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:Mm(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new Vr(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...Gu}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("resources:selected",a),this.resources.parent.hideAllPanels()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var Pw=ym();const Fw=Ut(Pw);/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:Wh,setPrototypeOf:Xu,isFrozen:Cw,getPrototypeOf:Ew,getOwnPropertyDescriptor:Tw}=Object;let{freeze:ze,seal:rt,create:Vh}=Object,{apply:Or,construct:Rr}=typeof Reflect<"u"&&Reflect;ze||(ze=function(e){return e});rt||(rt=function(e){return e});Or||(Or=function(e,t,a){return e.apply(t,a)});Rr||(Rr=function(e,t){return new e(...t)});const Qn=it(Array.prototype.forEach),Yu=it(Array.prototype.pop),La=it(Array.prototype.push),fs=it(String.prototype.toLowerCase),Co=it(String.prototype.toString),Ku=it(String.prototype.match),Ba=it(String.prototype.replace),kw=it(String.prototype.indexOf),Aw=it(String.prototype.trim),mt=it(Object.prototype.hasOwnProperty),Me=it(RegExp.prototype.test),za=Dw(TypeError);function it(i){return function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];return Or(i,e,a)}}function Dw(i){return function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return Rr(i,t)}}function J(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fs;Xu&&Xu(i,null);let a=e.length;for(;a--;){let n=e[a];if(typeof n=="string"){const s=t(n);s!==n&&(Cw(e)||(e[a]=s),n=s)}i[n]=!0}return i}function Ow(i){for(let e=0;e<i.length;e++)mt(i,e)||(i[e]=null);return i}function _i(i){const e=Vh(null);for(const[t,a]of Wh(i))mt(i,t)&&(Array.isArray(a)?e[t]=Ow(a):a&&typeof a=="object"&&a.constructor===Object?e[t]=_i(a):e[t]=a);return e}function ja(i,e){for(;i!==null;){const a=Tw(i,e);if(a){if(a.get)return it(a.get);if(typeof a.value=="function")return it(a.value)}i=Ew(i)}function t(){return null}return t}const Qu=ze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Eo=ze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),To=ze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Rw=ze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ko=ze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Iw=ze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Zu=ze(["#text"]),Ju=ze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ao=ze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ep=ze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zn=ze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Uw=rt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Mw=rt(/<%[\w\W]*|[\w\W]*%>/gm),Nw=rt(/\${[\w\W]*}/gm),Lw=rt(/^data-[\-\w.\u00B7-\uFFFF]/),Bw=rt(/^aria-[\-\w]+$/),Gh=rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zw=rt(/^(?:\w+script|data):/i),jw=rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xh=rt(/^html$/i),$w=rt(/^[a-z][.\w]*(-[.\w]+)+$/i);var tp=Object.freeze({__proto__:null,MUSTACHE_EXPR:Uw,ERB_EXPR:Mw,TMPLIT_EXPR:Nw,DATA_ATTR:Lw,ARIA_ATTR:Bw,IS_ALLOWED_URI:Gh,IS_SCRIPT_OR_DATA:zw,ATTR_WHITESPACE:jw,DOCTYPE_NAME:Xh,CUSTOM_ELEMENT:$w});const $a={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hw=function(){return typeof window>"u"?null:window},qw=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(a=t.getAttribute(n));const s="dompurify"+(a?"#"+a:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Yh(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hw();const e=H=>Yh(H);if(e.version="3.1.7",e.removed=[],!i||!i.document||i.document.nodeType!==$a.document)return e.isSupported=!1,e;let{document:t}=i;const a=t,n=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:r,Element:l,NodeFilter:u,NamedNodeMap:d=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:c,DOMParser:h,trustedTypes:m}=i,v=l.prototype,F=ja(v,"cloneNode"),f=ja(v,"remove"),b=ja(v,"nextSibling"),P=ja(v,"childNodes"),w=ja(v,"parentNode");if(typeof o=="function"){const H=t.createElement("template");H.content&&H.content.ownerDocument&&(t=H.content.ownerDocument)}let k,D="";const{implementation:S,createNodeIterator:C,createDocumentFragment:R,getElementsByTagName:M}=t,{importNode:W}=a;let z={};e.isSupported=typeof Wh=="function"&&typeof w=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Q,ERB_EXPR:Y,TMPLIT_EXPR:X,DATA_ATTR:K,ARIA_ATTR:_,IS_SCRIPT_OR_DATA:g,ATTR_WHITESPACE:x,CUSTOM_ELEMENT:E}=tp;let{IS_ALLOWED_URI:O}=tp,T=null;const A=J({},[...Qu,...Eo,...To,...ko,...Zu]);let U=null;const q=J({},[...Ju,...Ao,...ep,...Zn]);let B=Object.seal(Vh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,Z=null,be=!0,lt=!0,Mi=!1,_t=!0,at=!1,Ge=!0,Mt=!1,ua=!1,Ni=!1,Nt=!1,pi=!1,kn=!1,Tl=!0,kl=!1;const nm="user-content-";let Ns=!0,pa=!1,Li={},Bi=null;const Al=J({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Dl=null;const Ol=J({},["audio","video","img","source","image","track"]);let Ls=null;const Rl=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),An="http://www.w3.org/1998/Math/MathML",Dn="http://www.w3.org/2000/svg",Lt="http://www.w3.org/1999/xhtml";let zi=Lt,Bs=!1,zs=null;const sm=J({},[An,Dn,Lt],Co);let da=null;const om=["application/xhtml+xml","text/html"],rm="text/html";let ye=null,ji=null;const lm=t.createElement("form"),Il=function(y){return y instanceof RegExp||y instanceof Function},js=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ji&&ji===y)){if((!y||typeof y!="object")&&(y={}),y=_i(y),da=om.indexOf(y.PARSER_MEDIA_TYPE)===-1?rm:y.PARSER_MEDIA_TYPE,ye=da==="application/xhtml+xml"?Co:fs,T=mt(y,"ALLOWED_TAGS")?J({},y.ALLOWED_TAGS,ye):A,U=mt(y,"ALLOWED_ATTR")?J({},y.ALLOWED_ATTR,ye):q,zs=mt(y,"ALLOWED_NAMESPACES")?J({},y.ALLOWED_NAMESPACES,Co):sm,Ls=mt(y,"ADD_URI_SAFE_ATTR")?J(_i(Rl),y.ADD_URI_SAFE_ATTR,ye):Rl,Dl=mt(y,"ADD_DATA_URI_TAGS")?J(_i(Ol),y.ADD_DATA_URI_TAGS,ye):Ol,Bi=mt(y,"FORBID_CONTENTS")?J({},y.FORBID_CONTENTS,ye):Al,V=mt(y,"FORBID_TAGS")?J({},y.FORBID_TAGS,ye):{},Z=mt(y,"FORBID_ATTR")?J({},y.FORBID_ATTR,ye):{},Li=mt(y,"USE_PROFILES")?y.USE_PROFILES:!1,be=y.ALLOW_ARIA_ATTR!==!1,lt=y.ALLOW_DATA_ATTR!==!1,Mi=y.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=y.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=y.SAFE_FOR_TEMPLATES||!1,Ge=y.SAFE_FOR_XML!==!1,Mt=y.WHOLE_DOCUMENT||!1,Nt=y.RETURN_DOM||!1,pi=y.RETURN_DOM_FRAGMENT||!1,kn=y.RETURN_TRUSTED_TYPE||!1,Ni=y.FORCE_BODY||!1,Tl=y.SANITIZE_DOM!==!1,kl=y.SANITIZE_NAMED_PROPS||!1,Ns=y.KEEP_CONTENT!==!1,pa=y.IN_PLACE||!1,O=y.ALLOWED_URI_REGEXP||Gh,zi=y.NAMESPACE||Lt,B=y.CUSTOM_ELEMENT_HANDLING||{},y.CUSTOM_ELEMENT_HANDLING&&Il(y.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=y.CUSTOM_ELEMENT_HANDLING.tagNameCheck),y.CUSTOM_ELEMENT_HANDLING&&Il(y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(B.attributeNameCheck=y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),y.CUSTOM_ELEMENT_HANDLING&&typeof y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),at&&(lt=!1),pi&&(Nt=!0),Li&&(T=J({},Zu),U=[],Li.html===!0&&(J(T,Qu),J(U,Ju)),Li.svg===!0&&(J(T,Eo),J(U,Ao),J(U,Zn)),Li.svgFilters===!0&&(J(T,To),J(U,Ao),J(U,Zn)),Li.mathMl===!0&&(J(T,ko),J(U,ep),J(U,Zn))),y.ADD_TAGS&&(T===A&&(T=_i(T)),J(T,y.ADD_TAGS,ye)),y.ADD_ATTR&&(U===q&&(U=_i(U)),J(U,y.ADD_ATTR,ye)),y.ADD_URI_SAFE_ATTR&&J(Ls,y.ADD_URI_SAFE_ATTR,ye),y.FORBID_CONTENTS&&(Bi===Al&&(Bi=_i(Bi)),J(Bi,y.FORBID_CONTENTS,ye)),Ns&&(T["#text"]=!0),Mt&&J(T,["html","head","body"]),T.table&&(J(T,["tbody"]),delete V.tbody),y.TRUSTED_TYPES_POLICY){if(typeof y.TRUSTED_TYPES_POLICY.createHTML!="function")throw za('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof y.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw za('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=y.TRUSTED_TYPES_POLICY,D=k.createHTML("")}else k===void 0&&(k=qw(m,n)),k!==null&&typeof D=="string"&&(D=k.createHTML(""));ze&&ze(y),ji=y}},Ul=J({},["mi","mo","mn","ms","mtext"]),Ml=J({},["annotation-xml"]),cm=J({},["title","style","font","a","script"]),Nl=J({},[...Eo,...To,...Rw]),Ll=J({},[...ko,...Iw]),um=function(y){let I=w(y);(!I||!I.tagName)&&(I={namespaceURI:zi,tagName:"template"});const $=fs(y.tagName),ae=fs(I.tagName);return zs[y.namespaceURI]?y.namespaceURI===Dn?I.namespaceURI===Lt?$==="svg":I.namespaceURI===An?$==="svg"&&(ae==="annotation-xml"||Ul[ae]):!!Nl[$]:y.namespaceURI===An?I.namespaceURI===Lt?$==="math":I.namespaceURI===Dn?$==="math"&&Ml[ae]:!!Ll[$]:y.namespaceURI===Lt?I.namespaceURI===Dn&&!Ml[ae]||I.namespaceURI===An&&!Ul[ae]?!1:!Ll[$]&&(cm[$]||!Nl[$]):!!(da==="application/xhtml+xml"&&zs[y.namespaceURI]):!1},St=function(y){La(e.removed,{element:y});try{w(y).removeChild(y)}catch{f(y)}},On=function(y,I){try{La(e.removed,{attribute:I.getAttributeNode(y),from:I})}catch{La(e.removed,{attribute:null,from:I})}if(I.removeAttribute(y),y==="is"&&!U[y])if(Nt||pi)try{St(I)}catch{}else try{I.setAttribute(y,"")}catch{}},Bl=function(y){let I=null,$=null;if(Ni)y="<remove></remove>"+y;else{const Fe=Ku(y,/^[\r\n\t ]+/);$=Fe&&Fe[0]}da==="application/xhtml+xml"&&zi===Lt&&(y='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+y+"</body></html>");const ae=k?k.createHTML(y):y;if(zi===Lt)try{I=new h().parseFromString(ae,da)}catch{}if(!I||!I.documentElement){I=S.createDocument(zi,"template",null);try{I.documentElement.innerHTML=Bs?D:ae}catch{}}const ke=I.body||I.documentElement;return y&&$&&ke.insertBefore(t.createTextNode($),ke.childNodes[0]||null),zi===Lt?M.call(I,Mt?"html":"body")[0]:Mt?I.documentElement:ke},zl=function(y){return C.call(y.ownerDocument||y,y,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},jl=function(y){return y instanceof c&&(typeof y.nodeName!="string"||typeof y.textContent!="string"||typeof y.removeChild!="function"||!(y.attributes instanceof d)||typeof y.removeAttribute!="function"||typeof y.setAttribute!="function"||typeof y.namespaceURI!="string"||typeof y.insertBefore!="function"||typeof y.hasChildNodes!="function")},$l=function(y){return typeof r=="function"&&y instanceof r},Bt=function(y,I,$){z[y]&&Qn(z[y],ae=>{ae.call(e,I,$,ji)})},Hl=function(y){let I=null;if(Bt("beforeSanitizeElements",y,null),jl(y))return St(y),!0;const $=ye(y.nodeName);if(Bt("uponSanitizeElement",y,{tagName:$,allowedTags:T}),y.hasChildNodes()&&!$l(y.firstElementChild)&&Me(/<[/\w]/g,y.innerHTML)&&Me(/<[/\w]/g,y.textContent)||y.nodeType===$a.progressingInstruction||Ge&&y.nodeType===$a.comment&&Me(/<[/\w]/g,y.data))return St(y),!0;if(!T[$]||V[$]){if(!V[$]&&Wl($)&&(B.tagNameCheck instanceof RegExp&&Me(B.tagNameCheck,$)||B.tagNameCheck instanceof Function&&B.tagNameCheck($)))return!1;if(Ns&&!Bi[$]){const ae=w(y)||y.parentNode,ke=P(y)||y.childNodes;if(ke&&ae){const Fe=ke.length;for(let je=Fe-1;je>=0;--je){const Pt=F(ke[je],!0);Pt.__removalCount=(y.__removalCount||0)+1,ae.insertBefore(Pt,b(y))}}}return St(y),!0}return y instanceof l&&!um(y)||($==="noscript"||$==="noembed"||$==="noframes")&&Me(/<\/no(script|embed|frames)/i,y.innerHTML)?(St(y),!0):(at&&y.nodeType===$a.text&&(I=y.textContent,Qn([Q,Y,X],ae=>{I=Ba(I,ae," ")}),y.textContent!==I&&(La(e.removed,{element:y.cloneNode()}),y.textContent=I)),Bt("afterSanitizeElements",y,null),!1)},ql=function(y,I,$){if(Tl&&(I==="id"||I==="name")&&($ in t||$ in lm))return!1;if(!(lt&&!Z[I]&&Me(K,I))){if(!(be&&Me(_,I))){if(!U[I]||Z[I]){if(!(Wl(y)&&(B.tagNameCheck instanceof RegExp&&Me(B.tagNameCheck,y)||B.tagNameCheck instanceof Function&&B.tagNameCheck(y))&&(B.attributeNameCheck instanceof RegExp&&Me(B.attributeNameCheck,I)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(I))||I==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&Me(B.tagNameCheck,$)||B.tagNameCheck instanceof Function&&B.tagNameCheck($))))return!1}else if(!Ls[I]){if(!Me(O,Ba($,x,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&y!=="script"&&kw($,"data:")===0&&Dl[y])){if(!(Mi&&!Me(g,Ba($,x,"")))){if($)return!1}}}}}}return!0},Wl=function(y){return y!=="annotation-xml"&&Ku(y,E)},Vl=function(y){Bt("beforeSanitizeAttributes",y,null);const{attributes:I}=y;if(!I)return;const $={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U};let ae=I.length;for(;ae--;){const ke=I[ae],{name:Fe,namespaceURI:je,value:Pt}=ke,ha=ye(Fe);let Re=Fe==="value"?Pt:Aw(Pt);if($.attrName=ha,$.attrValue=Re,$.keepAttr=!0,$.forceKeepAttr=void 0,Bt("uponSanitizeAttribute",y,$),Re=$.attrValue,$.forceKeepAttr||(On(Fe,y),!$.keepAttr))continue;if(!_t&&Me(/\/>/i,Re)){On(Fe,y);continue}at&&Qn([Q,Y,X],Xl=>{Re=Ba(Re,Xl," ")});const Gl=ye(y.nodeName);if(ql(Gl,ha,Re)){if(kl&&(ha==="id"||ha==="name")&&(On(Fe,y),Re=nm+Re),Ge&&Me(/((--!?|])>)|<\/(style|title)/i,Re)){On(Fe,y);continue}if(k&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!je)switch(m.getAttributeType(Gl,ha)){case"TrustedHTML":{Re=k.createHTML(Re);break}case"TrustedScriptURL":{Re=k.createScriptURL(Re);break}}try{je?y.setAttributeNS(je,Fe,Re):y.setAttribute(Fe,Re),jl(y)?St(y):Yu(e.removed)}catch{}}}Bt("afterSanitizeAttributes",y,null)},pm=function H(y){let I=null;const $=zl(y);for(Bt("beforeSanitizeShadowDOM",y,null);I=$.nextNode();)Bt("uponSanitizeShadowNode",I,null),!Hl(I)&&(I.content instanceof s&&H(I.content),Vl(I));Bt("afterSanitizeShadowDOM",y,null)};return e.sanitize=function(H){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,$=null,ae=null,ke=null;if(Bs=!H,Bs&&(H="<!-->"),typeof H!="string"&&!$l(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw za("dirty is not a string, aborting")}else throw za("toString is not a function");if(!e.isSupported)return H;if(ua||js(y),e.removed=[],typeof H=="string"&&(pa=!1),pa){if(H.nodeName){const Pt=ye(H.nodeName);if(!T[Pt]||V[Pt])throw za("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof r)I=Bl("<!---->"),$=I.ownerDocument.importNode(H,!0),$.nodeType===$a.element&&$.nodeName==="BODY"||$.nodeName==="HTML"?I=$:I.appendChild($);else{if(!Nt&&!at&&!Mt&&H.indexOf("<")===-1)return k&&kn?k.createHTML(H):H;if(I=Bl(H),!I)return Nt?null:kn?D:""}I&&Ni&&St(I.firstChild);const Fe=zl(pa?H:I);for(;ae=Fe.nextNode();)Hl(ae)||(ae.content instanceof s&&pm(ae.content),Vl(ae));if(pa)return H;if(Nt){if(pi)for(ke=R.call(I.ownerDocument);I.firstChild;)ke.appendChild(I.firstChild);else ke=I;return(U.shadowroot||U.shadowrootmode)&&(ke=W.call(a,ke,!0)),ke}let je=Mt?I.outerHTML:I.innerHTML;return Mt&&T["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Me(Xh,I.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
56
|
-
`+je),at&&Qn([Q,Y,X],Pt=>{je=Ba(je,Pt," ")}),k&&kn?k.createHTML(je):je},e.setConfig=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};js(H),ua=!0},e.clearConfig=function(){ji=null,ua=!1},e.isValidAttribute=function(H,y,I){ji||js({});const $=ye(H),ae=ye(y);return ql($,ae,I)},e.addHook=function(H,y){typeof y=="function"&&(z[H]=z[H]||[],La(z[H],y))},e.removeHook=function(H){if(z[H])return Yu(z[H])},e.removeHooks=function(H){z[H]&&(z[H]=[])},e.removeAllHooks=function(){z={}},e}var ip=Yh(),We=Uint8Array,Ki=Uint16Array,Ww=Int32Array,Kh=new We([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,0,0,0]),Qh=new We([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,0,0]),Vw=new We([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zh=function(i,e){for(var t=new Ki(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];for(var n=new Ww(t[30]),a=1;a<30;++a)for(var s=t[a];s<t[a+1];++s)n[s]=s-t[a]<<5|a;return{b:t,r:n}},Jh=Zh(Kh,2),em=Jh.b,Gw=Jh.r;em[28]=258,Gw[258]=28;var Xw=Zh(Qh,0),Yw=Xw.b,Ir=new Ki(32768);for(var se=0;se<32768;++se){var ii=(se&43690)>>1|(se&21845)<<1;ii=(ii&52428)>>2|(ii&13107)<<2,ii=(ii&61680)>>4|(ii&3855)<<4,Ir[se]=((ii&65280)>>8|(ii&255)<<8)>>1}var nn=function(i,e,t){for(var a=i.length,n=0,s=new Ki(e);n<a;++n)i[n]&&++s[i[n]-1];var o=new Ki(e);for(n=1;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;var r;if(t){r=new Ki(1<<e);var l=15-e;for(n=0;n<a;++n)if(i[n])for(var u=n<<4|i[n],d=e-i[n],c=o[i[n]-1]++<<d,h=c|(1<<d)-1;c<=h;++c)r[Ir[c]>>l]=u}else for(r=new Ki(a),n=0;n<a;++n)i[n]&&(r[n]=Ir[o[i[n]-1]++]>>15-i[n]);return r},Tn=new We(288);for(var se=0;se<144;++se)Tn[se]=8;for(var se=144;se<256;++se)Tn[se]=9;for(var se=256;se<280;++se)Tn[se]=7;for(var se=280;se<288;++se)Tn[se]=8;var tm=new We(32);for(var se=0;se<32;++se)tm[se]=5;var Kw=nn(Tn,9,1),Qw=nn(tm,5,1),Do=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},dt=function(i,e,t){var a=e/8|0;return(i[a]|i[a+1]<<8)>>(e&7)&t},Oo=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},Zw=function(i){return(i+7)/8|0},Pl=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new We(i.subarray(e,t))},Jw=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],De=function(i,e,t){var a=new Error(e||Jw[i]);if(a.code=i,Error.captureStackTrace&&Error.captureStackTrace(a,De),!t)throw a;return a},Fl=function(i,e,t,a){var n=i.length,s=a?a.length:0;if(!n||e.f&&!e.l)return t||new We(0);var o=!t,r=o||e.i!=2,l=e.i;o&&(t=new We(n*3));var u=function(_t){var at=t.length;if(_t>at){var Ge=new We(Math.max(at*2,_t));Ge.set(t),t=Ge}},d=e.f||0,c=e.p||0,h=e.b||0,m=e.l,v=e.d,F=e.m,f=e.n,b=n*8;do{if(!m){d=dt(i,c,1);var P=dt(i,c+1,3);if(c+=3,P)if(P==1)m=Kw,v=Qw,F=9,f=5;else if(P==2){var S=dt(i,c,31)+257,C=dt(i,c+10,15)+4,R=S+dt(i,c+5,31)+1;c+=14;for(var M=new We(R),W=new We(19),z=0;z<C;++z)W[Vw[z]]=dt(i,c+z*3,7);c+=C*3;for(var Q=Do(W),Y=(1<<Q)-1,X=nn(W,Q,1),z=0;z<R;){var K=X[dt(i,c,Y)];c+=K&15;var w=K>>4;if(w<16)M[z++]=w;else{var _=0,g=0;for(w==16?(g=3+dt(i,c,3),c+=2,_=M[z-1]):w==17?(g=3+dt(i,c,7),c+=3):w==18&&(g=11+dt(i,c,127),c+=7);g--;)M[z++]=_}}var x=M.subarray(0,S),E=M.subarray(S);F=Do(x),f=Do(E),m=nn(x,F,1),v=nn(E,f,1)}else De(1);else{var w=Zw(c)+4,k=i[w-4]|i[w-3]<<8,D=w+k;if(D>n){l&&De(0);break}r&&u(h+k),t.set(i.subarray(w,D),h),e.b=h+=k,e.p=c=D*8,e.f=d;continue}if(c>b){l&&De(0);break}}r&&u(h+131072);for(var O=(1<<F)-1,T=(1<<f)-1,A=c;;A=c){var _=m[Oo(i,c)&O],U=_>>4;if(c+=_&15,c>b){l&&De(0);break}if(_||De(2),U<256)t[h++]=U;else if(U==256){A=c,m=null;break}else{var q=U-254;if(U>264){var z=U-257,B=Kh[z];q=dt(i,c,(1<<B)-1)+em[z],c+=B}var V=v[Oo(i,c)&T],Z=V>>4;V||De(3),c+=V&15;var E=Yw[Z];if(Z>3){var B=Qh[Z];E+=Oo(i,c)&(1<<B)-1,c+=B}if(c>b){l&&De(0);break}r&&u(h+131072);var be=h+q;if(h<E){var lt=s-E,Mi=Math.min(E,be);for(lt+h<0&&De(3);h<Mi;++h)t[h]=a[lt+h]}for(;h<be;++h)t[h]=t[h-E]}}e.l=m,e.p=A,e.b=h,e.f=d,m&&(d=1,e.m=F,e.d=v,e.n=f)}while(!d);return h!=t.length&&o?Pl(t,0,h):t.subarray(0,h)},e3=new We(0),Et=function(i,e){return i[e]|i[e+1]<<8},yt=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},Ro=function(i,e){return yt(i,e)+yt(i,e+4)*4294967296},t3=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&De(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var a=(e>>3&1)+(e>>4&1);a>0;a-=!i[t++]);return t+(e&2)},i3=function(i){var e=i.length;return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0},a3=function(i,e){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&De(6,"invalid zlib data"),(i[1]>>5&1)==+!e&&De(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function im(i,e){return Fl(i,{i:2},e&&e.out,e&&e.dictionary)}function n3(i,e){var t=t3(i);return t+8>i.length&&De(6,"invalid gzip data"),Fl(i.subarray(t,-8),{i:2},e&&e.out||new We(i3(i)),e&&e.dictionary)}function s3(i,e){return Fl(i.subarray(a3(i,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function Io(i,e){return i[0]==31&&i[1]==139&&i[2]==8?n3(i,e):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?im(i,e):s3(i,e)}var Ur=typeof TextDecoder<"u"&&new TextDecoder,o3=0;try{Ur.decode(e3,{stream:!0}),o3=1}catch{}var r3=function(i){for(var e="",t=0;;){var a=i[t++],n=(a>127)+(a>223)+(a>239);if(t+n>i.length)return{s:e,r:Pl(i,t-1)};n?n==3?(a=((a&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):n&1?e+=String.fromCharCode((a&31)<<6|i[t++]&63):e+=String.fromCharCode((a&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(a)}};function l3(i,e){if(e){for(var t="",a=0;a<i.length;a+=16384)t+=String.fromCharCode.apply(null,i.subarray(a,a+16384));return t}else{if(Ur)return Ur.decode(i);var n=r3(i),s=n.s,t=n.r;return t.length&&De(8),s}}var c3=function(i,e){return e+30+Et(i,e+26)+Et(i,e+28)},u3=function(i,e,t){var a=Et(i,e+28),n=l3(i.subarray(e+46,e+46+a),!(Et(i,e+8)&2048)),s=e+46+a,o=yt(i,e+20),r=t&&o==4294967295?p3(i,s):[o,yt(i,e+24),yt(i,e+42)],l=r[0],u=r[1],d=r[2];return[Et(i,e+10),l,u,n,s+Et(i,e+30)+Et(i,e+32),d]},p3=function(i,e){for(;Et(i,e)!=1;e+=4+Et(i,e+2));return[Ro(i,e+12),Ro(i,e+4),Ro(i,e+20)]};function d3(i,e){for(var t={},a=i.length-22;yt(i,a)!=101010256;--a)(!a||i.length-a>65558)&&De(13);var n=Et(i,a+8);if(!n)return{};var s=yt(i,a+16),o=s==4294967295||n==65535;if(o){var r=yt(i,a-12);o=yt(i,r)==101075792,o&&(n=yt(i,r+32),s=yt(i,r+48))}for(var l=e&&e.filter,u=0;u<n;++u){var d=u3(i,s,o),c=d[0],h=d[1],m=d[2],v=d[3],F=d[4],f=d[5],b=c3(i,f);s=F,(!l||l({name:v,size:h,originalSize:m,compression:c}))&&(c?c==8?t[v]=im(i.subarray(b,b+h),{out:new We(m)}):De(14,"unknown compression type "+c):t[v]=Pl(i,b,b+h))}return t}const Jn={zip:d3,gz:Io,tgz:Io,deflate:Io};class h3 extends Pe{constructor(t,a){super(t,{...{},...a});Ae(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=Fw.createHash("md5").update(await r.text()).digest("hex"),u=ea(n),d=`${l}${u?`.${u}`:""}`;this.uppy.setFileState(a,{hashFileName:d})}});Ae(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{relativePath:s,name:o},hashFileName:r}=n,l=s||o||r;this.uppy.setFileMeta(a,{relativePath:l,name:l})}});Ae(this,"preventXssAttack",async t=>{var s;const{id:a}=t,n=this.uppy.getFile(a);if(n){const{name:o,meta:r}=this.uppy.getFile(a),l=ip.sanitize(o);if(o!==l){const u=ea(n),d=l.endsWith(`.${u}`)?l:`${l}.${u}`;this.uppy.setFileState(a,{name:d,meta:{...r,name:d,filename:d}})}if((s=n.type)!=null&&s.includes("image/svg")){const{data:u,name:d,type:c}=this.uppy.getFile(a),h=await u.text(),m=ip.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["use"]});if(h!==m){const v=new Blob([m],{type:c}),F=Tr(v,d);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:F})}}}});Ae(this,"preventZipBombAttack",async t=>{const{id:a}=t,n=this.uppy.getFile(a);try{if(n&&Jn[n.extension]){const{data:s}=n,o=Jn[n.extension](new Uint8Array(await s.arrayBuffer()));let r=0;const l=(d,c)=>(r++,Object.entries(d instanceof Uint8Array?{[c||n.name]:d}:d).reduce((h,[m,v])=>{const F=h+v.byteLength;if(r>=5||F>n.size*100)throw console.error("Zip bomb detected, please check your file",{maxDepth:r,baseAcc:F,fileSize:n.size}),new Error("Zip bomb detected, please check your file");const f=Tt.extension(Tt.lookup(m));if(Jn[f]){const b=Jn[f](v);return F+l(b,m)}return F},0)),u=l(o);if(console.info(n.name,{totalUnzippedSize:u,maxDepth:r,zippedSize:n.size}),u>n.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});Ae(this,"validateImagesRespectCropperOptions",async()=>this.uppy.getFiles().reduce(async(t,a)=>{var F,f,b;await t;const{id:n}=a;let s=this.uppy.getFile(n);if(s.isRemote&&(await this.tryDownloadRemoteFile(s),s=this.uppy.getFile(n)),!((F=this.opts.cropperOptions)!=null&&F.aspectRatio)||!((f=s==null?void 0:s.type)!=null&&f.includes("image"))||(b=s.type)!=null&&b.includes("image/svg"))return Promise.resolve();const{aspectRatio:o}=this.opts.cropperOptions,r=this.uppy.getPlugin("ImageEditor"),l=document.querySelector(`[src="${s.preview}"]`)||document.getElementById("uppy_"+n).querySelector("img"),u=l==null?void 0:l.naturalWidth,d=l==null?void 0:l.naturalHeight,c=Number(u/d).toFixed(2),h=Number(o).toFixed(2);if(c===h)return Promise.resolve();this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("editorLoading")}),r.parent.openFileEditor(s);const v=this.i18n("aspectRatioMessage",{imageAspectRatio:c,aspectRatio:h});return this.uppy.info({message:v,details:v}),new Promise((P,w)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{P()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve()));Ae(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.preventZipBombAttack(t),await this.setMetaData(t)});Ae(this,"tryDownloadRemoteFile",async t=>{var k,D;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:u,isLoading:d,remote:c,meta:h,errorCount:m=0}=t,v=!d&&r,F=`uploader:${u}:downloaded`,f=ea(t),b=(k=n==null?void 0:n.split("?"))==null?void 0:k[0],w=(()=>{const S=["jpg","jpeg"];return S.includes(f)&&S.some(C=>b==null?void 0:b.endsWith(C))?!0:b==null?void 0:b.endsWith(f)})()?b:`${b}${f?`.${f}`:""}`;if(v){const S=Lh(s||((D=c==null?void 0:c.body)==null?void 0:D.url));if(m>=3)throw new Error("Download remote file failure");this.uppy.setFileState(u,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await _l.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:S}}).then(C=>C==null?void 0:C.data).then(async C=>{const R=Tr(C,w);this.uppy.setFileState(u,{name:w,extension:f,type:a,data:R,preview:s||Er(R),source:o,size:R.size,isDownloading:!1,isRemote:!1,meta:{...h,name:w,filename:w}}),this.uppy.getFile(u),this.uppy.emit(F,u)}).catch(async C=>{console.error("Axios download remote file error: ",C),this.uppy.setFileState(u,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(u))})}else l&&await(async()=>new Promise(C=>{this.uppy.once(F,async()=>{C()})}))()});Ae(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:Er(s)})},o.indexOf("gif")>-1?1e3:0)}});Ae(this,"prepareUpload",async t=>{await this.validateImagesRespectCropperOptions();const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"PrepareUpload",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}class m3 extends Pe{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ve("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ve("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ve("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ve("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return ve("div",{id:"ai-image",className:"ai-image",children:ve("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const f3="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",g3=ne.lazy(()=>up(()=>import("./index-DB5iie93.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]),import.meta.url)),ap="uploader-container",es="uploader-dashboard",ia=localStorage.getItem("uppy_debug"),v3=()=>Cr.get("x-csrf-token")?{"x-csrf-token":Cr.get("x-csrf-token")}:{},b3=i=>{var c;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o}=i,{companionUrl:r}=Sl(e),l=v3(),u=async h=>(await ca.post("/api/image/generations",h)).data,d={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:th,options:{quality:1,...s},alwayUse:!0},(ia||ta()&&t.Uploaded&&!kr())&&{id:"Uploaded",plugin:ww,options:{params:a==null?void 0:a.params}},(ia||ta()&&t.Resources&&!kr())&&{id:"Resources",plugin:Sw,options:{params:n==null?void 0:n.params}},ta()&&Bh()&&t.AIImage&&{id:"AIImage",plugin:m3,options:{companionUrl:r,companionHeaders:l},onShowPanel:h=>{function m(){setTimeout(()=>{var F,f;const v=document.getElementById("ai-image");v?km(v).render(we.jsx(g3,{theme:o,api:u,restrictions:d,i18n:(f=(F=h.current)==null?void 0:F.getUploader())==null?void 0:f.i18n,onSelect:b=>{const P=h.current.getUploader();P==null||P.emit("ai-image:selected",b),b.forEach(({src:w,alt:k},D)=>{const S=M=>(M==null?void 0:M.length)>16?`${M==null?void 0:M.slice(0,8)}...${M==null?void 0:M.slice(-4)}`:M,C=`${S(k)||S(w)}.png`,R={name:C,type:"image/png",data:Nh(w,C),source:"AIImage",isRemote:!1};P==null||P.addFile(R)})}})):m()},100)}m()}},{id:"Url",plugin:Sn,options:{companionUrl:r,companionHeaders:l}},{id:"Webcam",plugin:Up,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((c=window==null?void 0:window.blocklet)!=null&&c.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:td,options:{companionUrl:r,companionHeaders:l,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:h3,options:{companionUrl:r,companionHeaders:l,cropperOptions:(s==null?void 0:s.cropperOptions)||null},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Jr,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function Cl(i){const{id:e,plugins:t,locale:a,onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:u,pluginList:d,restrictions:c,onChange:h,initialFiles:m}=i,v=dp(d,"id"),{uploaderUrl:F}=Sl(r);let f=new Lr({id:e,meta:{uploaderId:e},debug:["true",!0].includes(ia||""),locale:kh[a||"en"],onBeforeFileAdded:(w,k)=>{if(Object.hasOwn(k,w.id))return!1;const D=!!Tt.extension(w.type),S=Tt.lookup(w.name)||"";if(!D&&S&&S!==w.type){const C=ea(w);C&&(w.extension=C),w.type=S}return w},...o,restrictions:c}).use(Th,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:F,async onBeforeRequest(w,k){var Q,Y;const{hashFileName:D,id:S,meta:C}=k,R=((Q=f.getFile(S))==null?void 0:Q.mockResponse)||null;w.getMethod()==="PATCH"&&R&&(w.send=()=>R);const M=ea(k);w.setHeader("x-uploader-file-name",`${D}`),w.setHeader("x-uploader-file-id",`${S}`),w.setHeader("x-uploader-file-ext",`${M}`),w.setHeader("x-uploader-base-url",new URL(w.getURL()).pathname),w.setHeader("x-uploader-endpoint-url",F),w.setHeader("x-uploader-metadata",JSON.stringify(C,(X,K)=>typeof K=="string"?encodeURIComponent(K):K));const W=Cr.get("x-csrf-token");W&&w.setHeader("x-csrf-token",W);const z=(window==null?void 0:window.uploaderComponentId)||((Y=window==null?void 0:window.blocklet)==null?void 0:Y.componentId);z&&w.setHeader("x-component-did",(z||"").split("/").pop())},onAfterResponse:async(w,k)=>{const D={},S=w.getUnderlyingObject();try{S.response&&(D.data=JSON.parse(S.response))}catch{D.data={}}D.method=w.getMethod().toUpperCase(),D.url=w.getURL(),D.status=S.status,D.headers={...w._headers};const C=S.getAllResponseHeaders();C&&C.split(`\r
|
|
56
|
+
`+je),at&&Qn([Q,Y,X],Pt=>{je=Ba(je,Pt," ")}),k&&kn?k.createHTML(je):je},e.setConfig=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};js(H),ua=!0},e.clearConfig=function(){ji=null,ua=!1},e.isValidAttribute=function(H,y,I){ji||js({});const $=ye(H),ae=ye(y);return ql($,ae,I)},e.addHook=function(H,y){typeof y=="function"&&(z[H]=z[H]||[],La(z[H],y))},e.removeHook=function(H){if(z[H])return Yu(z[H])},e.removeHooks=function(H){z[H]&&(z[H]=[])},e.removeAllHooks=function(){z={}},e}var ip=Yh(),We=Uint8Array,Ki=Uint16Array,Ww=Int32Array,Kh=new We([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,0,0,0]),Qh=new We([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,0,0]),Vw=new We([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zh=function(i,e){for(var t=new Ki(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];for(var n=new Ww(t[30]),a=1;a<30;++a)for(var s=t[a];s<t[a+1];++s)n[s]=s-t[a]<<5|a;return{b:t,r:n}},Jh=Zh(Kh,2),em=Jh.b,Gw=Jh.r;em[28]=258,Gw[258]=28;var Xw=Zh(Qh,0),Yw=Xw.b,Ir=new Ki(32768);for(var se=0;se<32768;++se){var ii=(se&43690)>>1|(se&21845)<<1;ii=(ii&52428)>>2|(ii&13107)<<2,ii=(ii&61680)>>4|(ii&3855)<<4,Ir[se]=((ii&65280)>>8|(ii&255)<<8)>>1}var nn=function(i,e,t){for(var a=i.length,n=0,s=new Ki(e);n<a;++n)i[n]&&++s[i[n]-1];var o=new Ki(e);for(n=1;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;var r;if(t){r=new Ki(1<<e);var l=15-e;for(n=0;n<a;++n)if(i[n])for(var u=n<<4|i[n],d=e-i[n],c=o[i[n]-1]++<<d,h=c|(1<<d)-1;c<=h;++c)r[Ir[c]>>l]=u}else for(r=new Ki(a),n=0;n<a;++n)i[n]&&(r[n]=Ir[o[i[n]-1]++]>>15-i[n]);return r},Tn=new We(288);for(var se=0;se<144;++se)Tn[se]=8;for(var se=144;se<256;++se)Tn[se]=9;for(var se=256;se<280;++se)Tn[se]=7;for(var se=280;se<288;++se)Tn[se]=8;var tm=new We(32);for(var se=0;se<32;++se)tm[se]=5;var Kw=nn(Tn,9,1),Qw=nn(tm,5,1),Do=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},dt=function(i,e,t){var a=e/8|0;return(i[a]|i[a+1]<<8)>>(e&7)&t},Oo=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},Zw=function(i){return(i+7)/8|0},Pl=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new We(i.subarray(e,t))},Jw=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],De=function(i,e,t){var a=new Error(e||Jw[i]);if(a.code=i,Error.captureStackTrace&&Error.captureStackTrace(a,De),!t)throw a;return a},Fl=function(i,e,t,a){var n=i.length,s=a?a.length:0;if(!n||e.f&&!e.l)return t||new We(0);var o=!t,r=o||e.i!=2,l=e.i;o&&(t=new We(n*3));var u=function(_t){var at=t.length;if(_t>at){var Ge=new We(Math.max(at*2,_t));Ge.set(t),t=Ge}},d=e.f||0,c=e.p||0,h=e.b||0,m=e.l,v=e.d,F=e.m,f=e.n,b=n*8;do{if(!m){d=dt(i,c,1);var P=dt(i,c+1,3);if(c+=3,P)if(P==1)m=Kw,v=Qw,F=9,f=5;else if(P==2){var S=dt(i,c,31)+257,C=dt(i,c+10,15)+4,R=S+dt(i,c+5,31)+1;c+=14;for(var M=new We(R),W=new We(19),z=0;z<C;++z)W[Vw[z]]=dt(i,c+z*3,7);c+=C*3;for(var Q=Do(W),Y=(1<<Q)-1,X=nn(W,Q,1),z=0;z<R;){var K=X[dt(i,c,Y)];c+=K&15;var w=K>>4;if(w<16)M[z++]=w;else{var _=0,g=0;for(w==16?(g=3+dt(i,c,3),c+=2,_=M[z-1]):w==17?(g=3+dt(i,c,7),c+=3):w==18&&(g=11+dt(i,c,127),c+=7);g--;)M[z++]=_}}var x=M.subarray(0,S),E=M.subarray(S);F=Do(x),f=Do(E),m=nn(x,F,1),v=nn(E,f,1)}else De(1);else{var w=Zw(c)+4,k=i[w-4]|i[w-3]<<8,D=w+k;if(D>n){l&&De(0);break}r&&u(h+k),t.set(i.subarray(w,D),h),e.b=h+=k,e.p=c=D*8,e.f=d;continue}if(c>b){l&&De(0);break}}r&&u(h+131072);for(var O=(1<<F)-1,T=(1<<f)-1,A=c;;A=c){var _=m[Oo(i,c)&O],U=_>>4;if(c+=_&15,c>b){l&&De(0);break}if(_||De(2),U<256)t[h++]=U;else if(U==256){A=c,m=null;break}else{var q=U-254;if(U>264){var z=U-257,B=Kh[z];q=dt(i,c,(1<<B)-1)+em[z],c+=B}var V=v[Oo(i,c)&T],Z=V>>4;V||De(3),c+=V&15;var E=Yw[Z];if(Z>3){var B=Qh[Z];E+=Oo(i,c)&(1<<B)-1,c+=B}if(c>b){l&&De(0);break}r&&u(h+131072);var be=h+q;if(h<E){var lt=s-E,Mi=Math.min(E,be);for(lt+h<0&&De(3);h<Mi;++h)t[h]=a[lt+h]}for(;h<be;++h)t[h]=t[h-E]}}e.l=m,e.p=A,e.b=h,e.f=d,m&&(d=1,e.m=F,e.d=v,e.n=f)}while(!d);return h!=t.length&&o?Pl(t,0,h):t.subarray(0,h)},e3=new We(0),Et=function(i,e){return i[e]|i[e+1]<<8},yt=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},Ro=function(i,e){return yt(i,e)+yt(i,e+4)*4294967296},t3=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&De(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var a=(e>>3&1)+(e>>4&1);a>0;a-=!i[t++]);return t+(e&2)},i3=function(i){var e=i.length;return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0},a3=function(i,e){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&De(6,"invalid zlib data"),(i[1]>>5&1)==+!e&&De(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function im(i,e){return Fl(i,{i:2},e&&e.out,e&&e.dictionary)}function n3(i,e){var t=t3(i);return t+8>i.length&&De(6,"invalid gzip data"),Fl(i.subarray(t,-8),{i:2},e&&e.out||new We(i3(i)),e&&e.dictionary)}function s3(i,e){return Fl(i.subarray(a3(i,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function Io(i,e){return i[0]==31&&i[1]==139&&i[2]==8?n3(i,e):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?im(i,e):s3(i,e)}var Ur=typeof TextDecoder<"u"&&new TextDecoder,o3=0;try{Ur.decode(e3,{stream:!0}),o3=1}catch{}var r3=function(i){for(var e="",t=0;;){var a=i[t++],n=(a>127)+(a>223)+(a>239);if(t+n>i.length)return{s:e,r:Pl(i,t-1)};n?n==3?(a=((a&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):n&1?e+=String.fromCharCode((a&31)<<6|i[t++]&63):e+=String.fromCharCode((a&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(a)}};function l3(i,e){if(e){for(var t="",a=0;a<i.length;a+=16384)t+=String.fromCharCode.apply(null,i.subarray(a,a+16384));return t}else{if(Ur)return Ur.decode(i);var n=r3(i),s=n.s,t=n.r;return t.length&&De(8),s}}var c3=function(i,e){return e+30+Et(i,e+26)+Et(i,e+28)},u3=function(i,e,t){var a=Et(i,e+28),n=l3(i.subarray(e+46,e+46+a),!(Et(i,e+8)&2048)),s=e+46+a,o=yt(i,e+20),r=t&&o==4294967295?p3(i,s):[o,yt(i,e+24),yt(i,e+42)],l=r[0],u=r[1],d=r[2];return[Et(i,e+10),l,u,n,s+Et(i,e+30)+Et(i,e+32),d]},p3=function(i,e){for(;Et(i,e)!=1;e+=4+Et(i,e+2));return[Ro(i,e+12),Ro(i,e+4),Ro(i,e+20)]};function d3(i,e){for(var t={},a=i.length-22;yt(i,a)!=101010256;--a)(!a||i.length-a>65558)&&De(13);var n=Et(i,a+8);if(!n)return{};var s=yt(i,a+16),o=s==4294967295||n==65535;if(o){var r=yt(i,a-12);o=yt(i,r)==101075792,o&&(n=yt(i,r+32),s=yt(i,r+48))}for(var l=e&&e.filter,u=0;u<n;++u){var d=u3(i,s,o),c=d[0],h=d[1],m=d[2],v=d[3],F=d[4],f=d[5],b=c3(i,f);s=F,(!l||l({name:v,size:h,originalSize:m,compression:c}))&&(c?c==8?t[v]=im(i.subarray(b,b+h),{out:new We(m)}):De(14,"unknown compression type "+c):t[v]=Pl(i,b,b+h))}return t}const Jn={zip:d3,gz:Io,tgz:Io,deflate:Io};class h3 extends Pe{constructor(t,a){super(t,{...{},...a});Ae(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=Fw.createHash("md5").update(await r.text()).digest("hex"),u=ea(n),d=`${l}${u?`.${u}`:""}`;this.uppy.setFileState(a,{hashFileName:d})}});Ae(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{relativePath:s,name:o},hashFileName:r}=n,l=s||o||r;this.uppy.setFileMeta(a,{relativePath:l,name:l})}});Ae(this,"preventXssAttack",async t=>{var s;const{id:a}=t,n=this.uppy.getFile(a);if(n){const{name:o,meta:r}=this.uppy.getFile(a),l=ip.sanitize(o);if(o!==l){const u=ea(n),d=l.endsWith(`.${u}`)?l:`${l}.${u}`;this.uppy.setFileState(a,{name:d,meta:{...r,name:d,filename:d}})}if((s=n.type)!=null&&s.includes("image/svg")){const{data:u,name:d,type:c}=this.uppy.getFile(a),h=await u.text(),m=ip.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["use"]});if(h!==m){const v=new Blob([m],{type:c}),F=Tr(v,d);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:F})}}}});Ae(this,"preventZipBombAttack",async t=>{const{id:a}=t,n=this.uppy.getFile(a);try{if(n&&Jn[n.extension]){const{data:s}=n,o=Jn[n.extension](new Uint8Array(await s.arrayBuffer()));let r=0;const l=(d,c)=>(r++,Object.entries(d instanceof Uint8Array?{[c||n.name]:d}:d).reduce((h,[m,v])=>{const F=h+v.byteLength;if(r>=5||F>n.size*100)throw console.error("Zip bomb detected, please check your file",{maxDepth:r,baseAcc:F,fileSize:n.size}),new Error("Zip bomb detected, please check your file");const f=Tt.extension(Tt.lookup(m));if(Jn[f]){const b=Jn[f](v);return F+l(b,m)}return F},0)),u=l(o);if(console.info(n.name,{totalUnzippedSize:u,maxDepth:r,zippedSize:n.size}),u>n.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});Ae(this,"validateImagesRespectCropperOptions",async()=>this.uppy.getFiles().reduce(async(t,a)=>{var F,f,b;await t;const{id:n}=a;let s=this.uppy.getFile(n);if(s.isRemote&&(await this.tryDownloadRemoteFile(s),s=this.uppy.getFile(n)),!((F=this.opts.cropperOptions)!=null&&F.aspectRatio)||!((f=s==null?void 0:s.type)!=null&&f.includes("image"))||(b=s.type)!=null&&b.includes("image/svg"))return Promise.resolve();const{aspectRatio:o}=this.opts.cropperOptions,r=this.uppy.getPlugin("ImageEditor"),l=document.querySelector(`[src="${s.preview}"]`)||document.getElementById("uppy_"+n).querySelector("img"),u=l==null?void 0:l.naturalWidth,d=l==null?void 0:l.naturalHeight,c=Number(u/d).toFixed(2),h=Number(o).toFixed(2);if(c===h)return Promise.resolve();this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("editorLoading")}),r.parent.openFileEditor(s);const v=this.i18n("aspectRatioMessage",{imageAspectRatio:c,aspectRatio:h});return this.uppy.info({message:v,details:v}),new Promise((P,w)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{P()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve()));Ae(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.preventZipBombAttack(t),await this.setMetaData(t)});Ae(this,"tryDownloadRemoteFile",async t=>{var k,D;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:u,isLoading:d,remote:c,meta:h,errorCount:m=0}=t,v=!d&&r,F=`uploader:${u}:downloaded`,f=ea(t),b=(k=n==null?void 0:n.split("?"))==null?void 0:k[0],w=(()=>{const S=["jpg","jpeg"];return S.includes(f)&&S.some(C=>b==null?void 0:b.endsWith(C))?!0:b==null?void 0:b.endsWith(f)})()?b:`${b}${f?`.${f}`:""}`;if(v){const S=Lh(s||((D=c==null?void 0:c.body)==null?void 0:D.url));if(m>=3)throw new Error("Download remote file failure");this.uppy.setFileState(u,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await _l.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:S}}).then(C=>C==null?void 0:C.data).then(async C=>{const R=Tr(C,w);this.uppy.setFileState(u,{name:w,extension:f,type:a,data:R,preview:s||Er(R),source:o,size:R.size,isDownloading:!1,isRemote:!1,meta:{...h,name:w,filename:w}}),this.uppy.getFile(u),this.uppy.emit(F,u)}).catch(async C=>{console.error("Axios download remote file error: ",C),this.uppy.setFileState(u,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(u))})}else l&&await(async()=>new Promise(C=>{this.uppy.once(F,async()=>{C()})}))()});Ae(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:Er(s)})},o.indexOf("gif")>-1?1e3:0)}});Ae(this,"prepareUpload",async t=>{await this.validateImagesRespectCropperOptions();const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"PrepareUpload",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}class m3 extends Pe{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ve("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ve("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ve("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ve("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return ve("div",{id:"ai-image",className:"ai-image",children:ve("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const f3="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",g3=ne.lazy(()=>up(()=>import("./index-B0wMsD8P.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]),import.meta.url)),ap="uploader-container",es="uploader-dashboard",ia=localStorage.getItem("uppy_debug"),v3=()=>Cr.get("x-csrf-token")?{"x-csrf-token":Cr.get("x-csrf-token")}:{},b3=i=>{var c;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o}=i,{companionUrl:r}=Sl(e),l=v3(),u=async h=>(await ca.post("/api/image/generations",h)).data,d={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:th,options:{quality:1,...s},alwayUse:!0},(ia||ta()&&t.Uploaded&&!kr())&&{id:"Uploaded",plugin:ww,options:{params:a==null?void 0:a.params}},(ia||ta()&&t.Resources&&!kr())&&{id:"Resources",plugin:Sw,options:{params:n==null?void 0:n.params}},ta()&&Bh()&&t.AIImage&&{id:"AIImage",plugin:m3,options:{companionUrl:r,companionHeaders:l},onShowPanel:h=>{function m(){setTimeout(()=>{var F,f;const v=document.getElementById("ai-image");v?km(v).render(we.jsx(g3,{theme:o,api:u,restrictions:d,i18n:(f=(F=h.current)==null?void 0:F.getUploader())==null?void 0:f.i18n,onSelect:b=>{const P=h.current.getUploader();P==null||P.emit("ai-image:selected",b),b.forEach(({src:w,alt:k},D)=>{const S=M=>(M==null?void 0:M.length)>16?`${M==null?void 0:M.slice(0,8)}...${M==null?void 0:M.slice(-4)}`:M,C=`${S(k)||S(w)}.png`,R={name:C,type:"image/png",data:Nh(w,C),source:"AIImage",isRemote:!1};P==null||P.addFile(R)})}})):m()},100)}m()}},{id:"Url",plugin:Sn,options:{companionUrl:r,companionHeaders:l}},{id:"Webcam",plugin:Up,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((c=window==null?void 0:window.blocklet)!=null&&c.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:td,options:{companionUrl:r,companionHeaders:l,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:h3,options:{companionUrl:r,companionHeaders:l,cropperOptions:(s==null?void 0:s.cropperOptions)||null},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Jr,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function Cl(i){const{id:e,plugins:t,locale:a,onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:u,pluginList:d,restrictions:c,onChange:h,initialFiles:m}=i,v=dp(d,"id"),{uploaderUrl:F}=Sl(r);let f=new Lr({id:e,meta:{uploaderId:e},debug:["true",!0].includes(ia||""),locale:kh[a||"en"],onBeforeFileAdded:(w,k)=>{if(Object.hasOwn(k,w.id))return!1;const D=!!Tt.extension(w.type),S=Tt.lookup(w.name)||"";if(!D&&S&&S!==w.type){const C=ea(w);C&&(w.extension=C),w.type=S}return w},...o,restrictions:c}).use(Th,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:F,async onBeforeRequest(w,k){var Q,Y;const{hashFileName:D,id:S,meta:C}=k,R=((Q=f.getFile(S))==null?void 0:Q.mockResponse)||null;w.getMethod()==="PATCH"&&R&&(w.send=()=>R);const M=ea(k);w.setHeader("x-uploader-file-name",`${D}`),w.setHeader("x-uploader-file-id",`${S}`),w.setHeader("x-uploader-file-ext",`${M}`),w.setHeader("x-uploader-base-url",new URL(w.getURL()).pathname),w.setHeader("x-uploader-endpoint-url",F),w.setHeader("x-uploader-metadata",JSON.stringify(C,(X,K)=>typeof K=="string"?encodeURIComponent(K):K));const W=Cr.get("x-csrf-token");W&&w.setHeader("x-csrf-token",W);const z=(window==null?void 0:window.uploaderComponentId)||((Y=window==null?void 0:window.blocklet)==null?void 0:Y.componentId);z&&w.setHeader("x-component-did",(z||"").split("/").pop())},onAfterResponse:async(w,k)=>{const D={},S=w.getUnderlyingObject();try{S.response&&(D.data=JSON.parse(S.response))}catch{D.data={}}D.method=w.getMethod().toUpperCase(),D.url=w.getURL(),D.status=S.status,D.headers={...w._headers};const C=S.getAllResponseHeaders();C&&C.split(`\r
|
|
57
57
|
`).forEach(Q=>{const[Y,X]=Q.split(": ");Y&&X&&(D.headers[Y]=X)});const R=f.getFile(D.headers["x-uploader-file-id"]);if(w.getMethod()==="PATCH"&&R.mockResponse)return;if(["PATCH","POST"].includes(D.method)&&[200,500].includes(D.status)){const z=[!0,"true"].includes(D.headers["x-uploader-file-exist"]),Q=jh(D.url,D.headers["x-uploader-file-name"]);D.file=R,D.uploadURL=Q;const Y={uploadURL:Q,...D};f.setFileState(R.id,{responseResult:Y}),z&&R&&(D.method==="POST"&&f.setFileState(R.id,{mockResponse:k}),f.emit("upload-success",f.getFile(R.id),{...Y,body:D.data}),f.emit("postprocess-complete",f.getFile(R.id)),f.calculateTotalProgress()),D.status===200&&(await(s==null?void 0:s(D)),f.emitUploadSuccess(R,D))}n&&await(n==null?void 0:n(S));const M=f.getState().totalProgress===100,W=f.getFiles().every(z=>z.source==="DropTarget");M&&W&&f.close()},...l});const b=({fileIDs:w,id:k})=>{w.forEach(D=>{f.setFileState(D,{uploadID:k})})};f.off("upload",b),f.on("upload",b);const P=w=>{typeof h=="function"&&h(w,f.getFiles())};return f.off("file-added",P),f.on("file-added",P),f.off("file-removed-success",P),f.on("file-removed-success",P),u&&f.use(Bd,{target:document.body,onDrop:w=>{var k;(k=f==null?void 0:f.open)==null||k.call(f)},...u}),t==null||t.forEach(w=>{if(w){const{plugin:k,options:D}=v[w]||{};k&&f.use(k,D)}}),$h(f),m&&(m==null?void 0:m.length)>0&&f.addFiles(m),f}const Mr=ne.forwardRef((i,e)=>{var z,Q,Y,X,K,_,g,x,E,O,T;const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,...i==null?void 0:i.apiPathProps},a=ne.useRef(null),n=xm({open:!1,uppy:null,availablePluginMap:{},restrictions:{}}),s=wm(),o=b3({...i,apiPathProps:t,availablePluginMap:n.availablePluginMap,restrictions:n.restrictions,theme:s}),{plugins:r=o.map(A=>A.id),id:l="Uploader",popup:u=!1,uploadedProps:d,resourcesProps:c,onOpen:h,onClose:m,locale:v,installerProps:F}=i,f=dp(o,"id"),b=_m(A=>{var U;return(U=A==null?void 0:A.breakpoints)==null?void 0:U.down("md")}),P=Ql([...r,...o.filter(A=>A.alwayUse).map(A=>A.id)]),{loading:w}=Sm(async()=>{var U,q,B,V,Z;let A=Zl((U=i==null?void 0:i.coreProps)==null?void 0:U.restrictions)?{}:Jl((q=i==null?void 0:i.coreProps)==null?void 0:q.restrictions);if(ta())try{await ca.get("/api/uploader/status").then(({data:be})=>{var lt;n.availablePluginMap=be.availablePluginMap,!t.disableMediaKitPrefix&&Zl((lt=i==null?void 0:i.coreProps)==null?void 0:lt.restrictions)&&(A=be.restrictions||{})})}catch{}!((B=A==null?void 0:A.allowedFileTypes)!=null&&B.length)&&(A!=null&&A.allowedFileExts)&&(A.allowedFileTypes=Ql((Z=(V=(typeof(A==null?void 0:A.allowedFileExts)=="string"?A==null?void 0:A.allowedFileExts.split(","):A==null?void 0:A.allowedFileExts)||[])==null?void 0:V.map(be=>Tt.lookup((be==null?void 0:be.replaceAll(" ",""))||"")))==null?void 0:Z.filter(be=>be)),delete A.allowedFileExts),A.maxFileSize&&typeof A.maxFileSize=="string"&&(A.maxFileSize=ie.parseSize(A.maxFileSize,{iec:!1})||void 0),n.restrictions=Jl(A)},{refreshDeps:[JSON.stringify({apiPathProps:t,restrictionsProps:(z=i==null?void 0:i.coreProps)==null?void 0:z.restrictions})]});Rm("esc",A=>{n.open&&(A.stopPropagation(),A.preventDefault(),C())},{useCapture:!0}),ne.useEffect(()=>{zh(t),n.uppy=Cl({...i,id:l,plugins:P,apiPathProps:t,pluginList:o,restrictions:n.restrictions}),n.uppy.open=S,n.uppy.close=C,n.uppy.openPlugin=k;const A=B=>{const{onShowPanel:V}=f[B];V==null||V(e)};n.uppy.off("dashboard:show-panel",A),n.uppy.on("dashboard:show-panel",A);const U=(B,V,Z,be)=>{var _t,at;const lt=B.map(Ge=>{var Ni,Nt,pi;const Mt={name:Ge.id||((pi=(Nt=(Ni=Ge.fileUrl)==null?void 0:Ni.split("/"))==null?void 0:Nt.slice(-1))==null?void 0:pi[0]),type:Ge.mimetype||Tt.lookup(Ge.fileUrl),data:"",preview:Ge.fileUrl,source:be,isRemote:!0},ua=V.uppy.addFile(Mt);return{...Ge,uppyFile:V.uppy.getFile(ua)}}),Mi=`${be.toLowerCase()}Props`;(at=(_t=Z[Mi])==null?void 0:_t.onSelectedFiles)==null||at.call(_t,lt)};[{name:"Uploaded",event:"uploaded:selected"},{name:"Resources",event:"resources:selected"}].forEach(({name:B,event:V})=>{P.includes(B)&&(n.uppy.off(V),n.uppy.on(V,Z=>U(Z,n,i,B)))})},[JSON.stringify({id:l,plugins:P,apiPathProps:t,locale:v,restrictions:n.restrictions,theme:s})]);function k(A){var U,q,B;if(A=A.replace(/\s/g,""),["MyDevice",...P].map(V=>V.toLowerCase()).includes(A.toLowerCase())){let V=`div[data-uppy-acquirer-id="${A}"] > button`;(B=(q=(U=document==null?void 0:document.getElementById(es))==null?void 0:U.querySelector(V))==null?void 0:q.click)==null||B.call(q)}}const D=ne.useCallback(A=>{ia&&a.current&&!a.current.contains(A.target)&&console.info("debug focus",a.current,A.target)},[]);function S(A){var q,B,V,Z;n.open=!0,A&&setTimeout(()=>{k(A)},200),n.uppy.emitOpen(),h==null||h(),(B=(q=document.activeElement)==null?void 0:q.blur)==null||B.call(q);const U=n.uppy.getPlugin(es).el;(V=U==null?void 0:U.focus)==null||V.call(U),(Z=U==null?void 0:U.click)==null||Z.call(U),ia&&u&&(document.addEventListener("mousedown",D),document.addEventListener("touchstart",D))}function C(){var A;(A=n.uppy.getPlugin(es))==null||A.hideAllPanels(),n.open=!1,n.uppy.emitClose(),m==null||m(),setTimeout(()=>{n.uppy.getState().totalProgress===100&&(n.uppy.setState({files:{},currentUploads:{}}),n.uppy.calculateTotalProgress())},500),ia&&u&&(document.removeEventListener("mousedown",D),document.removeEventListener("touchstart",D))}ne.useImperativeHandle(e,()=>({getUploader:()=>n.uppy,open:S,close:C}));const R=u?Tm:ne.Fragment,M=u?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:n.open?"block":"none"},...(Q=i==null?void 0:i.wrapperProps)==null?void 0:Q.sx},invisible:!0,open:n.open,onClick:A=>{document.activeElement===document.body&&(A.stopPropagation(),C())},...i.wrapperProps}:{...i.wrapperProps},W=b?"42px":"40px";return we.jsx(R,{...M,children:we.jsxs(Um,{onClose:C,did:f3,disabled:!n.open,...F,children:[we.jsx(Pm,{styles:()=>({".uppy-is-drag-over":{"&::after":{transition:"all 0.3s ease-in-out",border:"2px dashed #bbb !important",borderRadius:4,background:"rgba(234, 234, 234, 0.5)"}}})}),we.jsxs(Mo,{className:"uploader-container",ref:a,id:ap,onClick:A=>A.stopPropagation(),sx:{position:"relative",width:b?"90vw":720,".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{background:"repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px !important"},".uploaded-add-item":{background:"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:"rgba(0,0,0,0.13)"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{background:"#fff",height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%"},"& .uppy-ProviderBrowser-header":{display:"none"}},"& .uppy-Url":{width:"100% !important",display:"flex",justifyContent:"center","& input":{width:"70%"}},"& .uppy-Dashboard-browse, & .uppy-DashboardContent-addMore, & .uppy-DashboardContent-back, & .uppy-StatusBar-actionBtn--done, & .uppy-DashboardContent-save, & .uppy-StatusBar-actionBtn--upload":{color:`${(X=(Y=s==null?void 0:s.palette)==null?void 0:Y.primary)==null?void 0:X.main}`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{color:`${(_=(K=s==null?void 0:s.palette)==null?void 0:K.primary)==null?void 0:_.main}`,filter:"brightness(1.2)"}},"& .uppy-c-btn-primary":{backgroundColor:`${(x=(g=s==null?void 0:s.palette)==null?void 0:g.primary)==null?void 0:x.main} !important`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{backgroundColor:`${(O=(E=s==null?void 0:s.palette)==null?void 0:E.primary)==null?void 0:O.main} !important`,filter:"brightness(1.2)"}}},children:[u&&we.jsx(Fm,{"aria-label":"close",onClick:C,sx:{color:"#fafafa",position:"absolute",...b?{bottom:`calc(0px - ${W} - 16px)`,left:`calc(50vw - ${W} - 8px)`}:{right:`calc(0px - ${W} - 16px)`,top:-12}},children:we.jsx(Nm,{sx:{fontSize:W}})}),w&&we.jsxs(Mo,{sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:99999999999,flexDirection:"column",background:"rgba(256, 256, 256, 0.2)",backdropFilter:"blur(4px)",borderRadius:1,pointerEvents:"none"},children:[we.jsx(yw,{size:32}),we.jsx(Cm,{variant:"body2",color:"primary",sx:{mt:1.5,fontWeight:"bold"},children:Em(kh,`${v}.strings.loadingStatus`)})]}),n.uppy&&we.jsx(kd,{inline:!0,target:`#${ap}`,id:es,uppy:n.uppy,plugins:P,fileManagerSelectionType:((T=n.restrictions)==null?void 0:T.maxNumberOfFiles)===1?"files":"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:"",doneButtonHandler:C,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),y3=Object.freeze(Object.defineProperty({__proto__:null,Uploader:Mr,default:Mr,initUploader:Cl},Symbol.toStringTag,{value:"Module"})),np=ne.lazy(()=>up(()=>Promise.resolve().then(()=>y3),void 0,import.meta.url).then(i=>({default:i.Uploader}))),El=ne.createContext(null);function am(){const i=ne.useContext(El);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function x3({onChange:i,children:e,...t}){const a=am(),n=()=>{var o;const s=(o=a==null?void 0:a.current)==null?void 0:o.getUploader();s==null||s.open(),i&&s.onceUploadSuccess((...r)=>{i(...r)})};return we.jsx(Mo,{onClick:n,...t,children:e})}function w3({children:i,popup:e,...t}){const a=ne.useRef(null),n=ne.useMemo(()=>e?Am.createPortal(we.jsx(np,{ref:a,popup:!0,...t},"uploader"),document.body):we.jsx(np,{ref:a,popup:!1,...t},"uploader"),[a,e,t]);return we.jsxs(El.Provider,{value:a,children:[i,n]})}const H3=Object.freeze(Object.defineProperty({__proto__:null,CLOSE:ms,OPEN:hs,UPLOADER_UPLOAD_SUCCESS:Ar,Uploader:Mr,UploaderContext:El,UploaderProvider:w3,UploaderTrigger:x3,api:_l,base64ToFile:Nh,blobToFile:Tr,createImageUrl:xn,getAIKitComponent:Bh,getDownloadUrl:Lh,getExt:ea,getMediaKitComponent:ta,getObjectURL:Er,getUploaderEndpoint:Sl,getUrl:jh,initUploader:Cl,initUppy:$h,isBlob:Mh,isMediaKit:kr,mediaKitApi:ca,mediaKitMountPoint:It,parseStringToDot:Hh,get prefixPath(){return ci},setPrefixPath:zh,useUploaderContext:am},Symbol.toStringTag,{value:"Module"}));export{Bh as g,H3 as i,dp as k};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bM as Ro,j as e,aO as At,aP as Gt,q as z,bo as Y,N as C,aB as be,P as s,A as N,r as f,f as Ce,br as Ye,b as H,K as O,U as Bt,X as Ot,cd as Be,n as $,V as ne,jr as To,bJ as Oe,b0 as de,a$ as ft,aG as Mt,a5 as J,D as Ft,b4 as Eo,fV as Po,fW as wo,C as le,fc as ko,dJ as _o,y as Io,az as On,a3 as ht,x as Uo,js as Do,jt as No,B as ae,ju as Lo,Y as Bo,$ as Oo,jv as Jn,m as ke,Q as ye,dx as Mo,aD as $o,aE as qo,dj as Ao,aF as Go,i as He,aR as Fo,cz as Wo,H as eo,bj as zo,a0 as Vo,O as it,j5 as Yo,jw as Ko,aC as Mn,cx as Ho,F as D,af as Me,aN as to,bL as Wt,am as Qo,cf as Xo,jx as Zo,ba as Jo,z as er,b1 as $t,T as tr,aU as Ve,ax as It,W as nr,bs as no,aJ as or,cX as Re,e0 as rr,jy as sr,fl as $n,jz as qn,gw as An,S as ir,G as at,gN as ar,bK as lr}from"./index-
|
|
1
|
+
import{bM as Ro,j as e,aO as At,aP as Gt,q as z,bo as Y,N as C,aB as be,P as s,A as N,r as f,f as Ce,br as Ye,b as H,K as O,U as Bt,X as Ot,cd as Be,n as $,V as ne,jr as To,bJ as Oe,b0 as de,a$ as ft,aG as Mt,a5 as J,D as Ft,b4 as Eo,fV as Po,fW as wo,C as le,fc as ko,dJ as _o,y as Io,az as On,a3 as ht,x as Uo,js as Do,jt as No,B as ae,ju as Lo,Y as Bo,$ as Oo,jv as Jn,m as ke,Q as ye,dx as Mo,aD as $o,aE as qo,dj as Ao,aF as Go,i as He,aR as Fo,cz as Wo,H as eo,bj as zo,a0 as Vo,O as it,j5 as Yo,jw as Ko,aC as Mn,cx as Ho,F as D,af as Me,aN as to,bL as Wt,am as Qo,cf as Xo,jx as Zo,ba as Jo,z as er,b1 as $t,T as tr,aU as Ve,ax as It,W as nr,bs as no,aJ as or,cX as Re,e0 as rr,jy as sr,fl as $n,jz as qn,gw as An,S as ir,G as at,gN as ar,bK as lr}from"./index-BJnzhtRd.js";import{d as cr}from"./Add-Dh_DeTW0.js";import{a as dr,R as ct,F as ur,L as pr,d as zt}from"./logo-uploader-C63-zwbL.js";import{C as mr,A as fr,d as hr}from"./agreement-XlWwj2S4.js";import{E as gr}from"./index-cJ8AIyQl.js";import{b as xr,a as yr,c as Cr,u as Vt,e as jr}from"./actions-j2SGu6Ou.js";import{S as vr}from"./switch-control-xOZw1m8W.js";import{u as ue}from"./blocklet-CpvMNcyR.js";import{d as oo}from"./Edit-B3-Fr9Tj.js";import{T as br}from"./index-BLAXOuyV.js";import{T as Sr,M as Rr,t as Tr}from"./table-icons-CBn5a_I0.js";import{C as Gn}from"./click-to-copy-BHPvbJ6H.js";import{T as X}from"./TextField-CffC6XHW.js";import{d as Yt}from"./Link-CSWVpt77.js";import{c as Er,C as Pr,d as wr,s as ro,e as kr,a as _r,b as Ir,A as Ur,B as Dr,f as Nr,S as Lr}from"./item-CtFxCPVi.js";import{u as Br,a as Or,P as so,L as Fn,A as Mr,S as $r}from"./index-C0airVMt.js";import{a as io}from"./uniqBy-4pHrjjeb.js";import{u as ao,a as qr,C as Ar,D as Gr,b as Fr,c as Wr}from"./connect-to-iWwfwBUr.js";import{d as zr}from"./Done-DOjWCsLg.js";import{C as Vr}from"./Google-Cnxb_l0p.js";import{I as Yr,a as Kr,f as Hr,B as Qr}from"./install-from-url-BiicPj9r.js";import{a as Wn}from"./api-Di8RsrU-.js";import{v as lo,e as Xr,a as dt}from"./util-D9I2y3jU.js";import{d as Zr}from"./ArrowDropDown-CFRRmuNz.js";import{_ as Jr}from"./useLocalStorage-CQuk9gV7.js";import{d as es}from"./LockIcon-B1ad8URq.js";import{d as gt}from"./Delete-BF5FxXLc.js";import{d as co}from"./Launch-DFcuOomh.js";import{C as ts}from"./delete-confirm-BvTjtXVg.js";import{W as Ke}from"./url-evaluation-C1MAR5hw.js";import{d as ns}from"./is-path-prefix-equal-C2z6ul9S.js";import{R as os,a as zn,B as uo}from"./status-_kkqAfEb.js";import{B as rs}from"./bundle-avatar-DVvrB_hk.js";import{A as po}from"./actions-Bx59OiFa.js";import{I as Ut}from"./index-BfSSkn6W.js";import{t as ss}from"./toUpper-BOYZhoca.js";import{a as is}from"./index-DpaWBoah.js";import{b as as}from"./base32-Kw73pSzm.js";import{u as ls}from"./team-DvBIHwmh.js";import"./EditIcon-BrPLxRwL.js";import"./ButtonGroup-stQLgH3W.js";import"./getValidReactChildren-B0SBEHgb.js";import"./index-C4dTigzK.js";import"./index--381hgpI.js";import"./url-join-pEynD2Ji.js";import"./MoreVert-CQDScAiQ.js";import"./slicedToArray-CDGik_Tm.js";import"./index-DHf3-jHo.js";import"./redux-uxGspPZE.js";import"./CSSTransition-CLx0i89t.js";import"./ViewColumn-81MArwOv.js";import"./ChevronRight-CAETeava.js";import"./ChevronLeft-46fJs4Nx.js";import"./Search-DIjK_pEi.js";import"./Select-BjFMRCFC.js";import"./InputLabel-do0oj_cA.js";import"./index-BkrLS-vH.js";import"./index-ZG7jWpak.js";import"./Skeleton-CWJ5kMp8.js";import"./Autocomplete-BBeQ6-hj.js";import"./ListSubheader-UNIM44v3.js";import"./InputAdornment-BZCjodnq.js";import"./DeleteOutline-DPxWTBB6.js";import"./Close-DTQrAVX4.js";import"./index-srZBzsVC.js";import"./HelpOutline-6TC2ROi9.js";import"./index-Cb9RaNpS.js";import"./ExpandMore-CVyKHY4x.js";import"./spaces-DztvnP2G.js";import"./schema-BDun2IRa.js";import"./index-BMDwhPjF.js";import"./Stepper-DcyZplpy.js";import"./shorten-label-DZ9hQKJE.js";import"./MoreHoriz-Du5Tf-OZ.js";const cs=Ro(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined");var Kt={},ds=Gt;Object.defineProperty(Kt,"__esModule",{value:!0});var mo=Kt.default=void 0,us=ds(At()),ps=e;mo=Kt.default=(0,us.default)((0,ps.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Ht({children:t,...o}){var x;const{t:r}=z(),{api:l}=Y(),{blocklet:n}=ue(),i=(x=n==null?void 0:n.settings)==null?void 0:x.autoCheckUpdate,h=async g=>{await l.updateAutoCheckUpdate({input:{did:n.meta.did,autoCheckUpdate:g}})},d=async()=>{try{const g=!(i!=null&&i.enabled);await h({enabled:g}),N.success(r(g?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(g){N.error(g.message)}},m=!!(i!=null&&i.enabled);return e.jsxs(C,{display:"flex",flexDirection:"row",alignItems:"center",children:[t,e.jsx(be,{title:r("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(vr,{checked:m,onChange:d,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}Ht.propTypes={children:s.any};Ht.defaultProps={children:null};const ms=(t,o)=>{let{description:r}=t;return(Object.values(H.CHAIN_PROP_MAP).includes(t.key)||O.isEnvShareable(t))&&(r?r=`${r} (${o("blocklet.config.sharedToAllComponents")})`:r=o("blocklet.config.sharedToAllComponents")),r&&e.jsx("div",{style:{marginLeft:12},children:r})},Dt=(t,o,r=[])=>!(r!=null&&r.length)&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(l=>l.name===t.key)&&o.children.every(l=>!l.meta.environments.find(n=>n.name===t.key))?!0:t.custom,Vn=t=>[H.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)?!0:!(t.startsWith("BLOCKLET_")||t.startsWith("COMPONENT_")),Nt=t=>[H.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)===!1;function ut({blocklet:t,ancestors:o}){const r=Y(),{inService:l}=r,{t:n}=f.useContext(Ce),i=[...o.map(a=>a.meta.did),t.meta.did],h=()=>N.success(n("blocklet.config.changedTip")),d=a=>Dt(a,t,o);if(Ye(t.status)||t.status==="unknown"&&Ye(t.status))return null;const m=a=>new Promise(async(R,u)=>{if(!a.key.trim()||!a.value.trim()){N.error(n("blocklet.config.environment.keyValueRequired")),u();return}if(Vn(a.key)===!1){N.error(n("blocklet.config.environment.invalidKey")),u();return}a.custom=Nt(a.key);try{const y=await r.api.configBlocklet({input:{did:i,configs:[a]}});h(y.blocklet),R()}catch(y){N.error(ne(y)),u()}}),x=(a,R)=>new Promise(async(u,y)=>{if(a.required&&(!a.key.trim()||!a.value.trim())){N.error(n("blocklet.config.environment.keyValueRequired")),y();return}if(Vn(a.key)===!1){N.error(n("blocklet.config.environment.invalidKey")),y();return}if(a.key===H.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const T=To(a);if(T){N.error(T),y();return}}const w=[{...a,value:a.secure&&a.value==="__encrypted__"?"":a.value}];if(a.key!==R.key){if(!Dt(a,t,o)){N.error("Only key of custom env can be changed"),y();return}w.push({key:R.key,custom:Nt(a.key)})}try{const T=await r.api.configBlocklet({input:{did:i,configs:w}});h(T.blocklet),u()}catch(T){N.error(ne(T)),y()}}),g=a=>new Promise(async(R,u)=>{if(a.required){N.error(n("blocklet.config.environment.deleteForbidden")),u();return}if(!Dt(a,t,o)){N.error("Only key of custom env can be changed"),u();return}try{const y=await r.api.configBlocklet({input:{did:i,configs:[{key:a.key,custom:Nt(a.key)}]}});h(y.blocklet),R()}catch(y){N.error(ne(y)),u()}}),c=(t.configs||[]).filter(a=>!H.BLOCKLET_CONFIGURABLE_KEY[a.key]||[H.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(a.key)),b=O.getSharedConfigObj(o[0],t),p=O.getComponentMissingConfigs(t,o[0]),S=c.map(a=>({...a,value:Object.values(H.CHAIN_PROP_MAP).includes(a.key)&&Object.keys(b).includes(a.key)?b[a.key]:b[a.key]||a.value})),j=S.some(a=>a.key&&a.key.startsWith("BWA_")),v={onRowAdd:m,onRowUpdate:x,onRowDelete:g,isDeletable:d},k=()=>[{title:n("common.key"),field:"key",initialEditValue:"",width:"30%",render:a=>e.jsx(Gn,{value:a.value,style:{color:a.required&&!a.value?"#ff4436":"#222222",fontWeight:a.required?"bold":"normal"},children:a.key}),editComponent:a=>{const{value:R,rowData:u,onChange:y}=a;return e.jsx(Yn,{children:e.jsx(X,{fullWidth:!0,size:"small",disabled:d(u)===!1,value:R,onChange:w=>y(w.target.value),variant:"outlined",label:"Key",placeholder:n("blocklet.config.environment.key"),margin:"dense",autoFocus:!0})})}},{title:n("common.value"),field:"value",initialEditValue:"",width:"calc((100% - (96px + 30%)) / 1)",render:a=>a.value?a.secure?"******":e.jsx(Gn,{unstyled:!0,value:a.value,style:{wordBreak:"break-all"},children:a.value}):null,editComponent:a=>{const{value:R,rowData:u,onChange:y}=a;return e.jsxs(Yn,{children:[e.jsx(X,{fullWidth:!0,size:"small",value:R==="__encrypted__"?"":R,onChange:w=>y(w.target.value),variant:"outlined",label:n("common.value"),placeholder:n("blocklet.config.environment.value"),margin:"dense"}),ms(u,n)]})}}];return e.jsxs(fs,{children:[!!p.length&&e.jsx(Bt,{severity:"error",style:{marginTop:24},children:n("blocklet.config.missingRequired")}),j&&e.jsx(Bt,{severity:"info",children:n("blocklet.config.environment.tip")}),e.jsx(Ot,{permission:l?"":"mutate_blocklets",role:l?Be:[],children:a=>e.jsx(Sr,{className:"config-table",children:e.jsx(Rr,{title:e.jsx("h4",{children:n("common.environment")}),columns:k(),icons:{...xr,...Tr},options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1},localization:{header:{actions:n("common.actions")},body:{emptyDataSourceMessage:n("common.noData")}},data:S,editable:a?v:{}})})})]})}ut.propTypes={blocklet:s.object.isRequired,ancestors:s.array};ut.defaultProps={ancestors:[]};const fs=$.div`
|
|
2
2
|
.config-table {
|
|
3
3
|
margin-bottom: 24px;
|
|
4
4
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ft=Object.defineProperty;var zt=(e,t,n)=>t in e?Ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>zt(e,typeof t!="symbol"?t+"":t,n);import{r as S,aT as Ht,g5 as Dt,j as d,cf as ce,cX as G,g6 as et,P as u,g7 as Bt,aS as Ut,cj as Vt,a5 as Qt,eN as Wt,eL as Zt,g8 as Gt,dR as Jt,d4 as A,a9 as Xt,aa as Yt,eG as Kt,N as P,g9 as en,m as tn,ga as nn,gb as on,B as rn,gc as sn,fP as tt,q as te,gd as cn,ge as an,co as ln,gf as un,s as M,gg as fn,gh as nt,c5 as ot,gi as dn,aE as rt,bW as de,am as pn,cq as st,gj as hn}from"./index-
|
|
1
|
+
var Ft=Object.defineProperty;var zt=(e,t,n)=>t in e?Ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>zt(e,typeof t!="symbol"?t+"":t,n);import{r as S,aT as Ht,g5 as Dt,j as d,cf as ce,cX as G,g6 as et,P as u,g7 as Bt,aS as Ut,cj as Vt,a5 as Qt,eN as Wt,eL as Zt,g8 as Gt,dR as Jt,d4 as A,a9 as Xt,aa as Yt,eG as Kt,N as P,g9 as en,m as tn,ga as nn,gb as on,B as rn,gc as sn,fP as tt,q as te,gd as cn,ge as an,co as ln,gf as un,s as M,gg as fn,gh as nt,c5 as ot,gi as dn,aE as rt,bW as de,am as pn,cq as st,gj as hn}from"./index-BJnzhtRd.js";import{d as gn}from"./ExpandMore-CVyKHY4x.js";/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bM as createSvgIcon,j as jsxRuntimeExports,r as reactExports,P as PropTypes,g as getDefaultExportFromCjs,n as newStyled,H as useMediaQuery,cA as Img,a0 as default_1$1,C as CircularProgress,e$ as create,eB as isObject,dw as StyledEngineProvider,dx as ThemeProvider,f0 as ThemeProvider$1,f1 as Hidden,m as Typography,Y as Center,aO as requireCreateSvgIcon,aP as interopRequireDefaultExports,f2 as Check,cQ as commonjsGlobal,eQ as Buffer,be as React,eA as noop,s as styled}from"./index-DYxj4bsg.js";import{j as joinUrl}from"./url-join-BN5FuiJc.js";import{S as Skeleton}from"./Skeleton-D9vyaoYF.js";import{C as CloseIcon}from"./Close-DaUTq1SJ.js";const PriorityHigh=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh"),StepContext=reactExports.createContext(),{Provider}=StepContext,matchPath=(i,a,s=window.location.pathname.replace(/\/$/,"/"))=>i?a?i===s:new RegExp(i).test(s):!1;function StepProvider({children:i,steps:a,mode:s}){const[o,u]=reactExports.useState("");!o&&a.length&&u(a[0].key);const E=a.map(F=>F.children?[{key:F.key,hasChild:!0},F.children.map(L=>({parentKey:F.key,key:L.key}))]:{key:F.key}).flat(1/0),S=E.filter(F=>!F.hasChild),C=F=>{let L;const I=E.findIndex(H=>H.key===o?(L=H.parentKey,!0):!1);if(L===F)return"current";const D=E.findIndex(H=>H.key===F);if(D!==-1){if(D===I)return"current";if(D<I)return"before"}return"after"};function P(F){u(F)}function T(F){if(typeof F=="function"){const L=F(S.findIndex(I=>I.key===o));u(S[L].key)}else u(S[F].key)}const G=S.findIndex(F=>F.key===o);reactExports.useEffect(()=>{if(s==="history"){let F="";a.some(L=>L.children&&L.children.length?L.children.some(I=>matchPath(I.path,I.exact)?(F=I.key,!0):!1):matchPath(L.path,L.exact)?(F=L.key,!0):!1),F&&u(F)}return()=>{}},[a,s]);const j={steps:a,totalStepsCount:S.length,getStepStatus:C,setActiveStepByKey:P,setActiveStepByIndex:T,activeStep:G,canBackToStep:F=>s==="memory"&&G!==0&&F<G};return jsxRuntimeExports.jsx(Provider,{value:j,children:i})}function useStepContext(){return reactExports.useContext(StepContext)}StepProvider.propTypes={children:PropTypes.any.isRequired,steps:PropTypes.array.isRequired,mode:PropTypes.string};StepProvider.defaultProps={mode:"history"};var has=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;function isEmpty(i){if(i==null)return!0;if(typeof i=="boolean")return!1;if(typeof i=="number")return i===0;if(typeof i=="string"||typeof i=="function"||Array.isArray(i))return i.length===0;if(i instanceof Error)return i.message==="";if(i.toString==toString)switch(i.toString()){case"[object File]":case"[object Map]":case"[object Set]":return i.size===0;case"[object Object]":{for(var a in i)if(has.call(i,a))return!1;return!0}}return!1}var lib=isEmpty;const isEmpty$1=getDefaultExportFromCjs(lib),defaultBlockletLogo="data:image/png;base64,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",translations={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},getTranslations=i=>translations[i]?translations[i]:translations.en,getLaunchingText=i=>i==="zh"?"启动":"Launching",getBlockletDisplayName=i=>(i==null?void 0:i.title)||(i==null?void 0:i.name)||"";function AppHeader({blockletMeta:i,subTitle:a,logoUrl:s,locale:o,navLogo:u,loading:E}){const S=useMediaQuery(j=>j.breakpoints.down("md")),C=S?18:48,P=reactExports.useRef(null),[T,G]=reactExports.useState("");return reactExports.useEffect(()=>{P.current&&P.current.offsetHeight>34&&(T===""?G("middle"):T==="middle"&&G("small"))},[T]),jsxRuntimeExports.jsxs(Container$2,{className:T==="small"?"center-mode":"",children:[S?jsxRuntimeExports.jsx("div",{className:"app-icon",children:u}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[E&&jsxRuntimeExports.jsx(AppIconSkeleton,{blockletSize:C,isMobile:S}),!E&&jsxRuntimeExports.jsx(AppIcon,{blockletSize:C,logoUrl:s})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[S&&a&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:a}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!S&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:a||getLaunchingText(o)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${T==="middle"||T==="small"?"middle-size":""}`,ref:P,children:jsxRuntimeExports.jsx(AppTitle,{logoUrl:s,isMobile:S,blockletMeta:i,blockletSize:C,loading:E})})]})]})]})}AppHeader.propTypes={blockletMeta:PropTypes.object,subTitle:PropTypes.any,logoUrl:PropTypes.string,locale:PropTypes.string,navLogo:PropTypes.any,loading:PropTypes.bool};AppHeader.defaultProps={subTitle:"",logoUrl:"",locale:"",navLogo:"",loading:!1,blockletMeta:{}};function AppIconSkeleton({blockletSize:i,isMobile:a}){return a?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:i,height:i})}function AppIcon({logoUrl:i,blockletSize:a}){return jsxRuntimeExports.jsx(Img,{width:a,height:a,src:i,alt:"blocklet icon",fallback:defaultBlockletLogo,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${i}`)}function AppTitle({isMobile:i,logoUrl:a,blockletMeta:s,blockletSize:o,loading:u}){const E=getBlockletDisplayName(s);return u?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):isEmpty$1(s)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):i?jsxRuntimeExports.jsxs(MobileTitleStyle,{children:[jsxRuntimeExports.jsx(AppIcon,{blockletSize:o,logoUrl:a}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:getBlockletDisplayName(s)})]}):jsxRuntimeExports.jsx(AppLink,{target:"_blank",href:joinUrl((s==null?void 0:s.registryUrl)||"",`/blocklets/${s==null?void 0:s.did}`),title:E,children:E})}const MobileTitleStyle=newStyled.div`
|
|
1
|
+
import{bM as createSvgIcon,j as jsxRuntimeExports,r as reactExports,P as PropTypes,g as getDefaultExportFromCjs,n as newStyled,H as useMediaQuery,cA as Img,a0 as default_1$1,C as CircularProgress,e$ as create,eB as isObject,dw as StyledEngineProvider,dx as ThemeProvider,f0 as ThemeProvider$1,f1 as Hidden,m as Typography,Y as Center,aO as requireCreateSvgIcon,aP as interopRequireDefaultExports,f2 as Check,cQ as commonjsGlobal,eQ as Buffer,be as React,eA as noop,s as styled}from"./index-BJnzhtRd.js";import{j as joinUrl}from"./url-join-pEynD2Ji.js";import{S as Skeleton}from"./Skeleton-CWJ5kMp8.js";import{C as CloseIcon}from"./Close-DTQrAVX4.js";const PriorityHigh=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh"),StepContext=reactExports.createContext(),{Provider}=StepContext,matchPath=(i,a,s=window.location.pathname.replace(/\/$/,"/"))=>i?a?i===s:new RegExp(i).test(s):!1;function StepProvider({children:i,steps:a,mode:s}){const[o,u]=reactExports.useState("");!o&&a.length&&u(a[0].key);const E=a.map(F=>F.children?[{key:F.key,hasChild:!0},F.children.map(L=>({parentKey:F.key,key:L.key}))]:{key:F.key}).flat(1/0),S=E.filter(F=>!F.hasChild),C=F=>{let L;const I=E.findIndex(H=>H.key===o?(L=H.parentKey,!0):!1);if(L===F)return"current";const D=E.findIndex(H=>H.key===F);if(D!==-1){if(D===I)return"current";if(D<I)return"before"}return"after"};function P(F){u(F)}function T(F){if(typeof F=="function"){const L=F(S.findIndex(I=>I.key===o));u(S[L].key)}else u(S[F].key)}const G=S.findIndex(F=>F.key===o);reactExports.useEffect(()=>{if(s==="history"){let F="";a.some(L=>L.children&&L.children.length?L.children.some(I=>matchPath(I.path,I.exact)?(F=I.key,!0):!1):matchPath(L.path,L.exact)?(F=L.key,!0):!1),F&&u(F)}return()=>{}},[a,s]);const j={steps:a,totalStepsCount:S.length,getStepStatus:C,setActiveStepByKey:P,setActiveStepByIndex:T,activeStep:G,canBackToStep:F=>s==="memory"&&G!==0&&F<G};return jsxRuntimeExports.jsx(Provider,{value:j,children:i})}function useStepContext(){return reactExports.useContext(StepContext)}StepProvider.propTypes={children:PropTypes.any.isRequired,steps:PropTypes.array.isRequired,mode:PropTypes.string};StepProvider.defaultProps={mode:"history"};var has=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;function isEmpty(i){if(i==null)return!0;if(typeof i=="boolean")return!1;if(typeof i=="number")return i===0;if(typeof i=="string"||typeof i=="function"||Array.isArray(i))return i.length===0;if(i instanceof Error)return i.message==="";if(i.toString==toString)switch(i.toString()){case"[object File]":case"[object Map]":case"[object Set]":return i.size===0;case"[object Object]":{for(var a in i)if(has.call(i,a))return!1;return!0}}return!1}var lib=isEmpty;const isEmpty$1=getDefaultExportFromCjs(lib),defaultBlockletLogo="data:image/png;base64,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",translations={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},getTranslations=i=>translations[i]?translations[i]:translations.en,getLaunchingText=i=>i==="zh"?"启动":"Launching",getBlockletDisplayName=i=>(i==null?void 0:i.title)||(i==null?void 0:i.name)||"";function AppHeader({blockletMeta:i,subTitle:a,logoUrl:s,locale:o,navLogo:u,loading:E}){const S=useMediaQuery(j=>j.breakpoints.down("md")),C=S?18:48,P=reactExports.useRef(null),[T,G]=reactExports.useState("");return reactExports.useEffect(()=>{P.current&&P.current.offsetHeight>34&&(T===""?G("middle"):T==="middle"&&G("small"))},[T]),jsxRuntimeExports.jsxs(Container$2,{className:T==="small"?"center-mode":"",children:[S?jsxRuntimeExports.jsx("div",{className:"app-icon",children:u}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[E&&jsxRuntimeExports.jsx(AppIconSkeleton,{blockletSize:C,isMobile:S}),!E&&jsxRuntimeExports.jsx(AppIcon,{blockletSize:C,logoUrl:s})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[S&&a&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:a}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!S&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:a||getLaunchingText(o)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${T==="middle"||T==="small"?"middle-size":""}`,ref:P,children:jsxRuntimeExports.jsx(AppTitle,{logoUrl:s,isMobile:S,blockletMeta:i,blockletSize:C,loading:E})})]})]})]})}AppHeader.propTypes={blockletMeta:PropTypes.object,subTitle:PropTypes.any,logoUrl:PropTypes.string,locale:PropTypes.string,navLogo:PropTypes.any,loading:PropTypes.bool};AppHeader.defaultProps={subTitle:"",logoUrl:"",locale:"",navLogo:"",loading:!1,blockletMeta:{}};function AppIconSkeleton({blockletSize:i,isMobile:a}){return a?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:i,height:i})}function AppIcon({logoUrl:i,blockletSize:a}){return jsxRuntimeExports.jsx(Img,{width:a,height:a,src:i,alt:"blocklet icon",fallback:defaultBlockletLogo,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${i}`)}function AppTitle({isMobile:i,logoUrl:a,blockletMeta:s,blockletSize:o,loading:u}){const E=getBlockletDisplayName(s);return u?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):isEmpty$1(s)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):i?jsxRuntimeExports.jsxs(MobileTitleStyle,{children:[jsxRuntimeExports.jsx(AppIcon,{blockletSize:o,logoUrl:a}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:getBlockletDisplayName(s)})]}):jsxRuntimeExports.jsx(AppLink,{target:"_blank",href:joinUrl((s==null?void 0:s.registryUrl)||"",`/blocklets/${s==null?void 0:s.did}`),title:E,children:E})}const MobileTitleStyle=newStyled.div`
|
|
2
2
|
.ellipsis-title {
|
|
3
3
|
flex: 1;
|
|
4
4
|
position: absolute;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as o,s as C,j as n,N as u,aO as x,aP as g,am as j,q as T}from"./index-
|
|
1
|
+
import{P as o,s as C,j as n,N as u,aO as x,aP as g,am as j,q as T}from"./index-BJnzhtRd.js";function i({icon:e,title:t,description:s,extra:E,...I}){return n.jsxs(w,{...I,children:[e,typeof t=="string"?n.jsx(u,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:t}):t,typeof s=="string"?n.jsx(u,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:s}):s,n.jsx(u,{mt:3,children:E})]})}i.propTypes={icon:o.element,title:o.oneOfType([o.string,o.element]),description:o.oneOfType([o.string,o.element]),actions:o.any,extra:o.element};i.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const w=C("div")`
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as l,bj as m,u as p,j as s,Q as u}from"./index-
|
|
1
|
+
import{z as l,bj as m,u as p,j as s,Q as u}from"./index-BJnzhtRd.js";import{L as g,D as v}from"./download-B57AHfX0.js";import{F as f,S as j}from"./Select-BjFMRCFC.js";import"./ButtonGroup-stQLgH3W.js";import"./getValidReactChildren-B0SBEHgb.js";function k(){const i=l(),{name:a="abtnode"}=m(),{info:n}=p(),r=n.routing.provider,o=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(r){const e=`Service Gateway(${r})`;o.push({id:`service-gateway-${r}`,name:e,types:["error","access"]})}const c=e=>{i(`/logs/${e.target.value}`)},d=s.jsx(f,{sx:{minWidth:240},children:s.jsx(j,{value:a,onChange:c,size:"small",children:o.map(e=>s.jsx(u,{value:e.id,children:e.name},e.id))})}),t=o.find(e=>e.id===a)||o[0];return s.jsx(g,{name:t.name,logId:t.id,types:t.types,prepend:d,postpend:s.jsx(v,{id:n.did,name:"blocklet-server"})},t.id)}export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as H,j as o,fz as Eo,cj as Je,fA as jo,aO as br,aP as xr,fB as pt,N as J,aw as wr,aB as $e,m as xe,dZ as So,d4 as Jr,fC as Ao,q as Be,fD as Er,fE as Po,aK as Oo,ci as Io,e0 as sr,R as At,J as Un,eS as qn,eR as Bt,fF as ht,eP as De,fG as Ro,fn as Fn,fH as Co,fI as To,fo as Kn,fJ as jr,fK as Do,fL as _o,fM as No,fN as Bo,eQ as cr,g as $n,cQ as Xr,eE as Lo,K as ko,bo as Re,aS as Mn,Q as Pt,eF as Uo,fO as Sr,ax as et,D as Xe,B as Ae,C as at,w as Ar,U as it,V as Me,P as F,fP as qo,k as lr,aY as Fo,x as Ko,y as $o,n as Le,fc as Mo,f as gt,af as yt,X as Ke,cd as tt,A as ze,fQ as zo,b as Qe,d8 as Wo,t as Pr,F as Se,a3 as ur,W as Ot,cf as Vo,cX as Ho,fR as zn,aU as Go,fS as Yo,aH as Zo,ab as Jo,cC as Xo,a5 as Qo,bs as ei,b1 as ti,S as ri,O as ni}from"./index-DYxj4bsg.js";import{c as oi}from"./index-CFR1XYQc.js";import{d as It}from"./Add-1IpBHqiQ.js";import{d as ii}from"./Loop-CyRqHFwv.js";import{d as ai}from"./ViewList-CSwdI9xa.js";import{L as si,S as ci,d as Wn}from"./list-header-CAC5y8Zb.js";import{D as Or,g as li}from"./index-xwOBGVcu.js";import"./index-j0AXsS2r.js";import{c as $t,U as Mt,d as Vn}from"./resource-dialog-BoHq8v69.js";import{T as ui}from"./index-BHnQz9ut.js";import{E as Hn}from"./index-DVhqctGu.js";import"./index-D4yD9wCL.js";import"./index-DtvC5owf.js";import{o as Gn}from"./index-ZG7jWpak.js";import{W as Yn}from"./url-evaluation-_cliB2H6.js";import{a as Ue}from"./team-C9C-b8dk.js";import{u as Zn}from"./blocklet-q3h8NbCP.js";import{C as Lt}from"./click-to-copy-A5WCwDlw.js";import{F as fr,S as dr}from"./Select-DMrgQlpi.js";import{I as pr}from"./InputLabel-CBKMP0kd.js";import{T as Rt}from"./TextField-Ck96Zj1i.js";import{I as mr}from"./index-BvGfyxwm.js";import{d as fi}from"./DeleteOutline-BlYvTbWy.js";import{N as di}from"./index-DhjpRk6v.js";import{u as pi}from"./uniqBy-COL9eNcG.js";import{b as mi}from"./sdk-CFjHlo2e.js";import{d as hi}from"./Delete-Ctg2zeKs.js";import{A as gi}from"./actions-DCoY4ND_.js";import{S as yi}from"./shorten-label-BmNhwxO2.js";var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});var Jn=Ir.default=void 0;vi(H);var nt=o;function vi(e){return e&&e.__esModule?e:{default:e}}function Qr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function en(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qr(Object(r),!0).forEach(function(n){bi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bi(e,t,r){return(t=xi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xi(e){var t=wi(e,"string");return typeof t=="symbol"?t:t+""}function wi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rr=function(t){return(0,nt.jsxs)("svg",en(en({},t),{},{children:[(0,nt.jsx)("g",{clipPath:"url(#clip0)",children:(0,nt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,nt.jsx)("defs",{children:(0,nt.jsx)("clipPath",{id:"clip0",children:(0,nt.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Rr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Rr.displayName="person";Jn=Ir.default=Rr;var St={},Ei=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Xn="%[a-f0-9]{2}",tn=new RegExp("("+Xn+")|([^%]+?)","gi"),rn=new RegExp("("+Xn+")+","gi");function hr(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],hr(r),hr(n))}function ji(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(tn)||[],r=1;r<t.length;r++)e=hr(t,r).join(""),t=e.match(tn)||[];return e}}function Si(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=rn.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ji(r[0]);n!==r[0]&&(t[r[0]]=n)}r=rn.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),l=0;l<a.length;l++){var p=a[l];e=e.replace(new RegExp(p,"g"),t[p])}return e}var Ai=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Si(e)}},Pi=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},Oi=function(e,t){for(var r={},n=Object.keys(e),a=Array.isArray(t),l=0;l<n.length;l++){var p=n[l],v=e[p];(a?t.indexOf(p)!==-1:t(p,v,e))&&(r[p]=v)}return r};(function(e){const t=Ei,r=Ai,n=Pi,a=Oi,l=c=>c==null;function p(c){switch(c.arrayFormat){case"index":return i=>(s,d)=>{const m=s.length;return d===void 0||c.skipNull&&d===null||c.skipEmptyString&&d===""?s:d===null?[...s,[E(i,c),"[",m,"]"].join("")]:[...s,[E(i,c),"[",E(m,c),"]=",E(d,c)].join("")]};case"bracket":return i=>(s,d)=>d===void 0||c.skipNull&&d===null||c.skipEmptyString&&d===""?s:d===null?[...s,[E(i,c),"[]"].join("")]:[...s,[E(i,c),"[]=",E(d,c)].join("")];case"comma":case"separator":return i=>(s,d)=>d==null||d.length===0?s:s.length===0?[[E(i,c),"=",E(d,c)].join("")]:[[s,E(d,c)].join(c.arrayFormatSeparator)];default:return i=>(s,d)=>d===void 0||c.skipNull&&d===null||c.skipEmptyString&&d===""?s:d===null?[...s,E(i,c)]:[...s,[E(i,c),"=",E(d,c)].join("")]}}function v(c){let i;switch(c.arrayFormat){case"index":return(s,d,m)=>{if(i=/\[(\d*)\]$/.exec(s),s=s.replace(/\[\d*\]$/,""),!i){m[s]=d;return}m[s]===void 0&&(m[s]={}),m[s][i[1]]=d};case"bracket":return(s,d,m)=>{if(i=/(\[\])$/.exec(s),s=s.replace(/\[\]$/,""),!i){m[s]=d;return}if(m[s]===void 0){m[s]=[d];return}m[s]=[].concat(m[s],d)};case"comma":case"separator":return(s,d,m)=>{const I=typeof d=="string"&&d.includes(c.arrayFormatSeparator),S=typeof d=="string"&&!I&&f(d,c).includes(c.arrayFormatSeparator);d=S?f(d,c):d;const D=I||S?d.split(c.arrayFormatSeparator).map(z=>f(z,c)):d===null?d:f(d,c);m[s]=D};default:return(s,d,m)=>{if(m[s]===void 0){m[s]=d;return}m[s]=[].concat(m[s],d)}}}function w(c){if(typeof c!="string"||c.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function E(c,i){return i.encode?i.strict?t(c):encodeURIComponent(c):c}function f(c,i){return i.decode?r(c):c}function O(c){return Array.isArray(c)?c.sort():typeof c=="object"?O(Object.keys(c)).sort((i,s)=>Number(i)-Number(s)).map(i=>c[i]):c}function y(c){const i=c.indexOf("#");return i!==-1&&(c=c.slice(0,i)),c}function A(c){let i="";const s=c.indexOf("#");return s!==-1&&(i=c.slice(s)),i}function P(c){c=y(c);const i=c.indexOf("?");return i===-1?"":c.slice(i+1)}function B(c,i){return i.parseNumbers&&!Number.isNaN(Number(c))&&typeof c=="string"&&c.trim()!==""?c=Number(c):i.parseBooleans&&c!==null&&(c.toLowerCase()==="true"||c.toLowerCase()==="false")&&(c=c.toLowerCase()==="true"),c}function j(c,i){i=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},i),w(i.arrayFormatSeparator);const s=v(i),d=Object.create(null);if(typeof c!="string"||(c=c.trim().replace(/^[?#&]/,""),!c))return d;for(const m of c.split("&")){if(m==="")continue;let[I,S]=n(i.decode?m.replace(/\+/g," "):m,"=");S=S===void 0?null:["comma","separator"].includes(i.arrayFormat)?S:f(S,i),s(f(I,i),S,d)}for(const m of Object.keys(d)){const I=d[m];if(typeof I=="object"&&I!==null)for(const S of Object.keys(I))I[S]=B(I[S],i);else d[m]=B(I,i)}return i.sort===!1?d:(i.sort===!0?Object.keys(d).sort():Object.keys(d).sort(i.sort)).reduce((m,I)=>{const S=d[I];return S&&typeof S=="object"&&!Array.isArray(S)?m[I]=O(S):m[I]=S,m},Object.create(null))}e.extract=P,e.parse=j,e.stringify=(c,i)=>{if(!c)return"";i=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},i),w(i.arrayFormatSeparator);const s=S=>i.skipNull&&l(c[S])||i.skipEmptyString&&c[S]==="",d=p(i),m={};for(const S of Object.keys(c))s(S)||(m[S]=c[S]);const I=Object.keys(m);return i.sort!==!1&&I.sort(i.sort),I.map(S=>{const D=c[S];return D===void 0?"":D===null?E(S,i):Array.isArray(D)?D.reduce(d(S),[]).join("&"):E(S,i)+"="+E(D,i)}).filter(S=>S.length>0).join("&")},e.parseUrl=(c,i)=>{i=Object.assign({decode:!0},i);const[s,d]=n(c,"#");return Object.assign({url:s.split("?")[0]||"",query:j(P(c),i)},i&&i.parseFragmentIdentifier&&d?{fragmentIdentifier:f(d,i)}:{})},e.stringifyUrl=(c,i)=>{i=Object.assign({encode:!0,strict:!0},i);const s=y(c.url).split("?")[0]||"",d=e.extract(c.url),m=e.parse(d,{sort:!1}),I=Object.assign(m,c.query);let S=e.stringify(I,i);S&&(S=`?${S}`);let D=A(c.url);return c.fragmentIdentifier&&(D=`#${E(c.fragmentIdentifier,i)}`),`${s}${S}${D}`},e.pick=(c,i,s)=>{s=Object.assign({parseFragmentIdentifier:!0},s);const{url:d,query:m,fragmentIdentifier:I}=e.parseUrl(c,s);return e.stringifyUrl({url:d,query:a(m,i),fragmentIdentifier:I},s)},e.exclude=(c,i,s)=>{const d=Array.isArray(i)?m=>!i.includes(m):(m,I)=>!i(m,I);return e.pick(c,d,s)}})(St);const ft=jo,Ii={parseNumbers:!1,parseBooleans:!1},Ri={skipNull:!1,skipEmptyString:!1},Ci=(e,t)=>{var r,n;const{navigateMode:a="push",parseOptions:l,stringifyOptions:p}={},v=Object.assign(Object.assign({},Ii),l),w=Object.assign(Object.assign({},Ri),p),E=ft.useLocation(),f=(r=ft.useHistory)===null||r===void 0?void 0:r.call(ft),O=(n=ft.useNavigate)===null||n===void 0?void 0:n.call(ft),y=Eo(),A=H.useRef(typeof e=="function"?e():e||{}),P=H.useMemo(()=>St.parse(E.search,v),[E.search]),B=H.useMemo(()=>Object.assign(Object.assign({},A.current),P),[P]);return[B,Je(c=>{const i=typeof c=="function"?c(B):c;y(),f&&f[a]({hash:E.hash,search:St.stringify(Object.assign(Object.assign({},P),i),w)||"?"},E.state),O&&O({hash:E.hash,search:St.stringify(Object.assign(Object.assign({},P),i),w)||"?"},{replace:a==="replace",state:E.state})})]},Ti=Ci;var Cr={},Di=xr;Object.defineProperty(Cr,"__esModule",{value:!0});var Qn=Cr.default=void 0,_i=Di(br()),Ni=o;Qn=Cr.default=(0,_i.default)((0,Ni.jsx)("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}),"Verified");class Bi extends Error{constructor(t){super(),this.name="AbortError",this.message=t}}const nn=e=>globalThis.DOMException===void 0?new Bi(e):new DOMException(e),on=e=>{const t=e.reason===void 0?nn("This operation was aborted."):e.reason;return t instanceof Error?t:nn(t)};async function Li(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:a}={}){return new Promise((l,p)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const v=[],w=[],E=new Map;let f=!1,O=!1,y=!1,A=0,P=0;const B=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),j=i=>{f=!0,O=!0,p(i)};a&&(a.aborted&&j(on(a)),a.addEventListener("abort",()=>{j(on(a))}));const c=async()=>{if(O)return;const i=await B.next(),s=P;if(P++,i.done){if(y=!0,A===0&&!O){if(!n&&w.length>0){j(new AggregateError(w));return}if(O=!0,E.size===0){l(v);return}const d=[];for(const[m,I]of v.entries())E.get(m)!==an&&d.push(I);l(d)}return}A++,(async()=>{try{const d=await i.value;if(O)return;const m=await t(d,s);m===an&&E.set(s,m),v[s]=m,A--,await c()}catch(d){if(n)j(d);else{w.push(d),A--;try{await c()}catch(m){j(m)}}}})()};(async()=>{for(let i=0;i<r;i++){try{await c()}catch(s){j(s);break}if(y||f)break}})()})}const an=Symbol("skip");async function ki(e,t){return Li(e,r=>r(),t)}function Ui({user:e,sessionUser:t}){const r=pt(()=>{var n;return(n=(e==null?void 0:e.passports)||[])==null?void 0:n.find(a=>a.name===t.role)},[e==null?void 0:e.passports,t==null?void 0:t.role]);return o.jsxs(J,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(wr,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did,sx:{flexShrink:0}}),o.jsxs(J,{sx:{flex:1,overflow:"hidden"},children:[o.jsxs(J,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx($e,{title:t.fullName,children:o.jsx(xe,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:t.fullName})}),o.jsx(So,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Jr.textBase,borderColor:Jr.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),o.jsx($e,{title:t.email,children:o.jsx(xe,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.email})})]})]})}const qi={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},eo="Reserved IP",sn="ip-region-cache";async function Fi(e){const t=`https://ipapi.co/${e}/json/`,n=await(await fetch(t)).json();let a="";return n.error?n.reserved&&(a=eo):a=[n.country_name,n.region,n.city].filter(Boolean).join("/"),a}async function Ki(e){const t=`https://api.ip.sb/geoip/${e}`,n=await(await fetch(t)).json();let a="";return n.error?n.reserved&&(a=eo):a=[n.country,n.region,n.city].filter(Boolean).join("/"),a}async function $i(e){let t="",r={};try{const n=localStorage.getItem(sn);n&&(r=JSON.parse(n))}catch{r={}}if(r[e])t=r[e];else{try{t=await Ki(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await Fi(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const n=Object.keys(r);n.length>100&&delete r[n[0]],r[e]&&delete r[e],r[e]=t,localStorage.setItem(sn,JSON.stringify(r))}return t}async function Mi(e){return Promise.all(e.map(t=>$i(t)))}const cn=e=>new Mt(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Mt.BROWSER.NAME,Mt.BROWSER.VERSION]]}).getResult();function zi({user:e,showAction:t=!0,showUser:r=!0}){const n=Ao(),{locale:a}=Be(),{confirmApi:l,confirmHolder:p}=Er(),v=Je((i,s={})=>Po(qi,i,a,"en",s)),w=Je(async()=>{let i=e==null?void 0:e.userSessions;i||(i=await $t.userSession.getUserSessions({did:e.did}));try{const d=i==null?void 0:i.map((S,D)=>[D,S.lastLoginIp]).filter(S=>!!S[1]),m=d==null?void 0:d.map(S=>S[1]),I=await Mi(m);for(let S=0;S<I.length;S++){const D=I[S],z=d[S],X=i[z[0]];X.ipRegion=D}}catch(d){console.warn("Failed to convert ip to region"),console.error(d)}const s=new Date().getTime();return Oo(i,d=>d.visitorId===n?-1:s-new Date(d.updatedAt).getTime())}),E=Io(w),f=pt(()=>E.data||[],[E.data]),O=pt(()=>f.reduce((i,s)=>(i[s.lastLoginIp]=s.ipRegion,i),{}),[f]),y=Je(({visitorId:i})=>{l.open({title:v("logoutThisSession"),content:v("logoutThisSessionConfirm"),confirmButtonText:v("confirm"),cancelButtonText:v("cancel"),onConfirm:async()=>{await $t.user.logout({visitorId:i}),E.refresh(),l.close()}})}),A=pt(()=>f.filter(s=>s.visitorId!==n),[f]),P=Je(()=>{l.open({title:v("logoutAllSession"),content:v("logoutAllSessionConfirm"),confirmButtonText:v("confirm"),cancelButtonText:v("cancel"),onConfirm:async()=>{const i=A.map(s=>()=>$t.user.logout({visitorId:s.visitorId}));await ki(i,{concurrency:3,stopOnError:!1}),E.refresh(),l.close()}})}),B=[];t&&B.push(o.jsx($e,{title:v("logoutAllTips"),children:o.jsx(sr,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:P,disabled:A.length===0,children:v("logoutAll")})},"logoutAll"));const j=pt(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),c=[{label:v("platform"),name:"platform",options:{customBodyRenderLite:i=>{var m,I;const s=f[i],d=cn(s.ua);return o.jsx(J,{children:[(m=d.os)==null?void 0:m.name,(I=d.os)==null?void 0:I.version].filter(Boolean).join("/")||v("unknown")})}}},{label:v("deviceType"),name:"deviceType",options:{customBodyRenderLite:i=>{var m,I;const s=f[i],d=cn(s.ua);return o.jsx(J,{children:[(m=d.browser)==null?void 0:m.name,(I=d.browser)==null?void 0:I.version].filter(Boolean).join("/")||v("unknown")})}}},{label:v("walletOS"),name:"walletOS",options:{customBodyRenderLite:i=>{var d;const s=f[i];return o.jsx(J,{children:((d=s.extra)==null?void 0:d.walletOS)||v("unknown")})}}},r&&{label:v("user"),name:"user",options:{customBodyRenderLite:i=>{const s=f[i];return o.jsx(J,{sx:{minWidth:150,maxWidth:250},children:o.jsx(Ui,{sessionUser:s.user,user:e})})}}},{label:v("createdAt"),name:"createdAt",options:{customBodyRenderLite:i=>{const s=f[i];return s.createdAt?o.jsx(At,{value:s.createdAt,relativeRange:3*86400*1e3,locale:a}):v("unknown")}}},{label:v("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:i=>{const s=f[i];return s.status==="expired"?v("expired"):o.jsx(At,{value:s.updatedAt,relativeRange:3*86400*1e3,locale:a})}}},{label:v("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:i=>{const s=f[i];return o.jsx(J,{children:O[s.lastLoginIp]?o.jsxs(o.Fragment,{children:[o.jsx(xe,{variant:"body2",children:O[s.lastLoginIp]}),o.jsx(xe,{variant:"body2",color:"grey",children:s.lastLoginIp||v("unknown")})]}):o.jsx(xe,{children:s.lastLoginIp||v("unknown")})})}}},t&&{label:v("actions"),name:"actions",options:{customBodyRenderLite:i=>{const s=f[i];return o.jsx(J,{children:o.jsx(sr,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:n===s.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>y({visitorId:s.visitorId}),children:s.status==="expired"?v("remove"):n===s.visitorId?v("currentSession"):v("logout")})})}}}].filter(Boolean);return o.jsxs(J,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[p,o.jsx(Or,{locale:a,data:f,columns:c,customButtons:B,options:j,loading:E.loading})]})}var he={};Object.defineProperty(he,"__esModule",{value:!0});he.isValid=he.fromJSON=he.fromRandom=he.fromAddress=he.fromPublicKey=he.fromSecretKey=he.Wallet=he.WalletType=void 0;const vt=qn,Ct=Bt,Ie=Un;he.WalletType=Ie.DidType;function st(e,t="default"){const r=(0,Ie.DidType)(t),n=(0,Ct.getSigner)(r.pk),a=(0,Ct.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Ie.fromPublicKey)(e.pk,r):e.address,hash(l,p=1,v="hex"){return a(l,p,v)},sign(l,p=!0,v="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(p){const w=a(l,1);return n.sign(w,e.sk,v)}return n.sign(l,e.sk,v)},verify(l,p,v=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const w=v?a(l,1):l;return n.verify(w,p,e.pk)},ethHash(l){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(l)},ethSign(l,p=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return p?n.ethSign(n.ethHash(l),(0,vt.toHex)(e.sk)):n.ethSign(l,(0,vt.toHex)(e.sk))},ethVerify(l,p,v=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const w=v?n.ethHash(l):l;return n.ethRecover(w,p)===this.address},toAddress(){return e.pk?(0,Ie.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Ie.DidType.toJSON(r),sk:(0,vt.toHex)(e.sk),pk:(0,vt.toHex)(e.pk),address:this.address}}}}he.Wallet=st;function Wi(e,t="default"){const r=(0,Ie.DidType)(t),n={sk:e,pk:(0,Ct.getSigner)(r.pk).getPublicKey(e)};return st(n,r)}he.fromSecretKey=Wi;function Vi(e,t="default"){return st({pk:e},(0,Ie.DidType)(t))}he.fromPublicKey=Vi;function Hi(e){return st({address:(0,Ie.toAddress)(e)},(0,Ie.toTypeInfo)(e))}he.fromAddress=Hi;function Gi(e="default"){const t=(0,Ie.DidType)(e),n=(0,Ct.getSigner)(t.pk).genKeyPair();return st({sk:n.secretKey,pk:n.publicKey},t)}he.fromRandom=Gi;function Yi(e){const t=Ie.DidType.fromJSON(e.type);return st(e,t)}he.fromJSON=Yi;function Zi(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}he.isValid=Zi;var zt={exports:{}},Wt={},ln;function to(){if(ln)return Wt;ln=1;function e(i){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(i)}function t(i,s,d){return Object.defineProperty(i,"prototype",{writable:!1}),i}function r(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")}function n(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),s&&a(i,s)}function a(i,s){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,I){return m.__proto__=I,m},a(i,s)}function l(i){var s=w();return function(){var m=E(i),I;if(s){var S=E(this).constructor;I=Reflect.construct(m,arguments,S)}else I=m.apply(this,arguments);return p(this,I)}}function p(i,s){if(s&&(e(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(i)}function v(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E(i){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},E(i)}var f={},O,y;function A(i,s,d){d||(d=Error);function m(S,D,z){return typeof s=="string"?s:s(S,D,z)}var I=function(S){n(z,S);var D=l(z);function z(X,Q,G){var ee;return r(this,z),ee=D.call(this,m(X,Q,G)),ee.code=i,ee}return t(z)}(d);f[i]=I}function P(i,s){if(Array.isArray(i)){var d=i.length;return i=i.map(function(m){return String(m)}),d>2?"one of ".concat(s," ").concat(i.slice(0,d-1).join(", "),", or ")+i[d-1]:d===2?"one of ".concat(s," ").concat(i[0]," or ").concat(i[1]):"of ".concat(s," ").concat(i[0])}else return"of ".concat(s," ").concat(String(i))}function B(i,s,d){return i.substr(0,s.length)===s}function j(i,s,d){return(d===void 0||d>i.length)&&(d=i.length),i.substring(d-s.length,d)===s}function c(i,s,d){return typeof d!="number"&&(d=0),d+s.length>i.length?!1:i.indexOf(s,d)!==-1}return A("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),A("ERR_INVALID_ARG_TYPE",function(i,s,d){O===void 0&&(O=gr()),O(typeof i=="string","'name' must be a string");var m;typeof s=="string"&&B(s,"not ")?(m="must not be",s=s.replace(/^not /,"")):m="must be";var I;if(j(i," argument"))I="The ".concat(i," ").concat(m," ").concat(P(s,"type"));else{var S=c(i,".")?"property":"argument";I='The "'.concat(i,'" ').concat(S," ").concat(m," ").concat(P(s,"type"))}return I+=". Received type ".concat(e(d)),I},TypeError),A("ERR_INVALID_ARG_VALUE",function(i,s){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";y===void 0&&(y=ht);var m=y.inspect(s);return m.length>128&&(m="".concat(m.slice(0,128),"...")),"The argument '".concat(i,"' ").concat(d,". Received ").concat(m)},TypeError),A("ERR_INVALID_RETURN_VALUE",function(i,s,d){var m;return d&&d.constructor&&d.constructor.name?m="instance of ".concat(d.constructor.name):m="type ".concat(e(d)),"Expected ".concat(i,' to be returned from the "').concat(s,'"')+" function but got ".concat(m,".")},TypeError),A("ERR_MISSING_ARGS",function(){for(var i=arguments.length,s=new Array(i),d=0;d<i;d++)s[d]=arguments[d];O===void 0&&(O=gr()),O(s.length>0,"At least one arg needs to be specified");var m="The ",I=s.length;switch(s=s.map(function(S){return'"'.concat(S,'"')}),I){case 1:m+="".concat(s[0]," argument");break;case 2:m+="".concat(s[0]," and ").concat(s[1]," arguments");break;default:m+=s.slice(0,I-1).join(", "),m+=", and ".concat(s[I-1]," arguments");break}return"".concat(m," must be specified")},TypeError),Wt.codes=f,Wt}var Vt,un;function Ji(){if(un)return Vt;un=1;function e(R,C){var K=Object.keys(R);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(R);C&&(_=_.filter(function(V){return Object.getOwnPropertyDescriptor(R,V).enumerable})),K.push.apply(K,_)}return K}function t(R){for(var C=1;C<arguments.length;C++){var K=arguments[C]!=null?arguments[C]:{};C%2?e(Object(K),!0).forEach(function(_){r(R,_,K[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(_){Object.defineProperty(R,_,Object.getOwnPropertyDescriptor(K,_))})}return R}function r(R,C,K){return C=p(C),C in R?Object.defineProperty(R,C,{value:K,enumerable:!0,configurable:!0,writable:!0}):R[C]=K,R}function n(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function a(R,C){for(var K=0;K<C.length;K++){var _=C[K];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(R,p(_.key),_)}}function l(R,C,K){return C&&a(R.prototype,C),Object.defineProperty(R,"prototype",{writable:!1}),R}function p(R){var C=v(R,"string");return i(C)==="symbol"?C:String(C)}function v(R,C){if(i(R)!=="object"||R===null)return R;var K=R[Symbol.toPrimitive];if(K!==void 0){var _=K.call(R,C||"default");if(i(_)!=="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(R)}function w(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),C&&j(R,C)}function E(R){var C=P();return function(){var _=c(R),V;if(C){var b=c(this).constructor;V=Reflect.construct(_,arguments,b)}else V=_.apply(this,arguments);return f(this,V)}}function f(R,C){if(C&&(i(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(R)}function O(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function y(R){var C=typeof Map=="function"?new Map:void 0;return y=function(_){if(_===null||!B(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof C<"u"){if(C.has(_))return C.get(_);C.set(_,V)}function V(){return A(_,arguments,c(this).constructor)}return V.prototype=Object.create(_.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),j(V,_)},y(R)}function A(R,C,K){return P()?A=Reflect.construct.bind():A=function(V,b,h){var x=[null];x.push.apply(x,b);var L=Function.bind.apply(V,x),N=new L;return h&&j(N,h.prototype),N},A.apply(null,arguments)}function P(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(R){return Function.toString.call(R).indexOf("[native code]")!==-1}function j(R,C){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,V){return _.__proto__=V,_},j(R,C)}function c(R){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},c(R)}function i(R){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},i(R)}var s=ht,d=s.inspect,m=to(),I=m.codes.ERR_INVALID_ARG_TYPE;function S(R,C,K){return(K===void 0||K>R.length)&&(K=R.length),R.substring(K-C.length,K)===C}function D(R,C){if(C=Math.floor(C),R.length==0||C==0)return"";var K=R.length*C;for(C=Math.floor(Math.log(C)/Math.log(2));C;)R+=R,C--;return R+=R.substring(0,K-R.length),R}var z="",X="",Q="",G="",ee={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},we=10;function Y(R){var C=Object.keys(R),K=Object.create(Object.getPrototypeOf(R));return C.forEach(function(_){K[_]=R[_]}),Object.defineProperty(K,"message",{value:R.message}),K}function de(R){return d(R,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function Ee(R,C,K){var _="",V="",b=0,h="",x=!1,L=de(R),N=L.split(`
|
|
1
|
+
import{r as H,j as o,fz as Eo,cj as Je,fA as jo,aO as br,aP as xr,fB as pt,N as J,aw as wr,aB as $e,m as xe,dZ as So,d4 as Jr,fC as Ao,q as Be,fD as Er,fE as Po,aK as Oo,ci as Io,e0 as sr,R as At,J as Un,eS as qn,eR as Bt,fF as ht,eP as De,fG as Ro,fn as Fn,fH as Co,fI as To,fo as Kn,fJ as jr,fK as Do,fL as _o,fM as No,fN as Bo,eQ as cr,g as $n,cQ as Xr,eE as Lo,K as ko,bo as Re,aS as Mn,Q as Pt,eF as Uo,fO as Sr,ax as et,D as Xe,B as Ae,C as at,w as Ar,U as it,V as Me,P as F,fP as qo,k as lr,aY as Fo,x as Ko,y as $o,n as Le,fc as Mo,f as gt,af as yt,X as Ke,cd as tt,A as ze,fQ as zo,b as Qe,d8 as Wo,t as Pr,F as Se,a3 as ur,W as Ot,cf as Vo,cX as Ho,fR as zn,aU as Go,fS as Yo,aH as Zo,ab as Jo,cC as Xo,a5 as Qo,bs as ei,b1 as ti,S as ri,O as ni}from"./index-BJnzhtRd.js";import{c as oi}from"./index-C4dTigzK.js";import{d as It}from"./Add-Dh_DeTW0.js";import{d as ii}from"./Loop-WIH3HPCS.js";import{d as ai}from"./ViewList-C2PZp7Ah.js";import{L as si,S as ci,d as Wn}from"./list-header-D2LZ98zO.js";import{D as Or,g as li}from"./index-D-ozzI7w.js";import"./index-BxngBW5S.js";import{c as $t,U as Mt,d as Vn}from"./resource-dialog-BUSTiKav.js";import{T as ui}from"./index-BLAXOuyV.js";import{E as Hn}from"./index-cJ8AIyQl.js";import"./index-CMZcjkA4.js";import"./index-DpaWBoah.js";import{o as Gn}from"./index-ZG7jWpak.js";import{W as Yn}from"./url-evaluation-C1MAR5hw.js";import{a as Ue}from"./team-DvBIHwmh.js";import{u as Zn}from"./blocklet-CpvMNcyR.js";import{C as Lt}from"./click-to-copy-BHPvbJ6H.js";import{F as fr,S as dr}from"./Select-BjFMRCFC.js";import{I as pr}from"./InputLabel-do0oj_cA.js";import{T as Rt}from"./TextField-CffC6XHW.js";import{I as mr}from"./index-BfSSkn6W.js";import{d as fi}from"./DeleteOutline-DPxWTBB6.js";import{N as di}from"./index-DHcEznQE.js";import{u as pi}from"./uniqBy-4pHrjjeb.js";import{b as mi}from"./sdk-DOSc1EPd.js";import{d as hi}from"./Delete-BF5FxXLc.js";import{A as gi}from"./actions-Bx59OiFa.js";import{S as yi}from"./shorten-label-DZ9hQKJE.js";var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});var Jn=Ir.default=void 0;vi(H);var nt=o;function vi(e){return e&&e.__esModule?e:{default:e}}function Qr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function en(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qr(Object(r),!0).forEach(function(n){bi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bi(e,t,r){return(t=xi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xi(e){var t=wi(e,"string");return typeof t=="symbol"?t:t+""}function wi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rr=function(t){return(0,nt.jsxs)("svg",en(en({},t),{},{children:[(0,nt.jsx)("g",{clipPath:"url(#clip0)",children:(0,nt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,nt.jsx)("defs",{children:(0,nt.jsx)("clipPath",{id:"clip0",children:(0,nt.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Rr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Rr.displayName="person";Jn=Ir.default=Rr;var St={},Ei=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Xn="%[a-f0-9]{2}",tn=new RegExp("("+Xn+")|([^%]+?)","gi"),rn=new RegExp("("+Xn+")+","gi");function hr(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],hr(r),hr(n))}function ji(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(tn)||[],r=1;r<t.length;r++)e=hr(t,r).join(""),t=e.match(tn)||[];return e}}function Si(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=rn.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ji(r[0]);n!==r[0]&&(t[r[0]]=n)}r=rn.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),l=0;l<a.length;l++){var p=a[l];e=e.replace(new RegExp(p,"g"),t[p])}return e}var Ai=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Si(e)}},Pi=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},Oi=function(e,t){for(var r={},n=Object.keys(e),a=Array.isArray(t),l=0;l<n.length;l++){var p=n[l],v=e[p];(a?t.indexOf(p)!==-1:t(p,v,e))&&(r[p]=v)}return r};(function(e){const t=Ei,r=Ai,n=Pi,a=Oi,l=c=>c==null;function p(c){switch(c.arrayFormat){case"index":return i=>(s,d)=>{const m=s.length;return d===void 0||c.skipNull&&d===null||c.skipEmptyString&&d===""?s:d===null?[...s,[E(i,c),"[",m,"]"].join("")]:[...s,[E(i,c),"[",E(m,c),"]=",E(d,c)].join("")]};case"bracket":return i=>(s,d)=>d===void 0||c.skipNull&&d===null||c.skipEmptyString&&d===""?s:d===null?[...s,[E(i,c),"[]"].join("")]:[...s,[E(i,c),"[]=",E(d,c)].join("")];case"comma":case"separator":return i=>(s,d)=>d==null||d.length===0?s:s.length===0?[[E(i,c),"=",E(d,c)].join("")]:[[s,E(d,c)].join(c.arrayFormatSeparator)];default:return i=>(s,d)=>d===void 0||c.skipNull&&d===null||c.skipEmptyString&&d===""?s:d===null?[...s,E(i,c)]:[...s,[E(i,c),"=",E(d,c)].join("")]}}function v(c){let i;switch(c.arrayFormat){case"index":return(s,d,m)=>{if(i=/\[(\d*)\]$/.exec(s),s=s.replace(/\[\d*\]$/,""),!i){m[s]=d;return}m[s]===void 0&&(m[s]={}),m[s][i[1]]=d};case"bracket":return(s,d,m)=>{if(i=/(\[\])$/.exec(s),s=s.replace(/\[\]$/,""),!i){m[s]=d;return}if(m[s]===void 0){m[s]=[d];return}m[s]=[].concat(m[s],d)};case"comma":case"separator":return(s,d,m)=>{const I=typeof d=="string"&&d.includes(c.arrayFormatSeparator),S=typeof d=="string"&&!I&&f(d,c).includes(c.arrayFormatSeparator);d=S?f(d,c):d;const D=I||S?d.split(c.arrayFormatSeparator).map(z=>f(z,c)):d===null?d:f(d,c);m[s]=D};default:return(s,d,m)=>{if(m[s]===void 0){m[s]=d;return}m[s]=[].concat(m[s],d)}}}function w(c){if(typeof c!="string"||c.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function E(c,i){return i.encode?i.strict?t(c):encodeURIComponent(c):c}function f(c,i){return i.decode?r(c):c}function O(c){return Array.isArray(c)?c.sort():typeof c=="object"?O(Object.keys(c)).sort((i,s)=>Number(i)-Number(s)).map(i=>c[i]):c}function y(c){const i=c.indexOf("#");return i!==-1&&(c=c.slice(0,i)),c}function A(c){let i="";const s=c.indexOf("#");return s!==-1&&(i=c.slice(s)),i}function P(c){c=y(c);const i=c.indexOf("?");return i===-1?"":c.slice(i+1)}function B(c,i){return i.parseNumbers&&!Number.isNaN(Number(c))&&typeof c=="string"&&c.trim()!==""?c=Number(c):i.parseBooleans&&c!==null&&(c.toLowerCase()==="true"||c.toLowerCase()==="false")&&(c=c.toLowerCase()==="true"),c}function j(c,i){i=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},i),w(i.arrayFormatSeparator);const s=v(i),d=Object.create(null);if(typeof c!="string"||(c=c.trim().replace(/^[?#&]/,""),!c))return d;for(const m of c.split("&")){if(m==="")continue;let[I,S]=n(i.decode?m.replace(/\+/g," "):m,"=");S=S===void 0?null:["comma","separator"].includes(i.arrayFormat)?S:f(S,i),s(f(I,i),S,d)}for(const m of Object.keys(d)){const I=d[m];if(typeof I=="object"&&I!==null)for(const S of Object.keys(I))I[S]=B(I[S],i);else d[m]=B(I,i)}return i.sort===!1?d:(i.sort===!0?Object.keys(d).sort():Object.keys(d).sort(i.sort)).reduce((m,I)=>{const S=d[I];return S&&typeof S=="object"&&!Array.isArray(S)?m[I]=O(S):m[I]=S,m},Object.create(null))}e.extract=P,e.parse=j,e.stringify=(c,i)=>{if(!c)return"";i=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},i),w(i.arrayFormatSeparator);const s=S=>i.skipNull&&l(c[S])||i.skipEmptyString&&c[S]==="",d=p(i),m={};for(const S of Object.keys(c))s(S)||(m[S]=c[S]);const I=Object.keys(m);return i.sort!==!1&&I.sort(i.sort),I.map(S=>{const D=c[S];return D===void 0?"":D===null?E(S,i):Array.isArray(D)?D.reduce(d(S),[]).join("&"):E(S,i)+"="+E(D,i)}).filter(S=>S.length>0).join("&")},e.parseUrl=(c,i)=>{i=Object.assign({decode:!0},i);const[s,d]=n(c,"#");return Object.assign({url:s.split("?")[0]||"",query:j(P(c),i)},i&&i.parseFragmentIdentifier&&d?{fragmentIdentifier:f(d,i)}:{})},e.stringifyUrl=(c,i)=>{i=Object.assign({encode:!0,strict:!0},i);const s=y(c.url).split("?")[0]||"",d=e.extract(c.url),m=e.parse(d,{sort:!1}),I=Object.assign(m,c.query);let S=e.stringify(I,i);S&&(S=`?${S}`);let D=A(c.url);return c.fragmentIdentifier&&(D=`#${E(c.fragmentIdentifier,i)}`),`${s}${S}${D}`},e.pick=(c,i,s)=>{s=Object.assign({parseFragmentIdentifier:!0},s);const{url:d,query:m,fragmentIdentifier:I}=e.parseUrl(c,s);return e.stringifyUrl({url:d,query:a(m,i),fragmentIdentifier:I},s)},e.exclude=(c,i,s)=>{const d=Array.isArray(i)?m=>!i.includes(m):(m,I)=>!i(m,I);return e.pick(c,d,s)}})(St);const ft=jo,Ii={parseNumbers:!1,parseBooleans:!1},Ri={skipNull:!1,skipEmptyString:!1},Ci=(e,t)=>{var r,n;const{navigateMode:a="push",parseOptions:l,stringifyOptions:p}={},v=Object.assign(Object.assign({},Ii),l),w=Object.assign(Object.assign({},Ri),p),E=ft.useLocation(),f=(r=ft.useHistory)===null||r===void 0?void 0:r.call(ft),O=(n=ft.useNavigate)===null||n===void 0?void 0:n.call(ft),y=Eo(),A=H.useRef(typeof e=="function"?e():e||{}),P=H.useMemo(()=>St.parse(E.search,v),[E.search]),B=H.useMemo(()=>Object.assign(Object.assign({},A.current),P),[P]);return[B,Je(c=>{const i=typeof c=="function"?c(B):c;y(),f&&f[a]({hash:E.hash,search:St.stringify(Object.assign(Object.assign({},P),i),w)||"?"},E.state),O&&O({hash:E.hash,search:St.stringify(Object.assign(Object.assign({},P),i),w)||"?"},{replace:a==="replace",state:E.state})})]},Ti=Ci;var Cr={},Di=xr;Object.defineProperty(Cr,"__esModule",{value:!0});var Qn=Cr.default=void 0,_i=Di(br()),Ni=o;Qn=Cr.default=(0,_i.default)((0,Ni.jsx)("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}),"Verified");class Bi extends Error{constructor(t){super(),this.name="AbortError",this.message=t}}const nn=e=>globalThis.DOMException===void 0?new Bi(e):new DOMException(e),on=e=>{const t=e.reason===void 0?nn("This operation was aborted."):e.reason;return t instanceof Error?t:nn(t)};async function Li(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:a}={}){return new Promise((l,p)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const v=[],w=[],E=new Map;let f=!1,O=!1,y=!1,A=0,P=0;const B=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),j=i=>{f=!0,O=!0,p(i)};a&&(a.aborted&&j(on(a)),a.addEventListener("abort",()=>{j(on(a))}));const c=async()=>{if(O)return;const i=await B.next(),s=P;if(P++,i.done){if(y=!0,A===0&&!O){if(!n&&w.length>0){j(new AggregateError(w));return}if(O=!0,E.size===0){l(v);return}const d=[];for(const[m,I]of v.entries())E.get(m)!==an&&d.push(I);l(d)}return}A++,(async()=>{try{const d=await i.value;if(O)return;const m=await t(d,s);m===an&&E.set(s,m),v[s]=m,A--,await c()}catch(d){if(n)j(d);else{w.push(d),A--;try{await c()}catch(m){j(m)}}}})()};(async()=>{for(let i=0;i<r;i++){try{await c()}catch(s){j(s);break}if(y||f)break}})()})}const an=Symbol("skip");async function ki(e,t){return Li(e,r=>r(),t)}function Ui({user:e,sessionUser:t}){const r=pt(()=>{var n;return(n=(e==null?void 0:e.passports)||[])==null?void 0:n.find(a=>a.name===t.role)},[e==null?void 0:e.passports,t==null?void 0:t.role]);return o.jsxs(J,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(wr,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did,sx:{flexShrink:0}}),o.jsxs(J,{sx:{flex:1,overflow:"hidden"},children:[o.jsxs(J,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx($e,{title:t.fullName,children:o.jsx(xe,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:t.fullName})}),o.jsx(So,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Jr.textBase,borderColor:Jr.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),o.jsx($e,{title:t.email,children:o.jsx(xe,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.email})})]})]})}const qi={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},eo="Reserved IP",sn="ip-region-cache";async function Fi(e){const t=`https://ipapi.co/${e}/json/`,n=await(await fetch(t)).json();let a="";return n.error?n.reserved&&(a=eo):a=[n.country_name,n.region,n.city].filter(Boolean).join("/"),a}async function Ki(e){const t=`https://api.ip.sb/geoip/${e}`,n=await(await fetch(t)).json();let a="";return n.error?n.reserved&&(a=eo):a=[n.country,n.region,n.city].filter(Boolean).join("/"),a}async function $i(e){let t="",r={};try{const n=localStorage.getItem(sn);n&&(r=JSON.parse(n))}catch{r={}}if(r[e])t=r[e];else{try{t=await Ki(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await Fi(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const n=Object.keys(r);n.length>100&&delete r[n[0]],r[e]&&delete r[e],r[e]=t,localStorage.setItem(sn,JSON.stringify(r))}return t}async function Mi(e){return Promise.all(e.map(t=>$i(t)))}const cn=e=>new Mt(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Mt.BROWSER.NAME,Mt.BROWSER.VERSION]]}).getResult();function zi({user:e,showAction:t=!0,showUser:r=!0}){const n=Ao(),{locale:a}=Be(),{confirmApi:l,confirmHolder:p}=Er(),v=Je((i,s={})=>Po(qi,i,a,"en",s)),w=Je(async()=>{let i=e==null?void 0:e.userSessions;i||(i=await $t.userSession.getUserSessions({did:e.did}));try{const d=i==null?void 0:i.map((S,D)=>[D,S.lastLoginIp]).filter(S=>!!S[1]),m=d==null?void 0:d.map(S=>S[1]),I=await Mi(m);for(let S=0;S<I.length;S++){const D=I[S],z=d[S],X=i[z[0]];X.ipRegion=D}}catch(d){console.warn("Failed to convert ip to region"),console.error(d)}const s=new Date().getTime();return Oo(i,d=>d.visitorId===n?-1:s-new Date(d.updatedAt).getTime())}),E=Io(w),f=pt(()=>E.data||[],[E.data]),O=pt(()=>f.reduce((i,s)=>(i[s.lastLoginIp]=s.ipRegion,i),{}),[f]),y=Je(({visitorId:i})=>{l.open({title:v("logoutThisSession"),content:v("logoutThisSessionConfirm"),confirmButtonText:v("confirm"),cancelButtonText:v("cancel"),onConfirm:async()=>{await $t.user.logout({visitorId:i}),E.refresh(),l.close()}})}),A=pt(()=>f.filter(s=>s.visitorId!==n),[f]),P=Je(()=>{l.open({title:v("logoutAllSession"),content:v("logoutAllSessionConfirm"),confirmButtonText:v("confirm"),cancelButtonText:v("cancel"),onConfirm:async()=>{const i=A.map(s=>()=>$t.user.logout({visitorId:s.visitorId}));await ki(i,{concurrency:3,stopOnError:!1}),E.refresh(),l.close()}})}),B=[];t&&B.push(o.jsx($e,{title:v("logoutAllTips"),children:o.jsx(sr,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:P,disabled:A.length===0,children:v("logoutAll")})},"logoutAll"));const j=pt(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),c=[{label:v("platform"),name:"platform",options:{customBodyRenderLite:i=>{var m,I;const s=f[i],d=cn(s.ua);return o.jsx(J,{children:[(m=d.os)==null?void 0:m.name,(I=d.os)==null?void 0:I.version].filter(Boolean).join("/")||v("unknown")})}}},{label:v("deviceType"),name:"deviceType",options:{customBodyRenderLite:i=>{var m,I;const s=f[i],d=cn(s.ua);return o.jsx(J,{children:[(m=d.browser)==null?void 0:m.name,(I=d.browser)==null?void 0:I.version].filter(Boolean).join("/")||v("unknown")})}}},{label:v("walletOS"),name:"walletOS",options:{customBodyRenderLite:i=>{var d;const s=f[i];return o.jsx(J,{children:((d=s.extra)==null?void 0:d.walletOS)||v("unknown")})}}},r&&{label:v("user"),name:"user",options:{customBodyRenderLite:i=>{const s=f[i];return o.jsx(J,{sx:{minWidth:150,maxWidth:250},children:o.jsx(Ui,{sessionUser:s.user,user:e})})}}},{label:v("createdAt"),name:"createdAt",options:{customBodyRenderLite:i=>{const s=f[i];return s.createdAt?o.jsx(At,{value:s.createdAt,relativeRange:3*86400*1e3,locale:a}):v("unknown")}}},{label:v("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:i=>{const s=f[i];return s.status==="expired"?v("expired"):o.jsx(At,{value:s.updatedAt,relativeRange:3*86400*1e3,locale:a})}}},{label:v("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:i=>{const s=f[i];return o.jsx(J,{children:O[s.lastLoginIp]?o.jsxs(o.Fragment,{children:[o.jsx(xe,{variant:"body2",children:O[s.lastLoginIp]}),o.jsx(xe,{variant:"body2",color:"grey",children:s.lastLoginIp||v("unknown")})]}):o.jsx(xe,{children:s.lastLoginIp||v("unknown")})})}}},t&&{label:v("actions"),name:"actions",options:{customBodyRenderLite:i=>{const s=f[i];return o.jsx(J,{children:o.jsx(sr,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:n===s.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>y({visitorId:s.visitorId}),children:s.status==="expired"?v("remove"):n===s.visitorId?v("currentSession"):v("logout")})})}}}].filter(Boolean);return o.jsxs(J,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[p,o.jsx(Or,{locale:a,data:f,columns:c,customButtons:B,options:j,loading:E.loading})]})}var he={};Object.defineProperty(he,"__esModule",{value:!0});he.isValid=he.fromJSON=he.fromRandom=he.fromAddress=he.fromPublicKey=he.fromSecretKey=he.Wallet=he.WalletType=void 0;const vt=qn,Ct=Bt,Ie=Un;he.WalletType=Ie.DidType;function st(e,t="default"){const r=(0,Ie.DidType)(t),n=(0,Ct.getSigner)(r.pk),a=(0,Ct.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Ie.fromPublicKey)(e.pk,r):e.address,hash(l,p=1,v="hex"){return a(l,p,v)},sign(l,p=!0,v="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(p){const w=a(l,1);return n.sign(w,e.sk,v)}return n.sign(l,e.sk,v)},verify(l,p,v=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const w=v?a(l,1):l;return n.verify(w,p,e.pk)},ethHash(l){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(l)},ethSign(l,p=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return p?n.ethSign(n.ethHash(l),(0,vt.toHex)(e.sk)):n.ethSign(l,(0,vt.toHex)(e.sk))},ethVerify(l,p,v=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const w=v?n.ethHash(l):l;return n.ethRecover(w,p)===this.address},toAddress(){return e.pk?(0,Ie.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Ie.DidType.toJSON(r),sk:(0,vt.toHex)(e.sk),pk:(0,vt.toHex)(e.pk),address:this.address}}}}he.Wallet=st;function Wi(e,t="default"){const r=(0,Ie.DidType)(t),n={sk:e,pk:(0,Ct.getSigner)(r.pk).getPublicKey(e)};return st(n,r)}he.fromSecretKey=Wi;function Vi(e,t="default"){return st({pk:e},(0,Ie.DidType)(t))}he.fromPublicKey=Vi;function Hi(e){return st({address:(0,Ie.toAddress)(e)},(0,Ie.toTypeInfo)(e))}he.fromAddress=Hi;function Gi(e="default"){const t=(0,Ie.DidType)(e),n=(0,Ct.getSigner)(t.pk).genKeyPair();return st({sk:n.secretKey,pk:n.publicKey},t)}he.fromRandom=Gi;function Yi(e){const t=Ie.DidType.fromJSON(e.type);return st(e,t)}he.fromJSON=Yi;function Zi(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}he.isValid=Zi;var zt={exports:{}},Wt={},ln;function to(){if(ln)return Wt;ln=1;function e(i){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(i)}function t(i,s,d){return Object.defineProperty(i,"prototype",{writable:!1}),i}function r(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")}function n(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),s&&a(i,s)}function a(i,s){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,I){return m.__proto__=I,m},a(i,s)}function l(i){var s=w();return function(){var m=E(i),I;if(s){var S=E(this).constructor;I=Reflect.construct(m,arguments,S)}else I=m.apply(this,arguments);return p(this,I)}}function p(i,s){if(s&&(e(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(i)}function v(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E(i){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},E(i)}var f={},O,y;function A(i,s,d){d||(d=Error);function m(S,D,z){return typeof s=="string"?s:s(S,D,z)}var I=function(S){n(z,S);var D=l(z);function z(X,Q,G){var ee;return r(this,z),ee=D.call(this,m(X,Q,G)),ee.code=i,ee}return t(z)}(d);f[i]=I}function P(i,s){if(Array.isArray(i)){var d=i.length;return i=i.map(function(m){return String(m)}),d>2?"one of ".concat(s," ").concat(i.slice(0,d-1).join(", "),", or ")+i[d-1]:d===2?"one of ".concat(s," ").concat(i[0]," or ").concat(i[1]):"of ".concat(s," ").concat(i[0])}else return"of ".concat(s," ").concat(String(i))}function B(i,s,d){return i.substr(0,s.length)===s}function j(i,s,d){return(d===void 0||d>i.length)&&(d=i.length),i.substring(d-s.length,d)===s}function c(i,s,d){return typeof d!="number"&&(d=0),d+s.length>i.length?!1:i.indexOf(s,d)!==-1}return A("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),A("ERR_INVALID_ARG_TYPE",function(i,s,d){O===void 0&&(O=gr()),O(typeof i=="string","'name' must be a string");var m;typeof s=="string"&&B(s,"not ")?(m="must not be",s=s.replace(/^not /,"")):m="must be";var I;if(j(i," argument"))I="The ".concat(i," ").concat(m," ").concat(P(s,"type"));else{var S=c(i,".")?"property":"argument";I='The "'.concat(i,'" ').concat(S," ").concat(m," ").concat(P(s,"type"))}return I+=". Received type ".concat(e(d)),I},TypeError),A("ERR_INVALID_ARG_VALUE",function(i,s){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";y===void 0&&(y=ht);var m=y.inspect(s);return m.length>128&&(m="".concat(m.slice(0,128),"...")),"The argument '".concat(i,"' ").concat(d,". Received ").concat(m)},TypeError),A("ERR_INVALID_RETURN_VALUE",function(i,s,d){var m;return d&&d.constructor&&d.constructor.name?m="instance of ".concat(d.constructor.name):m="type ".concat(e(d)),"Expected ".concat(i,' to be returned from the "').concat(s,'"')+" function but got ".concat(m,".")},TypeError),A("ERR_MISSING_ARGS",function(){for(var i=arguments.length,s=new Array(i),d=0;d<i;d++)s[d]=arguments[d];O===void 0&&(O=gr()),O(s.length>0,"At least one arg needs to be specified");var m="The ",I=s.length;switch(s=s.map(function(S){return'"'.concat(S,'"')}),I){case 1:m+="".concat(s[0]," argument");break;case 2:m+="".concat(s[0]," and ").concat(s[1]," arguments");break;default:m+=s.slice(0,I-1).join(", "),m+=", and ".concat(s[I-1]," arguments");break}return"".concat(m," must be specified")},TypeError),Wt.codes=f,Wt}var Vt,un;function Ji(){if(un)return Vt;un=1;function e(R,C){var K=Object.keys(R);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(R);C&&(_=_.filter(function(V){return Object.getOwnPropertyDescriptor(R,V).enumerable})),K.push.apply(K,_)}return K}function t(R){for(var C=1;C<arguments.length;C++){var K=arguments[C]!=null?arguments[C]:{};C%2?e(Object(K),!0).forEach(function(_){r(R,_,K[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(_){Object.defineProperty(R,_,Object.getOwnPropertyDescriptor(K,_))})}return R}function r(R,C,K){return C=p(C),C in R?Object.defineProperty(R,C,{value:K,enumerable:!0,configurable:!0,writable:!0}):R[C]=K,R}function n(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function a(R,C){for(var K=0;K<C.length;K++){var _=C[K];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(R,p(_.key),_)}}function l(R,C,K){return C&&a(R.prototype,C),Object.defineProperty(R,"prototype",{writable:!1}),R}function p(R){var C=v(R,"string");return i(C)==="symbol"?C:String(C)}function v(R,C){if(i(R)!=="object"||R===null)return R;var K=R[Symbol.toPrimitive];if(K!==void 0){var _=K.call(R,C||"default");if(i(_)!=="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(R)}function w(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),C&&j(R,C)}function E(R){var C=P();return function(){var _=c(R),V;if(C){var b=c(this).constructor;V=Reflect.construct(_,arguments,b)}else V=_.apply(this,arguments);return f(this,V)}}function f(R,C){if(C&&(i(C)==="object"||typeof C=="function"))return C;if(C!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(R)}function O(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function y(R){var C=typeof Map=="function"?new Map:void 0;return y=function(_){if(_===null||!B(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof C<"u"){if(C.has(_))return C.get(_);C.set(_,V)}function V(){return A(_,arguments,c(this).constructor)}return V.prototype=Object.create(_.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),j(V,_)},y(R)}function A(R,C,K){return P()?A=Reflect.construct.bind():A=function(V,b,h){var x=[null];x.push.apply(x,b);var L=Function.bind.apply(V,x),N=new L;return h&&j(N,h.prototype),N},A.apply(null,arguments)}function P(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(R){return Function.toString.call(R).indexOf("[native code]")!==-1}function j(R,C){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,V){return _.__proto__=V,_},j(R,C)}function c(R){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},c(R)}function i(R){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},i(R)}var s=ht,d=s.inspect,m=to(),I=m.codes.ERR_INVALID_ARG_TYPE;function S(R,C,K){return(K===void 0||K>R.length)&&(K=R.length),R.substring(K-C.length,K)===C}function D(R,C){if(C=Math.floor(C),R.length==0||C==0)return"";var K=R.length*C;for(C=Math.floor(Math.log(C)/Math.log(2));C;)R+=R,C--;return R+=R.substring(0,K-R.length),R}var z="",X="",Q="",G="",ee={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},we=10;function Y(R){var C=Object.keys(R),K=Object.create(Object.getPrototypeOf(R));return C.forEach(function(_){K[_]=R[_]}),Object.defineProperty(K,"message",{value:R.message}),K}function de(R){return d(R,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function Ee(R,C,K){var _="",V="",b=0,h="",x=!1,L=de(R),N=L.split(`
|
|
2
2
|
`),U=de(C).split(`
|
|
3
3
|
`),$=0,oe="";if(K==="strictEqual"&&i(R)==="object"&&i(C)==="object"&&R!==null&&C!==null&&(K="strictEqualObject"),N.length===1&&U.length===1&&N[0]!==U[0]){var ue=N[0].length+U[0].length;if(ue<=we){if((i(R)!=="object"||R===null)&&(i(C)!=="object"||C===null)&&(R!==0||C!==0))return"".concat(ee[K],`
|
|
4
4
|
|