@abtnode/blocklet-services 1.16.17-beta-703fb879 → 1.16.17-beta-a8cf4b25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +15 -13
- package/api/libs/connect/session.js +1 -1
- package/api/routes/federated.js +0 -1
- package/api/routes/oauth.js +1 -2
- package/api/routes/user-session.js +31 -5
- package/api/services/auth/connect/invite.js +24 -2
- package/build/asset-manifest.json +61 -69
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/service-worker.js.map +1 -1
- package/build/static/js/1148.4b2a7347.chunk.js +2 -0
- package/build/static/js/218.74e73a26.chunk.js +2 -0
- package/build/static/js/2653.6610534f.chunk.js +2 -0
- package/build/static/js/3025.a48c96f5.chunk.js +2 -0
- package/build/static/js/3033.6623d19d.chunk.js +2 -0
- package/build/static/js/3131.672170fb.chunk.js +2 -0
- package/build/static/js/3688.735c65ce.chunk.js +2 -0
- package/build/static/js/4022.5ec79b56.chunk.js +2 -0
- package/build/static/js/4076.bcc72fcc.chunk.js +2 -0
- package/build/static/js/4587.906e3023.chunk.js +2 -0
- package/build/static/js/4716.b0917145.chunk.js +2 -0
- package/build/static/js/4802.fe56c787.chunk.js +2 -0
- package/build/static/js/4961.89add60c.chunk.js +3 -0
- package/build/static/js/5662.34df2fcd.chunk.js +2 -0
- package/build/static/js/{5982.d9eb7e90.chunk.js → 5982.4f8369df.chunk.js} +2 -2
- package/build/static/js/6084.30821f2c.chunk.js +3 -0
- package/build/static/js/6139.cabc22a2.chunk.js +2 -0
- package/build/static/js/6658.090d923f.chunk.js +2 -0
- package/build/static/js/{716.438b9c22.chunk.js → 716.703a9880.chunk.js} +3 -3
- package/build/static/js/779.b64e7db1.chunk.js +2 -0
- package/build/static/js/7832.741ac84f.chunk.js +2 -0
- package/build/static/js/7858.e4167dfd.chunk.js +2 -0
- package/build/static/js/8622.2a685bf5.chunk.js +2 -0
- package/build/static/js/{8641.f2bb0ffc.chunk.js → 8641.506d61d5.chunk.js} +2 -2
- package/build/static/js/8702.2d858942.chunk.js +2 -0
- package/build/static/js/8792.8b009f81.chunk.js +2 -0
- package/build/static/js/8944.70ff7557.chunk.js +2 -0
- package/build/static/js/{9596.0e51cd6e.chunk.js → 9596.5251398b.chunk.js} +2 -2
- package/build/static/js/9900.cce3f786.chunk.js +2 -0
- package/build/static/js/main.5f0a940b.js +3 -0
- package/build/static/js/{main.3cf7fedb.js.LICENSE.txt → main.5f0a940b.js.LICENSE.txt} +9 -0
- package/package.json +33 -33
- package/api/util/user-session.js +0 -47
- package/build/static/js/1148.e5dc907a.chunk.js +0 -2
- package/build/static/js/2653.6a6c1c6c.chunk.js +0 -2
- package/build/static/js/3025.e2b1dac4.chunk.js +0 -2
- package/build/static/js/3033.1bbcc14e.chunk.js +0 -2
- package/build/static/js/3131.f75fa792.chunk.js +0 -2
- package/build/static/js/3688.2cea0226.chunk.js +0 -2
- package/build/static/js/4076.e73cb63a.chunk.js +0 -2
- package/build/static/js/4355.f459ab57.chunk.js +0 -2
- package/build/static/js/4587.5b31e02e.chunk.js +0 -2
- package/build/static/js/4716.1ecc2bb6.chunk.js +0 -2
- package/build/static/js/4802.d185b9f1.chunk.js +0 -2
- package/build/static/js/4932.c7c954aa.chunk.js +0 -2
- package/build/static/js/4946.dbbdb25b.chunk.js +0 -2
- package/build/static/js/5012.551dbbc3.chunk.js +0 -2
- package/build/static/js/5662.919cc4a2.chunk.js +0 -2
- package/build/static/js/5969.2791e4e5.chunk.js +0 -3
- package/build/static/js/6139.cf6eb9b1.chunk.js +0 -2
- package/build/static/js/6465.e704f56b.chunk.js +0 -3
- package/build/static/js/6473.d89e783e.chunk.js +0 -2
- package/build/static/js/6658.0a27e04e.chunk.js +0 -2
- package/build/static/js/779.99b3f0d2.chunk.js +0 -2
- package/build/static/js/7858.bac05f8f.chunk.js +0 -2
- package/build/static/js/8622.8478c900.chunk.js +0 -2
- package/build/static/js/8702.957f131a.chunk.js +0 -2
- package/build/static/js/873.d6d31b32.chunk.js +0 -3
- package/build/static/js/873.d6d31b32.chunk.js.LICENSE.txt +0 -8
- package/build/static/js/8792.eff43237.chunk.js +0 -2
- package/build/static/js/8944.09a1c53a.chunk.js +0 -2
- package/build/static/js/9403.b72e020c.chunk.js +0 -2
- package/build/static/js/9900.b66896e6.chunk.js +0 -2
- package/build/static/js/main.3cf7fedb.js +0 -3
- /package/build/static/js/{5969.2791e4e5.chunk.js.LICENSE.txt → 4961.89add60c.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6465.e704f56b.chunk.js.LICENSE.txt → 6084.30821f2c.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{716.438b9c22.chunk.js.LICENSE.txt → 716.703a9880.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[4076],{34076:function(e,n,o){o.r(n),o.d(n,{default:function(){return b}});var t=o(33028),r=o(59740),s=o(96234),i=o(30969),a=o(30734),c=o(86822),l=o(38361),u=o(6779),p=o(94308),f=o(92522),d=o.n(f),g=o(70678),m=o.n(g),h=o(46121),w=o(49476),v=o(20244),I=o(238),y=o(1986),k=o(26022),x=o(86776),T=o(4485),P=o(37574),S=["action","extraParams","messages"],Z=["encrypted"],_="authorization_response";function b(){var e=(0,i.useRef)(null),n=(0,x.Z)().getPassportId,o=(0,T.Tt)(),f=o.session,g=o.connectApi,b=(0,k.PE)(),C=b.t,E=b.locale,R=(0,a.useNavigate)(),N=(0,c.lr)(),L=(0,s.Z)(N,1)[0],O={};try{O=JSON.parse(decodeURIComponent(atob(L.get("params"))))}catch(X){console.warn("parse connect params failed")}var U=O,j=U.action,z=void 0===j?"login":j,A=U.extraParams,J=void 0===A?{}:A,F=U.messages,M=(0,r.Z)(U,S),W=L.get("redirect");J.passportId=n(),"login"===z&&m()(M.forceConnected)&&(M.forceConnected=!1);var D=(0,i.useMemo)((function(){return window.opener?"popup":window.self!==window.parent?"iframe":"page"}),[]),H=function(e,n){var o=e.encrypted,t=void 0===o||o,s=(0,r.Z)(e,Z);t&&(s.sessionToken&&(s.sessionToken=n(s.sessionToken)),s.refreshToken&&(s.refreshToken=n(s.refreshToken)),s.visitorId&&(s.visitorId=n(s.visitorId))),s.visitorId&&localStorage.setItem("__visitor_id",s.visitorId);var i={type:_,response:s};({page:function(){setTimeout((function(){if(W){var e,n=decodeURIComponent(W);e=d()(n)?new URL(n):new URL(n,window.location.origin),s.sessionToken&&e.searchParams.set("sessionToken",s.sessionToken),s.refreshToken&&e.searchParams.set("refreshToken",s.refreshToken),s.visitorId&&e.searchParams.set("visitorId",s.visitorId),d()(n)?window.location=e.href:R("".concat(e.pathname).concat(e.search),{replace:!0})}else window.location=window.env.pathPrefix||"/"}),50)},iframe:function(){window.parent.postMessage(i,"*")},popup:function(){window.opener.postMessage(i,"*")}})[D]()},K=function(e){var n={type:_,error:e.message,errorDescription:e.message};({page:function(){y.Z.error(e.message)},iframe:function(){window.parent.postMessage(n,"*")},popup:function(){window.opener.postMessage(n,"*")}})[D]()},V=(0,h.Z)((function(){if("login"!==z)return null;var e=window.blocklet.trustedFactories||[];return(0,P.jsxs)(l.Z,{textAlign:"center",fontSize:14,children:[(0,P.jsx)(c.rU,{to:"".concat(v.WELLKNOWN_SERVICE_PATH_PREFIX,"/lost-passport?redirect=").concat(encodeURIComponent("".concat(window.location.pathname).concat(window.location.search))),style:{marginRight:24,color:"#4598FA"},children:C("lostPassport.title")},"lost-passport"),e.length>0&&(0,P.jsx)(u.Z,{title:C("exchangePassport.tooltip",{collections:e.map((function(e){return e.factoryAddress}))}),placement:"top-end",enterTouchDelay:0,children:(0,P.jsx)(c.rU,{to:"".concat(v.WELLKNOWN_SERVICE_PATH_PREFIX,"/exchange-passport?redirect=").concat(encodeURIComponent(W||"/")),style:{color:"#4598FA"},children:C("exchangePassport.title")},"exchange-passport")})]})}),[z]);return(0,w.Z)((function(){e.current&&setTimeout((function(){g.open((0,t.Z)((0,t.Z)({locale:E,action:z,extraParams:J},M),{},{containerEl:e.current,className:"connect",popup:!1,messages:F||{title:C("login.dialog.title"),scan:C("login.dialog.scan"),confirm:C("login.dialog.confirm"),success:C("login.dialog.success")},extraContent:V,onSuccess:H,onError:K}))}))})),f.loading?(0,P.jsx)(I.Z,{children:(0,P.jsx)(p.Z,{})}):(0,P.jsx)(l.Z,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:e})}},86776:function(e,n,o){o.d(n,{Z:function(){return s}});var t=o(96234),r=o(17708);function s(){var e=(0,r.Z)("passportId",""),n=(0,t.Z)(e,3),o=n[0],s=n[1],i=n[2];return{getPassportId:function(){return setTimeout((function(){i()}),0),o||""},setPassportId:s}}},17708:function(e,n,o){var t=o(30969),r=o(46378);n.Z=function(e,n,o){if(!r.isBrowser)return[n,r.noop,r.noop];if(!e)throw new Error("useLocalStorage key may not be falsy");var s=o?o.raw?function(e){return e}:o.deserializer:JSON.parse,i=t.useRef((function(e){try{var t=o?o.raw?String:o.serializer:JSON.stringify,r=localStorage.getItem(e);return null!==r?s(r):(n&&localStorage.setItem(e,t(n)),n)}catch(a){return n}})),a=t.useState((function(){return i.current(e)})),c=a[0],l=a[1];t.useLayoutEffect((function(){return l(i.current(e))}),[e]);var u=t.useCallback((function(n){try{var t="function"===typeof n?n(c):n;if("undefined"===typeof t)return;var r=void 0;r=o?o.raw?"string"===typeof t?t:JSON.stringify(t):o.serializer?o.serializer(t):JSON.stringify(t):JSON.stringify(t),localStorage.setItem(e,r),l(s(r))}catch(a){}}),[e,l]),p=t.useCallback((function(){try{localStorage.removeItem(e),l(void 0)}catch(a){}}),[e,l]);return[c,u,p]}}}]);
|
|
2
|
+
//# sourceMappingURL=4076.bcc72fcc.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[4587],{34587:function(n,e,t){t.r(e),t.d(e,{default:function(){return q}});var r,o,i,a,l=t(71171),c=t(32723),s=t(34795),d=t(33028),p=t(96234),u=t(59740),h=t(30969),f=t(86822),v=t(16380),m=t(54470),x=t(38361),g=t(8825),b=t(60680),j=t(46672),w=t(19638),y=t(29996),Z=t(26022),z=t(1986),k=t(62399),O=t(36558),P=t(12268),_=t(238),S=t(59505),C=t(94308),N=t(75255),M=t(47650),E=t(7017),L=t(20244),D=t(99574),R=t(24891),I=t(83364),T=t(99042),V=t(48952),A=t(4485),B=t(38507),H=t(37574),U=["appInfo"];function F(n){var e=n.appInfo,t=(0,u.Z)(n,U),r=(0,h.useState)(!1),o=(0,p.Z)(r,2),i=o[0],a=o[1],l=(0,N.Z)((function(n){return n.breakpoints.down("md")}))?32:48;return i?(0,H.jsx)(k.Z,{did:e.publisher,size:l}):(0,H.jsx)(P.Z,(0,d.Z)((0,d.Z)({src:e.icon,alt:e.title,width:l,height:l},t),{},{onError:function(){return a(!0)}}))}var W=function(n,e){return(0,E.findComponentByIdV2)(n,e)||n};function q(){var n,e,t,r=(0,Z.PE)(),o=r.t,i=r.locale,a=(0,h.useState)(null),l=(0,p.Z)(a,2),d=l[0],u=l[1],v=(0,h.useState)(null),j=(0,p.Z)(v,2),k=j[0],P=j[1],U=(0,h.useState)(!1),q=(0,p.Z)(U,2),Q=q[0],Y=q[1],$=(0,h.useState)(!1),nn=(0,p.Z)($,2),en=nn[0],tn=nn[1],rn=(0,N.Z)((function(n){return n.breakpoints.down("md")})),on=new URL(window.location.href),an=on.searchParams.get("componentId"),ln=function(){var n=on.searchParams.get("redirect")||"/";window.location=decodeURIComponent(n)},cn=function(){var n=setInterval((function(){T.Z.get("/blocklet/detail").then((function(e){var t=e.data,r=W(t,an);"running"!==r.status?"starting"!==r.status&&(tn(!1),u(t),t!==r&&P(r),clearInterval(n)):ln()})).catch((function(n){Y(!1),z.Z.error(n.message)}))}),3e3)};(0,h.useEffect)((function(){Y(!0),T.Z.get("/blocklet/detail").then(function(){var n=(0,s.Z)((0,c.Z)().mark((function n(e){var t,r,o;return(0,c.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.data,r=W(t,an),!(o=t.controller)){n.next=7;break}return n.next=6,(0,R.Nh)(o.chainHost,o.nftId);case 6:t.nftState=n.sent;case 7:if(Y(!1),"running"!==r.status){n.next=11;break}return ln(),n.abrupt("return");case 11:u(t),t!==r&&P(r),"starting"===r.status&&(tn(!0),cn());case 14:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()).catch((function(n){Y(!1),z.Z.error(n.message)}))}),[]);var sn=(0,h.useCallback)((function(){Y(!0),tn(!0);var n={did:d.meta.did};k&&(n.componentDids=[k.meta.did]),V.Z.startBlocklet({input:n}).then((function(){cn()})).catch((function(n){z.Z.error(n.message),Y(!1),tn(!1)}))}),[k,d]);if(!d)return(0,H.jsx)(_.Z,{children:(0,H.jsx)(C.Z,{})});var dn={icon:"".concat(L.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),title:(0,E.getDisplayName)(d),publisher:d.appDid},pn=localStorage.getItem("blocklet-server-url");return(0,H.jsxs)(K,{children:[(0,H.jsx)(m.Global,{styles:G}),(0,H.jsxs)("header",{className:"root-header",children:[!rn&&(0,H.jsx)("div",{className:"left",children:(0,H.jsx)(M.Z,{width:"128",height:"48",onClick:function(){pn&&window.open(pn)},style:{cursor:pn?"pointer":""}})}),(0,H.jsx)("div",{className:"right",children:(0,H.jsx)(D.Z,{SessionContext:A.B3})})]}),(0,H.jsxs)(X,{elevation:0,children:[(0,H.jsxs)(J,{children:[(0,H.jsx)(F,{appInfo:dn}),(0,H.jsxs)("div",{className:"app-info_content",children:[(0,H.jsx)(x.Z,{className:"app-info_name",children:dn.title}),(0,H.jsx)(O.Z,{size:14,className:"app-info_did",did:dn.publisher})]})]}),(null===d||void 0===d||null===(n=d.controller)||void 0===n||null===(e=n.status)||void 0===e?void 0:e.value)!==S.BLOCKLET_CONTROLLER_STATUS.suspended&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(x.Z,{className:"title-box",children:[(0,H.jsx)(x.Z,{className:"icon",children:(0,H.jsx)(g.Z,{})}),(0,H.jsx)(x.Z,{className:"title",children:o("blocklet.startApplication")})]}),(0,H.jsx)(x.Z,{className:"sub-title",children:o("blocklet.startDescription",{name:k?(0,E.getDisplayName)(k,!0):(0,E.getDisplayName)(d)})}),(0,H.jsx)(x.Z,{mt:8,children:(0,H.jsx)(y.Z,{style:{minWidth:200},disabled:Q||en,variant:"contained",color:"primary",size:"large",loading:en,onClick:function(){return sn()},children:o(en?"blocklet.starting":"blocklet.start")})})]}),(0,B.xp)(null===d||void 0===d?void 0:d.controller,null===d||void 0===d?void 0:d.nftState)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(x.Z,{className:"title-box",children:[(0,H.jsx)(b.Z,{className:"icon-error"}),(0,H.jsx)(x.Z,{className:"title error",children:o("blocklet.suspended")})]}),(0,H.jsx)(x.Z,{className:"sub-title",children:o("blocklet.redemptionTip",{deadline:(0,B.a7)((0,I.getNftExpirationDate)(d.nftState),i)})}),(0,H.jsx)(x.Z,{mt:8,children:(0,H.jsx)(y.Z,{component:w.Z,style:{minWidth:200},variant:"contained",color:"primary",size:"large",href:(0,R.Hz)({nftState:d.nftState,nftId:null===(t=d.nftState)||void 0===t?void 0:t.address,locale:i}),children:o("common.renew")})})]}),(0,H.jsx)(x.Z,{mt:5,children:(0,H.jsx)(f.rU,{className:"footer-link",to:"".concat(L.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/overview"),children:o("blocklet.dashboard")})})]})]})}var G=(0,m.css)(r||(r=(0,l.Z)(["\n html,\n body,\n #root,\n #root > .wrapper {\n height: 100%;\n }\n"]))),K=v.Z.div(o||(o=(0,l.Z)(["\n width: 100vw;\n height: 100%;\n background: #f6f8fa;\n display: flex;\n justify-content: center;\n align-items: center;\n\n .root-header {\n position: fixed;\n z-index: 200;\n top: 0;\n display: flex;\n width: 100%;\n height: 68px;\n align-items: center;\n justify-content: flex-end;\n padding: 24px;\n max-width: 1245px;\n\n "," {\n padding: 14px 16px;\n height: 56px;\n }\n\n .left {\n margin-top: 4px;\n margin-right: auto;\n "," {\n margin-top: 0%;\n }\n }\n\n .right {\n display: flex;\n align-items: center;\n "," {\n button,\n a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")})),X=(0,v.Z)(j.Z)(i||(i=(0,l.Z)(["\n width: 80vw;\n max-width: 1245px;\n height: 80vh;\n box-sizing: border-box;\n padding: 32px;\n &.MuiPaper-rounded {\n border-radius: 8px;\n }\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n "," {\n width: 100vw;\n height: 100%;\n left: 0;\n top: 0;\n padding: 32px 0;\n }\n\n .MuiIconButton-root {\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n\n .title-box {\n display: flex;\n align-items: center;\n "," {\n margin-top: 60px;\n }\n }\n\n .icon {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n background-color: ",";\n color: ",";\n }\n\n .icon-error {\n width: 32px;\n height: 32px;\n color: ",";\n }\n\n .title {\n margin-left: 12px;\n color: ",";\n font-size: 24px;\n font-weight: bolder;\n }\n\n .error {\n color: ",";\n }\n\n .sub-title {\n margin-top: 24px;\n color: ",";\n font-size: 16px;\n max-width: 360px;\n word-break: break-word;\n hyphens: auto;\n\n "," {\n padding: 0 32px;\n }\n }\n\n .footer-link {\n color: ",";\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.primary.main}),(function(n){return n.theme.palette.common.white}),(function(n){return n.theme.palette.error.main}),(function(n){return n.theme.palette.primary.main}),(function(n){return n.theme.palette.error.main}),(function(n){return n.theme.palette.grey[700]}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.primary.main})),J=v.Z.div(a||(a=(0,l.Z)(["\n display: flex;\n align-items: center;\n position: absolute;\n left: 24px;\n right: 24px;\n top: 24px;\n font-size: 16px;\n font-weight: 500;\n color: #222;\n\n /* \u7981\u6b62 app icon shrink */\n > *:first-child {\n flex: 0 0 auto;\n }\n\n .app-info_content {\n padding-left: 16px;\n overflow: hidden;\n }\n\n .app-info_name {\n max-width: 100%;\n padding-right: 32px;\n line-height: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: bold;\n }\n\n .app-info_did {\n transform: translate(0, 2px);\n }\n\n .app-info_did .did-address__text {\n color: #666;\n font-size: 14px;\n }\n\n "," {\n top: 12px;\n .app-info_did {\n transform: translate(0, 0);\n }\n .app-info_did .did-address__text {\n font-size: 12px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}))},36558:function(n,e,t){var r=t(33028),o=t(59740),i=t(24974),a=t.n(i),l=t(86822),c=t(19638),s=t(23586),d=t(37574),p=["did","href","external","avatarProps"];function u(n){var e=n.did,t=n.href,i=n.external,a=(n.avatarProps,(0,o.Z)(n,p)),u=(0,d.jsx)(s.Z,(0,r.Z)({did:e},a));return t?i?(0,d.jsx)(c.Z,{target:"_blank",href:t,underline:"hover",children:u}):(0,d.jsx)(l.rU,{to:t,children:u}):u}u.propTypes={did:a().string.isRequired,to:a().string,href:a().string,avatarProps:a().object,external:a().bool},u.defaultProps={to:"",href:"",avatarProps:{},external:!1},e.Z=u},99574:function(n,e,t){t.d(e,{Z:function(){return g}});var r,o=t(71171),i=t(33028),a=t(30969),l=t(16380),c=t(24974),s=t.n(c),d=t(94551),p=t(30734),u=t(87843),h=t(26681),f=t(26022),v=t(46513),m=t(91077),x=t(37574);function g(n){var e=n.SessionContext,t=n.extraItems,r=n.showLocale,o=n.showHelper,l=n.showSessionManager,c=n.sessionManagerProps,s=(0,a.useContext)(e).session,g=(0,a.useContext)(f.RD).locale,j=(0,p.useLocation)(),w={"/store":{endpoint:"https://store.blocklet.io"},"/dashboard":{path:"/conceptual/overview"},"/settings/router":{path:"/conceptual/server-architecture"}};return(0,x.jsxs)(b,{children:[t.map((function(n,e){return(0,a.cloneElement)(n,{key:e})})),r&&(0,x.jsx)(h.Z,{"data-cy":"locale-addon",icon:v.Z,size:23,showText:!1,className:"locale-addon"}),o&&(0,x.jsx)(d.Z,{onClick:function(){var n=j.pathname,e={};n.indexOf("/store")>-1?e=w["/store"]:w[n]&&(e=w[n]),window.open("".concat(e.endpoint||"https://developer.blocklet.io/docs","/").concat(g).concat(e.path||""),"_blank")},children:(0,x.jsx)(m.Z,{})}),l&&(0,x.jsx)(u.Z,(0,i.Z)((0,i.Z)({locale:g,session:s,size:24,showRole:!0},c),{},{showManageBlocklet:!1}))]})}g.propTypes={SessionContext:s().object.isRequired,webWalletUrl:s().string,extraItems:s().array,showLocale:s().bool,showSessionManager:s().bool,showHelper:s().bool,sessionManagerProps:s().object},g.defaultProps={webWalletUrl:"",extraItems:[],showLocale:!0,showSessionManager:!0,showHelper:!0,sessionManagerProps:{}};var b=l.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n .MuiIconButton-root svg {\n width: 26px;\n height: 26px;\n }\n\n .user-addon {\n .user-avatar {\n width: 28px;\n border-radius: 14px;\n height: auto;\n }\n }\n\n "," {\n > button,\n > a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}))},46513:function(n,e,t){e.Z=void 0;(r=t(30969))&&r.__esModule;var r,o=t(37574);function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?i(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function l(n,e,t){return(e=function(n){var e=function(n,e){if("object"!==typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===typeof e?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var c=function(n){return(0,o.jsx)("svg",a(a({},n),{},{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.606 17.32a7.933 7.933 0 0 1-.581-1.18c-.165-.411-.312-.86-.44-1.339a7.639 7.639 0 0 0-1.586 1.054 7.69 7.69 0 0 0 2.607 1.465zm.657-1.675c-.16-.4-.305-.848-.429-1.335A7.643 7.643 0 0 1 10 14h.002c.734 0 1.463.104 2.165.31-.124.487-.268.935-.428 1.335-.283.707-.604 1.235-.925 1.575-.32.339-.595.447-.813.447-.218 0-.493-.108-.813-.447-.322-.34-.642-.867-.925-1.575zM10 12.667a8.976 8.976 0 0 1 2.436.334c.116-.727.193-1.511.22-2.334H7.344c.027.823.103 1.607.22 2.334A8.972 8.972 0 0 1 10 12.667zM7.345 9.333c.027-.823.103-1.607.22-2.334.791.223 1.61.335 2.436.334A8.974 8.974 0 0 0 12.437 7c.116.727.193 1.511.22 2.334H7.344zm6.646 1.334c-.03.982-.127 1.925-.28 2.797.81.367 1.56.852 2.227 1.439a7.666 7.666 0 0 0 1.734-4.236h-3.681zm3.681-1.334H13.99a19.718 19.718 0 0 0-.28-2.798 8.975 8.975 0 0 0 2.228-1.438 7.665 7.665 0 0 1 1.734 4.236zm1.329.669A9 9 0 1 1 1 10a9 9 0 0 1 18 0v.002zM2.329 9.333a7.665 7.665 0 0 1 1.734-4.236A8.974 8.974 0 0 0 6.29 6.535a19.74 19.74 0 0 0-.28 2.798H2.329zm0 1.334h3.682c.03.983.126 1.925.28 2.797a8.974 8.974 0 0 0-2.228 1.439 7.665 7.665 0 0 1-1.734-4.236zm10.648 5.473c.164-.411.312-.86.44-1.34.57.285 1.103.639 1.585 1.055a7.687 7.687 0 0 1-2.606 1.465c.216-.354.41-.751.58-1.18zm-.581-13.46c.967.316 1.85.819 2.606 1.465A7.64 7.64 0 0 1 13.417 5.2c-.128-.48-.276-.928-.44-1.34a7.925 7.925 0 0 0-.581-1.18zm-.657 1.675c.16.4.304.848.428 1.335a7.64 7.64 0 0 1-2.165.31H10a7.64 7.64 0 0 1-2.166-.31c.124-.487.268-.935.429-1.335.283-.708.603-1.235.925-1.575.32-.339.595-.447.813-.447.218 0 .492.108.813.447.321.34.642.867.925 1.575zM7.025 3.86c-.165.411-.312.86-.44 1.34a7.64 7.64 0 0 1-1.586-1.055A7.688 7.688 0 0 1 7.606 2.68c-.216.354-.41.751-.581 1.18z",fill:"currentColor"})}))};c.defaultProps={width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"},c.displayName="globe";var s=c;e.Z=s},91077:function(n,e,t){e.Z=void 0;(r=t(30969))&&r.__esModule;var r,o=t(37574);function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?i(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function l(n,e,t){return(e=function(n){var e=function(n,e){if("object"!==typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===typeof e?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var c=function(n){return(0,o.jsxs)("svg",a(a({},n),{},{children:[(0,o.jsx)("path",{d:"M9.928 13.133a.981.981 0 0 0-.678.252.79.79 0 0 0-.281.61c0 .27.094.482.283.636.19.154.41.231.663.231.257 0 .48-.076.673-.228.19-.153.287-.365.287-.639a.796.796 0 0 0-.275-.61.958.958 0 0 0-.672-.252zM12.633 7.2a2.526 2.526 0 0 0-1.035-.88c-.441-.212-.955-.32-1.528-.32-.617 0-1.166.129-1.63.383-.467.255-.826.582-1.07.972-.245.392-.37.786-.37 1.172 0 .205.086.397.254.57.169.174.38.262.625.262.419 0 .705-.246.85-.729.132-.399.296-.703.485-.905.177-.19.465-.286.856-.286.336 0 .602.095.813.29.208.191.309.42.309.698a.78.78 0 0 1-.1.387c-.07.125-.156.24-.258.342-.108.109-.287.27-.53.484a9.184 9.184 0 0 0-.679.647 2.268 2.268 0 0 0-.42.656 2.27 2.27 0 0 0-.159.884c0 .288.08.511.24.663.156.15.352.227.58.227.439 0 .714-.24.796-.687.041-.186.073-.316.094-.39.019-.067.046-.136.081-.205.034-.068.089-.144.162-.227.076-.088.179-.19.305-.306.472-.422.805-.727.99-.908.19-.186.356-.41.493-.665A1.9 1.9 0 0 0 13 8.416a2.18 2.18 0 0 0-.367-1.217",fill:"currentColor"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15zm0 1.5a9 9 0 1 0 0-18 9 9 0 0 0 0 18z",fill:"currentColor"})]}))};c.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},c.displayName="question-mark-circle";var s=c;e.Z=s},47650:function(n,e,t){e.Z=void 0;(r=t(30969))&&r.__esModule;var r,o=t(37574);function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?i(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function l(n,e,t){return(e=function(n){var e=function(n,e){if("object"!==typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===typeof e?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var c=function(n){return(0,o.jsxs)("svg",a(a({},n),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.673L30.72 0 12.288 10.673v14.194L0 31.982v21.345L18.432 64l12.258-7.098.03.017.03-.017L43.008 64 61.44 53.327V31.982l-12.288-7.115V10.673zm10.368 22.42l-12.288-7.115V11.784L30.72 2.224l-16.512 9.56v14.194L1.92 33.093v19.122l16.512 9.561L30.69 54.68l.03.017.03-.017 12.258 7.097 16.512-9.56V33.093z",fill:"url(#paint0_linear_615_418)"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 26.07V10.03h7.737a3.795 3.795 0 0 1 3.79 3.8v1.152c0 1.01-.394 1.929-1.035 2.61a3.801 3.801 0 0 1 1.901 3.295v1.382c0 2.1-1.696 3.8-3.79 3.8h-8.603zm1.684-8.983h6.226a2.11 2.11 0 0 0 1.932-2.104V13.83a2.108 2.108 0 0 0-2.105-2.112h-6.053v5.369zm0 7.294v-5.598l6.92-.007c1.163 0 2.105.945 2.105 2.111v1.382a2.108 2.108 0 0 1-2.105 2.112h-6.92zm15.566-14.352v16.04h-1.762V10.03h1.762zm8.733 4.331h-1.827a3.816 3.816 0 0 0-3.811 3.822v4.066a3.816 3.816 0 0 0 3.811 3.822h1.827a3.817 3.817 0 0 0 3.811-3.822v-4.066a3.817 3.817 0 0 0-3.811-3.822zm-1.827 1.768c-1.131 0-2.049.92-2.049 2.054v4.066c0 1.135.918 2.054 2.049 2.054h1.827c1.131 0 2.048-.92 2.048-2.054v-4.066a2.051 2.051 0 0 0-2.048-2.054h-1.827zm21.043 9.948v-5.77h2.148l3.322 5.77h2.035l-3.821-6.638 2.993-5.198h-2.035l-2.474 4.298h-2.168V10.03h-1.762v16.047h1.762zm-5.556-7.581v-.313a2.051 2.051 0 0 0-2.048-2.054h-1.827c-1.132 0-2.049.92-2.049 2.054v4.066c0 1.135.917 2.054 2.049 2.054h1.827c1.131 0 2.048-.92 2.048-2.054v-.313h1.762v.313a3.816 3.816 0 0 1-3.81 3.822h-1.827a3.816 3.816 0 0 1-3.811-3.822v-4.066a3.816 3.816 0 0 1 3.811-3.822h1.827a3.816 3.816 0 0 1 3.81 3.822v.313h-1.762zm17.918 7.575V10.03h-1.762v16.04h1.762zm4.989-5.372v1.55c0 1.135.917 2.054 2.049 2.054h1.827c1.131 0 2.048-.92 2.048-2.054v-.313h1.762v.313a3.816 3.816 0 0 1-3.81 3.822h-1.827a3.816 3.816 0 0 1-3.811-3.822v-4.066a3.816 3.816 0 0 1 3.811-3.822h1.827a3.816 3.816 0 0 1 3.81 3.822v.748h.001v1.768h-7.687zm5.924-1.768h-5.924v-.748c0-1.134.917-2.054 2.049-2.054h1.827c1.131 0 2.048.92 2.048 2.054v.748zm5.489-1.917H152.4v-1.768h1.568V12.39h1.684v2.856h4.077v1.768h-4.077v5.693c0 .925.747 1.675 1.669 1.675s1.67-.75 1.67-1.675v-.351h1.684v.351a3.358 3.358 0 0 1-3.354 3.364 3.358 3.358 0 0 1-3.353-3.364v-5.693z",fill:"#121319"}),(0,o.jsx)("path",{d:"M91.034 36.52c-.112.196-.233.34-.364.434a.793.793 0 0 1-.462.126c-.196 0-.41-.07-.644-.21-.224-.15-.495-.313-.812-.49a6.307 6.307 0 0 0-1.12-.476c-.42-.15-.92-.224-1.498-.224-.523 0-.98.065-1.372.196a2.87 2.87 0 0 0-.994.518 2.117 2.117 0 0 0-.588.812 2.59 2.59 0 0 0-.196 1.022c0 .476.13.872.392 1.19.27.317.625.588 1.064.812.439.224.938.424 1.498.602.56.177 1.134.368 1.722.574.588.196 1.162.429 1.722.7.56.261 1.06.597 1.498 1.008.439.401.789.896 1.05 1.484.27.588.406 1.302.406 2.142 0 .914-.159 1.773-.476 2.576a5.884 5.884 0 0 1-1.372 2.086c-.597.588-1.33 1.054-2.198 1.4-.868.336-1.862.504-2.982.504a9.288 9.288 0 0 1-1.904-.196 9.827 9.827 0 0 1-1.806-.532 9.763 9.763 0 0 1-1.61-.84 7.8 7.8 0 0 1-1.344-1.092l1.106-1.806c.093-.131.215-.238.364-.322a.883.883 0 0 1 .476-.14c.233 0 .485.098.756.294.27.186.593.396.966.63.373.233.807.448 1.302.644.504.186 1.106.28 1.806.28 1.073 0 1.904-.252 2.492-.756.588-.514.882-1.246.882-2.198 0-.532-.135-.966-.406-1.302a3.073 3.073 0 0 0-1.05-.84 7.585 7.585 0 0 0-1.498-.588c-.56-.159-1.13-.332-1.708-.518a14.738 14.738 0 0 1-1.708-.672 5.535 5.535 0 0 1-1.498-1.022 4.75 4.75 0 0 1-1.064-1.568c-.261-.635-.392-1.414-.392-2.338 0-.738.145-1.456.434-2.156.299-.7.728-1.321 1.288-1.862.56-.542 1.25-.976 2.072-1.302.821-.327 1.764-.49 2.828-.49 1.195 0 2.296.186 3.304.56 1.008.373 1.867.896 2.576 1.568l-.938 1.778zM104.274 44.248a3.95 3.95 0 0 0-.196-1.26 2.909 2.909 0 0 0-.56-1.05 2.557 2.557 0 0 0-.966-.7c-.382-.178-.83-.266-1.344-.266-.998 0-1.787.284-2.365.854-.57.569-.934 1.376-1.093 2.422h6.524zm-6.594 2.086c.056.737.187 1.376.392 1.918a4 4 0 0 0 .813 1.33c.335.345.732.606 1.189.784.467.168.98.252 1.54.252s1.041-.066 1.442-.196c.411-.131.766-.276 1.064-.434.308-.159.574-.304.798-.434a1.38 1.38 0 0 1 .672-.196c.29 0 .504.107.644.322l.994 1.26a5.902 5.902 0 0 1-1.288 1.134 7.653 7.653 0 0 1-1.498.728 8.298 8.298 0 0 1-1.582.378c-.532.074-1.05.112-1.554.112a7.772 7.772 0 0 1-2.785-.49 6.361 6.361 0 0 1-2.24-1.47c-.635-.654-1.135-1.456-1.499-2.408-.364-.962-.545-2.072-.545-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.47 6.47 0 0 1 2.17-1.526c.858-.374 1.824-.56 2.897-.56.906 0 1.741.144 2.506.434.766.289 1.424.714 1.974 1.274.551.55.98 1.232 1.288 2.044.318.802.476 1.722.476 2.758 0 .522-.056.877-.168 1.064-.112.177-.326.266-.644.266h-8.89zM113.24 41.21c.448-.859.98-1.531 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.144 1.596.434l-.224 2.59c-.047.168-.117.289-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.024-.63-.07a4.694 4.694 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.354 3.354 0 0 0-.63.756c-.178.298-.346.639-.504 1.022v8.848h-3.458V38.718h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624zM133.373 38.718l-5.698 14.364h-3.136l-5.698-14.364h2.856c.261 0 .476.06.644.182a.849.849 0 0 1 .35.462l2.772 7.672a20.846 20.846 0 0 1 .686 2.604 31.6 31.6 0 0 1 .308-1.288c.112-.43.247-.868.406-1.316l2.828-7.672a.944.944 0 0 1 .35-.462 1 1 0 0 1 .602-.182h2.73zM144.032 44.248a3.95 3.95 0 0 0-.196-1.26 2.909 2.909 0 0 0-.56-1.05 2.557 2.557 0 0 0-.966-.7c-.382-.178-.83-.266-1.344-.266-.998 0-1.787.284-2.366.854-.569.569-.933 1.376-1.092 2.422h6.524zm-6.594 2.086c.056.737.187 1.376.392 1.918.206.532.476.975.812 1.33.336.345.733.606 1.19.784.467.168.98.252 1.54.252s1.041-.066 1.442-.196c.411-.131.766-.276 1.064-.434.308-.159.574-.304.798-.434a1.38 1.38 0 0 1 .672-.196c.29 0 .504.107.644.322l.994 1.26a5.902 5.902 0 0 1-1.288 1.134 7.653 7.653 0 0 1-1.498.728 8.298 8.298 0 0 1-1.582.378c-.532.074-1.05.112-1.554.112a7.776 7.776 0 0 1-2.786-.49 6.37 6.37 0 0 1-2.24-1.47c-.634-.654-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.159-1.9.476-2.758.318-.868.77-1.62 1.358-2.254a6.48 6.48 0 0 1 2.17-1.526c.859-.374 1.825-.56 2.898-.56.906 0 1.741.144 2.506.434.766.289 1.424.714 1.974 1.274.551.55.98 1.232 1.288 2.044.318.802.476 1.722.476 2.758 0 .522-.056.877-.168 1.064-.112.177-.326.266-.644.266h-8.89zM152.997 41.21c.448-.859.98-1.531 1.596-2.016.616-.495 1.344-.742 2.184-.742.663 0 1.195.144 1.596.434l-.224 2.59c-.046.168-.116.289-.21.364a.556.556 0 0 1-.35.098c-.14 0-.35-.024-.63-.07a4.676 4.676 0 0 0-.798-.07c-.382 0-.723.056-1.022.168a2.599 2.599 0 0 0-.812.49 3.408 3.408 0 0 0-.63.756c-.177.298-.345.639-.504 1.022v8.848h-3.458V38.718h2.03c.355 0 .602.065.742.196.14.121.234.345.28.672l.21 1.624z",fill:"#121319"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm13.338-2.894a.96.96 0 0 1 .924-.696h4.5a.96.96 0 0 1 .924.696l.856 2.999 2.12 1.223 3.025-.757a.96.96 0 0 1 1.064.451l2.25 3.898a.96.96 0 0 1-.14 1.148l-2.17 2.24v2.448l2.17 2.24a.96.96 0 0 1 .14 1.148l-2.25 3.899a.96.96 0 0 1-1.065.45l-3.024-.756-2.12 1.223-.856 2.998a.96.96 0 0 1-.923.697H28.47a.96.96 0 0 1-.924-.697L26.69 44.9l-2.12-1.223-3.024.757a.96.96 0 0 1-1.065-.451l-2.25-3.898a.96.96 0 0 1 .141-1.148l2.168-2.241v-2.447l-2.168-2.241a.96.96 0 0 1-.142-1.148l2.251-3.898a.96.96 0 0 1 1.065-.451l3.025.757 2.119-1.223.856-2.999zm.44 4.467a.96.96 0 0 0 .443-.567l.765-2.676h3.053l.764 2.676a.96.96 0 0 0 .443.567l2.792 1.612a.96.96 0 0 0 .713.1l2.7-.676 1.526 2.644-1.935 2a.96.96 0 0 0-.27.668v3.223c0 .25.097.489.27.668l1.935 2-1.527 2.643-2.699-.675a.96.96 0 0 0-.713.1l-2.792 1.612a.96.96 0 0 0-.443.567l-.764 2.676h-3.053l-.765-2.676a.96.96 0 0 0-.443-.567l-2.792-1.612a.96.96 0 0 0-.713-.1l-2.7.675-1.526-2.643 1.935-2a.96.96 0 0 0 .27-.668V33.86a.96.96 0 0 0-.27-.667l-1.935-2 1.527-2.644 2.7.676a.96.96 0 0 0 .712-.1l2.792-1.612zm2.734 14.128a6.168 6.168 0 1 1 0-12.337 6.168 6.168 0 0 1 0 12.337zm4.248-6.169a4.248 4.248 0 1 1-8.496 0 4.248 4.248 0 0 1 8.496 0z",fill:"url(#paint1_linear_615_418)"}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"paint0_linear_615_418",x1:"30.72",y1:"96",x2:"94.667",y2:"34.611",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,o.jsxs)("linearGradient",{id:"paint1_linear_615_418",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};c.defaultProps={width:"170",height:"64",viewBox:"0 0 170 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.displayName="server-logo";var s=c;e.Z=s},26681:function(n,e,t){t.d(e,{Z:function(){return P}});var r,o,i=t(71171),a=t(33028),l=t(96234),c=t(59740),s=t(30969),d=t(24974),p=t.n(d),u=t(72097),h=t(94551),f=t(38361),v=t(33359),m=t(38589),x=t(23484),g=t(2689),b=t(45761),j=t(38996),w=t(46513),y=t(79216),Z=t(26022),z=t(55581),k=t(37574),O=["showText","popperProps","popperType","icon","size"];function P(n){var e,t,r,o=n.showText,i=n.popperProps,d=n.popperType,p=n.icon,b=n.size,y=(0,c.Z)(n,O),P=(0,s.useContext)(Z.RD),C=P.locale,N=P.changeLocale,M=P.languages,E=(0,s.useRef)(null),L=(0,s.useState)(!1),D=(0,l.Z)(L,2),R=D[0],I=D[1],T=(0,z.Fg)(),V="dark"===(null===T||void 0===T||null===(e=T.palette)||void 0===e?void 0:e.mode),A=o?u.Z:h.Z,B="hover"===d?{onMouseEnter:function(){I(!0)},onMouseLeave:function(){I(!1)}}:{onClick:function(){I(!R)}},H=(0,s.useMemo)((function(){return p?(0,k.jsx)(p,{}):(0,k.jsx)(w.Z,{style:{width:"auto",height:b,color:T.palette.text.secondary}})}),[p,null===T||void 0===T||null===(t=T.palette)||void 0===t||null===(r=t.text)||void 0===r?void 0:r.secondary,b]);return(0,k.jsxs)(_,(0,a.Z)((0,a.Z)((0,a.Z)({component:"div",dark:V,theme:T},y),B),{},{children:[(0,k.jsx)(A,{ref:E,className:"trigger",role:"button","aria-label":"Locale selector button",children:(0,k.jsxs)(f.Z,{display:"flex",alignItems:"center",children:[H,o?(0,k.jsx)(v.Z,{component:"strong",className:"trigger-text",children:M.find((function(n){return n.code===C})).name}):""]})}),(0,k.jsx)(S,(0,a.Z)((0,a.Z)({open:R,anchorEl:E.current},i),{},{disablePortal:!0,children:(0,k.jsx)("div",{className:"locales",children:(0,k.jsx)(m.d,{onClickAway:function(n){var e;null!==(e=E.current)&&void 0!==e&&e.contains(n.target)||I(!1)},children:(0,k.jsx)(x.Z,{children:M.map((function(e){var t=e.code,r=e.name;return(0,k.jsxs)(g.Z,{className:"locale-item",onClick:function(){return N(e=t),I(!1),void("function"===typeof n.onChange&&n.onChange(e));var e},children:[(0,k.jsx)(j.default,{className:t===C?"check-icon check-icon-visible":"check-icon",fontSize:"small"}),r]},t)}))})})})}))]}))}P.propTypes={size:p().number,showText:p().bool,popperProps:p().object,onChange:p().func,popperType:p().oneOf(["hover","click"]),icon:p().any},P.defaultProps={showText:!0,size:24,popperProps:{},onChange:function(){},popperType:"click",icon:null};var _=(0,z.zo)("div",{shouldForwardProp:function(n){return"dark"!==n}})(r||(r=(0,i.Z)(["\n display: inline-block;\n\n .trigger {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: 14px;\n white-space: nowrap;\n\n .trigger-text {\n margin-left: 5px;\n font-size: 14px;\n color: ",";\n }\n }\n\n .locales {\n background: ",";\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);\n }\n\n .locale-item {\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: 2px;\n text-align: center;\n color: ",";\n cursor: pointer;\n display: flex;\n padding: 16px;\n align-items: center;\n .check-icon {\n visibility: hidden;\n margin-right: 4px;\n }\n .check-icon-visible {\n visibility: visible;\n }\n }\n"])),(function(n){return(0,y.Lq)(n)}),(function(n){return(0,y.Vu)(n)}),(function(n){return(0,y.Lq)(n)})),S=(0,z.zo)(b.Z)(o||(o=(0,i.Z)(["\n z-index: ",";\n"])),(function(n){return n.theme.zIndex.tooltip+10}))},60680:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");e.Z=a},8825:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");e.Z=a}}]);
|
|
2
|
+
//# sourceMappingURL=4587.906e3023.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[4716],{44716:function(e,n,r){r.r(n),r.d(n,{default:function(){return S}});var o=r(32723),t=r(34795),i=r(96234),a=r(35147),s=r(49476),c=r(30969),u=r(30734),l=r(94308),f=r(38361),d=r(238),p=r(1986),g=r(26022),v=r(48164),w=r(19611),h=r.n(w),m=r(86776),k=r(66550),I=r(85300),y=r(4485),Z=r(38507),b=r(37574),P=function(e){setTimeout((function(){var n=new URL(window.location.href).searchParams.get("redirect");if(n){var r=decodeURIComponent(n);r.startsWith(I.Bu)?e(r,{replace:!0}):window.location=r}else window.location=window.env.pathPrefix||"/"}),50)};function S(){var e=(0,c.useRef)(null),n=(0,y.Tt)().session,r=(0,g.PE)(),w=r.t,S=r.locale,x=(0,m.Z)().getPassportId,N=(0,u.useNavigate)(),T=(0,k.Z)(),C=(0,i.Z)(T,2),R=C[0],U=C[1],z=new URL(window.location.href).searchParams,J={passportId:x()},O=z.get("componentId");O&&(J.componentId=O),R&&(J.visitorId=R);var _=function(){var e=(0,t.Z)((0,o.Z)().mark((function e(r,t){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,Z.ZB)(t(r.sessionToken)),(0,Z.zI)(t(r.refreshToken)),r.visitorId&&U(t(r.visitorId)),e.next=5,n.refresh();case 5:P(N);case 6:case"end":return e.stop()}}),e)})));return function(n,r){return e.apply(this,arguments)}}(),B=(0,a.Z)((function(){var e,n=null===(e=window)||void 0===e?void 0:e.blocklet,r={className:"connect",popup:!1,action:"login",onSuccess:_,onError:L,locale:S,messages:{title:w("login.dialog.title"),scan:w("login.dialog.scan"),confirm:w("login.dialog.confirm"),success:w("login.dialog.success")},extraParams:J,baseUrl:window.location.origin,prefix:window.location.origin+h()(I.Bu,I.nC)};if(!z.get("sessionToken")){var o=(0,v.CF)(),t=(0,v.pS)()?o.appUrl:window.location.origin,i=new URL(h()(I.Bu,"connect"),t);return i.searchParams.set("params",btoa(encodeURIComponent(JSON.stringify(r)))),i.searchParams.set("appPid",null===n||void 0===n?void 0:n.appPid),i.searchParams.set("appName",null===n||void 0===n?void 0:n.appName),i.searchParams.set("locale",S),i.searchParams.set("redirect",window.location.href),void(window.location.href=i.href)}_({sessionToken:z.get("sessionToken"),refreshToken:z.get("refreshToken"),visitorId:z.get("visitorId")},(function(e){return e}))}));(0,s.Z)((function(){n.user?P(N):B()}));var L=function(e){p.Z.error(e.message)};return n.loading||n.user?(0,b.jsx)(d.Z,{children:(0,b.jsx)(l.Z,{})}):(0,b.jsx)(f.Z,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:e})}},86776:function(e,n,r){r.d(n,{Z:function(){return i}});var o=r(96234),t=r(17708);function i(){var e=(0,t.Z)("passportId",""),n=(0,o.Z)(e,3),r=n[0],i=n[1],a=n[2];return{getPassportId:function(){return setTimeout((function(){a()}),0),r||""},setPassportId:i}}},17708:function(e,n,r){var o=r(30969),t=r(46378);n.Z=function(e,n,r){if(!t.isBrowser)return[n,t.noop,t.noop];if(!e)throw new Error("useLocalStorage key may not be falsy");var i=r?r.raw?function(e){return e}:r.deserializer:JSON.parse,a=o.useRef((function(e){try{var o=r?r.raw?String:r.serializer:JSON.stringify,t=localStorage.getItem(e);return null!==t?i(t):(n&&localStorage.setItem(e,o(n)),n)}catch(s){return n}})),s=o.useState((function(){return a.current(e)})),c=s[0],u=s[1];o.useLayoutEffect((function(){return u(a.current(e))}),[e]);var l=o.useCallback((function(n){try{var o="function"===typeof n?n(c):n;if("undefined"===typeof o)return;var t=void 0;t=r?r.raw?"string"===typeof o?o:JSON.stringify(o):r.serializer?r.serializer(o):JSON.stringify(o):JSON.stringify(o),localStorage.setItem(e,t),u(i(t))}catch(s){}}),[e,u]),f=o.useCallback((function(){try{localStorage.removeItem(e),u(void 0)}catch(s){}}),[e,u]);return[c,l,f]}}}]);
|
|
2
|
+
//# sourceMappingURL=4716.b0917145.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[4802],{92746:function(e,n,t){var r,i=t(71171),o=t(33028),a=t(59740),l=t(16380),s=t(50442),c=t(37574),d=["labelProps","className","style"];function u(e){var n=e.labelProps,t=e.className,r=e.style,i=(0,a.Z)(e,d),l=(0,o.Z)((0,o.Z)({},n),{},{labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"});return(0,c.jsx)(f,{className:t,style:r,children:(0,c.jsx)(s.Z,(0,o.Z)({labelProps:l},i))})}u.propTypes=s.Z.propTypes,u.defaultProps=s.Z.defaultProps;var f=l.Z.div(r||(r=(0,i.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(function(e){return e.theme.breakpoints.down("sm")}));n.Z=u},121:function(e,n,t){t.r(n),t.d(n,{default:function(){return bt}});var r=t(71171),i=t(33028),o=t(96234),a=t(59740),l=t(68079),s=t(30969),c=t(16380),d=t(24974),u=t.n(d),f=t(95973),p=t(19611),m=t.n(p),h=t(20244),x=t(38361),Z=t(3994),g=t(79823),v=t(64689),b=t(99254),j=t(76527),k=t(85385),y=t(52838),C=t(23038),w=t(86822),L=t(26022),S=t(19865),E=t(7017),P=t(70998),A=t(84802),_=t(32723),T=t(34795),N=t(46292),O=t.n(N),R=t(15888),I=t.n(R),B=t(65667),F=t.n(B),D=t(34159),U=t(75295),z=t(29996),K=t(13134),W=t(59467),G=t(59505),H=t(1986),V=t(67019),Y=t(94308),q=t(88581),M=t(27724),J=t(94551),Q=t(2689),X=t(39130),$=t(7173),ee=t(94702),ne=t(98123),te=t(14458),re=t(28412),ie=t(76934),oe=t(37574),ae=["label","disabled","required","initialValue","onChange","style","onSubmit","triggers","options","formatterBeforeSubmit","helperText"],le={PaperProps:{style:{maxHeight:224,width:250}}},se=function(e,n,t){return{fontWeight:-1===n.indexOf(e)?t.typography.fontWeightRegular:t.typography.fontWeightMedium}};function ce(e){var n=e.label,t=e.disabled,r=e.required,l=e.initialValue,c=e.onChange,d=e.style,u=e.onSubmit,f=e.triggers,p=e.options,m=e.formatterBeforeSubmit,h=e.helperText,Z=(0,a.Z)(e,ae),g=(0,ee.Z)(),v=(0,s.useState)(!1),b=(0,o.Z)(v,2),j=b[0],k=b[1],y=(0,s.useState)(!1),C=(0,o.Z)(y,2),w=C[0],L=C[1],S=(0,s.useState)(l),E=(0,o.Z)(S,2),P=E[0],A=E[1],N=(0,s.useState)(P),O=(0,o.Z)(N,2),R=O[0],I=O[1],B=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(!0),e.prev=1,e.next=4,u("function"===typeof m?m(R):R);case 4:!1===e.sent?I(P):(I(R),A(R)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),I(P);case 11:return e.prev=11,L(!1),k(!1),e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[1,8,11,15]])})));return function(){return e.apply(this,arguments)}}(),F=j?(0,oe.jsx)(X.Z,(0,i.Z)((0,i.Z)({value:R,onChange:function(e){var n=e.target.value;n="string"===typeof n?n.split(","):n,I(n),c(n)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",renderValue:function(e){return(0,oe.jsx)(x.Z,{sx:{display:"flex",flexWrap:"wrap"},children:e.filter((function(e){return p.some((function(n){return n.code===e}))})).map((function(e){return(0,oe.jsx)($.Z,{label:p.find((function(n){return n.code===e})).name,style:{marginRight:8},size:"small"},e)}))})},MenuProps:le},Z),{},{children:p.map((function(e){return(0,oe.jsx)(Q.Z,{value:e.code,style:se(e.code,R,g),children:e.name},e.code)}))})):(0,oe.jsx)(x.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:R.filter((function(e){return p.some((function(n){return n.code===e}))})).map((function(e){return(0,oe.jsx)($.Z,{label:p.find((function(n){return n.code===e})).name,style:{marginRight:8},size:"small"},e)}))});return(0,oe.jsx)(re.Z,{className:"form",style:d,children:(0,oe.jsxs)(x.Z,{className:"form-item",children:[(0,oe.jsxs)(x.Z,{className:"form-item-label",children:[n,r&&(0,oe.jsx)(te.Z,{})]}),(0,oe.jsxs)(x.Z,{className:"form-item-body",children:[(0,oe.jsx)(x.Z,{className:"form-item-input",children:F}),(0,oe.jsx)(x.Z,{className:"form-item-action",children:j?(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(J.Z,{"data-cy":"schema-form-item-confirm",onClick:B,disabled:t||w,size:"large",children:w?(0,oe.jsx)(Y.Z,{size:24}):(0,oe.jsx)(M.Z,{})}),(0,oe.jsx)(J.Z,{"data-cy":"schema-form-item-cancel",onClick:function(){I(P),k(!1)},disabled:t||w,size:"large",children:(0,oe.jsx)(q.default,{})})]}):(0,oe.jsx)(ie.Z,{triggers:f,onEnterEdit:function(){return k(!0)},disabled:t})})]}),j&&h&&(0,oe.jsx)(ne.Z,{children:h})]})})}ce.propTypes={style:u().object,onSubmit:u().func,onChange:u().func,label:u().string,initialValue:u().string,required:u().bool,disabled:u().bool,triggers:u().array,options:u().array,helperText:u().string,formatterBeforeSubmit:u().func},ce.defaultProps={style:{},onSubmit:function(){},onChange:function(){},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:function(e){return e.join(",")}};var de=t(41395),ue=t(24891),fe=t(19066),pe=t(22572),me=t(85710),he=t(8479),xe=["teamDid","size"];function Ze(e){var n=e.teamDid,t=e.size,r=void 0===t?"small":t,l=(0,a.Z)(e,xe),c=(0,L.PE)().t,d=(0,de.h6)().api,u=(0,s.useState)(!1),f=(0,o.Z)(u,2),p=f[0],m=f[1],h=(0,s.useState)(null),x=(0,o.Z)(h,2),Z=x[0],g=x[1],v=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(){var t,r;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m(!0),e.next=4,d.clearCache({input:{teamDid:n}});case 4:r=e.sent,H.Z.success(c("blocklet.config.clearCache.success",{count:(null===(t=r.removed)||void 0===t?void 0:t.length)||0})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),H.Z.error((0,me.Z)(e.t0));case 11:return e.prev=11,m(!1),g(null),e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[0,8,11,15]])})));return function(){return e.apply(this,arguments)}}(),b={title:c("blocklet.config.clearCache.title"),description:c("blocklet.config.clearCache.description"),confirm:c("common.confirm"),cancel:c("common.cancel"),onConfirm:v,onCancel:function(){m(!1),g(null)}};return(0,oe.jsxs)("div",(0,i.Z)((0,i.Z)({},l),{},{children:[(0,oe.jsxs)(z.Z,{onClick:function(){return g(b)},color:"error",variant:"outlined",size:r,children:[p?(0,oe.jsx)(Y.Z,{size:16,style:{marginRight:5}}):null,c("blocklet.config.clearCache.action")]}),Z&&(0,oe.jsx)(he.Z,{title:Z.title,description:Z.description,confirm:Z.confirm,cancel:Z.cancel,onConfirm:Z.onConfirm,onCancel:Z.onCancel})]}))}var ge,ve=t(43178),be=t(31575),je=t(77370),ke=t(45008);function ye(e){var n=e.initialValue,t=e.onChange,r=e.disabled,i=e.loading,a=(0,L.PE)().t,l=(0,je.T)().api,s=(0,ke.y0)().blocklet,c=(0,ve.Z)({newAppSk:"",isConnectOpen:!1}),d=(0,o.Z)(c,2),u=d[0],f=d[1],p=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(n);case 3:return e.prev=3,f({newAppSk:""}),e.finish(3);case 6:case"end":return e.stop()}}),e,null,[[0,,3,6]])})));return function(n){return e.apply(this,arguments)}}(),m=function(){return f({isConnectOpen:!1})},Z=s.structVersion===h.APP_STRUCT_VERSION?[{key:"rotate-with-did-wallet",title:"Migrate with DID Wallet",handler:function(){(0,ue.An)(s.status)?H.Z.error(a("blocklet.error.isRunning")):(0,E.isInProgress)(s.status)?H.Z.error(a("blocklet.error.isInProgress")):f({isConnectOpen:!0})}}]:[];return[(0,oe.jsx)(V.Z,{disabled:r,loading:i,initialValue:n,onSubmit:function(e){return f({newAppSk:e}),!1},triggers:Z,secure:!0}),u.newAppSk&&(0,oe.jsx)(he.Z,{title:a("blocklet.config.appSkTitle"),description:(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(x.Z,{children:a("blocklet.config.appSkChangeTip")}),(0,oe.jsx)(x.Z,{fontWeight:"bold",mt:2,children:a("blocklet.config.appDidChangeTip")}),(0,oe.jsxs)(we,{children:[(0,oe.jsx)("li",{children:a("blocklet.config.appDidChangeTipL1")}),(0,oe.jsx)("li",{children:a("blocklet.config.appDidChangeTipL2")})]})]}),confirm:a("confirm"),cancel:a("cancel"),onConfirm:function(){return p(u.newAppSk)},onCancel:function(){return f({newAppSk:""})}}),(0,oe.jsx)(be.Z,{popup:!0,open:u.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:l.get,checkTimeout:3e5,onSuccess:m,extraParams:{appDid:s.appDid},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:m})]}ye.propTypes={initialValue:u().string,onChange:u().func,disabled:u().bool,loading:u().bool},ye.defaultProps={initialValue:"default",onChange:function(){},disabled:!1,loading:!1};var Ce,we=(0,c.Z)("ul")(ge||(ge=(0,r.Z)(["\n padding-left: 16px;\n li {\n margin-top: 8px;\n list-style: disk;\n font-weight: bold;\n }\n"]))),Le=t(50496),Se=t(43207),Ee=t(33359),Pe=t(23299),Ae=t(49884),_e=t(88876),Te=t(73820),Ne=t(80670);function Oe(e){var n=e.onCancel,t=e.onSuccess,r=e.onError,i=(0,s.useContext)(je.B).api,a=(0,s.useState)(!1),l=(0,o.Z)(a,2),c=l[0],d=l[1],u=(0,L.PE)(),f=u.t,p=u.locale,m=(0,s.useState)(""),h=(0,o.Z)(m,2),Z=h[0],g=h[1],v=(0,s.useState)(!1),b=(0,o.Z)(v,2),j=b[0],k=b[1],y=(0,s.useState)(0),C=(0,o.Z)(y,2),w=C[0],S=C[1],E=(0,s.useState)(""),P=(0,o.Z)(E,2),A=P[0],_=P[1],T=(0,Ne.DJ)().endpoint,N=(0,s.useState)(!1),O=(0,o.Z)(N,2),R=O[0],I=O[1],B=function(e){g(null),d(!0);try{_(e.result),S(D.length-1)}catch(t){var n=(0,ue.Z)(t);g(n),r(t)}finally{d(!1)}},F=function(){k(!1),S(0)},D=[{body:(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(Ee.Z,{children:f("team.transferApp.transferDialog.tips.progress")}),(0,oe.jsx)(Ee.Z,{mt:3,mb:2,children:f("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:f("common.cancel"),confirm:f("team.transferApp.transferDialog.createTransferLink"),onCancel:n,onConfirm:function(){k(!0),S(1)}},{body:function(){return(0,oe.jsx)(be.Z,{action:"transfer-app-owner",open:j,locale:p,checkFn:i.get,onClose:F,onSuccess:B,checkTimeout:3e5,extraParams:{},messages:{title:f("team.transferApp.connectDialog.title"),scan:f("team.transferApp.connectDialog.scan"),confirm:f("team.transferApp.connectDialog.confirm"),success:f("team.transferApp.connectDialog.success")},popup:!0})}},{body:function(){var e=(0,ue.VP)({transferId:A.transferId,endpoint:T});return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(x.Z,{component:Ie,dangerouslySetInnerHTML:{__html:f("team.transferApp.transferDialog.createSuccessTip1")}}),(0,oe.jsx)(x.Z,{component:Ie,mt:2,children:(0,oe.jsx)(Ie,{children:f("team.transferApp.transferDialog.createSuccessTip3")})}),(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(x.Z,{component:Ie,mt:2,children:(0,oe.jsx)(Ie,{children:f("team.transferApp.transferDialog.createSuccessTip2",{expireDate:(0,ue.B2)(A.expireDate,p)})})}),(0,oe.jsx)(x.Z,{my:1,children:(0,oe.jsx)(Te.Z,{children:e})})]}),(0,oe.jsx)("div",{children:(0,oe.jsx)(Ae.Z,{value:"end",control:(0,oe.jsx)(_e.Z,{checked:R,onChange:function(e){return I(e.target.checked)}}),label:f("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:f("common.confirm"),onConfirm:t}],U=D[w];return(0,oe.jsxs)(Le.ZP,{title:(0,oe.jsx)(Ie,{className:"title",children:f("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,oe.jsxs)(oe.Fragment,{children:[U.cancel&&(0,oe.jsx)(z.Z,{onClick:U.onCancel,color:"inherit",children:U.cancel}),(0,oe.jsxs)(z.Z,{onClick:U.onConfirm,color:"error",disabled:c||w===D.length-1&&!R,variant:"contained",autoFocus:!0,children:[c&&(0,oe.jsx)(Y.Z,{size:16}),U.confirm]})]}),children:[(0,oe.jsx)(Se.Z,{component:"div",children:"function"===typeof U.body?U.body():U.body}),!!Z&&(0,oe.jsx)(Pe.Z,{type:"error",variant:"icon",children:Z})]})}Oe.propTypes={onCancel:u().func.isRequired,onSuccess:u().func.isRequired,onError:u().func},Oe.defaultProps={onError:function(){}};var Re,Ie=c.Z.div(Ce||(Ce=(0,r.Z)(["\n font-size: 16px;\n font-weight: bold;\n &.title {\n font-size: 20px;\n }\n"]))),Be=t(15300),Fe=["blocklet","onUpdate","hasPermission"],De=Object.keys(G.SUPPORTED_LANGUAGES).map((function(e){return{code:e,name:G.SUPPORTED_LANGUAGES[e].nativeName}})),Ue=(0,s.lazy)((function(){return Promise.all([t.e(4917),t.e(5547)]).then(t.bind(t,25547)).then((function(e){return{default:e.Uploader}}))})),ze="/blocklet/logo/upload";function Ke(e){var n,t=e.blocklet,r=e.onUpdate,l=e.hasPermission,c=(0,a.Z)(e,Fe),d=(0,de.h6)(),u=d.api,f=d.inService,p=d.prefix,Z=d.getSessionInHeader,g=d.ws.useSubscription,v=(0,s.useContext)(L.RD).t,b=(0,s.useState)(""),j=(0,o.Z)(b,2),k=j[0],y=j[1],C=(0,s.useState)(""),w=(0,o.Z)(C,2),S=w[0],P=w[1],A=(0,s.useState)(!1),N=(0,o.Z)(A,2),R=N[0],B=N[1],Y=(0,E.getWhoCanAccess)(t),q=null===t||void 0===t||null===(n=t.settings)||void 0===n?void 0:n.publicToStore,M=S||!l,J=(0,s.useRef)(null),Q=(0,Be.Z)({blocklet:t}),X=Q.logoUrl,$=Q.rectLogoUrl,ee=Q.faviconUrl,ne=(0,s.useState)(),te=(0,o.Z)(ne,2),re=te[0],ie=te[1],ae=m()(p,ze,"square",t.meta.did),le=m()(p,ze,"rect",t.meta.did),se=m()(p,ze,"favicon",t.meta.did),me=function(e){l&&(ie({uploader:e,disableMediaKitPrefix:!0}),J.current.open())},he=t.meta.did,xe=t.site,ge=O()(t.meta,"capabilities.clusterMode",!1);if(g(h.EVENTS.NODE_RUNTIME_INFO,(function(e){ge&&y(O()(e,"cpu.physicalCores",""))})),(0,ue.wS)(t.status))return null;var ve=t.environments.find((function(e){return e.key===G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE})),be=!ve||"yes"===ve.value,je=t.environments.find((function(e){return e.key===G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES})),ke=t.environments.find((function(e){return e.key===G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL})),Ce=t.environments.find((function(e){return e.key===G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER})),we=t.environments.find((function(e){return e.key===G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR})),Le=[{key:G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:v("blocklet.config.name"),value:t.environments.find((function(e){return"BLOCKLET_APP_NAME"===e.key})).value},{key:G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:v("blocklet.config.description"),value:t.environments.find((function(e){return"BLOCKLET_APP_DESCRIPTION"===e.key})).value},{key:G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,description:v("blocklet.config.appUrl"),value:ke?ke.value:""},{key:G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,description:v("blocklet.config.copyrightOwner"),value:Ce?Ce.value:""},{key:G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,description:v("blocklet.config.copyrightYear"),value:we?we.value:""}];if(ge){var Se=t.configs.find((function(e){return e.key===G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE})),Ee=Se?Se.value:k;Le.push({key:G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE,description:v("blocklet.config.clusterSize"),value:Ee,cpuCores:k})}var Pe=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var i,o,a;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S){e.next=2;break}return e.abrupt("return");case 2:return P(!0),e.prev=3,i=n.target.checked,e.next=7,u.configPublicToStore({input:{did:t.meta.did,publicToStore:i}});case 7:o=e.sent,a=o.blocklet,r(a),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),H.Z.error(e.t0.message);case 15:return e.prev=15,P(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[3,12,15,18]])})));return function(n){return e.apply(this,arguments)}}(),Ae=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n,i){var o,a,l,s;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n!==G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){e.next=5;break}if(!(o=(0,ue.I)({value:i,cpuCores:k}))){e.next=5;break}return H.Z.error(o),e.abrupt("return");case 5:return a=[{key:n,value:i}],e.prev=6,P(!0),e.next=10,u.configBlocklet({input:{did:t.meta.did,configs:a}});case 10:l=e.sent,s=l.blocklet,r(s),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(6),H.Z.error(e.t0.message);case 18:return e.prev=18,P(!1),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[6,15,18,21]])})));return function(n,t){return e.apply(this,arguments)}}(),_e=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var i,o,a;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S){e.next=2;break}return e.abrupt("return");case 2:return P(!0),e.prev=3,i=n.target.checked,e.next=7,u.configBlocklet({input:{did:t.meta.did,configs:[{key:G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE,value:i?"no":"yes"}]}});case 7:o=e.sent,a=o.blocklet,r(a),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),H.Z.error(e.t0.message);case 15:return e.prev=15,P(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[3,12,15,18]])})));return function(n){return e.apply(this,arguments)}}(),Te=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var r,i,o;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=xe.corsAllowedOrigins||[],i=n.split(",").map((function(e){return e.trim()})).filter(Boolean),!I()(r,i)){e.next=4;break}return e.abrupt("return",!1);case 4:return e.prev=4,P(!0),o=i.length?i:["__none__"],e.next=9,u.updateRoutingSite({input:{id:xe.id,corsAllowedOrigins:o,teamDid:t.meta.did}});case 9:P(!1),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(4),H.Z.error(e.t0.message),P(!1),e.abrupt("return",!1);case 17:return e.abrupt("return",!0);case 18:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(n){return e.apply(this,arguments)}}(),Ne=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var i,o;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S){e.next=2;break}return e.abrupt("return");case 2:return P(!0),e.prev=3,e.next=6,u.configBlocklet({input:{did:t.meta.did,configs:[{key:G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SK,value:n}]}});case 6:i=e.sent,o=i.blocklet,r(o),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),H.Z.error(e.t0.message);case 14:return e.prev=14,P(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[3,11,14,17]])})));return function(n){return e.apply(this,arguments)}}(),Re={"&::after":{content:'"'.concat(v("common.switch"),'"')}};return(0,oe.jsxs)(Ve,(0,i.Z)((0,i.Z)({},c),{},{children:[Le.map((function(e){return(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:0,children:e.description}),(0,oe.jsx)(V.Z,{style:{marginTop:0},disabled:S||M,loading:S,initialValue:e.value,onSubmit:function(n){return Ae(e.key,n)}})]})})),(0,oe.jsx)(x.Z,{className:"config-form",component:U.Z,my:3}),(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:1,sx:{flexGrow:0,width:"auto"},children:v("blocklet.config.logoSquare")}),(0,oe.jsx)(x.Z,{className:F()("uploader-wrapper",l&&"enabled"),sx:Re,onClick:function(){return me(ae)},children:(0,oe.jsx)(W.Z,{sx:{height:80,width:80},variant:"square",alt:"Blocklet Logo",src:X})}),(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mt:4,children:v("blocklet.config.logoRect")}),(0,oe.jsx)(x.Z,{mb:1.5,className:"config-desc",children:v("blocklet.config.logoRectDesc")}),(0,oe.jsx)(x.Z,{className:F()("uploader-wrapper",l&&"enabled"),sx:Re,onClick:function(){return me(le)},children:(0,oe.jsx)("img",{alt:"Blocklet Rect Logo",src:$,style:{height:"80px"}})}),(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mt:4,children:v("blocklet.config.logoFavicon")}),(0,oe.jsx)(x.Z,{mb:1.5,className:"config-desc",children:v("blocklet.config.logoFaviconDesc")}),(0,oe.jsx)(x.Z,{sx:{display:"inline-flex",cursor:l?"pointer":"default"},onClick:function(){return me(se)},children:(0,oe.jsx)(W.Z,{variant:"square",sx:{width:20,height:20},alt:"Blocklet Favicon Logo",src:ee})}),(0,oe.jsx)(Ue,{id:"\u200buploader-logo",ref:J,popup:!0,onUploadFinish:function(){J.current.close()},plugins:[],apiPathProps:re,coreProps:{restrictions:{allowedFileTypes:["image/*",".jpg",".jpeg",".png",".gif",".svg"],maxFileSize:10485760,maxNumberOfFiles:1}},tusProps:{headers:Z}},"uploader-logo"),(0,oe.jsx)(x.Z,{className:"config-form",children:"all"===Y&&"registry"===t.source&&(0,oe.jsxs)(x.Z,{className:"config-item",children:[(0,oe.jsxs)(x.Z,{className:"config-label",children:[v("blocklet.config.access.publicToStore"),(0,oe.jsx)(x.Z,{className:"config-desc",children:v("blocklet.config.access.publicInstanceTip")})]}),(0,oe.jsx)(D.Z,{disabled:M,checked:q,defaultChecked:!0,onChange:Pe})]})}),(0,oe.jsx)(x.Z,{className:"config-form",component:U.Z,my:3}),(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:0,children:v("blocklet.config.languages")}),(0,oe.jsx)(ce,{style:{marginTop:0},disabled:S||M,loading:S,options:De,initialValue:je?je.value.split(","):["en","zh"],onSubmit:function(e){return Ae("BLOCKLET_APP_LANGUAGES",e)},helperText:v("blocklet.config.selectLanguagesTip")})]}),(0,oe.jsx)(x.Z,{className:"config-form",component:U.Z,my:3}),(0,oe.jsx)(x.Z,{className:"config-form",mt:2,children:(0,oe.jsx)(x.Z,{className:"config-label",mb:0,children:v("common.security")})}),(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:0,children:v("router.domainSecurity.cors.title")}),(0,oe.jsx)(x.Z,{mb:1.5,className:"config-desc",children:v("router.domainSecurity.cors.description",{name:"the blocklet"})}),(0,oe.jsx)(V.Z,{style:{marginTop:0},disabled:S||M,loading:S,initialValue:(xe.corsAllowedOrigins||[]).join(", "),onSubmit:Te})]}),(0,oe.jsx)(x.Z,{className:"config-form",component:U.Z,my:3}),(0,oe.jsx)(x.Z,{mb:2,className:"config-label",fontSize:20,children:v("blocklet.config.dangerZone")}),(0,oe.jsxs)(x.Z,{px:2,py:1,sx:{border:"1px solid red",borderRadius:2},children:[(0,oe.jsx)(x.Z,{className:"config-form",mt:2,children:!f&&(0,oe.jsxs)(x.Z,{className:"config-item",children:[(0,oe.jsxs)(x.Z,{className:"config-label",children:[v("blocklet.config.deletable.name"),(0,oe.jsx)(x.Z,{className:"config-desc",children:v(be?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable")})]}),(0,oe.jsx)(D.Z,{disabled:M,checked:!be,defaultChecked:!0,onChange:_e})]})}),(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsx)(x.Z,{className:"config-label",fontSize:14,mb:0,children:v("blocklet.config.sk")}),(0,oe.jsx)(ye,{disabled:S||M,loading:S,initialValue:t.environments.find((function(e){return"BLOCKLET_APP_SK"===e.key})).value,onChange:Ne})]}),f&&(0,oe.jsx)(pe.Z,{role:"owner",children:function(e){return(e||fe.C)&&(0,oe.jsxs)(x.Z,{className:"config-form",mt:2,children:[(0,oe.jsxs)(x.Z,{className:"config-item",children:[(0,oe.jsx)(x.Z,{className:"config-label",mb:0,children:v("team.transferApp.name")}),(0,oe.jsxs)(z.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"transfer-app",onClick:function(){return B(!0)},children:[(0,oe.jsx)(K.Z,{style:{fontSize:"1.3em",marginRight:4}}),v("team.transferApp.name")]})]}),R&&(0,oe.jsx)(Oe,{onCancel:function(){return B(!1)},onSuccess:function(){return B(!1)}})]})}}),(0,oe.jsx)(x.Z,{className:"config-form",mt:2,children:(0,oe.jsxs)(x.Z,{className:"config-item",children:[(0,oe.jsxs)(x.Z,{className:"config-label",children:[v("blocklet.config.clearCache.name"),(0,oe.jsx)(x.Z,{className:"config-desc",children:v("blocklet.config.clearCache.purpose")})]}),(0,oe.jsx)(Ze,{teamDid:he})]})})]})]}))}var We=(0,pe.V)(Ke,"mutate_blocklets"),Ge=(0,pe.V)(Ke,"",ue.Wf);function He(e){return(0,de.h6)().inService?(0,oe.jsx)(Ge,(0,i.Z)({},e)):(0,oe.jsx)(We,(0,i.Z)({},e))}Ke.propTypes={blocklet:u().object.isRequired,onUpdate:u().func,hasPermission:u().bool},Ke.defaultProps={onUpdate:function(){},hasPermission:!1};var Ve=c.Z.div(Re||(Re=(0,r.Z)(["\n padding-top: 24px;\n .config-form {\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n }\n }\n\n .config-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px 0;\n }\n\n .config-label {\n font-weight: bold;\n }\n\n .config-desc {\n font-weight: normal;\n font-size: 12px;\n color: #666;\n }\n\n .form-item {\n margin-top: 0;\n }\n\n .uploader-wrapper {\n display: inline-flex;\n position: relative;\n font-size: 0px;\n &.enabled {\n cursor: pointer;\n }\n &::after {\n display: none;\n }\n &.enabled::after {\n display: block;\n opacity: 0;\n position: absolute;\n bottom: 0;\n background: rgba(0, 0, 0, 0.2);\n left: 0;\n right: 0;\n height: 2.2em;\n color: white;\n text-align: center;\n font-size: 12px;\n line-height: 2em;\n transition: opacity 0.3s ease;\n }\n &:hover::after {\n opacity: 1;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")})),Ye=t(78789),qe=t(46121),Me=t(87535),Je=t(87006),Qe=t(72097),Xe=t(49735),$e=t.n(Xe),en=t(35147),nn=t(14764),tn=t(52553),rn=t.n(tn),on=t(27021),an=t.n(on),ln=t(44632),sn=t.n(ln),cn={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};var dn=function(){var e,n,t,r=(0,de.h6)().api,o=(0,ke.y0)().blocklet,a=(0,L.PE)().t,l=null===o||void 0===o||null===(e=o.meta)||void 0===e?void 0:e.did,s=Object.assign((0,i.Z)({},cn),(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.notification)||void 0===t?void 0:t.email)||{}),c=(0,nn.cI)({defaultValues:$e()(s,Object.keys(cn))}),d=c.handleSubmit,u=c.control,f=c.formState,p=c.watch,m=c.reset,h=p("enabled"),Z=(0,en.Z)(function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var t,o,s,c,d;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.configNotification({input:{did:l,notification:JSON.stringify({email:n})}});case 3:s=e.sent,c=s.blocklet,d=Object.assign((0,i.Z)({},cn),(null===c||void 0===c||null===(t=c.settings)||void 0===t||null===(o=t.notification)||void 0===o?void 0:o.email)||{}),m(d),H.Z.success(a("oauth.saveSuccess")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),H.Z.error(e.t0.message||a("oauth.saveFailed"));case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(n){return e.apply(this,arguments)}}()),g=(0,en.Z)((function(e){var n=null===e||void 0===e?void 0:e.trim();return n?!!rn()(n)||a("notification.email.fromInvalid"):a("notification.email.fromRequired")})),v=(0,en.Z)((function(e){var n=null===e||void 0===e?void 0:e.trim();return n?!!an()(n,{require_host:!1,protocols:[]})||a("notification.email.hostInvalid"):a("notification.email.hostRequired")})),b=(0,en.Z)((function(e){return e?!!sn()(e)||a("notification.email.portInvalid"):a("notification.email.portRequired")})),j=(0,en.Z)((function(e){return!(null===e||void 0===e||!e.trim())||a("notification.email.userRequired")})),k=(0,en.Z)((function(e){return!(null===e||void 0===e||!e.trim())||a("notification.email.passwordRequired")})),y=(0,en.Z)((function(){return!0}));return(0,oe.jsx)(x.Z,{children:(0,oe.jsxs)("form",{onSubmit:d(Z),disabled:!0,children:[(0,oe.jsx)(nn.Qr,{name:"enabled",control:u,render:function(e){var n=e.field;return(0,oe.jsx)(Ae.Z,{control:(0,oe.jsx)(D.Z,(0,i.Z)({checked:n.value},n)),label:a("notification.email.enable"),sx:{marginBottom:"8px"}})}}),(0,oe.jsx)(nn.Qr,{name:"from",control:u,rules:{validate:h?g:y},render:function(e){var n,t=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,children:(0,oe.jsx)(Je.Z,(0,i.Z)((0,i.Z)({},t),{},{label:a("notification.email.from"),error:!!f.errors[t.name],helperText:(null===(n=f.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(nn.Qr,{name:"host",control:u,rules:{validate:h?v:y},render:function(e){var n,t=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,children:(0,oe.jsx)(Je.Z,(0,i.Z)((0,i.Z)({},t),{},{error:!!f.errors[t.name],label:a("notification.email.host"),helperText:(null===(n=f.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(nn.Qr,{name:"port",control:u,rules:{validate:h?b:y},render:function(e){var n,t=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,children:(0,oe.jsx)(Je.Z,(0,i.Z)((0,i.Z)({},t),{},{type:"number",error:!!f.errors[t.name],label:a("notification.email.port"),helperText:(null===(n=f.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(nn.Qr,{name:"user",control:u,rules:{validate:h?j:y},render:function(e){var n,t=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,children:(0,oe.jsx)(Je.Z,(0,i.Z)((0,i.Z)({},t),{},{error:!!f.errors[t.name],label:a("notification.email.user"),helperText:(null===(n=f.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(nn.Qr,{name:"password",control:u,rules:{validate:h?k:y},render:function(e){var n,t=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,children:(0,oe.jsx)(Je.Z,(0,i.Z)((0,i.Z)({},t),{},{type:"password",error:!!f.errors[t.name],label:a("notification.email.password"),helperText:(null===(n=f.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(nn.Qr,{name:"secure",control:u,rules:{validate:y},render:function(e){var n=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,children:(0,oe.jsx)(Ae.Z,{control:(0,oe.jsx)(D.Z,(0,i.Z)((0,i.Z)({checked:n.value},n),{},{disabled:!h})),label:a("notification.email.secure"),style:{marginBottom:16}})})}}),(0,oe.jsx)(Qe.Z,{type:"submit",variant:"contained",onSubmit:d(Z),disabled:!f.isDirty,children:a("oauth.save")})]})})},un=[{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:"More"}),value:"more"}];var fn,pn,mn=function(){var e=(0,s.useState)(un[0].value),n=(0,o.Z)(e,2),t=n[0],r=n[1],i=(0,s.useContext)(L.RD).t,a=(0,qe.Z)((function(){return{email:(0,oe.jsx)(dn,{}),more:(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(Ye.Z,{children:i("notification.comingSoon")})})}}),[i]);return(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(S.Z,{tabs:un,current:t,onChange:r}),(0,oe.jsx)(x.Z,{marginTop:"10px",children:a[t]})]})},hn=t(6779),xn=t(6698),Zn=t(11909),gn=t(1484),vn=t(2569),bn=t(88356),jn=t(98127),kn=t(86008),yn=t(70115),Cn="roles",wn=[].concat((0,l.Z)(yn.Z),[{value:Cn,icon:jn.Z,title:{zh:"\u6307\u5b9a\u901a\u884c\u8bc1\u53ef\u8bbf\u95ee",en:"Accessible to selected passports"},description:{zh:"\u53ea\u6709\u6307\u5b9a\u7684\u901a\u884c\u8bc1\u53ef\u4ee5\u8bbf\u95ee",en:"Only specified passports can access"}}]),Ln=function(e,n){if(e&&e.startsWith(h.WHO_CAN_ACCESS_PREFIX_ROLES)){var t=(0,E.getRolesFromAuthConfig)({whoCanAccess:e}),r=n.filter((function(e){return t.includes(e.name)}));return{access:Cn,roles:r}}return{access:e,roles:[]}},Sn=function(e,n){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).roles,r=void 0===t?[]:t,i=(e.configs||[]).find((function(e){return e.key===G.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO}));if(i)return Ln(i.value,r);if(n&&O()(n,"settings.whoCanAccess")&&O()(n,"settings.whoCanAccess")!==h.WHO_CAN_ACCESS.ALL)return Ln(O()(n,"settings.whoCanAccess"),r);var o=(0,E.findServiceFromMeta)(e.meta,h.NODE_SERVICES.AUTH);return O()(o,"config.whoCanAccess")?Ln(o.config.whoCanAccess,r):{access:h.WHO_CAN_ACCESS.ALL,roles:[]}};function En(e){var n=e.blocklet,t=e.ancestors,r=e.children,i=(0,ee.Z)(),a=(0,s.useState)(""),c=(0,o.Z)(a,2),d=c[0],u=c[1],f=(0,L.PE)(),p=f.t,m=f.locale,Z=(0,de.h6)().api,g=(0,Ne.DJ)().roles,v=(0,s.useState)(""),b=(0,o.Z)(v,2),j=b[0],k=b[1],y=t[0]||n,C=Sn(n,y,{roles:g}),w=C.access,S=C.roles,P=(0,s.useState)(w),A=(0,o.Z)(P,2),N=A[0],O=A[1],R=(0,s.useState)(S),I=(0,o.Z)(R,2),B=I[0],F=I[1],D=[].concat((0,l.Z)(t.map((function(e){return e.meta.did}))),[n.meta.did]),U={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:i.palette.text.secondary},K=t.concat(n).map((function(e){return(0,E.getDisplayName)(e,!0)})).join(" / ");if((0,ue.wS)(n.status))return null;if("unknown"===n.status&&(0,ue.wS)(n.status))return null;var W=function(){u(!1)},G=function(e){e.stopPropagation(),u(!0)},V=function(){var e=(0,T.Z)((0,_.Z)().mark((function e(){var n;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!j){e.next=2;break}return e.abrupt("return");case 2:return k(!0),e.prev=3,(n=N)===Cn&&(n="".concat(h.WHO_CAN_ACCESS_PREFIX_ROLES).concat(B.map((function(e){return e.name})).join(","))),e.next=8,Z.updateWhoCanAccess({input:{did:D,whoCanAccess:n}});case 8:H.Z.success(p("blocklet.config.access.updatedTip")),W(),k(!1),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(3),k(!1),H.Z.error((0,ue.Z)(e.t0));case 17:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(){return e.apply(this,arguments)}}(),q=j||N===Cn&&!B.length;return["function"===typeof r?r({open:G}):(0,oe.jsx)(J.Z,{onClick:G,"data-cy":"action-config-component",children:(0,oe.jsx)(bn.default,{})}),d&&(0,oe.jsxs)(An,{open:!0,fullWidth:!0,title:K,onClose:W,PaperProps:{style:{minHeight:"auto"}},actions:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(z.Z,{onClick:W,color:"inherit","data-cy":"config-access-cancel",children:p("common.cancel")}),(0,oe.jsxs)(z.Z,{onClick:V,color:"primary",disabled:q,variant:"contained",autoFocus:!0,"data-cy":"config-access-confirm",children:[j&&(0,oe.jsx)(Y.Z,{size:16}),p("common.confirm")]})]}),children:[(0,oe.jsx)(x.Z,{mt:4,mb:3,children:(0,oe.jsx)(Je.Z,{label:p("blocklet.config.access.description"),select:!0,fullWidth:!0,value:N,onChange:function(e){var n=e.target.value;O(n)},"data-cy":"config-access-select",SelectProps:{renderValue:function(e){var n=wn.find((function(n){return n.value===e}));return n?(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(n.icon,{style:U}),n.title[m]]}):null}},children:wn.map((function(e){return(0,oe.jsxs)(_n,{value:e.value,sx:{display:"block"},"data-cy":"config-access-opt-".concat(e.value),children:[(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,oe.jsx)(e.icon,{style:U}),(0,oe.jsx)(x.Z,{children:e.title[m]})]}),(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(x.Z,{className:"tip",children:e.description[m]})})]})}))})}),N===Cn&&(0,oe.jsx)(x.Z,{mt:4,mb:3,children:(0,oe.jsx)(Je.Z,{label:p("blocklet.config.access.description"),select:!0,fullWidth:!0,value:B.map((function(e){return e.name})),onChange:function(e){F(g.filter((function(n){return(e.target.value||[]).includes(n.name)})))},SelectProps:{multiple:!0,renderValue:function(e){return(0,oe.jsx)(x.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((function(e){var n=g.find((function(n){return n.name===e}));return(0,oe.jsx)($.Z,{label:n.title},n.text)}))})}},children:g.map((function(e){var n=e.name,t=e.title;return(0,oe.jsxs)(Q.Z,{value:n,children:[(0,oe.jsx)(_e.Z,{checked:B.some((function(e){return e.name===n}))}),(0,oe.jsx)(kn.Z,{primary:t})]},n)}))})})]})]}En.propTypes={blocklet:u().object.isRequired,ancestors:u().array,children:u().any},En.defaultProps={ancestors:[],children:null};var Pn,An=(0,c.Z)(Le.ZP)(fn||(fn=(0,r.Z)(["\n .MuiDialogContent-root {\n padding-top: 0;\n margin-top: -32px;\n }\n .MuiToolbar-root {\n padding-right: 12px;\n }\n .ux-dialog_right {\n padding-right: 20px;\n }\n"]))),_n=(0,c.Z)(Q.Z)(pn||(pn=(0,r.Z)(["\n .tip {\n font-size: 12px;\n color: ",";\n }\n"])),(function(e){return e.theme.palette.text.secondary}));function Tn(e){var n,t,r=e.blocklet,i=e.ancestors,a=e.depth,c=(0,ee.Z)(),d=(0,L.PE)(),u=d.t,f=d.locale,p=(0,Ne.DJ)().roles,m=(0,s.useState)(!0),h=(0,o.Z)(m,2),Z=h[0],g=h[1],v=(0,ke.y0)().recommendedDomain,b=i[0]||r,j="/".concat(i.map((function(e){return e.mountPoint||"/"})).join("/"),"/").concat(r.mountPoint||"/").replace(/\/+/g,"/"),k=(0,ue.vH)({blocklet:b,domain:{value:v},mountPoint:j,params:(0,ue.f0)(b,f)}),w={fill:c.palette.text.secondary},S=a>0&&r.children.length>0,A=(0,oe.jsx)(J.Z,{size:"small",children:Z?(0,oe.jsx)(C.Z,{fontSize:"inherit"}):(0,oe.jsx)(y.default,{fontSize:"inherit"})}),_=Sn(r,b,{roles:p}),T=_.access,N=_.roles;if("roles"!==T)t=yn.Z.find((function(e){return e.value===T}))||yn.Z[2];else{var O=N.map((function(e){return e.title})).join("/");t={title:{zh:"\u53ea\u6709 ".concat(O," \u53ef\u4ee5\u8bbf\u95ee"),en:"Only ".concat(O," can access")}}}return[(a>0||"gateway"!==r.meta.group)&&(0,oe.jsxs)(x.Z,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,oe.jsxs)(x.Z,{pl:Math.max(2*(a-1),0),width:{xs:300,md:400},display:"flex",alignItems:"center",style:{cursor:S?"pointer":"cursor"},onClick:function(){return S&&g(!Z)},children:[S?A:(0,oe.jsx)(x.Z,{width:28}),(0,oe.jsx)(P.Z,{blocklet:r,ancestors:i}),(0,oe.jsxs)(x.Z,{ml:"16px",children:[(0,oe.jsx)(x.Z,{style:{color:"#222",fontSize:18},children:(0,E.getDisplayName)(r,!0)}),(0,oe.jsx)(x.Z,{display:"flex",alignItems:"center",children:(0,oe.jsx)(x.Z,{color:"text.secondary",children:t.title[f]})})]})]},r),(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(hn.Z,{title:u("common.visit"),children:(0,oe.jsx)("a",{target:"_blank",href:k,rel:"noopener noreferrer",title:k,children:(0,oe.jsx)(J.Z,{children:(0,oe.jsx)(Zn.Z,{})})})}),(0,oe.jsx)(En,{blocklet:r,ancestors:i,children:function(e){var n=e.open;return(0,oe.jsx)(hn.Z,{title:u("common.edit"),children:(0,oe.jsx)(J.Z,{onClick:n,"data-cy":"btn-edit-".concat(r.meta.did),children:(0,oe.jsx)(gn.Z,{style:w})})})}})]},"actions")]},"group-not-gateway-box"),(0,oe.jsx)(vn.Z,{depth:a}),null!==(n=r.children)&&void 0!==n&&n.length?(0,oe.jsx)(xn.Z,{in:Z,children:r.children.map((function(e){return(0,oe.jsx)(Tn,{blocklet:e,ancestors:[].concat((0,l.Z)(i),[r]),depth:a+1},"".concat(a+1,"-").concat(e.meta.did))}))},"blocklet-collapse"):null]}function Nn(){var e=(0,L.PE)().t,n=(0,ke.y0)().blocklet,t=(0,l.Z)(n.children)||[];return"gateway"!==n.meta.group&&t.unshift(n),(0,oe.jsx)(On,{component:"div",children:t&&t.length?[(0,oe.jsx)(x.Z,{mt:2,ml:{xs:"-12px",md:"-24px"},style:{maxWidth:1080},children:(0,oe.jsx)(Tn,{blocklet:n},"0-".concat(n.meta.did))},"top-blocklet-".concat(n.meta.did))]:(0,oe.jsx)(x.Z,{mt:8,children:(0,oe.jsx)(Ye.Z,{children:e("blocklet.component.noComponent")})})})}Tn.propTypes={blocklet:u().object.isRequired,ancestors:u().array,depth:u().number},Tn.defaultProps={ancestors:[],depth:0},Nn.propTypes={};var On=(0,c.Z)(x.Z)(Pn||(Pn=(0,r.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: ",";\n margin-bottom: ",";\n &.first {\n margin-top: 0;\n }\n }\n"])),(function(e){return e.theme.spacing(5)}),(function(e){return e.theme.spacing(3)})),Rn=t(92746);var In=function(){var e,n,t,r=(0,de.h6)().api,o=(0,ke.y0)().blocklet,a=(0,L.PE)().t,l=null===o||void 0===o||null===(e=o.meta)||void 0===e?void 0:e.did,s=Object.assign({enabled:!1,domain:"",clientId:""},(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.oauth)||void 0===t?void 0:t.auth0)||{}),c=(0,nn.cI)({defaultValues:$e()(s,["domain","clientId","enabled"])}),d=c.handleSubmit,u=c.control,f=c.formState,p=c.watch,m=c.reset,h=p("enabled"),Z=(0,en.Z)(function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var t,i,o,s,c;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.configOAuth({input:{did:l,oauth:JSON.stringify({auth0:n})}});case 3:o=e.sent,s=o.blocklet,c=Object.assign({enabled:!1,domain:"",clientId:""},(null===s||void 0===s||null===(t=s.settings)||void 0===t||null===(i=t.oauth)||void 0===i?void 0:i.auth0)||{}),m(c),H.Z.success(a("oauth.saveSuccess")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),H.Z.error(e.t0.message||a("oauth.saveFailed"));case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(n){return e.apply(this,arguments)}}()),g=(0,en.Z)((function(e){return!(null===e||void 0===e||!e.trim())||a("oauth.auth0.domainDescribe")})),v=(0,en.Z)((function(e){return!(null===e||void 0===e||!e.trim())||a("oauth.auth0.clientIdDescribe")})),b=(0,en.Z)((function(){return!0}));return(0,oe.jsx)(x.Z,{children:(0,oe.jsxs)("form",{onSubmit:d(Z),disabled:!0,children:[(0,oe.jsx)(nn.Qr,{name:"enabled",control:u,render:function(e){var n=e.field;return(0,oe.jsx)(Ae.Z,{control:(0,oe.jsx)(Rn.Z,(0,i.Z)({checked:n.value,style:{marginRight:"6px"}},n)),label:a("oauth.auth0.enable"),sx:{marginBottom:2,ml:1}})}}),(0,oe.jsx)(nn.Qr,{name:"domain",control:u,rules:{validate:h?g:b},render:function(e){var n,t=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,children:(0,oe.jsx)(Je.Z,(0,i.Z)((0,i.Z)({},t),{},{label:a("oauth.auth0.domain"),error:!!f.errors[t.name],helperText:(null===(n=f.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(nn.Qr,{name:"clientId",control:u,rules:{validate:h?v:b},render:function(e){var n,t=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,children:(0,oe.jsx)(Je.Z,(0,i.Z)((0,i.Z)({},t),{},{error:!!f.errors[t.name],label:a("oauth.auth0.clientId"),helperText:(null===(n=f.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h}))})}}),(0,oe.jsx)(Qe.Z,{type:"submit",variant:"contained",onSubmit:d(Z),disabled:!f.isDirty,children:a("oauth.save")})]})})},Bn=t(29529),Fn=t(25139),Dn={ttl:604800};function Un(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?86400*e.ttl:e.ttl/86400;return(0,i.Z)((0,i.Z)({},e),{},{ttl:n})}function zn(){var e,n,t=(0,de.h6)().api,r=(0,ke.y0)().blocklet,o=null===r||void 0===r||null===(e=r.meta)||void 0===e?void 0:e.did,a=Object.assign({},Dn,(null===r||void 0===r||null===(n=r.settings)||void 0===n?void 0:n.session)||{}),l=(0,nn.cI)({defaultValues:$e()(Un(a),["ttl"])}),s=l.handleSubmit,c=l.control,d=l.formState,u=l.reset,f=(0,L.PE)().t,p=(0,en.Z)(function(){var e=(0,T.Z)((0,_.Z)().mark((function e(n){var r,i,a,l;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.updateAppSessionConfig({input:{did:o,config:Un(n,!0)}});case 3:i=e.sent,a=i.blocklet,l=Object.assign({},Dn,$e()((null===a||void 0===a||null===(r=a.settings)||void 0===r?void 0:r.session)||{},["ttl"])),u(Un(l)),H.Z.success(f("common.configSuccess")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),H.Z.error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(n){return e.apply(this,arguments)}}());return(0,oe.jsx)(x.Z,{children:(0,oe.jsxs)("form",{onSubmit:s(p),disabled:!0,children:[(0,oe.jsx)(nn.Qr,{name:"ttl",control:c,render:function(e){var n=e.field;return(0,oe.jsx)(Me.Z,{fullWidth:!0,sx:{mb:2},children:(0,oe.jsxs)(Fn.Z,{px:3,children:[(0,oe.jsx)(x.Z,{mx:-3,my:.5,children:f("blocklet.config.session.ttl",{day:n.value})}),(0,oe.jsx)(Bn.ZP,(0,i.Z)((0,i.Z)({},n),{},{defaultValue:7,step:1,marks:[{value:1,label:f("blocklet.config.session.day",{day:1})},{value:7,label:f("blocklet.config.session.days",{day:7})},{value:14,label:f("blocklet.config.session.days",{day:14})},{value:21,label:f("blocklet.config.session.days",{day:21})},{value:30,label:f("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto",style:{maxWidth:"360px"}}))]})})}}),(0,oe.jsx)(Qe.Z,{type:"submit",variant:"contained",onSubmit:s(p),disabled:!d.isDirty,children:f("oauth.save")})]})})}var Kn=t(48537),Wn=t(95002),Gn=t(2291),Hn=t(75260),Vn=t(28595),Yn=t(61398),qn=t.n(Yn),Mn=(0,s.forwardRef)((function(e,n){var t=(0,s.useContext)(L.RD).t,r=(0,Vn.Z)({show:!1,title:"",content:"",onConfirm:qn(),onCancel:qn(),loading:!1}),i=(0,en.Z)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r.show=!0,r.title=e.title,r.content=e.content,r.onConfirm=e.onConfirm||qn(),r.onCancel=e.onCancel||qn(),r.loading=!1})),o=(0,en.Z)((function(){r.title="",r.content="",r.onConfirm=qn(),r.onCancel=qn()})),a=(0,en.Z)((function(){r.show=!1,setTimeout((function(){o()}),300)})),l=(0,en.Z)((function(){a(),null===r||void 0===r||r.onCancel()}),[]),c=(0,en.Z)((0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.loading=!0,e.prev=1,e.next=4,null===r||void 0===r?void 0:r.onConfirm(a);case 4:return e.prev=4,r.loading=!1,e.finish(4);case 7:case"end":return e.stop()}}),e,null,[[1,,4,7]])}))),[]);return(0,s.useImperativeHandle)(n,(function(){return{open:i,close:a}}),[i,a]),(0,oe.jsx)(Le.I4,{open:r.show,title:r.title,onConfirm:c,onCancel:l,confirmButton:{text:t("common.confirm"),props:{variant:"contained",color:"primary",loading:r.loading}},cancelButton:{text:t("common.cancel"),props:{variant:"outlined",color:"primary"}},children:r.content})}));var Jn=t(70177),Qn=t(59182),Xn=t.n(Qn),$n=t(76032),et=t.n($n),nt=t(55581),tt=t(63531),rt=t(92522),it=t.n(rt),ot=(0,s.forwardRef)((function(e,n){var t,r,i=(0,s.useContext)(L.RD).t,o=(0,ke.y0)().blocklet,a=(0,de.h6)().api,l=(0,Vn.Z)({mode:"view",show:!1,data:{},callback:qn()}),c=(0,nt.Fg)(),d=(null===c||void 0===c||null===(t=c.transitions)||void 0===t||null===(r=t.duration)||void 0===r?void 0:r.leavingScreen)||300,u=(0,en.Z)((function(){l.mode="view",l.data={},l.callback=qn()}),[]),f=(0,en.Z)((function(){l.show=!1,setTimeout((function(){u()}),d)}),[]),p=(0,en.Z)((function(e){l.mode="view",l.show=!0,l.data=e}),[]),h=(0,en.Z)((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qn();l.mode="approve",l.show=!0,l.data=e,l.callback=n}),[]);(0,s.useImperativeHandle)(n,(function(){return{open:p,close:f,approve:h}}),[p,f,h]);var Z=(0,qe.Z)((function(){if(!l.show)return[];l.data.migratedFrom=[l.data.appId,l.data.appPid];var e=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return!1!==l.data.isMaster&&Xn()(e,"appliedAt","status"),e.map((function(e){var n=i("federated.info.".concat(e)),t=l.data[e];if("appName"===e&&l.data.isMaster&&(t=(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(Kn.Z,{component:Wn.Z}),t]})),["appId","appPid","serverId"].includes(e)&&(t=(0,oe.jsx)(tt.kL,{children:t})),["appUrl"].includes(e)&&(t=(0,oe.jsx)(x.Z,{component:"a",href:t,target:"_blank",children:t})),["appLogo"].includes(e)){var r=it()(t)?t:m()(l.data.appUrl||"",t||"");try{var o=new URL(r);o.searchParams.set("imageFilter","resize"),o.searchParams.set("w","80"),o.searchParams.set("h","80"),t=(0,oe.jsx)("img",{src:o.href,width:"60",height:"60",alt:l.data.appName})}catch(a){t=(0,oe.jsx)("img",{src:r,width:"60",height:"60",alt:l.data.appName})}}("status"===e&&(t=t&&i("federated.status.".concat(t))),"migratedFrom"===e)&&(t=(l.data.migratedFrom||[]).filter((function(e){return![l.data.appId,l.data.appPid].includes(e)})).map((function(e){return(0,oe.jsx)(tt.kL,{children:e})})));return et()(t)&&(t="-"),{name:n,value:t}}))}),[l.data]),g="approve"===l.mode,v=(0,en.Z)((0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.auditFederatedLogin({input:{memberPid:l.data.appPid,did:o.appPid,status:"rejected"}});case 2:f(),null===l||void 0===l||l.callback(!1);case 4:case"end":return e.stop()}}),e)})))),b=(0,en.Z)((0,T.Z)((0,_.Z)().mark((function e(){return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.auditFederatedLogin({input:{memberPid:l.data.appPid,did:o.appPid,status:"approved"}});case 2:f(),null===l||void 0===l||l.callback(!0);case 4:case"end":return e.stop()}}),e)}))));return(0,oe.jsx)(Le.ZP,{open:l.show,title:i(g?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:f,actions:g?(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Qe.Z,{color:"error",variant:"contained",onClick:v,children:i("common.reject")}),(0,oe.jsx)(Qe.Z,{variant:"contained",onClick:b,children:i("common.approve")})]}):(0,oe.jsx)(Qe.Z,{variant:"outlined",onClick:f,children:i("common.close")}),children:Z.map((function(e){return(0,oe.jsx)(Jn.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:e.name,children:e.value},e.name)}))})})),at=ot,lt=t(29951),st=t(34760),ct=t.n(st),dt=(0,s.forwardRef)((function(e,n){var t,r,i=(0,nt.Fg)(),o=(null===i||void 0===i||null===(t=i.transitions)||void 0===t||null===(r=t.duration)||void 0===r?void 0:r.leavingScreen)||300,a=(0,s.useContext)(L.RD).t,l=(0,Vn.Z)({show:!1,data:{link:""}}),c=(0,en.Z)((function(){l.data.link=""}),[]),d=(0,en.Z)((function(){l.show=!1,setTimeout((function(){c()}),o)}),[]),u=(0,en.Z)((function(e){var n=e.link;l.show=!0,l.data.link=n}),[]);(0,s.useImperativeHandle)(n,(function(){return{open:u,close:d}}),[u,d]);var f=(0,en.Z)((function(){ct()(l.data.link),d()}),[d]);return(0,oe.jsxs)(Le.ZP,{open:l.show,title:a("federated.joinFederatedLogin"),onClose:d,PaperProps:{style:{minHeight:"unset"}},actions:(0,oe.jsx)(z.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:f,children:a("common.copyAndClose")}),children:[(0,oe.jsx)(x.Z,{mb:1,children:a("federated.inviteJoinFederatedLoginDescription")}),(0,oe.jsx)(x.Z,{sx:{"& .copy-button":{display:"none !important"}},children:(0,oe.jsx)(lt.Z,{language:"shell",style:{marginBottom:0},children:l.data.link})})]})}));function ut(e){var n,t,r,i,o,a=e.mode,l=(0,s.useRef)(null),c=(0,s.useRef)(null),d=(0,s.useContext)(L.RD),u=d.t,f=d.locale,p=(0,ke.y0)(),m=p.blocklet,h=p.actions.refreshBlocklet,Z=function(){var e=(0,s.useRef)(null),n=(0,en.Z)((function(){for(var n,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];null===(n=e.current)||void 0===n||n.open.apply(n,r)})),t=(0,en.Z)((function(){for(var n,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];null===(n=e.current)||void 0===n||n.close.apply(n,r)})),r={open:n,close:t};return{confirmHolder:(0,oe.jsx)(Mn,{ref:e}),confirmApi:r}}(),g=Z.confirmApi,v=Z.confirmHolder,b=(0,de.h6)().api,j=(null===(n=m.settings.federated)||void 0===n?void 0:n.sites)||[],k=(null===(t=m.settings.federated)||void 0===t?void 0:t.config)||{},y=!1!==k.isMaster,C=(0,en.Z)((function(e){var n;null===(n=c.current)||void 0===n||n.open(e)})),w=(0,en.Z)((function(e){var n;null===(n=c.current)||void 0===n||n.approve(e,h)})),S=(0,en.Z)((function(e){g.open({title:u("federated.disableFederatedLogin"),content:u("federated.disableFederatedLoginDescription"),onConfirm:function(n){return(0,T.Z)((0,_.Z)().mark((function t(){return(0,_.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b.auditFederatedLogin({input:{memberPid:e.appPid,did:m.appPid,status:"revoked"}});case 2:n();case 3:case"end":return t.stop()}}),t)})))()}})})),E=(0,en.Z)((function(e){g.open({title:u("federated.enableFederatedLogin"),content:u("federated.enableFederatedLoginDescription"),onConfirm:function(n){return(0,T.Z)((0,_.Z)().mark((function t(){return(0,_.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b.auditFederatedLogin({input:{memberPid:e.appPid,did:m.appPid,status:"approved"}});case 2:n();case 3:case"end":return t.stop()}}),t)})))()}})})),P=(0,qe.Z)((function(){var e=[{label:u("common.name"),name:"appName",options:{customBodyRenderLite:function(e){var n=j[e],t=!1!==n.isMaster;return(0,oe.jsx)(x.Z,{display:"inline-block",children:(0,oe.jsxs)(x.Z,{component:"a",display:"flex",alignItems:"center",href:n.appUrl,target:"_blank",onClick:function(e){e.stopPropagation()},children:[t&&(0,oe.jsx)(Kn.Z,{component:Wn.Z,style:{marginRight:"4px"}}),n.appName]})})}}},{label:u("common.did"),name:"appId",options:{customBodyRenderLite:function(e){var n=j[e];return(0,oe.jsx)(Hn.Z,{children:n.appId})}}},{label:u("common.status"),name:"status",options:{customBodyRenderLite:function(e){var n=j[e],t=!1!==n.isMaster;return(0,oe.jsx)(x.Z,{children:t?"-":u("federated.status.".concat(n.status))})}}}];return y&&e.push({label:u("common.actions"),name:"actions",options:{customBodyRenderLite:function(e){var n=j[e],t=!1!==n.isMaster;return(0,oe.jsx)(x.Z,{display:"flex",gap:1,children:t?(0,oe.jsxs)(oe.Fragment,{children:["rejected"===n.status&&(0,oe.jsx)(z.Z,{variant:"contained",color:"error",size:"small",onClick:function(e){e.stopPropagation()},children:u("federated.status.rejected")}),"revoked"===n.status&&(0,oe.jsx)(z.Z,{variant:"contained",color:"secondary",size:"small",onClick:function(e){e.stopPropagation()},children:u("federated.status.revoked")})]}):(0,oe.jsxs)(oe.Fragment,{children:["pending"===n.status&&(0,oe.jsx)(z.Z,{variant:"contained",color:"primary",size:"small",onClick:function(e){e.stopPropagation(),w(n)},children:u("federated.status.pending")}),"approved"===n.status&&(0,oe.jsx)(z.Z,{variant:"contained",color:"error",size:"small",onClick:function(e){e.stopPropagation(),S(n)},style:{whiteSpace:"nowrap"},children:u("federated.revoke")}),"revoked"===n.status&&(0,oe.jsx)(z.Z,{variant:"contained",color:"warning",size:"small",onClick:function(e){e.stopPropagation(),E(n)},style:{whiteSpace:"nowrap"},children:u("federated.approve")})]})})}}}),e}),[k.appId,j,y]),A=(0,qe.Z)((function(){return{sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick:function(e,n){var t=n.dataIndex,r=j[t];C(r)}}}),[]),N=(0,en.Z)((function(){var e,n=m.environments.find((function(e){return e.key===G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL}));null!==n&&void 0!==n&&n.value?null===(e=l.current)||void 0===e||e.open({link:n.value}):H.Z.error(u("federated.failedToGetFederatedLoginLink"))}),[null===(r=m.site)||void 0===r||null===(i=r.domainAliases)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.href]),O=(0,en.Z)((function(){g.open({title:u("federated.quitFederatedLogin"),content:u("federated.quitFederatedLoginDescription"),onConfirm:function(e){return(0,T.Z)((0,_.Z)().mark((function n(){return(0,_.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,b.quitFederatedLogin({input:{did:m.appPid}});case 2:e();case 3:case"end":return n.stop()}}),n)})))()}})})),R=(0,en.Z)((function(){g.open({title:u("federated.disbandFederatedLogin"),content:u("federated.disbandFederatedLoginDescription"),onConfirm:function(e){return(0,T.Z)((0,_.Z)().mark((function n(){return(0,_.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,b.disbandFederatedLogin({input:{did:m.appPid}});case 2:e();case 3:case"end":return n.stop()}}),n)})))()}})})),I=[];return"master"!==a?I.push((0,oe.jsx)(z.Z,{size:"small",variant:"contained",color:"error",onClick:O,sx:{ml:1},children:u("federated.quitFederatedLogin")},"quitFederatedLogin")):(I.push((0,oe.jsx)(z.Z,{size:"small",variant:"contained",onClick:N,sx:{ml:1},children:u("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),I.push((0,oe.jsx)(z.Z,{color:"error",size:"small",variant:"contained",onClick:R,sx:{ml:1},children:u("federated.disbandFederatedLogin")},"disbandFederatedLogin"))),(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Gn.Z,{className:"main-table",locale:f,data:j,columns:P,customButtons:I,title:(0,oe.jsx)(x.Z,{className:"table-toolbar-left",children:u("oauth.federated")}),options:A}),v,(0,oe.jsx)(dt,{ref:l}),(0,oe.jsx)(at,{ref:c})]})}ut.propTypes={mode:u().oneOf(["member","master"])},ut.defaultProps={mode:"member"};var ft=ut,pt=(0,s.forwardRef)((function(e,n){var t,r,i=(0,s.useContext)(L.RD).t,o=(0,de.h6)().api,a=(0,ke.y0)().blocklet,l=null===a||void 0===a?void 0:a.appPid,c=(0,nt.Fg)(),d=(null===c||void 0===c||null===(t=c.transitions)||void 0===t||null===(r=t.duration)||void 0===r?void 0:r.leavingScreen)||300,u=(0,Vn.Z)({show:!1,appUrl:"",appUrlError:"",callback:qn()}),f=(0,en.Z)((function(){u.appUrl="",u.appUrlError="",u.callback=qn()}),[]),p=(0,en.Z)((function(){u.show=!1,setTimeout((function(){f()}),d)}),[]),m=(0,en.Z)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qn();u.show=!0,u.callback=e}),[]);(0,s.useImperativeHandle)(n,(function(){return{open:m,close:p}}),[m,p]);var h=(0,en.Z)((function(e){if(!e)throw new Error(i("federated.federatedJoinAppUrlRequired"));if(!it()(e))throw new Error(i("federated.federatedJoinAppUrlInvalid"))})),Z=(0,en.Z)((0,T.Z)((0,_.Z)().mark((function e(){var n;return(0,_.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,h(u.appUrl),e.next=4,o.joinFederatedLogin({input:{did:l,appUrl:u.appUrl}});case 4:n=e.sent,u.show=!1,p(),null===u||void 0===u||u.callback(n),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),u.appUrlError=e.t0.message;case 13:case"end":return e.stop()}}),e,null,[[0,10]])}))),[p,l]);return(0,oe.jsxs)(Le.ZP,{open:u.show,title:i("federated.joinFederatedLogin"),onClose:p,PaperProps:{style:{minHeight:"unset"}},actions:(0,oe.jsx)(z.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:Z,children:i("common.confirm")}),children:[(0,oe.jsx)(x.Z,{mb:1,children:i("federated.joinFederatedLoginDescription")}),(0,oe.jsx)(Je.Z,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:i("federated.federatedJoinAppUrl"),label:i("federated.federatedJoinAppUrl"),value:u.appUrl,error:!!u.appUrlError,helperText:u.appUrlError||"eg: https://www.arcblock.io",onChange:function(e){u.appUrl=e.target.value}})]})})),mt=pt;function ht(){var e,n,t,r,i=(0,s.useRef)(null),o=(0,s.useRef)(null),a=(0,s.useContext)(L.RD).t,l=(0,ke.y0)(),c=l.blocklet,d=l.actions.refreshBlocklet,u=(0,en.Z)((function(){var e,n,t,r=null===(e=c.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href;if(r)try{var o,l=new URL(r);null===(o=i.current)||void 0===o||o.open({link:l.origin})}catch(s){H.Z.error(a("federated.failedToGetFederatedLoginLink"))}}),[null===(e=c.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href]),f=(0,en.Z)((function(){var e;null===(e=o.current)||void 0===e||e.open((function(){d()}))}),[d]);if((null===(r=c.settings.federated)||void 0===r?void 0:r.sites.length)>0){var p,m=!1!==(null===(p=c.settings.federated)||void 0===p?void 0:p.config.isMaster);return(0,oe.jsx)(ft,{mode:m?"master":"member"})}return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)(x.Z,{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px",children:[(0,oe.jsx)(z.Z,{variant:"contained",onClick:u,children:a("federated.inviteJoinFederatedLogin")}),(0,oe.jsx)(U.Z,{sx:{width:"150px",color:"rgba(0, 0, 0, 0.3)"},children:"OR"}),(0,oe.jsx)(z.Z,{variant:"outlined",onClick:f,children:a("federated.joinFederatedLogin")})]}),(0,oe.jsx)(dt,{ref:i}),(0,oe.jsx)(mt,{ref:o})]})}var xt,Zt=function(){var e=(0,s.useContext)(L.RD).t,n=[{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:e("oauth.commonSettings")}),value:"settings"},{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:e("oauth.federated")}),value:"federated"},{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:"Auth0"}),value:"auth0"},{label:(0,oe.jsx)(x.Z,{textAlign:"center",width:"100%",children:e("oauth.moreLogin")}),value:"more"}],t=(0,s.useState)(n[0].value),r=(0,o.Z)(t,2),i=r[0],a=r[1],l=(0,qe.Z)((function(){return{auth0:(0,oe.jsx)(In,{}),federated:(0,oe.jsx)(ht,{}),more:(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(Ye.Z,{children:e("oauth.comingSoon")})}),settings:(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(zn,{})})}}),[e]);return(0,oe.jsxs)(x.Z,{children:[(0,oe.jsx)(S.Z,{tabs:n,current:i,onChange:a}),(0,oe.jsx)(x.Z,{marginTop:"10px",children:l[i]})]})},gt=["blocklet","onUpdate"],vt=function e(n){var t=n.tabs,r=n.blocklet,i=n.ancestors,o=void 0===i?[]:i,a=n.depth,s=void 0===a?1:a,c=n.t,d=[].concat((0,l.Z)(o.map((function(e){return e.meta.did}))),[r.meta.did]).join("/"),u=!(null!==o&&void 0!==o&&o.length);t.push({label:(0,oe.jsxs)(x.Z,{pl:2*Math.max(1,s-1),display:"flex",alignItems:"center",justifyContent:"flex-start",children:[u?(0,oe.jsx)(A.Z,{size:24,blocklet:r}):(0,oe.jsx)(P.Z,{size:24,blocklet:r,ancestors:o}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:u?c("blocklet.component.container"):(0,E.getDisplayName)(r,!0)})})]},d),value:d}),r.children.length>0&&r.children.forEach((function(n){e({tabs:t,blocklet:n,ancestors:[].concat((0,l.Z)(o),[r]),depth:s+1,t:c})}))};function bt(e){var n=e.blocklet,t=e.onUpdate,r=(0,a.Z)(e,gt),l=(0,s.useContext)(L.RD).t,c=(0,de.h6)(),d=c.info,u=c.inService,p=(0,s.useState)(!0),E=(0,o.Z)(p,2),P=E[0],A=E[1],_=(0,w.lr)(),T=(0,o.Z)(_,2),N=T[0],O=T[1],R=N.get("tab")||"general",I=[{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-general",children:[(0,oe.jsx)(g.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:l("common.general")})})]},"general"),value:"general"},{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-access",children:[(0,oe.jsx)(v.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:l("common.access")})})]},"access"),value:"access"},{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-oauth",children:[(0,oe.jsx)(b.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:l("common.login")})})]},"oauth"),value:"oauth"},{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-notification",children:[(0,oe.jsx)(j.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:l("common.notification")})})]},"notification"),value:"notification"},{label:(0,oe.jsxs)(x.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-preference",children:[(0,oe.jsx)(x.Z,{ml:-2,style:{transform:"translateY(2px)"},children:P?(0,oe.jsx)(C.Z,{fontSize:"inherit"}):(0,oe.jsx)(y.default,{fontSize:"inherit"})}),(0,oe.jsx)(k.Z,{sx:{fontSize:24}}),(0,oe.jsx)(x.Z,{ml:"16px",children:(0,oe.jsx)(x.Z,{style:{color:"#222"},children:l("common.preferences")})})]},"preference"),value:"preference"}];P&&vt({tabs:I,blocklet:n,t:l});var B=null;if("general"===R)B=(0,oe.jsx)(He,{blocklet:n,onUpdate:t});else if("access"===R)B=(0,oe.jsx)(Nn,{});else if("oauth"===R)B=(0,oe.jsx)(Zt,{});else if("notification"===R)B=(0,oe.jsx)(mn,{});else{var F=u?h.WELLKNOWN_SERVICE_PATH_PREFIX:d.routing.adminPath,D=new URLSearchParams;u||D.set("authKey","__sst"),D.set("schemaKey",m()(window.location.origin,F,"/api/preferences?id=".concat(encodeURIComponent(R)))),B=(0,oe.jsx)(f.Z,{url:"".concat(m()(window.location.origin,F,"/hosted/form-collector/"),"?").concat(D.toString()),width:"100%",height:"100%",frameBorder:0,styles:{border:0}})}return(0,oe.jsx)(jt,(0,i.Z)((0,i.Z)({},r),{},{children:(0,oe.jsxs)(Z.ZP,{container:!0,spacing:4,columns:24,children:[(0,oe.jsx)(Z.ZP,{item:!0,sm:7,md:5,children:(0,oe.jsx)(S.Z,{tabs:I,current:R,orientation:"vertical",onChange:function(e){"preference"===e?A(!P):O((function(n){return"general"===e?n.delete("tab"):n.set("tab",e),n}))},sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),(0,oe.jsx)(Z.ZP,{item:!0,sm:17,md:19,children:(0,oe.jsx)(x.Z,{style:{minHeight:"66vh",height:"100%",position:"relative",overflow:"hidden"},children:B})})]})}))}bt.propTypes={blocklet:u().object.isRequired,onUpdate:u().func},bt.defaultProps={onUpdate:function(){}};var jt=c.Z.div(xt||(xt=(0,r.Z)(["\n .MuiTab-root {\n text-align: left;\n align-items: flex-start;\n font-weight: normal;\n }\n .Mui-selected {\n font-weight: bold;\n }\n"])))},19066:function(e,n,t){t.d(n,{C:function(){return r}});var r="true"===localStorage.getItem("enableDebug")},70115:function(e,n,t){var r=t(39517),i=t(87642),o=t(64076),a=t(20244);n.Z=[{value:a.WHO_CAN_ACCESS.ALL,icon:o.Z,title:{zh:"\u6240\u6709\u4eba\u53ef\u8bbf\u95ee",en:"Accessible to all"},description:{zh:"\u5411\u6240\u6709\u4eba\u5f00\u653e\uff0c\u65e0\u9700\u901a\u884c\u8bc1\u5373\u53ef\u8bbf\u95ee\u5e94\u7528",en:"Open to the world anyone can access without passport"}},{value:a.WHO_CAN_ACCESS.INVITED,icon:i.Z,title:{zh:"\u53ea\u6709\u88ab\u9080\u8bf7\u7684\u4eba\u53ef\u4ee5\u8bbf\u95ee",en:"Only invited people can access"},description:{zh:"\u7a0d\u540e\u60a8\u53ef\u4ee5\u5728\u7ba1\u7406\u9875\u9762\u4e2d\u9080\u8bf7\u6210\u5458",en:"You can invite members later in the admin page"}},{value:a.WHO_CAN_ACCESS.OWNER,icon:r.Z,title:{zh:"\u53ea\u6709\u5e94\u7528\u6240\u6709\u8005\u53ef\u4ee5\u8bbf\u95ee",en:"Only Owner of the blocklet can access"},description:{zh:"\u5fc5\u987b\u63d0\u4f9b\u6240\u6709\u8005\u901a\u884c\u8bc1\u624d\u80fd\u8bbf\u95ee\u5e94\u7528",en:"You must provide owner passport to access this application"}}]}}]);
|
|
2
|
+
//# sourceMappingURL=4802.fe56c787.chunk.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 4961.89add60c.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[4961],{35470:function(e,r,t){"use strict";var n=t(53778),o=t(35147),i=t(81700),a=t(30969),c=t(30734),u={parseNumbers:!1,parseBooleans:!1},s={skipNull:!1,skipEmptyString:!1};r.Z=function(e,r){var t,l,f=r||{},p=f.navigateMode,v=void 0===p?"push":p,d=f.parseOptions,y=f.stringifyOptions,g=Object.assign(Object.assign({},u),d),m=Object.assign(Object.assign({},s),y),b=c.useLocation(),h=null===(t=c.useHistory)||void 0===t?void 0:t.call(c),j=null===(l=c.useNavigate)||void 0===l?void 0:l.call(c),O=(0,n.Z)(),w=(0,a.useRef)("function"===typeof e?e():e||{}),x=(0,a.useMemo)((function(){return(0,i.parse)(b.search,g)}),[b.search]),P=(0,a.useMemo)((function(){return Object.assign(Object.assign({},w.current),x)}),[x]);return[P,(0,o.Z)((function(e){var r="function"===typeof e?e(P):e;O(),h&&h[v]({hash:b.hash,search:(0,i.stringify)(Object.assign(Object.assign({},x),r),m)||"?"},b.state),j&&j({hash:b.hash,search:(0,i.stringify)(Object.assign(Object.assign({},x),r),m)||"?"},{replace:"replace"===v,state:b.state})}))]}},83486:function(e,r,t){"use strict";r.Z=void 0;(n=t(30969))&&n.__esModule;var n,o=t(37574);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){c(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r,t){return(r=function(e){var r=function(e,r){if("object"!==typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var u=function(e){return(0,o.jsxs)("svg",a(a({},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.886 1.875a4.207 4.207 0 1 0 0 8.414 4.207 4.207 0 0 0 0-8.414zM4.112 4.308A2.51 2.51 0 1 1 7.66 7.857a2.51 2.51 0 0 1-3.55-3.55zm.095 6.522A4.207 4.207 0 0 0 0 15.037v2.799c0 .16.13.289.29.289h1.119c.16 0 .289-.13.289-.29v-2.798a2.51 2.51 0 0 1 2.51-2.509h3.357a2.51 2.51 0 0 1 2.51 2.51v2.798c0 .16.13.289.289.289h1.12c.159 0 .288-.13.288-.29v-2.798a4.208 4.208 0 0 0-4.207-4.207H4.207z"}),(0,o.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"}),(0,o.jsx)("rect",{x:"15.313",y:"14.063",width:"7.5",height:"1.875",rx:".938",transform:"rotate(-90 15.313 14.063)"})]}))};u.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},u.displayName="allow-login";var s=u;r.Z=s},15378:function(e,r,t){"use strict";r.Z=void 0;(n=t(30969))&&n.__esModule;var n,o=t(37574);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){c(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r,t){return(r=function(e){var r=function(e,r){if("object"!==typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var u=function(e){return(0,o.jsxs)("svg",a(a({},e),{},{children:[(0,o.jsx)("path",{d:"M1.25 2.709c0-.46.373-.834.834-.834h12.255c.46 0 .834.373.834.834v6.607a.834.834 0 1 1-1.668 0V3.542H2.917v13.214h6.407a.834.834 0 1 1 0 1.668h-7.24a.834.834 0 0 1-.834-.834V2.71z"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.211 7.92a.917.917 0 1 0 0 1.833.917.917 0 0 0 0-1.834zm-2.584.916a2.584 2.584 0 1 1 5.169 0 2.584 2.584 0 0 1-5.17 0zM5.627 13.213c0-.46.373-.833.834-.833h3.501a.834.834 0 0 1 0 1.667H6.461a.834.834 0 0 1-.834-.834zM15.64 11.313c.215 0 .41.121.505.313l1.033 2.092 2.31.338a.563.563 0 0 1 .31.96l-1.67 1.627.394 2.3a.563.563 0 0 1-.816.592l-2.065-1.086-2.066 1.086a.562.562 0 0 1-.816-.593l.394-2.299-1.67-1.627a.563.563 0 0 1 .31-.96l2.31-.338 1.033-2.092a.562.562 0 0 1 .505-.313zm0 1.833l-.659 1.335a.563.563 0 0 1-.423.308l-1.474.215 1.066 1.04c.133.129.194.315.162.498l-.251 1.467 1.318-.694a.563.563 0 0 1 .524 0l1.318.694-.252-1.467a.563.563 0 0 1 .162-.498l1.067-1.04-1.475-.215a.563.563 0 0 1-.423-.308l-.66-1.335z"})]}))};u.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},u.displayName="external-issuer";var s=u;r.Z=s},48401:function(e,r,t){"use strict";r.Z=void 0;(n=t(30969))&&n.__esModule;var n,o=t(37574);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){c(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r,t){return(r=function(e){var r=function(e,r){if("object"!==typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var u=function(e){return(0,o.jsxs)("svg",a(a({},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.886 1.875a4.207 4.207 0 1 0 0 8.414 4.207 4.207 0 0 0 0-8.414zM4.112 4.308A2.51 2.51 0 1 1 7.66 7.857a2.51 2.51 0 0 1-3.55-3.55zm.095 6.522A4.207 4.207 0 0 0 0 15.037v2.799c0 .16.13.289.29.289h1.119c.16 0 .289-.13.289-.29v-2.798a2.51 2.51 0 0 1 2.51-2.509h3.357a2.51 2.51 0 0 1 2.51 2.51v2.798c0 .16.13.289.289.289h1.12c.159 0 .288-.13.288-.29v-2.798a4.208 4.208 0 0 0-4.207-4.207H4.207z"}),(0,o.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"})]}))};u.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},u.displayName="forbid-login";var s=u;r.Z=s},90954:function(e,r,t){"use strict";r.Z=void 0;(n=t(30969))&&n.__esModule;var n,o=t(37574);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){c(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r,t){return(r=function(e){var r=function(e,r){if("object"!==typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var u=function(e){return(0,o.jsxs)("svg",a(a({},e),{},{children:[(0,o.jsx)("g",{clipPath:"url(#clip0)",children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"clip0",children:(0,o.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};u.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"},u.displayName="person";var s=u;r.Z=s},69936:function(e,r,t){"use strict";r.Z=void 0;(n=t(30969))&&n.__esModule;var n,o=t(37574);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){c(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r,t){return(r=function(e){var r=function(e,r){if("object"!==typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var u=function(e){return(0,o.jsx)("svg",a(a({},e),{},{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};u.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},u.displayName="revoke";var s=u;r.Z=s},70177:function(e,r,t){"use strict";var n,o=t(71171),i=t(33028),a=t(59740),c=t(24974),u=t.n(c),s=t(32208),l=t.n(s),f=t(70093),p=t.n(f),v=t(33359),d=t(55581),y=t(37574),g=["name","nameFormatter","layout","children","valueComponent","nameWidth"];function m(e){var r=e.name,t=e.nameFormatter,n=e.layout,o=e.children,c=e.valueComponent,u=e.nameWidth,s=(0,a.Z)(e,g);return(0,y.jsxs)(b,(0,i.Z)((0,i.Z)({layout:n,width:u},s),{},{children:[(0,y.jsx)(v.Z,{color:"textSecondary",className:"info-row__name",children:t(r)}),o&&(0,y.jsx)(v.Z,{color:"textPrimary",component:c,className:"info-row__value",children:o})]}))}m.propTypes={name:u().any.isRequired,layout:u().oneOf(["horizontal","vertical"]),children:u().any,nameFormatter:u().func,valueComponent:u().string,nameWidth:u().number},m.defaultProps={children:null,nameWidth:90,nameFormatter:function(e){var r=e.split(" ").map((function(e){return p()(l()(e))})).join(" ");return"string"===typeof e?r:e},valueComponent:"div",layout:"horizontal"};var b=(0,d.zo)("div")(n||(n=(0,o.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}));r.Z=m},3715:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var o=n(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");r.Z=a},13134:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var o=n(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Loop");r.Z=a},28722:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var o=n(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");r.Z=a},65667:function(e,r){var t;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],r=0;r<arguments.length;r++){var t=arguments[r];if(t){var i=typeof t;if("string"===i||"number"===i)e.push(t);else if(Array.isArray(t)){if(t.length){var a=o.apply(null,t);a&&e.push(a)}}else if("object"===i){if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]")){e.push(t.toString());continue}for(var c in t)n.call(t,c)&&t[c]&&e.push(c)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(t=function(){return o}.apply(r,[]))||(e.exports=t)}()},64866:function(e){"use strict";var r="%[a-f0-9]{2}",t=new RegExp("("+r+")|([^%]+?)","gi"),n=new RegExp("("+r+")+","gi");function o(e,r){try{return[decodeURIComponent(e.join(""))]}catch(i){}if(1===e.length)return e;r=r||1;var t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],o(t),o(n))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var r=e.match(t)||[],n=1;n<r.length;n++)r=(e=o(r,n).join("")).match(t)||[];return e}}e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(r){return function(e){for(var t={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},o=n.exec(e);o;){try{t[o[0]]=decodeURIComponent(o[0])}catch(r){var a=i(o[0]);a!==o[0]&&(t[o[0]]=a)}o=n.exec(e)}t["%C2"]="\ufffd";for(var c=Object.keys(t),u=0;u<c.length;u++){var s=c[u];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}}},81700:function(e,r,t){"use strict";var n=t(43681).default,o=t(38636).default,i=t(73408).default,a=t(1512),c=t(64866),u=t(39658),s=t(42334);function l(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function f(e,r){return r.encode?r.strict?a(e):encodeURIComponent(e):e}function p(e,r){return r.decode?c(e):e}function v(e){return Array.isArray(e)?e.sort():"object"===typeof e?v(Object.keys(e)).sort((function(e,r){return Number(e)-Number(r)})).map((function(r){return e[r]})):e}function d(e){var r=e.indexOf("#");return-1!==r&&(e=e.slice(0,r)),e}function y(e){var r=(e=d(e)).indexOf("?");return-1===r?"":e.slice(r+1)}function g(e,r){return r.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!r.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,r){l((r=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},r)).arrayFormatSeparator);var t=function(e){var r;switch(e.arrayFormat){case"index":return function(e,t,n){r=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),r?(void 0===n[e]&&(n[e]={}),n[e][r[1]]=t):n[e]=t};case"bracket":return function(e,t,n){r=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),r?void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=[t]:n[e]=t};case"comma":case"separator":return function(r,t,n){var o="string"===typeof t&&t.includes(e.arrayFormatSeparator),i="string"===typeof t&&!o&&p(t,e).includes(e.arrayFormatSeparator);t=i?p(t,e):t;var a=o||i?t.split(e.arrayFormatSeparator).map((function(r){return p(r,e)})):null===t?t:p(t,e);n[r]=a};default:return function(e,r,t){void 0!==t[e]?t[e]=[].concat(t[e],r):t[e]=r}}}(r),i=Object.create(null);if("string"!==typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;var a,c=o(e.split("&"));try{for(c.s();!(a=c.n()).done;){var s=a.value;if(""!==s){var f=u(r.decode?s.replace(/\+/g," "):s,"="),d=n(f,2),y=d[0],m=d[1];m=void 0===m?null:["comma","separator"].includes(r.arrayFormat)?m:p(m,r),t(p(y,r),m,i)}}}catch(S){c.e(S)}finally{c.f()}for(var b=0,h=Object.keys(i);b<h.length;b++){var j=h[b],O=i[j];if("object"===typeof O&&null!==O)for(var w=0,x=Object.keys(O);w<x.length;w++){var P=x[w];O[P]=g(O[P],r)}else i[j]=g(O,r)}return!1===r.sort?i:(!0===r.sort?Object.keys(i).sort():Object.keys(i).sort(r.sort)).reduce((function(e,r){var t=i[r];return Boolean(t)&&"object"===typeof t&&!Array.isArray(t)?e[r]=v(t):e[r]=t,e}),Object.create(null))}r.extract=y,r.parse=m,r.stringify=function(e,r){if(!e)return"";l((r=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},r)).arrayFormatSeparator);for(var t=function(t){return r.skipNull&&(null===(n=e[t])||void 0===n)||r.skipEmptyString&&""===e[t];var n},n=function(e){switch(e.arrayFormat){case"index":return function(r){return function(t,n){var o=t.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:[].concat(i(t),null===n?[[f(r,e),"[",o,"]"].join("")]:[[f(r,e),"[",f(o,e),"]=",f(n,e)].join("")])}};case"bracket":return function(r){return function(t,n){return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:[].concat(i(t),null===n?[[f(r,e),"[]"].join("")]:[[f(r,e),"[]=",f(n,e)].join("")])}};case"comma":case"separator":return function(r){return function(t,n){return null===n||void 0===n||0===n.length?t:0===t.length?[[f(r,e),"=",f(n,e)].join("")]:[[t,f(n,e)].join(e.arrayFormatSeparator)]}};default:return function(r){return function(t,n){return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:[].concat(i(t),null===n?[f(r,e)]:[[f(r,e),"=",f(n,e)].join("")])}}}}(r),o={},a=0,c=Object.keys(e);a<c.length;a++){var u=c[a];t(u)||(o[u]=e[u])}var s=Object.keys(o);return!1!==r.sort&&s.sort(r.sort),s.map((function(t){var o=e[t];return void 0===o?"":null===o?f(t,r):Array.isArray(o)?o.reduce(n(t),[]).join("&"):f(t,r)+"="+f(o,r)})).filter((function(e){return e.length>0})).join("&")},r.parseUrl=function(e,r){r=Object.assign({decode:!0},r);var t=u(e,"#"),o=n(t,2),i=o[0],a=o[1];return Object.assign({url:i.split("?")[0]||"",query:m(y(e),r)},r&&r.parseFragmentIdentifier&&a?{fragmentIdentifier:p(a,r)}:{})},r.stringifyUrl=function(e,t){t=Object.assign({encode:!0,strict:!0},t);var n=d(e.url).split("?")[0]||"",o=r.extract(e.url),i=r.parse(o,{sort:!1}),a=Object.assign(i,e.query),c=r.stringify(a,t);c&&(c="?".concat(c));var u=function(e){var r="",t=e.indexOf("#");return-1!==t&&(r=e.slice(t)),r}(e.url);return e.fragmentIdentifier&&(u="#".concat(f(e.fragmentIdentifier,t))),"".concat(n).concat(c).concat(u)},r.pick=function(e,t,n){n=Object.assign({parseFragmentIdentifier:!0},n);var o=r.parseUrl(e,n),i=o.url,a=o.query,c=o.fragmentIdentifier;return r.stringifyUrl({url:i,query:s(a,t),fragmentIdentifier:c},n)},r.exclude=function(e,t,n){var o=Array.isArray(t)?function(e){return!t.includes(e)}:function(e,r){return!t(e,r)};return r.pick(e,o,n)}},42334:function(e){"use strict";e.exports=function(e,r){for(var t={},n=Object.keys(e),o=Array.isArray(r),i=0;i<n.length;i++){var a=n[i],c=e[a];(o?-1!==r.indexOf(a):r(a,c,e))&&(t[a]=c)}return t}},39658:function(e){"use strict";e.exports=function(e,r){if("string"!==typeof e||"string"!==typeof r)throw new TypeError("Expected the arguments to be of type `string`");if(""===r)return[e];var t=e.indexOf(r);return-1===t?[e]:[e.slice(0,t),e.slice(t+r.length)]}},1512:function(e){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())}))}}}]);
|
|
3
|
+
//# sourceMappingURL=4961.89add60c.chunk.js.map
|