@abtnode/blocklet-services 1.16.20-beta-e363262e → 1.16.20-beta-bb1cd034

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 (174) hide show
  1. package/api/emails/components/article.js +21 -1
  2. package/api/emails/components/asset.js +1 -0
  3. package/api/emails/components/attachments.js +7 -1
  4. package/api/emails/components/compose.js +1 -0
  5. package/api/emails/components/content.js +2 -2
  6. package/api/emails/components/dapp.js +6 -1
  7. package/api/emails/components/footer.js +14 -2
  8. package/api/emails/components/token.js +1 -0
  9. package/api/emails/components/transaction.js +6 -1
  10. package/api/emails/pages/notification.js +2 -2
  11. package/api/libs/email.js +9 -8
  12. package/api/routes/blocklet.js +4 -4
  13. package/api/services/auth/session.js +31 -0
  14. package/api/socket/channel/did.js +50 -11
  15. package/dist/assets/{Add-84b6722e.js → Add-effd671e.js} +1 -1
  16. package/dist/assets/{Alert-16e7636e.js → Alert-bc32e5f8.js} +1 -1
  17. package/dist/assets/{ArrowDropDown-78af0e49.js → ArrowDropDown-a6c41bbc.js} +1 -1
  18. package/dist/assets/{Avatar-17775c72.js → Avatar-b4d609c7.js} +1 -1
  19. package/dist/assets/{ButtonGroup-d60b4115.js → ButtonGroup-46082014.js} +1 -1
  20. package/dist/assets/{CardContent-01c8be10.js → CardContent-d4818490.js} +1 -1
  21. package/dist/assets/{CheckCircle-2038a214.js → CheckCircle-d97414cd.js} +1 -1
  22. package/dist/assets/{Checkbox-45b03733.js → Checkbox-473a339a.js} +1 -1
  23. package/dist/assets/{ChevronRight-8ddf4718.js → ChevronRight-eb75eea3.js} +1 -1
  24. package/dist/assets/{DeleteOutline-4f0bcc3a.js → DeleteOutline-12ff1530.js} +1 -1
  25. package/dist/assets/{DialogContentText-96fc1178.js → DialogContentText-f1e86ae3.js} +1 -1
  26. package/dist/assets/{Done-d51e9c7a.js → Done-6f23572d.js} +1 -1
  27. package/dist/assets/{Download-50806a1f.js → Download-22352748.js} +1 -1
  28. package/dist/assets/{Edit-53a2fa18.js → Edit-1c1e3efe.js} +1 -1
  29. package/dist/assets/{EditIcon-b9ccaf18.js → EditIcon-81647a04.js} +1 -1
  30. package/dist/assets/{ExpandMore-f086ea46.js → ExpandMore-ce9ddbf0.js} +1 -1
  31. package/dist/assets/{FilterList-71e179cd.js → FilterList-e97323cf.js} +1 -1
  32. package/dist/assets/{FormControl-52979d3e.js → FormControl-46ccf35a.js} +1 -1
  33. package/dist/assets/{FormControlLabel-34324067.js → FormControlLabel-d94c2e04.js} +1 -1
  34. package/dist/assets/{FormGroup-1ec81f9b.js → FormGroup-8005f98b.js} +1 -1
  35. package/dist/assets/{Google-e0d11698.js → Google-7be1f523.js} +1 -1
  36. package/dist/assets/{Grid-e5fb7b08.js → Grid-c6f3fcc3.js} +1 -1
  37. package/dist/assets/{Hidden-f172586a.js → Hidden-5b499eec.js} +1 -1
  38. package/dist/assets/{Icon-68e08161.js → Icon-0bd2b0ca.js} +1 -1
  39. package/dist/assets/{InfoOutlined-b9d1b6eb.js → InfoOutlined-23a92a1c.js} +1 -1
  40. package/dist/assets/{InputAdornment-e3fbc66f.js → InputAdornment-6a07705f.js} +1 -1
  41. package/dist/assets/{InputLabel-fd848232.js → InputLabel-f3c63529.js} +1 -1
  42. package/dist/assets/{LastPage-de70da4b.js → LastPage-e29d8778.js} +1 -1
  43. package/dist/assets/{Launch-a211bb94.js → Launch-b146008d.js} +1 -1
  44. package/dist/assets/{LaunchOutlined-3e1a558c.js → LaunchOutlined-137d9da4.js} +1 -1
  45. package/dist/assets/{ListItem-ef31b537.js → ListItem-ec301b3e.js} +1 -1
  46. package/dist/assets/{LockIcon-21517c98.js → LockIcon-377969fd.js} +1 -1
  47. package/dist/assets/{Loop-1bf9ebdb.js → Loop-7ac5d944.js} +1 -1
  48. package/dist/assets/{MoreVert-5c45d951.js → MoreVert-a4054d7e.js} +1 -1
  49. package/dist/assets/{OpenInNew-e6a7cb73.js → OpenInNew-f518aac9.js} +1 -1
  50. package/dist/assets/{PlayArrow-dc0aba19.js → PlayArrow-d754d3ac.js} +1 -1
  51. package/dist/assets/{RadioGroup-778fcd8b.js → RadioGroup-26ee253d.js} +1 -1
  52. package/dist/assets/{Search-08e53aed.js → Search-440c9714.js} +1 -1
  53. package/dist/assets/{Select-10567c8f.js → Select-f21d0b1b.js} +1 -1
  54. package/dist/assets/{ServerLogo-f7dfffe6.js → ServerLogo-32131aa5.js} +1 -1
  55. package/dist/assets/{Slider-cfd9a2e0.js → Slider-4f5fe2e7.js} +1 -1
  56. package/dist/assets/{Stepper-41afc976.js → Stepper-bb36282a.js} +1 -1
  57. package/dist/assets/{Switch-f9a6ef3c.js → Switch-71278ab7.js} +1 -1
  58. package/dist/assets/{TableRow-9770164b.js → TableRow-fa3072ec.js} +2 -2
  59. package/dist/assets/{TextField-acf161e8.js → TextField-6f2fa14b.js} +1 -1
  60. package/dist/assets/{Toolbar-8cc1e552.js → Toolbar-cdd4353f.js} +1 -1
  61. package/dist/assets/{access-control-17f5b11f.js → access-control-01a45233.js} +2 -2
  62. package/dist/assets/{actions-07255a03.js → actions-4e58b8d3.js} +1 -1
  63. package/dist/assets/{add-component-core-4f45c294.js → add-component-core-ea5543b5.js} +1 -1
  64. package/dist/assets/add-resource-c73af430.js +1 -0
  65. package/dist/assets/{addon-256c56a1.js → addon-c523223c.js} +1 -1
  66. package/dist/assets/{analytics-0fb4547c.js → analytics-075d6473.js} +7 -7
  67. package/dist/assets/api-e639d91c.js +1 -0
  68. package/dist/assets/{audit-logs-0e0950d1.js → audit-logs-12e4a5e7.js} +1 -1
  69. package/dist/assets/{button-3e5ea5bb.js → button-c5c6c362.js} +1 -1
  70. package/dist/assets/{click-to-copy-c2e40d6e.js → click-to-copy-ded50bc6.js} +1 -1
  71. package/dist/assets/{complete-38ac9c41.js → complete-df635ada.js} +1 -1
  72. package/dist/assets/{component-c430694e.js → component-5b0d774b.js} +1 -1
  73. package/dist/assets/{config-a6b92e0f.js → config-67593496.js} +2 -2
  74. package/dist/assets/{config-ad1f4eab.js → config-deb45a5e.js} +1 -1
  75. package/dist/assets/{config-navigation-694981e9.js → config-navigation-c8514e59.js} +1 -1
  76. package/dist/assets/confirm-8bc146fe.js +1 -0
  77. package/dist/assets/{confirm-981d6d90.js → confirm-b8cdbafd.js} +1 -1
  78. package/dist/assets/{connect-3b72906e.js → connect-58fa37ed.js} +1 -1
  79. package/dist/assets/{connect-6702310b.js → connect-ce3fc723.js} +1 -1
  80. package/dist/assets/{content-layout-a64f635c.js → content-layout-f3ee0940.js} +1 -1
  81. package/dist/assets/dashboard-0ec4da19.js +83 -0
  82. package/dist/assets/{did-address-46af4fcc.js → did-address-0e2b6641.js} +1 -1
  83. package/dist/assets/{did-utils-b1ac6e12.js → did-utils-74f6279f.js} +1 -1
  84. package/dist/assets/{domain-fa77885c.js → domain-7d4f7d2a.js} +1 -1
  85. package/dist/assets/{domain-list-ce4e1341.js → domain-list-9004a580.js} +1 -1
  86. package/dist/assets/{exchange-passport-5f1b7759.js → exchange-passport-4d800b7b.js} +1 -1
  87. package/dist/assets/{fallback-f5a9b258.js → fallback-88b7f298.js} +1 -1
  88. package/dist/assets/{format-error-a6c70cf4.js → format-error-11161a88.js} +1 -1
  89. package/dist/assets/{fuel-62b90cc8.js → fuel-8813240c.js} +1 -1
  90. package/dist/assets/{home-09bb102a.js → home-d7f35994.js} +1 -1
  91. package/dist/assets/{iframe-555a0ee6.js → iframe-84fa21b6.js} +1 -1
  92. package/dist/assets/{index-0bb7afb0.js → index-001a5c7c.js} +2 -2
  93. package/dist/assets/{index-c01d7dd0.js → index-00b54db5.js} +1 -1
  94. package/dist/assets/index-09f1147b.js +255 -0
  95. package/dist/assets/{index-0f9563c1.js → index-35813c0b.js} +5 -5
  96. package/dist/assets/{index-704183c7.js → index-37bf9a75.js} +1 -1
  97. package/dist/assets/{index-d505a041.js → index-48a30c79.js} +1 -1
  98. package/dist/assets/{index-248cfa5b.js → index-4b53ff61.js} +1 -1
  99. package/dist/assets/{index-37eb53ee.js → index-557761e2.js} +1 -1
  100. package/dist/assets/{index-718ac3c1.js → index-58597e54.js} +1 -1
  101. package/dist/assets/{index-f6d27da4.js → index-6cac18b3.js} +1 -1
  102. package/dist/assets/{index-8a40dbb1.js → index-7360bc79.js} +1 -1
  103. package/dist/assets/{index-b1365dd2.js → index-797814e4.js} +1 -1
  104. package/dist/assets/{index-57667951.js → index-9418ceeb.js} +9 -9
  105. package/dist/assets/{index-6a3599a0.js → index-9afd9407.js} +1 -1
  106. package/dist/assets/{index-8a1d7e7d.js → index-9d0bc105.js} +1 -1
  107. package/dist/assets/{index-cfff963d.js → index-a1638930.js} +1 -1
  108. package/dist/assets/{index-d45f9876.js → index-a60e9fc5.js} +1 -1
  109. package/dist/assets/{index-7cc772e6.js → index-ad31e26f.js} +2 -2
  110. package/dist/assets/{index-92a4f00b.js → index-ada6895c.js} +43 -43
  111. package/dist/assets/{index-81fb3fab.js → index-ba84926f.js} +1 -1
  112. package/dist/assets/{index-55683e86.js → index-bb0b07ca.js} +1 -1
  113. package/dist/assets/{index-d48dd19f.js → index-ceefb1b8.js} +1 -1
  114. package/dist/assets/{index-4098b05b.js → index-d9d4d5ce.js} +2 -2
  115. package/dist/assets/{index-6e35002d.js → index-ef703166.js} +1 -1
  116. package/dist/assets/{index-706d1847.js → index-f0b04b9b.js} +1 -1
  117. package/dist/assets/{index-27d4dfae.js → index-f82a909b.js} +1 -1
  118. package/dist/assets/{index-4fad9218.js → index-f9011958.js} +1 -1
  119. package/dist/assets/{index-a0ceef02.js → index-fb1d9360.js} +1 -1
  120. package/dist/assets/{index.es-7cbc1759.js → index.es-9baa784e.js} +1 -1
  121. package/dist/assets/{index.esm-00dc5fd7.js → index.esm-eb3e0669.js} +1 -1
  122. package/dist/assets/{invite-5c16eb24.js → invite-4b009a3b.js} +1 -1
  123. package/dist/assets/{issue-passport-cde74ff0.js → issue-passport-f277c07c.js} +1 -1
  124. package/dist/assets/{jss-plugin-props-sort.esm-dedb84ec.js → jss-plugin-props-sort.esm-79a02fde.js} +1 -1
  125. package/dist/assets/{launch-result-message-d01197dd.js → launch-result-message-693dc712.js} +1 -1
  126. package/dist/assets/{layout-45809ece.js → layout-3605b826.js} +1 -1
  127. package/dist/assets/{list-header-89cc90d4.js → list-header-78945772.js} +1 -1
  128. package/dist/assets/localization-355ea951.js +1 -0
  129. package/dist/assets/{log-05466db9.js → log-7080613d.js} +1 -1
  130. package/dist/assets/{login-cda3baec.js → login-e09a8493.js} +1 -1
  131. package/dist/assets/{logo-uploader-10082f85.js → logo-uploader-c51d2ac8.js} +2 -2
  132. package/dist/assets/{lost-passport-e5fed8d2.js → lost-passport-8f817009.js} +2 -2
  133. package/dist/assets/{lottie-d4eaf15c.js → lottie-f403307f.js} +1 -1
  134. package/dist/assets/{memoize-one.esm-6e5f1652.js → memoize-one.esm-64cbd71d.js} +1 -1
  135. package/dist/assets/{nav-menu-2f982d2d.js → nav-menu-f61c52d1.js} +1 -1
  136. package/dist/assets/{overview-4933fac6.js → overview-1a495590.js} +1 -1
  137. package/dist/assets/{page-header-10d661e8.js → page-header-40847833.js} +1 -1
  138. package/dist/assets/{permission-e7ccdf54.js → permission-74c7803e.js} +1 -1
  139. package/dist/assets/{preferences-c7a3408c.js → preferences-7b76a387.js} +1 -1
  140. package/dist/assets/publish-resource-f9bf6da8.js +1 -0
  141. package/dist/assets/{react-910d946c.js → react-0b1b0be5.js} +2 -2
  142. package/dist/assets/{selector-21f92ef6.js → selector-36596543.js} +1 -1
  143. package/dist/assets/session-53efab74.js +1 -0
  144. package/dist/assets/{setup-91e9f7fa.js → setup-194e8ca1.js} +2 -2
  145. package/dist/assets/{slicedToArray-bcd8e29d.js → slicedToArray-3ad6df35.js} +2 -2
  146. package/dist/assets/{spaces-63c0fed0.js → spaces-8bb0c420.js} +1 -1
  147. package/dist/assets/{start-332a597b.js → start-e670972b.js} +1 -1
  148. package/dist/assets/{step-actions-c8bb974a.js → step-actions-ba5c6587.js} +1 -1
  149. package/dist/assets/{studio-9444dc92.js → studio-6a54fb67.js} +1 -1
  150. package/dist/assets/{switch-control-29fa5dd7.js → switch-control-09788bb9.js} +1 -1
  151. package/dist/assets/{transfer-59a3344a.js → transfer-79fa0a5c.js} +1 -1
  152. package/dist/assets/{uniqBy-1e1a09e5.js → uniqBy-6495966c.js} +1 -1
  153. package/dist/assets/unsubscribe-aa8c3904.js +1 -0
  154. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-b24f9423.js → use-blocklet-info-for-connect-did-spaces-9898b02e.js} +1 -1
  155. package/dist/assets/{useAsync-7065d988.js → useAsync-18bb1cb2.js} +1 -1
  156. package/dist/assets/{useAsyncRetry-484c5026.js → useAsyncRetry-3bd58705.js} +1 -1
  157. package/dist/assets/{useFormControl-82f55ef3.js → useFormControl-fdf80e00.js} +1 -1
  158. package/dist/assets/{useLocalStorage-2fc05dac.js → useLocalStorage-e1de4607.js} +1 -1
  159. package/dist/assets/{useSetState-b9603539.js → useSetState-3e7bee48.js} +1 -1
  160. package/dist/assets/user-21cb196e.js +22 -0
  161. package/dist/assets/{util-7ae3bd07.js → util-dcf877ab.js} +1 -1
  162. package/dist/assets/{wallet-hidden-topbar-02185498.js → wallet-hidden-topbar-9d12a576.js} +2 -2
  163. package/dist/assets/wrap-locale-d6bb5d75.js +1 -0
  164. package/dist/index.html +1 -1
  165. package/package.json +30 -29
  166. package/dist/assets/add-resource-eba7b322.js +0 -1
  167. package/dist/assets/api-fbaca85c.js +0 -1
  168. package/dist/assets/dashboard-e183cc9b.js +0 -83
  169. package/dist/assets/index-ab8a61e0.js +0 -255
  170. package/dist/assets/localization-ce967c7f.js +0 -1
  171. package/dist/assets/publish-resource-3b965945.js +0 -1
  172. package/dist/assets/session-71a0a77b.js +0 -1
  173. package/dist/assets/user-3bf3a05d.js +0 -22
  174. package/dist/assets/wrap-locale-0579c927.js +0 -1
@@ -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,bb as re,u as se,j as F,aw as ie,_ as ce,M as ae}from"./index-92a4f00b.js";import{L as ue}from"./selector-21f92ef6.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,bb as re,u as se,j as F,aw as ie,_ as ce,M as ae}from"./index-ada6895c.js";import{L as ue}from"./selector-36596543.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-704183c7.js").then(e=>e.i),["assets/index-704183c7.js","assets/index-92a4f00b.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-37bf9a75.js").then(e=>e.i),["assets/index-37bf9a75.js","assets/index-ada6895c.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-ada6895c.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-92a4f00b.js"></script>
17
+ <script type="module" crossorigin src="/.well-known/service/static/assets/index-ada6895c.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.20-beta-e363262e",
6
+ "version": "1.16.20-beta-bb1cd034",
7
7
  "description": "Provide unified services for every blocklet",
8
8
  "main": "api/index.js",
9
9
  "files": [
@@ -32,34 +32,34 @@
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.20-beta-e363262e",
36
- "@abtnode/auth": "1.16.20-beta-e363262e",
37
- "@abtnode/client": "1.16.20-beta-e363262e",
38
- "@abtnode/connect-storage": "1.16.20-beta-e363262e",
39
- "@abtnode/constant": "1.16.20-beta-e363262e",
40
- "@abtnode/core": "1.16.20-beta-e363262e",
41
- "@abtnode/cron": "1.16.20-beta-e363262e",
42
- "@abtnode/logger": "1.16.20-beta-e363262e",
43
- "@abtnode/models": "1.16.20-beta-e363262e",
44
- "@abtnode/router-templates": "1.16.20-beta-e363262e",
45
- "@abtnode/util": "1.16.20-beta-e363262e",
46
- "@arcblock/did": "^1.18.103",
47
- "@arcblock/did-auth": "1.18.103",
48
- "@arcblock/did-ext": "^1.18.103",
49
- "@arcblock/event-hub": "1.18.103",
35
+ "@abtnode/analytics": "1.16.20-beta-bb1cd034",
36
+ "@abtnode/auth": "1.16.20-beta-bb1cd034",
37
+ "@abtnode/client": "1.16.20-beta-bb1cd034",
38
+ "@abtnode/connect-storage": "1.16.20-beta-bb1cd034",
39
+ "@abtnode/constant": "1.16.20-beta-bb1cd034",
40
+ "@abtnode/core": "1.16.20-beta-bb1cd034",
41
+ "@abtnode/cron": "1.16.20-beta-bb1cd034",
42
+ "@abtnode/logger": "1.16.20-beta-bb1cd034",
43
+ "@abtnode/models": "1.16.20-beta-bb1cd034",
44
+ "@abtnode/router-templates": "1.16.20-beta-bb1cd034",
45
+ "@abtnode/util": "1.16.20-beta-bb1cd034",
46
+ "@arcblock/did": "^1.18.105",
47
+ "@arcblock/did-auth": "1.18.105",
48
+ "@arcblock/did-ext": "^1.18.105",
49
+ "@arcblock/event-hub": "1.18.105",
50
50
  "@arcblock/http-proxy": "^1.19.1",
51
- "@arcblock/jwt": "1.18.103",
52
- "@arcblock/validator": "^1.18.103",
53
- "@arcblock/ws": "1.18.103",
54
- "@blocklet/constant": "1.16.20-beta-e363262e",
51
+ "@arcblock/jwt": "1.18.105",
52
+ "@arcblock/validator": "^1.18.105",
53
+ "@arcblock/ws": "1.18.105",
54
+ "@blocklet/constant": "1.16.20-beta-bb1cd034",
55
55
  "@blocklet/form-builder": "^0.1.11",
56
56
  "@blocklet/form-collector": "^0.1.6",
57
- "@blocklet/meta": "1.16.20-beta-e363262e",
58
- "@blocklet/sdk": "1.16.20-beta-e363262e",
57
+ "@blocklet/meta": "1.16.20-beta-bb1cd034",
58
+ "@blocklet/sdk": "1.16.20-beta-bb1cd034",
59
59
  "@did-connect/authenticator": "^2.2.1",
60
60
  "@did-connect/relay-adapter-express": "^2.2.1",
61
- "@ocap/client": "1.18.103",
62
- "@ocap/util": "1.18.103",
61
+ "@ocap/client": "1.18.105",
62
+ "@ocap/util": "1.18.105",
63
63
  "@react-email/components": "^0.0.6",
64
64
  "auth0": "^3.3.0",
65
65
  "body-parser": "^1.20.1",
@@ -94,12 +94,12 @@
94
94
  },
95
95
  "resolutions": {},
96
96
  "devDependencies": {
97
- "@abtnode/ux": "1.16.20-beta-e363262e",
97
+ "@abtnode/ux": "1.16.20-beta-bb1cd034",
98
98
  "@arcblock/did-connect": "^2.8.21",
99
99
  "@arcblock/icons": "^2.8.21",
100
100
  "@arcblock/ux": "^2.8.21",
101
101
  "@blocklet/launcher-layout": "2.2.47",
102
- "@blocklet/tracker": "1.16.20-beta-e363262e",
102
+ "@blocklet/tracker": "1.16.20-beta-bb1cd034",
103
103
  "@blocklet/ui-react": "^2.8.21",
104
104
  "@emotion/react": "^11.10.4",
105
105
  "@emotion/styled": "^11.10.4",
@@ -107,8 +107,8 @@
107
107
  "@mui/icons-material": "^5.14.9",
108
108
  "@mui/material": "^5.14.10",
109
109
  "@mui/styles": "^5.14.10",
110
- "@ocap/mcrypto": "1.18.103",
111
- "@ocap/wallet": "1.18.103",
110
+ "@ocap/mcrypto": "1.18.105",
111
+ "@ocap/wallet": "1.18.105",
112
112
  "@vitejs/plugin-react": "^4.2.1",
113
113
  "ahooks": "^3.7.1",
114
114
  "axios": "^0.27.2",
@@ -119,6 +119,7 @@
119
119
  "flat": "^5.0.2",
120
120
  "jest": "^27.5.1",
121
121
  "js-cookie": "^2.2.1",
122
+ "jwt-decode": "^3.1.2",
122
123
  "mutationobserver-shim": "^0.3.7",
123
124
  "nodemon": "^2.0.20",
124
125
  "npm-run-all": "^4.1.5",
@@ -170,5 +171,5 @@
170
171
  "url": "https://github.com/ArcBlock/blocklet-server/issues",
171
172
  "email": "shijun@arcblock.io"
172
173
  },
173
- "gitHead": "479cea04dd620d8194d6221b2594b6a0f390ba76"
174
+ "gitHead": "b000d880478911fbad7f5b197daf8a9065463ca8"
174
175
  }
@@ -1 +0,0 @@
1
- import{u as E,a6 as x,q as R,bm as j,O as P,r as s,c as S,bJ as D,bl as O,j as c,ak as W}from"./index-92a4f00b.js";import{A as k,S as A}from"./add-component-core-4f45c294.js";import"./uniqBy-1e1a09e5.js";import"./page-header-10d661e8.js";import"./index-8a1d7e7d.js";import"./Hidden-f172586a.js";import"./index-a0ceef02.js";import"./lottie-d4eaf15c.js";import"./launch-result-message-d01197dd.js";import"./index-37eb53ee.js";import"./EditIcon-b9ccaf18.js";import"./Done-d51e9c7a.js";import"./Google-e0d11698.js";import"./TextField-acf161e8.js";import"./FormControl-52979d3e.js";import"./useFormControl-82f55ef3.js";import"./InputLabel-fd848232.js";import"./Select-10567c8f.js";import"./logo-uploader-10082f85.js";import"./index-4fad9218.js";import"./api-fbaca85c.js";import"./jss-plugin-props-sort.esm-dedb84ec.js";import"./toPropertyKey-148bb9ef.js";import"./confirm-981d6d90.js";import"./DialogContentText-96fc1178.js";import"./Alert-16e7636e.js";import"./format-error-a6c70cf4.js";import"./ListItem-ef31b537.js";import"./util-7ae3bd07.js";import"./index-7cc772e6.js";import"./TableRow-9770164b.js";import"./index-81fb3fab.js";import"./session-71a0a77b.js";import"./did-address-46af4fcc.js";import"./Stepper-41afc976.js";import"./ArrowDropDown-78af0e49.js";import"./useLocalStorage-2fc05dac.js";import"./Add-84b6722e.js";import"./Launch-a211bb94.js";import"./DeleteOutline-4f0bcc3a.js";import"./click-to-copy-c2e40d6e.js";import"./fallback-f5a9b258.js";import"./index-c01d7dd0.js";import"./Search-08e53aed.js";import"./Grid-e5fb7b08.js";import"./InputAdornment-e3fbc66f.js";import"./preact.module-c0a7ffab.js";import"./content-layout-a64f635c.js";import"./use-blocklet-info-for-connect-did-spaces-b24f9423.js";import"./spaces-63c0fed0.js";import"./index-d505a041.js";import"./index-55683e86.js";import"./ExpandMore-f086ea46.js";import"./ButtonGroup-d60b4115.js";function Bt(){var n;const{t:l}=E(),{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 b=S(o,"/api/store.json"),{data:y}=await D.get(b);return{url:o,name:y.name}}));g(t||[])}catch(t){console.error(t)}})()},[i.join(",")]);const C=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:d},"*")};s.useEffect(()=>{const t=O();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(W,{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{Bt as default};
@@ -1 +0,0 @@
1
- import{bJ as a}from"./index-92a4f00b.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};