@abtnode/webapp 1.16.18-beta-bb4ebacc → 1.16.18-beta-f4777312
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/build/asset-manifest.json +14 -14
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/css/{3826.fafc5663.chunk.css → 3826.e34e7247.chunk.css} +2 -2
- package/build/static/js/2168.bf05c6f0.chunk.js +1 -0
- package/build/static/js/2529.cc831e53.chunk.js +1 -0
- package/build/static/js/2960.a86a7714.chunk.js +1 -0
- package/build/static/js/3137.d1066178.chunk.js +1 -0
- package/build/static/js/3826.1e61fa69.chunk.js +2 -0
- package/build/static/js/{3826.95a31ac8.chunk.js.LICENSE.txt → 3826.1e61fa69.chunk.js.LICENSE.txt} +2 -3
- package/build/static/js/3883.2b7cf953.chunk.js +1 -0
- package/build/static/js/{5526.4ee4d769.chunk.js → 5526.4efb7a08.chunk.js} +2 -2
- package/build/static/js/6333.8b0f04fa.chunk.js +1 -0
- package/build/static/js/6580.2c14522e.chunk.js +1 -0
- package/build/static/js/{7534.af6d5d5d.chunk.js → 7534.cea951ab.chunk.js} +1 -1
- package/build/static/js/8382.4ef915cd.chunk.js +1 -0
- package/build/static/js/main.d39032f9.js +2 -0
- package/build/static/js/{main.28ff8680.js.LICENSE.txt → main.d39032f9.js.LICENSE.txt} +1 -1
- package/package.json +1 -1
- package/build/static/js/2960.1e86e38b.chunk.js +0 -1
- package/build/static/js/3826.95a31ac8.chunk.js +0 -2
- package/build/static/js/3883.0bb75a02.chunk.js +0 -1
- package/build/static/js/6580.200b63e3.chunk.js +0 -1
- package/build/static/js/7018.e5975bdd.chunk.js +0 -1
- package/build/static/js/7674.9ec70731.chunk.js +0 -1
- package/build/static/js/8382.fa53a8cc.chunk.js +0 -1
- package/build/static/js/9031.01d3ab20.chunk.js +0 -1
- package/build/static/js/984.90672bbf.chunk.js +0 -1
- package/build/static/js/main.28ff8680.js +0 -2
- /package/build/static/js/{5526.4ee4d769.chunk.js.LICENSE.txt → 5526.4efb7a08.chunk.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[2960],{77327:function(e,n,t){t.r(n),t.d(n,{BlockletList:function(){return me},default:function(){return de}});var o,r,l=t(71171),i=t(33028),a=t(96234),c=t(5057),s=t(33518),u=t(75506),d=t.n(u),m=t(85493),f=t(15849),p=t(67654),h=t(11750),x=t(80576),v=t(51177),Z=t(74490),b=t(39948),g=t(72904),k=t(75760),y=t(49384),j=t(44846),w=t(35966),C=t(25710),P=t(88574),S=t(28726),_=t(68420),A=t(35432),L=t(86229),B=t(81010),R=t(87363),z=t(22228),F=t(32349),T=t(1722),D=t(38242),I=t(75793),M=t(52926),N=t(19762),U=t(78123),E=t(59740),O=t(38898),W=t(24138),V=t(96266),K=["blocklet","skipAccessibilityCheck"];function q(e){var n=e.blocklet,t=e.skipAccessibilityCheck,o=void 0!==t&&t,r=(0,E.Z)(e,K),l=(0,c.useContext)(_.RD).t,a=(0,W.BZ)(n),s=a.urls,u=a.loading,d=a.recommendedUrl;if(u&&!o)return(0,V.jsx)(j.Z,(0,i.Z)({size:12},r));var m=o?s[0]:d;return m?(0,V.jsx)(H,(0,i.Z)((0,i.Z)({},r),{},{children:(0,V.jsx)(G,{children:(0,V.jsx)(O.Z,{href:m,target:"_blank",className:"blocklet-interface",underline:"hover",children:l("common.open")})})})):l("blocklet.router.noAccessibleUrl")}var G=s.Z.div(o||(o=(0,l.Z)(["\n display: flex;\n margin: 4px 0;\n"]))),H=s.Z.div(r||(r=(0,l.Z)(["\n .blocklet-interface {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n white-space: nowrap;\n\n img {\n margin-right: 4px;\n }\n }\n"])));q.defaultProps={skipAccessibilityCheck:!1};var J=t(44919),$=t(17682),Q=t(61813),X=t(31853),Y=t(13128),ee=t(55372),ne=t(47020),te=t(49983),oe=t(73545);function re(e){var n=e.onCancel,t=e.onSuccess,o=(0,I.h6)().info,r=(0,_.PE)().t,l=(0,oe.T)().api,i=(0,X.Z)({loading:!1,error:"",title:"",description:"",isConnectOpen:!1}),c=(0,a.Z)(i,2),s=c[0],u=c[1];return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(Y.ZP,{title:r("blocklet.installFromCreate"),fullWidth:!0,maxWidth:"sm",onClose:function(){return n()},showCloseButton:!0,open:!0,actions:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(S.Z,{onClick:function(e){e.stopPropagation(),n()},color:"inherit",children:r("common.cancel")}),(0,V.jsxs)(S.Z,{onClick:function(e){e.stopPropagation(),u({loading:!0,isConnectOpen:!0})},color:"primary","data-cy":"install-blocklet-next-step",variant:"contained",disabled:s.loading||s.error||!s.title||!s.description,style:{marginLeft:8},children:[s.loading&&(0,V.jsx)(j.Z,{size:16}),r("common.create")]})]}),children:[(0,V.jsx)(ee.Z,{component:"div",children:(0,V.jsxs)(h.Z,{component:"div",children:[(0,V.jsx)(ne.Z,{style:{marginBottom:24},label:"Blocklet ".concat(r("common.title")),autoComplete:"off",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.title,onChange:function(e){u({error:"",title:e.target.value})},disabled:s.loading}),(0,V.jsx)(ne.Z,{label:"Blocklet ".concat(r("common.description")),autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.description,onChange:function(e){u({error:"",description:e.target.value})},disabled:s.loading})]})}),!!s.error&&(0,V.jsx)(P.Z,{type:"error",style:{width:"100%",marginTop:8},children:s.error})]}),(0,V.jsx)(te.Z,{popup:!0,open:s.isConnectOpen,forceConnected:!1,className:"launch-from-create-auth",action:"launch-free-blocklet-by-session",checkFn:l.get,checkTimeout:3e5,webWalletUrl:(0,N.yP)(o),onSuccess:function(e){u({loading:!1,isConnectOpen:!1}),t(e)},extraParams:{title:s.title,description:s.description},messages:{title:r("setup.keyPair.title"),scan:r("setup.keyPair.scan"),confirm:r("setup.keyPair.confirm"),success:r("setup.keyPair.success")},onClose:function(){u({loading:!1,isConnectOpen:!1})}})]})}function le(e){var n=e.onCreate,t=(0,m.useNavigate)(),o=(0,_.PE)().t,r=(0,c.useState)(""),l=(0,a.Z)(r,2),i=l[0],s=l[1],u=(0,c.useState)(""),d=(0,a.Z)(u,2),f=d[0],p=d[1],h=(0,c.useState)(null),x=(0,a.Z)(h,2),v=x[0],Z=x[1],b=(0,c.useState)(null),g=(0,a.Z)(b,2),k=g[0],y=g[1],j=function(){Z(null)};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)($.Z,{onClick:function(){return t("/store")},menuButtonProps:{"data-cy":"open-install-menu"},menu:[(0,V.jsx)($.Z.Item,{"data-cy":"open-install-form",onClick:function(){Z({onCancel:function(){j(),Z(null)},onSuccess:function(){j()}})},children:o("blocklet.installFromUrl")},"1"),(0,V.jsx)($.Z.Item,{"data-cy":"open-create-form",onClick:function(){y({onCancel:function(){y(null)},onSuccess:function(){y(null),n.apply(void 0,arguments)}})},children:o("blocklet.installFromCreate")},"2"),(0,V.jsx)($.Z.Item,{"data-cy":"open-install-from-spaces",onClick:function(){t("/blocklets/restore")},children:o("blocklet.restoreFromSpaces.title")},"3"),(0,V.jsx)($.Z.Item,{"data-cy":"open-install-from-spaces",onClick:function(){return function(){var e=new URL("http://localhost");e.searchParams.set("restoreFrom","server"),e.searchParams.set("serverUrl",window.location.href),t("/blocklets/restore".concat(e.search))}()},children:o("blocklet.installFromDiskBackup")},"3")].filter(Boolean),children:[(0,V.jsx)(J.Z,{}),o("blocklet.installFromMarket")]}),!!i&&(0,V.jsx)(L.Z,{variant:"error",message:i,onClose:function(){return s("")}}),!!f&&(0,V.jsx)(L.Z,{variant:"success",duration:3e3,message:f,onClose:function(){return p("")}}),v&&(0,V.jsx)(Q.Z,{onCancel:v.onCancel,onSuccess:v.onSuccess}),k&&(0,V.jsx)(re,{onCancel:k.onCancel,onSuccess:k.onSuccess})]})}re.defaultProps={},le.defaultProps={onCreate:function(){}};var ie,ae,ce=t(7199),se="internal",ue="external";function de(){return(0,V.jsx)(R.g,{children:(0,V.jsx)(me,{})})}function me(){var e=(0,m.useNavigate)(),n=(0,I.h6)(),t=(0,f.useSearchParams)(),o=(0,a.Z)(t,2),r=o[0],l=o[1],s=(0,M.RJ)(),u=s.data,E=s.externalData,O=s.error,W=s.refresh,K=s.loading,G=(0,R.K)(),H=G.deletingBlocklets,J=G.addDeletingDid,$=G.removeDeletingDid,Q=G.matchDeletingDid,X=(0,_.PE)(),Y=X.t,ee=X.locale,ne=(0,c.useState)(r.get("searchText")),te=(0,a.Z)(ne,2),oe=te[0],re=te[1],ie=(0,p.Z)("show-external-blocklet-actions",!1),ae=(0,a.Z)(ie,1)[0],de=[{id:se,name:Y("blocklet.internal")},{id:ue,name:Y("blocklet.external")}],me=(0,p.Z)("blocklet-type-filter",se),he=(0,a.Z)(me,2),xe=he[0],ve=he[1],Ze=xe===se?u:E,be=(null===n||void 0===n?void 0:n.info.mode)!==A.NODE_MODES.SERVERLESS;Q(Ze.map((function(e){return e.meta.did})));var ge=function(e){var n=e.action,t=e.blocklet;"remove"===n&&J(t.meta.did)},ke=function(e){if(e.error)return L.Z.error(e.error.message),void("remove"===e.action&&$(e.blocklet.meta.did));"remove"===e.action&&n.refresh({silent:!0})},ye=(0,g.Z)((function(e){return e.breakpoints.up("md")})),je=null,we=Ze||[];if(O)je=(0,V.jsx)(P.Z,{type:"error",variant:"icon",children:(0,V.jsxs)("div",{children:[(0,N.Z)(O),(0,V.jsx)(S.Z,{onClick:function(){return W({silent:!1})},children:(0,V.jsx)("span",{style:{color:"#44cdc6",textDecoration:"underline"},children:Y("common.retry")})})]})});else if(we.length>0||K){var Ce=["installedAt","startedAt","stoppedAt","createdAt"],Pe=function(e){if("starting"===e.status)return new Date("2199").getTime();if("running"===e.status){if(e.appRuntimeInfo)return e.appRuntimeInfo.startAt;if(e.startedAt)return e.startedAt.getTime()}return 0},Se=we.map((function(e){return Ce.forEach((function(n){if(e[n]){var t=new Date(e[n]);e[n]=t}})),e})).sort((function(e,n){var t=Pe(e);return Pe(n)-t}));oe&&(Se=Se.filter((function(e){var n,t=(0,D.getDisplayName)(e)||"",o=(null===(n=e.site)||void 0===n?void 0:n.domainAliases)||[],r=oe.trim().toLocaleLowerCase();return e.appDid===oe||e.appPid===oe||t.toLocaleLowerCase().includes(r)||o.some((function(e){var n;return null===(n=e.value)||void 0===n?void 0:n.toLocaleLowerCase().includes(r)}))})));var _e=(0,k.$)("blocklets-list");_e.searchText&&!oe&&re(_e.searchText);var Ae=[{label:Y("common.name"),name:"meta.title",options:{customBodyRenderLite:function(e){var n=Se[e],t=(0,D.getAppMissingConfigs)(n).length>0?"components":"overview";return(0,V.jsx)(f.Link,{to:"/blocklets/".concat(n.meta.did,"/").concat(t),className:"blocklet-name-wrapper",children:(0,V.jsxs)(h.Z,{component:"strong",variant:"body1",className:"blocklet-name",children:[(0,V.jsx)(T.Z,{blocklet:n,style:{marginRight:8}}),(0,V.jsxs)(b.Z,{children:[(0,V.jsx)(b.Z,{children:(0,D.getDisplayName)(n)}),(0,V.jsxs)(b.Z,{children:[(0,V.jsx)(F.Z,{mode:n.mode||""}),!d()(n.controller)&&(0,V.jsx)(z.Z,{type:"primary",children:Y("blocklet.external")})]})]})]})},n.meta.did)}}},xe===se?{label:Y("common.visit"),name:"runtimeInfo.pid",align:"left",options:{sort:!1,customBodyRenderLite:function(e){var n=Se[e];return(0,V.jsx)(q,{blocklet:n},n.meta.did)}}}:null,{label:Y("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite:function(e){var n=Se[e];return"running"===n.status&&n.appRuntimeInfo?(0,V.jsx)(y.Z,{value:n.appRuntimeInfo.startAt,locale:ee},n.meta.did):""}}},{label:Y("common.installedAt"),name:"installedAt",options:{customBodyRenderLite:function(e){var n=Se[e];return n.installedAt?(0,V.jsx)(y.Z,{value:n.installedAt.getTime(),locale:ee},n.meta.did):n.createdAt?(0,V.jsx)(y.Z,{value:n.createdAt.getTime(),locale:ee},n.meta.did):""}}},{label:Y("common.updatedAt"),name:"updatedAt",options:{customBodyRenderLite:function(e){var n=Se[e];return(0,V.jsx)(y.Z,{value:n.updatedAt,locale:ee},n.meta.did)}}},{label:Y("common.status"),name:"status",width:120,align:"center",options:{customBodyRenderLite:function(e){var n=Se[e];return(0,V.jsx)(B.Z,{"data-cy":"blocklet-status","status-blocklet-did":n.meta.did,status:H.includes(n.meta.did)?"deleting":n.status,source:n.source},n.meta.did)}}},xe===se||ae?{label:Y("common.actions"),name:"",width:90,options:{sort:!1,customBodyRenderLite:function(e){var n=Se[e];return(0,V.jsx)(U.Z,{blocklet:n,variant:"menu",onStart:ge,onComplete:ke},n.meta.did)}}}:null].filter(Boolean),Le={};ye||(Le.TableBody=function(e){if(K)return(0,V.jsx)(w.Z,{relative:"parent",children:(0,V.jsx)(j.Z,{})});var n=e.page,t=e.rowsPerPage,o=Se.slice(n*t,(n+1)*t);return o.length?(0,V.jsx)("div",{children:o.map((function(e){var n=(0,D.getAppMissingConfigs)(e).length>0?"components":"overview";return(0,V.jsxs)(b.Z,{className:"blocklet-item--mobile",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,V.jsx)(T.Z,{className:"blocklet__avatar",blocklet:e,size:ye?40:60}),(0,V.jsxs)(f.Link,{className:"blocklet__content",to:"/blocklets/".concat(e.meta.did,"/").concat(n),children:[(0,V.jsxs)(b.Z,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[(0,V.jsx)(h.Z,{component:"strong",variant:"body1",className:"blocklet__name",children:(0,D.getDisplayName)(e,!0)}),(0,V.jsx)(U.Z,{blocklet:e,variant:"menu",onStart:ge,onComplete:ke},e.meta.did)]}),(0,V.jsxs)(h.Z,{component:"small",className:"blocklet__addons",children:[(0,V.jsx)(b.Z,{display:"flex",alignItems:"center",children:(0,V.jsx)(q,{blocklet:e,style:{marginLeft:16,fontSize:14}})}),(0,V.jsx)(B.Z,{"status-blocklet-did":e.meta.did,status:e.status,source:e.source},e.meta.did)]})]})]})}))}):(0,V.jsx)(C.Z,{children:Y("common.empty")})}),je=(0,V.jsx)(fe,{children:(0,V.jsx)(k.Z,{loading:K,className:"blocklet-list",title:(0,V.jsx)(b.Z,{display:"flex",alignItems:"center",children:Y("blocklet.index.tableTitle")}),locale:ee,data:Se,columns:Ae,durable:"blocklets-list",options:(0,i.Z)((0,i.Z)({download:!1,filter:!1,print:!1,searchPlaceholder:Y("common.search"),searchAlwaysOpen:!1,sortOrder:{name:"uptime",direction:"desc"},searchDebounceTime:300,onSearchChange:function(e){re(e),l({searchText:null!==e&&void 0!==e?e:""})},customSearch:function(){return!0}},_e),{},{searchText:oe}),components:Le})})}else 0===we.length&&(je=(0,V.jsx)(P.Z,{type:"warning",variant:"icon",children:Y("blocklet.index.noBlocklet")}));var Be=E&&E.length>0;return(0,V.jsxs)(pe,{children:[(0,V.jsxs)(h.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[(0,V.jsxs)(b.Z,{display:"flex",alignItems:"center",children:[Y("common.blocklets"),(Be||xe===ue)&&(0,V.jsx)(x.Z,{sx:{ml:1},children:(0,V.jsx)(v.Z,{value:xe,onChange:function(e){return ve(e.target.value)},size:"small",children:de.map((function(e){return(0,V.jsx)(Z.Z,{value:e.id,children:Y(e.name)},e.id)}))})})]}),(0,V.jsx)(ce.Z,{permission:"mutate_blocklets",children:be&&(0,V.jsx)(le,{onCreate:function(n){e("/blocklets/".concat(n.appDid,"/components"))}})})]}),je]})}var fe=s.Z.div(ie||(ie=(0,l.Z)(["\n .blocklet-item--mobile {\n padding: 16px 0;\n }\n"]))),pe=s.Z.main(ae||(ae=(0,l.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .blocklet-list {\n .blocklet-item--mobile {\n .blocklet__avatar {\n margin-right: -60px;\n }\n .blocklet__content {\n padding-left: 68px;\n flex: 1;\n display: flex;\n flex-direction: column;\n z-index: 1;\n }\n .blocklet__name {\n font-weight: bold;\n text-decoration: none;\n white-space: normal;\n word-break: break-all;\n }\n .blocklet__addons {\n display: flex;\n justify-content: space-between;\n margin-top: 5px;\n margin-bottom: -10px;\n }\n }\n .blocklet-name-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n }\n .blocklet-name {\n font-weight: bold;\n text-decoration: underline;\n display: flex;\n align-items: center;\n white-space: normal;\n word-break: break-all;\n }\n\n .blocklet-interface {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n img {\n margin-right: 4px;\n }\n }\n\n .MuiToolbar-root {\n display: flex;\n }\n }\n"])))},61813:function(e,n,t){t.d(n,{Z:function(){return L}});var o=t(33028),r=t(32723),l=t(34795),i=t(96234),a=t(5057),c=t(55898),s=t.n(c),u=t(13128),d=t(44846),m=t(55372),f=t(11750),p=t(47020),h=t(20870),x=t(31089),v=t(71767),Z=t(64886),b=t(49983),g=t(68420),k=t(28726),y=t(88574),j=t(38242),w=t(58238),C=t(73545),P=t(14491),S=t(4651),_=t(17450),A=t(96266);function L(e){var n=e.defaultUrl,t=e.onCancel,c=e.onSuccess,s=e.onError,L=e.mode,B=e.handleText,R=(0,w.h6)().api,z=(0,C.T)().api,F=(0,a.useState)(!1),T=(0,i.Z)(F,2),D=T[0],I=T[1],M=(0,a.useState)(""),N=(0,i.Z)(M,2),U=N[0],E=N[1],O=(0,g.PE)().t,W={dist:{}},V=(0,a.useState)(n),K=(0,i.Z)(V,2),q=K[0],G=K[1],H=(0,a.useState)(n?1:0),J=(0,i.Z)(H,2),$=J[0],Q=J[1],X=(0,a.useState)(W),Y=(0,i.Z)(X,2),ee=Y[0],ne=Y[1],te=(0,a.useState)(!1),oe=(0,i.Z)(te,2),re=oe[0],le=oe[1],ie=(0,a.useState)({}),ae=(0,i.Z)(ie,2),ce=ae[0],se=ae[1],ue="component"===L,de=!!ue||!n,me=function(){var e=(0,l.Z)((0,r.Z)().mark((function e(){var n,t,o,l,i,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ne(W),E(null),I(!0),e.prev=3,n=decodeURIComponent(q.trim()),e.prev=5,new URL(n),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(5),new Error("Invalid URL");case 12:return e.next=14,R.getBlockletMetaFromUrl({input:{url:n}});case 14:t=e.sent,o=t.meta,l=t.inStore,i=t.registryUrl,ne(o),se({inStore:l,registryUrl:i,inputUrl:q.trim()}),e.next=28;break;case 22:e.prev=22,e.t1=e.catch(3),console.error(e.t1),a="Blocklet Install failed: ".concat((0,P.Z)(e.t1)),E(a),s(e.t1);case 28:return e.prev=28,I(!1),e.finish(28);case 31:case"end":return e.stop()}}),e,null,[[3,22,28,31],[5,9]])})));return function(){return e.apply(this,arguments)}}();(0,a.useEffect)((function(){n&&me()}),[n]);var fe=[{name:O("common.name"),value:(0,j.getDisplayName)({meta:ee},!0)},{name:O("common.version"),value:ee.version},{name:O("common.did"),value:(0,A.jsx)(_.Z,{did:ee.did})},{name:O("common.author"),value:(0,P.rq)(ee.author)},{name:O("blocklet.dist.downloadLink"),value:ee.dist.tarball}],pe=[{label:O("blocklet.fromUrl.step0"),body:(0,A.jsx)(f.Z,{component:"div",children:(0,A.jsx)(p.Z,{label:O("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:O("blocklet.fromUrl.description"),value:q,onChange:function(e){E(null),G(e.target.value)},disabled:D,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),me(),Q(1))}})}),cancel:O("common.cancel"),confirm:O("common.next"),onCancel:t,onConfirm:function(){me(),Q(1)}},{label:O("blocklet.fromUrl.step1"),body:D?(0,A.jsx)("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:(0,A.jsx)(d.Z,{})}):ee.did?(0,A.jsx)("div",{style:{paddingLeft:"10%"},children:fe.map((function(e){return e.name===O("common.did")?(0,A.jsx)(Z.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return O("common.did")},children:e.value},e.name):(0,A.jsx)(Z.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)}))}):null,cancel:O(de?"common.pre":"common.cancel"),confirm:(null===B||void 0===B?void 0:B.confirm)||O("blocklet.fromUrl.confirm"),onCancel:function(){de?Q((function(e){return e-1})):t()},onConfirm:function(){!function(){if(ue)return c((0,o.Z)({meta:ee},ce)),void t();I(!0),le(!0)}()}}],he=pe[$];return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(u.ZP,{title:(null===B||void 0===B?void 0:B.title)||O("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:function(){return he.onCancel()},showCloseButton:0===$,disableEscapeKeyDown:!0,open:!0,actions:(0,A.jsxs)(A.Fragment,{children:[he.cancel&&(0,A.jsx)(k.Z,{onClick:function(e){e.stopPropagation(),E(null),he.onCancel()},color:"inherit",children:he.cancel||O("common.cancel")}),(0,A.jsxs)(k.Z,{onClick:function(e){e.stopPropagation(),he.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:D||!q||U,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[D&&0===$&&(0,A.jsx)(d.Z,{size:16}),he.confirm]})]}),children:[de&&(0,A.jsx)(h.Z,{alternativeLabel:!0,activeStep:$,children:pe.map((function(e){var n=e.label;return(0,A.jsx)(x.Z,{children:(0,A.jsx)(v.Z,{children:n})},n)}))}),(0,A.jsx)(m.Z,{component:"div",style:{marginTop:24},children:he.body}),!!U&&(0,A.jsx)(y.Z,{type:"error",style:{width:"100%",marginTop:8},children:U})]}),ee&&re&&(0,A.jsx)(b.Z,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:z.get,checkTimeout:3e5,onSuccess:function(){I(!1),le(!1),c((0,o.Z)({meta:ee},ce)),t()},extraParams:{title:ee.title,wt:(0,S.iK)(ee),blockletMetaUrl:decodeURIComponent(q.trim())},messages:{title:O("setup.keyPair.title"),scan:O("setup.keyPair.scan"),confirm:O("setup.keyPair.confirm"),success:O("setup.keyPair.success")},onClose:function(){I(!1),le(!1)}})]})}L.propTypes={defaultUrl:s().string,onCancel:s().func.isRequired,onSuccess:s().func.isRequired,onError:s().func,mode:s().oneOf(["install","component"]),handleText:s().object},L.defaultProps={onError:function(){},defaultUrl:"",mode:"install",handleText:{}}},32349:function(e,n,t){t.d(n,{Z:function(){return u}});var o=t(33028),r=t(59740),l=t(55898),i=t.n(l),a=t(22228),c=t(96266),s=["mode"];function u(e){var n=e.mode,t=(0,r.Z)(e,s);return"development"===n?(0,c.jsx)(a.Z,(0,o.Z)((0,o.Z)({type:"primary"},t),{},{children:"DEV"})):null}u.propTypes={mode:i().string.isRequired}},64886:function(e,n,t){var o,r=t(71171),l=t(33028),i=t(59740),a=t(55898),c=t.n(a),s=t(51540),u=t.n(s),d=t(26538),m=t.n(d),f=t(11750),p=t(47685),h=t(96266),x=["name","nameFormatter","layout","children","valueComponent","nameWidth"];function v(e){var n=e.name,t=e.nameFormatter,o=e.layout,r=e.children,a=e.valueComponent,c=e.nameWidth,s=(0,i.Z)(e,x);return(0,h.jsxs)(Z,(0,l.Z)((0,l.Z)({layout:o,width:c},s),{},{children:[(0,h.jsx)(f.Z,{color:"textSecondary",className:"info-row__name",children:t(n)}),r&&(0,h.jsx)(f.Z,{color:"textPrimary",component:a,className:"info-row__value",children:r})]}))}v.propTypes={name:c().any.isRequired,layout:c().oneOf(["horizontal","vertical"]),children:c().any,nameFormatter:c().func,valueComponent:c().string,nameWidth:c().number},v.defaultProps={children:null,nameWidth:90,nameFormatter:function(e){var n=e.split(" ").map((function(e){return m()(u()(e))})).join(" ");return"string"===typeof e?n:e},valueComponent:"div",layout:"horizontal"};var Z=(0,p.zo)("div")(o||(o=(0,r.Z)(["\n display: flex;\n flex-direction: ",";\n justify-content: flex-start;\n align-items: ",";\n margin-bottom: 16px;\n\n .info-row__name {\n width: ","px;\n margin-right: ",";\n margin-bottom: ",";\n text-transform: capitalize;\n }\n\n .info-row__value {\n flex: 1;\n overflow: auto;\n word-wrap: break-word;\n font-weight: 500;\n }\n\n @media (max-width: ","px) {\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n .info-row__name {\n font-weight: bold;\n }\n\n .info-row__value {\n width: 100%;\n font-size: 12px;\n margin-top: 8px;\n }\n }\n"])),(function(e){return"vertical"===e.layout?"column":"row"}),(function(e){return"vertical"===e.layout?"flex-start":"center"}),(function(e){return e.width}),(function(e){return"vertical"===e.layout?"0":"8px"}),(function(e){return"vertical"===e.layout?"8px":"0"}),(function(e){return e.theme.breakpoints.values.md}));n.Z=v},17682:function(e,n,t){t.d(n,{Z:function(){return j}});var o,r,l=t(71171),i=t(33028),a=t(96234),c=t(59740),s=t(5057),u=t(55898),d=t.n(u),m=t(76720),f=t(24202),p=t(25228),h=t(37200),x=t(1733),v=t(74490),Z=t(49127),b=t(56556),g=t(47685),k=t(96266),y=["size","color","menu","children","variant","onClick","menuButtonProps"];function j(e){var n=e.size,t=e.color,o=e.menu,r=e.children,l=e.variant,u=e.onClick,d=e.menuButtonProps,f=(0,c.Z)(e,y),Z=(0,s.useState)(!1),g=(0,a.Z)(Z,2),j=g[0],P=g[1],S=(0,s.useRef)(null),_=Array.isArray(o)?o.map((function(e,n){return(0,s.isValidElement)(e)?e:(0,s.createElement)(v.Z,(0,i.Z)((0,i.Z)({},e),{},{key:n}))})):o;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(w,(0,i.Z)((0,i.Z)({variant:l,size:n,color:t,ref:S},f),{},{children:["function"===typeof r?r():(0,k.jsx)(b.Z,{onClick:u,color:t,children:r}),(0,k.jsx)(b.Z,(0,i.Z)((0,i.Z)({onClick:function(){P((function(e){return!e}))},color:t},d),{},{"aria-label":"more functions",children:(0,k.jsx)(m.Z,{})}))]})),(0,k.jsx)(C,{open:j,anchorEl:S.current,placement:"bottom-end",disablePortal:!1,children:(0,k.jsx)(p.Z,{children:(0,k.jsx)(h.d,{onClickAway:function(e){S.current&&S.current.contains(e.target)||P(!1)},children:(0,k.jsx)(x.Z,{onClick:function(e){e.target.closest(".MuiMenuItem-root")&&P(!1)},children:_})})})})]})}j.propTypes={size:d().oneOf(["small","medium","large"]),color:d().oneOf(["primary","secondary","inherit"]),menu:d().oneOfType([d().node,d().array]),children:d().node,variant:d().oneOf(["outlined","contained"]),onClick:d().func,menuButtonProps:d().object},j.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:function(){},menuButtonProps:{}},j.Item=v.Z;var w=(0,g.zo)(Z.Z)(o||(o=(0,l.Z)(["\n > .MuiButtonBase-root:last-of-type {\n min-width: 2em;\n padding-left: 0;\n padding-right: 0;\n }\n"]))),C=(0,g.zo)(f.Z)(r||(r=(0,l.Z)(["\n z-index: ",";\n .MuiList-root {\n padding: 4px 0;\n }\n .MuiListItem-root {\n padding-top: 4px;\n padding-bottom: 4px;\n }\n"])),(function(e){return e.theme.zIndex.tooltip}))},44919:function(e,n,t){var o=t(71600);n.Z=void 0;var r=o(t(56930)),l=t(96266),i=(0,r.default)((0,l.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");n.Z=i},27773:function(e,n,t){var o=t(71600);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(t(56930)),l=t(96266),i=(0,r.default)((0,l.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");n.default=i},83294:function(e,n,t){var o=t(71600);n.Z=void 0;var r=o(t(56930)),l=t(96266),i=(0,r.default)((0,l.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");n.Z=i},25506:function(e,n,t){var o=t(31461),r=t(7896),l=t(5057),i=t(9978),a=t(91213),c=t(62773),s=t(42908),u=t(81937),d=t(38038),m=t(43070),f=t(96266),p=["className","row"],h=(0,c.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:function(e,n){var t=e.ownerState;return[n.root,t.row&&n.row]}})((function(e){var n=e.ownerState;return(0,r.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},n.row&&{flexDirection:"row"})})),x=l.forwardRef((function(e,n){var t=(0,s.Z)({props:e,name:"MuiFormGroup"}),l=t.className,c=t.row,x=void 0!==c&&c,v=(0,o.Z)(t,p),Z=(0,d.Z)(),b=(0,m.Z)({props:t,muiFormControl:Z,states:["error"]}),g=(0,r.Z)({},t,{row:x,error:b.error}),k=function(e){var n=e.classes,t={root:["root",e.row&&"row",e.error&&"error"]};return(0,a.Z)(t,u.y,n)}(g);return(0,f.jsx)(h,(0,r.Z)({className:(0,i.Z)(k.root,l),ownerState:g,ref:n},v))}));n.Z=x},81937:function(e,n,t){t.d(n,{y:function(){return l}});var o=t(31821),r=t(18561);function l(e){return(0,r.Z)("MuiFormGroup",e)}var i=(0,o.Z)("MuiFormGroup",["root","row","error"]);n.Z=i},4601:function(e,n,t){t(5057);var o=t(57471),r=t(96266);n.Z=(0,o.Z)((0,r.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},50999:function(e,n,t){t(5057);var o=t(57471),r=t(96266);n.Z=(0,o.Z)((0,r.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")}}]);
|