@abtnode/blocklet-services 1.16.21-beta-7b40ffb4 → 1.16.21-beta-bd0e2503

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.
Files changed (160) hide show
  1. package/dist/assets/{Add-b2351a49.js → Add-0fa52156.js} +1 -1
  2. package/dist/assets/{Alert-e4bec1ff.js → Alert-037193c9.js} +1 -1
  3. package/dist/assets/{ArrowDropDown-205f16a4.js → ArrowDropDown-72517964.js} +1 -1
  4. package/dist/assets/{Autocomplete-369107d8.js → Autocomplete-a10f99e0.js} +1 -1
  5. package/dist/assets/{Avatar-d7a7b881.js → Avatar-45cfefc3.js} +1 -1
  6. package/dist/assets/{ButtonGroup-9476a3d4.js → ButtonGroup-f91d24e2.js} +1 -1
  7. package/dist/assets/{CardContent-599fce05.js → CardContent-3db164ef.js} +1 -1
  8. package/dist/assets/{CheckCircle-f26ea599.js → CheckCircle-272b0fa1.js} +1 -1
  9. package/dist/assets/{Checkbox-865da394.js → Checkbox-e5abf3e7.js} +1 -1
  10. package/dist/assets/{ChevronRight-1c94da5e.js → ChevronRight-ad424d62.js} +1 -1
  11. package/dist/assets/{DeleteOutline-d2fb4141.js → DeleteOutline-9cba8fb2.js} +1 -1
  12. package/dist/assets/{DialogContentText-97bfb1b9.js → DialogContentText-83546651.js} +1 -1
  13. package/dist/assets/{Done-0e5c18b8.js → Done-515b6971.js} +1 -1
  14. package/dist/assets/{Download-60d68209.js → Download-2be25bd9.js} +1 -1
  15. package/dist/assets/{Edit-5cc58056.js → Edit-acf0e713.js} +1 -1
  16. package/dist/assets/{EditIcon-b0e6e57f.js → EditIcon-9f26e207.js} +1 -1
  17. package/dist/assets/{ExpandMore-7ba43884.js → ExpandMore-affb00ec.js} +1 -1
  18. package/dist/assets/{FilterList-c85f15b8.js → FilterList-4d23556a.js} +1 -1
  19. package/dist/assets/{FormControl-7b923ef6.js → FormControl-776d5fa1.js} +1 -1
  20. package/dist/assets/{FormControlLabel-cb5a33e8.js → FormControlLabel-2ee3fa4b.js} +1 -1
  21. package/dist/assets/{FormGroup-00010e1c.js → FormGroup-502e9f4e.js} +1 -1
  22. package/dist/assets/{Google-0f192b6f.js → Google-8aa094b0.js} +1 -1
  23. package/dist/assets/{Grid-567e5a67.js → Grid-e588a591.js} +1 -1
  24. package/dist/assets/{Hidden-69bf662a.js → Hidden-4855abd5.js} +1 -1
  25. package/dist/assets/{Icon-d16c7712.js → Icon-7576b0de.js} +1 -1
  26. package/dist/assets/{InfoOutlined-48b31d1f.js → InfoOutlined-516f0f5e.js} +1 -1
  27. package/dist/assets/{InputAdornment-850716fa.js → InputAdornment-6977d85a.js} +1 -1
  28. package/dist/assets/{InputLabel-47688e0b.js → InputLabel-4899f2ad.js} +1 -1
  29. package/dist/assets/{LastPage-d20f0138.js → LastPage-68881e08.js} +1 -1
  30. package/dist/assets/{Launch-12c9ee81.js → Launch-40ac7bb5.js} +1 -1
  31. package/dist/assets/{LaunchOutlined-1262c141.js → LaunchOutlined-f2e3acb1.js} +1 -1
  32. package/dist/assets/{ListItem-5becb6c1.js → ListItem-768ed029.js} +1 -1
  33. package/dist/assets/{LockIcon-e516c22e.js → LockIcon-f7bc794a.js} +1 -1
  34. package/dist/assets/{Loop-2e94806e.js → Loop-74bde14b.js} +1 -1
  35. package/dist/assets/{MoreVert-36d47952.js → MoreVert-07b57b33.js} +1 -1
  36. package/dist/assets/{OpenInNew-4b969523.js → OpenInNew-acb47561.js} +1 -1
  37. package/dist/assets/{Pagination-6b6223d5.js → Pagination-fc24638e.js} +1 -1
  38. package/dist/assets/{PlayArrow-0ed58597.js → PlayArrow-d3193b6d.js} +1 -1
  39. package/dist/assets/{RadioGroup-03fbef44.js → RadioGroup-3beb2b33.js} +1 -1
  40. package/dist/assets/{Search-f00d8e90.js → Search-d3d559ed.js} +1 -1
  41. package/dist/assets/{Select-149c3d07.js → Select-c9c71312.js} +1 -1
  42. package/dist/assets/{ServerLogo-63ec02e8.js → ServerLogo-6cf48c4f.js} +1 -1
  43. package/dist/assets/{Slider-91fcbdcb.js → Slider-6bcdb3ad.js} +1 -1
  44. package/dist/assets/{Stepper-7888ff6e.js → Stepper-58c95989.js} +1 -1
  45. package/dist/assets/{Switch-10405461.js → Switch-572c6623.js} +1 -1
  46. package/dist/assets/{TableRow-525794a7.js → TableRow-2ff7461b.js} +1 -1
  47. package/dist/assets/{TextField-e67829f3.js → TextField-9def9dd1.js} +1 -1
  48. package/dist/assets/{Toolbar-75421c2d.js → Toolbar-58430b9d.js} +1 -1
  49. package/dist/assets/{access-control-5ed6e117.js → access-control-17d1ef9c.js} +1 -1
  50. package/dist/assets/{actions-df558048.js → actions-6a1d12bc.js} +1 -1
  51. package/dist/assets/{add-component-core-bb6234a7.js → add-component-core-0b1b4342.js} +1 -1
  52. package/dist/assets/add-resource-6825acb3.js +1 -0
  53. package/dist/assets/{addon-a9e2f437.js → addon-6378289d.js} +1 -1
  54. package/dist/assets/{analytics-06983953.js → analytics-41b1c113.js} +1 -1
  55. package/dist/assets/api-75ef978a.js +1 -0
  56. package/dist/assets/{audit-logs-687d1d71.js → audit-logs-aa0926e8.js} +1 -1
  57. package/dist/assets/{button-b9236b13.js → button-b9e224ed.js} +1 -1
  58. package/dist/assets/{click-to-copy-40120934.js → click-to-copy-011eba01.js} +1 -1
  59. package/dist/assets/{complete-5ca23cf4.js → complete-c2324df2.js} +1 -1
  60. package/dist/assets/{component-a5e53f2f.js → component-a8ae0bd3.js} +1 -1
  61. package/dist/assets/{config-6290e23f.js → config-1833951a.js} +1 -1
  62. package/dist/assets/{config-af712a34.js → config-d5e2cf8e.js} +1 -1
  63. package/dist/assets/{config-navigation-788fd705.js → config-navigation-753fcb5c.js} +1 -1
  64. package/dist/assets/{confirm-22ebfe38.js → confirm-0a872969.js} +1 -1
  65. package/dist/assets/{confirm-b0b5cc89.js → confirm-37e025f8.js} +1 -1
  66. package/dist/assets/{connect-a7723a02.js → connect-a95acc3b.js} +1 -1
  67. package/dist/assets/{connect-0ba8be34.js → connect-fe6d1f89.js} +1 -1
  68. package/dist/assets/{content-layout-c8d6e67b.js → content-layout-3e926711.js} +1 -1
  69. package/dist/assets/{dashboard-4dfd51e7.js → dashboard-adcdef94.js} +2 -2
  70. package/dist/assets/{did-address-4ab44498.js → did-address-75f80f5d.js} +1 -1
  71. package/dist/assets/{did-utils-92e0ca59.js → did-utils-4012db50.js} +1 -1
  72. package/dist/assets/{domain-7e37d3ff.js → domain-e4165149.js} +1 -1
  73. package/dist/assets/{domain-list-08e97ea9.js → domain-list-8a8a0d19.js} +1 -1
  74. package/dist/assets/{exchange-passport-7697fa54.js → exchange-passport-488fb54a.js} +1 -1
  75. package/dist/assets/{fallback-4794b4a5.js → fallback-e6908990.js} +1 -1
  76. package/dist/assets/{format-error-94dd3901.js → format-error-89fc5b13.js} +1 -1
  77. package/dist/assets/{fuel-d005b6cd.js → fuel-8062b1cb.js} +1 -1
  78. package/dist/assets/{home-f1415ac3.js → home-e193c644.js} +1 -1
  79. package/dist/assets/{iframe-9ff7846d.js → iframe-fa15b0d6.js} +1 -1
  80. package/dist/assets/{index-a2da02e3.js → index-03db2990.js} +1 -1
  81. package/dist/assets/{index-cbc1aab9.js → index-0ce26e3b.js} +1 -1
  82. package/dist/assets/{index-7f76c19e.js → index-110fb170.js} +1 -1
  83. package/dist/assets/{index-b7bfe5ee.js → index-171ab69f.js} +1 -1
  84. package/dist/assets/{index-30dfcfa0.js → index-24e445a7.js} +1 -1
  85. package/dist/assets/{index-397f25c3.js → index-2580c7d8.js} +1 -1
  86. package/dist/assets/{index-569e9974.js → index-2668c3ea.js} +5 -5
  87. package/dist/assets/{index-52105aed.js → index-2c4ca7b3.js} +1 -1
  88. package/dist/assets/{index-e6a97b71.js → index-32a94750.js} +1 -1
  89. package/dist/assets/{index-7f215a31.js → index-35962c8a.js} +1 -1
  90. package/dist/assets/{index-ec2e1c82.js → index-408ef489.js} +1 -1
  91. package/dist/assets/{index-92c9db1e.js → index-45230b38.js} +1 -1
  92. package/dist/assets/{index-69a54ade.js → index-4b84d3b2.js} +1 -1
  93. package/dist/assets/{index-993ae4f3.js → index-4effadb2.js} +1 -1
  94. package/dist/assets/{index-c13429c0.js → index-4f076ed3.js} +1 -1
  95. package/dist/assets/{index-a01a2a92.js → index-5e26b138.js} +1 -1
  96. package/dist/assets/{index-c88e9cc1.js → index-74681384.js} +1 -1
  97. package/dist/assets/{index-a1d99c1e.js → index-78c79b7d.js} +1 -1
  98. package/dist/assets/{index-5f39b70b.js → index-7cfe9bef.js} +12 -12
  99. package/dist/assets/{index-00f4ab86.js → index-82b46fb5.js} +1 -1
  100. package/dist/assets/{index-e5faf3aa.js → index-95ed5c0e.js} +1 -1
  101. package/dist/assets/{index-b8c52702.js → index-9871b95b.js} +2 -2
  102. package/dist/assets/{index-bb806fc3.js → index-ab44e574.js} +1 -1
  103. package/dist/assets/{index-48eba397.js → index-c014ee1d.js} +1 -1
  104. package/dist/assets/{index-b04f8b33.js → index-ed3b9f25.js} +1 -1
  105. package/dist/assets/{index-8b18540a.js → index-f112ae7e.js} +1 -1
  106. package/dist/assets/{index-ec0dcac3.js → index-f2a9779e.js} +1 -1
  107. package/dist/assets/{index-113df711.js → index-f43e988e.js} +2 -2
  108. package/dist/assets/{index.es-16ca759a.js → index.es-c9de3081.js} +1 -1
  109. package/dist/assets/{index.esm-73dce5f2.js → index.esm-3acd0530.js} +1 -1
  110. package/dist/assets/{invite-d27c1214.js → invite-46602c25.js} +1 -1
  111. package/dist/assets/{issue-passport-4f51924a.js → issue-passport-c6316a00.js} +1 -1
  112. package/dist/assets/{launch-result-message-5b4d3850.js → launch-result-message-bc3d34f8.js} +1 -1
  113. package/dist/assets/{layout-5c5c130c.js → layout-d2846d27.js} +1 -1
  114. package/dist/assets/{list-header-760aa339.js → list-header-4d0954bf.js} +1 -1
  115. package/dist/assets/localization-0b26d7a6.js +1 -0
  116. package/dist/assets/{log-c3cd75b2.js → log-957c206d.js} +1 -1
  117. package/dist/assets/{login-8fce9628.js → login-7abb482f.js} +1 -1
  118. package/dist/assets/{logo-uploader-6558791d.js → logo-uploader-2897cb85.js} +2 -2
  119. package/dist/assets/{lost-passport-f913ceab.js → lost-passport-ca597911.js} +2 -2
  120. package/dist/assets/{lottie-778160f6.js → lottie-a8abc821.js} +1 -1
  121. package/dist/assets/{makeStyles-db592458.js → makeStyles-af672e02.js} +1 -1
  122. package/dist/assets/{memoize-one.esm-e791ea03.js → memoize-one.esm-c8bea7a2.js} +1 -1
  123. package/dist/assets/{nav-menu-9ff7172d.js → nav-menu-33b9a238.js} +1 -1
  124. package/dist/assets/{notifications-16cda27d.js → notifications-97251050.js} +1 -1
  125. package/dist/assets/{overview-9c215b78.js → overview-97d0a79e.js} +1 -1
  126. package/dist/assets/{page-header-e9a0f22f.js → page-header-8a4c9c50.js} +1 -1
  127. package/dist/assets/{permission-875d50a0.js → permission-dd5ceeea.js} +1 -1
  128. package/dist/assets/{preferences-be334515.js → preferences-0280505b.js} +1 -1
  129. package/dist/assets/publish-resource-9e2fd88b.js +1 -0
  130. package/dist/assets/{react-ee541107.js → react-8bf99ad0.js} +33 -27
  131. package/dist/assets/{redux-9603f4c3.js → redux-4a13b1ee.js} +1 -1
  132. package/dist/assets/{selector-c69c97b3.js → selector-e7537a43.js} +1 -1
  133. package/dist/assets/session-f52f379b.js +1 -0
  134. package/dist/assets/{setup-89f950b3.js → setup-017ee02c.js} +2 -2
  135. package/dist/assets/{slicedToArray-7d7ed856.js → slicedToArray-b9314e6c.js} +1 -1
  136. package/dist/assets/{spaces-667f0985.js → spaces-4402bfd9.js} +1 -1
  137. package/dist/assets/{start-44b0e25d.js → start-95b58f88.js} +1 -1
  138. package/dist/assets/{step-actions-26b89d6b.js → step-actions-c99de83a.js} +1 -1
  139. package/dist/assets/{studio-3777d4ea.js → studio-e0d343f5.js} +1 -1
  140. package/dist/assets/{switch-control-d054754b.js → switch-control-944b9c84.js} +1 -1
  141. package/dist/assets/{toPropertyKey-43b89a39.js → toPropertyKey-ceeedea6.js} +1 -1
  142. package/dist/assets/{transfer-f65a09c5.js → transfer-a19f0df2.js} +1 -1
  143. package/dist/assets/{uniqBy-40e79dba.js → uniqBy-11474d2a.js} +1 -1
  144. package/dist/assets/{unsubscribe-03c88c41.js → unsubscribe-84f56731.js} +1 -1
  145. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-e7d0d29d.js → use-blocklet-info-for-connect-did-spaces-2c0b4729.js} +1 -1
  146. package/dist/assets/{useAsync-ec00263e.js → useAsync-2a7bf586.js} +1 -1
  147. package/dist/assets/{useFormControl-62783a72.js → useFormControl-1b3cb36f.js} +1 -1
  148. package/dist/assets/{useSetState-ff3e4148.js → useSetState-483ba319.js} +1 -1
  149. package/dist/assets/{user-180cffcb.js → user-6d82a43f.js} +1 -1
  150. package/dist/assets/{util-159906f0.js → util-c52b3ea9.js} +1 -1
  151. package/dist/assets/{wallet-hidden-topbar-3d2b5e46.js → wallet-hidden-topbar-91b1f489.js} +2 -2
  152. package/dist/assets/wrap-locale-7898963f.js +1 -0
  153. package/dist/index.html +1 -1
  154. package/package.json +18 -18
  155. package/dist/assets/add-resource-7ae55667.js +0 -1
  156. package/dist/assets/api-aff284aa.js +0 -1
  157. package/dist/assets/localization-ea1e02f5.js +0 -1
  158. package/dist/assets/publish-resource-c562ad74.js +0 -1
  159. package/dist/assets/session-fd706eca.js +0 -1
  160. package/dist/assets/wrap-locale-568e352c.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aj as w,j as e,d as L,ao as $,S as K,u as S,bF as J,bG as X,au as Y,e as _,h as Q,T as d,G as f,bH as H,b5 as R,av as U,bI as B,n as C,bE as Z,J as ee,X as te,B as V,bj as ne,bJ as D,bo as F,w as O,N as se,y as oe,K as ae}from"./index-569e9974.js";import{H as re}from"./index-e5faf3aa.js";import{I as P}from"./index-30dfcfa0.js";import{T as ie}from"./index-cbc1aab9.js";import{W as le}from"./did-address-4ab44498.js";import{g as ce,U as me,P as de}from"./did-utils-92e0ca59.js";import{i as pe}from"./index-7f215a31.js";import{u as ue,a as he,C as v}from"./index.esm-73dce5f2.js";import{u as xe}from"./confirm-b0b5cc89.js";import{A as ge}from"./Alert-e4bec1ff.js";import{S as c,F as I}from"./FormControlLabel-cb5a33e8.js";import{C as T}from"./Checkbox-865da394.js";import{S as fe}from"./Select-149c3d07.js";import{T as je}from"./TextField-e67829f3.js";import{M as be}from"./InputAdornment-850716fa.js";import{f as N}from"./format-error-94dd3901.js";import{A as ve}from"./Avatar-d7a7b881.js";import"./fallback-4794b4a5.js";import"./nav-menu-9ff7172d.js";import"./ExpandMore-7ba43884.js";import"./wallet-hidden-topbar-3d2b5e46.js";import"./selector-c69c97b3.js";import"./useFormControl-62783a72.js";import"./FormControl-7b923ef6.js";import"./InputLabel-47688e0b.js";const ye=w(e.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined"),Ce=w(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined"),we=w(e.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83V6.31l6-2.12 6 2.12v4.78zm-9.18-.5L7.4 12l3.54 3.54 5.66-5.66-1.41-1.41-4.24 4.24-2.13-2.12z"}),"GppGoodOutlined"),Se=w(e.jsx("path",{d:"m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z"}),"SendOutlined");function ke({data:n,user:o,onChange:i}){const{t}=S(),{api:r}=L(),[a,p]=J({editing:!1,dirty:!1}),{control:h,getValues:g,setValue:m,formState:x,handleSubmit:k}=ue({defaultValues:X({notifications:{email:!0,wallet:!0,phone:!1},webhooks:[]},n)}),{confirmApi:A,confirmHolder:y}=xe(),E=Y(),W=new URLSearchParams(E.search),G=_(),j=he({control:h,name:"webhooks"}),z=async s=>{try{await r.post("/api/user/extra",s),C.success(t("common.saveSuccess")),p({editing:!1}),await i()}catch(l){C.error(N(l))}};Q(()=>{if(W.get("action")==="unsubscribe"){const s=W.get("channel");["email","wallet","phone"].includes(s)&&(G(E.pathname,{replace:!0}),A.open({title:t("notification.email.disable"),content:t("notification.email.disableDescription"),async onConfirm(l){await z({notifications:{[s]:!1}}),l()}}))}});const q=async s=>{try{const l=g();await r.put("/api/user/extra",l.webhooks[s]),C.success(t("team.member.settings.tested"))}catch(l){C.error(N(l))}};return e.jsxs(c,{spacing:3,children:[e.jsxs(c,{sx:{width:"100%"},children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(d,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.notification")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:k(z),disabled:x.isSubmitting,children:t("common.save")})]}),e.jsx(v,{name:"notifications.wallet",control:h,render:({field:s})=>e.jsx(I,{control:e.jsx(T,{checked:g().notifications.wallet,...s,onChange:(l,u)=>m(s.name,u)}),disableTypography:!0,label:e.jsxs(d,{color:"text.primary",children:[t("team.member.settings.wallet"),e.jsx(d,{component:"span",color:"text.secondary",ml:1,children:ce(o)})]})})}),e.jsx(v,{name:"notifications.email",control:h,render:({field:s})=>e.jsx(I,{control:e.jsx(T,{checked:g().notifications.email,...s,onChange:(l,u)=>m(s.name,u)}),disableTypography:!0,label:e.jsxs(d,{color:"text.primary",children:[t("team.member.settings.email"),e.jsx(d,{component:"span",color:"text.secondary",ml:1,children:o.email||""})]})})}),e.jsx(v,{name:"notifications.phone",control:h,render:({field:s})=>e.jsx(I,{control:e.jsx(T,{checked:g().notifications.phone,...s,onChange:(l,u)=>m(s.name,u)}),disableTypography:!0,disabled:!0,label:e.jsxs(d,{color:"text.primary",children:[t("team.member.settings.phone"),e.jsx(d,{component:"span",color:"text.secondary",ml:1,children:o.phone||""})]})})})]}),e.jsxs(c,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(d,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.webhook")}),e.jsxs(c,{direction:"row",children:[a.editing&&e.jsx(f,{variant:"text",size:"small",color:"primary",style:{height:"32px"},onClick:()=>p({editing:!1}),children:t("common.cancel")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:a.editing?k(z):()=>p({editing:!0}),disabled:x.isSubmitting,children:a.editing?t("common.save"):t("common.edit")})]})]}),j.fields.map((s,l)=>{var M;const u=(M=H(x.errors,`webhooks.${l}.url`))==null?void 0:M.message;return a.editing?e.jsxs(c,{mt:2,spacing:2,sx:{width:"100%"},direction:"row",alignItems:"center",children:[e.jsxs(c,{direction:"row",spacing:2,sx:{width:"80%"},children:[e.jsx(v,{name:`webhooks.${l}.type`,control:h,rules:{required:t("common.required")},render:({field:b})=>e.jsxs(fe,{...b,sx:{flex:1},fullWidth:!0,size:"small",children:[e.jsx(R,{value:"api",children:t("team.member.settings.url")}),e.jsx(R,{value:"slack",children:t("team.member.settings.slack")})]})}),e.jsx(v,{name:`webhooks.${l}.url`,control:h,rules:{required:t("common.required"),validate:b=>pe(b)||t("common.invalid")},render:({field:b})=>e.jsx(je,{sx:{flex:4},fullWidth:!0,size:"small",required:!0,...b,error:!!u,InputProps:{endAdornment:u?e.jsx(be,{position:"end",children:e.jsx(d,{component:"span",color:"error",children:u})}):null}})})]}),e.jsxs(c,{direction:"row",spacing:1,children:[e.jsx(U,{size:"small",onClick:()=>q(l),children:e.jsx(Se,{color:"primary",sx:{opacity:.75}})}),e.jsx(U,{size:"small",onClick:()=>j.remove(l),children:e.jsx(Ce,{color:"error",sx:{opacity:.75}})})]})]},s.id):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.type,children:s.url},s.id)}),!a.editing&&!j.fields.length&&e.jsx(B,{children:t("common.empty")}),a.editing&&e.jsx(c,{mt:j.fields.length?2:1,direction:"row",justifyContent:"space-between",children:e.jsxs(f,{size:"small",variant:"outlined",color:"primary",onClick:()=>j.append({type:"slack",url:""}),children:[e.jsx(ye,{fontSize:"small"})," ",t("team.member.settings.add")]})})]}),y]})}function Ae({user:n}){const{api:o}=L(),{loading:i,error:t,runAsync:r,data:a}=$(()=>o.get("/api/user/extra").then(p=>p.data));return t?e.jsx(ge,{severity:"error",children:t.message}):i||!a?e.jsx(K,{}):e.jsx(ke,{data:a,user:n,onChange:r})}function ze({user:n}){const{t:o,locale:i}=S(),t={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"};return[{name:o("team.member.name"),value:n.fullName},{name:o("common.email"),value:n.email},{name:o("common.phone"),value:n.phone},{name:o("team.member.lastLogin"),value:F(n.lastLoginAt,i)},{name:o("team.member.lastLoginIp"),value:n.lastLoginIp||""},{name:o("common.createdAt"),value:F(n.createdAt,i)},{name:o("team.member.source"),value:t[(n==null?void 0:n.sourceProvider)||O.USER_TYPE.WALLET]||(n==null?void 0:n.sourceProvider)}].filter(Boolean).map(a=>a.name===o("common.did")?e.jsx(P,{valueComponent:"div",nameWidth:120,name:a.name,nameFormatter:()=>o("common.did"),children:a.value},a.name):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:a.name,children:a.value},a.name))}function Ie({user:n}){const{t:o}=S(),i=(H(n,"passports")||[]).map(t=>({...t,revoked:t.status===O.PASSPORT_STATUS.REVOKED}));return i.length===0?e.jsx(B,{children:o("common.empty")}):e.jsx(c,{direction:"row",spacing:3,children:i.map(t=>e.jsx(de,{passport:t,user:n,width:200,color:window.blocklet.passportColor,createPassportSvg:se,sx:{flexDirection:"column",alignItems:"center"}},t.id))})}function tt(){const n=_(),o=Z(),{t:i}=S(),{session:t}=L(),r=ee({user:t.user,tab:o.tab||"profile"}),a=m=>{r.tab=m,n(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/user/${m}`)},p={info:{label:i("common.profile"),value:"profile",component:ze},oauth:{label:i("team.member.connections"),value:"connections",component:me},passports:{label:i("team.member.passports"),value:"passports",component:Ie},settings:{label:i("common.setting"),value:"settings",component:Ae}},h=Object.values(p).map(({label:m,value:x})=>({label:m,value:x})).filter(m=>{var x;return m.value==="connections"?(((x=r.user)==null?void 0:x.connectedAccounts)||[]).find(A=>{var y;return A.provider!==(((y=r.user)==null?void 0:y.sourceProvider)||te.LOGIN_PROVIDER.WALLET)}):!0}),g=p[r.tab]||p.info;return e.jsxs(e.Fragment,{children:[e.jsx(re,{}),e.jsxs(Te,{sx:{mt:4},children:[e.jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(ve,{src:r.user.avatar,variant:"rounded",style:{width:80,height:80,backgroundColor:"transparent",marginRight:8}}),e.jsxs(c,{direction:"column",spacing:.5,children:[e.jsx(d,{variant:"h4",fontWeight:"bold",children:r.user.fullName}),e.jsx(V,{children:e.jsx(ne,{label:r.user.role.toUpperCase(),size:"small",variant:"outlined",color:"success",sx:{height:"auto",fontWeight:"bold",fontSize:"12px"},icon:e.jsx(we,{sx:{fontSize:"0.8em"}})})}),e.jsx(le,{did:r.user.did})]})]}),e.jsxs(c,{children:[r.tab==="profile"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchProfile(D,{}),children:i("team.member.switch.profile")}),r.tab==="passports"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchPassport(D,{}),children:i("team.member.switch.passport")})]})]}),e.jsx(V,{className:"tabs",sx:{my:3},children:e.jsx(ie,{tabs:h,current:r.tab,onChange:a})}),e.jsx("div",{className:"body",children:e.jsx(g.component,{user:r.user})})]})]})}const Te=oe(ae)`
1
+ import{aj as w,j as e,d as L,ao as $,S as K,u as S,bF as J,bG as X,au as Y,e as _,h as Q,T as d,G as f,bH as H,b5 as R,av as U,bI as B,n as C,bE as Z,J as ee,X as te,B as V,bj as ne,bJ as D,bo as F,w as O,N as se,y as oe,K as ae}from"./index-2668c3ea.js";import{H as re}from"./index-95ed5c0e.js";import{I as P}from"./index-24e445a7.js";import{T as ie}from"./index-0ce26e3b.js";import{W as le}from"./did-address-75f80f5d.js";import{g as ce,U as me,P as de}from"./did-utils-4012db50.js";import{i as pe}from"./index-35962c8a.js";import{u as ue,a as he,C as v}from"./index.esm-3acd0530.js";import{u as xe}from"./confirm-37e025f8.js";import{A as ge}from"./Alert-037193c9.js";import{S as c,F as I}from"./FormControlLabel-2ee3fa4b.js";import{C as T}from"./Checkbox-e5abf3e7.js";import{S as fe}from"./Select-c9c71312.js";import{T as je}from"./TextField-9def9dd1.js";import{M as be}from"./InputAdornment-6977d85a.js";import{f as N}from"./format-error-89fc5b13.js";import{A as ve}from"./Avatar-45cfefc3.js";import"./fallback-e6908990.js";import"./nav-menu-33b9a238.js";import"./ExpandMore-affb00ec.js";import"./wallet-hidden-topbar-91b1f489.js";import"./selector-e7537a43.js";import"./useFormControl-1b3cb36f.js";import"./FormControl-776d5fa1.js";import"./InputLabel-4899f2ad.js";const ye=w(e.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined"),Ce=w(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined"),we=w(e.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83V6.31l6-2.12 6 2.12v4.78zm-9.18-.5L7.4 12l3.54 3.54 5.66-5.66-1.41-1.41-4.24 4.24-2.13-2.12z"}),"GppGoodOutlined"),Se=w(e.jsx("path",{d:"m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z"}),"SendOutlined");function ke({data:n,user:o,onChange:i}){const{t}=S(),{api:r}=L(),[a,p]=J({editing:!1,dirty:!1}),{control:h,getValues:g,setValue:m,formState:x,handleSubmit:k}=ue({defaultValues:X({notifications:{email:!0,wallet:!0,phone:!1},webhooks:[]},n)}),{confirmApi:A,confirmHolder:y}=xe(),E=Y(),W=new URLSearchParams(E.search),G=_(),j=he({control:h,name:"webhooks"}),z=async s=>{try{await r.post("/api/user/extra",s),C.success(t("common.saveSuccess")),p({editing:!1}),await i()}catch(l){C.error(N(l))}};Q(()=>{if(W.get("action")==="unsubscribe"){const s=W.get("channel");["email","wallet","phone"].includes(s)&&(G(E.pathname,{replace:!0}),A.open({title:t("notification.email.disable"),content:t("notification.email.disableDescription"),async onConfirm(l){await z({notifications:{[s]:!1}}),l()}}))}});const q=async s=>{try{const l=g();await r.put("/api/user/extra",l.webhooks[s]),C.success(t("team.member.settings.tested"))}catch(l){C.error(N(l))}};return e.jsxs(c,{spacing:3,children:[e.jsxs(c,{sx:{width:"100%"},children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(d,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.notification")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:k(z),disabled:x.isSubmitting,children:t("common.save")})]}),e.jsx(v,{name:"notifications.wallet",control:h,render:({field:s})=>e.jsx(I,{control:e.jsx(T,{checked:g().notifications.wallet,...s,onChange:(l,u)=>m(s.name,u)}),disableTypography:!0,label:e.jsxs(d,{color:"text.primary",children:[t("team.member.settings.wallet"),e.jsx(d,{component:"span",color:"text.secondary",ml:1,children:ce(o)})]})})}),e.jsx(v,{name:"notifications.email",control:h,render:({field:s})=>e.jsx(I,{control:e.jsx(T,{checked:g().notifications.email,...s,onChange:(l,u)=>m(s.name,u)}),disableTypography:!0,label:e.jsxs(d,{color:"text.primary",children:[t("team.member.settings.email"),e.jsx(d,{component:"span",color:"text.secondary",ml:1,children:o.email||""})]})})}),e.jsx(v,{name:"notifications.phone",control:h,render:({field:s})=>e.jsx(I,{control:e.jsx(T,{checked:g().notifications.phone,...s,onChange:(l,u)=>m(s.name,u)}),disableTypography:!0,disabled:!0,label:e.jsxs(d,{color:"text.primary",children:[t("team.member.settings.phone"),e.jsx(d,{component:"span",color:"text.secondary",ml:1,children:o.phone||""})]})})})]}),e.jsxs(c,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(d,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.webhook")}),e.jsxs(c,{direction:"row",children:[a.editing&&e.jsx(f,{variant:"text",size:"small",color:"primary",style:{height:"32px"},onClick:()=>p({editing:!1}),children:t("common.cancel")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:a.editing?k(z):()=>p({editing:!0}),disabled:x.isSubmitting,children:a.editing?t("common.save"):t("common.edit")})]})]}),j.fields.map((s,l)=>{var M;const u=(M=H(x.errors,`webhooks.${l}.url`))==null?void 0:M.message;return a.editing?e.jsxs(c,{mt:2,spacing:2,sx:{width:"100%"},direction:"row",alignItems:"center",children:[e.jsxs(c,{direction:"row",spacing:2,sx:{width:"80%"},children:[e.jsx(v,{name:`webhooks.${l}.type`,control:h,rules:{required:t("common.required")},render:({field:b})=>e.jsxs(fe,{...b,sx:{flex:1},fullWidth:!0,size:"small",children:[e.jsx(R,{value:"api",children:t("team.member.settings.url")}),e.jsx(R,{value:"slack",children:t("team.member.settings.slack")})]})}),e.jsx(v,{name:`webhooks.${l}.url`,control:h,rules:{required:t("common.required"),validate:b=>pe(b)||t("common.invalid")},render:({field:b})=>e.jsx(je,{sx:{flex:4},fullWidth:!0,size:"small",required:!0,...b,error:!!u,InputProps:{endAdornment:u?e.jsx(be,{position:"end",children:e.jsx(d,{component:"span",color:"error",children:u})}):null}})})]}),e.jsxs(c,{direction:"row",spacing:1,children:[e.jsx(U,{size:"small",onClick:()=>q(l),children:e.jsx(Se,{color:"primary",sx:{opacity:.75}})}),e.jsx(U,{size:"small",onClick:()=>j.remove(l),children:e.jsx(Ce,{color:"error",sx:{opacity:.75}})})]})]},s.id):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.type,children:s.url},s.id)}),!a.editing&&!j.fields.length&&e.jsx(B,{children:t("common.empty")}),a.editing&&e.jsx(c,{mt:j.fields.length?2:1,direction:"row",justifyContent:"space-between",children:e.jsxs(f,{size:"small",variant:"outlined",color:"primary",onClick:()=>j.append({type:"slack",url:""}),children:[e.jsx(ye,{fontSize:"small"})," ",t("team.member.settings.add")]})})]}),y]})}function Ae({user:n}){const{api:o}=L(),{loading:i,error:t,runAsync:r,data:a}=$(()=>o.get("/api/user/extra").then(p=>p.data));return t?e.jsx(ge,{severity:"error",children:t.message}):i||!a?e.jsx(K,{}):e.jsx(ke,{data:a,user:n,onChange:r})}function ze({user:n}){const{t:o,locale:i}=S(),t={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"};return[{name:o("team.member.name"),value:n.fullName},{name:o("common.email"),value:n.email},{name:o("common.phone"),value:n.phone},{name:o("team.member.lastLogin"),value:F(n.lastLoginAt,i)},{name:o("team.member.lastLoginIp"),value:n.lastLoginIp||""},{name:o("common.createdAt"),value:F(n.createdAt,i)},{name:o("team.member.source"),value:t[(n==null?void 0:n.sourceProvider)||O.USER_TYPE.WALLET]||(n==null?void 0:n.sourceProvider)}].filter(Boolean).map(a=>a.name===o("common.did")?e.jsx(P,{valueComponent:"div",nameWidth:120,name:a.name,nameFormatter:()=>o("common.did"),children:a.value},a.name):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:a.name,children:a.value},a.name))}function Ie({user:n}){const{t:o}=S(),i=(H(n,"passports")||[]).map(t=>({...t,revoked:t.status===O.PASSPORT_STATUS.REVOKED}));return i.length===0?e.jsx(B,{children:o("common.empty")}):e.jsx(c,{direction:"row",spacing:3,children:i.map(t=>e.jsx(de,{passport:t,user:n,width:200,color:window.blocklet.passportColor,createPassportSvg:se,sx:{flexDirection:"column",alignItems:"center"}},t.id))})}function tt(){const n=_(),o=Z(),{t:i}=S(),{session:t}=L(),r=ee({user:t.user,tab:o.tab||"profile"}),a=m=>{r.tab=m,n(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/user/${m}`)},p={info:{label:i("common.profile"),value:"profile",component:ze},oauth:{label:i("team.member.connections"),value:"connections",component:me},passports:{label:i("team.member.passports"),value:"passports",component:Ie},settings:{label:i("common.setting"),value:"settings",component:Ae}},h=Object.values(p).map(({label:m,value:x})=>({label:m,value:x})).filter(m=>{var x;return m.value==="connections"?(((x=r.user)==null?void 0:x.connectedAccounts)||[]).find(A=>{var y;return A.provider!==(((y=r.user)==null?void 0:y.sourceProvider)||te.LOGIN_PROVIDER.WALLET)}):!0}),g=p[r.tab]||p.info;return e.jsxs(e.Fragment,{children:[e.jsx(re,{}),e.jsxs(Te,{sx:{mt:4},children:[e.jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(ve,{src:r.user.avatar,variant:"rounded",style:{width:80,height:80,backgroundColor:"transparent",marginRight:8}}),e.jsxs(c,{direction:"column",spacing:.5,children:[e.jsx(d,{variant:"h4",fontWeight:"bold",children:r.user.fullName}),e.jsx(V,{children:e.jsx(ne,{label:r.user.role.toUpperCase(),size:"small",variant:"outlined",color:"success",sx:{height:"auto",fontWeight:"bold",fontSize:"12px"},icon:e.jsx(we,{sx:{fontSize:"0.8em"}})})}),e.jsx(le,{did:r.user.did})]})]}),e.jsxs(c,{children:[r.tab==="profile"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchProfile(D,{}),children:i("team.member.switch.profile")}),r.tab==="passports"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchPassport(D,{}),children:i("team.member.switch.passport")})]})]}),e.jsx(V,{className:"tabs",sx:{my:3},children:e.jsx(ie,{tabs:h,current:r.tab,onChange:a})}),e.jsx("div",{className:"body",children:e.jsx(g.component,{user:r.user})})]})]})}const Te=oe(ae)`
2
2
  .MuiTab-root {
3
3
  padding: 0;
4
4
  margin-right: 24px;
@@ -1 +1 @@
1
- import{aW as l,ec as s,ed as h,X as P,w as u}from"./index-569e9974.js";const d=s;var c=(e,r)=>d(e)===d(r);const E=l(c),x=(e,r)=>{if(e.type===u.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${r("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${r("router.validation.redirectCodeRequired")}`)}else if(e.type===u.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(r("router.validation.didRequired"));return null},R=(e,r)=>{const t=x(e,r);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(r("router.validation.pathPrefixTooLong",{length:150})):null:new Error(r("router.validation.pathPrefixCannotBeEmpty")))},v=({params:e,blocklets:r,blocklet:t,locale:o="en"})=>{if(t){let i=(t.children||[]).find(f=>h(f.meta)&&E(f.mountPoint,e.pathPrefix));if(t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i)return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[o]}const a=r.find(i=>i.meta.did===e.did);if(!a)return"";const n=a.meta.interfaces.find(i=>i.type==="web");return n&&n.prefix!==P.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==n.prefix?{zh:`该 blocklet 只能挂载在 ${n.prefix}`,en:`This blocklet can only be mounted on ${n.prefix}`}[o]:""},T=e=>{if(!e||typeof e!="string")return e;let r=e.trim();try{return r=r.toLowerCase(),r.startsWith("http://")||r.startsWith("https://")?new URL(r).hostname:r}catch(t){return console.error("format domain failed",t),r}};export{R as a,T as p,v};
1
+ import{aW as l,ec as s,ed as h,X as P,w as u}from"./index-2668c3ea.js";const d=s;var c=(e,r)=>d(e)===d(r);const E=l(c),x=(e,r)=>{if(e.type===u.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${r("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${r("router.validation.redirectCodeRequired")}`)}else if(e.type===u.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(r("router.validation.didRequired"));return null},R=(e,r)=>{const t=x(e,r);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(r("router.validation.pathPrefixTooLong",{length:150})):null:new Error(r("router.validation.pathPrefixCannotBeEmpty")))},v=({params:e,blocklets:r,blocklet:t,locale:o="en"})=>{if(t){let i=(t.children||[]).find(f=>h(f.meta)&&E(f.mountPoint,e.pathPrefix));if(t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i)return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[o]}const a=r.find(i=>i.meta.did===e.did);if(!a)return"";const n=a.meta.interfaces.find(i=>i.type==="web");return n&&n.prefix!==P.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==n.prefix?{zh:`该 blocklet 只能挂载在 ${n.prefix}`,en:`This blocklet can only be mounted on ${n.prefix}`}[o]:""},T=e=>{if(!e||typeof e!="string")return e;let r=e.trim();try{return r=r.toLowerCase(),r.startsWith("http://")||r.startsWith("https://")?new URL(r).hostname:r}catch(t){return console.error("format domain failed",t),r}};export{R as a,T as p,v};
@@ -1,4 +1,4 @@
1
- var ne=Object.defineProperty;var oe=(t,e,n)=>e in t?ne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var R=(t,e,n)=>(oe(t,typeof e!="symbol"?e+"":e,n),n);import{P as f,r as Z,bh as re,u as se,j as F,aw as ie,_ as ce,M as ae}from"./index-569e9974.js";import{L as ue}from"./selector-c69c97b3.js";/**
1
+ var ne=Object.defineProperty;var oe=(t,e,n)=>e in t?ne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var R=(t,e,n)=>(oe(t,typeof e!="symbol"?e+"":e,n),n);import{P as f,r as Z,bh as re,u as se,j as F,aw as ie,_ as ce,M as ae}from"./index-2668c3ea.js";import{L as ue}from"./selector-e7537a43.js";/**
2
2
  * (c) Iconify
3
3
  *
4
4
  * For the full copyright and license information, please view the license.txt
@@ -8,4 +8,4 @@ var ne=Object.defineProperty;var oe=(t,e,n)=>e in t?ne(t,e,{enumerable:!0,config
8
8
  *
9
9
  * @license MIT
10
10
  * @version 1.0.8
11
- */const Et=Object.freeze({left:0,top:0,width:16,height:16}),Q=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),L=Object.freeze({...Et,...Q}),K=Object.freeze({...L,body:"",hidden:!1}),le=Object.freeze({width:null,height:null}),Lt=Object.freeze({...le,...Q});function fe(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return e}const de=/[\s,]+/;function he(t,e){e.split(de).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const Mt={...Lt,preserveAspectRatio:""};function ht(t){const e={...Mt},n=(r,o)=>t.getAttribute(r)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=fe(n("rotate","")),he(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function pe(t,e){for(const n in Mt)if(t[n]!==e[n])return!0;return!1}const k=/^[a-z0-9]+(-[a-z0-9]+)*$/,M=(t,e,n,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),u={provider:o.length>0?o[0]:r,prefix:c,name:a};return e&&!z(u)?null:u}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!z(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return e&&!z(a,n)?null:a}return null},z=(t,e)=>t?!!((t.provider===""||t.provider.match(k))&&(e&&t.prefix===""||t.prefix.match(k))&&t.name.match(k)):!1;function ge(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function pt(t,e){const n=ge(t,e);for(const r in K)r in Q?r in t&&!(r in n)&&(n[r]=Q[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function me(t,e){const n=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function ye(t,e,n){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=pt(r[a]||o[a],s)}return i(e),n.forEach(i),pt(t,s)}function Nt(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const r=me(t);for(const o in r){const s=r[o];s&&(e(o,ye(t,o,s)),n.push(o))}return n}const be={provider:"",aliases:{},not_found:{},...Et};function G(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Rt(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!G(t,be))return null;const n=e.icons;for(const o in n){const s=n[o];if(!o.match(k)||typeof s.body!="string"||!G(s,K))return null}const r=e.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(k)||typeof i!="string"||!n[i]&&!r[i]||!G(s,K))return null}return e}const $=Object.create(null);function we(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function S(t,e){const n=$[t]||($[t]=Object.create(null));return n[e]||(n[e]=we(t,e))}function ct(t,e){return Rt(e)?Nt(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function Ie(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function xe(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys($)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys($[o]||{})).forEach(i=>{const a=S(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let _=!1;function Ft(t){return typeof t=="boolean"&&(_=t),_}function O(t){const e=typeof t=="string"?M(t,!0,_):t;if(e){const n=S(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Dt(t,e){const n=M(t,!0,_);if(!n)return!1;const r=S(n.provider,n.prefix);return Ie(r,n.name,e)}function gt(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),_&&!e&&!t.prefix){let o=!1;return Rt(t)&&(t.prefix="",Nt(t,(s,i)=>{i&&Dt(s,i)&&(o=!0)})),o}const n=t.prefix;if(!z({provider:e,prefix:n,name:"a"}))return!1;const r=S(e,n);return!!ct(r,t)}function Se(t){return!!O(t)}function Ce(t){const e=O(t);return e?{...L,...e}:null}function Ae(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),u=c[i]||(c[i]=S(s,i));let l;a in u.icons?l=e.loaded:i===""||u.missing.has(a)?l=e.missing:l=e.pending;const d={provider:s,prefix:i,name:a};l.push(d)}),e}function zt(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==e))})}function ve(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,o=t.prefix;e.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const u=c.name;if(t.icons[u])i.loaded.push({provider:r,prefix:o,name:u});else if(t.missing.has(u))i.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||zt([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Pe=0;function Te(t,e,n){const r=Pe++,o=zt.bind(null,n,r);if(!e.pending.length)return o;const s={id:r,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const tt=Object.create(null);function mt(t,e){tt[t]=e}function et(t){return tt[t]||tt[""]}function ke(t,e=!0,n=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?M(o,e,n):o;s&&r.push(s)}),r}var je={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function _e(t,e,n,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let p=t.resources.slice(0);for(i=[];p.length>1;){const I=Math.floor(Math.random()*p.length);i.push(p[I]),p=p.slice(0,I).concat(p.slice(I+1))}i=i.concat(p)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",u=0,l,d=null,h=[],m=[];typeof r=="function"&&m.push(r);function y(){d&&(clearTimeout(d),d=null)}function b(){c==="pending"&&(c="aborted"),y(),h.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),h=[]}function x(p,I){I&&(m=[]),typeof p=="function"&&m.push(p)}function C(){return{startTime:a,payload:e,status:c,queriesSent:u,queriesPending:h.length,subscribe:x,abort:b}}function w(){c="failed",m.forEach(p=>{p(void 0,l)})}function g(){h.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),h=[]}function ee(p,I,P){const N=I!=="success";switch(h=h.filter(A=>A!==p),c){case"pending":break;case"failed":if(N||!t.dataAfterTimeout)return;break;default:return}if(I==="abort"){l=P,w();return}if(N){l=P,h.length||(i.length?W():w());return}if(y(),g(),!t.random){const A=t.resources.indexOf(p.resource);A!==-1&&A!==t.index&&(t.index=A)}c="completed",m.forEach(A=>{A(P)})}function W(){if(c!=="pending")return;y();const p=i.shift();if(p===void 0){if(h.length){d=setTimeout(()=>{y(),c==="pending"&&(g(),w())},t.timeout);return}w();return}const I={status:"pending",resource:p,callback:(P,N)=>{ee(I,P,N)}};h.push(I),u++,d=setTimeout(W,t.rotate),n(p,e,I.callback)}return setTimeout(W),C}function Ht(t){const e={...je,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,u){const l=_e(e,a,c,(d,h)=>{r(),u&&u(d,h)});return n.push(l),l}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function at(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const q=Object.create(null),T=["https://api.simplesvg.com","https://api.unisvg.com"],H=[];for(;T.length>0;)T.length===1||Math.random()>.5?H.push(T.shift()):H.push(T.pop());q[""]=at({resources:["https://api.iconify.design"].concat(H)});function yt(t,e){const n=at(e);return n===null?!1:(q[t]=n,!0)}function V(t){return q[t]}function Oe(){return Object.keys(q)}function bt(){}const J=Object.create(null);function Ee(t){if(!J[t]){const e=V(t);if(!e)return;const n=Ht(e),r={config:e,redundancy:n};J[t]=r}return J[t]}function Qt(t,e,n){let r,o;if(typeof t=="string"){const s=et(t);if(!s)return n(void 0,424),bt;o=s.send;const i=Ee(t);i&&(r=i.redundancy)}else{const s=at(t);if(s){r=Ht(s);const i=t.resources?t.resources[0]:"",a=et(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),bt):r.query(e,o,n)().abort}const wt="iconify2",E="iconify",$t=E+"-count",It=E+"-version",Ut=36e5,Le=168;function nt(t,e){try{return t.getItem(e)}catch{}}function ut(t,e,n){try{return t.setItem(e,n),!0}catch{}}function xt(t,e){try{t.removeItem(e)}catch{}}function ot(t,e){return ut(t,$t,e.toString())}function rt(t){return parseInt(nt(t,$t))||0}const v={local:!0,session:!0},qt={local:new Set,session:new Set};let lt=!1;function Me(t){lt=t}let D=typeof window>"u"?{}:window;function Vt(t){const e=t+"Storage";try{if(D&&D[e]&&typeof D[e].length=="number")return D[e]}catch{}v[t]=!1}function Bt(t,e){const n=Vt(t);if(!n)return;const r=nt(n,It);if(r!==wt){if(r){const a=rt(n);for(let c=0;c<a;c++)xt(n,E+c.toString())}ut(n,It,wt),ot(n,0);return}const o=Math.floor(Date.now()/Ut)-Le,s=a=>{const c=E+a.toString(),u=nt(n,c);if(typeof u=="string"){try{const l=JSON.parse(u);if(typeof l=="object"&&typeof l.cached=="number"&&l.cached>o&&typeof l.provider=="string"&&typeof l.data=="object"&&typeof l.data.prefix=="string"&&e(l,a))return!0}catch{}xt(n,c)}};let i=rt(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,ot(n,i)):qt[t].add(a))}function Wt(){if(!lt){Me(!0);for(const t in v)Bt(t,e=>{const n=e.data,r=e.provider,o=n.prefix,s=S(r,o);if(!ct(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function Ne(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in v)Bt(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function Re(t,e){lt||Wt();function n(r){let o;if(!v[r]||!(o=Vt(r)))return;const s=qt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=rt(o),!ot(o,i+1))return;const a={cached:Math.floor(Date.now()/Ut),provider:t.provider,data:e};return ut(o,E+i.toString(),JSON.stringify(a))}e.lastModified&&!Ne(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function St(){}function Fe(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,ve(t)}))}function De(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=et(n)))return;s.prepare(n,r,o).forEach(a=>{Qt(n,a,c=>{if(typeof c!="object")a.icons.forEach(u=>{t.missing.add(u)});else try{const u=ct(t,c);if(!u.length)return;const l=t.pendingIcons;l&&u.forEach(d=>{l.delete(d)}),Re(t,c)}catch(u){console.error(u)}Fe(t)})})}))}const ft=(t,e)=>{const n=ke(t,!0,Ft()),r=Ae(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,St)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:u,prefix:l}=c;if(l===a&&u===i)return;i=u,a=l,s.push(S(u,l));const d=o[u]||(o[u]=Object.create(null));d[l]||(d[l]=[])}),r.pending.forEach(c=>{const{provider:u,prefix:l,name:d}=c,h=S(u,l),m=h.pendingIcons||(h.pendingIcons=new Set);m.has(d)||(m.add(d),o[u][l].push(d))}),s.forEach(c=>{const{provider:u,prefix:l}=c;o[u][l].length&&De(c,o[u][l])}),e?Te(e,r,s):St},ze=t=>new Promise((e,n)=>{const r=typeof t=="string"?M(t,!0):t;if(!r){n(t);return}ft([r||t],o=>{if(o.length&&r){const s=O(r);if(s){e({...L,...s});return}}n(t)})});function He(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function Qe(t,e){const n=typeof t=="string"?M(t,!0,!0):null;if(!n){const s=He(t);return{value:t,data:s}}const r=O(n);if(r!==void 0||!n.prefix)return{value:t,name:n,data:r};const o=ft([n],()=>e(t,n,O(n)));return{value:t,name:n,loading:o}}function X(t){return t.hasAttribute("inline")}let Gt=!1;try{Gt=navigator.vendor.indexOf("Apple")===0}catch{}function $e(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(Gt||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const Ue=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function st(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(Ue);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=qe.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*e*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Ve=t=>t==="unset"||t==="undefined"||t==="none";function Jt(t,e){const n={...L,...t},r={...Lt,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(y=>{const b=[],x=y.hFlip,C=y.vFlip;let w=y.rotate;x?C?w+=2:(b.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),b.push("scale(-1 1)"),o.top=o.left=0):C&&(b.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),b.push("scale(1 -1)"),o.top=o.left=0);let g;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:g=o.height/2+o.top,b.unshift("rotate(90 "+g.toString()+" "+g.toString()+")");break;case 2:b.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:g=o.width/2+o.left,b.unshift("rotate(-90 "+g.toString()+" "+g.toString()+")");break}w%2===1&&(o.left!==o.top&&(g=o.left,o.left=o.top,o.top=g),o.width!==o.height&&(g=o.width,o.width=o.height,o.height=g)),b.length&&(s='<g transform="'+b.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,u=o.height;let l,d;i===null?(d=a===null?"1em":a==="auto"?u:a,l=st(d,c/u)):(l=i==="auto"?c:i,d=a===null?st(l,u/c):a==="auto"?u:a);const h={},m=(y,b)=>{Ve(b)||(h[y]=b.toString())};return m("width",l),m("height",d),h.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:h,body:s}}const Be=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let U=Be();function We(t){U=t}function Ge(){return U}function Je(t,e){const n=V(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=e+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Xe(t){return t===404}const Ye=(t,e,n)=>{const r=[],o=Je(t,e),s="icons";let i={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,u)=>{a+=c.length+1,a>=o&&u>0&&(r.push(i),i={type:s,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Ze(t){if(typeof t=="string"){const e=V(t);if(e)return e.path}return"/"}const Ke=(t,e,n)=>{if(!U){n("abort",424);return}let r=Ze(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;U(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Xe(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},tn={prepare:Ye,send:Ke};function Ct(t,e){switch(t){case"local":case"session":v[t]=e;break;case"all":for(const n in v)v[n]=e;break}}const Y="data-style";let Xt="";function en(t){Xt=t}function At(t,e){let n=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(Y));n||(n=document.createElement("style"),n.setAttribute(Y,Y),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+Xt}function Yt(){mt("",tn),Ft(!0);let t;try{t=window}catch{}if(t){if(Wt(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!gt(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;yt(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Ct(n,!0),disableCache:n=>Ct(n,!1),iconExists:Se,getIcon:Ce,listIcons:xe,addIcon:Dt,addCollection:gt,calculateSize:st,buildIcon:Jt,loadIcons:ft,loadIcon:ze,addAPIProvider:yt,appendCustomStyle:en,_api:{getAPIConfig:V,setAPIModule:mt,sendAPIQuery:Qt,setFetch:We,getFetch:Ge,listAPIProviders:Oe}}}function Zt(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function nn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function on(t){return"data:image/svg+xml,"+nn(t)}function rn(t){return'url("'+on(t)+'")'}const it={"background-color":"currentColor"},Kt={"background-color":"transparent"},vt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Pt={"-webkit-mask":it,mask:it,background:Kt};for(const t in Pt){const e=Pt[t];for(const n in vt)e[t+"-"+n]=vt[n]}function Tt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function sn(t,e,n){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=Zt(o,{...s,width:e.width+"",height:e.height+""}),a=rn(i),c=r.style,u={"--svg":a,width:Tt(s.width),height:Tt(s.height),...n?it:Kt};for(const l in u)c.setProperty(l,u[l]);return r}let j;function cn(){try{j=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{j=null}}function an(t){return j===void 0&&cn(),j?j.createHTML(t):t}function un(t){const e=document.createElement("span"),n=t.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=Zt(t.body,n);return e.innerHTML=an(o),e.firstChild}function kt(t,e){const n=e.icon.data,r=e.customisations,o=Jt(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let i;switch(s){case"svg":i=un(o);break;default:i=sn(o,{...L,...n},s==="mask")}const a=Array.from(t.childNodes).find(c=>{const u=c.tagName&&c.tagName.toUpperCase();return u==="SPAN"||u==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function jt(t,e,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function ln(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const r=e.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();R(this,"_shadowRoot");R(this,"_state");R(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),u=X(this);At(c,u),this._state=jt({value:""},u),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const u=X(this),l=this._state;u!==l.inline&&(l.inline=u,At(this._shadowRoot,u))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return X(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const u=this._shadowRoot;if(c.renderedMode==="svg")try{u.lastChild.setCurrentTime(0);return}catch{}kt(u,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,u=this.getAttribute("icon");if(u!==c.icon.value){this._iconChanged(u);return}if(!c.rendered)return;const l=this.getAttribute("mode"),d=ht(this);(c.attrMode!==l||pe(c.customisations,d))&&this._renderIcon(c.icon,d,l)}_iconChanged(c){const u=Qe(c,(l,d,h)=>{const m=this._state;if(m.rendered||this.getAttribute("icon")!==l)return;const y={value:l,name:d,data:h};y.data?this._gotIconData(y):m.icon=y});u.data?this._gotIconData(u):this._state=jt(u,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,ht(this),this.getAttribute("mode"))}_renderIcon(c,u,l){const d=$e(c.data.body,l),h=this._state.inline;kt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:h,customisations:u,attrMode:l,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=Yt();for(const a in i)s[a]=s.prototype[a]=i[a];return e.define(t,s),s}ln()||Yt();const Cn=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),fn=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),B=(t,e,n="children")=>t.map(r=>Array.isArray(r[n])?e({...r,[n]:B(r[n],e,n)}):e(r)),An=(t,e="children")=>{const n=[];return B(t,r=>n.push(r),e),n},dt=(t,e,n="children")=>t.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=dt(o,e,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return e(r,s)}),dn=t=>/^https?:\/\//.test(t),vn=t=>/^[\w-]+:[\w-]+$/.test(t),hn=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),r=e(new URL(t,window.location.origin).pathname);return n.startsWith(r)},Pn=(t=[])=>{const e=t.map((r,o)=>({path:r,index:o})).filter(r=>hn(r.path));return e!=null&&e.length?e.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,e[0]).index:-1};var _t,Ot;const Tn=((_t=window==null?void 0:window.blocklet)==null?void 0:_t.groupPrefix)||((Ot=window==null?void 0:window.blocklet)==null?void 0:Ot.prefix)||"/",pn=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},gn=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(dn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return B(t,o=>{var s;return{...o,title:n(o.title,e),link:(s=o.items)!=null&&s.length?o.link:r(o.link,e)}},"items")},mn=t=>B(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),yn=t=>{if(!(t!=null&&t.length))return null;const e=mn(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return e.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},kn=t=>{if(!t)return null;const e={...t};return e.theme=pn(e.theme),e.navigation=yn(bn(e.navigation)),e},bn=(t=[])=>dt(t,(e,n)=>{var r;return!!e.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),wn=(t,e)=>dt(t,(n,r)=>{var s;const o=!n.role||e&&n.role.includes(e);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items");function te({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var h,m,y,b;const r=Z.useContext(re),{locale:o}=se()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((h=r==null?void 0:r.session)!=null&&h.user);let c=gn((m=t==null?void 0:t.navigation)==null?void 0:m.sessionManager,o)||[];c=wn(c,(b=(y=r==null?void 0:r.session)==null?void 0:y.user)==null?void 0:b.role);const l=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let x=[];if(i&&o&&x.push(F.jsx(ue,{showText:!1},"locale-selector")),s&&r){const C=[];a&&(c?c.slice(0,5):[]).forEach(g=>{C.push({label:g.title,icon:g.icon?F.jsx("iconify-icon",{icon:g.icon,height:24,style:{marginRight:8}}):null,component:"a",href:g.link,key:g.link})}),x.push(F.jsx(ie,{session:r.session,locale:o,menu:C,showRole:!0,...n},"session-manager"))}return typeof e=="function"&&(x=e(x)||[]),x})();return Z.createElement(F.Fragment,null,...Array.isArray(l)?l:[l])}te.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:fn};te.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const jn=()=>{const t=ce();Z.useEffect(()=>{t.wallet&&ae(()=>import("./index-e6a97b71.js").then(e=>e.i),["assets/index-e6a97b71.js","assets/index-569e9974.js","assets/index-d8bbb108.css"]).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};export{te as H,wn as a,Cn as b,An as c,Pn as d,vn as e,kn as f,gn as g,dn as i,B as m,Tn as p,fn as s,jn as u};
11
+ */const Et=Object.freeze({left:0,top:0,width:16,height:16}),Q=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),L=Object.freeze({...Et,...Q}),K=Object.freeze({...L,body:"",hidden:!1}),le=Object.freeze({width:null,height:null}),Lt=Object.freeze({...le,...Q});function fe(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return e}const de=/[\s,]+/;function he(t,e){e.split(de).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const Mt={...Lt,preserveAspectRatio:""};function ht(t){const e={...Mt},n=(r,o)=>t.getAttribute(r)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=fe(n("rotate","")),he(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function pe(t,e){for(const n in Mt)if(t[n]!==e[n])return!0;return!1}const k=/^[a-z0-9]+(-[a-z0-9]+)*$/,M=(t,e,n,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),u={provider:o.length>0?o[0]:r,prefix:c,name:a};return e&&!z(u)?null:u}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!z(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return e&&!z(a,n)?null:a}return null},z=(t,e)=>t?!!((t.provider===""||t.provider.match(k))&&(e&&t.prefix===""||t.prefix.match(k))&&t.name.match(k)):!1;function ge(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function pt(t,e){const n=ge(t,e);for(const r in K)r in Q?r in t&&!(r in n)&&(n[r]=Q[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function me(t,e){const n=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function ye(t,e,n){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=pt(r[a]||o[a],s)}return i(e),n.forEach(i),pt(t,s)}function Nt(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const r=me(t);for(const o in r){const s=r[o];s&&(e(o,ye(t,o,s)),n.push(o))}return n}const be={provider:"",aliases:{},not_found:{},...Et};function G(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Rt(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!G(t,be))return null;const n=e.icons;for(const o in n){const s=n[o];if(!o.match(k)||typeof s.body!="string"||!G(s,K))return null}const r=e.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(k)||typeof i!="string"||!n[i]&&!r[i]||!G(s,K))return null}return e}const $=Object.create(null);function we(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function S(t,e){const n=$[t]||($[t]=Object.create(null));return n[e]||(n[e]=we(t,e))}function ct(t,e){return Rt(e)?Nt(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function Ie(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function xe(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys($)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys($[o]||{})).forEach(i=>{const a=S(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let _=!1;function Ft(t){return typeof t=="boolean"&&(_=t),_}function O(t){const e=typeof t=="string"?M(t,!0,_):t;if(e){const n=S(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Dt(t,e){const n=M(t,!0,_);if(!n)return!1;const r=S(n.provider,n.prefix);return Ie(r,n.name,e)}function gt(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),_&&!e&&!t.prefix){let o=!1;return Rt(t)&&(t.prefix="",Nt(t,(s,i)=>{i&&Dt(s,i)&&(o=!0)})),o}const n=t.prefix;if(!z({provider:e,prefix:n,name:"a"}))return!1;const r=S(e,n);return!!ct(r,t)}function Se(t){return!!O(t)}function Ce(t){const e=O(t);return e?{...L,...e}:null}function Ae(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),u=c[i]||(c[i]=S(s,i));let l;a in u.icons?l=e.loaded:i===""||u.missing.has(a)?l=e.missing:l=e.pending;const d={provider:s,prefix:i,name:a};l.push(d)}),e}function zt(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==e))})}function ve(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,o=t.prefix;e.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const u=c.name;if(t.icons[u])i.loaded.push({provider:r,prefix:o,name:u});else if(t.missing.has(u))i.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||zt([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Pe=0;function Te(t,e,n){const r=Pe++,o=zt.bind(null,n,r);if(!e.pending.length)return o;const s={id:r,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const tt=Object.create(null);function mt(t,e){tt[t]=e}function et(t){return tt[t]||tt[""]}function ke(t,e=!0,n=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?M(o,e,n):o;s&&r.push(s)}),r}var je={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function _e(t,e,n,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let p=t.resources.slice(0);for(i=[];p.length>1;){const I=Math.floor(Math.random()*p.length);i.push(p[I]),p=p.slice(0,I).concat(p.slice(I+1))}i=i.concat(p)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",u=0,l,d=null,h=[],m=[];typeof r=="function"&&m.push(r);function y(){d&&(clearTimeout(d),d=null)}function b(){c==="pending"&&(c="aborted"),y(),h.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),h=[]}function x(p,I){I&&(m=[]),typeof p=="function"&&m.push(p)}function C(){return{startTime:a,payload:e,status:c,queriesSent:u,queriesPending:h.length,subscribe:x,abort:b}}function w(){c="failed",m.forEach(p=>{p(void 0,l)})}function g(){h.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),h=[]}function ee(p,I,P){const N=I!=="success";switch(h=h.filter(A=>A!==p),c){case"pending":break;case"failed":if(N||!t.dataAfterTimeout)return;break;default:return}if(I==="abort"){l=P,w();return}if(N){l=P,h.length||(i.length?W():w());return}if(y(),g(),!t.random){const A=t.resources.indexOf(p.resource);A!==-1&&A!==t.index&&(t.index=A)}c="completed",m.forEach(A=>{A(P)})}function W(){if(c!=="pending")return;y();const p=i.shift();if(p===void 0){if(h.length){d=setTimeout(()=>{y(),c==="pending"&&(g(),w())},t.timeout);return}w();return}const I={status:"pending",resource:p,callback:(P,N)=>{ee(I,P,N)}};h.push(I),u++,d=setTimeout(W,t.rotate),n(p,e,I.callback)}return setTimeout(W),C}function Ht(t){const e={...je,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,u){const l=_e(e,a,c,(d,h)=>{r(),u&&u(d,h)});return n.push(l),l}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function at(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const q=Object.create(null),T=["https://api.simplesvg.com","https://api.unisvg.com"],H=[];for(;T.length>0;)T.length===1||Math.random()>.5?H.push(T.shift()):H.push(T.pop());q[""]=at({resources:["https://api.iconify.design"].concat(H)});function yt(t,e){const n=at(e);return n===null?!1:(q[t]=n,!0)}function V(t){return q[t]}function Oe(){return Object.keys(q)}function bt(){}const J=Object.create(null);function Ee(t){if(!J[t]){const e=V(t);if(!e)return;const n=Ht(e),r={config:e,redundancy:n};J[t]=r}return J[t]}function Qt(t,e,n){let r,o;if(typeof t=="string"){const s=et(t);if(!s)return n(void 0,424),bt;o=s.send;const i=Ee(t);i&&(r=i.redundancy)}else{const s=at(t);if(s){r=Ht(s);const i=t.resources?t.resources[0]:"",a=et(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),bt):r.query(e,o,n)().abort}const wt="iconify2",E="iconify",$t=E+"-count",It=E+"-version",Ut=36e5,Le=168;function nt(t,e){try{return t.getItem(e)}catch{}}function ut(t,e,n){try{return t.setItem(e,n),!0}catch{}}function xt(t,e){try{t.removeItem(e)}catch{}}function ot(t,e){return ut(t,$t,e.toString())}function rt(t){return parseInt(nt(t,$t))||0}const v={local:!0,session:!0},qt={local:new Set,session:new Set};let lt=!1;function Me(t){lt=t}let D=typeof window>"u"?{}:window;function Vt(t){const e=t+"Storage";try{if(D&&D[e]&&typeof D[e].length=="number")return D[e]}catch{}v[t]=!1}function Bt(t,e){const n=Vt(t);if(!n)return;const r=nt(n,It);if(r!==wt){if(r){const a=rt(n);for(let c=0;c<a;c++)xt(n,E+c.toString())}ut(n,It,wt),ot(n,0);return}const o=Math.floor(Date.now()/Ut)-Le,s=a=>{const c=E+a.toString(),u=nt(n,c);if(typeof u=="string"){try{const l=JSON.parse(u);if(typeof l=="object"&&typeof l.cached=="number"&&l.cached>o&&typeof l.provider=="string"&&typeof l.data=="object"&&typeof l.data.prefix=="string"&&e(l,a))return!0}catch{}xt(n,c)}};let i=rt(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,ot(n,i)):qt[t].add(a))}function Wt(){if(!lt){Me(!0);for(const t in v)Bt(t,e=>{const n=e.data,r=e.provider,o=n.prefix,s=S(r,o);if(!ct(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function Ne(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in v)Bt(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function Re(t,e){lt||Wt();function n(r){let o;if(!v[r]||!(o=Vt(r)))return;const s=qt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=rt(o),!ot(o,i+1))return;const a={cached:Math.floor(Date.now()/Ut),provider:t.provider,data:e};return ut(o,E+i.toString(),JSON.stringify(a))}e.lastModified&&!Ne(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function St(){}function Fe(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,ve(t)}))}function De(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=et(n)))return;s.prepare(n,r,o).forEach(a=>{Qt(n,a,c=>{if(typeof c!="object")a.icons.forEach(u=>{t.missing.add(u)});else try{const u=ct(t,c);if(!u.length)return;const l=t.pendingIcons;l&&u.forEach(d=>{l.delete(d)}),Re(t,c)}catch(u){console.error(u)}Fe(t)})})}))}const ft=(t,e)=>{const n=ke(t,!0,Ft()),r=Ae(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,St)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:u,prefix:l}=c;if(l===a&&u===i)return;i=u,a=l,s.push(S(u,l));const d=o[u]||(o[u]=Object.create(null));d[l]||(d[l]=[])}),r.pending.forEach(c=>{const{provider:u,prefix:l,name:d}=c,h=S(u,l),m=h.pendingIcons||(h.pendingIcons=new Set);m.has(d)||(m.add(d),o[u][l].push(d))}),s.forEach(c=>{const{provider:u,prefix:l}=c;o[u][l].length&&De(c,o[u][l])}),e?Te(e,r,s):St},ze=t=>new Promise((e,n)=>{const r=typeof t=="string"?M(t,!0):t;if(!r){n(t);return}ft([r||t],o=>{if(o.length&&r){const s=O(r);if(s){e({...L,...s});return}}n(t)})});function He(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function Qe(t,e){const n=typeof t=="string"?M(t,!0,!0):null;if(!n){const s=He(t);return{value:t,data:s}}const r=O(n);if(r!==void 0||!n.prefix)return{value:t,name:n,data:r};const o=ft([n],()=>e(t,n,O(n)));return{value:t,name:n,loading:o}}function X(t){return t.hasAttribute("inline")}let Gt=!1;try{Gt=navigator.vendor.indexOf("Apple")===0}catch{}function $e(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(Gt||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const Ue=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function st(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(Ue);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=qe.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*e*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Ve=t=>t==="unset"||t==="undefined"||t==="none";function Jt(t,e){const n={...L,...t},r={...Lt,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(y=>{const b=[],x=y.hFlip,C=y.vFlip;let w=y.rotate;x?C?w+=2:(b.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),b.push("scale(-1 1)"),o.top=o.left=0):C&&(b.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),b.push("scale(1 -1)"),o.top=o.left=0);let g;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:g=o.height/2+o.top,b.unshift("rotate(90 "+g.toString()+" "+g.toString()+")");break;case 2:b.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:g=o.width/2+o.left,b.unshift("rotate(-90 "+g.toString()+" "+g.toString()+")");break}w%2===1&&(o.left!==o.top&&(g=o.left,o.left=o.top,o.top=g),o.width!==o.height&&(g=o.width,o.width=o.height,o.height=g)),b.length&&(s='<g transform="'+b.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,u=o.height;let l,d;i===null?(d=a===null?"1em":a==="auto"?u:a,l=st(d,c/u)):(l=i==="auto"?c:i,d=a===null?st(l,u/c):a==="auto"?u:a);const h={},m=(y,b)=>{Ve(b)||(h[y]=b.toString())};return m("width",l),m("height",d),h.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:h,body:s}}const Be=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let U=Be();function We(t){U=t}function Ge(){return U}function Je(t,e){const n=V(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=e+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Xe(t){return t===404}const Ye=(t,e,n)=>{const r=[],o=Je(t,e),s="icons";let i={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,u)=>{a+=c.length+1,a>=o&&u>0&&(r.push(i),i={type:s,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Ze(t){if(typeof t=="string"){const e=V(t);if(e)return e.path}return"/"}const Ke=(t,e,n)=>{if(!U){n("abort",424);return}let r=Ze(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;U(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Xe(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},tn={prepare:Ye,send:Ke};function Ct(t,e){switch(t){case"local":case"session":v[t]=e;break;case"all":for(const n in v)v[n]=e;break}}const Y="data-style";let Xt="";function en(t){Xt=t}function At(t,e){let n=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(Y));n||(n=document.createElement("style"),n.setAttribute(Y,Y),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+Xt}function Yt(){mt("",tn),Ft(!0);let t;try{t=window}catch{}if(t){if(Wt(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!gt(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;yt(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Ct(n,!0),disableCache:n=>Ct(n,!1),iconExists:Se,getIcon:Ce,listIcons:xe,addIcon:Dt,addCollection:gt,calculateSize:st,buildIcon:Jt,loadIcons:ft,loadIcon:ze,addAPIProvider:yt,appendCustomStyle:en,_api:{getAPIConfig:V,setAPIModule:mt,sendAPIQuery:Qt,setFetch:We,getFetch:Ge,listAPIProviders:Oe}}}function Zt(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function nn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function on(t){return"data:image/svg+xml,"+nn(t)}function rn(t){return'url("'+on(t)+'")'}const it={"background-color":"currentColor"},Kt={"background-color":"transparent"},vt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Pt={"-webkit-mask":it,mask:it,background:Kt};for(const t in Pt){const e=Pt[t];for(const n in vt)e[t+"-"+n]=vt[n]}function Tt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function sn(t,e,n){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=Zt(o,{...s,width:e.width+"",height:e.height+""}),a=rn(i),c=r.style,u={"--svg":a,width:Tt(s.width),height:Tt(s.height),...n?it:Kt};for(const l in u)c.setProperty(l,u[l]);return r}let j;function cn(){try{j=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{j=null}}function an(t){return j===void 0&&cn(),j?j.createHTML(t):t}function un(t){const e=document.createElement("span"),n=t.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=Zt(t.body,n);return e.innerHTML=an(o),e.firstChild}function kt(t,e){const n=e.icon.data,r=e.customisations,o=Jt(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let i;switch(s){case"svg":i=un(o);break;default:i=sn(o,{...L,...n},s==="mask")}const a=Array.from(t.childNodes).find(c=>{const u=c.tagName&&c.tagName.toUpperCase();return u==="SPAN"||u==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function jt(t,e,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function ln(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const r=e.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();R(this,"_shadowRoot");R(this,"_state");R(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),u=X(this);At(c,u),this._state=jt({value:""},u),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const u=X(this),l=this._state;u!==l.inline&&(l.inline=u,At(this._shadowRoot,u))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return X(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const u=this._shadowRoot;if(c.renderedMode==="svg")try{u.lastChild.setCurrentTime(0);return}catch{}kt(u,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,u=this.getAttribute("icon");if(u!==c.icon.value){this._iconChanged(u);return}if(!c.rendered)return;const l=this.getAttribute("mode"),d=ht(this);(c.attrMode!==l||pe(c.customisations,d))&&this._renderIcon(c.icon,d,l)}_iconChanged(c){const u=Qe(c,(l,d,h)=>{const m=this._state;if(m.rendered||this.getAttribute("icon")!==l)return;const y={value:l,name:d,data:h};y.data?this._gotIconData(y):m.icon=y});u.data?this._gotIconData(u):this._state=jt(u,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,ht(this),this.getAttribute("mode"))}_renderIcon(c,u,l){const d=$e(c.data.body,l),h=this._state.inline;kt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:h,customisations:u,attrMode:l,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=Yt();for(const a in i)s[a]=s.prototype[a]=i[a];return e.define(t,s),s}ln()||Yt();const Cn=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),fn=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),B=(t,e,n="children")=>t.map(r=>Array.isArray(r[n])?e({...r,[n]:B(r[n],e,n)}):e(r)),An=(t,e="children")=>{const n=[];return B(t,r=>n.push(r),e),n},dt=(t,e,n="children")=>t.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=dt(o,e,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return e(r,s)}),dn=t=>/^https?:\/\//.test(t),vn=t=>/^[\w-]+:[\w-]+$/.test(t),hn=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),r=e(new URL(t,window.location.origin).pathname);return n.startsWith(r)},Pn=(t=[])=>{const e=t.map((r,o)=>({path:r,index:o})).filter(r=>hn(r.path));return e!=null&&e.length?e.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,e[0]).index:-1};var _t,Ot;const Tn=((_t=window==null?void 0:window.blocklet)==null?void 0:_t.groupPrefix)||((Ot=window==null?void 0:window.blocklet)==null?void 0:Ot.prefix)||"/",pn=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},gn=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(dn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return B(t,o=>{var s;return{...o,title:n(o.title,e),link:(s=o.items)!=null&&s.length?o.link:r(o.link,e)}},"items")},mn=t=>B(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),yn=t=>{if(!(t!=null&&t.length))return null;const e=mn(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return e.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},kn=t=>{if(!t)return null;const e={...t};return e.theme=pn(e.theme),e.navigation=yn(bn(e.navigation)),e},bn=(t=[])=>dt(t,(e,n)=>{var r;return!!e.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),wn=(t,e)=>dt(t,(n,r)=>{var s;const o=!n.role||e&&n.role.includes(e);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items");function te({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var h,m,y,b;const r=Z.useContext(re),{locale:o}=se()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((h=r==null?void 0:r.session)!=null&&h.user);let c=gn((m=t==null?void 0:t.navigation)==null?void 0:m.sessionManager,o)||[];c=wn(c,(b=(y=r==null?void 0:r.session)==null?void 0:y.user)==null?void 0:b.role);const l=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let x=[];if(i&&o&&x.push(F.jsx(ue,{showText:!1},"locale-selector")),s&&r){const C=[];a&&(c?c.slice(0,5):[]).forEach(g=>{C.push({label:g.title,icon:g.icon?F.jsx("iconify-icon",{icon:g.icon,height:24,style:{marginRight:8}}):null,component:"a",href:g.link,key:g.link})}),x.push(F.jsx(ie,{session:r.session,locale:o,menu:C,showRole:!0,...n},"session-manager"))}return typeof e=="function"&&(x=e(x)||[]),x})();return Z.createElement(F.Fragment,null,...Array.isArray(l)?l:[l])}te.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:fn};te.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const jn=()=>{const t=ce();Z.useEffect(()=>{t.wallet&&ae(()=>import("./index-32a94750.js").then(e=>e.i),["assets/index-32a94750.js","assets/index-2668c3ea.js","assets/index-d8bbb108.css"]).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};export{te as H,wn as a,Cn as b,An as c,Pn as d,vn as e,kn as f,gn as g,dn as i,B as m,Tn as p,fn as s,jn as u};
@@ -0,0 +1 @@
1
+ import{aq as a,ar as t,as as e,j as r,at as o}from"./index-2668c3ea.js";const i={zh:a(t),en:a(e)};function p(s){return function(n){return r.jsx(o,{translations:i,children:r.jsx(s,{...n})})}}export{p as w};
package/dist/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  padding: 0;
15
15
  }
16
16
  </style>
17
- <script type="module" crossorigin src="/.well-known/service/static/assets/index-569e9974.js"></script>
17
+ <script type="module" crossorigin src="/.well-known/service/static/assets/index-2668c3ea.js"></script>
18
18
  <link rel="stylesheet" href="/.well-known/service/static/assets/index-d8bbb108.css">
19
19
  </head>
20
20
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.21-beta-7b40ffb4",
6
+ "version": "1.16.21-beta-bd0e2503",
7
7
  "description": "Provide unified services for every blocklet",
8
8
  "main": "api/index.js",
9
9
  "files": [
@@ -32,17 +32,17 @@
32
32
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
33
33
  "license": "Apache-2.0",
34
34
  "dependencies": {
35
- "@abtnode/analytics": "1.16.21-beta-7b40ffb4",
36
- "@abtnode/auth": "1.16.21-beta-7b40ffb4",
37
- "@abtnode/client": "1.16.21-beta-7b40ffb4",
38
- "@abtnode/connect-storage": "1.16.21-beta-7b40ffb4",
39
- "@abtnode/constant": "1.16.21-beta-7b40ffb4",
40
- "@abtnode/core": "1.16.21-beta-7b40ffb4",
41
- "@abtnode/cron": "1.16.21-beta-7b40ffb4",
42
- "@abtnode/logger": "1.16.21-beta-7b40ffb4",
43
- "@abtnode/models": "1.16.21-beta-7b40ffb4",
44
- "@abtnode/router-templates": "1.16.21-beta-7b40ffb4",
45
- "@abtnode/util": "1.16.21-beta-7b40ffb4",
35
+ "@abtnode/analytics": "1.16.21-beta-bd0e2503",
36
+ "@abtnode/auth": "1.16.21-beta-bd0e2503",
37
+ "@abtnode/client": "1.16.21-beta-bd0e2503",
38
+ "@abtnode/connect-storage": "1.16.21-beta-bd0e2503",
39
+ "@abtnode/constant": "1.16.21-beta-bd0e2503",
40
+ "@abtnode/core": "1.16.21-beta-bd0e2503",
41
+ "@abtnode/cron": "1.16.21-beta-bd0e2503",
42
+ "@abtnode/logger": "1.16.21-beta-bd0e2503",
43
+ "@abtnode/models": "1.16.21-beta-bd0e2503",
44
+ "@abtnode/router-templates": "1.16.21-beta-bd0e2503",
45
+ "@abtnode/util": "1.16.21-beta-bd0e2503",
46
46
  "@arcblock/did": "^1.18.107",
47
47
  "@arcblock/did-auth": "1.18.107",
48
48
  "@arcblock/did-ext": "^1.18.107",
@@ -51,11 +51,11 @@
51
51
  "@arcblock/jwt": "1.18.107",
52
52
  "@arcblock/validator": "^1.18.107",
53
53
  "@arcblock/ws": "1.18.107",
54
- "@blocklet/constant": "1.16.21-beta-7b40ffb4",
54
+ "@blocklet/constant": "1.16.21-beta-bd0e2503",
55
55
  "@blocklet/form-builder": "^0.1.11",
56
56
  "@blocklet/form-collector": "^0.1.6",
57
- "@blocklet/meta": "1.16.21-beta-7b40ffb4",
58
- "@blocklet/sdk": "1.16.21-beta-7b40ffb4",
57
+ "@blocklet/meta": "1.16.21-beta-bd0e2503",
58
+ "@blocklet/sdk": "1.16.21-beta-bd0e2503",
59
59
  "@did-connect/authenticator": "^2.2.1",
60
60
  "@did-connect/relay-adapter-express": "^2.2.1",
61
61
  "@ocap/client": "1.18.107",
@@ -94,12 +94,12 @@
94
94
  },
95
95
  "resolutions": {},
96
96
  "devDependencies": {
97
- "@abtnode/ux": "1.16.21-beta-7b40ffb4",
97
+ "@abtnode/ux": "1.16.21-beta-bd0e2503",
98
98
  "@arcblock/did-connect": "^2.8.23",
99
99
  "@arcblock/icons": "^2.8.23",
100
100
  "@arcblock/ux": "^2.8.23",
101
101
  "@blocklet/launcher-layout": "2.2.48",
102
- "@blocklet/tracker": "1.16.21-beta-7b40ffb4",
102
+ "@blocklet/tracker": "1.16.21-beta-bd0e2503",
103
103
  "@blocklet/ui-react": "^2.8.23",
104
104
  "@emotion/react": "^11.10.4",
105
105
  "@emotion/styled": "^11.10.4",
@@ -171,5 +171,5 @@
171
171
  "url": "https://github.com/ArcBlock/blocklet-server/issues",
172
172
  "email": "shijun@arcblock.io"
173
173
  },
174
- "gitHead": "11d567281247a935e866911ebcf53d37021043b3"
174
+ "gitHead": "f4550e061b661cb67d7f1413ada51f3f6491f0b8"
175
175
  }
@@ -1 +0,0 @@
1
- import{u as y,a6 as x,q as R,bE as j,O as P,r as s,c as D,bW as S,bD as W,j as c,ak as O}from"./index-569e9974.js";import{A as k,S as A}from"./add-component-core-bb6234a7.js";import"./uniqBy-40e79dba.js";import"./page-header-e9a0f22f.js";import"./index-bb806fc3.js";import"./Hidden-69bf662a.js";import"./index-a2da02e3.js";import"./lottie-778160f6.js";import"./launch-result-message-5b4d3850.js";import"./index-a01a2a92.js";import"./EditIcon-b0e6e57f.js";import"./Done-0e5c18b8.js";import"./Google-0f192b6f.js";import"./TextField-e67829f3.js";import"./FormControl-7b923ef6.js";import"./useFormControl-62783a72.js";import"./InputLabel-47688e0b.js";import"./Select-149c3d07.js";import"./logo-uploader-6558791d.js";import"./index-ec0dcac3.js";import"./api-aff284aa.js";import"./makeStyles-db592458.js";import"./toPropertyKey-43b89a39.js";import"./confirm-22ebfe38.js";import"./DialogContentText-97bfb1b9.js";import"./Alert-e4bec1ff.js";import"./format-error-94dd3901.js";import"./ListItem-5becb6c1.js";import"./util-159906f0.js";import"./index-ec2e1c82.js";import"./TableRow-525794a7.js";import"./index-30dfcfa0.js";import"./session-fd706eca.js";import"./did-address-4ab44498.js";import"./Stepper-7888ff6e.js";import"./ArrowDropDown-205f16a4.js";import"./Add-b2351a49.js";import"./Launch-12c9ee81.js";import"./DeleteOutline-d2fb4141.js";import"./click-to-copy-40120934.js";import"./fallback-4794b4a5.js";import"./index-69a54ade.js";import"./Search-f00d8e90.js";import"./Grid-567e5a67.js";import"./InputAdornment-850716fa.js";import"./preact.module-783a6d9f.js";import"./content-layout-c8d6e67b.js";import"./use-blocklet-info-for-connect-did-spaces-e7d0d29d.js";import"./spaces-667f0985.js";import"./index-7f215a31.js";import"./index-397f25c3.js";import"./ExpandMore-7ba43884.js";import"./ButtonGroup-9476a3d4.js";function At(){var n;const{t:l}=y(),{blocklet:r}=x(),[u]=R(),{componentDid:d}=j(),h=P(t=>t.breakpoints.down("md")),f=u.get("mode")==="dialog",e=(n=r==null?void 0:r.meta)==null?void 0:n.did,a=new URL(window.location.href),i=(a.searchParams.get("store")||"").split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[w,g]=s.useState(i.map(t=>({url:t,name:t.replace("https://","")}))),m=a.searchParams.get("resourceType")||"";s.useEffect(()=>{(async()=>{try{const t=await Promise.all(i.map(async o=>{const E=D(o,"/api/store.json"),{data:b}=await S.get(E);return{url:o,name:b.name}}));g(t||[])}catch(t){console.error(t)}})()},[i.join(",")]);const C=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:d},"*")};s.useEffect(()=>{const t=W();return e&&t.connect(),()=>{e&&t.isConnected()&&t.disconnect()}},[e]);const p=({inDialog:t=!0}={})=>c.jsx(k,{stores:w,resourceType:m,mode:"embed",inDialog:t,storageKey:A(m)});return f?c.jsx(O,{className:"resource-dialog",title:l("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:h?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&C()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:p()}):p({inDialog:!1})}export{At as default};
@@ -1 +0,0 @@
1
- import{bW as a}from"./index-569e9974.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-569e9974.js";import{S as t}from"./studio-3777d4ea.js";import"./index-48eba397.js";import"./nav-menu-9ff7172d.js";import"./ExpandMore-7ba43884.js";import"./Toolbar-75421c2d.js";import"./Hidden-69bf662a.js";import"./fallback-4794b4a5.js";function e(){return o.jsx(t,{children:"Coming soon..."})}export{e as default};
@@ -1 +0,0 @@
1
- import{u as n,bE as l,O as c,j as o,ak as d,B as u}from"./index-569e9974.js";import h from"./index-b8c52702.js";import"./useSetState-ff3e4148.js";import"./index-52105aed.js";import"./FilterList-c85f15b8.js";import"./TableRow-525794a7.js";import"./Checkbox-865da394.js";import"./FormControlLabel-cb5a33e8.js";import"./useFormControl-62783a72.js";import"./FormControl-7b923ef6.js";import"./FormGroup-00010e1c.js";import"./InputLabel-47688e0b.js";import"./confirm-22ebfe38.js";import"./DialogContentText-97bfb1b9.js";import"./Alert-e4bec1ff.js";import"./format-error-94dd3901.js";import"./Select-149c3d07.js";import"./TextField-e67829f3.js";import"./index-cbc1aab9.js";import"./LastPage-d20f0138.js";import"./Toolbar-75421c2d.js";import"./index-c13429c0.js";import"./redux-9603f4c3.js";import"./toPropertyKey-43b89a39.js";import"./Grid-567e5a67.js";import"./Search-f00d8e90.js";import"./MoreVert-36d47952.js";import"./did-address-4ab44498.js";import"./ChevronRight-1c94da5e.js";import"./Avatar-d7a7b881.js";import"./session-fd706eca.js";import"./InputAdornment-850716fa.js";import"./Download-60d68209.js";import"./DeleteOutline-d2fb4141.js";import"./index-ec0dcac3.js";import"./index-7f215a31.js";import"./ExpandMore-7ba43884.js";import"./OpenInNew-4b969523.js";import"./api-aff284aa.js";const i=new URL(window.location.href),r=i.searchParams.get("mode")==="dialog",g=r?"":i.searchParams.get("padding")||"";function to(){const{t:e}=n(),{componentDid:s}=l(),p=c(a=>a.breakpoints.down("md")),m=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")},t=o.jsx(h,{padding:g});return r?o.jsx(d,{className:"resource-dialog",title:e("blocklet.publish.createResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:p?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:m,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:o.jsx(u,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:t})}):t}export{to as default};
@@ -1 +0,0 @@
1
- import{r as o,bh as t}from"./index-569e9974.js";function e(){return o.useContext(t)}export{e as u};
@@ -1 +0,0 @@
1
- import{aq as a,ar as t,as as e,j as r,at as o}from"./index-569e9974.js";const i={zh:a(t),en:a(e)};function p(s){return function(n){return r.jsx(o,{translations:i,children:r.jsx(s,{...n})})}}export{p as w};