@abtnode/webapp 1.16.30-beta-b80c7bcd → 1.16.30-beta-2876881d
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-wtQA2ZlL.js → Add-Dm7UdGMO.js} +1 -1
- package/dist/assets/{ArrowDropDown-DLWl_p0N.js → ArrowDropDown-Dhxyxf8P.js} +1 -1
- package/dist/assets/{Autocomplete-Dnkd64Wi.js → Autocomplete-DbjuEcJc.js} +1 -1
- package/dist/assets/{Breadcrumbs-D4ea4-FL.js → Breadcrumbs-zbuG9F1t.js} +1 -1
- package/dist/assets/{ButtonGroup-CKsGmaV8.js → ButtonGroup-DFb7hc3N.js} +1 -1
- package/dist/assets/{CheckCircle-WTAM8bmQ.js → CheckCircle-w523LUfy.js} +1 -1
- package/dist/assets/{ChevronLeft-DEIRDYQy.js → ChevronLeft-DKilrXcl.js} +1 -1
- package/dist/assets/{ChevronRight-3Wbh2VmX.js → ChevronRight-Ck2pJ53x.js} +1 -1
- package/dist/assets/{Close-WqzMlBXk.js → Close-GdYjDgtS.js} +1 -1
- package/dist/assets/{Delete-CVvUxXTo.js → Delete-DAbDwewn.js} +1 -1
- package/dist/assets/DeleteOutline-nDXYkTkC.js +1 -0
- package/dist/assets/{Done-C_20Dj1B.js → Done-CO1x4xXs.js} +1 -1
- package/dist/assets/{Edit-B8IOsGBQ.js → Edit-BjYWOGNd.js} +1 -1
- package/dist/assets/{EditIcon-1Sw_lvrr.js → EditIcon-KJqshA0X.js} +1 -1
- package/dist/assets/{ExpandMore-BuFKoIy8.js → ExpandMore-Cq8xyHBp.js} +1 -1
- package/dist/assets/{FilterList-DU29t5Rh.js → FilterList-LzSA9lp1.js} +4 -4
- package/dist/assets/{Https-BrXLpCq7.js → Https-DQ0VY-Zl.js} +1 -1
- package/dist/assets/{InputAdornment-CBm3j7qJ.js → InputAdornment-B6_Xggjz.js} +1 -1
- package/dist/assets/{InputLabel-DGjNXmhb.js → InputLabel-hGLRSUVj.js} +1 -1
- package/dist/assets/{LastPage-D7jYkSXP.js → LastPage-BSomuocQ.js} +1 -1
- package/dist/assets/{Launch-pwuEfLe0.js → Launch-Dwo1hHQx.js} +1 -1
- package/dist/assets/{Link-Caa-Lj-e.js → Link-DT09sYPL.js} +1 -1
- package/dist/assets/{LoadingButton-D8MnQhjv.js → LoadingButton-dM0ZqHQb.js} +1 -1
- package/dist/assets/{LockIcon-DYDk77yr.js → LockIcon-CXYqKWpT.js} +1 -1
- package/dist/assets/{Loop-VqbACrj0.js → Loop-fX6hg0CY.js} +1 -1
- package/dist/assets/{MoreVert-CIO_fCp7.js → MoreVert-B_ttDoGP.js} +1 -1
- package/dist/assets/{Pagination-xPZr3lgt.js → Pagination-DsySx-AR.js} +1 -1
- package/dist/assets/{Public-BOTHpXrp.js → Public-CGJCXHxD.js} +1 -1
- package/dist/assets/{SchemaReference.es-CZ0kwPzq.js → SchemaReference.es-4Hse8Dck.js} +1 -1
- package/dist/assets/{Search-iD41xnVp.js → Search-DkvGGbdo.js} +1 -1
- package/dist/assets/{Select-BU4slk93.js → Select-DfLcTPPw.js} +1 -1
- package/dist/assets/{Skeleton-DkxBY5NG.js → Skeleton-Blk9FJbM.js} +1 -1
- package/dist/assets/{Slider-BJk80rWq.js → Slider-CiaHZh2P.js} +1 -1
- package/dist/assets/{Stepper-BNgDMfgX.js → Stepper-DTxGaX7e.js} +1 -1
- package/dist/assets/{TextField-yBvzonI-.js → TextField-BWuX6Gtq.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-DQe_fa2x.js → ToggleButtonGroup-Ci96oZn-.js} +1 -1
- package/dist/assets/{ViewList-DwwOKAgl.js → ViewList-Cr_f4cOa.js} +1 -1
- package/dist/assets/actions-Bd8707fo.js +11 -0
- package/dist/assets/{actions-DPXuo2Sk.js → actions-z_0knrxb.js} +1 -1
- package/dist/assets/{agreement-CJMP5aXs.js → agreement-DcfLPbYM.js} +7 -7
- package/dist/assets/api-D4IkMHot.js +1 -0
- package/dist/assets/app-avatar-DbmhsPmy.js +1 -0
- package/dist/assets/audit-logs-D1XM0WpE.js +58 -0
- package/dist/assets/blocklet-XuJIbMyM.js +1 -0
- package/dist/assets/{brace-fold.es-BTxg_wLJ.js → brace-fold.es-BTYe34_x.js} +1 -1
- package/dist/assets/bundle-avatar-DtGs2mWp.js +1 -0
- package/dist/assets/chart-BqHdcNMo.js +35 -0
- package/dist/assets/{click-to-copy-CQlkjzsa.js → click-to-copy-BPBp5hpL.js} +1 -1
- package/dist/assets/{closebrackets.es-DPsqlFyD.js → closebrackets.es-DFBb0519.js} +1 -1
- package/dist/assets/{codemirror.es-Fi2mxexE.js → codemirror.es-B2YEfOp1.js} +1 -1
- package/dist/assets/{comment.es-a1UeEacQ.js → comment.es-CDX4BYk8.js} +1 -1
- package/dist/assets/{config-navigation-CmHsrCmV.js → config-navigation-DjtOP8BE.js} +5 -5
- package/dist/assets/{delete-confirm-B-iThtVd.js → delete-confirm-BBsZKDlp.js} +1 -1
- package/dist/assets/{detail-BZAl_KQr.js → detail-CU5kLSxd.js} +3 -3
- package/dist/assets/{dialog.es-C8uMW18p.js → dialog.es-DPOqqKYS.js} +1 -1
- package/dist/assets/{download-0KSPw-JF.js → download-AsVB0WzT.js} +1 -1
- package/dist/assets/{foldgutter.es-BUJpwqXC.js → foldgutter.es-CD4p2LEe.js} +1 -1
- package/dist/assets/getValidReactChildren-j3luDnz8.js +1 -0
- package/dist/assets/{hint.es-ivkwMGk0.js → hint.es-BDJ76gbD.js} +1 -1
- package/dist/assets/{hint.es2-DfGVTJs_.js → hint.es2-admBPNyI.js} +1 -1
- package/dist/assets/{iframe-DqWFTUQo.js → iframe-XQV1HWhH.js} +1 -1
- package/dist/assets/{index-DeziVCjK.js → index-4GrmpyhO.js} +2 -2
- package/dist/assets/{index-CN89lWuF.js → index-5SK2trFY.js} +1 -1
- package/dist/assets/{index-CbQbr6SU.js → index-A4KGVGVv.js} +11 -11
- package/dist/assets/{index-CQtPM3HN.js → index-ARGpBTmv.js} +1 -1
- package/dist/assets/{index-DgGfQyfN.js → index-B7feKnal.js} +3 -3
- package/dist/assets/{index-CBGbDmoJ.js → index-B89KUtLC.js} +1 -1
- package/dist/assets/{index-6oQCk-n_.js → index-BBcEf-Ju.js} +2 -2
- package/dist/assets/index-BH7rBwDG.js +11 -0
- package/dist/assets/{index-DZu4EBvJ.js → index-BJ1go2ml.js} +1 -1
- package/dist/assets/{index-BEJkhJjB.js → index-BO1nDkRj.js} +13 -13
- package/dist/assets/index-BR5jHBS3.js +21 -0
- package/dist/assets/{index-B86s5aQp.js → index-BTVDhe8g.js} +1 -1
- package/dist/assets/{index-Dcg7ITZC.js → index-BXEUU9im.js} +3 -3
- package/dist/assets/{index-Cv_ekVrg.js → index-Ba9MvGxx.js} +1 -1
- package/dist/assets/{index-CzvJHAp2.js → index-Bc93He6x.js} +1 -1
- package/dist/assets/index-BgcmgXUa.js +54 -0
- package/dist/assets/{index-Bf-5RrTA.js → index-BhDNfk_q.js} +1 -1
- package/dist/assets/{index-DNXX464I.js → index-BvYED14L.js} +1 -1
- package/dist/assets/{index-DUl5mJh-.js → index-C1vBjdFx.js} +1 -1
- package/dist/assets/{index-C3UBi-Js.js → index-CAwTBDuj.js} +1 -1
- package/dist/assets/{index-1ESl_Uuq.js → index-COxjgI-I.js} +2 -2
- package/dist/assets/{index-C8_XBKZH.js → index-CRRBf2t0.js} +28 -28
- package/dist/assets/{index-epzVNiXu.js → index-CbFUjQO-.js} +1 -1
- package/dist/assets/{index-_x8JUAAM.js → index-Ccaa89FV.js} +1 -1
- package/dist/assets/{index-DcUSYRm8.js → index-Chipn4bv.js} +1 -1
- package/dist/assets/{index-CJNpUIzv.js → index-CiDTz_P_.js} +1 -1
- package/dist/assets/{index-C0OeZtQ5.js → index-CmDKnSzE.js} +14 -14
- package/dist/assets/{index-BBk0uWnE.js → index-CnGpafrg.js} +1 -1
- package/dist/assets/{index-CKyWT4da.js → index-Cww3vDI8.js} +2 -2
- package/dist/assets/index-D0qKeIlw.js +80 -0
- package/dist/assets/{index-NXMGx80c.js → index-DFHlwGYO.js} +1 -1
- package/dist/assets/{index-BiXyfi53.js → index-DZykNE6O.js} +1 -1
- package/dist/assets/{index-utUY9Yqh.js → index-DjURT7Rh.js} +1 -1
- package/dist/assets/{index-D3vCJ_iK.js → index-DlsKoBBn.js} +1 -1
- package/dist/assets/{index-X6j1CU0A.js → index-Dn05lUkJ.js} +1 -1
- package/dist/assets/{index-BYUV4HZG.js → index-Dt-hqt8X.js} +1 -1
- package/dist/assets/{index-15ZY8qW3.js → index-DxozhO8x.js} +1 -1
- package/dist/assets/index-IFZZJHzX.js +150 -0
- package/dist/assets/{index-C_Aaydui.js → index-OqFlXfZF.js} +1 -1
- package/dist/assets/{index-DKzn71mB.js → index-VRAnvMf7.js} +1 -1
- package/dist/assets/{index-C8uB0KC6.js → index-XBhShZN3.js} +1 -1
- package/dist/assets/{index-CV73blTb.js → index-Y2PVOGvn.js} +5 -5
- package/dist/assets/{index-DKN8qp59.js → index-_WOTLckw.js} +1 -1
- package/dist/assets/{index-B3_F8rHn.js → index-d8p7Ly1K.js} +1 -1
- package/dist/assets/{index-DOQVD8My.js → index-oSw1Q2_j.js} +5 -5
- package/dist/assets/{index.es-BT0Xv1XK.js → index.es-GX2Asw5F.js} +1 -1
- package/dist/assets/{index.esm-DD4Vggio.js → index.esm-Brebvtfp.js} +1 -1
- package/dist/assets/{info-addon.es-CKn9poyb.js → info-addon.es-CbXIv_Ct.js} +1 -1
- package/dist/assets/{info.es-Bex8rGCZ.js → info.es-WruJCCLB.js} +1 -1
- package/dist/assets/{install-from-url-BqIHjaWV.js → install-from-url-BhAO_138.js} +1 -1
- package/dist/assets/{invitation-CJ533J6q.js → invitation-BWaGzr9c.js} +5 -5
- package/dist/assets/{is-path-prefix-equal-BubMU6W_.js → is-path-prefix-equal-Dz7d6V3o.js} +1 -1
- package/dist/assets/{isEqual-ChPSgg_6.js → isEqual-bpHE-CsL.js} +1 -1
- package/dist/assets/{item-Bm9dS6kO.js → item-_UkeWhQa.js} +12 -12
- package/dist/assets/{javascript.es-DPdjmV68.js → javascript.es-DhtwFdCV.js} +1 -1
- package/dist/assets/{jump-to-line.es-CLUW3m-v.js → jump-to-line.es-DwQ6xO39.js} +1 -1
- package/dist/assets/{jump.es-DaexouqF.js → jump.es-DjoJLHDS.js} +1 -1
- package/dist/assets/{line-J7AIOVtu.js → line-DbFQ6-jn.js} +3 -3
- package/dist/assets/{lint.es-CKdHewU4.js → lint.es-YLLhz6t5.js} +1 -1
- package/dist/assets/{lint.es2-BjAVmGDb.js → lint.es2-DEt6vPg6.js} +1 -1
- package/dist/assets/{lint.es3-dNVJPksu.js → lint.es3-BzGrSqsE.js} +1 -1
- package/dist/assets/{list-header-C5MC2ybj.js → list-header-CUzAza3b.js} +1 -1
- package/dist/assets/{log-BEVIzfFM.js → log-_IvqtO72.js} +2 -2
- package/dist/assets/{lottie-BCvBgunA.js → lottie-D7oBfPQf.js} +1 -1
- package/dist/assets/{matchbrackets.es-Kh8zEgD-.js → matchbrackets.es-Bw-AAX6c.js} +1 -1
- package/dist/assets/{memory-D6E-mUEt.js → memory-DrO5wNHz.js} +1 -1
- package/dist/assets/{mode.es-D4w9UsR1.js → mode.es-GM4Ej7DF.js} +1 -1
- package/dist/assets/{mode.es2-DJMIeGF8.js → mode.es2-DQxPqnKR.js} +1 -1
- package/dist/assets/{mode.es3-DNta3p5B.js → mode.es3-D5eX28Q4.js} +1 -1
- package/dist/assets/{onlineParser.es-B0KkUbLa.js → onlineParser.es-DqmndBx3.js} +1 -1
- package/dist/assets/{overview-CI46gMR_.js → overview-DXJR976k.js} +2 -2
- package/dist/assets/{react-bzjNjQ_z.js → react-BwJLoWwW.js} +3 -3
- package/dist/assets/{redux-BB1V4GV1.js → redux-B7ppTFhc.js} +1 -1
- package/dist/assets/{resource-dialog-BNLF--pq.js → resource-dialog-mBOGt9Gd.js} +1 -1
- package/dist/assets/{runtime-CpxiL1K4.js → runtime-CWFJrh9J.js} +1 -1
- package/dist/assets/{schema-DzMTzQhk.js → schema-ByLPwXbx.js} +1 -1
- package/dist/assets/sdk-C-9BXd9p.js +1 -0
- package/dist/assets/{search.es-B2Zz1TPr.js → search.es-DJknIswJ.js} +1 -1
- package/dist/assets/{searchcursor.es-DihvgROc.js → searchcursor.es-BB0AMZq6.js} +1 -1
- package/dist/assets/service-D490SxxK.js +1 -0
- package/dist/assets/{shorten-label-BvidR6K3.js → shorten-label-BOzBA4zM.js} +1 -1
- package/dist/assets/{show-hint.es-D0IHmXg9.js → show-hint.es-CdHvJt2C.js} +1 -1
- package/dist/assets/{slicedToArray-BH3egbSO.js → slicedToArray-DU4rAA4G.js} +1 -1
- package/dist/assets/{spaces-BQp818hT.js → spaces-BLF_Jrv8.js} +1 -1
- package/dist/assets/{status-DS0ZTB2Q.js → status-CZkdUEuf.js} +1 -1
- package/dist/assets/{sublime.es-DetK2R2d.js → sublime.es-DTMc10_F.js} +1 -1
- package/dist/assets/{switch-control-Dx8i02OZ.js → switch-control-DWZgQdF6.js} +1 -1
- package/dist/assets/{table-icons-QptkWKog.js → table-icons--Lm88QZc.js} +12 -12
- package/dist/assets/{team-CJ9HDUk-.js → team-B0qdRzoW.js} +1 -1
- package/dist/assets/{toUpper-Pog6i3An.js → toUpper-Dbw34Ras.js} +1 -1
- package/dist/assets/{traffic-CmMIjtbN.js → traffic-uZwpbrLl.js} +1 -1
- package/dist/assets/url-evaluation-Brz4Ir30.js +1 -0
- package/dist/assets/{url-join-6hc3KTiL.js → url-join-C4CVYdSb.js} +1 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-B4mB6MKk.js +1 -0
- package/dist/assets/{useLocalStorage-38YCZmkm.js → useLocalStorage-CLwKnvrP.js} +1 -1
- package/dist/assets/{useThemeProps-BJi79JB0.js → useThemeProps-Dgbotsr7.js} +1 -1
- package/dist/assets/{util-Bomhjq_h.js → util-Yhhk8QYV.js} +1 -1
- package/dist/assets/{wait-container-C5CgyWEN.js → wait-container-an6omPu8.js} +1 -1
- package/dist/assets/{withStyles-D-laXqbP.js → withStyles-GA69SNEl.js} +1 -1
- package/dist/assets/{wrap-locale-DAesvpnq.js → wrap-locale-BC-JRsSH.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-Bz5FN4xy.js +0 -1
- package/dist/assets/DeleteOutline-_KiNRv7b.js +0 -1
- package/dist/assets/actions-OW93p5Fp.js +0 -11
- package/dist/assets/api-KtygFKB2.js +0 -1
- package/dist/assets/app-avatar-b-oHcdTJ.js +0 -1
- package/dist/assets/audit-logs-Bl3TGXN4.js +0 -58
- package/dist/assets/blocklet-Ca0Mtfj9.js +0 -1
- package/dist/assets/bundle-avatar-Cehm0jAj.js +0 -1
- package/dist/assets/chart-DVPmOLEJ.js +0 -35
- package/dist/assets/getValidReactChildren-CcN-g-ZI.js +0 -1
- package/dist/assets/index--VPjGZfZ.js +0 -80
- package/dist/assets/index-CBsRI9e3.js +0 -150
- package/dist/assets/index-D-5HHls9.js +0 -21
- package/dist/assets/index-DTJngjP2.js +0 -11
- package/dist/assets/index-ykpZ39UX.js +0 -54
- package/dist/assets/sdk-Dyo8K6wI.js +0 -1
- package/dist/assets/service-Clay2pph.js +0 -1
- package/dist/assets/url-evaluation-BkY3CXhO.js +0 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-h9AFAS4I.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o}from"./codemirror.es-
|
|
1
|
+
import{C as o}from"./codemirror.es-B2YEfOp1.js";import{_ as t,$ as i,a1 as l}from"./index-oSw1Q2_j.js";import{o as c}from"./onlineParser.es-DqmndBx3.js";import"./index-Cww3vDI8.js";var d=Object.defineProperty,b=(e,r)=>d(e,"name",{value:r,configurable:!0});o.defineMode("graphql-results",e=>{const r=c({eatWhitespace:n=>n.eatSpace(),lexRules:p,parseRules:m,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:r.startState,token:r.token,indent:s,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});function s(e,r){var n,u;const a=e.levels;return((!a||a.length===0?e.indentLevel:a[a.length-1]-(!((n=this.electricInput)===null||n===void 0)&&n.test(r)?1:0))||0)*(((u=this.config)===null||u===void 0?void 0:u.indentUnit)||0)}b(s,"indent");const p={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},m={Document:[t("{"),i("Entry",t(",")),t("}")],Entry:[l("String","def"),t(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[l("Number","number")],StringValue:[l("String","string")],BooleanValue:[l("Keyword","builtin")],NullValue:[l("Keyword","keyword")],ListValue:[t("["),i("Value",t(",")),t("]")],ObjectValue:[t("{"),i("ObjectField",t(",")),t("}")],ObjectField:[l("String","property"),t(":"),"Value"]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as b}from"./codemirror.es-
|
|
1
|
+
import{C as b}from"./codemirror.es-B2YEfOp1.js";import{_ as t,$ as i,a0 as s,a1 as n}from"./index-oSw1Q2_j.js";import{o as m}from"./onlineParser.es-DqmndBx3.js";import"./index-Cww3vDI8.js";var p=Object.defineProperty,c=(e,a)=>p(e,"name",{value:a,configurable:!0});b.defineMode("graphql-variables",e=>{const a=m({eatWhitespace:r=>r.eatSpace(),lexRules:V,parseRules:v,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:d,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});function d(e,a){var r,u;const l=e.levels;return((!l||l.length===0?e.indentLevel:l[l.length-1]-(!((r=this.electricInput)===null||r===void 0)&&r.test(a)?1:0))||0)*(((u=this.config)===null||u===void 0?void 0:u.indentUnit)||0)}c(d,"indent");const V={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},v={Document:[t("{"),i("Variable",s(t(","))),t("}")],Variable:[o("variable"),t(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[n("Number","number")],StringValue:[n("String","string")],BooleanValue:[n("Keyword","builtin")],NullValue:[n("Keyword","keyword")],ListValue:[t("["),i("Value",s(t(","))),t("]")],ObjectValue:[t("{"),i("ObjectField",s(t(","))),t("}")],ObjectField:[o("attribute"),t(":"),"Value"]};function o(e){return{style:e,match:a=>a.kind==="String",update(a,r){a.name=r.value.slice(1,-1)}}}c(o,"namedKey");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as t,s as L,L as A,P}from"./index-
|
|
1
|
+
import{K as t,s as L,L as A,P}from"./index-oSw1Q2_j.js";var b=Object.defineProperty,o=(e,n)=>b(e,"name",{value:n,configurable:!0});function w(e={eatWhitespace:n=>n.eatWhile(L),lexRules:A,parseRules:P,editorConfig:{}}){return{startState(){const n={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return f(e.parseRules,n,t.DOCUMENT),n},token(n,l){return h(n,l,e)}}}o(w,"onlineParser");function h(e,n,l){var i;if(n.inBlockstring)return e.match(/.*"""/)?(n.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:p,parseRules:y,eatWhitespace:m,editorConfig:v}=l;if(n.rule&&n.rule.length===0?d(n):n.needsAdvance&&(n.needsAdvance=!1,c(n,!0)),e.sol()){const r=(v==null?void 0:v.tabSize)||2;n.indentLevel=Math.floor(e.indentation()/r)}if(m(e))return"ws";const u=k(p,e);if(!u)return e.match(/\S+/)||e.match(/\s/),f(a,n,"Invalid"),"invalidchar";if(u.kind==="Comment")return f(a,n,"Comment"),"comment";const R=s({},n);if(u.kind==="Punctuation"){if(/^[{([]/.test(u.value))n.indentLevel!==void 0&&(n.levels=(n.levels||[]).concat(n.indentLevel+1));else if(/^[})\]]/.test(u.value)){const r=n.levels=(n.levels||[]).slice(0,-1);n.indentLevel&&r.length>0&&r[r.length-1]<n.indentLevel&&(n.indentLevel=r[r.length-1])}}for(;n.rule;){let r=typeof n.rule=="function"?n.step===0?n.rule(u,e):null:n.rule[n.step];if(n.needsSeparator&&(r=r==null?void 0:r.separator),r){if(r.ofRule&&(r=r.ofRule),typeof r=="string"){f(y,n,r);continue}if(!((i=r.match)===null||i===void 0)&&i.call(r,u))return r.update&&r.update(n,u),u.kind==="Punctuation"?c(n,!0):n.needsAdvance=!0,r.style}g(n)}return s(n,R),f(a,n,"Invalid"),"invalidchar"}o(h,"getToken");function s(e,n){const l=Object.keys(n);for(let i=0;i<l.length;i++)e[l[i]]=n[l[i]];return e}o(s,"assign");const a={Invalid:[],Comment:[]};function f(e,n,l){if(!e[l])throw new TypeError("Unknown rule: "+l);n.prevState=Object.assign({},n),n.kind=l,n.name=null,n.type=null,n.rule=e[l],n.step=0,n.needsSeparator=!1}o(f,"pushRule");function d(e){e.prevState&&(e.kind=e.prevState.kind,e.name=e.prevState.name,e.type=e.prevState.type,e.rule=e.prevState.rule,e.step=e.prevState.step,e.needsSeparator=e.prevState.needsSeparator,e.prevState=e.prevState.prevState)}o(d,"popRule");function c(e,n){var l;if(S(e)&&e.rule){const i=e.rule[e.step];if(i.separator){const p=i.separator;if(e.needsSeparator=!e.needsSeparator,!e.needsSeparator&&p.ofRule)return}if(n)return}for(e.needsSeparator=!1,e.step++;e.rule&&!(Array.isArray(e.rule)&&e.step<e.rule.length);)d(e),e.rule&&(S(e)?!((l=e.rule)===null||l===void 0)&&l[e.step].separator&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}o(c,"advanceRule");function S(e){const n=Array.isArray(e.rule)&&typeof e.rule[e.step]!="string"&&e.rule[e.step];return n&&n.isList}o(S,"isList");function g(e){for(;e.rule&&!(Array.isArray(e.rule)&&e.rule[e.step].ofRule);)d(e);e.rule&&c(e,!1)}o(g,"unsuccessful");function k(e,n){const l=Object.keys(e);for(let i=0;i<l.length;i++){const p=n.match(e[l[i]]);if(p&&p instanceof Array)return{kind:l[i],value:p[0]}}}o(k,"lex");export{w as o};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as le,aL as ce,j as e,ai as K,H as de,gz as dt,g as Fe,gA as mt,gB as ut,gC as pt,gD as ft,gE as ht,X as xt,P as i,aW as ze,q as E,r as w,bl as O,e as gt,b as ke,J as Me,ax as N,C as U,ac as G,A as B,v as me,gF as Be,gG as jt,gH as yt,O as f,m as T,gI as Oe,aU as vt,V as Ee,i as Dt,x as bt,av as Ct,ds as Pe,c8 as We,S as Ue,B as H,aQ as wt,aD as St,a8 as It,b1 as He,b2 as Ve,b3 as Ke,k as At,b4 as _e,b0 as Tt,bG as Qe,n as Ge,cb as Rt,gJ as Je,b5 as kt,gK as Et,M as Q,a2 as Pt,W as M,fM as te,gL as _t,cD as Lt,at as qt,T as Nt}from"./index-CKyWT4da.js";import{K as $t}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{I as Ye}from"./index-15ZY8qW3.js";import{u as ue}from"./blocklet-Ca0Mtfj9.js";import{D as Le,B as Ft}from"./status-DS0ZTB2Q.js";import{d as zt}from"./Add-wtQA2ZlL.js";import{d as Mt}from"./ExpandMore-BuFKoIy8.js";import{p as qe,b as Bt}from"./util-Bomhjq_h.js";import{d as Ot}from"./LockIcon-DYDk77yr.js";import{E as Wt}from"./index-1ESl_Uuq.js";import{d as Ut,a as Ze}from"./Https-BrXLpCq7.js";import{d as Ht}from"./is-path-prefix-equal-BubMU6W_.js";import{r as Vt}from"./index-DKzn71mB.js";import"./api-KtygFKB2.js";import{T as Kt}from"./TextField-yBvzonI-.js";import{L as Qt}from"./LoadingButton-D8MnQhjv.js";import{d as Xe}from"./Delete-CVvUxXTo.js";import{A as Gt}from"./actions-DPXuo2Sk.js";import"./url-evaluation-BkY3CXhO.js";import"./Select-BU4slk93.js";import"./InputLabel-DGjNXmhb.js";import"./useThemeProps-BJi79JB0.js";var pe={},Jt=ce;Object.defineProperty(pe,"__esModule",{value:!0});var et=pe.default=void 0,Yt=Jt(le()),Zt=e;et=pe.default=(0,Yt.default)((0,Zt.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew");function Xt({key:n="sm"}){const t=K();return de(t.breakpoints.down(n))}const en={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},tn=en;var nn=dt;function on(n,t){for(var r=-1,s=n.length;++r<s&&nn(t,n[r],0)>-1;);return r}var sn=on,rn=mt,an=ut,ln=pt,cn=ft,dn=sn,Ne=ht,mn=xt;function un(n,t,r){if(n=mn(n),n&&(r||t===void 0))return an(n);if(!n||!(t=rn(t)))return n;var s=Ne(n),a=Ne(t),l=dn(s,a),o=cn(s,a)+1;return ln(s,l,o).join("")}var pn=un;const fe=Fe(pn);var he={},fn=ce;Object.defineProperty(he,"__esModule",{value:!0});var ie=he.default=void 0,hn=fn(le()),xn=e;ie=he.default=(0,hn.default)((0,xn.jsx)("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond");var xe={},gn=ce;Object.defineProperty(xe,"__esModule",{value:!0});var tt=xe.default=void 0,jn=gn(le()),yn=e;tt=xe.default=(0,jn.default)((0,yn.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");const vn=n=>["waiting","creating","renewaling"].includes(n);function ge(n){var y,C;const{t}=E(),[r,s]=w.useState(!1),{inService:a}=O(),[l,o]=w.useState(null),{siteId:c,domain:d,onAdd:u,children:x,did:v}=n,[P,j]=w.useState(!1),{api:S,ws:{useSubscription:R}}=O(),{mode:k,actions:{refreshDomainStatus:p}}=ue(),D=gt(async()=>{const{cert:g}=await S.findCertificateByDomain({input:{domain:d,did:v}});return g}),I=(g,L)=>{g.domain===d&&(j(!1),s(!1),a&&k!=="setup"&&(L==="success"?B.success(t("setup.domain.genCertSuccess",{domain:g.domain})):L==="error"&&B.error(t("setup.domain.genCertFailed",{domain:g.domain,message:g.message}))))};if(w.useEffect(()=>{var g;D.loading||j(vn((g=D.value)==null?void 0:g.status))},[D.loading,(y=D.value)==null?void 0:y.status]),R(ke.BlockletEvents.certError,g=>I(g,"error")),R(ke.BlockletEvents.certIssued,g=>{D.retry(),p(g.domain),I(g,"success")}),D.loading||((C=D.value)==null?void 0:C.status)==="normal")return"";const b=()=>{s(!1),o(null)},m=async()=>{s(!0);try{await S.issueLetsEncryptCert({input:{siteId:c,domain:d,did:v,inBlockletSetup:k==="setup"}}),u(),j(!0)}catch(g){console.error(g),j(!1)}finally{s(!1),o(null)}},_={title:t("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(Me,{severity:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:m,onCancel:b},W=g=>{g.stopPropagation(),o(_)};return e.jsxs(e.Fragment,{children:[P?e.jsx(N,{title:t("router.cert.issuing"),children:e.jsx(U,{size:12})}):x({loading:r,open:W}),l&&e.jsx(G,{color:"primary",title:l.title,description:l.description,confirm:l.confirm,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}ge.propTypes={domain:i.string.isRequired,did:i.string.isRequired,siteId:i.string.isRequired,onAdd:i.func,children:i.any};ge.defaultProps={onAdd:()=>{},children:null};function je(n){const{domain:t,domainStatus:r,...s}=n;return!ze(t)||r!=null&&r.isHttps?"":e.jsx(ge,{domain:t,...s})}je.propTypes={domain:i.string.isRequired,domainStatus:i.shape({isHttps:i.bool}).isRequired,did:i.string.isRequired,onAdd:i.func,children:i.any};je.defaultProps={onAdd:()=>{},children:null};const nt=w.createContext({}),{Provider:Dn,Consumer:ai}=nt;function bn({children:n}){const[t,r]=me({domain:"",error:null}),{locale:s}=E(),a={error:t.error,domain:t.domain,setError:l=>{r({error:l})},setDomain:l=>{const o=fe(l),c=Be(o,s);r({domain:o,error:c})}};return e.jsx(Dn,{value:{value:a},children:n})}function Cn(){const{value:n}=w.useContext(nt);return n}const{joinURL:$e}=jt,wn=yt,it="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Sn=async n=>{var c;if(!n||!(n!=null&&n.trim()))return null;const t=new URL(n);t.pathname="__blocklet__.js",t.searchParams.set("type","json");const{data:r}=await wn.get(t.toString()),s=(c=r==null?void 0:r.componentMountPoints)==null?void 0:c.find(d=>d.did===it),a=new URL(n);a.pathname=s==null?void 0:s.mountPoint;const l=a.toString(),o=$e(l,"/api");return{base:l,api:o,domain:$e(o,"/domains")}};var In={DID_DOMAIN_SERVICE_DID:it,getDidDomainServiceURL:Sn},J={exports:{}};const An=Vt,Tn=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class ot extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const Rn=(n,t,r)=>{const s=r.retries-(t-1);return n.attemptNumber=t,n.retriesLeft=s,n},kn=n=>Tn.includes(n),st=(n,t)=>new Promise((r,s)=>{t={onFailedAttempt:()=>{},retries:10,...t};const a=An.operation(t);a.attempt(async l=>{try{r(await n(l))}catch(o){if(!(o instanceof Error)){s(new TypeError(`Non-error was thrown: "${o}". You should only throw errors.`));return}if(o instanceof ot)a.stop(),s(o.originalError);else if(o instanceof TypeError&&!kn(o.message))a.stop(),s(o);else{Rn(o,l,t);try{await t.onFailedAttempt(o)}catch(c){s(c);return}a.retry(o)||s(a.mainError())}}})});J.exports=st;J.exports.default=st;J.exports.AbortError=ot;var En=J.exports;const Pn=Fe(En);function ye({domain:n,resolvedTarget:t,...r}){const{t:s,locale:a}=E();return e.jsxs(f,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...r,children:[e.jsxs(f,{display:"flex",children:[s("router.domain.setup.tipStart"),n&&e.jsx(f,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),s("router.domain.setup.tipEnd"),":"]}),e.jsxs(f,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[e.jsx(oe,{label:s("router.domain.setup.recordType"),value:"CNAME",locale:a}),e.jsx(oe,{label:s("router.domain.setup.recordValue"),value:t,locale:a})]})]})}ye.propTypes={domain:i.string,resolvedTarget:i.string.isRequired};ye.defaultProps={domain:""};function oe({locale:n,label:t,value:r}){const s=de(l=>l.breakpoints.down("md")),a=K();return e.jsx(Ye,{name:t,nameWidth:120,children:e.jsxs(f,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(T,{component:"span",color:"primary.main",overflow:"auto",sx:s?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:r}),e.jsx(Oe,{content:r,locale:n,style:{marginLeft:"4px",color:a.palette.text.secondary}})]})})}oe.propTypes={locale:i.string.isRequired,label:i.string.isRequired,value:i.string.isRequired};function ve({siteId:n,teamDid:t,cnameDomain:r,defaultCustomDomain:s,onInputDomain:a,appId:l,appPk:o,onSuccess:c,onError:d,disabled:u,autoFocus:x,inBlockletSetup:v,shouldCheckDomain:P,onStateChange:j,currentIp:S,resolveDomain:R,...k}){const{t:p,locale:D}=E(),{api:I,info:b}=O(),m=Cn(),_=K(),W=Xt({key:"sm"}),[y,C]=me({submittingDomain:!1,domain:s,error:null,type:b!=null&&b.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1}),g=vt(()=>In.getDidDomainServiceURL(b==null?void 0:b.nftDomainUrl));if(b!=null&&b.nftDomainUrl&&g.loading)return e.jsx(f,{...k,children:e.jsx(Ee,{relative:"parent",children:e.jsx(U,{})})});if(g.error)return e.jsx(f,{...k,children:e.jsx(Ee,{relative:"parent",children:g.error.message})});const L=g.value,rt=()=>{C({invalidDNSDomain:null})},X=async h=>{j(p("setup.domain.addingDomain")),await I.addDomainAlias({input:{id:n,domainAlias:h,teamDid:t,inBlockletSetup:!0}}),C({submittingDomain:!1}),c({domain:h,type:"inputDomain"})},Ie=async({domain:h,type:A,nftDid:z,chainHost:q})=>{try{if(!P){if(A==="inputDomain"){await X(h);return}c({domain:h,type:A,nftDid:z,chainHost:q});return}j({text:p("setup.domain.checkingResolvable")});let $=30;const ee=3e3,ct=$*1e3/ee,Te=setInterval(()=>{if($<=0){clearInterval(Te);return}j({text:`${p("setup.domain.checkingResolvable")} (${$--}s)`})},1e3),Re=await Pn(async()=>{const{data:F}=await R(h);if(!F.address)throw new Error("Cannot resolve domain");return F.address},{retries:ct,minTimeout:ee,maxTimeout:ee,onFailedAttempt:console.error}).catch(console.error);if(clearInterval(Te),!Re){const F=p("setup.domain.cannotResolve",{domain:h});if(A==="nftDomain"){B.error(F),c({domain:h,type:"nftDomain"});return}j({text:""}),C({invalidDNSDomain:{domain:h,error:F},domain:h,type:A,submittingDomain:!1});return}if(Re!==S){const F=p("setup.domain.resolvedAddressError",{domain:h,curDomain:window.location.hostname});if(A==="nftDomain"){B.error(F),c({domain:h,type:"nftDomain"});return}j({text:""}),C({invalidDNSDomain:{domain:h,error:F},domain:h,type:A,submittingDomain:!1});return}if(A==="nftDomain"){c({domain:h,type:"nftDomain"});return}await X(h)}catch($){B.error($.message),j({text:""}),C({submittingDomain:!1})}},at=async({domain:h,nftDid:A,chainHost:z})=>{try{const q=qe(h);C({submittingDomain:!0}),await I.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:q,nftDid:A,chainHost:z,teamDid:t,inBlockletSetup:v}});const $="nftDomain";C({showNFTDomainAuth:!1,type:$}),await Ie({domain:q,type:$,nftDid:A,chainHost:z})}catch(q){B.error(q.message)}finally{C({showNFTDomainAuth:!1,submittingDomain:!1})}},lt=async()=>{try{C({submittingDomain:!0});const h=qe(y.domain);if(b.nftDomainUrl&&L&&(await I.isDidDomain({input:{domain:h}})).value===!0){C({showNFTDomainAuth:!0});return}await Ie({domain:h,type:y.type})}catch(h){C({submittingDomain:!1}),m.setError(h.message)}},Ae=m.error||y.error;return e.jsx(f,{...k,children:e.jsxs(f,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(f,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[b.nftDomainUrl&&L&&e.jsxs(f,{sx:{color:_.palette.text.primary},children:[e.jsx(T,{children:p("router.domainAlias.addDomainNFT.tips")}),e.jsxs(T,{component:"div",children:[p("router.domainAlias.addDomainNFT.buyTip"),e.jsxs(Dt,{href:L.base,sx:{display:"inline-flex",alignItems:"center"},target:"_blank",children:[e.jsx("i",{children:p("router.domainAlias.addDomainNFT.buy")}),e.jsx(et,{fontSize:"small"})]})]})]}),e.jsx(Kt,{sx:{display:"block",marginTop:"8px"},label:p("router.domainAlias.add.domainDescription"),helperText:y.type==="inputDomain"&&Ae||p("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:u,value:y.domain,size:"small",variant:"outlined",error:!!Ae&&y.type==="inputDomain",onChange:h=>{var q;const A=fe((q=h.target)==null?void 0:q.value);m.setDomain(A);const z=Be(A,D);C({domain:A,error:z,type:"inputDomain"}),a({domain:A,error:z,type:"inputDomain"})},autoFocus:x,onBlur:()=>{m.domain||(C({error:null}),m.setError(null))}}),e.jsx(f,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(Qt,{"data-cy":"confirm-add-domain",fullWidth:W,variant:"contained",loading:y.submittingDomain,onClick:lt,children:p("common.add")})}),e.jsxs(f,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:_.palette.primary.main},onClick:()=>C({showDnsTip:!y.showDnsTip}),children:[e.jsx(Ht,{fontSize:"1em"}),p("router.domainAlias.showTipHint")]}),y.showDnsTip&&e.jsx(ye,{domain:y.domain,resolvedTarget:r,style:{marginTop:"4px"}})]}),y.invalidDNSDomain&&e.jsx(G,{title:p("common.reminder"),description:p("setup.domain.invalidDNSReminder",{error:y.invalidDNSDomain.error}),color:"primary",confirm:p("setup.domain.continueAdd"),onConfirm:()=>X(y.invalidDNSDomain.domain,y.type),onCancel:rt}),L&&e.jsx(bt,{open:y.showNFTDomainAuth,popup:!0,useSocket:!1,action:"authorize",baseUrl:L.api,checkFn:Ct.create({baseURL:L.api}).get,extraParams:{delegatee:l,delegateePk:o,domain:y.domain},onSuccess:at,onClose:()=>C({showNFTDomainAuth:!1,submittingDomain:!1}),checkTimeout:60*5e3,showDownload:!1,messages:{title:p("router.domainAlias.addDomainNFT.connect.title"),scan:p("router.domainAlias.addDomainNFT.connect.scan"),confirm:p("router.domainAlias.addDomainNFT.connect.confirm"),success:p("router.domainAlias.addDomainNFT.connect.success")}})]})})}ve.propTypes={siteId:i.string.isRequired,currentIp:i.string,teamDid:i.string.isRequired,cnameDomain:i.string.isRequired,defaultCustomDomain:i.string,onInputDomain:i.func,onSuccess:i.func,appId:i.string,appPk:i.string,disabled:i.bool,autoFocus:i.bool,inBlockletSetup:i.bool,shouldCheckDomain:i.bool,onStateChange:i.func,resolveDomain:i.func,onError:i.func};ve.defaultProps={defaultCustomDomain:"",currentIp:"",onInputDomain:Pe,onSuccess:Pe,appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1,shouldCheckDomain:!1,onStateChange:()=>{},resolveDomain:()=>{},onError:()=>{}};function De({id:n,children:t,title:r,teamDid:s,systemDomains:a,appId:l,appPk:o}){const{t:c}=E(),[d,u]=me({loading:!1,confirmSetting:null}),x=a.find(S=>We.isDidDomain(S)),v=()=>{u({loading:!1,confirmSetting:null})},P={title:r||c("router.domainAlias.add.title"),description:function(R,k,p){return e.jsx(ve,{siteId:n,teamDid:s,cnameDomain:x,onSuccess:()=>u({confirmSetting:null}),onInputDomain:({domain:D,type:I,error:b})=>{k({...R,domain:D,type:I,__disableConfirm:!!b}),p(b)},appId:l,appPk:o})},confirm:c("common.confirm"),cancel:c("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:v},j=S=>{S.stopPropagation(),u({confirmSetting:P})};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:d.loading,open:j}):e.jsxs(Ue,{onClick:j,className:"rule-action","data-cy":"action-add-domain-alias",children:[d.loading?e.jsx(U,{size:16}):e.jsx(Ut,{style:{fontSize:18,marginRight:5}}),c("router.domainAlias.add.title")]}),d.confirmSetting&&e.jsx(G,{title:d.confirmSetting.title,description:d.confirmSetting.description,confirm:d.confirmSetting.confirm,cancel:d.confirmSetting.cancel,params:d.confirmSetting.params,onCancel:d.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:d.loading,maxWidth:"sm"})]})}De.propTypes={id:i.string.isRequired,children:i.any,title:i.string,teamDid:i.string,systemDomains:i.arrayOf(i.string).isRequired,appId:i.string,appPk:i.string.isRequired};De.defaultProps={children:null,title:"",teamDid:"",appId:null};function _n(n){return e.jsx(bn,{children:e.jsx(De,{...n})})}function be(n){const{t}=E(),[r,s]=w.useState(!1),[a,l]=w.useState(null),{id:o,domain:c,children:d,teamDid:u}=n,{api:x}=O(),v=()=>{s(!1),l(null)},P=async()=>{s(!0);try{await x.deleteDomainAlias({input:{id:o,domainAlias:c,teamDid:u}}),await wt(2e3)}catch(R){B.error(R.message)}finally{l(null),s(!1)}},j={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:P,onCancel:v},S=R=>{R.stopPropagation(),l(j)};return e.jsxs(e.Fragment,{children:[typeof d=="function"?d({loading:r,open:S}):e.jsxs(H,{edge:"end",onClick:S,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[r?e.jsx(U,{size:16}):e.jsx(Xe,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),a&&e.jsx(G,{title:a.title,description:a.description,confirm:a.confirm,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}be.propTypes={id:i.string.isRequired,domain:i.string.isRequired,children:i.any,teamDid:i.string};be.defaultProps={children:null,teamDid:""};function Ce({site:n,domain:t,blocklet:r}){const{t:s}=E(),a=t.value===window.location.hostname;return e.jsx(Gt,{"data-cy":"domain-actions",size:"large",actions:[({close:l})=>{var o;return e.jsx(be,{id:n.id,domain:t.value,teamDid:(o=r==null?void 0:r.meta)==null?void 0:o.did,children:({open:c})=>e.jsx(N,{title:a?s("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(Ue,{disabled:t.isProtected||a,dense:!0,onClick:d=>{l(),c(d)},"data-cy":"action-toggle-block",children:[e.jsx(St,{style:{minWidth:24,marginRight:8},children:e.jsx(Xe,{})}),e.jsx(It,{primary:s("common.delete")})]},"remove")})})})}]})}Ce.propTypes={site:i.object.isRequired,domain:i.object.isRequired,blocklet:i.object.isRequired};Ce.defaultProps={};const Y=i.shape({href:i.string,accessibility:i.shape({loading:i.bool,accessible:i.bool}),domainStatus:i.shape({isHttps:i.bool,matchedCert:i.object}),dns:i.shape({resolved:i.bool,ip:i.string})});function we({certificate:n}){const[t,r]=w.useState(null),s=O(),{t:a,locale:l}=E(),o=u=>{r(u.currentTarget)},c=()=>{r(null)},d=!!t;return e.jsxs(e.Fragment,{children:[e.jsx(Ze,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:o,onMouseLeave:c,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),e.jsx(He,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:c,disableRestoreFocus:!0,children:e.jsx(Ve,{children:e.jsxs(Ke,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${s.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(T,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(T,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(T,{component:"div",children:`${a("common.issuer")}: ${At(n,"issuer.commonName","")}`}),e.jsx(T,{component:"div",children:`${a("router.cert.issuedOn")}: ${_e(n.validFrom,l)}`}),e.jsx(T,{component:"div",children:`${a("router.cert.expiryOn")}: ${_e(n.validTo,l)}`})]})]})})})]})}we.propTypes={certificate:i.object};we.defaultProps={certificate:{}};function V({domain:n,filters:t}){const{t:r}=E(),{value:s,domainStatus:a}=n;if(!ze(s))return null;let l=null,o=null;const{isHttps:c,matchedCert:d}=a;if(!Tt(s)){const{dns:{resolved:x,ip:v}={}}=a;x||v==="127.0.0.1"?l=e.jsx(N,{title:r("router.domain.verify.ok"),children:e.jsx(Le,{color:"success"})}):l=e.jsx(N,{title:r("router.domain.verify.notResolved"),children:e.jsx(Le,{color:"error"})})}c?o=e.jsx(we,{certificate:d}):o=e.jsx(N,{title:r("router.domain.https.bad"),children:e.jsx(Ze,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const u=t.map(x=>x==="domain"?l:x==="http"?o:null);return w.createElement(w.Fragment,null,...u)}V.propTypes={domain:Y.isRequired,filters:i.array};V.defaultProps={filters:["domain","http"]};const Ln=Qe(Z,"mutate_blocklets"),qn=Qe(Z,"",Rt);function Se(n){const{inService:t}=O(),{blocklet:r,loadingRuntimeInfo:s}=ue();let a=Ln;return t&&(a=qn),e.jsx(a,{...n,blocklet:r,inService:t,loadingRuntimeInfo:s})}Se.propTypes={listOnly:i.bool};Se.defaultProps={listOnly:!1};function Z({hasPermission:n,blocklet:t,loadingRuntimeInfo:r,inService:s,listOnly:a}){var p,D,I,b;const{t:l}=E(),[o,c]=w.useState(!1),d=de(m=>m.breakpoints.down("md")),u=w.useMemo(()=>{let m=n;return Je(t)&&(m=m&&s),m},[n,s,t]),{site:x}=t,v=w.useMemo(()=>{var m;return kt((m=t.site)==null?void 0:m.domainAliases)},[(p=t.site)==null?void 0:p.domainAliases]),P=[],j=[],S=Bt.encode(t.appPid),R=(I=(D=t.environments)==null?void 0:D.find(m=>m.key==="BLOCKLET_APP_PK"))==null?void 0:I.value,k=Et(v);return v.forEach(m=>{const _=m.value||"";We.isDidDomain(_)&&!_.startsWith(S)?j.push(m):P.push(m)}),e.jsxs(e.Fragment,{children:[!a&&e.jsxs(e.Fragment,{children:[e.jsxs(f,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(f,{children:l("common.domain")}),u&&e.jsx(_n,{id:x.id,title:l("router.domain.add.title"),teamDid:(b=t.meta)==null?void 0:b.did,appId:t.appPid,appPk:R,systemDomains:k==null?void 0:k.map(m=>m.value),children:({open:m})=>e.jsxs(H,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:m,disabled:Q.isInProgress(t.status),children:[e.jsx(zt,{style:{fontSize:"1.3em",marginRight:4}}),l("common.add")]})})]}),Q.isAccessible(t.status)===!1&&e.jsx(f,{mt:1.5,mb:1.5,children:e.jsx(Me,{severity:"warning",children:l("blocklet.router.noRunning")})})]}),e.jsx(f,{sx:{display:"flex",flexDirection:"column",gap:1},children:(o?v:P).map(m=>{var W,y;const _=m.value;return e.jsxs(w.Fragment,{children:[d&&e.jsxs(f,{display:"flex",flexDirection:"column",children:[e.jsx(f,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:e.jsx(se,{domain:m,target:"_blank",children:m.value})}),e.jsxs(f,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[e.jsx(V,{domain:m,filters:["domain"]},`${m.value}-domain`),e.jsx(ae,{siteId:(W=t.site)==null?void 0:W.id,domain:m,blocklet:t,hasMutatePermission:u})]}),e.jsx(f,{sx:{button:{padding:0}},children:e.jsx(re,{hasMutatePermission:u,site:x,domain:m,blocklet:t})})]})]},_),!d&&e.jsxs(f,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(f,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[e.jsx(V,{domain:m,filters:["domain"]},`${m.value}-domain`),e.jsx(f,{sx:{ml:2,mr:.5},children:e.jsx(se,{domain:m,target:"_blank",children:m.value})}),e.jsx(ae,{siteId:(y=t.site)==null?void 0:y.id,domain:m,blocklet:t,hasMutatePermission:u})]}),e.jsx(f,{sx:{button:{padding:0}},children:e.jsx(re,{hasMutatePermission:u,site:x,domain:m,blocklet:t})})]},_)]},_)})}),j.length>0&&e.jsx("div",{style:{marginLeft:"20px",marginTop:"12px"},children:e.jsx(H,{endIcon:o?e.jsx(tt,{}):e.jsx(Mt,{}),onClick:()=>c(!o),children:l(o?"common.collapseAll":"blocklet.router.showAllDomains")})}),!v.length&&(r?e.jsx(U,{size:16}):e.jsx(Wt,{children:l("common.empty")}))]})}Z.propTypes={hasPermission:i.bool,blocklet:i.object.isRequired,loadingRuntimeInfo:i.bool,inService:i.bool.isRequired,listOnly:i.bool};Z.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1};function se({domain:n,children:t,...r}){const{t:s,locale:a}=E(),{href:l,accessibility:o,value:c}=n,d=w.useCallback(()=>e.jsx(Oe,{content:fe(c),locale:a,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}),[c,a]);return!o||o.loading?e.jsxs(ne,{...r,children:[t,d(),e.jsx(N,{title:s("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx("span",{className:"status",children:e.jsx(U,{size:12})})})]}):o.accessible?e.jsxs(ne,{...r,children:[e.jsx(f,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",children:t}),d()]}):e.jsxs(ne,{...r,children:[e.jsx(N,{title:s("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx("span",{children:t})}),d()]})}se.propTypes={domain:Y.isRequired,children:i.any.isRequired};const ne=Ge.span`
|
|
1
|
+
import{aK as le,aL as ce,j as e,ai as K,J as de,gz as dt,g as Fe,gA as mt,gB as ut,gC as pt,gD as ft,gE as ht,Y as xt,P as i,aW as ze,t as E,r as w,bl as O,e as gt,b as ke,K as Me,ax as N,C as U,ac as G,E as B,w as me,gF as Be,gG as yt,gH as jt,Q as f,m as T,gI as Oe,aU as vt,X as Ee,i as Dt,y as bt,av as Ct,ds as Pe,c8 as We,U as Ue,B as H,aQ as wt,aD as St,a8 as It,b1 as He,b2 as Ve,b3 as Ke,k as At,b4 as _e,b0 as Tt,bG as Qe,n as Ge,cb as Rt,gJ as Ye,b5 as kt,gK as Et,N as Q,a2 as Pt,W as M,fM as te,gL as _t,cD as Lt,at as qt,T as Nt}from"./index-Cww3vDI8.js";import{K as $t}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{I as Je}from"./index-DxozhO8x.js";import{u as ue}from"./blocklet-XuJIbMyM.js";import{D as Le,B as Ft}from"./status-CZkdUEuf.js";import{d as zt}from"./Add-Dm7UdGMO.js";import{d as Mt}from"./ExpandMore-Cq8xyHBp.js";import{p as qe,b as Bt}from"./util-Yhhk8QYV.js";import{d as Ot}from"./LockIcon-CXYqKWpT.js";import{E as Wt}from"./index-COxjgI-I.js";import{d as Ut,a as Ze}from"./Https-DQ0VY-Zl.js";import{d as Ht}from"./is-path-prefix-equal-Dz7d6V3o.js";import{r as Vt}from"./index-VRAnvMf7.js";import"./api-D4IkMHot.js";import{T as Kt}from"./TextField-BWuX6Gtq.js";import{L as Qt}from"./LoadingButton-dM0ZqHQb.js";import{d as Xe}from"./Delete-DAbDwewn.js";import{A as Gt}from"./actions-z_0knrxb.js";import"./url-evaluation-Brz4Ir30.js";import"./Select-DfLcTPPw.js";import"./InputLabel-hGLRSUVj.js";import"./useThemeProps-Dgbotsr7.js";var pe={},Yt=ce;Object.defineProperty(pe,"__esModule",{value:!0});var et=pe.default=void 0,Jt=Yt(le()),Zt=e;et=pe.default=(0,Jt.default)((0,Zt.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew");function Xt({key:n="sm"}){const t=K();return de(t.breakpoints.down(n))}const en={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},tn=en;var nn=dt;function on(n,t){for(var r=-1,s=n.length;++r<s&&nn(t,n[r],0)>-1;);return r}var sn=on,rn=mt,an=ut,ln=pt,cn=ft,dn=sn,Ne=ht,mn=xt;function un(n,t,r){if(n=mn(n),n&&(r||t===void 0))return an(n);if(!n||!(t=rn(t)))return n;var s=Ne(n),a=Ne(t),l=dn(s,a),o=cn(s,a)+1;return ln(s,l,o).join("")}var pn=un;const fe=Fe(pn);var he={},fn=ce;Object.defineProperty(he,"__esModule",{value:!0});var ie=he.default=void 0,hn=fn(le()),xn=e;ie=he.default=(0,hn.default)((0,xn.jsx)("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond");var xe={},gn=ce;Object.defineProperty(xe,"__esModule",{value:!0});var tt=xe.default=void 0,yn=gn(le()),jn=e;tt=xe.default=(0,yn.default)((0,jn.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");const vn=n=>["waiting","creating","renewaling"].includes(n);function ge(n){var j,C;const{t}=E(),[r,s]=w.useState(!1),{inService:a}=O(),[l,o]=w.useState(null),{siteId:c,domain:d,onAdd:u,children:x,did:v}=n,[P,y]=w.useState(!1),{api:S,ws:{useSubscription:R}}=O(),{mode:k,actions:{refreshDomainStatus:p}}=ue(),D=gt(async()=>{const{cert:g}=await S.findCertificateByDomain({input:{domain:d,did:v}});return g}),I=(g,L)=>{g.domain===d&&(y(!1),s(!1),a&&k!=="setup"&&(L==="success"?B.success(t("setup.domain.genCertSuccess",{domain:g.domain})):L==="error"&&B.error(t("setup.domain.genCertFailed",{domain:g.domain,message:g.message}))))};if(w.useEffect(()=>{var g;D.loading||y(vn((g=D.value)==null?void 0:g.status))},[D.loading,(j=D.value)==null?void 0:j.status]),R(ke.BlockletEvents.certError,g=>I(g,"error")),R(ke.BlockletEvents.certIssued,g=>{D.retry(),p(g.domain),I(g,"success")}),D.loading||((C=D.value)==null?void 0:C.status)==="normal")return"";const b=()=>{s(!1),o(null)},m=async()=>{s(!0);try{await S.issueLetsEncryptCert({input:{siteId:c,domain:d,did:v,inBlockletSetup:k==="setup"}}),u(),y(!0)}catch(g){console.error(g),y(!1)}finally{s(!1),o(null)}},_={title:t("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(Me,{severity:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:m,onCancel:b},W=g=>{g.stopPropagation(),o(_)};return e.jsxs(e.Fragment,{children:[P?e.jsx(N,{title:t("router.cert.issuing"),children:e.jsx(U,{size:12})}):x({loading:r,open:W}),l&&e.jsx(G,{color:"primary",title:l.title,description:l.description,confirm:l.confirm,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}ge.propTypes={domain:i.string.isRequired,did:i.string.isRequired,siteId:i.string.isRequired,onAdd:i.func,children:i.any};ge.defaultProps={onAdd:()=>{},children:null};function ye(n){const{domain:t,domainStatus:r,...s}=n;return!ze(t)||r!=null&&r.isHttps?"":e.jsx(ge,{domain:t,...s})}ye.propTypes={domain:i.string.isRequired,domainStatus:i.shape({isHttps:i.bool}).isRequired,did:i.string.isRequired,onAdd:i.func,children:i.any};ye.defaultProps={onAdd:()=>{},children:null};const nt=w.createContext({}),{Provider:Dn,Consumer:ai}=nt;function bn({children:n}){const[t,r]=me({domain:"",error:null}),{locale:s}=E(),a={error:t.error,domain:t.domain,setError:l=>{r({error:l})},setDomain:l=>{const o=fe(l),c=Be(o,s);r({domain:o,error:c})}};return e.jsx(Dn,{value:{value:a},children:n})}function Cn(){const{value:n}=w.useContext(nt);return n}const{joinURL:$e}=yt,wn=jt,it="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Sn=async n=>{var c;if(!n||!(n!=null&&n.trim()))return null;const t=new URL(n);t.pathname="__blocklet__.js",t.searchParams.set("type","json");const{data:r}=await wn.get(t.toString()),s=(c=r==null?void 0:r.componentMountPoints)==null?void 0:c.find(d=>d.did===it),a=new URL(n);a.pathname=s==null?void 0:s.mountPoint;const l=a.toString(),o=$e(l,"/api");return{base:l,api:o,domain:$e(o,"/domains")}};var In={DID_DOMAIN_SERVICE_DID:it,getDidDomainServiceURL:Sn},Y={exports:{}};const An=Vt,Tn=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class ot extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const Rn=(n,t,r)=>{const s=r.retries-(t-1);return n.attemptNumber=t,n.retriesLeft=s,n},kn=n=>Tn.includes(n),st=(n,t)=>new Promise((r,s)=>{t={onFailedAttempt:()=>{},retries:10,...t};const a=An.operation(t);a.attempt(async l=>{try{r(await n(l))}catch(o){if(!(o instanceof Error)){s(new TypeError(`Non-error was thrown: "${o}". You should only throw errors.`));return}if(o instanceof ot)a.stop(),s(o.originalError);else if(o instanceof TypeError&&!kn(o.message))a.stop(),s(o);else{Rn(o,l,t);try{await t.onFailedAttempt(o)}catch(c){s(c);return}a.retry(o)||s(a.mainError())}}})});Y.exports=st;Y.exports.default=st;Y.exports.AbortError=ot;var En=Y.exports;const Pn=Fe(En);function je({domain:n,resolvedTarget:t,...r}){const{t:s,locale:a}=E();return e.jsxs(f,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...r,children:[e.jsxs(f,{display:"flex",children:[s("router.domain.setup.tipStart"),n&&e.jsx(f,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),s("router.domain.setup.tipEnd"),":"]}),e.jsxs(f,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[e.jsx(oe,{label:s("router.domain.setup.recordType"),value:"CNAME",locale:a}),e.jsx(oe,{label:s("router.domain.setup.recordValue"),value:t,locale:a})]})]})}je.propTypes={domain:i.string,resolvedTarget:i.string.isRequired};je.defaultProps={domain:""};function oe({locale:n,label:t,value:r}){const s=de(l=>l.breakpoints.down("md")),a=K();return e.jsx(Je,{name:t,nameWidth:120,children:e.jsxs(f,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(T,{component:"span",color:"primary.main",overflow:"auto",sx:s?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:r}),e.jsx(Oe,{content:r,locale:n,style:{marginLeft:"4px",color:a.palette.text.secondary}})]})})}oe.propTypes={locale:i.string.isRequired,label:i.string.isRequired,value:i.string.isRequired};function ve({siteId:n,teamDid:t,cnameDomain:r,defaultCustomDomain:s,onInputDomain:a,appId:l,appPk:o,onSuccess:c,onError:d,disabled:u,autoFocus:x,inBlockletSetup:v,shouldCheckDomain:P,onStateChange:y,currentIp:S,resolveDomain:R,...k}){const{t:p,locale:D}=E(),{api:I,info:b}=O(),m=Cn(),_=K(),W=Xt({key:"sm"}),[j,C]=me({submittingDomain:!1,domain:s,error:null,type:b!=null&&b.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1}),g=vt(()=>In.getDidDomainServiceURL(b==null?void 0:b.nftDomainUrl));if(b!=null&&b.nftDomainUrl&&g.loading)return e.jsx(f,{...k,children:e.jsx(Ee,{relative:"parent",children:e.jsx(U,{})})});if(g.error)return e.jsx(f,{...k,children:e.jsx(Ee,{relative:"parent",children:g.error.message})});const L=g.value,rt=()=>{C({invalidDNSDomain:null})},X=async h=>{y(p("setup.domain.addingDomain")),await I.addDomainAlias({input:{id:n,domainAlias:h,teamDid:t,inBlockletSetup:!0}}),C({submittingDomain:!1}),c({domain:h,type:"inputDomain"})},Ie=async({domain:h,type:A,nftDid:z,chainHost:q})=>{try{if(!P){if(A==="inputDomain"){await X(h);return}c({domain:h,type:A,nftDid:z,chainHost:q});return}y({text:p("setup.domain.checkingResolvable")});let $=30;const ee=3e3,ct=$*1e3/ee,Te=setInterval(()=>{if($<=0){clearInterval(Te);return}y({text:`${p("setup.domain.checkingResolvable")} (${$--}s)`})},1e3),Re=await Pn(async()=>{const{data:F}=await R(h);if(!F.address)throw new Error("Cannot resolve domain");return F.address},{retries:ct,minTimeout:ee,maxTimeout:ee,onFailedAttempt:console.error}).catch(console.error);if(clearInterval(Te),!Re){const F=p("setup.domain.cannotResolve",{domain:h});if(A==="nftDomain"){B.error(F),c({domain:h,type:"nftDomain"});return}y({text:""}),C({invalidDNSDomain:{domain:h,error:F},domain:h,type:A,submittingDomain:!1});return}if(Re!==S){const F=p("setup.domain.resolvedAddressError",{domain:h,curDomain:window.location.hostname});if(A==="nftDomain"){B.error(F),c({domain:h,type:"nftDomain"});return}y({text:""}),C({invalidDNSDomain:{domain:h,error:F},domain:h,type:A,submittingDomain:!1});return}if(A==="nftDomain"){c({domain:h,type:"nftDomain"});return}await X(h)}catch($){B.error($.message),y({text:""}),C({submittingDomain:!1})}},at=async({domain:h,nftDid:A,chainHost:z})=>{try{const q=qe(h);C({submittingDomain:!0}),await I.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:q,nftDid:A,chainHost:z,teamDid:t,inBlockletSetup:v}});const $="nftDomain";C({showNFTDomainAuth:!1,type:$}),await Ie({domain:q,type:$,nftDid:A,chainHost:z})}catch(q){B.error(q.message)}finally{C({showNFTDomainAuth:!1,submittingDomain:!1})}},lt=async()=>{try{C({submittingDomain:!0});const h=qe(j.domain);if(b.nftDomainUrl&&L&&(await I.isDidDomain({input:{domain:h}})).value===!0){C({showNFTDomainAuth:!0});return}await Ie({domain:h,type:j.type})}catch(h){C({submittingDomain:!1}),m.setError(h.message)}},Ae=m.error||j.error;return e.jsx(f,{...k,children:e.jsxs(f,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(f,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[b.nftDomainUrl&&L&&e.jsxs(f,{sx:{color:_.palette.text.primary},children:[e.jsx(T,{children:p("router.domainAlias.addDomainNFT.tips")}),e.jsxs(T,{component:"div",children:[p("router.domainAlias.addDomainNFT.buyTip"),e.jsxs(Dt,{href:L.base,sx:{display:"inline-flex",alignItems:"center"},target:"_blank",children:[e.jsx("i",{children:p("router.domainAlias.addDomainNFT.buy")}),e.jsx(et,{fontSize:"small"})]})]})]}),e.jsx(Kt,{sx:{display:"block",marginTop:"8px"},label:p("router.domainAlias.add.domainDescription"),helperText:j.type==="inputDomain"&&Ae||p("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:u,value:j.domain,size:"small",variant:"outlined",error:!!Ae&&j.type==="inputDomain",onChange:h=>{var q;const A=fe((q=h.target)==null?void 0:q.value);m.setDomain(A);const z=Be(A,D);C({domain:A,error:z,type:"inputDomain"}),a({domain:A,error:z,type:"inputDomain"})},autoFocus:x,onBlur:()=>{m.domain||(C({error:null}),m.setError(null))}}),e.jsx(f,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(Qt,{"data-cy":"confirm-add-domain",fullWidth:W,variant:"contained",loading:j.submittingDomain,onClick:lt,children:p("common.add")})}),e.jsxs(f,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:_.palette.primary.main},onClick:()=>C({showDnsTip:!j.showDnsTip}),children:[e.jsx(Ht,{fontSize:"1em"}),p("router.domainAlias.showTipHint")]}),j.showDnsTip&&e.jsx(je,{domain:j.domain,resolvedTarget:r,style:{marginTop:"4px"}})]}),j.invalidDNSDomain&&e.jsx(G,{title:p("common.reminder"),description:p("setup.domain.invalidDNSReminder",{error:j.invalidDNSDomain.error}),color:"primary",confirm:p("setup.domain.continueAdd"),onConfirm:()=>X(j.invalidDNSDomain.domain,j.type),onCancel:rt}),L&&e.jsx(bt,{open:j.showNFTDomainAuth,popup:!0,useSocket:!1,action:"authorize",baseUrl:L.api,checkFn:Ct.create({baseURL:L.api}).get,extraParams:{delegatee:l,delegateePk:o,domain:j.domain},onSuccess:at,onClose:()=>C({showNFTDomainAuth:!1,submittingDomain:!1}),checkTimeout:60*5e3,showDownload:!1,messages:{title:p("router.domainAlias.addDomainNFT.connect.title"),scan:p("router.domainAlias.addDomainNFT.connect.scan"),confirm:p("router.domainAlias.addDomainNFT.connect.confirm"),success:p("router.domainAlias.addDomainNFT.connect.success")}})]})})}ve.propTypes={siteId:i.string.isRequired,currentIp:i.string,teamDid:i.string.isRequired,cnameDomain:i.string.isRequired,defaultCustomDomain:i.string,onInputDomain:i.func,onSuccess:i.func,appId:i.string,appPk:i.string,disabled:i.bool,autoFocus:i.bool,inBlockletSetup:i.bool,shouldCheckDomain:i.bool,onStateChange:i.func,resolveDomain:i.func,onError:i.func};ve.defaultProps={defaultCustomDomain:"",currentIp:"",onInputDomain:Pe,onSuccess:Pe,appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1,shouldCheckDomain:!1,onStateChange:()=>{},resolveDomain:()=>{},onError:()=>{}};function De({id:n,children:t,title:r,teamDid:s,systemDomains:a,appId:l,appPk:o}){const{t:c}=E(),[d,u]=me({loading:!1,confirmSetting:null}),x=a.find(S=>We.isDidDomain(S)),v=()=>{u({loading:!1,confirmSetting:null})},P={title:r||c("router.domainAlias.add.title"),description:function(R,k,p){return e.jsx(ve,{siteId:n,teamDid:s,cnameDomain:x,onSuccess:()=>u({confirmSetting:null}),onInputDomain:({domain:D,type:I,error:b})=>{k({...R,domain:D,type:I,__disableConfirm:!!b}),p(b)},appId:l,appPk:o})},confirm:c("common.confirm"),cancel:c("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:v},y=S=>{S.stopPropagation(),u({confirmSetting:P})};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:d.loading,open:y}):e.jsxs(Ue,{onClick:y,className:"rule-action","data-cy":"action-add-domain-alias",children:[d.loading?e.jsx(U,{size:16}):e.jsx(Ut,{style:{fontSize:18,marginRight:5}}),c("router.domainAlias.add.title")]}),d.confirmSetting&&e.jsx(G,{title:d.confirmSetting.title,description:d.confirmSetting.description,confirm:d.confirmSetting.confirm,cancel:d.confirmSetting.cancel,params:d.confirmSetting.params,onCancel:d.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:d.loading,maxWidth:"sm"})]})}De.propTypes={id:i.string.isRequired,children:i.any,title:i.string,teamDid:i.string,systemDomains:i.arrayOf(i.string).isRequired,appId:i.string,appPk:i.string.isRequired};De.defaultProps={children:null,title:"",teamDid:"",appId:null};function _n(n){return e.jsx(bn,{children:e.jsx(De,{...n})})}function be(n){const{t}=E(),[r,s]=w.useState(!1),[a,l]=w.useState(null),{id:o,domain:c,children:d,teamDid:u}=n,{api:x}=O(),v=()=>{s(!1),l(null)},P=async()=>{s(!0);try{await x.deleteDomainAlias({input:{id:o,domainAlias:c,teamDid:u}}),await wt(2e3)}catch(R){B.error(R.message)}finally{l(null),s(!1)}},y={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:P,onCancel:v},S=R=>{R.stopPropagation(),l(y)};return e.jsxs(e.Fragment,{children:[typeof d=="function"?d({loading:r,open:S}):e.jsxs(H,{edge:"end",onClick:S,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[r?e.jsx(U,{size:16}):e.jsx(Xe,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),a&&e.jsx(G,{title:a.title,description:a.description,confirm:a.confirm,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}be.propTypes={id:i.string.isRequired,domain:i.string.isRequired,children:i.any,teamDid:i.string};be.defaultProps={children:null,teamDid:""};function Ce({site:n,domain:t,blocklet:r}){const{t:s}=E(),a=t.value===window.location.hostname;return e.jsx(Gt,{"data-cy":"domain-actions",size:"large",actions:[({close:l})=>{var o;return e.jsx(be,{id:n.id,domain:t.value,teamDid:(o=r==null?void 0:r.meta)==null?void 0:o.did,children:({open:c})=>e.jsx(N,{title:a?s("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(Ue,{disabled:t.isProtected||a,dense:!0,onClick:d=>{l(),c(d)},"data-cy":"action-toggle-block",children:[e.jsx(St,{style:{minWidth:24,marginRight:8},children:e.jsx(Xe,{})}),e.jsx(It,{primary:s("common.delete")})]},"remove")})})})}]})}Ce.propTypes={site:i.object.isRequired,domain:i.object.isRequired,blocklet:i.object.isRequired};Ce.defaultProps={};const J=i.shape({href:i.string,accessibility:i.shape({loading:i.bool,accessible:i.bool}),domainStatus:i.shape({isHttps:i.bool,matchedCert:i.object}),dns:i.shape({resolved:i.bool,ip:i.string})});function we({certificate:n}){const[t,r]=w.useState(null),s=O(),{t:a,locale:l}=E(),o=u=>{r(u.currentTarget)},c=()=>{r(null)},d=!!t;return e.jsxs(e.Fragment,{children:[e.jsx(Ze,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:o,onMouseLeave:c,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),e.jsx(He,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:c,disableRestoreFocus:!0,children:e.jsx(Ve,{children:e.jsxs(Ke,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${s.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(T,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(T,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(T,{component:"div",children:`${a("common.issuer")}: ${At(n,"issuer.commonName","")}`}),e.jsx(T,{component:"div",children:`${a("router.cert.issuedOn")}: ${_e(n.validFrom,l)}`}),e.jsx(T,{component:"div",children:`${a("router.cert.expiryOn")}: ${_e(n.validTo,l)}`})]})]})})})]})}we.propTypes={certificate:i.object};we.defaultProps={certificate:{}};function V({domain:n,filters:t}){const{t:r}=E(),{value:s,domainStatus:a}=n;if(!ze(s))return null;let l=null,o=null;const{isHttps:c,matchedCert:d}=a;if(!Tt(s)){const{dns:{resolved:x,ip:v}={}}=a;x||v==="127.0.0.1"?l=e.jsx(N,{title:r("router.domain.verify.ok"),children:e.jsx(Le,{color:"success"})}):l=e.jsx(N,{title:r("router.domain.verify.notResolved"),children:e.jsx(Le,{color:"error"})})}c?o=e.jsx(we,{certificate:d}):o=e.jsx(N,{title:r("router.domain.https.bad"),children:e.jsx(Ze,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const u=t.map(x=>x==="domain"?l:x==="http"?o:null);return w.createElement(w.Fragment,null,...u)}V.propTypes={domain:J.isRequired,filters:i.array};V.defaultProps={filters:["domain","http"]};const Ln=Qe(Z,"mutate_blocklets"),qn=Qe(Z,"",Rt);function Se(n){const{inService:t}=O(),{blocklet:r,loadingRuntimeInfo:s}=ue();let a=Ln;return t&&(a=qn),e.jsx(a,{...n,blocklet:r,inService:t,loadingRuntimeInfo:s})}Se.propTypes={listOnly:i.bool};Se.defaultProps={listOnly:!1};function Z({hasPermission:n,blocklet:t,loadingRuntimeInfo:r,inService:s,listOnly:a}){var p,D,I,b;const{t:l}=E(),[o,c]=w.useState(!1),d=de(m=>m.breakpoints.down("md")),u=w.useMemo(()=>{let m=n;return Ye(t)&&(m=m&&s),m},[n,s,t]),{site:x}=t,v=w.useMemo(()=>{var m;return kt((m=t.site)==null?void 0:m.domainAliases)},[(p=t.site)==null?void 0:p.domainAliases]),P=[],y=[],S=Bt.encode(t.appPid),R=(I=(D=t.environments)==null?void 0:D.find(m=>m.key==="BLOCKLET_APP_PK"))==null?void 0:I.value,k=Et(v);return v.forEach(m=>{const _=m.value||"";We.isDidDomain(_)&&!_.startsWith(S)?y.push(m):P.push(m)}),e.jsxs(e.Fragment,{children:[!a&&e.jsxs(e.Fragment,{children:[e.jsxs(f,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(f,{children:l("common.domain")}),u&&e.jsx(_n,{id:x.id,title:l("router.domain.add.title"),teamDid:(b=t.meta)==null?void 0:b.did,appId:t.appPid,appPk:R,systemDomains:k==null?void 0:k.map(m=>m.value),children:({open:m})=>e.jsxs(H,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:m,disabled:Q.isInProgress(t.status),children:[e.jsx(zt,{style:{fontSize:"1.3em",marginRight:4}}),l("common.add")]})})]}),Q.isAccessible(t.status)===!1&&e.jsx(f,{mt:1.5,mb:1.5,children:e.jsx(Me,{severity:"warning",children:l("blocklet.router.noRunning")})})]}),e.jsx(f,{sx:{display:"flex",flexDirection:"column",gap:1},children:(o?v:P).map(m=>{var W,j;const _=m.value;return e.jsxs(w.Fragment,{children:[d&&e.jsxs(f,{display:"flex",flexDirection:"column",children:[e.jsx(f,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:e.jsx(se,{domain:m,target:"_blank",children:m.value})}),e.jsxs(f,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[e.jsx(V,{domain:m,filters:["domain"]},`${m.value}-domain`),e.jsx(ae,{siteId:(W=t.site)==null?void 0:W.id,domain:m,blocklet:t,hasMutatePermission:u})]}),e.jsx(f,{sx:{button:{padding:0}},children:e.jsx(re,{hasMutatePermission:u,site:x,domain:m,blocklet:t})})]})]},_),!d&&e.jsxs(f,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(f,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[e.jsx(V,{domain:m,filters:["domain"]},`${m.value}-domain`),e.jsx(f,{sx:{ml:2,mr:.5},children:e.jsx(se,{domain:m,target:"_blank",children:m.value})}),e.jsx(ae,{siteId:(j=t.site)==null?void 0:j.id,domain:m,blocklet:t,hasMutatePermission:u})]}),e.jsx(f,{sx:{button:{padding:0}},children:e.jsx(re,{hasMutatePermission:u,site:x,domain:m,blocklet:t})})]},_)]},_)})}),y.length>0&&e.jsx("div",{style:{marginLeft:"20px",marginTop:"12px"},children:e.jsx(H,{endIcon:o?e.jsx(tt,{}):e.jsx(Mt,{}),onClick:()=>c(!o),children:l(o?"common.collapseAll":"blocklet.router.showAllDomains")})}),!v.length&&(r?e.jsx(U,{size:16}):e.jsx(Wt,{children:l("common.empty")}))]})}Z.propTypes={hasPermission:i.bool,blocklet:i.object.isRequired,loadingRuntimeInfo:i.bool,inService:i.bool.isRequired,listOnly:i.bool};Z.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1};function se({domain:n,children:t,...r}){const{t:s,locale:a}=E(),{href:l,accessibility:o,value:c}=n,d=w.useCallback(()=>e.jsx(Oe,{content:fe(c),locale:a,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}),[c,a]);return!o||o.loading?e.jsxs(ne,{...r,children:[t,d(),e.jsx(N,{title:s("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx("span",{className:"status",children:e.jsx(U,{size:12})})})]}):o.accessible?e.jsxs(ne,{...r,children:[e.jsx(f,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",children:t}),d()]}):e.jsxs(ne,{...r,children:[e.jsx(N,{title:s("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx("span",{children:t})}),d()]})}se.propTypes={domain:J.isRequired,children:i.any.isRequired};const ne=Ge.span`
|
|
2
2
|
&,
|
|
3
3
|
& > * {
|
|
4
4
|
color: #222;
|
|
@@ -12,7 +12,7 @@ import{aK as le,aL as ce,j as e,ai as K,H as de,gz as dt,g as Fe,gA as mt,gB as
|
|
|
12
12
|
.status {
|
|
13
13
|
margin-left: 8px;
|
|
14
14
|
}
|
|
15
|
-
`;function re({hasMutatePermission:n,site:t,domain:r,blocklet:s}){const a=K(),{t:l}=E();return n&&!r.isProtected?e.jsx(Ce,{site:t,domain:r,blocklet:s}):e.jsx(N,{title:l("blocklet.router.domainLockTooltip"),placement:"top",children:e.jsx(Pt,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0},children:e.jsx(Ot,{style:{fill:a.palette.text.disabled}})})})}re.propTypes={hasMutatePermission:i.bool.isRequired,site:i.object.isRequired,domain:
|
|
15
|
+
`;function re({hasMutatePermission:n,site:t,domain:r,blocklet:s}){const a=K(),{t:l}=E();return n&&!r.isProtected?e.jsx(Ce,{site:t,domain:r,blocklet:s}):e.jsx(N,{title:l("blocklet.router.domainLockTooltip"),placement:"top",children:e.jsx(Pt,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0},children:e.jsx(Ot,{style:{fill:a.palette.text.disabled}})})})}re.propTypes={hasMutatePermission:i.bool.isRequired,site:i.object.isRequired,domain:J.isRequired,blocklet:i.object.isRequired};function ae({siteId:n,domain:t,blocklet:r,hasMutatePermission:s}){const a=K(),{t:l}=E(),[o,c]=w.useState(null),d=x=>{c(x.currentTarget)},u=()=>{c(null)};return e.jsxs(f,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1},children:[t.type==="nft-domain"&&e.jsxs(e.Fragment,{children:[e.jsx(ie,{onMouseEnter:d,onMouseLeave:u,style:{marginTop:"0.2em",cursor:"pointer",fill:a.palette.primary.main}}),e.jsx(He,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:!!o,anchorEl:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:u,disableRestoreFocus:!0,children:e.jsx(Ve,{children:e.jsxs(Ke,{style:{display:"flex",flexDirection:"column"},children:[e.jsxs(T,{component:"div",style:{display:"flex",alignItems:"center"},children:[e.jsx(ie,{style:{fill:a.palette.primary.main}}),e.jsx(T,{component:"span",style:{marginLeft:"8px",fontSize:"18px",fontWeight:"bolder"},children:l("router.domainAlias.nftDomain")})]}),e.jsxs(T,{component:"div",style:{display:"flex",marginTop:"12px"},children:[e.jsx(T,{component:"span",style:{width:"80px",marginRight:"8px"},children:l("common.domain")}),e.jsx(T,{component:"span",children:t.value})]}),e.jsxs(T,{component:"div",style:{display:"flex"},children:[e.jsx(T,{component:"span",style:{width:"80px",marginRight:"8px"},children:"NFT"}),e.jsx(M,{did:t.nftDid})]})]})})})]}),e.jsx(V,{domain:t,filters:["http"]},`${t.value}-http`),s&&e.jsx(ye,{siteId:n,domain:t.value,domainStatus:t.domainStatus,did:r.meta.did,children:({open:x})=>e.jsx(H,{sx:{padding:0},size:"small",onClick:v=>x(v),children:l("router.cert.genLetsEncryptCert.title")})})]})}ae.propTypes={siteId:i.string.isRequired,domain:J.isRequired,blocklet:i.object.isRequired,hasMutatePermission:i.bool.isRequired};const Nn={arcblock:"ArcBlock",ethereum:"Ethereum"};function $n(){var y,S,R,k,p;const{t:n,locale:t}=E(),{info:r,inService:s}=O(),[a,l]=w.useState(!1),{blocklet:o}=ue(),{appDid:c,appPid:d,migratedFrom:u=[]}=o,x=(y=o.environments.find(D=>D.key==="BLOCKLET_APP_CHAIN_TYPE"))==null?void 0:y.value,v=[c?{name:n("blocklet.appId"),value:e.jsx(M,{did:c,showQrcode:!0})}:null,d&&c!==d?{name:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[n("blocklet.appPid"),e.jsx(N,{title:n("blocklet.whyNeedAppPid"),children:e.jsx(te,{icon:_t})})]}),value:e.jsx(M,{did:d,showQrcode:!0})}:null,(u==null?void 0:u.length)>1?{name:n("blocklet.alsoKnownAs"),value:e.jsxs("div",{children:[(a?u.slice(1):u.slice(1,2)).map(D=>e.jsx(M,{did:D.appDid,showQrcode:!0})),u.length>2&&e.jsx(H,{style:{marginLeft:"18px"},endIcon:a?e.jsx(te,{icon:tn}):e.jsx(te,{icon:$t}),onClick:()=>l(!a),children:n(a?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,{name:n("common.name"),value:Q.getDisplayName(o,!0)},{name:n("common.status"),value:e.jsx(Ft,{status:o.status,source:o.source,progress:o.progress})},Ye(o)?{name:"NFT",value:e.jsx(M,{external:!0,href:Lt((S=o==null?void 0:o.controller)==null?void 0:S.chainHost,(R=o==null?void 0:o.controller)==null?void 0:R.nftId,"asset"),did:(k=o==null?void 0:o.controller)==null?void 0:k.nftId,showQrcode:!0})}:null,{name:n("blocklet.installedAt"),value:qt(o.installedAt,t)},{name:n("blocklet.overview.accessControl"),value:n(`team.whoCanAccess.${Q.getWhoCanAccess(o)}.title`)},{name:n("common.owner"),value:(p=o.settings)!=null&&p.owner?e.jsx(M,{did:o.settings.owner.did,showQrcode:!0}):"-"},{name:n("blocklet.config.walletType.name"),value:Nn[x||"arcblock"]||x},o.externalSkSource?{name:n("blocklet.skSource"),value:o.externalSkSource}:null].filter(Boolean);s&&v.push({name:n("common.serverDid"),value:e.jsx(M,{did:r.did,showQrcode:!0})},{name:n("common.serverVersion"),value:e.jsx(Nt,{children:r.version})});const P=D=>D.map(I=>e.jsx(Je,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:I.name,nameFormatter:()=>I.name,children:I.value},I.name));return e.jsxs(Fn,{component:"div",children:[e.jsx(Se,{}),e.jsx("div",{className:"title",children:e.jsx("span",{children:n("common.basicInfo")})}),e.jsx("div",{className:"basicInfo",children:P(v)})]})}$n.propTypes={};const Fn=Ge(T)`
|
|
16
16
|
.title {
|
|
17
17
|
font-size: 1.2rem;
|
|
18
18
|
font-weight: bold;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
var Kd=Object.defineProperty;var Xd=(i,e,t)=>e in i?Kd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Ue=(i,e,t)=>Xd(i,typeof e!="symbol"?e+"":e,t);import{bJ as Qd,j as Ve,hJ as Yd,dm as Jd,fb as Zd,g as Ct,hK as eh,hL as ru,hM as lu,hN as cu,hO as uu,cL as pu,eU as cs,dw as jt,hP as Ys,P as I,r as ae,cN as zr,c1 as $r,av as th,fH as ih,bn as du,aO as ah,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Y2PVOGvn.js","./index-Cww3vDI8.js","./index-BEj64JY8.css","./TextField-BWuX6Gtq.js","./Select-DfLcTPPw.js","./InputLabel-hGLRSUVj.js","./status-CZkdUEuf.js","./Delete-DAbDwewn.js","./url-evaluation-Brz4Ir30.js","./Slider-CiaHZh2P.js","./Skeleton-Blk9FJbM.js","./Close-GdYjDgtS.js","./index-XBhShZN3.js","./preact.module-DJUF--8d.js","./index-VRAnvMf7.js","./index-CiDTz_P_.js","./memoize-one.esm-BdPwpGay.js","./index-d8p7Ly1K.js","./ExpandMore-Cq8xyHBp.js","./resource-dialog-mBOGt9Gd.js","./index-DlsKoBBn.js","./index-DjURT7Rh.js","./index-COxjgI-I.js","./index-Bc93He6x.js","./index-Dt-hqt8X.js","./FilterList-LzSA9lp1.js","./useThemeProps-Dgbotsr7.js","./LastPage-BSomuocQ.js","./index-B89KUtLC.js","./redux-B7ppTFhc.js","./Search-DkvGGbdo.js","./MoreVert-B_ttDoGP.js","./index-Chipn4bv.js","./url-join-C4CVYdSb.js","./toUpper-Dbw34Ras.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Kd=Object.defineProperty;var Xd=(i,e,t)=>e in i?Kd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Ue=(i,e,t)=>Xd(i,typeof e!="symbol"?e+"":e,t);import{bJ as Qd,j as Ve,hJ as Yd,dm as Jd,fb as Zd,g as Ct,hK as eh,hL as ru,hM as lu,hN as cu,hO as uu,cL as pu,eU as cs,dw as jt,hP as Ys,P as I,r as ae,cN as zr,c1 as $r,av as th,fH as ih,bn as du,aO as ah,J as nh,hQ as qr,dH as sh,Q as hu,a2 as oh,hb as Hr,hR as rh,fg as lh,dk as ch}from"./index-Cww3vDI8.js";import{u as uh}from"./index-XBhShZN3.js";import{B as Wr,_ as d,b as kt,l as ph,k as Lt,H as Tt,m as dh,E as mu}from"./preact.module-DJUF--8d.js";import{a as hh}from"./index-VRAnvMf7.js";import{c as ve}from"./index-CiDTz_P_.js";import{m as Vr}from"./memoize-one.esm-BdPwpGay.js";import"./index-d8p7Ly1K.js";import{W as mh}from"./resource-dialog-mBOGt9Gd.js";import"./index-DjURT7Rh.js";import"./index-COxjgI-I.js";import"./index-Bc93He6x.js";import"./index-Dt-hqt8X.js";import{p as fh}from"./index-Chipn4bv.js";import{j as Xo}from"./url-join-C4CVYdSb.js";import{u as fu,t as gh}from"./toUpper-Dbw34Ras.js";const vh=Qd(Ve.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 bh(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 yh=bh,xh=Yd;function wh(i,e,t,a){return xh(i,function(n,s,o){e(a,n,t(n),o)}),a}var _h=wh,Ph=yh,Sh=_h,Fh=Jd,Ch=Zd;function kh(i,e){return function(t,a){var n=Ch(t)?Ph:Sh,s=e?e():{};return n(t,i,Fh(a),s)}}var Eh=kh,Th=eh,Dh=Eh,Oh=Dh(function(i,e,t){Th(i,t,e)}),Ih=Oh;const gu=Ct(Ih);function Ja(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Ah=0;function vu(i){return"__private_"+Ah+++"_"+i}function Rh(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
|
*
|
|
@@ -52,5 +52,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
52
52
|
<div class="uppy-ProviderBrowserItem-inner uploaded-add-item">
|
|
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
|
-
`,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));Ue(this,"convertImgToObject",Ys(()=>{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=r1(s.originalname),[".mp4",".webm"].find(c=>{var p;return((p=a.src)==null?void 0:p.indexOf(c))>-1})){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}));Ue(this,"resetState",()=>{this.uploadedAPIData={...eu},this.uploaded.setPluginState({...tu}),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={...eu},this.addUploadItemFlag=!0,this.icon=()=>ge("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ge("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"}),ge("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"}),ge("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ge("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(),ge("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new Mr(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...tu}),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 iu={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,folderId:"",componentDid:"",components:[]},au={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},Vd={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"},Z1={...Vd,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class ew extends we{constructor(t,a){super(t,a);Ue(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await Ri.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=fu([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=Gn(s);return n=Gn(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})}});Ue(this,"resetState",()=>{this.apiData={...iu},this.resources.setPluginState({...au})});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={...iu},this.icon=()=>ge("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:[ge("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"}),ge("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"}),ge("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(),ge("div",{id:"resources",className:"uploaded",children:[ge("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ge("button",{style:this.apiData.componentDid===a.did?Z1:Vd,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:gh(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new Mr(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...au}),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 tw=ih();const iw=Ct(tw);class aw extends we{constructor(t,a){super(t,{...{},...a});Ue(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=iw.createHash("md5").update(await r.text()).digest("hex"),c=Vn(n),p=`${l}${c?`.${c}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});Ue(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})}});Ue(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.setMetaData(t)});Ue(this,"tryDownloadRemoteFile",async t=>{var O,A;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,w=`uploader:${c}:downloaded`,y=Vn(t),g=(O=n==null?void 0:n.split("?"))==null?void 0:O[0],C=(()=>{const b=["jpg","jpeg"];return b.includes(y)&&b.some(_=>g==null?void 0:g.endsWith(_))?!0:g==null?void 0:g.endsWith(y)})()?g:`${g}${y?`.${y}`:""}`;if(f){const b=i1(s||((A=u==null?void 0:u.body)==null?void 0:A.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 Ri.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:b}}).then(_=>_==null?void 0:_.data).then(async _=>{const k=e1(_,C);this.uppy.setFileState(c,{name:C,extension:y,type:a,data:k,preview:s||Tc(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:C,filename:C}}),this.uppy.getFile(c),this.uppy.emit(w,c)}).catch(async _=>{console.error("Axios download remote file error: ",_),this.uppy.setFileState(c,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(c))})}else l&&await(async()=>new Promise(_=>{this.uppy.once(w,async()=>{_()})}))()});Ue(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:Tc(s)})},o.indexOf("gif")>-1?1e3:0)}});Ue(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 nw extends we{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=()=>ge("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ge("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ge("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ge("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 ge("div",{id:"ai-image",className:"ai-image",children:ge("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 sw="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",ow=ae.lazy(()=>du(()=>import("./index-CV73blTb.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)),nu="uploader-container",gn="uploader-dashboard",Go=localStorage.getItem("uppy_debug"),rw=i=>{var r;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a}=i,n=Cd(e==null?void 0:e.companion),s=async l=>(await Ri.post("/api/image/generations",l)).data,o={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Wp,options:{quality:1},alwayUse:!0},(Go||wa()&&!Dc())&&{id:"Uploaded",plugin:J1,options:{params:a==null?void 0:a.params}},(Go||wa()&&!Dc())&&{id:"Resources",plugin:ew,options:{params:a==null?void 0:a.params}},wa()&&a1()&&t.AIImage&&{id:"AIImage",plugin:nw,options:{companionUrl:n},onShowPanel:l=>{function c(){setTimeout(()=>{var u,h;const p=document.getElementById("ai-image");p?lh(p).render(Ve.jsx(ow,{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((w,y)=>{const g=`AI Image [${y+1}].png`,S={name:g,type:"image/png",data:t1(w,g),source:"AIImage",isRemote:!1};f==null||f.addFile(S)})}})):c()},100)}c()}},{id:"Url",plugin:Va,options:{companionUrl:n}},{id:"Webcam",plugin:Eu,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:Wu,options:{companionUrl:n,companionHeaders:{},companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:aw,options:{companionUrl:n},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:pr,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function Lr(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=gu(p,"id"),m=Cd(r==null?void 0:r.uploader);let f=new Zo({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Go||""),locale:Ux[a||"en"],onBeforeFileAdded:(w,y)=>{if(Object.hasOwn(y,w.id))return!1;const g=!!oi.extension(w.type),S=oi.lookup(w.name)||"";if(!g&&S&&S!==w.type){const C=Vn(w);C&&(w.extension=C),w.type=S}return w},...o,restrictions:u}).use(bd,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:m,async onBeforeRequest(w,y){var b;const{hashFileName:g,id:S,meta:C}=y,O=Vn(y);w.setHeader("x-uploader-file-name",`${g}`),w.setHeader("x-uploader-file-id",`${S}`),w.setHeader("x-uploader-file-ext",`${O}`),w.setHeader("x-uploader-base-url",new URL(w.getURL()).pathname),w.setHeader("x-uploader-endpoint-url",m),w.setHeader("x-uploader-metadata",JSON.stringify(C,(_,k)=>typeof k=="string"?encodeURIComponent(k):k));const A=(window==null?void 0:window.uploaderComponentId)||((b=window==null?void 0:window.blocklet)==null?void 0:b.componentId);A&&w.setHeader("x-component-did",(A||"").split("/").pop())},onAfterResponse:async(w,y)=>{const g={},S=w.getUnderlyingObject();try{S.response&&(g.data=JSON.parse(S.response))}catch{g.data={}}g.method=w.getMethod().toUpperCase(),g.url=w.getURL(),g.status=S.status,g.headers={...w._headers};const C=S.getAllResponseHeaders();if(C&&C.split(`\r
|
|
55
|
+
`,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));Ue(this,"convertImgToObject",Ys(()=>{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=r1(s.originalname),[".mp4",".webm"].find(c=>{var p;return((p=a.src)==null?void 0:p.indexOf(c))>-1})){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}));Ue(this,"resetState",()=>{this.uploadedAPIData={...eu},this.uploaded.setPluginState({...tu}),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={...eu},this.addUploadItemFlag=!0,this.icon=()=>ge("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ge("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"}),ge("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"}),ge("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ge("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(),ge("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new Mr(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...tu}),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 iu={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,folderId:"",componentDid:"",components:[]},au={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},Vd={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"},Z1={...Vd,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class ew extends we{constructor(t,a){super(t,a);Ue(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await Ri.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=fu([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=Gn(s);return n=Gn(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})}});Ue(this,"resetState",()=>{this.apiData={...iu},this.resources.setPluginState({...au})});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={...iu},this.icon=()=>ge("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:[ge("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"}),ge("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"}),ge("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(),ge("div",{id:"resources",className:"uploaded",children:[ge("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ge("button",{style:this.apiData.componentDid===a.did?Z1:Vd,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:gh(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new Mr(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...au}),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 tw=ih();const iw=Ct(tw);class aw extends we{constructor(t,a){super(t,{...{},...a});Ue(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=iw.createHash("md5").update(await r.text()).digest("hex"),c=Vn(n),p=`${l}${c?`.${c}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});Ue(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})}});Ue(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.setMetaData(t)});Ue(this,"tryDownloadRemoteFile",async t=>{var O,A;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,w=`uploader:${c}:downloaded`,y=Vn(t),g=(O=n==null?void 0:n.split("?"))==null?void 0:O[0],C=(()=>{const b=["jpg","jpeg"];return b.includes(y)&&b.some(_=>g==null?void 0:g.endsWith(_))?!0:g==null?void 0:g.endsWith(y)})()?g:`${g}${y?`.${y}`:""}`;if(f){const b=i1(s||((A=u==null?void 0:u.body)==null?void 0:A.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 Ri.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:b}}).then(_=>_==null?void 0:_.data).then(async _=>{const k=e1(_,C);this.uppy.setFileState(c,{name:C,extension:y,type:a,data:k,preview:s||Tc(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:C,filename:C}}),this.uppy.getFile(c),this.uppy.emit(w,c)}).catch(async _=>{console.error("Axios download remote file error: ",_),this.uppy.setFileState(c,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(c))})}else l&&await(async()=>new Promise(_=>{this.uppy.once(w,async()=>{_()})}))()});Ue(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:Tc(s)})},o.indexOf("gif")>-1?1e3:0)}});Ue(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 nw extends we{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=()=>ge("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ge("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ge("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ge("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 ge("div",{id:"ai-image",className:"ai-image",children:ge("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 sw="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",ow=ae.lazy(()=>du(()=>import("./index-Y2PVOGvn.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)),nu="uploader-container",gn="uploader-dashboard",Go=localStorage.getItem("uppy_debug"),rw=i=>{var r;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a}=i,n=Cd(e==null?void 0:e.companion),s=async l=>(await Ri.post("/api/image/generations",l)).data,o={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Wp,options:{quality:1},alwayUse:!0},(Go||wa()&&!Dc())&&{id:"Uploaded",plugin:J1,options:{params:a==null?void 0:a.params}},(Go||wa()&&!Dc())&&{id:"Resources",plugin:ew,options:{params:a==null?void 0:a.params}},wa()&&a1()&&t.AIImage&&{id:"AIImage",plugin:nw,options:{companionUrl:n},onShowPanel:l=>{function c(){setTimeout(()=>{var u,h;const p=document.getElementById("ai-image");p?lh(p).render(Ve.jsx(ow,{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((w,y)=>{const g=`AI Image [${y+1}].png`,S={name:g,type:"image/png",data:t1(w,g),source:"AIImage",isRemote:!1};f==null||f.addFile(S)})}})):c()},100)}c()}},{id:"Url",plugin:Va,options:{companionUrl:n}},{id:"Webcam",plugin:Eu,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:Wu,options:{companionUrl:n,companionHeaders:{},companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:aw,options:{companionUrl:n},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:pr,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function Lr(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=gu(p,"id"),m=Cd(r==null?void 0:r.uploader);let f=new Zo({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Go||""),locale:Ux[a||"en"],onBeforeFileAdded:(w,y)=>{if(Object.hasOwn(y,w.id))return!1;const g=!!oi.extension(w.type),S=oi.lookup(w.name)||"";if(!g&&S&&S!==w.type){const C=Vn(w);C&&(w.extension=C),w.type=S}return w},...o,restrictions:u}).use(bd,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:m,async onBeforeRequest(w,y){var b;const{hashFileName:g,id:S,meta:C}=y,O=Vn(y);w.setHeader("x-uploader-file-name",`${g}`),w.setHeader("x-uploader-file-id",`${S}`),w.setHeader("x-uploader-file-ext",`${O}`),w.setHeader("x-uploader-base-url",new URL(w.getURL()).pathname),w.setHeader("x-uploader-endpoint-url",m),w.setHeader("x-uploader-metadata",JSON.stringify(C,(_,k)=>typeof k=="string"?encodeURIComponent(k):k));const A=(window==null?void 0:window.uploaderComponentId)||((b=window==null?void 0:window.blocklet)==null?void 0:b.componentId);A&&w.setHeader("x-component-did",(A||"").split("/").pop())},onAfterResponse:async(w,y)=>{const g={},S=w.getUnderlyingObject();try{S.response&&(g.data=JSON.parse(S.response))}catch{g.data={}}g.method=w.getMethod().toUpperCase(),g.url=w.getURL(),g.status=S.status,g.headers={...w._headers};const C=S.getAllResponseHeaders();if(C&&C.split(`\r
|
|
56
56
|
`).forEach(_=>{const[k,U]=_.split(": ");k&&U&&(g.headers[k]=U)}),["PATCH","POST"].includes(g.method)&&[200,500].includes(g.status)){const b=[!0,"true"].includes(g.headers["x-uploader-file-exist"]),_=s1(g.url,g.headers["x-uploader-file-name"]),k=f.getFile(g.headers["x-uploader-file-id"]);g.file=k,g.uploadURL=_,b&&k&&(g.method==="POST"&&f.pauseResume(k.id),f.emit("upload-success",k,{uploadURL:_}),f.calculateTotalProgress()),g.status===200&&(await(s==null?void 0:s(g)),f.emitUploadSuccess(k,g))}n&&await(n==null?void 0:n(S));const O=f.getState().totalProgress===100,A=f.getFiles().every(b=>b.source==="DropTarget");O&&A&&f.close()},...l});return c&&f.use(Tp,{target:document.body,onDrop:w=>{var y;(y=f==null?void 0:f.open)==null||y.call(f)},...c}),t==null||t.forEach(w=>{if(w){const{plugin:y,options:g}=h[w]||{};y&&f.use(y,g)}}),o1(f),f}const Ko=ae.forwardRef((i,e)=>{const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,...i==null?void 0:i.apiPathProps},a=ah({open:!1,uppy:null,availablePluginMap:{},restrictions:{}}),n=rw({...i,apiPathProps:t,availablePluginMap:a.availablePluginMap,restrictions:a.restrictions}),{plugins:s=n.map(b=>b.id),id:o="Uploader",popup:r=!1,uploadedProps:l,onOpen:c,onClose:p,locale:u,installerProps:h}=i,m=gu(n,"id"),f=nh(b=>{var _;return(_=b==null?void 0:b.breakpoints)==null?void 0:_.down("md")}),w=qr([...s,...n.filter(b=>b.alwayUse).map(b=>b.id)]);ae.useLayoutEffect(()=>{(async()=>{var k,U,M,$,Q,W;let _=Hr((k=i==null?void 0:i.coreProps)==null?void 0:k.restrictions)?{}:(U=i==null?void 0:i.coreProps)==null?void 0:U.restrictions;wa()&&!t.disableMediaKitPrefix&&Hr((M=i==null?void 0:i.coreProps)==null?void 0:M.restrictions)&&await Ri.get("/api/uploader/status").then(({data:j})=>{a.availablePluginMap=j.availablePluginMap,_=j.restrictions||{}}),!(($=_==null?void 0:_.allowedFileTypes)!=null&&$.length)&&(_!=null&&_.allowedFileExts)&&(_.allowedFileTypes=qr((W=(Q=(typeof(_==null?void 0:_.allowedFileExts)=="string"?_==null?void 0:_.allowedFileExts.split(","):_==null?void 0:_.allowedFileExts)||[])==null?void 0:Q.map(j=>oi.lookup((j==null?void 0:j.replaceAll(" ",""))||"")))==null?void 0:W.filter(j=>j)),delete _.allowedFileExts),_.maxFileSize&&typeof _.maxFileSize=="string"&&(_.maxFileSize=X.parseSize(_.maxFileSize,{iec:!1})||void 0),a.restrictions=_})()},[]),uh("esc",b=>{a.open&&(b.stopPropagation(),b.preventDefault(),S())},{useCapture:!0}),ae.useEffect(()=>{a.uppy=Lr({...i,id:o,plugins:w,apiPathProps:t,pluginList:n,restrictions:a.restrictions}),a.uppy.open=g,a.uppy.close=S,a.uppy.openPlugin=y,a.uppy.on("dashboard:show-panel",b=>{const{onShowPanel:_}=m[b];_==null||_(e)}),(w.includes("Uploaded")||w.includes("Resources"))&&(a.uppy.off("uploaded:selected"),a.uppy.on("uploaded:selected",b=>{var _;b.forEach(k=>{a.uppy.emitUploadSuccess({id:k._id},{data:k,isMock:!0})}),(_=l==null?void 0:l.onSelectedFiles)==null||_.call(l,b),S()}))},[JSON.stringify({id:o,plugins:w,apiPathProps:t,locale:u,restrictions:a.restrictions})]);function y(b){var _,k,U;if(b=b.replace(/\s/g,""),["MyDevice",...w].map(M=>M.toLowerCase()).includes(b.toLowerCase())){let M=`div[data-uppy-acquirer-id="${b}"] > button`;(U=(k=(_=document==null?void 0:document.getElementById(gn))==null?void 0:_.querySelector(M))==null?void 0:k.click)==null||U.call(k)}}function g(b){var k,U,M,$;a.open=!0,b&&setTimeout(()=>{y(b)},200),a.uppy.emitOpen(),c==null||c(),(U=(k=document.activeElement)==null?void 0:k.blur)==null||U.call(k);const _=a.uppy.getPlugin(gn).el;(M=_==null?void 0:_.focus)==null||M.call(_),($=_==null?void 0:_.click)==null||$.call(_)}function S(){var b;(b=a.uppy.getPlugin(gn))==null||b.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)}ae.useImperativeHandle(e,()=>({getUploader:()=>a.uppy,open:g,close:S})),ae.useEffect(()=>{n1(t.disableMediaKitPrefix)},[t.disableMediaKitPrefix]);const C=r?rh:ae.Fragment,O=r?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:a.open?"block":"none"}},invisible:!0,open:a.open,onClick:b=>{document.activeElement===document.body&&(b.stopPropagation(),S())},...i.wrapperProps}:{...i.wrapperProps},A=f?"42px":"40px";return Ve.jsx(C,{...O,children:Ve.jsxs(mh,{onClose:S,did:sw,disabled:!a.open,...h,children:[Ve.jsx(sh,{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)"}}})}),Ve.jsxs(hu,{id:nu,onClick:b=>b.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:[Ve.jsx(oh,{"aria-label":"close",onClick:S,sx:{color:"#fafafa",position:"absolute",...f?{bottom:`calc(0px - ${A} - 16px)`,left:`calc(50vw - ${A} - 8px)`}:{right:`calc(0px - ${A} - 16px)`,top:-12}},children:Ve.jsx(vh,{sx:{fontSize:A}})}),a.uppy&&Ve.jsx(yp,{inline:!0,target:`#${nu}`,id:gn,uppy:a.uppy,plugins:w,fileManagerSelectionType:"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:"",doneButtonHandler:S,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),lw=Object.freeze(Object.defineProperty({__proto__:null,Uploader:Ko,default:Ko,initUploader:Lr},Symbol.toStringTag,{value:"Module"})),cw=ae.lazy(()=>du(()=>Promise.resolve().then(()=>lw),void 0,import.meta.url).then(i=>({default:i.Uploader}))),jr=ae.createContext(null);function Gd(){const i=ae.useContext(jr);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function uw({onChange:i,children:e,...t}){const a=Gd(),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 Ve.jsx(hu,{onClick:n,...t,children:e})}function pw({children:i,...e}){const t=ae.useRef(null);return Ve.jsxs(jr.Provider,{value:t,children:[i,ch.createPortal(Ve.jsx(cw,{ref:t,popup:!0,...e},"uploader"),document.body)]})}const Hw=Object.freeze(Object.defineProperty({__proto__:null,Uploader:Ko,UploaderContext:jr,UploaderProvider:pw,UploaderTrigger:uw,initUploader:Lr,useUploaderContext:Gd},Symbol.toStringTag,{value:"Module"}));export{a1 as g,Hw as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dU as S}from"./index-
|
|
1
|
+
import{dU as S}from"./index-Cww3vDI8.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 D,j as u,O,d0 as z,fM as s1,dM as p1,r as R,a1 as Z1,cB as P1,q as z1,ch as j1,fz as G1,fK as N1,g2 as q1,dO as W1,f_ as Y1,dN as K1,a2 as _1,fc as B1,dx as X1,dA as J1,cN as J,gb as Q1,gc as e2,av as V1,n as T1,g as t2,cz as i2,gd as a2}from"./index-CKyWT4da.js";import"./index-D3vCJ_iK.js";function w1({optionalComponent:i,index:L,installStatus:x,hasPermission:d,t:B}){const o=()=>{window.open(i==null?void 0:i.installUrl,"_blank")},$=()=>{window.open(i==null?void 0:i.storeUrl,"_blank")},A=()=>{window.location.reload()},k=x==="stopped"||x==="running",v=60;return u.jsxs(O,{children:[L===0?null:u.jsx(O,{sx:{width:"100%",height:"1px",backgroundColor:z.gray6}}),u.jsxs(O,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[u.jsx("img",{style:{width:v,height:v,minWidth:v,minHeight:v},src:i.logoUrl,alt:i.meta.title}),u.jsxs(O,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[u.jsxs(O,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var h;return $((h=i.meta)==null?void 0:h.did)},children:[i.meta.title,u.jsxs(O,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[i.meta.version,u.jsx(s1,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:z.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),u.jsx(O,{sx:{marginTop:0,opacity:.7},children:i.meta.description}),u.jsx(O,{sx:{display:d?"flex":"none",flexDirection:"row",gap:1},children:x?u.jsx(O,{sx:{marginTop:2,opacity:.7},children:k?u.jsx(p1,{variant:"contained",onClick:A,children:B("componentInstallerRefresh")},"refresh"):u.jsx(p1,{disabled:!0,sx:{color:"#333"},startIcon:u.jsx(s1,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:x},"status")}):u.jsx(p1,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var h;return o((h=i.meta)==null?void 0:h.did)},children:B("componentInstallerInstall")},"install")}),k?u.jsx(O,{sx:{marginTop:2,opacity:.7},children:B("componentInstallerSuccessInstalled")}):null]})]})]})}w1.propTypes={t:D.func.isRequired,optionalComponent:D.object.isRequired,index:D.number.isRequired,installStatus:D.string,hasPermission:D.bool.isRequired};w1.defaultProps={installStatus:""};const s2={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"}},h1=i=>typeof i=="string"?new Set(i.split(";;")):new Set(i);function r2({did:i,onInstalled:L,onError:x}){const d=Array.isArray(i)?i.join(";;"):i,[B,o]=R.useState({}),$=R.useRef({onInstalled:L,onError:x});$.current={onInstalled:L,onError:x};const{optionalComponents:A,componentMountPoints:k}=window.blocklet,v=R.useMemo(()=>{var s;if(!A||!A.length)return[];const m=h1(d),e=A.filter(t=>m.has(t.meta.did));return(s=e?$.current.onError:$.current.onInstalled)==null||s(e),e},[d,A]),h=R.useMemo(()=>{if(v.length)return!0;const m=h1(d);return(k||[]).find(e=>m.has(e.did))},[v,k,d]);return v.forEach(m=>{m.storeUrl=Z1(m.meta.homepage,"blocklets",m.meta.did),m.installUrl=Z1(window.blocklet.appUrl,P1,`/admin/components?install-component=${m.meta.did}`)}),R.useEffect(()=>{const m=e=>{var s,t,a,n,S;if(e.origin===window.blocklet.appUrl&&((s=e.data)==null?void 0:s.kind)==="component-installer"&&(a=(t=e.data)==null?void 0:t.blocklet)!=null&&a.children){let _=!1;const p=h1(d);(S=(n=e.data)==null?void 0:n.blocklet)==null||S.children.forEach(c=>{var I;p.has((I=c.meta)==null?void 0:I.did)&&(_=!0,o(l=>{var r;return{...l,[(r=c.meta)==null?void 0:r.did]:c.status||"waiting"}}))}),_||o({})}};return window.addEventListener("message",m),()=>{window.removeEventListener("message",m)}},[d]),{optComponents:v,installed:!v.length&&h,installStatus:B,setInstallStatus:o,definedInBlockletYML:h}}function Q({warnIcon:i,did:L,noPermissionMute:x,onInstalled:d,onError:B,children:o,closeByOutSize:$,onClose:A,fallback:k,disabled:v,roles:h=["owner","admin"]}){const{locale:m}=z1(),e=j1((p,c={})=>G1(s2,p,m,"en",c)),{installed:s,optComponents:t,installStatus:a,definedInBlockletYML:n}=r2({did:L,onInstalled:d,onError:B}),S=R.useContext(N1),_=()=>{A==null||A(!1)};return v?o:u.jsx(q1,{session:S==null?void 0:S.session,roles:h,children:({hasPermission:p})=>s?o:x&&!p?k||null:typeof o=="function"?u.jsxs(u.Fragment,{children:[k,o({hasPermission:p,optComponents:t,installStatus:a})]}):u.jsxs(u.Fragment,{children:[k,u.jsx(W1,{onClickAway:c=>{c.preventDefault(),c.stopPropagation(),$&&_()},children:u.jsx(Y1,{in:!0,timeout:350,children:u.jsx(K1,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:z.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${z.gray6}, 0px 0px 0px 1px ${z.gray6}`},children:n?u.jsxs(O,{sx:{display:"flex",flexDirection:"column"},children:[u.jsxs(O,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[i||u.jsx(s1,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),u.jsx(O,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),u.jsx(O,{sx:{flex:1}}),A?u.jsx(_1,{variant:"outlined",className:"button",onClick:_,children:u.jsx(B1,{})}):null]}),u.jsx(O,{sx:{width:"100%",height:"1px",backgroundColor:z.gray6}}),u.jsx(O,{sx:{maxHeight:"70vh",overflowY:"auto"},children:t.map((c,I)=>{var l,r;return u.jsx(w1,{t:e,hasPermission:p,index:I,optionalComponent:c,installStatus:a[(l=c.meta)==null?void 0:l.did]},((r=c.meta)==null?void 0:r.did)||I)})}),p?null:u.jsxs(u.Fragment,{children:[u.jsx(O,{sx:{width:"100%",height:"1px",backgroundColor:z.gray6}}),u.jsx(O,{sx:{padding:"20px 24px"},children:u.jsx(O,{sx:{opacity:1},children:e("componentInstallerSuggestions")})})]})]}):u.jsxs(O,{sx:{display:"flex",flexDirection:"column"},children:[u.jsxs(O,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[i||u.jsx(s1,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),u.jsx(O,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),u.jsx(O,{sx:{flex:1}}),A?u.jsx(_1,{variant:"outlined",className:"button",onClick:_,children:u.jsx(B1,{})}):null]}),u.jsx(O,{sx:{width:"100%",height:"1px",backgroundColor:z.gray6}}),u.jsxs(O,{sx:{padding:"20px 24px",marginTop:0},children:[e("componentInstallerNoDefinedInBlockletYML"),": ",L]})]})})})})]})})}Q.propTypes={disabled:D.bool,warnIcon:D.node,did:D.oneOfType([D.string,D.arrayOf(D.string)]).isRequired,noPermissionMute:D.bool,onInstalled:D.func,onError:D.func,children:D.any.isRequired,closeByOutSize:D.bool,onClose:D.func,fallback:D.node,roles:D.array};Q.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function R1(i){return window.blocklet?u.jsx(Q,{...i}):i.children}R1.propTypes={...Q.propTypes,children:D.any.isRequired};R1.defaultProps={...Q.defaultProps};var n2={},g1={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.MOTIF_COLORS=i.DEFAULT_COLORS=void 0,i.rgbToHsl=d,i.hslToRgb=B,i.getNftBGColor=o,i.getPassportColorFromDid=$,i.getNftBGColorFromDid=A;const L=X1,x=J1;i.DEFAULT_COLORS={"did-space":{start:"#7D3AC5",end:"#9761D1"},"app-space":{start:"#6CC68D",end:"#47B871"},"app-purchase":{start:"#DE7021",end:"#E48D4E"},"app-passport":{start:"#3882C7",end:"#7AB2F6"}},i.MOTIF_COLORS=["#E94E4E","#E41115","#E96B4E","#E5502E","#E98F4E","#E57A2E","#E98F4E","#E5A82E","#DACD5D","#DAC825","#BDD13D","#C8E31C","#AEE94E","#7FD558","#52CC19","#4FC469","#59DE9C","#19CC73","#5ED9D1","#19CCC0","#4ED7E9","#19B7CC","#45ACE8","#1C97DE","#4E68E9","#2E4DE5","#7F4EE9","#682EE5","#BE65E7","#AF40E2","#DF58C2","#E94E8F"];function d(k){const v=k.replace("#",""),h=parseInt(v.slice(0,2),16)/255,m=parseInt(v.slice(2,4),16)/255,e=parseInt(v.slice(4,6),16)/255,s=Math.max(h,m,e),t=Math.min(h,m,e);let a,n;const S=(s+t)/2;if(s===t)a=0,n=0;else{const _=s-t;switch(n=S>.5?_/(2-s-t):_/(s+t),s){case h:a=(m-e)/_+(m<e?6:0);break;case m:a=(e-h)/_+2;break;case e:a=(h-m)/_+4;break}a/=6}return[a,n,S]}function B(k,v,h){let m,e,s;if(v===0)m=h,e=h,s=h;else{const t=(S,_,p)=>{let c=p;return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?S+(_-S)*6*c:c<.5?_:c<.6666666666666666?S+(_-S)*(.6666666666666666-c)*6:S},a=h<.5?h*(1+v):h+v-h*v,n=2*h-a;m=t(n,a,k+1/3),e=t(n,a,k),s=t(n,a,k-1/3)}return`#${[Math.round(m*255),Math.round(e*255),Math.round(s*255)].map(t=>t.toString(16).padStart(2,"0")).join("")}`}function o(k){if(k){const v=d(k),h=[v[0]];v[1]>.7?h.push(.7):h.push(v[1]),v[2]>.6?h.push(.6):v[2]<.3?h.push(.3):h.push(v[2]);const m=[h[0],h[1],h[2]-.1],e=B(...h);return{start:B(...m),end:e}}return i.DEFAULT_COLORS["app-passport"]}function $(k){return`#${(0,L.toHex)(x.Hasher.SHA3.hash224(k)).slice(-6)}`}function A(k){return o($(k))}})(g1);(function(i){var L=J&&J.__createBinding||(Object.create?function(l,r,f,w){w===void 0&&(w=f);var y=Object.getOwnPropertyDescriptor(r,f);(!y||("get"in y?!r.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return r[f]}}),Object.defineProperty(l,w,y)}:function(l,r,f,w){w===void 0&&(w=f),l[w]=r[f]}),x=J&&J.__exportStar||function(l,r){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(r,f)&&L(r,l,f)};Object.defineProperty(i,"__esModule",{value:!0}),i.getSvg=i.nanoid=i.getTagSvg=i.getBadgesSvg=i.getChainBadge=i.getVerifiableBadge=i.getDidSvg=i.getExtraSvg=i.getIssuerSvg=i.getHeaderSvg=i.getLayoutSvg=i.formatDid=void 0;const d=Q1,B=g1;x(g1,i);const o=(l,r)=>[l,r].join("-"),$=228,A=258,k=l=>/^(0x)?[0-9a-f]{40}$/i.test(l),v=l=>{const r=Uint8Array.from(l.slice(2).match(/.{1,2}/g).map(f=>parseInt(f,16))).slice(0,8).reduce((f,w)=>f+w,0)%B.MOTIF_COLORS.length;return B.MOTIF_COLORS[r]},h=(l,r=5)=>l.length>2*r?`${l.slice(0,r)}..${l.slice(-r)}`:l;i.formatDid=h;const m=(l,r,f)=>l==="did-space"?(w,y,j)=>`<svg
|
|
1
|
+
import{P as D,j as u,Q as O,d0 as z,fM as s1,dM as p1,r as R,q as Z1,cB as P1,t as z1,ch as j1,fz as G1,fK as N1,g2 as q1,dO as W1,f_ as Y1,dN as K1,a2 as _1,fc as B1,dx as X1,dA as J1,cN as J,gb as Q1,gc as e2,av as V1,n as T1,g as t2,cz as i2,gd as a2}from"./index-Cww3vDI8.js";import"./index-DlsKoBBn.js";function w1({optionalComponent:i,index:L,installStatus:x,hasPermission:d,t:B}){const o=()=>{window.open(i==null?void 0:i.installUrl,"_blank")},$=()=>{window.open(i==null?void 0:i.storeUrl,"_blank")},A=()=>{window.location.reload()},k=x==="stopped"||x==="running",v=60;return u.jsxs(O,{children:[L===0?null:u.jsx(O,{sx:{width:"100%",height:"1px",backgroundColor:z.gray6}}),u.jsxs(O,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[u.jsx("img",{style:{width:v,height:v,minWidth:v,minHeight:v},src:i.logoUrl,alt:i.meta.title}),u.jsxs(O,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[u.jsxs(O,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var h;return $((h=i.meta)==null?void 0:h.did)},children:[i.meta.title,u.jsxs(O,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[i.meta.version,u.jsx(s1,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:z.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),u.jsx(O,{sx:{marginTop:0,opacity:.7},children:i.meta.description}),u.jsx(O,{sx:{display:d?"flex":"none",flexDirection:"row",gap:1},children:x?u.jsx(O,{sx:{marginTop:2,opacity:.7},children:k?u.jsx(p1,{variant:"contained",onClick:A,children:B("componentInstallerRefresh")},"refresh"):u.jsx(p1,{disabled:!0,sx:{color:"#333"},startIcon:u.jsx(s1,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:x},"status")}):u.jsx(p1,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var h;return o((h=i.meta)==null?void 0:h.did)},children:B("componentInstallerInstall")},"install")}),k?u.jsx(O,{sx:{marginTop:2,opacity:.7},children:B("componentInstallerSuccessInstalled")}):null]})]})]})}w1.propTypes={t:D.func.isRequired,optionalComponent:D.object.isRequired,index:D.number.isRequired,installStatus:D.string,hasPermission:D.bool.isRequired};w1.defaultProps={installStatus:""};const s2={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"}},h1=i=>typeof i=="string"?new Set(i.split(";;")):new Set(i);function r2({did:i,onInstalled:L,onError:x}){const d=Array.isArray(i)?i.join(";;"):i,[B,o]=R.useState({}),$=R.useRef({onInstalled:L,onError:x});$.current={onInstalled:L,onError:x};const{optionalComponents:A,componentMountPoints:k}=window.blocklet,v=R.useMemo(()=>{var s;if(!A||!A.length)return[];const m=h1(d),e=A.filter(t=>m.has(t.meta.did));return(s=e?$.current.onError:$.current.onInstalled)==null||s(e),e},[d,A]),h=R.useMemo(()=>{if(v.length)return!0;const m=h1(d);return(k||[]).find(e=>m.has(e.did))},[v,k,d]);return v.forEach(m=>{m.storeUrl=Z1(m.meta.homepage,"blocklets",m.meta.did),m.installUrl=Z1(window.blocklet.appUrl,P1,`/admin/components?install-component=${m.meta.did}`)}),R.useEffect(()=>{const m=e=>{var s,t,a,n,S;if(e.origin===window.blocklet.appUrl&&((s=e.data)==null?void 0:s.kind)==="component-installer"&&(a=(t=e.data)==null?void 0:t.blocklet)!=null&&a.children){let _=!1;const p=h1(d);(S=(n=e.data)==null?void 0:n.blocklet)==null||S.children.forEach(c=>{var I;p.has((I=c.meta)==null?void 0:I.did)&&(_=!0,o(l=>{var r;return{...l,[(r=c.meta)==null?void 0:r.did]:c.status||"waiting"}}))}),_||o({})}};return window.addEventListener("message",m),()=>{window.removeEventListener("message",m)}},[d]),{optComponents:v,installed:!v.length&&h,installStatus:B,setInstallStatus:o,definedInBlockletYML:h}}function Q({warnIcon:i,did:L,noPermissionMute:x,onInstalled:d,onError:B,children:o,closeByOutSize:$,onClose:A,fallback:k,disabled:v,roles:h=["owner","admin"]}){const{locale:m}=z1(),e=j1((p,c={})=>G1(s2,p,m,"en",c)),{installed:s,optComponents:t,installStatus:a,definedInBlockletYML:n}=r2({did:L,onInstalled:d,onError:B}),S=R.useContext(N1),_=()=>{A==null||A(!1)};return v?o:u.jsx(q1,{session:S==null?void 0:S.session,roles:h,children:({hasPermission:p})=>s?o:x&&!p?k||null:typeof o=="function"?u.jsxs(u.Fragment,{children:[k,o({hasPermission:p,optComponents:t,installStatus:a})]}):u.jsxs(u.Fragment,{children:[k,u.jsx(W1,{onClickAway:c=>{c.preventDefault(),c.stopPropagation(),$&&_()},children:u.jsx(Y1,{in:!0,timeout:350,children:u.jsx(K1,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:z.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${z.gray6}, 0px 0px 0px 1px ${z.gray6}`},children:n?u.jsxs(O,{sx:{display:"flex",flexDirection:"column"},children:[u.jsxs(O,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[i||u.jsx(s1,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),u.jsx(O,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),u.jsx(O,{sx:{flex:1}}),A?u.jsx(_1,{variant:"outlined",className:"button",onClick:_,children:u.jsx(B1,{})}):null]}),u.jsx(O,{sx:{width:"100%",height:"1px",backgroundColor:z.gray6}}),u.jsx(O,{sx:{maxHeight:"70vh",overflowY:"auto"},children:t.map((c,I)=>{var l,r;return u.jsx(w1,{t:e,hasPermission:p,index:I,optionalComponent:c,installStatus:a[(l=c.meta)==null?void 0:l.did]},((r=c.meta)==null?void 0:r.did)||I)})}),p?null:u.jsxs(u.Fragment,{children:[u.jsx(O,{sx:{width:"100%",height:"1px",backgroundColor:z.gray6}}),u.jsx(O,{sx:{padding:"20px 24px"},children:u.jsx(O,{sx:{opacity:1},children:e("componentInstallerSuggestions")})})]})]}):u.jsxs(O,{sx:{display:"flex",flexDirection:"column"},children:[u.jsxs(O,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[i||u.jsx(s1,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),u.jsx(O,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),u.jsx(O,{sx:{flex:1}}),A?u.jsx(_1,{variant:"outlined",className:"button",onClick:_,children:u.jsx(B1,{})}):null]}),u.jsx(O,{sx:{width:"100%",height:"1px",backgroundColor:z.gray6}}),u.jsxs(O,{sx:{padding:"20px 24px",marginTop:0},children:[e("componentInstallerNoDefinedInBlockletYML"),": ",L]})]})})})})]})})}Q.propTypes={disabled:D.bool,warnIcon:D.node,did:D.oneOfType([D.string,D.arrayOf(D.string)]).isRequired,noPermissionMute:D.bool,onInstalled:D.func,onError:D.func,children:D.any.isRequired,closeByOutSize:D.bool,onClose:D.func,fallback:D.node,roles:D.array};Q.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function R1(i){return window.blocklet?u.jsx(Q,{...i}):i.children}R1.propTypes={...Q.propTypes,children:D.any.isRequired};R1.defaultProps={...Q.defaultProps};var n2={},g1={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.MOTIF_COLORS=i.DEFAULT_COLORS=void 0,i.rgbToHsl=d,i.hslToRgb=B,i.getNftBGColor=o,i.getPassportColorFromDid=$,i.getNftBGColorFromDid=A;const L=X1,x=J1;i.DEFAULT_COLORS={"did-space":{start:"#7D3AC5",end:"#9761D1"},"app-space":{start:"#6CC68D",end:"#47B871"},"app-purchase":{start:"#DE7021",end:"#E48D4E"},"app-passport":{start:"#3882C7",end:"#7AB2F6"}},i.MOTIF_COLORS=["#E94E4E","#E41115","#E96B4E","#E5502E","#E98F4E","#E57A2E","#E98F4E","#E5A82E","#DACD5D","#DAC825","#BDD13D","#C8E31C","#AEE94E","#7FD558","#52CC19","#4FC469","#59DE9C","#19CC73","#5ED9D1","#19CCC0","#4ED7E9","#19B7CC","#45ACE8","#1C97DE","#4E68E9","#2E4DE5","#7F4EE9","#682EE5","#BE65E7","#AF40E2","#DF58C2","#E94E8F"];function d(k){const v=k.replace("#",""),h=parseInt(v.slice(0,2),16)/255,m=parseInt(v.slice(2,4),16)/255,e=parseInt(v.slice(4,6),16)/255,s=Math.max(h,m,e),t=Math.min(h,m,e);let a,n;const S=(s+t)/2;if(s===t)a=0,n=0;else{const _=s-t;switch(n=S>.5?_/(2-s-t):_/(s+t),s){case h:a=(m-e)/_+(m<e?6:0);break;case m:a=(e-h)/_+2;break;case e:a=(h-m)/_+4;break}a/=6}return[a,n,S]}function B(k,v,h){let m,e,s;if(v===0)m=h,e=h,s=h;else{const t=(S,_,p)=>{let c=p;return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?S+(_-S)*6*c:c<.5?_:c<.6666666666666666?S+(_-S)*(.6666666666666666-c)*6:S},a=h<.5?h*(1+v):h+v-h*v,n=2*h-a;m=t(n,a,k+1/3),e=t(n,a,k),s=t(n,a,k-1/3)}return`#${[Math.round(m*255),Math.round(e*255),Math.round(s*255)].map(t=>t.toString(16).padStart(2,"0")).join("")}`}function o(k){if(k){const v=d(k),h=[v[0]];v[1]>.7?h.push(.7):h.push(v[1]),v[2]>.6?h.push(.6):v[2]<.3?h.push(.3):h.push(v[2]);const m=[h[0],h[1],h[2]-.1],e=B(...h);return{start:B(...m),end:e}}return i.DEFAULT_COLORS["app-passport"]}function $(k){return`#${(0,L.toHex)(x.Hasher.SHA3.hash224(k)).slice(-6)}`}function A(k){return o($(k))}})(g1);(function(i){var L=J&&J.__createBinding||(Object.create?function(l,r,f,w){w===void 0&&(w=f);var y=Object.getOwnPropertyDescriptor(r,f);(!y||("get"in y?!r.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return r[f]}}),Object.defineProperty(l,w,y)}:function(l,r,f,w){w===void 0&&(w=f),l[w]=r[f]}),x=J&&J.__exportStar||function(l,r){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(r,f)&&L(r,l,f)};Object.defineProperty(i,"__esModule",{value:!0}),i.getSvg=i.nanoid=i.getTagSvg=i.getBadgesSvg=i.getChainBadge=i.getVerifiableBadge=i.getDidSvg=i.getExtraSvg=i.getIssuerSvg=i.getHeaderSvg=i.getLayoutSvg=i.formatDid=void 0;const d=Q1,B=g1;x(g1,i);const o=(l,r)=>[l,r].join("-"),$=228,A=258,k=l=>/^(0x)?[0-9a-f]{40}$/i.test(l),v=l=>{const r=Uint8Array.from(l.slice(2).match(/.{1,2}/g).map(f=>parseInt(f,16))).slice(0,8).reduce((f,w)=>f+w,0)%B.MOTIF_COLORS.length;return B.MOTIF_COLORS[r]},h=(l,r=5)=>l.length>2*r?`${l.slice(0,r)}..${l.slice(-r)}`:l;i.formatDid=h;const m=(l,r,f)=>l==="did-space"?(w,y,j)=>`<svg
|
|
2
2
|
width="${y}"
|
|
3
3
|
height="${j}"
|
|
4
4
|
viewBox="0 0 228 258"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,G as y,P as s,n as b,m as p,
|
|
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-Cww3vDI8.js";import{D as U}from"./index-Dt-hqt8X.js";import{u as L}from"./blocklet-XuJIbMyM.js";import{C as N,M as C}from"./memory-DrO5wNHz.js";import{B as D}from"./bundle-avatar-DtGs2mWp.js";import"./FilterList-LzSA9lp1.js";import"./useThemeProps-Dgbotsr7.js";import"./Select-DfLcTPPw.js";import"./Delete-DAbDwewn.js";import"./InputLabel-hGLRSUVj.js";import"./TextField-BWuX6Gtq.js";import"./LastPage-BSomuocQ.js";import"./index-B89KUtLC.js";import"./redux-B7ppTFhc.js";import"./Search-DkvGGbdo.js";import"./index-COxjgI-I.js";import"./MoreVert-B_ttDoGP.js";import"./chart-BqHdcNMo.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};
|