@abtnode/webapp 1.16.31 → 1.16.32-beta-0b7f1250
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-YuGHCX93.js → Add-DWpKcN-u.js} +1 -1
- package/dist/assets/{ArrowDropDown-Dq_r4Xqb.js → ArrowDropDown-DpRC8bmp.js} +1 -1
- package/dist/assets/{Autocomplete-BVeL1Yo7.js → Autocomplete-BRXMVx1_.js} +1 -1
- package/dist/assets/{Breadcrumbs-CMvJXPnU.js → Breadcrumbs-Jf_U-bpr.js} +1 -1
- package/dist/assets/{ButtonGroup-Dk1mLt3h.js → ButtonGroup-CjdeZXiQ.js} +1 -1
- package/dist/assets/{CheckCircle-Cn-sNTZK.js → CheckCircle-DAJDvaDs.js} +1 -1
- package/dist/assets/{ChevronLeft-CGibP5P0.js → ChevronLeft-BAD_V2NB.js} +1 -1
- package/dist/assets/{ChevronRight-DakQosJn.js → ChevronRight-C3N0vcYC.js} +1 -1
- package/dist/assets/{Close-DpmK9wKZ.js → Close-ONBFJtxs.js} +1 -1
- package/dist/assets/{Delete-ukzbwUp3.js → Delete-DyfYh5Dp.js} +1 -1
- package/dist/assets/{DeleteOutline-DWR_h5F3.js → DeleteOutline-BeNbF0Jm.js} +1 -1
- package/dist/assets/{Done-CvSFHISO.js → Done-BwUiAzln.js} +1 -1
- package/dist/assets/{Edit-qncNJ4F1.js → Edit-DNbPZJcj.js} +1 -1
- package/dist/assets/{EditIcon-BU_hSrvO.js → EditIcon-CQMDFxRX.js} +1 -1
- package/dist/assets/{ExpandMore-BzXUe6hQ.js → ExpandMore-OENv0Zf3.js} +1 -1
- package/dist/assets/{FilterList-B3q8z3Ai.js → FilterList-DOSX0qYn.js} +1 -1
- package/dist/assets/{Google-BFCcXFWg.js → Google-Clt2u7fs.js} +1 -1
- package/dist/assets/{Https-c9HUx4_F.js → Https-C1_btbm6.js} +1 -1
- package/dist/assets/{InputAdornment-CmItI7-a.js → InputAdornment--p8LCNNy.js} +1 -1
- package/dist/assets/{InputLabel-DiJjRX8c.js → InputLabel-CZjkqwQE.js} +1 -1
- package/dist/assets/{LastPage-BVKCAcZd.js → LastPage-BgqTQGsQ.js} +1 -1
- package/dist/assets/{Launch-ixFhPrIJ.js → Launch-4M4xlVcJ.js} +1 -1
- package/dist/assets/{Link-D21zoGLh.js → Link-B9IP_-Eb.js} +1 -1
- package/dist/assets/{LoadingButton-C-VdleqP.js → LoadingButton-D4Eem9Ye.js} +1 -1
- package/dist/assets/{LockIcon-DWwaclI2.js → LockIcon-DNmOq-UN.js} +1 -1
- package/dist/assets/{Loop-cNToB-Hw.js → Loop-BA9fveaw.js} +1 -1
- package/dist/assets/{MoreHoriz-BlJZBfL5.js → MoreHoriz-C2jn3juG.js} +1 -1
- package/dist/assets/{MoreVert-72FLA6F7.js → MoreVert-s_b5pzH1.js} +1 -1
- package/dist/assets/{Pagination-BE1Nzv5c.js → Pagination-C4LxOrMX.js} +1 -1
- package/dist/assets/{Public-DwfXfE3x.js → Public-E1EGIO8u.js} +1 -1
- package/dist/assets/{SchemaReference.es-DSZJxlJs.js → SchemaReference.es-BLA9DpAj.js} +1 -1
- package/dist/assets/{Search-DPoHYjEM.js → Search-DvHspZGZ.js} +1 -1
- package/dist/assets/{Select-CZslLkS9.js → Select-DPQiNjEZ.js} +1 -1
- package/dist/assets/{Skeleton-BRE8g3Nr.js → Skeleton-DhAVWnjB.js} +1 -1
- package/dist/assets/{Slider-BXYbXQK6.js → Slider-IM6xBGec.js} +1 -1
- package/dist/assets/{Stepper-C2cskkxs.js → Stepper-pjsUNGe-.js} +1 -1
- package/dist/assets/{TextField-FjVpB8_i.js → TextField-CK1WkVgK.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BLKzb8eH.js → ToggleButtonGroup-CxfQ5hQa.js} +1 -1
- package/dist/assets/{ViewList-BWR6vvRA.js → ViewList-CXsz8fEa.js} +1 -1
- package/dist/assets/{actions-DMatOIO9.js → actions-DZdlSYXZ.js} +1 -1
- package/dist/assets/{actions-DI7j7zyh.js → actions-nCvhQAHx.js} +1 -1
- package/dist/assets/{agreement-CLCrNvvc.js → agreement-DOGPCXwZ.js} +1 -1
- package/dist/assets/api-BiytJ2OL.js +1 -0
- package/dist/assets/{app-avatar-Dp7pMuua.js → app-avatar-BuBN13SD.js} +1 -1
- package/dist/assets/{audit-logs-BmIfy96g.js → audit-logs-CpNkISiG.js} +1 -1
- package/dist/assets/blocklet-CP5f1QgL.js +1 -0
- package/dist/assets/{brace-fold.es-CjpHnqaJ.js → brace-fold.es-CnVLaaYa.js} +1 -1
- package/dist/assets/{bundle-avatar-BOdLBYt_.js → bundle-avatar-I8HkXJpE.js} +1 -1
- package/dist/assets/{chart-ChpsdZ5w.js → chart-DYC16wN7.js} +1 -1
- package/dist/assets/{click-to-copy-qnXvH47O.js → click-to-copy-D1k0ZJxd.js} +1 -1
- package/dist/assets/{closebrackets.es-BAkyQEkz.js → closebrackets.es-CXrbbB3A.js} +1 -1
- package/dist/assets/{codemirror.es-DyYoQOkc.js → codemirror.es-BoWLOKcl.js} +1 -1
- package/dist/assets/{comment.es-B0snLVGE.js → comment.es-Di0JRU_Q.js} +1 -1
- package/dist/assets/{config-navigation-qB3p7zP-.js → config-navigation-BXaw3SS0.js} +1 -1
- package/dist/assets/{delete-confirm-BG1I5J0u.js → delete-confirm-H8kgJ4fp.js} +1 -1
- package/dist/assets/{detail-DHBrhfaQ.js → detail-BGzCRUYj.js} +3 -3
- package/dist/assets/{dialog.es-C9szbcAW.js → dialog.es-BCtBfsF1.js} +1 -1
- package/dist/assets/{download-CIK2Rd3G.js → download-DMPUUrms.js} +1 -1
- package/dist/assets/{foldgutter.es-B7n9tC8r.js → foldgutter.es-E4CQ752m.js} +1 -1
- package/dist/assets/getValidReactChildren-Ckfy1X1A.js +1 -0
- package/dist/assets/{hint.es-CBGKcJ0H.js → hint.es-C04g9UeS.js} +1 -1
- package/dist/assets/{hint.es2-9eR9yDN0.js → hint.es2-Yrv2ylTe.js} +1 -1
- package/dist/assets/{iframe-DeTHfFVQ.js → iframe-BqheM3L9.js} +1 -1
- package/dist/assets/{index-qm1NSTqx.js → index-59UIPqJD.js} +1 -1
- package/dist/assets/{index-ClNOtPm5.js → index-B-Ld-2Ly.js} +3 -3
- package/dist/assets/{index-15yTTSQp.js → index-B1Hn6vLR.js} +1 -1
- package/dist/assets/{index-CLbWUy8O.js → index-BIbeG_A4.js} +1 -1
- package/dist/assets/{index-oVy0lmae.js → index-BWXhDqh4.js} +1 -1
- package/dist/assets/{index-CANtQh-8.js → index-BXLcUio2.js} +1 -1
- package/dist/assets/{index-D8rh69R2.js → index-Bgn8IBLJ.js} +1 -1
- package/dist/assets/{index-KENXSHGT.js → index-BiC43zns.js} +1 -1
- package/dist/assets/{index-B4nATnEq.js → index-Bo3kA0GY.js} +1 -1
- package/dist/assets/{index-D3y-Mq0t.js → index-BqgCbQUh.js} +1 -1
- package/dist/assets/{index-BZQ6Sdlq.js → index-BwSVsn4U.js} +1 -1
- package/dist/assets/{index-y0r_CDsH.js → index-C2t5LWRf.js} +1 -1
- package/dist/assets/{index-vxqr_A7H.js → index-C7FHl3UZ.js} +1 -1
- package/dist/assets/{index-BuNJbfxi.js → index-CHZY388_.js} +1 -1
- package/dist/assets/{index-CG4MmDuK.js → index-CRPL3-Eg.js} +1 -1
- package/dist/assets/{index-DmdQsIN9.js → index-CSJhz71g.js} +1 -1
- package/dist/assets/{index-Dpawm4Ki.js → index-CX-CBC_8.js} +3 -3
- package/dist/assets/{index-7aCT4zwx.js → index-CbA7sl2z.js} +1 -1
- package/dist/assets/{index-DP0iPBNh.js → index-CfpEgOA0.js} +1 -1
- package/dist/assets/{index-CoOBWTGS.js → index-ChMuqQhO.js} +1 -1
- package/dist/assets/{index-DnBiGZ_C.js → index-ChS_Pc5m.js} +1 -1
- package/dist/assets/{index-04gl6pO4.js → index-ChmGkB6N.js} +1 -1
- package/dist/assets/{index-TFGhlmJg.js → index-CqJYYaWO.js} +1 -1
- package/dist/assets/{index-DJs7uyCT.js → index-CtwmcOKA.js} +1 -1
- package/dist/assets/{index-BjH9WeIg.js → index-CvxaH3or.js} +5 -5
- package/dist/assets/{index-DNivFScD.js → index-CzOBa7wa.js} +1 -1
- package/dist/assets/{index-WbFA75dB.js → index-D5BI_0Y3.js} +1 -1
- package/dist/assets/{index-3regrC4H.js → index-D8cKX9nz.js} +1 -1
- package/dist/assets/{index-l9RwTjEt.js → index-DBCkW9MN.js} +1 -1
- package/dist/assets/{index-Ct2fXBsa.js → index-DPaVhekN.js} +1 -1
- package/dist/assets/{index-CD-UcGPr.js → index-DQDFultN.js} +1 -1
- package/dist/assets/{index-C7m9dmdb.js → index-DSMtyaan.js} +1 -1
- package/dist/assets/{index-BwAMNnCK.js → index-DSe7TL0J.js} +3 -3
- package/dist/assets/{index-BtcEDL3C.js → index-DWMoLGgj.js} +1 -1
- package/dist/assets/{index-BIUglsRs.js → index-DfHODGgp.js} +1 -1
- package/dist/assets/{index-TMoSb8Hc.js → index-DrA6t9XN.js} +1 -1
- package/dist/assets/{index-6UQZCJ9z.js → index-Dytzeids.js} +1 -1
- package/dist/assets/{index-CupkOe8N.js → index-GxcCCStf.js} +1 -1
- package/dist/assets/{index-MRb9RAJK.js → index-Ir1Ynx3j.js} +1 -1
- package/dist/assets/{index-DDRhCg0G.js → index-bVh0eo8P.js} +1 -1
- package/dist/assets/{index-CJeF5ewa.js → index-cR-wh0v1.js} +1 -1
- package/dist/assets/{index-9o5SBOBg.js → index-pn9KZg_s.js} +1 -1
- package/dist/assets/{index-CUnYmZv8.js → index-wGYPkAW3.js} +1 -1
- package/dist/assets/{index.es-iY0s9qTe.js → index.es-DpBhdLHz.js} +1 -1
- package/dist/assets/{index.esm-Lol3I37E.js → index.esm-Cm5bDJvK.js} +1 -1
- package/dist/assets/{info-addon.es-U5Ih2Oar.js → info-addon.es-Bm6N_jGk.js} +1 -1
- package/dist/assets/{info.es-B24BQRjf.js → info.es-C1vDTqje.js} +1 -1
- package/dist/assets/{install-from-url-DrOGJntu.js → install-from-url-C5ZZLYX3.js} +1 -1
- package/dist/assets/{invitation-B4r3Uuqv.js → invitation-BuDjbT3x.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-BsUunwOH.js → is-path-prefix-equal-MT4O3ono.js} +1 -1
- package/dist/assets/{isEqual-DvDsjofF.js → isEqual-C8jFbxEO.js} +1 -1
- package/dist/assets/{item-BQ-lq0dH.js → item-DmRpat8A.js} +1 -1
- package/dist/assets/{javascript.es-DmenNz71.js → javascript.es-CWA0V3mM.js} +1 -1
- package/dist/assets/{jump-to-line.es-BT9o4hFe.js → jump-to-line.es-BITLwcgJ.js} +1 -1
- package/dist/assets/{jump.es-BJH_IFbo.js → jump.es-fVm9xBWY.js} +1 -1
- package/dist/assets/{line-C7Ytimyk.js → line-vQYPOsJl.js} +3 -3
- package/dist/assets/{lint.es-BsdVLYYK.js → lint.es-BN9f3Hg9.js} +1 -1
- package/dist/assets/{lint.es2-CT9E8RI5.js → lint.es2-Dt2lwIVK.js} +1 -1
- package/dist/assets/{lint.es3-CjbW7OcU.js → lint.es3-sBho7ETd.js} +1 -1
- package/dist/assets/{list-header-C1ycqwNT.js → list-header-DkOo80YP.js} +1 -1
- package/dist/assets/{log-CrPoPCZq.js → log-CgFbIbvp.js} +1 -1
- package/dist/assets/{lottie-E7kaZ5f2.js → lottie-xnBjXQ5H.js} +1 -1
- package/dist/assets/{matchbrackets.es-Bdv2zR-T.js → matchbrackets.es-Ci37WRje.js} +1 -1
- package/dist/assets/{memory-Br7PUWs3.js → memory-rY7rc2Pr.js} +1 -1
- package/dist/assets/{mode.es-C0DC5igF.js → mode.es-CIMZsD3l.js} +1 -1
- package/dist/assets/{mode.es2-BvMpbvGY.js → mode.es2-Buy6Zs7Q.js} +1 -1
- package/dist/assets/{mode.es3-BzN1VyV9.js → mode.es3-CbjER9bZ.js} +1 -1
- package/dist/assets/{onlineParser.es-DhWzlYWG.js → onlineParser.es-DClTB48M.js} +1 -1
- package/dist/assets/{overview-RRUNlHLn.js → overview-GTzk3Rt6.js} +1 -1
- package/dist/assets/{react-Cw_CkYN1.js → react-BX4vljA0.js} +3 -3
- package/dist/assets/{redux-B9BtMJgi.js → redux-CiOMdG2L.js} +1 -1
- package/dist/assets/{resource-dialog-0uswwg4x.js → resource-dialog-aFD_HBXU.js} +1 -1
- package/dist/assets/{runtime-C6dWdPqY.js → runtime-B3RZCh1x.js} +1 -1
- package/dist/assets/{schema-rBztjvAB.js → schema-BzCltIyc.js} +1 -1
- package/dist/assets/sdk-DmktCVPV.js +1 -0
- package/dist/assets/{search.es-lkmhiqmF.js → search.es-kY0vSJsp.js} +1 -1
- package/dist/assets/{searchcursor.es-CyKx0v-U.js → searchcursor.es-DdxQrbfv.js} +1 -1
- package/dist/assets/service-YfGgRaf0.js +1 -0
- package/dist/assets/{shorten-label-MAGXebJW.js → shorten-label-C-ljprxl.js} +1 -1
- package/dist/assets/{show-hint.es-DiObn3_W.js → show-hint.es-DiJd2cnC.js} +1 -1
- package/dist/assets/{slicedToArray-Cd-fJo2i.js → slicedToArray-BRqOgi_5.js} +1 -1
- package/dist/assets/{spaces-q5OlP__P.js → spaces-DcSM3WjO.js} +1 -1
- package/dist/assets/{status-93gUV3__.js → status-DPLxEBYu.js} +1 -1
- package/dist/assets/{sublime.es-CaUPtnXc.js → sublime.es-2rWUK1DK.js} +1 -1
- package/dist/assets/{switch-control-Dd1suGf_.js → switch-control-C2T6recO.js} +1 -1
- package/dist/assets/{table-icons-BuE8hjls.js → table-icons-Cw9lvDU6.js} +1 -1
- package/dist/assets/{team-B75Qqpfx.js → team-CoOZjBzx.js} +1 -1
- package/dist/assets/{toUpper-BPjfk0vW.js → toUpper-MM-LMl4h.js} +1 -1
- package/dist/assets/{traffic-Dm5MXy9S.js → traffic-CSlS8nHX.js} +1 -1
- package/dist/assets/{url-evaluation-BfNZVzn8.js → url-evaluation-C5psqheg.js} +1 -1
- package/dist/assets/{url-join-uVmSvxHB.js → url-join-CN9FagN9.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces--c0ZcRNe.js → use-blocklet-info-for-connect-did-spaces-DtrHJjly.js} +1 -1
- package/dist/assets/{useLocalStorage-C-9FT6wS.js → useLocalStorage-DoHM0_RD.js} +1 -1
- package/dist/assets/{useThemeProps-D2picXH9.js → useThemeProps-DCfy4AlW.js} +1 -1
- package/dist/assets/{util-B3g0jIJB.js → util-KSqE9V0r.js} +1 -1
- package/dist/assets/{wait-container-CS2sL203.js → wait-container-e8XKZH24.js} +1 -1
- package/dist/assets/{withStyles-D9ls3p7Y.js → withStyles-2CEBfzYU.js} +1 -1
- package/dist/assets/{wrap-locale-CJcLTW-n.js → wrap-locale-VUVZgNw_.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/api-BxXFuqVr.js +0 -1
- package/dist/assets/blocklet-xgPL6JoP.js +0 -1
- package/dist/assets/getValidReactChildren-anMSyFv4.js +0 -1
- package/dist/assets/sdk-B77IQB17.js +0 -1
- package/dist/assets/service-DumyHxMs.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
var Xm=Object.defineProperty;var Ym=(i,e,t)=>e in i?Xm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var He=(i,e,t)=>Ym(i,typeof e!="symbol"?e+"":e,t);import{bJ as Qm,j as it,hM as Jm,dm as Zm,fb as ef,g as xt,hN as tf,hO as Kp,hP as Xp,hQ as Yp,cL as Qp,eU as co,dw as ri,hR as ar,P as U,r as ce,cN as vc,c1 as bc,av as af,fH as nf,bn as Jp,aO as sf,J as of,hS as yc,dH as rf,Q as Zp,a2 as lf,he as xc,hT as cf,fg as uf,dk as pf}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DSe7TL0J.js","./index-CX-CBC_8.js","./index-BEj64JY8.css","./TextField-CK1WkVgK.js","./Select-DPQiNjEZ.js","./InputLabel-CZjkqwQE.js","./status-DPLxEBYu.js","./Delete-DyfYh5Dp.js","./url-evaluation-C5psqheg.js","./Slider-IM6xBGec.js","./Skeleton-DhAVWnjB.js","./Close-ONBFJtxs.js","./index-DPaVhekN.js","./preact.module-DJUF--8d.js","./index-C2t5LWRf.js","./index-ChS_Pc5m.js","./memoize-one.esm-BdPwpGay.js","./index-CfpEgOA0.js","./ExpandMore-OENv0Zf3.js","./resource-dialog-aFD_HBXU.js","./index-ChmGkB6N.js","./index-bVh0eo8P.js","./index-ChMuqQhO.js","./index-CqJYYaWO.js","./index-C7FHl3UZ.js","./FilterList-DOSX0qYn.js","./useThemeProps-DCfy4AlW.js","./LastPage-BgqTQGsQ.js","./index-CtwmcOKA.js","./redux-CiOMdG2L.js","./Search-DvHspZGZ.js","./MoreVert-s_b5pzH1.js","./index-DBCkW9MN.js","./url-join-CN9FagN9.js","./toUpper-MM-LMl4h.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Xm=Object.defineProperty;var Ym=(i,e,t)=>e in i?Xm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var He=(i,e,t)=>Ym(i,typeof e!="symbol"?e+"":e,t);import{bJ as Qm,j as it,hM as Jm,dm as Zm,fb as ef,g as xt,hN as tf,hO as Kp,hP as Xp,hQ as Yp,cL as Qp,eU as co,dw as ri,hR as ar,P as U,r as ce,cN as vc,c1 as bc,av as af,fH as nf,bn as Jp,aO as sf,J as of,hS as yc,dH as rf,Q as Zp,a2 as lf,he as xc,hT as cf,fg as uf,dk as pf}from"./index-CX-CBC_8.js";import{u as df}from"./index-DPaVhekN.js";import{B as wc,_ as d,b as Kt,l as hf,k as oi,H as Yt,m as mf,E as ed}from"./preact.module-DJUF--8d.js";import{a as ff}from"./index-C2t5LWRf.js";import{c as Pe}from"./index-ChS_Pc5m.js";import{m as _c}from"./memoize-one.esm-BdPwpGay.js";import"./index-CfpEgOA0.js";import{W as gf}from"./resource-dialog-aFD_HBXU.js";import"./index-ChmGkB6N.js";import"./index-bVh0eo8P.js";import"./index-ChMuqQhO.js";import"./index-CqJYYaWO.js";import"./index-C7FHl3UZ.js";import{p as vf}from"./index-DBCkW9MN.js";import{j as Es}from"./url-join-CN9FagN9.js";import{u as td,t as bf}from"./toUpper-MM-LMl4h.js";const yf=Qm(it.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");function xf(i,e,t,a){for(var n=-1,s=i==null?0:i.length;++n<s;){var o=i[n];e(a,o,t(o),i)}return a}var wf=xf,_f=Jm;function Pf(i,e,t,a){return _f(i,function(n,s,o){e(a,n,t(n),o)}),a}var Sf=Pf,Ff=wf,Cf=Sf,Ef=Zm,Tf=ef;function kf(i,e){return function(t,a){var n=Tf(t)?Ff:Cf,s=e?e():{};return n(t,i,Ef(a),s)}}var Af=kf,Df=tf,Of=Af,If=Of(function(i,e,t){Df(i,t,e)}),Rf=If;const id=xt(Rf);function jn(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Uf=0;function ad(i){return"__private_"+Uf+++"_"+i}function Nf(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}));He(this,"convertImgToObject",ar(()=>{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(c=>c.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=c_(s.originalname),[".mp4",".webm"].find(c=>{var p;return(p=a.src)==null?void 0:p.endsWith(c)})){const c=document.createElement("video");c.src=a.src,c.width=a.width,c.height=a.height,c.autoplay=!0,c.setAttribute("playsinline","playsinline"),c.muted=!0,c.loop=!0,c.style="pointer-events: none;",o.appendChild(c)}else{const c=document.createElement("object");c.data=n,c.type=s.mimetype||"image/png",c.alt=s.originalname,c.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",c.loading="lazy",o.appendChild(c)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));He(this,"resetState",()=>{this.uploadedAPIData={...Dp},this.uploaded.setPluginState({...Op}),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={...Dp},this.addUploadItemFlag=!0,this.icon=()=>_e("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[_e("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"}),_e("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"}),_e("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),_e("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(),_e("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new ql(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...Op}),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 Ip={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,folderId:"",componentDid:"",components:[]},Rp={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},Rm={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"},a3={...Rm,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class n3 extends Te{constructor(t,a){super(t,a);He(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await la.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=td([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=Ls(s);return n=Ls(s,400),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});He(this,"resetState",()=>{this.apiData={...Ip},this.resources.setPluginState({...Rp})});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={...Ip},this.icon=()=>_e("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:[_e("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"}),_e("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"}),_e("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(),_e("div",{id:"resources",className:"uploaded",children:[_e("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>_e("button",{style:this.apiData.componentDid===a.did?a3:Rm,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:bf(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new ql(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...Rp}),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("uploaded: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 s3=nf();const o3=xt(s3);/*! @license DOMPurify 3.1.6 | (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.6/LICENSE */const{entries:Um,setPrototypeOf:Up,isFrozen:r3,getPrototypeOf:l3,getOwnPropertyDescriptor:c3}=Object;let{freeze:je,seal:lt,create:Nm}=Object,{apply:Jr,construct:Zr}=typeof Reflect<"u"&&Reflect;je||(je=function(e){return e});lt||(lt=function(e){return e});Jr||(Jr=function(e,t,a){return e.apply(t,a)});Zr||(Zr=function(e,t){return new e(...t)});const ns=st(Array.prototype.forEach),Np=st(Array.prototype.pop),La=st(Array.prototype.push),Cs=st(String.prototype.toLowerCase),Jo=st(String.prototype.toString),Mp=st(String.prototype.match),Ba=st(String.prototype.replace),u3=st(String.prototype.indexOf),p3=st(String.prototype.trim),ft=st(Object.prototype.hasOwnProperty),Le=st(RegExp.prototype.test),za=d3(TypeError);function st(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 Jr(i,e,a)}}function d3(i){return function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return Zr(i,t)}}function Y(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Cs;Up&&Up(i,null);let a=e.length;for(;a--;){let n=e[a];if(typeof n=="string"){const s=t(n);s!==n&&(r3(e)||(e[a]=s),n=s)}i[n]=!0}return i}function h3(i){for(let e=0;e<i.length;e++)ft(i,e)||(i[e]=null);return i}function wi(i){const e=Nm(null);for(const[t,a]of Um(i))ft(i,t)&&(Array.isArray(a)?e[t]=h3(a):a&&typeof a=="object"&&a.constructor===Object?e[t]=wi(a):e[t]=a);return e}function ja(i,e){for(;i!==null;){const a=c3(i,e);if(a){if(a.get)return st(a.get);if(typeof a.value=="function")return st(a.value)}i=l3(i)}function t(){return null}return t}const Lp=je(["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"]),Zo=je(["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"]),er=je(["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"]),m3=je(["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"]),tr=je(["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"]),f3=je(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Bp=je(["#text"]),zp=je(["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"]),ir=je(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),jp=je(["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"]),ss=je(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),g3=lt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),v3=lt(/<%[\w\W]*|[\w\W]*%>/gm),b3=lt(/\${[\w\W]*}/gm),y3=lt(/^data-[\-\w.\u00B7-\uFFFF]/),x3=lt(/^aria-[\-\w]+$/),Mm=lt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),w3=lt(/^(?:\w+script|data):/i),_3=lt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lm=lt(/^html$/i),P3=lt(/^[a-z][.\w]*(-[.\w]+)+$/i);var $p=Object.freeze({__proto__:null,MUSTACHE_EXPR:g3,ERB_EXPR:v3,TMPLIT_EXPR:b3,DATA_ATTR:y3,ARIA_ATTR:x3,IS_ALLOWED_URI:Mm,IS_SCRIPT_OR_DATA:w3,ATTR_WHITESPACE:_3,DOCTYPE_NAME:Lm,CUSTOM_ELEMENT:P3});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},S3=function(){return typeof window>"u"?null:window},F3=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 Bm(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:S3();const e=j=>Bm(j);if(e.version="3.1.6",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:c,NamedNodeMap:p=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:m}=i,f=l.prototype,x=ja(f,"cloneNode"),g=ja(f,"remove"),v=ja(f,"nextSibling"),P=ja(f,"childNodes"),C=ja(f,"parentNode");if(typeof o=="function"){const j=t.createElement("template");j.content&&j.content.ownerDocument&&(t=j.content.ownerDocument)}let A,I="";const{implementation:w,createNodeIterator:S,createDocumentFragment:k,getElementsByTagName:N}=t,{importNode:H}=a;let V={};e.isSupported=typeof Um=="function"&&typeof C=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ee,ERB_EXPR:X,TMPLIT_EXPR:q,DATA_ATTR:Z,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:b,ATTR_WHITESPACE:_,CUSTOM_ELEMENT:T}=$p;let{IS_ALLOWED_URI:D}=$p,E=null;const W=Y({},[...Lp,...Zo,...er,...tr,...Bp]);let $=null;const Q=Y({},[...zp,...ir,...jp,...ss]);let K=Object.seal(Nm(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}})),ne=null,se=null,Gl=!0,eo=!0,Kl=!1,Xl=!0,Ni=!1,to=!0,li=!1,io=!1,ao=!1,Mi=!1,Nn=!1,Mn=!1,Yl=!0,Ql=!1;const jm="user-content-";let no=!0,ca=!1,Li={},Bi=null;const Jl=Y({},["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 Zl=null;const ec=Y({},["audio","video","img","source","image","track"]);let so=null;const tc=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ln="http://www.w3.org/1998/Math/MathML",Bn="http://www.w3.org/2000/svg",Dt="http://www.w3.org/1999/xhtml";let zi=Dt,oo=!1,ro=null;const $m=Y({},[Ln,Bn,Dt],Jo);let ua=null;const Hm=["application/xhtml+xml","text/html"],qm="text/html";let Se=null,ji=null;const Wm=t.createElement("form"),ic=function(y){return y instanceof RegExp||y instanceof Function},lo=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ji&&ji===y)){if((!y||typeof y!="object")&&(y={}),y=wi(y),ua=Hm.indexOf(y.PARSER_MEDIA_TYPE)===-1?qm:y.PARSER_MEDIA_TYPE,Se=ua==="application/xhtml+xml"?Jo:Cs,E=ft(y,"ALLOWED_TAGS")?Y({},y.ALLOWED_TAGS,Se):W,$=ft(y,"ALLOWED_ATTR")?Y({},y.ALLOWED_ATTR,Se):Q,ro=ft(y,"ALLOWED_NAMESPACES")?Y({},y.ALLOWED_NAMESPACES,Jo):$m,so=ft(y,"ADD_URI_SAFE_ATTR")?Y(wi(tc),y.ADD_URI_SAFE_ATTR,Se):tc,Zl=ft(y,"ADD_DATA_URI_TAGS")?Y(wi(ec),y.ADD_DATA_URI_TAGS,Se):ec,Bi=ft(y,"FORBID_CONTENTS")?Y({},y.FORBID_CONTENTS,Se):Jl,ne=ft(y,"FORBID_TAGS")?Y({},y.FORBID_TAGS,Se):{},se=ft(y,"FORBID_ATTR")?Y({},y.FORBID_ATTR,Se):{},Li=ft(y,"USE_PROFILES")?y.USE_PROFILES:!1,Gl=y.ALLOW_ARIA_ATTR!==!1,eo=y.ALLOW_DATA_ATTR!==!1,Kl=y.ALLOW_UNKNOWN_PROTOCOLS||!1,Xl=y.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ni=y.SAFE_FOR_TEMPLATES||!1,to=y.SAFE_FOR_XML!==!1,li=y.WHOLE_DOCUMENT||!1,Mi=y.RETURN_DOM||!1,Nn=y.RETURN_DOM_FRAGMENT||!1,Mn=y.RETURN_TRUSTED_TYPE||!1,ao=y.FORCE_BODY||!1,Yl=y.SANITIZE_DOM!==!1,Ql=y.SANITIZE_NAMED_PROPS||!1,no=y.KEEP_CONTENT!==!1,ca=y.IN_PLACE||!1,D=y.ALLOWED_URI_REGEXP||Mm,zi=y.NAMESPACE||Dt,K=y.CUSTOM_ELEMENT_HANDLING||{},y.CUSTOM_ELEMENT_HANDLING&&ic(y.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=y.CUSTOM_ELEMENT_HANDLING.tagNameCheck),y.CUSTOM_ELEMENT_HANDLING&&ic(y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),y.CUSTOM_ELEMENT_HANDLING&&typeof y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ni&&(eo=!1),Nn&&(Mi=!0),Li&&(E=Y({},Bp),$=[],Li.html===!0&&(Y(E,Lp),Y($,zp)),Li.svg===!0&&(Y(E,Zo),Y($,ir),Y($,ss)),Li.svgFilters===!0&&(Y(E,er),Y($,ir),Y($,ss)),Li.mathMl===!0&&(Y(E,tr),Y($,jp),Y($,ss))),y.ADD_TAGS&&(E===W&&(E=wi(E)),Y(E,y.ADD_TAGS,Se)),y.ADD_ATTR&&($===Q&&($=wi($)),Y($,y.ADD_ATTR,Se)),y.ADD_URI_SAFE_ATTR&&Y(so,y.ADD_URI_SAFE_ATTR,Se),y.FORBID_CONTENTS&&(Bi===Jl&&(Bi=wi(Bi)),Y(Bi,y.FORBID_CONTENTS,Se)),no&&(E["#text"]=!0),li&&Y(E,["html","head","body"]),E.table&&(Y(E,["tbody"]),delete ne.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.');A=y.TRUSTED_TYPES_POLICY,I=A.createHTML("")}else A===void 0&&(A=F3(m,n)),A!==null&&typeof I=="string"&&(I=A.createHTML(""));je&&je(y),ji=y}},ac=Y({},["mi","mo","mn","ms","mtext"]),nc=Y({},["foreignobject","annotation-xml"]),Vm=Y({},["title","style","font","a","script"]),sc=Y({},[...Zo,...er,...m3]),oc=Y({},[...tr,...f3]),Gm=function(y){let R=C(y);(!R||!R.tagName)&&(R={namespaceURI:zi,tagName:"template"});const z=Cs(y.tagName),ae=Cs(R.tagName);return ro[y.namespaceURI]?y.namespaceURI===Bn?R.namespaceURI===Dt?z==="svg":R.namespaceURI===Ln?z==="svg"&&(ae==="annotation-xml"||ac[ae]):!!sc[z]:y.namespaceURI===Ln?R.namespaceURI===Dt?z==="math":R.namespaceURI===Bn?z==="math"&&nc[ae]:!!oc[z]:y.namespaceURI===Dt?R.namespaceURI===Bn&&!nc[ae]||R.namespaceURI===Ln&&!ac[ae]?!1:!oc[z]&&(Vm[z]||!sc[z]):!!(ua==="application/xhtml+xml"&&ro[y.namespaceURI]):!1},_t=function(y){La(e.removed,{element:y});try{C(y).removeChild(y)}catch{g(y)}},zn=function(y,R){try{La(e.removed,{attribute:R.getAttributeNode(y),from:R})}catch{La(e.removed,{attribute:null,from:R})}if(R.removeAttribute(y),y==="is"&&!$[y])if(Mi||Nn)try{_t(R)}catch{}else try{R.setAttribute(y,"")}catch{}},rc=function(y){let R=null,z=null;if(ao)y="<remove></remove>"+y;else{const ke=Mp(y,/^[\r\n\t ]+/);z=ke&&ke[0]}ua==="application/xhtml+xml"&&zi===Dt&&(y='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+y+"</body></html>");const ae=A?A.createHTML(y):y;if(zi===Dt)try{R=new h().parseFromString(ae,ua)}catch{}if(!R||!R.documentElement){R=w.createDocument(zi,"template",null);try{R.documentElement.innerHTML=oo?I:ae}catch{}}const Ie=R.body||R.documentElement;return y&&z&&Ie.insertBefore(t.createTextNode(z),Ie.childNodes[0]||null),zi===Dt?N.call(R,li?"html":"body")[0]:li?R.documentElement:Ie},lc=function(y){return S.call(y.ownerDocument||y,y,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},cc=function(y){return y instanceof u&&(typeof y.nodeName!="string"||typeof y.textContent!="string"||typeof y.removeChild!="function"||!(y.attributes instanceof p)||typeof y.removeAttribute!="function"||typeof y.setAttribute!="function"||typeof y.namespaceURI!="string"||typeof y.insertBefore!="function"||typeof y.hasChildNodes!="function")},uc=function(y){return typeof r=="function"&&y instanceof r},Ot=function(y,R,z){V[y]&&ns(V[y],ae=>{ae.call(e,R,z,ji)})},pc=function(y){let R=null;if(Ot("beforeSanitizeElements",y,null),cc(y))return _t(y),!0;const z=Se(y.nodeName);if(Ot("uponSanitizeElement",y,{tagName:z,allowedTags:E}),y.hasChildNodes()&&!uc(y.firstElementChild)&&Le(/<[/\w]/g,y.innerHTML)&&Le(/<[/\w]/g,y.textContent)||y.nodeType===$a.progressingInstruction||to&&y.nodeType===$a.comment&&Le(/<[/\w]/g,y.data))return _t(y),!0;if(!E[z]||ne[z]){if(!ne[z]&&hc(z)&&(K.tagNameCheck instanceof RegExp&&Le(K.tagNameCheck,z)||K.tagNameCheck instanceof Function&&K.tagNameCheck(z)))return!1;if(no&&!Bi[z]){const ae=C(y)||y.parentNode,Ie=P(y)||y.childNodes;if(Ie&&ae){const ke=Ie.length;for(let $e=ke-1;$e>=0;--$e){const Pt=x(Ie[$e],!0);Pt.__removalCount=(y.__removalCount||0)+1,ae.insertBefore(Pt,v(y))}}}return _t(y),!0}return y instanceof l&&!Gm(y)||(z==="noscript"||z==="noembed"||z==="noframes")&&Le(/<\/no(script|embed|frames)/i,y.innerHTML)?(_t(y),!0):(Ni&&y.nodeType===$a.text&&(R=y.textContent,ns([ee,X,q],ae=>{R=Ba(R,ae," ")}),y.textContent!==R&&(La(e.removed,{element:y.cloneNode()}),y.textContent=R)),Ot("afterSanitizeElements",y,null),!1)},dc=function(y,R,z){if(Yl&&(R==="id"||R==="name")&&(z in t||z in Wm))return!1;if(!(eo&&!se[R]&&Le(Z,R))){if(!(Gl&&Le(F,R))){if(!$[R]||se[R]){if(!(hc(y)&&(K.tagNameCheck instanceof RegExp&&Le(K.tagNameCheck,y)||K.tagNameCheck instanceof Function&&K.tagNameCheck(y))&&(K.attributeNameCheck instanceof RegExp&&Le(K.attributeNameCheck,R)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(R))||R==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Le(K.tagNameCheck,z)||K.tagNameCheck instanceof Function&&K.tagNameCheck(z))))return!1}else if(!so[R]){if(!Le(D,Ba(z,_,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&y!=="script"&&u3(z,"data:")===0&&Zl[y])){if(!(Kl&&!Le(b,Ba(z,_,"")))){if(z)return!1}}}}}}return!0},hc=function(y){return y!=="annotation-xml"&&Mp(y,T)},mc=function(y){Ot("beforeSanitizeAttributes",y,null);const{attributes:R}=y;if(!R)return;const z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};let ae=R.length;for(;ae--;){const Ie=R[ae],{name:ke,namespaceURI:$e,value:Pt}=Ie,pa=Se(ke);let Ue=ke==="value"?Pt:p3(Pt);if(z.attrName=pa,z.attrValue=Ue,z.keepAttr=!0,z.forceKeepAttr=void 0,Ot("uponSanitizeAttribute",y,z),Ue=z.attrValue,to&&Le(/((--!?|])>)|<\/(style|title)/i,Ue)){zn(ke,y);continue}if(z.forceKeepAttr||(zn(ke,y),!z.keepAttr))continue;if(!Xl&&Le(/\/>/i,Ue)){zn(ke,y);continue}Ni&&ns([ee,X,q],gc=>{Ue=Ba(Ue,gc," ")});const fc=Se(y.nodeName);if(dc(fc,pa,Ue)){if(Ql&&(pa==="id"||pa==="name")&&(zn(ke,y),Ue=jm+Ue),A&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!$e)switch(m.getAttributeType(fc,pa)){case"TrustedHTML":{Ue=A.createHTML(Ue);break}case"TrustedScriptURL":{Ue=A.createScriptURL(Ue);break}}try{$e?y.setAttributeNS($e,ke,Ue):y.setAttribute(ke,Ue),cc(y)?_t(y):Np(e.removed)}catch{}}}Ot("afterSanitizeAttributes",y,null)},Km=function j(y){let R=null;const z=lc(y);for(Ot("beforeSanitizeShadowDOM",y,null);R=z.nextNode();)Ot("uponSanitizeShadowNode",R,null),!pc(R)&&(R.content instanceof s&&j(R.content),mc(R));Ot("afterSanitizeShadowDOM",y,null)};return e.sanitize=function(j){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,z=null,ae=null,Ie=null;if(oo=!j,oo&&(j="<!-->"),typeof j!="string"&&!uc(j))if(typeof j.toString=="function"){if(j=j.toString(),typeof j!="string")throw za("dirty is not a string, aborting")}else throw za("toString is not a function");if(!e.isSupported)return j;if(io||lo(y),e.removed=[],typeof j=="string"&&(ca=!1),ca){if(j.nodeName){const Pt=Se(j.nodeName);if(!E[Pt]||ne[Pt])throw za("root node is forbidden and cannot be sanitized in-place")}}else if(j instanceof r)R=rc("<!---->"),z=R.ownerDocument.importNode(j,!0),z.nodeType===$a.element&&z.nodeName==="BODY"||z.nodeName==="HTML"?R=z:R.appendChild(z);else{if(!Mi&&!Ni&&!li&&j.indexOf("<")===-1)return A&&Mn?A.createHTML(j):j;if(R=rc(j),!R)return Mi?null:Mn?I:""}R&&ao&&_t(R.firstChild);const ke=lc(ca?j:R);for(;ae=ke.nextNode();)pc(ae)||(ae.content instanceof s&&Km(ae.content),mc(ae));if(ca)return j;if(Mi){if(Nn)for(Ie=k.call(R.ownerDocument);R.firstChild;)Ie.appendChild(R.firstChild);else Ie=R;return($.shadowroot||$.shadowrootmode)&&(Ie=H.call(a,Ie,!0)),Ie}let $e=li?R.outerHTML:R.innerHTML;return li&&E["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Le(Lm,R.ownerDocument.doctype.name)&&($e="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
|
|
56
|
-
`+$e),Ni&&ns([ee,X,q],Pt=>{$e=Ba($e,Pt," ")}),A&&Mn?A.createHTML($e):$e},e.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lo(j),io=!0},e.clearConfig=function(){ji=null,io=!1},e.isValidAttribute=function(j,y,R){ji||lo({});const z=Se(j),ae=Se(y);return dc(z,ae,R)},e.addHook=function(j,y){typeof y=="function"&&(V[j]=V[j]||[],La(V[j],y))},e.removeHook=function(j){if(V[j])return Np(V[j])},e.removeHooks=function(j){V[j]&&(V[j]=[])},e.removeAllHooks=function(){V={}},e}var Hp=Bm();class C3 extends Te{constructor(t,a){super(t,{...{},...a});He(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=o3.createHash("md5").update(await r.text()).digest("hex"),c=nn(n),p=`${l}${c?`.${c}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});He(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})}});He(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=Hp.sanitize(o);if(o!==l){const c=nn(n),p=l.endsWith(`.${c}`)?l:`${l}.${c}`;this.uppy.setFileState(a,{name:p,meta:{...r,name:p,filename:p}})}if((s=n.type)!=null&&s.includes("image/svg")){const{data:c,name:p,type:u}=this.uppy.getFile(a),h=await c.text(),m=Hp.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0}});if(h!==m){const f=new Blob([m],{type:u}),x=op(f,p);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:x})}}}});He(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.setMetaData(t)});He(this,"tryDownloadRemoteFile",async t=>{var A,I;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:c,isLoading:p,remote:u,meta:h,errorCount:m=0}=t,f=!p&&r,x=`uploader:${c}:downloaded`,g=nn(t),v=(A=n==null?void 0:n.split("?"))==null?void 0:A[0],C=(()=>{const w=["jpg","jpeg"];return w.includes(g)&&w.some(S=>v==null?void 0:v.endsWith(S))?!0:v==null?void 0:v.endsWith(g)})()?v:`${v}${g?`.${g}`:""}`;if(f){const w=n_(s||((I=u==null?void 0:u.body)==null?void 0:I.url));if(m>=3)throw new Error("Download remote file failure");this.uppy.setFileState(c,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await la.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:w}}).then(S=>S==null?void 0:S.data).then(async S=>{const k=op(S,C);this.uppy.setFileState(c,{name:C,extension:g,type:a,data:k,preview:s||sp(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:C,filename:C}}),this.uppy.getFile(c),this.uppy.emit(x,c)}).catch(async S=>{console.error("Axios download remote file error: ",S),this.uppy.setFileState(c,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(c))})}else l&&await(async()=>new Promise(S=>{this.uppy.once(x,async()=>{S()})}))()});He(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:sp(s)})},o.indexOf("gif")>-1?1e3:0)}});He(this,"prepareUpload",t=>{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||"DownloadRemoteFiles",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 E3 extends Te{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=()=>_e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:_e("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[_e("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),_e("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 _e("div",{id:"ai-image",className:"ai-image",children:_e("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 T3="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",k3=ce.lazy(()=>Jp(()=>import("./index-
|
|
56
|
+
`+$e),Ni&&ns([ee,X,q],Pt=>{$e=Ba($e,Pt," ")}),A&&Mn?A.createHTML($e):$e},e.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lo(j),io=!0},e.clearConfig=function(){ji=null,io=!1},e.isValidAttribute=function(j,y,R){ji||lo({});const z=Se(j),ae=Se(y);return dc(z,ae,R)},e.addHook=function(j,y){typeof y=="function"&&(V[j]=V[j]||[],La(V[j],y))},e.removeHook=function(j){if(V[j])return Np(V[j])},e.removeHooks=function(j){V[j]&&(V[j]=[])},e.removeAllHooks=function(){V={}},e}var Hp=Bm();class C3 extends Te{constructor(t,a){super(t,{...{},...a});He(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=o3.createHash("md5").update(await r.text()).digest("hex"),c=nn(n),p=`${l}${c?`.${c}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});He(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})}});He(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=Hp.sanitize(o);if(o!==l){const c=nn(n),p=l.endsWith(`.${c}`)?l:`${l}.${c}`;this.uppy.setFileState(a,{name:p,meta:{...r,name:p,filename:p}})}if((s=n.type)!=null&&s.includes("image/svg")){const{data:c,name:p,type:u}=this.uppy.getFile(a),h=await c.text(),m=Hp.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0}});if(h!==m){const f=new Blob([m],{type:u}),x=op(f,p);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:x})}}}});He(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.setMetaData(t)});He(this,"tryDownloadRemoteFile",async t=>{var A,I;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:c,isLoading:p,remote:u,meta:h,errorCount:m=0}=t,f=!p&&r,x=`uploader:${c}:downloaded`,g=nn(t),v=(A=n==null?void 0:n.split("?"))==null?void 0:A[0],C=(()=>{const w=["jpg","jpeg"];return w.includes(g)&&w.some(S=>v==null?void 0:v.endsWith(S))?!0:v==null?void 0:v.endsWith(g)})()?v:`${v}${g?`.${g}`:""}`;if(f){const w=n_(s||((I=u==null?void 0:u.body)==null?void 0:I.url));if(m>=3)throw new Error("Download remote file failure");this.uppy.setFileState(c,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await la.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:w}}).then(S=>S==null?void 0:S.data).then(async S=>{const k=op(S,C);this.uppy.setFileState(c,{name:C,extension:g,type:a,data:k,preview:s||sp(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:C,filename:C}}),this.uppy.getFile(c),this.uppy.emit(x,c)}).catch(async S=>{console.error("Axios download remote file error: ",S),this.uppy.setFileState(c,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(c))})}else l&&await(async()=>new Promise(S=>{this.uppy.once(x,async()=>{S()})}))()});He(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:sp(s)})},o.indexOf("gif")>-1?1e3:0)}});He(this,"prepareUpload",t=>{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||"DownloadRemoteFiles",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 E3 extends Te{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=()=>_e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:_e("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[_e("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),_e("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 _e("div",{id:"ai-image",className:"ai-image",children:_e("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 T3="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",k3=ce.lazy(()=>Jp(()=>import("./index-DSe7TL0J.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]),import.meta.url)),qp="uploader-container",os="uploader-dashboard",el=localStorage.getItem("uppy_debug"),A3=i=>{var r;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a}=i,{companionUrl:n}=hm(e),s=async l=>(await la.post("/api/image/generations",l)).data,o={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Oh,options:{quality:1},alwayUse:!0},(el||sn()&&!rp())&&{id:"Uploaded",plugin:i3,options:{params:a==null?void 0:a.params}},(el||sn()&&!rp())&&{id:"Resources",plugin:n3,options:{params:a==null?void 0:a.params}},sn()&&s_()&&t.AIImage&&{id:"AIImage",plugin:E3,options:{companionUrl:n},onShowPanel:l=>{function c(){setTimeout(()=>{var u,h;const p=document.getElementById("ai-image");p?uf(p).render(it.jsx(k3,{api:s,restrictions:o,i18n:(h=(u=l.current)==null?void 0:u.getUploader())==null?void 0:h.i18n,onSelect:m=>{const f=l.current.getUploader();f==null||f.emit("ai-image:selected",m),m.forEach((x,g)=>{const v=`AI Image [${g+1}].png`,P={name:v,type:"image/png",data:a_(x,v),source:"AIImage",isRemote:!1};f==null||f.addFile(P)})}})):c()},100)}c()}},{id:"Url",plugin:An,options:{companionUrl:n}},{id:"Webcam",plugin:md,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((r=window==null?void 0:window.blocklet)!=null&&r.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:Od,options:{companionUrl:n,companionHeaders:{},companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:C3,options:{companionUrl:n},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:vl,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function Wl(i){const{id:e,plugins:t,locale:a,onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:c,pluginList:p,restrictions:u}=i,h=id(p,"id"),{uploaderUrl:m}=hm(r);let f=new sl({id:e,meta:{uploaderId:e},debug:["true",!0].includes(el||""),locale:Lw[a||"en"],onBeforeFileAdded:(x,g)=>{if(Object.hasOwn(g,x.id))return!1;const v=!!ki.extension(x.type),P=ki.lookup(x.name)||"";if(!v&&P&&P!==x.type){const C=nn(x);C&&(x.extension=C),x.type=P}return x},...o,restrictions:u}).use(sm,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:m,async onBeforeRequest(x,g){var w;const{hashFileName:v,id:P,meta:C}=g,A=nn(g);x.setHeader("x-uploader-file-name",`${v}`),x.setHeader("x-uploader-file-id",`${P}`),x.setHeader("x-uploader-file-ext",`${A}`),x.setHeader("x-uploader-base-url",new URL(x.getURL()).pathname),x.setHeader("x-uploader-endpoint-url",m),x.setHeader("x-uploader-metadata",JSON.stringify(C,(S,k)=>typeof k=="string"?encodeURIComponent(k):k));const I=(window==null?void 0:window.uploaderComponentId)||((w=window==null?void 0:window.blocklet)==null?void 0:w.componentId);I&&x.setHeader("x-component-did",(I||"").split("/").pop())},onAfterResponse:async(x,g)=>{const v={},P=x.getUnderlyingObject();try{P.response&&(v.data=JSON.parse(P.response))}catch{v.data={}}v.method=x.getMethod().toUpperCase(),v.url=x.getURL(),v.status=P.status,v.headers={...x._headers};const C=P.getAllResponseHeaders();if(C&&C.split(`\r
|
|
57
57
|
`).forEach(S=>{const[k,N]=S.split(": ");k&&N&&(v.headers[k]=N)}),["PATCH","POST"].includes(v.method)&&[200,500].includes(v.status)){const w=[!0,"true"].includes(v.headers["x-uploader-file-exist"]),S=r_(v.url,v.headers["x-uploader-file-name"]),k=f.getFile(v.headers["x-uploader-file-id"]);v.file=k,v.uploadURL=S,w&&k&&(v.method==="POST"&&f.pauseResume(k.id),f.emit("upload-success",k,{uploadURL:S}),f.calculateTotalProgress()),v.status===200&&(await(s==null?void 0:s(v)),f.emitUploadSuccess(k,v))}n&&await(n==null?void 0:n(P));const A=f.getState().totalProgress===100,I=f.getFiles().every(w=>w.source==="DropTarget");A&&I&&f.close()},...l});return c&&f.use(gh,{target:document.body,onDrop:x=>{var g;(g=f==null?void 0:f.open)==null||g.call(f)},...c}),t==null||t.forEach(x=>{if(x){const{plugin:g,options:v}=h[x]||{};g&&f.use(g,v)}}),l_(f),f}const tl=ce.forwardRef((i,e)=>{const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,...i==null?void 0:i.apiPathProps},a=sf({open:!1,uppy:null,availablePluginMap:{},restrictions:{}}),n=A3({...i,apiPathProps:t,availablePluginMap:a.availablePluginMap,restrictions:a.restrictions}),{plugins:s=n.map(w=>w.id),id:o="Uploader",popup:r=!1,uploadedProps:l,onOpen:c,onClose:p,locale:u,installerProps:h}=i,m=id(n,"id"),f=of(w=>{var S;return(S=w==null?void 0:w.breakpoints)==null?void 0:S.down("md")}),x=yc([...s,...n.filter(w=>w.alwayUse).map(w=>w.id)]);ce.useLayoutEffect(()=>{(async()=>{var k,N,H,V,ee,X;let S=xc((k=i==null?void 0:i.coreProps)==null?void 0:k.restrictions)?{}:(N=i==null?void 0:i.coreProps)==null?void 0:N.restrictions;sn()&&!t.disableMediaKitPrefix&&xc((H=i==null?void 0:i.coreProps)==null?void 0:H.restrictions)&&await la.get("/api/uploader/status").then(({data:q})=>{a.availablePluginMap=q.availablePluginMap,S=q.restrictions||{}}),!((V=S==null?void 0:S.allowedFileTypes)!=null&&V.length)&&(S!=null&&S.allowedFileExts)&&(S.allowedFileTypes=yc((X=(ee=(typeof(S==null?void 0:S.allowedFileExts)=="string"?S==null?void 0:S.allowedFileExts.split(","):S==null?void 0:S.allowedFileExts)||[])==null?void 0:ee.map(q=>ki.lookup((q==null?void 0:q.replaceAll(" ",""))||"")))==null?void 0:X.filter(q=>q)),delete S.allowedFileExts),S.maxFileSize&&typeof S.maxFileSize=="string"&&(S.maxFileSize=ie.parseSize(S.maxFileSize,{iec:!1})||void 0),a.restrictions=S})()},[]),df("esc",w=>{a.open&&(w.stopPropagation(),w.preventDefault(),P())},{useCapture:!0}),ce.useEffect(()=>{a.uppy=Wl({...i,id:o,plugins:x,apiPathProps:t,pluginList:n,restrictions:a.restrictions}),a.uppy.open=v,a.uppy.close=P,a.uppy.openPlugin=g,a.uppy.on("dashboard:show-panel",w=>{const{onShowPanel:S}=m[w];S==null||S(e)}),(x.includes("Uploaded")||x.includes("Resources"))&&(a.uppy.off("uploaded:selected"),a.uppy.on("uploaded:selected",w=>{var S;w.forEach(k=>{a.uppy.emitUploadSuccess({id:k._id},{data:k,isMock:!0})}),(S=l==null?void 0:l.onSelectedFiles)==null||S.call(l,w),P()}))},[JSON.stringify({id:o,plugins:x,apiPathProps:t,locale:u,restrictions:a.restrictions})]);function g(w){var S,k,N;if(w=w.replace(/\s/g,""),["MyDevice",...x].map(H=>H.toLowerCase()).includes(w.toLowerCase())){let H=`div[data-uppy-acquirer-id="${w}"] > button`;(N=(k=(S=document==null?void 0:document.getElementById(os))==null?void 0:S.querySelector(H))==null?void 0:k.click)==null||N.call(k)}}function v(w){var k,N,H,V;a.open=!0,w&&setTimeout(()=>{g(w)},200),a.uppy.emitOpen(),c==null||c(),(N=(k=document.activeElement)==null?void 0:k.blur)==null||N.call(k);const S=a.uppy.getPlugin(os).el;(H=S==null?void 0:S.focus)==null||H.call(S),(V=S==null?void 0:S.click)==null||V.call(S)}function P(){var w;(w=a.uppy.getPlugin(os))==null||w.hideAllPanels(),a.open=!1,a.uppy.emitClose(),p==null||p(),setTimeout(()=>{a.uppy.getState().totalProgress===100&&(a.uppy.setState({files:{},currentUploads:{}}),a.uppy.calculateTotalProgress())},500)}ce.useImperativeHandle(e,()=>({getUploader:()=>a.uppy,open:v,close:P})),ce.useEffect(()=>{o_(t)},[t]);const C=r?cf:ce.Fragment,A=r?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:a.open?"block":"none"}},invisible:!0,open:a.open,onClick:w=>{document.activeElement===document.body&&(w.stopPropagation(),P())},...i.wrapperProps}:{...i.wrapperProps},I=f?"42px":"40px";return it.jsx(C,{...A,children:it.jsxs(gf,{onClose:P,did:T3,disabled:!a.open,...h,children:[it.jsx(rf,{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)"}}})}),it.jsxs(Zp,{id:qp,onClick:w=>w.stopPropagation(),sx:{position:"relative",width:f?"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%"}}},children:[it.jsx(lf,{"aria-label":"close",onClick:P,sx:{color:"#fafafa",position:"absolute",...f?{bottom:`calc(0px - ${I} - 16px)`,left:`calc(50vw - ${I} - 8px)`}:{right:`calc(0px - ${I} - 16px)`,top:-12}},children:it.jsx(yf,{sx:{fontSize:I}})}),a.uppy&&it.jsx(oh,{inline:!0,target:`#${qp}`,id:os,uppy:a.uppy,plugins:x,fileManagerSelectionType:"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:"",doneButtonHandler:P,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),D3=Object.freeze(Object.defineProperty({__proto__:null,Uploader:tl,default:tl,initUploader:Wl},Symbol.toStringTag,{value:"Module"})),Wp=ce.lazy(()=>Jp(()=>Promise.resolve().then(()=>D3),void 0,import.meta.url).then(i=>({default:i.Uploader}))),Vl=ce.createContext(null);function zm(){const i=ce.useContext(Vl);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function O3({onChange:i,children:e,...t}){const a=zm(),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 it.jsx(Zp,{onClick:n,...t,children:e})}function I3({children:i,popup:e,...t}){const a=ce.useRef(null),n=ce.useMemo(()=>e?pf.createPortal(it.jsx(Wp,{ref:a,popup:!0,...t},"uploader"),document.body):it.jsx(Wp,{ref:a,popup:!1,...t},"uploader"),[a,e,t]);return it.jsxs(Vl.Provider,{value:a,children:[i,n]})}const h2=Object.freeze(Object.defineProperty({__proto__:null,Uploader:tl,UploaderContext:Vl,UploaderProvider:I3,UploaderTrigger:O3,initUploader:Wl,useUploaderContext:zm},Symbol.toStringTag,{value:"Module"}));export{s_ as g,h2 as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dU as S}from"./index-
|
|
1
|
+
import{dU as S}from"./index-CX-CBC_8.js";function I(r,t,n){return(t=S(t))in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function h(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,e)}return n}function m(r){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(e){I(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function i(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var E=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),v=function(){return Math.random().toString(36).substring(7).split("").join(".")},P={INIT:"@@redux/INIT"+v(),REPLACE:"@@redux/REPLACE"+v(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+v()}};function R(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function T(r,t,n){var e;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(i(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(i(1));return n(T)(r,t)}if(typeof r!="function")throw new Error(i(2));var u=r,a=t,p=[],c=p,f=!1;function w(){c===p&&(c=p.slice())}function g(){if(f)throw new Error(i(3));return a}function O(o){if(typeof o!="function")throw new Error(i(4));if(f)throw new Error(i(5));var b=!0;return w(),c.push(o),function(){if(b){if(f)throw new Error(i(6));b=!1,w();var s=c.indexOf(o);c.splice(s,1),p=null}}}function y(o){if(!R(o))throw new Error(i(7));if(typeof o.type>"u")throw new Error(i(8));if(f)throw new Error(i(9));try{f=!0,a=u(a,o)}finally{f=!1}for(var b=p=c,l=0;l<b.length;l++){var s=b[l];s()}return o}function N(o){if(typeof o!="function")throw new Error(i(10));u=o,y({type:P.REPLACE})}function A(){var o,b=O;return o={subscribe:function(s){if(typeof s!="object"||s===null)throw new Error(i(11));function d(){s.next&&s.next(g())}d();var x=b(d);return{unsubscribe:x}}},o[E]=function(){return this},o}return y({type:P.INIT}),e={dispatch:y,subscribe:O,getState:g,replaceReducer:N},e[E]=A,e}function j(r,t){return function(){return t(r.apply(this,arguments))}}function K(r,t){if(typeof r=="function")return j(r,t);if(typeof r!="object"||r===null)throw new Error(i(16));var n={};for(var e in r){var u=r[e];typeof u=="function"&&(n[e]=j(u,t))}return n}function L(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return t.length===0?function(e){return e}:t.length===1?t[0]:t.reduce(function(e,u){return function(){return e(u.apply(void 0,arguments))}})}function M(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return function(e){return function(){var u=e.apply(void 0,arguments),a=function(){throw new Error(i(15))},p={getState:u.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(f){return f(p)});return a=L.apply(void 0,c)(u.dispatch),m(m({},u),{},{dispatch:a})}}}export{I as _,M as a,K as b,T as c,L as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as _,j as p,Q as S,d0 as V,fM as ne,dM as pe,r as P,q as Me,cB as ii,t as ti,ch as Le,fz as ri,fK as ai,g3 as oi,dO as ni,f$ as si,dN as li,a2 as Ae,fc as Ce,gc as ci,av as qe,cN as M,n as Ue,g as di,cz as ui,gd as bi}from"./index-Dpawm4Ki.js";function he({optionalComponent:a,index:n,installStatus:f,hasPermission:l,t:E}){const h=()=>{window.open(a==null?void 0:a.installUrl,"_blank")},x=()=>{window.open(a==null?void 0:a.storeUrl,"_blank")},c=()=>{window.location.reload()},d=f==="stopped"||f==="running",s=60;return p.jsxs(S,{children:[n===0?null:p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsxs(S,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[p.jsx("img",{style:{width:s,height:s,minWidth:s,minHeight:s},src:a.logoUrl,alt:a.meta.title}),p.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[p.jsxs(S,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var w;return x((w=a.meta)==null?void 0:w.did)},children:[a.meta.title,p.jsxs(S,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[a.meta.version,p.jsx(ne,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:V.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),p.jsx(S,{sx:{marginTop:0,opacity:.7},children:a.meta.description}),p.jsx(S,{sx:{display:l?"flex":"none",flexDirection:"row",gap:1},children:f?p.jsx(S,{sx:{marginTop:2,opacity:.7},children:d?p.jsx(pe,{variant:"contained",onClick:c,children:E("componentInstallerRefresh")},"refresh"):p.jsx(pe,{disabled:!0,sx:{color:"#333"},startIcon:p.jsx(ne,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:f},"status")}):p.jsx(pe,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var w;return h((w=a.meta)==null?void 0:w.did)},children:E("componentInstallerInstall")},"install")}),d?p.jsx(S,{sx:{marginTop:2,opacity:.7},children:E("componentInstallerSuccessInstalled")}):null]})]})]})}he.propTypes={t:_.func.isRequired,optionalComponent:_.object.isRequired,index:_.number.isRequired,installStatus:_.string,hasPermission:_.bool.isRequired};he.defaultProps={installStatus:""};const fi={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},we=a=>typeof a=="string"?new Set(a.split(";;")):new Set(a);function pi({did:a,onInstalled:n,onError:f}){const l=Array.isArray(a)?a.join(";;"):a,[E,h]=P.useState({}),x=P.useRef({onInstalled:n,onError:f});x.current={onInstalled:n,onError:f};const{optionalComponents:c,componentMountPoints:d}=window.blocklet,s=P.useMemo(()=>{var r;if(!c||!c.length)return[];const u=we(l),e=c.filter(i=>u.has(i.meta.did));return(r=e?x.current.onError:x.current.onInstalled)==null||r(e),e},[l,c]),w=P.useMemo(()=>{if(s.length)return!0;const u=we(l);return(d||[]).find(e=>u.has(e.did))},[s,d,l]);return s.forEach(u=>{u.storeUrl=Me(u.meta.homepage,"blocklets",u.meta.did),u.installUrl=Me(window.blocklet.appUrl,ii,`/admin/components?install-component=${u.meta.did}`)}),P.useEffect(()=>{const u=e=>{var r,i,t,o,T;if(e.origin===window.blocklet.appUrl&&((r=e.data)==null?void 0:r.kind)==="component-installer"&&(t=(i=e.data)==null?void 0:i.blocklet)!=null&&t.children){let I=!1;const m=we(l);(T=(o=e.data)==null?void 0:o.blocklet)==null||T.children.forEach(b=>{var O;m.has((O=b.meta)==null?void 0:O.did)&&(I=!0,h(A=>{var C;return{...A,[(C=b.meta)==null?void 0:C.did]:b.status||"waiting"}}))}),I||h({})}};return window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}},[l]),{optComponents:s,installed:!s.length&&w,installStatus:E,setInstallStatus:h,definedInBlockletYML:w}}function Q({warnIcon:a,did:n,noPermissionMute:f,onInstalled:l,onError:E,children:h,closeByOutSize:x,onClose:c,fallback:d,disabled:s,roles:w=["owner","admin"]}){const{locale:u}=ti(),e=Le((m,b={})=>ri(fi,m,u,"en",b)),{installed:r,optComponents:i,installStatus:t,definedInBlockletYML:o}=pi({did:n,onInstalled:l,onError:E}),T=P.useContext(ai),I=()=>{c==null||c(!1)};return s?h:p.jsx(oi,{session:T==null?void 0:T.session,roles:w,children:({hasPermission:m})=>r?h:f&&!m?d||null:typeof h=="function"?p.jsxs(p.Fragment,{children:[d,h({hasPermission:m,optComponents:i,installStatus:t})]}):p.jsxs(p.Fragment,{children:[d,p.jsx(ni,{onClickAway:b=>{b.preventDefault(),b.stopPropagation(),x&&I()},children:p.jsx(si,{in:!0,timeout:350,children:p.jsx(li,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:V.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${V.gray6}, 0px 0px 0px 1px ${V.gray6}`},children:o?p.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[p.jsxs(S,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[a||p.jsx(ne,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),p.jsx(S,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),p.jsx(S,{sx:{flex:1}}),c?p.jsx(Ae,{variant:"outlined",className:"button",onClick:I,children:p.jsx(Ce,{})}):null]}),p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsx(S,{sx:{maxHeight:"70vh",overflowY:"auto"},children:i.map((b,O)=>{var A,C;return p.jsx(he,{t:e,hasPermission:m,index:O,optionalComponent:b,installStatus:t[(A=b.meta)==null?void 0:A.did]},((C=b.meta)==null?void 0:C.did)||O)})}),m?null:p.jsxs(p.Fragment,{children:[p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsx(S,{sx:{padding:"20px 24px"},children:p.jsx(S,{sx:{opacity:1},children:e("componentInstallerSuggestions")})})]})]}):p.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[p.jsxs(S,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[a||p.jsx(ne,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),p.jsx(S,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),p.jsx(S,{sx:{flex:1}}),c?p.jsx(Ae,{variant:"outlined",className:"button",onClick:I,children:p.jsx(Ce,{})}):null]}),p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsxs(S,{sx:{padding:"20px 24px",marginTop:0},children:[e("componentInstallerNoDefinedInBlockletYML"),": ",n]})]})})})})]})})}Q.propTypes={disabled:_.bool,warnIcon:_.node,did:_.oneOfType([_.string,_.arrayOf(_.string)]).isRequired,noPermissionMute:_.bool,onInstalled:_.func,onError:_.func,children:_.any.isRequired,closeByOutSize:_.bool,onClose:_.func,fallback:_.node,roles:_.array};Q.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function He(a){return window.blocklet?p.jsx(Q,{...a}):a.children}He.propTypes={...Q.propTypes,children:_.any.isRequired};He.defaultProps={...Q.defaultProps};var ge={};Object.defineProperty(ge,"__esModule",{value:!0});var wi=ge.default=void 0;mi(P);var ze=p;function mi(a){return a&&a.__esModule?a:{default:a}}function Be(a,n){var f=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);n&&(l=l.filter(function(E){return Object.getOwnPropertyDescriptor(a,E).enumerable})),f.push.apply(f,l)}return f}function De(a){for(var n=1;n<arguments.length;n++){var f=arguments[n]!=null?arguments[n]:{};n%2?Be(Object(f),!0).forEach(function(l){hi(a,l,f[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(f)):Be(Object(f)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(f,l))})}return a}function hi(a,n,f){return(n=gi(n))in a?Object.defineProperty(a,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):a[n]=f,a}function gi(a){var n=vi(a,"string");return typeof n=="symbol"?n:n+""}function vi(a,n){if(typeof a!="object"||!a)return a;var f=a[Symbol.toPrimitive];if(f!==void 0){var l=f.call(a,n||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(a)}var ve=function(n){return(0,ze.jsx)("svg",De(De({},n),{},{children:(0,ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};ve.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};ve.displayName="revoke";wi=ge.default=ve;_.any.isRequired,_.any.isRequired,_.string.isRequired,_.func.isRequired,_.any,_.any,_.number;P.createContext({});const Si=new ci;qe.defaults.timeout=10*1e3;qe.create();var xi={},We={},N={},xe={},H={};H.__esModule=!0;H.joinClassNames=void 0;H.joinClassNames=function(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];return a.filter(function(f){return f}).join(" ")};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.maxHeight,d=h.color,s=h.lineSpacing,w=s===void 0?"0.7em":s,u=h.style,e={maxHeight:c,width:"100%",height:"1em",backgroundColor:d,marginTop:w};return f.createElement("div",{className:l.joinClassNames("text-row",x),style:n(n({},e),u)})};a.default=E})(xe);var ye={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.style,d=h.color,s={backgroundColor:d,borderRadius:"500rem",width:"100%",height:"100%"};return f.createElement("div",{className:l.joinClassNames("round-shape",x),style:n(n({},s),c)})};a.default=E})(ye);var Fe={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.style,d=h.color,s={backgroundColor:d,width:"100%",height:"100%",marginRight:10};return f.createElement("div",{className:l.joinClassNames("rect-shape",x),style:n(n({},s),c)})};a.default=E})(Fe);var ke={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(d){for(var s,w=1,u=arguments.length;w<u;w++){s=arguments[w];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[e]=s[e])}return d},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=xe,E=H,h={width:"100%"},x=[97,100,94,90,98,95,98,40],c=function(d){var s=d.rows,w=d.lineSpacing,u=d.color,e=d.style,r=d.className,i=d.widths,t=i===void 0?x:i,o=function(T){return{maxHeight:100/(s*2-1)+"%",width:t[(T+t.length)%t.length]+"%"}};return f.createElement("div",{className:E.joinClassNames("text-block",r),style:n(n({},h),e)},Array.apply(null,Array(s)).map(function(T,I){return f.createElement(l.default,{color:u,style:o(I),lineSpacing:I!==0?w:0,key:I})}))};a.default=c})(ke);var Ve={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(d){for(var s,w=1,u=arguments.length;w<u;w++){s=arguments[w];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[e]=s[e])}return d},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=ke,E=ye,h=H,x={display:"flex"},c=function(d){var s=d.className,w=d.style,u=d.color,e=d.rows;return f.createElement("div",{className:h.joinClassNames("media-block",s),style:n(n({},x),w)},f.createElement(E.default,{color:u,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),f.createElement(l.default,{color:u,rows:e}))};a.default=c})(Ve);N.__esModule=!0;N.media=N.text=N.rect=N.round=N.textRow=N.MediaBlock=N.TextBlock=N.RectShape=N.RoundShape=N.TextRow=void 0;var Ye=xe;N.TextRow=Ye.default;var Ge=ye;N.RoundShape=Ge.default;var Ke=Fe;N.RectShape=Ke.default;var Xe=ke;N.TextBlock=Xe.default;var Ze=Ve;N.MediaBlock=Ze.default;N.textRow=Ye.default;N.round=Ge.default;N.rect=Ke.default;N.text=Xe.default;N.media=Ze.default;(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(c){for(var d,s=1,w=arguments.length;s<w;s++){d=arguments[s];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c[u]=d[u])}return c},n.apply(this,arguments)},f=M&&M.__rest||function(c,d){var s={};for(var w in c)Object.prototype.hasOwnProperty.call(c,w)&&d.indexOf(w)<0&&(s[w]=c[w]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,w=Object.getOwnPropertySymbols(c);u<w.length;u++)d.indexOf(w[u])<0&&Object.prototype.propertyIsEnumerable.call(c,w[u])&&(s[w[u]]=c[w[u]]);return s};a.__esModule=!0;var l=P,E=N,h=H,x=function(c){var d=c.delay,s=d===void 0?0:d,w=c.type,u=w===void 0?"text":w,e=c.color,r=e===void 0?"#CDCDCD":e,i=c.rows,t=i===void 0?3:i,o=c.ready,T=c.firstLaunchOnly,I=c.children,m=c.className,b=c.showLoadingAnimation,O=c.customPlaceholder,A=f(c,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),C=l.useState(o),W=C[0],F=C[1],z=l.useRef(null),$=function(){var K=b?h.joinClassNames("show-loading-animation",m):m;if(O&&l.isValidElement(O)){var q=h.joinClassNames(O.props.className,K);return l.cloneElement(O,{className:q})}else if(O)return O;var Y=E[u];return l.createElement(Y,n({},A,{color:r,rows:t,className:K}))};return l.useEffect(function(){!T&&W&&!o?s&&s>0?z.current=window.setTimeout(function(){F(!1)},s):F(!1):o&&(z.current&&window.clearTimeout(z.current),W||F(!0))},[T,W,o,s]),l.useEffect(function(){return function(){z.current&&window.clearTimeout(z.current)}},[]),W?I:$()};a.default=x})(We);(function(a){a.__esModule=!0;var n=We;a.default=n.default})(xi);Ue(S)`
|
|
1
|
+
import{P as _,j as p,Q as S,d0 as V,fM as ne,dM as pe,r as P,q as Me,cB as ii,t as ti,ch as Le,fz as ri,fK as ai,g3 as oi,dO as ni,f$ as si,dN as li,a2 as Ae,fc as Ce,gc as ci,av as qe,cN as M,n as Ue,g as di,cz as ui,gd as bi}from"./index-CX-CBC_8.js";function he({optionalComponent:a,index:n,installStatus:f,hasPermission:l,t:E}){const h=()=>{window.open(a==null?void 0:a.installUrl,"_blank")},x=()=>{window.open(a==null?void 0:a.storeUrl,"_blank")},c=()=>{window.location.reload()},d=f==="stopped"||f==="running",s=60;return p.jsxs(S,{children:[n===0?null:p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsxs(S,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[p.jsx("img",{style:{width:s,height:s,minWidth:s,minHeight:s},src:a.logoUrl,alt:a.meta.title}),p.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[p.jsxs(S,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var w;return x((w=a.meta)==null?void 0:w.did)},children:[a.meta.title,p.jsxs(S,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[a.meta.version,p.jsx(ne,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:V.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),p.jsx(S,{sx:{marginTop:0,opacity:.7},children:a.meta.description}),p.jsx(S,{sx:{display:l?"flex":"none",flexDirection:"row",gap:1},children:f?p.jsx(S,{sx:{marginTop:2,opacity:.7},children:d?p.jsx(pe,{variant:"contained",onClick:c,children:E("componentInstallerRefresh")},"refresh"):p.jsx(pe,{disabled:!0,sx:{color:"#333"},startIcon:p.jsx(ne,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:f},"status")}):p.jsx(pe,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var w;return h((w=a.meta)==null?void 0:w.did)},children:E("componentInstallerInstall")},"install")}),d?p.jsx(S,{sx:{marginTop:2,opacity:.7},children:E("componentInstallerSuccessInstalled")}):null]})]})]})}he.propTypes={t:_.func.isRequired,optionalComponent:_.object.isRequired,index:_.number.isRequired,installStatus:_.string,hasPermission:_.bool.isRequired};he.defaultProps={installStatus:""};const fi={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},we=a=>typeof a=="string"?new Set(a.split(";;")):new Set(a);function pi({did:a,onInstalled:n,onError:f}){const l=Array.isArray(a)?a.join(";;"):a,[E,h]=P.useState({}),x=P.useRef({onInstalled:n,onError:f});x.current={onInstalled:n,onError:f};const{optionalComponents:c,componentMountPoints:d}=window.blocklet,s=P.useMemo(()=>{var r;if(!c||!c.length)return[];const u=we(l),e=c.filter(i=>u.has(i.meta.did));return(r=e?x.current.onError:x.current.onInstalled)==null||r(e),e},[l,c]),w=P.useMemo(()=>{if(s.length)return!0;const u=we(l);return(d||[]).find(e=>u.has(e.did))},[s,d,l]);return s.forEach(u=>{u.storeUrl=Me(u.meta.homepage,"blocklets",u.meta.did),u.installUrl=Me(window.blocklet.appUrl,ii,`/admin/components?install-component=${u.meta.did}`)}),P.useEffect(()=>{const u=e=>{var r,i,t,o,T;if(e.origin===window.blocklet.appUrl&&((r=e.data)==null?void 0:r.kind)==="component-installer"&&(t=(i=e.data)==null?void 0:i.blocklet)!=null&&t.children){let I=!1;const m=we(l);(T=(o=e.data)==null?void 0:o.blocklet)==null||T.children.forEach(b=>{var O;m.has((O=b.meta)==null?void 0:O.did)&&(I=!0,h(A=>{var C;return{...A,[(C=b.meta)==null?void 0:C.did]:b.status||"waiting"}}))}),I||h({})}};return window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}},[l]),{optComponents:s,installed:!s.length&&w,installStatus:E,setInstallStatus:h,definedInBlockletYML:w}}function Q({warnIcon:a,did:n,noPermissionMute:f,onInstalled:l,onError:E,children:h,closeByOutSize:x,onClose:c,fallback:d,disabled:s,roles:w=["owner","admin"]}){const{locale:u}=ti(),e=Le((m,b={})=>ri(fi,m,u,"en",b)),{installed:r,optComponents:i,installStatus:t,definedInBlockletYML:o}=pi({did:n,onInstalled:l,onError:E}),T=P.useContext(ai),I=()=>{c==null||c(!1)};return s?h:p.jsx(oi,{session:T==null?void 0:T.session,roles:w,children:({hasPermission:m})=>r?h:f&&!m?d||null:typeof h=="function"?p.jsxs(p.Fragment,{children:[d,h({hasPermission:m,optComponents:i,installStatus:t})]}):p.jsxs(p.Fragment,{children:[d,p.jsx(ni,{onClickAway:b=>{b.preventDefault(),b.stopPropagation(),x&&I()},children:p.jsx(si,{in:!0,timeout:350,children:p.jsx(li,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:V.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${V.gray6}, 0px 0px 0px 1px ${V.gray6}`},children:o?p.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[p.jsxs(S,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[a||p.jsx(ne,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),p.jsx(S,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),p.jsx(S,{sx:{flex:1}}),c?p.jsx(Ae,{variant:"outlined",className:"button",onClick:I,children:p.jsx(Ce,{})}):null]}),p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsx(S,{sx:{maxHeight:"70vh",overflowY:"auto"},children:i.map((b,O)=>{var A,C;return p.jsx(he,{t:e,hasPermission:m,index:O,optionalComponent:b,installStatus:t[(A=b.meta)==null?void 0:A.did]},((C=b.meta)==null?void 0:C.did)||O)})}),m?null:p.jsxs(p.Fragment,{children:[p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsx(S,{sx:{padding:"20px 24px"},children:p.jsx(S,{sx:{opacity:1},children:e("componentInstallerSuggestions")})})]})]}):p.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[p.jsxs(S,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[a||p.jsx(ne,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),p.jsx(S,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),p.jsx(S,{sx:{flex:1}}),c?p.jsx(Ae,{variant:"outlined",className:"button",onClick:I,children:p.jsx(Ce,{})}):null]}),p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsxs(S,{sx:{padding:"20px 24px",marginTop:0},children:[e("componentInstallerNoDefinedInBlockletYML"),": ",n]})]})})})})]})})}Q.propTypes={disabled:_.bool,warnIcon:_.node,did:_.oneOfType([_.string,_.arrayOf(_.string)]).isRequired,noPermissionMute:_.bool,onInstalled:_.func,onError:_.func,children:_.any.isRequired,closeByOutSize:_.bool,onClose:_.func,fallback:_.node,roles:_.array};Q.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function He(a){return window.blocklet?p.jsx(Q,{...a}):a.children}He.propTypes={...Q.propTypes,children:_.any.isRequired};He.defaultProps={...Q.defaultProps};var ge={};Object.defineProperty(ge,"__esModule",{value:!0});var wi=ge.default=void 0;mi(P);var ze=p;function mi(a){return a&&a.__esModule?a:{default:a}}function Be(a,n){var f=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);n&&(l=l.filter(function(E){return Object.getOwnPropertyDescriptor(a,E).enumerable})),f.push.apply(f,l)}return f}function De(a){for(var n=1;n<arguments.length;n++){var f=arguments[n]!=null?arguments[n]:{};n%2?Be(Object(f),!0).forEach(function(l){hi(a,l,f[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(f)):Be(Object(f)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(f,l))})}return a}function hi(a,n,f){return(n=gi(n))in a?Object.defineProperty(a,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):a[n]=f,a}function gi(a){var n=vi(a,"string");return typeof n=="symbol"?n:n+""}function vi(a,n){if(typeof a!="object"||!a)return a;var f=a[Symbol.toPrimitive];if(f!==void 0){var l=f.call(a,n||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(a)}var ve=function(n){return(0,ze.jsx)("svg",De(De({},n),{},{children:(0,ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};ve.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};ve.displayName="revoke";wi=ge.default=ve;_.any.isRequired,_.any.isRequired,_.string.isRequired,_.func.isRequired,_.any,_.any,_.number;P.createContext({});const Si=new ci;qe.defaults.timeout=10*1e3;qe.create();var xi={},We={},N={},xe={},H={};H.__esModule=!0;H.joinClassNames=void 0;H.joinClassNames=function(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];return a.filter(function(f){return f}).join(" ")};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.maxHeight,d=h.color,s=h.lineSpacing,w=s===void 0?"0.7em":s,u=h.style,e={maxHeight:c,width:"100%",height:"1em",backgroundColor:d,marginTop:w};return f.createElement("div",{className:l.joinClassNames("text-row",x),style:n(n({},e),u)})};a.default=E})(xe);var ye={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.style,d=h.color,s={backgroundColor:d,borderRadius:"500rem",width:"100%",height:"100%"};return f.createElement("div",{className:l.joinClassNames("round-shape",x),style:n(n({},s),c)})};a.default=E})(ye);var Fe={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.style,d=h.color,s={backgroundColor:d,width:"100%",height:"100%",marginRight:10};return f.createElement("div",{className:l.joinClassNames("rect-shape",x),style:n(n({},s),c)})};a.default=E})(Fe);var ke={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(d){for(var s,w=1,u=arguments.length;w<u;w++){s=arguments[w];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[e]=s[e])}return d},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=xe,E=H,h={width:"100%"},x=[97,100,94,90,98,95,98,40],c=function(d){var s=d.rows,w=d.lineSpacing,u=d.color,e=d.style,r=d.className,i=d.widths,t=i===void 0?x:i,o=function(T){return{maxHeight:100/(s*2-1)+"%",width:t[(T+t.length)%t.length]+"%"}};return f.createElement("div",{className:E.joinClassNames("text-block",r),style:n(n({},h),e)},Array.apply(null,Array(s)).map(function(T,I){return f.createElement(l.default,{color:u,style:o(I),lineSpacing:I!==0?w:0,key:I})}))};a.default=c})(ke);var Ve={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(d){for(var s,w=1,u=arguments.length;w<u;w++){s=arguments[w];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[e]=s[e])}return d},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=ke,E=ye,h=H,x={display:"flex"},c=function(d){var s=d.className,w=d.style,u=d.color,e=d.rows;return f.createElement("div",{className:h.joinClassNames("media-block",s),style:n(n({},x),w)},f.createElement(E.default,{color:u,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),f.createElement(l.default,{color:u,rows:e}))};a.default=c})(Ve);N.__esModule=!0;N.media=N.text=N.rect=N.round=N.textRow=N.MediaBlock=N.TextBlock=N.RectShape=N.RoundShape=N.TextRow=void 0;var Ye=xe;N.TextRow=Ye.default;var Ge=ye;N.RoundShape=Ge.default;var Ke=Fe;N.RectShape=Ke.default;var Xe=ke;N.TextBlock=Xe.default;var Ze=Ve;N.MediaBlock=Ze.default;N.textRow=Ye.default;N.round=Ge.default;N.rect=Ke.default;N.text=Xe.default;N.media=Ze.default;(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(c){for(var d,s=1,w=arguments.length;s<w;s++){d=arguments[s];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c[u]=d[u])}return c},n.apply(this,arguments)},f=M&&M.__rest||function(c,d){var s={};for(var w in c)Object.prototype.hasOwnProperty.call(c,w)&&d.indexOf(w)<0&&(s[w]=c[w]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,w=Object.getOwnPropertySymbols(c);u<w.length;u++)d.indexOf(w[u])<0&&Object.prototype.propertyIsEnumerable.call(c,w[u])&&(s[w[u]]=c[w[u]]);return s};a.__esModule=!0;var l=P,E=N,h=H,x=function(c){var d=c.delay,s=d===void 0?0:d,w=c.type,u=w===void 0?"text":w,e=c.color,r=e===void 0?"#CDCDCD":e,i=c.rows,t=i===void 0?3:i,o=c.ready,T=c.firstLaunchOnly,I=c.children,m=c.className,b=c.showLoadingAnimation,O=c.customPlaceholder,A=f(c,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),C=l.useState(o),W=C[0],F=C[1],z=l.useRef(null),$=function(){var K=b?h.joinClassNames("show-loading-animation",m):m;if(O&&l.isValidElement(O)){var q=h.joinClassNames(O.props.className,K);return l.cloneElement(O,{className:q})}else if(O)return O;var Y=E[u];return l.createElement(Y,n({},A,{color:r,rows:t,className:K}))};return l.useEffect(function(){!T&&W&&!o?s&&s>0?z.current=window.setTimeout(function(){F(!1)},s):F(!1):o&&(z.current&&window.clearTimeout(z.current),W||F(!0))},[T,W,o,s]),l.useEffect(function(){return function(){z.current&&window.clearTimeout(z.current)}},[]),W?I:$()};a.default=x})(We);(function(a){a.__esModule=!0;var n=We;a.default=n.default})(xi);Ue(S)`
|
|
2
2
|
.selected-container {
|
|
3
3
|
position: absolute;
|
|
4
4
|
right: 0px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,G as y,P as s,n as b,m as p,t as k,r as x,N as h,Q as u,l as v,p as B,o as R}from"./index-
|
|
1
|
+
import{j as e,G as y,P as s,n as b,m as p,t as k,r as x,N as h,Q as u,l as v,p as B,o as R}from"./index-CX-CBC_8.js";import{D as U}from"./index-C7FHl3UZ.js";import{u as L}from"./blocklet-CP5f1QgL.js";import{C as N,M as C}from"./memory-rY7rc2Pr.js";import{B as D}from"./bundle-avatar-I8HkXJpE.js";import"./FilterList-DOSX0qYn.js";import"./useThemeProps-DCfy4AlW.js";import"./Select-DPQiNjEZ.js";import"./Delete-DyfYh5Dp.js";import"./InputLabel-CZjkqwQE.js";import"./TextField-CK1WkVgK.js";import"./LastPage-BgqTQGsQ.js";import"./index-CtwmcOKA.js";import"./redux-CiOMdG2L.js";import"./Search-DvHspZGZ.js";import"./index-bVh0eo8P.js";import"./MoreVert-s_b5pzH1.js";import"./chart-DYC16wN7.js";function g({blocklet:r,cpuHistory:i,memoryHistory:n,...m}){const l=r.appRuntimeInfo||{};return e.jsx(M,{component:"div",...m,children:e.jsxs(y,{className:"page-metrics",container:!0,spacing:5,children:[e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!i.length&&e.jsx(N,{currentLoad:l.cpuUsage||0,history:i,style:{height:150}})},"cpu"),e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&e.jsx(C,{used:l.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}g.propTypes={blocklet:s.object.isRequired,cpuHistory:s.arrayOf(s.shape({date:s.number,value:s.number})),memoryHistory:s.arrayOf(s.shape({date:s.number,value:s.number}))};g.defaultProps={cpuHistory:[],memoryHistory:[]};const M=b(p)``;function P(){const{t:r,locale:i}=k(),{blocklet:n,runtimeHistory:m,actions:{refreshBlocklet:l}}=L(),a=x.useMemo(()=>{const t=[];return h.forEachBlockletSync(n,(o,{ancestors:f,id:d,level:c})=>{o.runtimeInfo&&t.push({type:"blocklet",groupId:n.meta.did,groupName:h.getDisplayName(n),id:d,name:h.getDisplayName(o,!0),blocklet:n,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:f})}),t},[n]);x.useEffect(()=>{const t=setInterval(()=>{l()},1e4);return()=>{clearInterval(t)}},[]);const I=t=>B(Number(t||0),{locale:R(i)}),j=[{label:r("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:f,level:d,ancestors:c}=a[t];return e.jsxs(u,{display:"flex",alignItems:"center",pl:d*2,children:[e.jsx(D,{size:14,blocklet:f,ancestors:c}),e.jsx(u,{ml:1,children:o})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return I(o.uptime)}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return v((o==null?void 0:o.memoryUsage)||0)}}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return e.jsxs(H,{component:"div",children:[e.jsx(p,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:r("analytics.trend")}),n.status==="running"?[e.jsx(u,{children:e.jsx(g,{blocklet:n,cpuHistory:m.cpu,memoryHistory:m.memory})}),e.jsx(u,{mt:3,children:e.jsx(U,{title:r("analytics.detail"),className:"monitor-table",locale:i,data:a,columns:j,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:e.jsx(p,{children:r("blocklet.runtimeInfo.noRunning")})]})}P.propTypes={};const H=b(p)``;export{P as default};
|