@dcl/builder-site 7.21.1 → 7.21.2-19872797940.commit-aecff8d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{Back-BatsJM74.js → Back-DF3b8Vad.js} +1 -1
- package/assets/{CollectionProvider.container-mRRv3epy.js → CollectionProvider.container-DpmjXEm_.js} +1 -1
- package/assets/{CollectionStatus.container-HcpHwL8h.js → CollectionStatus.container-CidmUG47.js} +1 -1
- package/assets/{ConfirmDelete-BXf4aiA9.js → ConfirmDelete-ByyhO6oc.js} +1 -1
- package/assets/{FileSaver.min-DsamWCG-.js → FileSaver.min-DQSptuuk.js} +1 -1
- package/assets/{ItemProvider.container-CUtJwrIb.js → ItemProvider.container-cnm5in2H.js} +2 -2
- package/assets/{JumpIn.container-CzwWCVKa.js → JumpIn.container-CV_AsN5Z.js} +1 -1
- package/assets/{LandAction-CacaHg5z.js → LandAction-BctvH2Pa.js} +1 -1
- package/assets/{LandProviderPage-qJFb-CA8.js → LandProviderPage-DrBlvQUp.js} +1 -1
- package/assets/{LoggedInDetailPage.container-W6mC_E_U.js → LoggedInDetailPage.container-D3flN0sg.js} +1 -1
- package/assets/{Navigation-CdApA62x.css → Navigation-Ba0Kbzvi.css} +1 -1
- package/assets/{Navigation.container-CeHK8swJ.js → Navigation.container-C6riyJpf.js} +1 -1
- package/assets/{NotFound-CJstsdBm.js → NotFound-Dbnnn04F.js} +1 -1
- package/assets/{OptionsDropdown-DT7iLx0n.js → OptionsDropdown-RXZhPLTa.js} +1 -1
- package/assets/{RentalPeriod-B9mJkX4C.js → RentalPeriod-B5vBeGOG.js} +1 -1
- package/assets/{SDKTag-Dpbl1OiU.js → SDKTag-BLK-Xuk4.js} +1 -1
- package/assets/{SceneStats.container-D1YBbPRP.js → SceneStats.container-CI13yvwk.js} +1 -1
- package/assets/{SignInRequired-DIzGXfdC.js → SignInRequired-B9AD3g_2.js} +1 -1
- package/assets/{ThirdPartyKindBadge-BfPzYS5A.js → ThirdPartyKindBadge-QN4f9D_z.js} +1 -1
- package/assets/{dataReader-DlVt7d8j.js → dataReader-DbgdPizy.js} +1 -1
- package/assets/{date-BdDGdZWF.js → date-CKtzySAJ.js} +1 -1
- package/assets/{fortmatic-C5Ts9jfI.js → fortmatic-BYKZ9RP8.js} +1 -1
- package/assets/{hooks-DyfSYu7v.js → hooks-sFzfMYjS.js} +1 -1
- package/assets/{index-BwM4blln.js → index-0uLTCJGa.js} +1 -1
- package/assets/{index-CqEav8hD.js → index-4YYgi5nn.js} +24 -24
- package/assets/{index-C85ZuPPq.js → index-8HUkmr4Z.js} +1 -1
- package/assets/{index-D6eDApSM.js → index-9-J3xQhU.js} +1 -1
- package/assets/{index-Lzi9umx8.js → index-97fGaEg3.js} +1 -1
- package/assets/{index-DIiPUe5B.js → index-B-IA_SkQ.js} +1 -1
- package/assets/{index-9EPW7kAK.js → index-B6jx0HWs.js} +1 -1
- package/assets/{index-Ch_zl-Qe.js → index-B8JKPZl3.js} +1 -1
- package/assets/index-B9-mOGVz.css +1 -0
- package/assets/{index-DUYELuRs.js → index-BMbodJ2i.js} +1 -1
- package/assets/{index-DficGM44.js → index-BSANwm0a.js} +1 -1
- package/assets/{index-CrB7EBH0.js → index-BVqSEpJF.js} +1 -1
- package/assets/{index-C0sCCYg0.js → index-BWAbdhN9.js} +1 -1
- package/assets/{index-Bc8fZ9Np.js → index-BY0mjzwy.js} +1 -1
- package/assets/index-BYI_z2NB.css +1 -0
- package/assets/{index-BvPRL3We.js → index-BZCZ7vU4.js} +1 -1
- package/assets/index-BgNbEary.js +1 -0
- package/assets/{index-CWfAvL_u.js → index-BmDbN7U2.js} +1 -1
- package/assets/index-BmWiBSix.js +1 -0
- package/assets/{index-BTKgUj7s.js → index-Bvk6rHT1.js} +1 -1
- package/assets/{index-D0r_FMqf.js → index-CB4QmsI_.js} +1 -1
- package/assets/{index-fZlCDHvi.js → index-CFXvHGOP.js} +1 -1
- package/assets/index-COr3oQDB.css +1 -0
- package/assets/{index-T9kOhyI5.js → index-CaW87E3q.js} +1 -1
- package/assets/{index-Dlj_6tFt.js → index-Cb9gq47R.js} +1 -1
- package/assets/{index-BP19ZcQC.js → index-ChpncsGD.js} +1 -1
- package/assets/{index-exc9aBpQ.js → index-CpHAc1Pr.js} +1 -1
- package/assets/{index-DlIHFbxT.js → index-CuFr2HIB.js} +1 -1
- package/assets/{index-DHsKsX7F.css → index-CujKAe14.css} +1 -1
- package/assets/{index-Dthhrxcq.js → index-D3HfYL__.js} +1 -1
- package/assets/{index-DPYzdtt_.js → index-DLAuXrz5.js} +1 -1
- package/assets/{index-CueXA-Fp.css → index-DQg98s1f.css} +7 -7
- package/assets/{index-D2UToyQT.js → index-DcE7yAs8.js} +1 -1
- package/assets/{index-XAiSvSIh.js → index-DcIMry35.js} +1 -1
- package/assets/{index-CeOzwCJB.js → index-DcNMC_Qm.js} +1 -1
- package/assets/{index-C6sARuDY.js → index-DdeT8oUt.js} +1 -1
- package/assets/{index-C8JfRDAs.js → index-DxEx1xsg.js} +1 -1
- package/assets/{index-CxV8D1ZN.js → index-FxUS8buh.js} +1 -1
- package/assets/index-J9acyXAZ.css +1 -0
- package/assets/index-PntaTlcT.js +1 -0
- package/assets/{index-DLkvb7lP.js → index-R3obG38P.js} +1 -1
- package/assets/{index-3tJmv3W6.css → index-TBQcHv5_.css} +1 -1
- package/assets/{index-x-7cA0Zl.js → index-UcKx2WKJ.js} +1 -1
- package/assets/{index-DU6zRcev.js → index-cDl2RuQQ.js} +1 -1
- package/assets/{index-B6xO-Chg.js → index-cFaKSAsY.js} +1 -1
- package/assets/{index-Dd1RTxor.js → index-dw4pQbGk.js} +1 -1
- package/assets/{index-CpEvAisz.js → index-mFqk1zCo.js} +1 -1
- package/assets/index-oNwcy3Qd.js +2 -0
- package/assets/{index-C4Sv97p9.js → index-rZnp_MgI.js} +1 -1
- package/assets/{index.es-BochCDfB.js → index.es--fsWc2TS.js} +4 -4
- package/assets/{selectors-iAfkvT41.js → selectors-Bdn7uSD3.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-144_BVbl.js +0 -1
- package/assets/index-CoxOLdTh.css +0 -1
- package/assets/index-DfwSJCf0.js +0 -1
- package/assets/index-DrciQCjA.js +0 -2
- package/assets/index-Y3-osRBu.css +0 -1
- package/assets/index-geGNToU6.css +0 -1
- package/assets/index-kwZkCZlH.css +0 -1
- package/assets/index-rBpwxYxh.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b1 as ye,ak as te,a4 as ae,N as e,c$ as z,M as a,T as Re,d0 as me,a7 as ne,d1 as G,S as s,d2 as Y,d3 as Pe,d4 as M,cN as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d5 as We,d6 as pe,d7 as Oe,bq as L,d8 as Ue,cT as xe,d9 as se,da as Ce,db as je,dc as de,dd as ue,de as K,df as Q,P as be,a5 as he,cP as Be,dg as Me,dh as Ie,cQ as He,di as $e,cc as Fe,dj as ze,ac as Ke,aj as Qe,dk as Ge,dl as Ye,cU as Ve,a2 as X,dm as qe,cV as Je,cW as Xe,cd as Ze,dn as es}from"./index-CqEav8hD.js";import{a as we,N as ss}from"./Navigation.container-CeHK8swJ.js";import{L as ts}from"./LoggedInDetailPage.container-W6mC_E_U.js";import"./selectors-iAfkvT41.js";import"./SignInRequired-DIzGXfdC.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),n=new URLSearchParams(t.search),d=n.get(Ne),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ee(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(ns),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",S={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(S.container,d),children:[e.jsx("span",{className:S.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:S.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:S.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:S.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:S.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:S.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Te({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Se({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:a("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),E=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>a(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:a("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ts=le.get("ENS_DOMAINS_URL",""),Ss=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),D=ae();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ss}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ts,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(c,u)||!j)return"-";const T=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return G(Y(Number(T)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:a("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((T,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:T.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:c,ens:T})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:c,ens:T,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(T,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(T)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,T.subdomain),children:a("worlds_list_page.table.permissions")})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>n.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[n,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():$()}),[d,$,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:a("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),y=_(Ye),R=_(me),I=_(Ve),P=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),D=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
1
|
+
import{b1 as ye,ak as te,a4 as ae,N as e,c$ as z,M as a,T as Re,d0 as me,a7 as ne,d1 as G,S as s,d2 as Y,d3 as Pe,d4 as M,cN as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d5 as We,d6 as pe,d7 as Oe,bq as L,d8 as Ue,cT as xe,d9 as se,da as Ce,db as je,dc as de,dd as ue,de as K,df as Q,P as be,a5 as he,cP as Be,dg as Me,dh as Ie,cQ as He,di as $e,cc as Fe,dj as ze,ac as Ke,aj as Qe,dk as Ge,dl as Ye,cU as Ve,a2 as X,dm as qe,cV as Je,cW as Xe,cd as Ze,dn as es}from"./index-4YYgi5nn.js";import{a as we,N as ss}from"./Navigation.container-C6riyJpf.js";import{L as ts}from"./LoggedInDetailPage.container-D3flN0sg.js";import"./selectors-Bdn7uSD3.js";import"./SignInRequired-B9AD3g_2.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),n=new URLSearchParams(t.search),d=n.get(Ne),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ee(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(ns),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",S={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(S.container,d),children:[e.jsx("span",{className:S.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:S.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:S.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:S.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:S.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:S.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Te({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Se({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:a("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),E=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>a(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:a("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ts=le.get("ENS_DOMAINS_URL",""),Ss=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),D=ae();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ss}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ts,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(c,u)||!j)return"-";const T=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return G(Y(Number(T)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:a("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((T,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:T.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:c,ens:T})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:c,ens:T,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(T,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(T)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,T.subdomain),children:a("worlds_list_page.table.permissions")})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>n.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[n,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():$()}),[d,$,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:a("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),y=_(Ye),R=_(me),I=_(Ve),P=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),D=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as Wr,$ as qr,B as Kr,m as Vr,q as Xr,J as Ye}from"./index-T9kOhyI5.js";import{g as st,R as lt,T as dt,k as vt,E as ht,a as yt,V as pt,s as mt,I as bt,b as gt,c as _t,N as wt,f as It,d as Et,v as St,_ as Ot,e as jt,h as Nt,O as At,y as Bt,A as kt,i as xt,W as Dt,p as Rt,U as Ct,L as Lt,u as Mt,x as Tt}from"./index-T9kOhyI5.js";import"./index-CqEav8hD.js";var se={},Yr=Object.create,Qe=Object.defineProperty,Jr=Object.getOwnPropertyDescriptor,Qr=Object.getOwnPropertyNames,Zr=Object.getPrototypeOf,Hr=Object.prototype.hasOwnProperty,pe=(_=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(_,{get:(O,m)=>(typeof require<"u"?require:O)[m]}):_)(function(_){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+_+'" is not supported')}),Ze=(_,O)=>()=>(O||_((O={exports:{}}).exports,O),O.exports),Gr=(_,O,m,x)=>{if(O&&typeof O=="object"||typeof O=="function")for(let q of Qr(O))!Hr.call(_,q)&&q!==m&&Qe(_,q,{get:()=>O[q],enumerable:!(x=Jr(O,q))||x.enumerable});return _},He=(_,O,m)=>(m=_!=null?Yr(Zr(_)):{},Gr(!_||!_.__esModule?Qe(m,"default",{value:_,enumerable:!0}):m,_)),me=(_,O,m)=>new Promise((x,q)=>{var C=D=>{try{j(m.next(D))}catch(L){q(L)}},P=D=>{try{j(m.throw(D))}catch(L){q(L)}},j=D=>D.done?x(D.value):Promise.resolve(D.value).then(C,P);j((m=m.apply(_,O)).next())}),$r=Ze((_,O)=>{(function(m){if(typeof _=="object"&&typeof O<"u")O.exports=m();else if(typeof define=="function"&&define.amd)define([],m);else{var x;typeof window<"u"?x=window:typeof se<"u"?x=se:typeof self<"u"?x=self:x=this,x.localforage=m()}})(function(){return function m(x,q,C){function P(L,Y){if(!q[L]){if(!x[L]){var y=typeof pe=="function"&&pe;if(!Y&&y)return y(L,!0);if(j)return j(L,!0);var w=new Error("Cannot find module '"+L+"'");throw w.code="MODULE_NOT_FOUND",w}var z=q[L]={exports:{}};x[L][0].call(z.exports,function(F){var Z=x[L][1][F];return P(Z||F)},z,z.exports,m,x,q,C)}return q[L].exports}for(var j=typeof pe=="function"&&pe,D=0;D<C.length;D++)P(C[D]);return P}({1:[function(m,x,q){(function(C){var P=C.MutationObserver||C.WebKitMutationObserver,j;if(P){var D=0,L=new P(F),Y=C.document.createTextNode("");L.observe(Y,{characterData:!0}),j=function(){Y.data=D=++D%2}}else if(!C.setImmediate&&typeof C.MessageChannel<"u"){var y=new C.MessageChannel;y.port1.onmessage=F,j=function(){y.port2.postMessage(0)}}else"document"in C&&"onreadystatechange"in C.document.createElement("script")?j=function(){var A=C.document.createElement("script");A.onreadystatechange=function(){F(),A.onreadystatechange=null,A.parentNode.removeChild(A),A=null},C.document.documentElement.appendChild(A)}:j=function(){setTimeout(F,0)};var w,z=[];function F(){w=!0;for(var A,G,U=z.length;U;){for(G=z,z=[],A=-1;++A<U;)G[A]();U=z.length}w=!1}x.exports=Z;function Z(A){z.push(A)===1&&!w&&j()}}).call(this,typeof se<"u"?se:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(m,x,q){var C=m(1);function P(){}var j={},D=["REJECTED"],L=["FULFILLED"],Y=["PENDING"];x.exports=y;function y(v){if(typeof v!="function")throw new TypeError("resolver must be a function");this.state=Y,this.queue=[],this.outcome=void 0,v!==P&&Z(this,v)}y.prototype.catch=function(v){return this.then(null,v)},y.prototype.then=function(v,N){if(typeof v!="function"&&this.state===L||typeof N!="function"&&this.state===D)return this;var E=new this.constructor(P);if(this.state!==Y){var B=this.state===L?v:N;z(E,B,this.outcome)}else this.queue.push(new w(E,v,N));return E};function w(v,N,E){this.promise=v,typeof N=="function"&&(this.onFulfilled=N,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}w.prototype.callFulfilled=function(v){j.resolve(this.promise,v)},w.prototype.otherCallFulfilled=function(v){z(this.promise,this.onFulfilled,v)},w.prototype.callRejected=function(v){j.reject(this.promise,v)},w.prototype.otherCallRejected=function(v){z(this.promise,this.onRejected,v)};function z(v,N,E){C(function(){var B;try{B=N(E)}catch(K){return j.reject(v,K)}B===v?j.reject(v,new TypeError("Cannot resolve promise with itself")):j.resolve(v,B)})}j.resolve=function(v,N){var E=A(F,N);if(E.status==="error")return j.reject(v,E.value);var B=E.value;if(B)Z(v,B);else{v.state=L,v.outcome=N;for(var K=-1,X=v.queue.length;++K<X;)v.queue[K].callFulfilled(N)}return v},j.reject=function(v,N){v.state=D,v.outcome=N;for(var E=-1,B=v.queue.length;++E<B;)v.queue[E].callRejected(N);return v};function F(v){var N=v&&v.then;if(v&&(typeof v=="object"||typeof v=="function")&&typeof N=="function")return function(){N.apply(v,arguments)}}function Z(v,N){var E=!1;function B(Q){E||(E=!0,j.reject(v,Q))}function K(Q){E||(E=!0,j.resolve(v,Q))}function X(){N(K,B)}var J=A(X);J.status==="error"&&B(J.value)}function A(v,N){var E={};try{E.value=v(N),E.status="success"}catch(B){E.status="error",E.value=B}return E}y.resolve=G;function G(v){return v instanceof this?v:j.resolve(new this(P),v)}y.reject=U;function U(v){var N=new this(P);return j.reject(N,v)}y.all=oe;function oe(v){var N=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=v.length,B=!1;if(!E)return this.resolve([]);for(var K=new Array(E),X=0,J=-1,Q=new this(P);++J<E;)$(v[J],J);return Q;function $(ie,ue){N.resolve(ie).then(le,function(re){B||(B=!0,j.reject(Q,re))});function le(re){K[ue]=re,++X===E&&!B&&(B=!0,j.resolve(Q,K))}}}y.race=ee;function ee(v){var N=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=v.length,B=!1;if(!E)return this.resolve([]);for(var K=-1,X=new this(P);++K<E;)J(v[K]);return X;function J(Q){N.resolve(Q).then(function($){B||(B=!0,j.resolve(X,$))},function($){B||(B=!0,j.reject(X,$))})}}},{1:1}],3:[function(m,x,q){(function(C){typeof C.Promise!="function"&&(C.Promise=m(2))}).call(this,typeof se<"u"?se:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(m,x,q){var C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function P(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function j(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var D=j();function L(){try{if(!D||!D.open)return!1;var e=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),r=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!e||r)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function Y(e,r){e=e||[],r=r||{};try{return new Blob(e,r)}catch(i){if(i.name!=="TypeError")throw i;for(var t=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,o=new t,n=0;n<e.length;n+=1)o.append(e[n]);return o.getBlob(r.type)}}typeof Promise>"u"&&m(3);var y=Promise;function w(e,r){r&&e.then(function(t){r(null,t)},function(t){r(t)})}function z(e,r,t){typeof r=="function"&&e.then(r),typeof t=="function"&&e.catch(t)}function F(e){return typeof e!="string"&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function Z(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var A="local-forage-detect-blob-support",G=void 0,U={},oe=Object.prototype.toString,ee="readonly",v="readwrite";function N(e){for(var r=e.length,t=new ArrayBuffer(r),o=new Uint8Array(t),n=0;n<r;n++)o[n]=e.charCodeAt(n);return t}function E(e){return new y(function(r){var t=e.transaction(A,v),o=Y([""]);t.objectStore(A).put(o,"key"),t.onabort=function(n){n.preventDefault(),n.stopPropagation(),r(!1)},t.oncomplete=function(){var n=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);r(i||!n||parseInt(n[1],10)>=43)}}).catch(function(){return!1})}function B(e){return typeof G=="boolean"?y.resolve(G):E(e).then(function(r){return G=r,G})}function K(e){var r=U[e.name],t={};t.promise=new y(function(o,n){t.resolve=o,t.reject=n}),r.deferredOperations.push(t),r.dbReady?r.dbReady=r.dbReady.then(function(){return t.promise}):r.dbReady=t.promise}function X(e){var r=U[e.name],t=r.deferredOperations.pop();if(t)return t.resolve(),t.promise}function J(e,r){var t=U[e.name],o=t.deferredOperations.pop();if(o)return o.reject(r),o.promise}function Q(e,r){return new y(function(t,o){if(U[e.name]=U[e.name]||g(),e.db)if(r)K(e),e.db.close();else return t(e.db);var n=[e.name];r&&n.push(e.version);var i=D.open.apply(D,n);r&&(i.onupgradeneeded=function(u){var c=i.result;try{c.createObjectStore(e.storeName),u.oldVersion<=1&&c.createObjectStore(A)}catch(d){if(d.name==="ConstraintError")console.warn('The database "'+e.name+'" has been upgraded from version '+u.oldVersion+" to version "+u.newVersion+', but the storage "'+e.storeName+'" already exists.');else throw d}}),i.onerror=function(u){u.preventDefault(),o(i.error)},i.onsuccess=function(){var u=i.result;u.onversionchange=function(c){c.target.close()},t(u),X(e)}})}function $(e){return Q(e,!1)}function ie(e){return Q(e,!0)}function ue(e,r){if(!e.db)return!0;var t=!e.db.objectStoreNames.contains(e.storeName),o=e.version<e.db.version,n=e.version>e.db.version;if(o&&(e.version!==r&&console.warn('The database "'+e.name+`" can't be downgraded from version `+e.db.version+" to version "+e.version+"."),e.version=e.db.version),n||t){if(t){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function le(e){return new y(function(r,t){var o=new FileReader;o.onerror=t,o.onloadend=function(n){var i=btoa(n.target.result||"");r({__local_forage_encoded_blob:!0,data:i,type:e.type})},o.readAsBinaryString(e)})}function re(e){var r=N(atob(e.data));return Y([r],{type:e.type})}function a(e){return e&&e.__local_forage_encoded_blob}function f(e){var r=this,t=r._initReady().then(function(){var o=U[r._dbInfo.name];if(o&&o.dbReady)return o.dbReady});return z(t,e,e),t}function h(e){K(e);for(var r=U[e.name],t=r.forages,o=0;o<t.length;o++){var n=t[o];n._dbInfo.db&&(n._dbInfo.db.close(),n._dbInfo.db=null)}return e.db=null,$(e).then(function(i){return e.db=i,ue(e)?ie(e):i}).then(function(i){e.db=r.db=i;for(var u=0;u<t.length;u++)t[u]._dbInfo.db=i}).catch(function(i){throw J(e,i),i})}function p(e,r,t,o){o===void 0&&(o=1);try{var n=e.db.transaction(e.storeName,r);t(null,n)}catch(i){if(o>0&&(!e.db||i.name==="InvalidStateError"||i.name==="NotFoundError"))return y.resolve().then(function(){if(!e.db||i.name==="NotFoundError"&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),ie(e)}).then(function(){return h(e).then(function(){p(e,r,t,o-1)})}).catch(t);t(i)}}function g(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function I(e){var r=this,t={db:null};if(e)for(var o in e)t[o]=e[o];var n=U[t.name];n||(n=g(),U[t.name]=n),n.forages.push(r),r._initReady||(r._initReady=r.ready,r.ready=f);var i=[];function u(){return y.resolve()}for(var c=0;c<n.forages.length;c++){var d=n.forages[c];d!==r&&i.push(d._initReady().catch(u))}var l=n.forages.slice(0);return y.all(i).then(function(){return t.db=n.db,$(t)}).then(function(s){return t.db=s,ue(t,r._defaultConfig.version)?ie(t):s}).then(function(s){t.db=n.db=s,r._dbInfo=t;for(var b=0;b<l.length;b++){var S=l[b];S!==r&&(S._dbInfo.db=t.db,S._dbInfo.version=t.version)}})}function M(e,r){var t=this;e=F(e);var o=new y(function(n,i){t.ready().then(function(){p(t._dbInfo,ee,function(u,c){if(u)return i(u);try{var d=c.objectStore(t._dbInfo.storeName),l=d.get(e);l.onsuccess=function(){var s=l.result;s===void 0&&(s=null),a(s)&&(s=re(s)),n(s)},l.onerror=function(){i(l.error)}}catch(s){i(s)}})}).catch(i)});return w(o,r),o}function V(e,r){var t=this,o=new y(function(n,i){t.ready().then(function(){p(t._dbInfo,ee,function(u,c){if(u)return i(u);try{var d=c.objectStore(t._dbInfo.storeName),l=d.openCursor(),s=1;l.onsuccess=function(){var b=l.result;if(b){var S=b.value;a(S)&&(S=re(S));var R=e(S,b.key,s++);R!==void 0?n(R):b.continue()}else n()},l.onerror=function(){i(l.error)}}catch(b){i(b)}})}).catch(i)});return w(o,r),o}function ce(e,r,t){var o=this;e=F(e);var n=new y(function(i,u){var c;o.ready().then(function(){return c=o._dbInfo,oe.call(r)==="[object Blob]"?B(c.db).then(function(d){return d?r:le(r)}):r}).then(function(d){p(o._dbInfo,v,function(l,s){if(l)return u(l);try{var b=s.objectStore(o._dbInfo.storeName);d===null&&(d=void 0);var S=b.put(d,e);s.oncomplete=function(){d===void 0&&(d=null),i(d)},s.onabort=s.onerror=function(){var R=S.error?S.error:S.transaction.error;u(R)}}catch(R){u(R)}})}).catch(u)});return w(n,t),n}function ae(e,r){var t=this;e=F(e);var o=new y(function(n,i){t.ready().then(function(){p(t._dbInfo,v,function(u,c){if(u)return i(u);try{var d=c.objectStore(t._dbInfo.storeName),l=d.delete(e);c.oncomplete=function(){n()},c.onerror=function(){i(l.error)},c.onabort=function(){var s=l.error?l.error:l.transaction.error;i(s)}}catch(s){i(s)}})}).catch(i)});return w(o,r),o}function de(e){var r=this,t=new y(function(o,n){r.ready().then(function(){p(r._dbInfo,v,function(i,u){if(i)return n(i);try{var c=u.objectStore(r._dbInfo.storeName),d=c.clear();u.oncomplete=function(){o()},u.onabort=u.onerror=function(){var l=d.error?d.error:d.transaction.error;n(l)}}catch(l){n(l)}})}).catch(n)});return w(t,e),t}function Ge(e){var r=this,t=new y(function(o,n){r.ready().then(function(){p(r._dbInfo,ee,function(i,u){if(i)return n(i);try{var c=u.objectStore(r._dbInfo.storeName),d=c.count();d.onsuccess=function(){o(d.result)},d.onerror=function(){n(d.error)}}catch(l){n(l)}})}).catch(n)});return w(t,e),t}function $e(e,r){var t=this,o=new y(function(n,i){if(e<0){n(null);return}t.ready().then(function(){p(t._dbInfo,ee,function(u,c){if(u)return i(u);try{var d=c.objectStore(t._dbInfo.storeName),l=!1,s=d.openKeyCursor();s.onsuccess=function(){var b=s.result;if(!b){n(null);return}e===0||l?n(b.key):(l=!0,b.advance(e))},s.onerror=function(){i(s.error)}}catch(b){i(b)}})}).catch(i)});return w(o,r),o}function er(e){var r=this,t=new y(function(o,n){r.ready().then(function(){p(r._dbInfo,ee,function(i,u){if(i)return n(i);try{var c=u.objectStore(r._dbInfo.storeName),d=c.openKeyCursor(),l=[];d.onsuccess=function(){var s=d.result;if(!s){o(l);return}l.push(s.key),s.continue()},d.onerror=function(){n(d.error)}}catch(s){n(s)}})}).catch(n)});return w(t,e),t}function rr(e,r){r=Z.apply(this,arguments);var t=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var o=this,n;if(!e.name)n=y.reject("Invalid arguments");else{var i=e.name===t.name&&o._dbInfo.db,u=i?y.resolve(o._dbInfo.db):$(e).then(function(c){var d=U[e.name],l=d.forages;d.db=c;for(var s=0;s<l.length;s++)l[s]._dbInfo.db=c;return c});e.storeName?n=u.then(function(c){if(c.objectStoreNames.contains(e.storeName)){var d=c.version+1;K(e);var l=U[e.name],s=l.forages;c.close();for(var b=0;b<s.length;b++){var S=s[b];S._dbInfo.db=null,S._dbInfo.version=d}var R=new y(function(k,W){var T=D.open(e.name,d);T.onerror=function(H){var Oe=T.result;Oe.close(),W(H)},T.onupgradeneeded=function(){var H=T.result;H.deleteObjectStore(e.storeName)},T.onsuccess=function(){var H=T.result;H.close(),k(H)}});return R.then(function(k){l.db=k;for(var W=0;W<s.length;W++){var T=s[W];T._dbInfo.db=k,X(T._dbInfo)}}).catch(function(k){throw(J(e,k)||y.resolve()).catch(function(){}),k})}}):n=u.then(function(c){K(e);var d=U[e.name],l=d.forages;c.close();for(var s=0;s<l.length;s++){var b=l[s];b._dbInfo.db=null}var S=new y(function(R,k){var W=D.deleteDatabase(e.name);W.onerror=function(){var T=W.result;T&&T.close(),k(W.error)},W.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},W.onsuccess=function(){var T=W.result;T&&T.close(),R(T)}});return S.then(function(R){d.db=R;for(var k=0;k<l.length;k++){var W=l[k];X(W._dbInfo)}}).catch(function(R){throw(J(e,R)||y.resolve()).catch(function(){}),R})})}return w(n,r),n}var tr={_driver:"asyncStorage",_initStorage:I,_support:L(),iterate:V,getItem:M,setItem:ce,removeItem:ae,clear:de,length:Ge,key:$e,keys:er,dropInstance:rr};function nr(){return typeof openDatabase=="function"}var te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",or="~~local_forage_type~",Ae=/^~~local_forage_type~([^~]+)~/,he="__lfsc__:",be=he.length,ge="arbf",_e="blob",Be="si08",ke="ui08",xe="uic8",De="si16",Re="si32",Ce="ur16",Le="ui32",Me="fl32",Te="fl64",ze=be+ge.length,Fe=Object.prototype.toString;function Pe(e){var r=e.length*.75,t=e.length,o,n=0,i,u,c,d;e[e.length-1]==="="&&(r--,e[e.length-2]==="="&&r--);var l=new ArrayBuffer(r),s=new Uint8Array(l);for(o=0;o<t;o+=4)i=te.indexOf(e[o]),u=te.indexOf(e[o+1]),c=te.indexOf(e[o+2]),d=te.indexOf(e[o+3]),s[n++]=i<<2|u>>4,s[n++]=(u&15)<<4|c>>2,s[n++]=(c&3)<<6|d&63;return l}function we(e){var r=new Uint8Array(e),t="",o;for(o=0;o<r.length;o+=3)t+=te[r[o]>>2],t+=te[(r[o]&3)<<4|r[o+1]>>4],t+=te[(r[o+1]&15)<<2|r[o+2]>>6],t+=te[r[o+2]&63];return r.length%3===2?t=t.substring(0,t.length-1)+"=":r.length%3===1&&(t=t.substring(0,t.length-2)+"=="),t}function ir(e,r){var t="";if(e&&(t=Fe.call(e)),e&&(t==="[object ArrayBuffer]"||e.buffer&&Fe.call(e.buffer)==="[object ArrayBuffer]")){var o,n=he;e instanceof ArrayBuffer?(o=e,n+=ge):(o=e.buffer,t==="[object Int8Array]"?n+=Be:t==="[object Uint8Array]"?n+=ke:t==="[object Uint8ClampedArray]"?n+=xe:t==="[object Int16Array]"?n+=De:t==="[object Uint16Array]"?n+=Ce:t==="[object Int32Array]"?n+=Re:t==="[object Uint32Array]"?n+=Le:t==="[object Float32Array]"?n+=Me:t==="[object Float64Array]"?n+=Te:r(new Error("Failed to get type for BinaryArray"))),r(n+we(o))}else if(t==="[object Blob]"){var i=new FileReader;i.onload=function(){var u=or+e.type+"~"+we(this.result);r(he+_e+u)},i.readAsArrayBuffer(e)}else try{r(JSON.stringify(e))}catch(u){console.error("Couldn't convert value into a JSON string: ",e),r(null,u)}}function ar(e){if(e.substring(0,be)!==he)return JSON.parse(e);var r=e.substring(ze),t=e.substring(be,ze),o;if(t===_e&&Ae.test(r)){var n=r.match(Ae);o=n[1],r=r.substring(n[0].length)}var i=Pe(r);switch(t){case ge:return i;case _e:return Y([i],{type:o});case Be:return new Int8Array(i);case ke:return new Uint8Array(i);case xe:return new Uint8ClampedArray(i);case De:return new Int16Array(i);case Ce:return new Uint16Array(i);case Re:return new Int32Array(i);case Le:return new Uint32Array(i);case Me:return new Float32Array(i);case Te:return new Float64Array(i);default:throw new Error("Unkown type: "+t)}}var Ie={serialize:ir,deserialize:ar,stringToBuffer:Pe,bufferToString:we};function Ue(e,r,t,o){e.executeSql("CREATE TABLE IF NOT EXISTS "+r.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],t,o)}function ur(e){var r=this,t={db:null};if(e)for(var o in e)t[o]=typeof e[o]!="string"?e[o].toString():e[o];var n=new y(function(i,u){try{t.db=openDatabase(t.name,String(t.version),t.description,t.size)}catch(c){return u(c)}t.db.transaction(function(c){Ue(c,t,function(){r._dbInfo=t,i()},function(d,l){u(l)})},u)});return t.serializer=Ie,n}function ne(e,r,t,o,n,i){e.executeSql(t,o,n,function(u,c){c.code===c.SYNTAX_ERR?u.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[r.storeName],function(d,l){l.rows.length?i(d,c):Ue(d,r,function(){d.executeSql(t,o,n,i)},i)},i):i(u,c)},i)}function cr(e,r){var t=this;e=F(e);var o=new y(function(n,i){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(c){ne(c,u,"SELECT * FROM "+u.storeName+" WHERE key = ? LIMIT 1",[e],function(d,l){var s=l.rows.length?l.rows.item(0).value:null;s&&(s=u.serializer.deserialize(s)),n(s)},function(d,l){i(l)})})}).catch(i)});return w(o,r),o}function fr(e,r){var t=this,o=new y(function(n,i){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(c){ne(c,u,"SELECT * FROM "+u.storeName,[],function(d,l){for(var s=l.rows,b=s.length,S=0;S<b;S++){var R=s.item(S),k=R.value;if(k&&(k=u.serializer.deserialize(k)),k=e(k,R.key,S+1),k!==void 0){n(k);return}}n()},function(d,l){i(l)})})}).catch(i)});return w(o,r),o}function We(e,r,t,o){var n=this;e=F(e);var i=new y(function(u,c){n.ready().then(function(){r===void 0&&(r=null);var d=r,l=n._dbInfo;l.serializer.serialize(r,function(s,b){b?c(b):l.db.transaction(function(S){ne(S,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,s],function(){u(d)},function(R,k){c(k)})},function(S){if(S.code===S.QUOTA_ERR){if(o>0){u(We.apply(n,[e,d,t,o-1]));return}c(S)}})})}).catch(c)});return w(i,t),i}function sr(e,r,t){return We.apply(this,[e,r,t,1])}function lr(e,r){var t=this;e=F(e);var o=new y(function(n,i){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(c){ne(c,u,"DELETE FROM "+u.storeName+" WHERE key = ?",[e],function(){n()},function(d,l){i(l)})})}).catch(i)});return w(o,r),o}function dr(e){var r=this,t=new y(function(o,n){r.ready().then(function(){var i=r._dbInfo;i.db.transaction(function(u){ne(u,i,"DELETE FROM "+i.storeName,[],function(){o()},function(c,d){n(d)})})}).catch(n)});return w(t,e),t}function vr(e){var r=this,t=new y(function(o,n){r.ready().then(function(){var i=r._dbInfo;i.db.transaction(function(u){ne(u,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],function(c,d){var l=d.rows.item(0).c;o(l)},function(c,d){n(d)})})}).catch(n)});return w(t,e),t}function hr(e,r){var t=this,o=new y(function(n,i){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(c){ne(c,u,"SELECT key FROM "+u.storeName+" WHERE id = ? LIMIT 1",[e+1],function(d,l){var s=l.rows.length?l.rows.item(0).key:null;n(s)},function(d,l){i(l)})})}).catch(i)});return w(o,r),o}function yr(e){var r=this,t=new y(function(o,n){r.ready().then(function(){var i=r._dbInfo;i.db.transaction(function(u){ne(u,i,"SELECT key FROM "+i.storeName,[],function(c,d){for(var l=[],s=0;s<d.rows.length;s++)l.push(d.rows.item(s).key);o(l)},function(c,d){n(d)})})}).catch(n)});return w(t,e),t}function pr(e){return new y(function(r,t){e.transaction(function(o){o.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,i){for(var u=[],c=0;c<i.rows.length;c++)u.push(i.rows.item(c).name);r({db:e,storeNames:u})},function(n,i){t(i)})},function(o){t(o)})})}function mr(e,r){r=Z.apply(this,arguments);var t=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var o=this,n;return e.name?n=new y(function(i){var u;e.name===t.name?u=o._dbInfo.db:u=openDatabase(e.name,"","",0),e.storeName?i({db:u,storeNames:[e.storeName]}):i(pr(u))}).then(function(i){return new y(function(u,c){i.db.transaction(function(d){function l(R){return new y(function(k,W){d.executeSql("DROP TABLE IF EXISTS "+R,[],function(){k()},function(T,H){W(H)})})}for(var s=[],b=0,S=i.storeNames.length;b<S;b++)s.push(l(i.storeNames[b]));y.all(s).then(function(){u()}).catch(function(R){c(R)})},function(d){c(d)})})}):n=y.reject("Invalid arguments"),w(n,r),n}var br={_driver:"webSQLStorage",_initStorage:ur,_support:nr(),iterate:fr,getItem:cr,setItem:sr,removeItem:lr,clear:dr,length:vr,key:hr,keys:yr,dropInstance:mr};function gr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function qe(e,r){var t=e.name+"/";return e.storeName!==r.storeName&&(t+=e.storeName+"/"),t}function _r(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch{return!0}}function wr(){return!_r()||localStorage.length>0}function Ir(e){var r=this,t={};if(e)for(var o in e)t[o]=e[o];return t.keyPrefix=qe(e,r._defaultConfig),wr()?(r._dbInfo=t,t.serializer=Ie,y.resolve()):y.reject()}function Er(e){var r=this,t=r.ready().then(function(){for(var o=r._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);i.indexOf(o)===0&&localStorage.removeItem(i)}});return w(t,e),t}function Sr(e,r){var t=this;e=F(e);var o=t.ready().then(function(){var n=t._dbInfo,i=localStorage.getItem(n.keyPrefix+e);return i&&(i=n.serializer.deserialize(i)),i});return w(o,r),o}function Or(e,r){var t=this,o=t.ready().then(function(){for(var n=t._dbInfo,i=n.keyPrefix,u=i.length,c=localStorage.length,d=1,l=0;l<c;l++){var s=localStorage.key(l);if(s.indexOf(i)===0){var b=localStorage.getItem(s);if(b&&(b=n.serializer.deserialize(b)),b=e(b,s.substring(u),d++),b!==void 0)return b}}});return w(o,r),o}function jr(e,r){var t=this,o=t.ready().then(function(){var n=t._dbInfo,i;try{i=localStorage.key(e)}catch{i=null}return i&&(i=i.substring(n.keyPrefix.length)),i});return w(o,r),o}function Nr(e){var r=this,t=r.ready().then(function(){for(var o=r._dbInfo,n=localStorage.length,i=[],u=0;u<n;u++){var c=localStorage.key(u);c.indexOf(o.keyPrefix)===0&&i.push(c.substring(o.keyPrefix.length))}return i});return w(t,e),t}function Ar(e){var r=this,t=r.keys().then(function(o){return o.length});return w(t,e),t}function Br(e,r){var t=this;e=F(e);var o=t.ready().then(function(){var n=t._dbInfo;localStorage.removeItem(n.keyPrefix+e)});return w(o,r),o}function kr(e,r,t){var o=this;e=F(e);var n=o.ready().then(function(){r===void 0&&(r=null);var i=r;return new y(function(u,c){var d=o._dbInfo;d.serializer.serialize(r,function(l,s){if(s)c(s);else try{localStorage.setItem(d.keyPrefix+e,l),u(i)}catch(b){(b.name==="QuotaExceededError"||b.name==="NS_ERROR_DOM_QUOTA_REACHED")&&c(b),c(b)}})})});return w(n,t),n}function xr(e,r){if(r=Z.apply(this,arguments),e=typeof e!="function"&&e||{},!e.name){var t=this.config();e.name=e.name||t.name,e.storeName=e.storeName||t.storeName}var o=this,n;return e.name?n=new y(function(i){e.storeName?i(qe(e,o._defaultConfig)):i(e.name+"/")}).then(function(i){for(var u=localStorage.length-1;u>=0;u--){var c=localStorage.key(u);c.indexOf(i)===0&&localStorage.removeItem(c)}}):n=y.reject("Invalid arguments"),w(n,r),n}var Dr={_driver:"localStorageWrapper",_initStorage:Ir,_support:gr(),iterate:Or,getItem:Sr,setItem:kr,removeItem:Br,clear:Er,length:Ar,key:jr,keys:Nr,dropInstance:xr},Rr=function(e,r){return e===r||typeof e=="number"&&typeof r=="number"&&isNaN(e)&&isNaN(r)},Cr=function(e,r){for(var t=e.length,o=0;o<t;){if(Rr(e[o],r))return!0;o++}return!1},Ke=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},ve={},Ve={},fe={INDEXEDDB:tr,WEBSQL:br,LOCALSTORAGE:Dr},Lr=[fe.INDEXEDDB._driver,fe.WEBSQL._driver,fe.LOCALSTORAGE._driver],ye=["dropInstance"],Ee=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ye),Mr={description:"",driver:Lr.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Tr(e,r){e[r]=function(){var t=arguments;return e.ready().then(function(){return e[r].apply(e,t)})}}function Se(){for(var e=1;e<arguments.length;e++){var r=arguments[e];if(r)for(var t in r)r.hasOwnProperty(t)&&(Ke(r[t])?arguments[0][t]=r[t].slice():arguments[0][t]=r[t])}return arguments[0]}var zr=function(){function e(r){P(this,e);for(var t in fe)if(fe.hasOwnProperty(t)){var o=fe[t],n=o._driver;this[t]=n,ve[n]||this.defineDriver(o)}this._defaultConfig=Se({},Mr),this._config=Se({},this._defaultConfig,r),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(r){if((typeof r>"u"?"undefined":C(r))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in r){if(t==="storeName"&&(r[t]=r[t].replace(/\W/g,"_")),t==="version"&&typeof r[t]!="number")return new Error("Database version must be a number.");this._config[t]=r[t]}return"driver"in r&&r.driver?this.setDriver(this._config.driver):!0}else return typeof r=="string"?this._config[r]:this._config},e.prototype.defineDriver=function(r,t,o){var n=new y(function(i,u){try{var c=r._driver,d=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!r._driver){u(d);return}for(var l=Ee.concat("_initStorage"),s=0,b=l.length;s<b;s++){var S=l[s],R=!Cr(ye,S);if((R||r[S])&&typeof r[S]!="function"){u(d);return}}var k=function(){for(var T=function(Pr){return function(){var Ur=new Error("Method "+Pr+" is not implemented by the current driver"),Xe=y.reject(Ur);return w(Xe,arguments[arguments.length-1]),Xe}},H=0,Oe=ye.length;H<Oe;H++){var je=ye[H];r[je]||(r[je]=T(je))}};k();var W=function(T){ve[c]&&console.info("Redefining LocalForage driver: "+c),ve[c]=r,Ve[c]=T,i()};"_support"in r?r._support&&typeof r._support=="function"?r._support().then(W,u):W(!!r._support):W(!0)}catch(T){u(T)}});return z(n,t,o),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(r,t,o){var n=ve[r]?y.resolve(ve[r]):y.reject(new Error("Driver not found."));return z(n,t,o),n},e.prototype.getSerializer=function(r){var t=y.resolve(Ie);return z(t,r),t},e.prototype.ready=function(r){var t=this,o=t._driverSet.then(function(){return t._ready===null&&(t._ready=t._initDriver()),t._ready});return z(o,r,r),o},e.prototype.setDriver=function(r,t,o){var n=this;Ke(r)||(r=[r]);var i=this._getSupportedDrivers(r);function u(){n._config.driver=n.driver()}function c(s){return n._extend(s),u(),n._ready=n._initStorage(n._config),n._ready}function d(s){return function(){var b=0;function S(){for(;b<s.length;){var R=s[b];return b++,n._dbInfo=null,n._ready=null,n.getDriver(R).then(c).catch(S)}u();var k=new Error("No available storage method found.");return n._driverSet=y.reject(k),n._driverSet}return S()}}var l=this._driverSet!==null?this._driverSet.catch(function(){return y.resolve()}):y.resolve();return this._driverSet=l.then(function(){var s=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(s).then(function(b){n._driver=b._driver,u(),n._wrapLibraryMethodsWithReady(),n._initDriver=d(i)})}).catch(function(){u();var s=new Error("No available storage method found.");return n._driverSet=y.reject(s),n._driverSet}),z(this._driverSet,t,o),this._driverSet},e.prototype.supports=function(r){return!!Ve[r]},e.prototype._extend=function(r){Se(this,r)},e.prototype._getSupportedDrivers=function(r){for(var t=[],o=0,n=r.length;o<n;o++){var i=r[o];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var r=0,t=Ee.length;r<t;r++)Tr(this,Ee[r])},e.prototype.createInstance=function(r){return new e(r)},e}(),Fr=new zr;x.exports=Fr},{3:3}]},{},[4])(4)})}),et=Ze((_,O)=>{(function(m,x){typeof _=="object"&&typeof O<"u"?x(_):typeof define=="function"&&define.amd?define("localforage-driver-memory",["exports"],x):x(m.LocalforageDriverMemory={})})(typeof self<"u"?self:_,function(m){var x="localforage-driver-memory";function q(a){var f=typeof Symbol=="function"&&a[Symbol.iterator],h=0;return f?f.call(a):{next:function(){return a&&h>=a.length&&(a=void 0),{value:a&&a[h++],done:!a}}}}function C(a,f){a=a||[],f=f||{};try{return new Blob(a,f)}catch(I){if(I.name!=="TypeError")throw I;for(var h=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,p=new h,g=0;g<a.length;g+=1)p.append(a[g]);return p.getBlob(f.type)}}var P=/^~~local_forage_type~([^~]+)~/,j=9,D=j+4,L=Object.prototype.toString;function Y(a){var f=a.length*.75,h=a.length;a[a.length-1]==="="&&(f--,a[a.length-2]==="="&&f--);for(var p=new ArrayBuffer(f),g=new Uint8Array(p),I=0,M=0;I<h;I+=4){var V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[I]),ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[I+1]),ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[I+2]),de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[I+3]);g[M++]=V<<2|ce>>4,g[M++]=(ce&15)<<4|ae>>2,g[M++]=(ae&3)<<6|de&63}return p}function y(a){for(var f=new Uint8Array(a),h="",p=0;p<f.length;p+=3)h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f[p]>>2],h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(f[p]&3)<<4|f[p+1]>>4],h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(f[p+1]&15)<<2|f[p+2]>>6],h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f[p+2]&63];return f.length%3===2?h=h.substring(0,h.length-1)+"=":f.length%3===1&&(h=h.substring(0,h.length-2)+"=="),h}function w(a,f){var h="";if(a&&(h=L.call(a)),a&&(h==="[object ArrayBuffer]"||a.buffer&&L.call(a.buffer)==="[object ArrayBuffer]")){var p=void 0,g="__lfsc__:";a instanceof ArrayBuffer?(p=a,g+="arbf"):(p=a.buffer,h==="[object Int8Array]"?g+="si08":h==="[object Uint8Array]"?g+="ui08":h==="[object Uint8ClampedArray]"?g+="uic8":h==="[object Int16Array]"?g+="si16":h==="[object Uint16Array]"?g+="ur16":h==="[object Int32Array]"?g+="si32":h==="[object Uint32Array]"?g+="ui32":h==="[object Float32Array]"?g+="fl32":h==="[object Float64Array]"?g+="fl64":f(new Error("Failed to get type for BinaryArray"))),f(g+y(p))}else if(h==="[object Blob]"){var I=new FileReader;I.onload=function(){var M="~~local_forage_type~"+a.type+"~"+y(this.result);f("__lfsc__:blob"+M)},I.readAsArrayBuffer(a)}else try{f(JSON.stringify(a))}catch(M){console.error("Couldn't convert value into a JSON string: ",a),f(null,M)}}function z(a){if(a.substring(0,j)!=="__lfsc__:")return JSON.parse(a);var f=a.substring(D),h=a.substring(j,D),p;if(h==="blob"&&P.test(f)){var g=f.match(P);p=g[1],f=f.substring(g[0].length)}var I=Y(f);switch(h){case"arbf":return I;case"blob":return C([I],{type:p});case"si08":return new Int8Array(I);case"ui08":return new Uint8Array(I);case"uic8":return new Uint8ClampedArray(I);case"si16":return new Int16Array(I);case"ur16":return new Uint16Array(I);case"si32":return new Int32Array(I);case"ui32":return new Uint32Array(I);case"fl32":return new Float32Array(I);case"fl64":return new Float64Array(I);default:throw new Error("Unkown type: "+h)}}function F(a){var f,h;if(a===null||typeof a!="object"||"isActiveClone"in a)return a;var p=a instanceof Date?new Date(a):a.constructor();try{for(var g=q(Object.keys(a)),I=g.next();!I.done;I=g.next()){var M=I.value;Object.prototype.hasOwnProperty.call(a,M)&&(a.isActiveClone=null,p[M]=F(a[M]),delete a.isActiveClone)}}catch(V){f={error:V}}finally{try{I&&!I.done&&(h=g.return)&&h.call(g)}finally{if(f)throw f.error}}return p}function Z(a,f){return(a.name||f.name)+"/"+(a.storeName||f.storeName)+"/"}function A(a,f){f&&a.then(function(h){f(null,h)},function(h){f(h)})}function G(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}function U(a,f){var h=this;if(f=G.apply(this,arguments),a=typeof a!="function"&&a||{},!a.name){var p=this.config();a.name=a.name||p.name,a.storeName=a.storeName||p.storeName}var g;return a.name?g=new Promise(function(I){a.storeName?I(Z(a,h._defaultConfig)):I(a.name+"/")}):g=Promise.reject("Invalid arguments"),{promise:g,callback:f}}function oe(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}var ee={bufferToString:y,deserialize:z,serialize:w,stringToBuffer:Y},v={},N=function(){function a(f){this.kp=f,this.data={}}return a.resolve=function(f){return v[f]||(v[f]=new a(f)),v[f]},a.prototype.clear=function(){this.data={}},a.prototype.drop=function(){this.clear(),delete v[this.kp]},a.prototype.get=function(f){return this.data[f]},a.prototype.key=function(f){return this.keys()[f]},a.prototype.keys=function(){return Object.keys(this.data)},a.prototype.rm=function(f){delete this.data[f]},a.prototype.set=function(f,h){this.data[f]=h},a}();function E(a){var f=a?F(a):{},h=Z(f,this._defaultConfig),p=N.resolve(h);return this._dbInfo=f,this._dbInfo.serializer=ee,this._dbInfo.keyPrefix=h,this._dbInfo.mStore=p,Promise.resolve()}function B(a){var f=this,h=this.ready().then(function(){f._dbInfo.mStore.clear()});return A(h,a),h}function K(a,f){var h=U.apply(this,arguments),p=h.promise,g=h.callback,I=p.then(function(M){N.resolve(M).drop()});return A(I,g),p}function X(a,f){var h=this;a=oe(a);var p=this.ready().then(function(){var g=h._dbInfo.mStore.get(a);return g==null?null:h._dbInfo.serializer.deserialize(g)});return A(p,f),p}function J(a,f){var h=this,p=this.ready().then(function(){for(var g=h._dbInfo.mStore,I=g.keys(),M=0;M<I.length;M++){var V=g.get(I[M]);if(V&&(V=h._dbInfo.serializer.deserialize(V)),V=a(V,I[M],M+1),V!==void 0)return V}});return A(p,f),p}function Q(a,f){var h=this,p=this.ready().then(function(){var g;try{g=h._dbInfo.mStore.key(a),g===void 0&&(g=null)}catch{g=null}return g});return A(p,f),p}function $(a){var f=this,h=this.ready().then(function(){return f._dbInfo.mStore.keys()});return A(h,a),h}function ie(a){var f=this.keys().then(function(h){return h.length});return A(f,a),f}function ue(a,f){var h=this;a=oe(a);var p=this.ready().then(function(){h._dbInfo.mStore.rm(a)});return A(p,f),p}function le(a,f,h){var p=this;a=oe(a);var g=this.ready().then(function(){f===void 0&&(f=null);var I=f;return new Promise(function(M,V){p._dbInfo.serializer.serialize(f,function(ce,ae){if(ae)V(ae);else try{p._dbInfo.mStore.set(a,ce),M(I)}catch(de){V(de)}})})});return A(g,h),g}var re=!0;m._support=re,m._driver=x,m._initStorage=E,m.clear=B,m.dropInstance=K,m.getItem=X,m.iterate=J,m.key=Q,m.keys=$,m.length=ie,m.removeItem=ue,m.setItem=le,Object.defineProperty(m,"__esModule",{value:!0})})}),Ne=He($r()),Je=He(et()),rt={display:"none",position:"fixed",top:"0",right:"0",width:"100%",height:"100%",borderRadius:"0",border:"none",zIndex:"2147483647"};function tt(_){for(let[O,m]of Object.entries(rt))_.style[O]=m}function nt(_){return!![].slice.call(document.querySelectorAll(".magic-iframe")).find(m=>m.src.includes(_))}var ot=class extends Kr{constructor(){super(...arguments),this.activeElement=null}init(){this.test="hello",this.iframe=new Promise(_=>{let O=()=>{if(nt(encodeURIComponent(this.parameters)))Xr().log();else{let m=document.createElement("iframe");m.classList.add("magic-iframe"),m.dataset.magicIframeLabel=Ye(this.endpoint).host,m.title="Secure Modal",m.src=Ye(`/send?params=${encodeURIComponent(this.parameters)}`,this.endpoint).href,tt(m),document.body.appendChild(m),_(m)}};["loaded","interactive","complete"].includes(document.readyState)?O():window.addEventListener("load",O,!1)}),window.addEventListener("message",_=>{var O;if(_.origin===this.endpoint&&_.data&&_.data.msgType&&this.messageHandlers.size){_.data.response=(O=_.data.response)!=null?O:{};for(let m of this.messageHandlers.values())m(_)}})}showOverlay(){return me(this,null,function*(){let _=yield this.iframe;_.style.display="block",this.activeElement=document.activeElement,_.focus()})}hideOverlay(){return me(this,null,function*(){var _;let O=yield this.iframe;O.style.display="none",(_=this.activeElement)!=null&&_.focus&&this.activeElement.focus(),this.activeElement=null})}_post(_){return me(this,null,function*(){let O=yield this.iframe;if(O&&O.contentWindow)O.contentWindow.postMessage(_,this.endpoint);else throw Vr()})}},ut=Wr(qr,{platform:"web",sdkName:"magic-sdk",version:"27.0.0",defaultEndpoint:"https://auth.magic.link/",ViewController:ot,configureStorage:()=>me(void 0,null,function*(){let _=Ne.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"});return yield _.defineDriver(Je),yield _.setDriver([Ne.default.INDEXEDDB,Ne.default.LOCALSTORAGE,Je._driver]),_})});export{st as DeepLinkPage,lt as DeviceVerificationEventEmit,dt as DeviceVerificationEventOnReceived,vt as EthChainType,ht as Events,yt as Extension,pt as ExtensionError,mt as ExtensionWarning,bt as LoginWithEmailOTPEventEmit,gt as LoginWithEmailOTPEventOnReceived,_t as LoginWithMagicLinkEventEmit,wt as LoginWithMagicLinkEventOnReceived,ut as Magic,It as MagicIncomingWindowMessage,Et as MagicOutgoingWindowMessage,St as MagicPayloadMethod,Ot as RPCError,jt as RPCErrorCode,Nt as RecencyCheckEventEmit,At as RecencyCheckEventOnReceived,Bt as RecoveryMethodType,kt as SDKError,xt as SDKErrorCode,Dt as SDKWarning,Rt as SDKWarningCode,Ct as UpdateEmailEventEmit,Lt as UpdateEmailEventOnReceived,Mt as Wallets,Tt as isPromiEvent};
|
|
1
|
+
import{K as Wr,$ as qr,B as Kr,m as Vr,q as Xr,J as Ye}from"./index-CaW87E3q.js";import{g as st,R as lt,T as dt,k as vt,E as ht,a as yt,V as pt,s as mt,I as bt,b as gt,c as _t,N as wt,f as It,d as Et,v as St,_ as Ot,e as jt,h as Nt,O as At,y as Bt,A as kt,i as xt,W as Dt,p as Rt,U as Ct,L as Lt,u as Mt,x as Tt}from"./index-CaW87E3q.js";import"./index-4YYgi5nn.js";var se={},Yr=Object.create,Qe=Object.defineProperty,Jr=Object.getOwnPropertyDescriptor,Qr=Object.getOwnPropertyNames,Zr=Object.getPrototypeOf,Hr=Object.prototype.hasOwnProperty,pe=(_=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(_,{get:(O,m)=>(typeof require<"u"?require:O)[m]}):_)(function(_){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+_+'" is not supported')}),Ze=(_,O)=>()=>(O||_((O={exports:{}}).exports,O),O.exports),Gr=(_,O,m,x)=>{if(O&&typeof O=="object"||typeof O=="function")for(let q of Qr(O))!Hr.call(_,q)&&q!==m&&Qe(_,q,{get:()=>O[q],enumerable:!(x=Jr(O,q))||x.enumerable});return _},He=(_,O,m)=>(m=_!=null?Yr(Zr(_)):{},Gr(!_||!_.__esModule?Qe(m,"default",{value:_,enumerable:!0}):m,_)),me=(_,O,m)=>new Promise((x,q)=>{var C=D=>{try{j(m.next(D))}catch(L){q(L)}},P=D=>{try{j(m.throw(D))}catch(L){q(L)}},j=D=>D.done?x(D.value):Promise.resolve(D.value).then(C,P);j((m=m.apply(_,O)).next())}),$r=Ze((_,O)=>{(function(m){if(typeof _=="object"&&typeof O<"u")O.exports=m();else if(typeof define=="function"&&define.amd)define([],m);else{var x;typeof window<"u"?x=window:typeof se<"u"?x=se:typeof self<"u"?x=self:x=this,x.localforage=m()}})(function(){return function m(x,q,C){function P(L,Y){if(!q[L]){if(!x[L]){var y=typeof pe=="function"&&pe;if(!Y&&y)return y(L,!0);if(j)return j(L,!0);var w=new Error("Cannot find module '"+L+"'");throw w.code="MODULE_NOT_FOUND",w}var z=q[L]={exports:{}};x[L][0].call(z.exports,function(F){var Z=x[L][1][F];return P(Z||F)},z,z.exports,m,x,q,C)}return q[L].exports}for(var j=typeof pe=="function"&&pe,D=0;D<C.length;D++)P(C[D]);return P}({1:[function(m,x,q){(function(C){var P=C.MutationObserver||C.WebKitMutationObserver,j;if(P){var D=0,L=new P(F),Y=C.document.createTextNode("");L.observe(Y,{characterData:!0}),j=function(){Y.data=D=++D%2}}else if(!C.setImmediate&&typeof C.MessageChannel<"u"){var y=new C.MessageChannel;y.port1.onmessage=F,j=function(){y.port2.postMessage(0)}}else"document"in C&&"onreadystatechange"in C.document.createElement("script")?j=function(){var A=C.document.createElement("script");A.onreadystatechange=function(){F(),A.onreadystatechange=null,A.parentNode.removeChild(A),A=null},C.document.documentElement.appendChild(A)}:j=function(){setTimeout(F,0)};var w,z=[];function F(){w=!0;for(var A,G,U=z.length;U;){for(G=z,z=[],A=-1;++A<U;)G[A]();U=z.length}w=!1}x.exports=Z;function Z(A){z.push(A)===1&&!w&&j()}}).call(this,typeof se<"u"?se:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(m,x,q){var C=m(1);function P(){}var j={},D=["REJECTED"],L=["FULFILLED"],Y=["PENDING"];x.exports=y;function y(v){if(typeof v!="function")throw new TypeError("resolver must be a function");this.state=Y,this.queue=[],this.outcome=void 0,v!==P&&Z(this,v)}y.prototype.catch=function(v){return this.then(null,v)},y.prototype.then=function(v,N){if(typeof v!="function"&&this.state===L||typeof N!="function"&&this.state===D)return this;var E=new this.constructor(P);if(this.state!==Y){var B=this.state===L?v:N;z(E,B,this.outcome)}else this.queue.push(new w(E,v,N));return E};function w(v,N,E){this.promise=v,typeof N=="function"&&(this.onFulfilled=N,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}w.prototype.callFulfilled=function(v){j.resolve(this.promise,v)},w.prototype.otherCallFulfilled=function(v){z(this.promise,this.onFulfilled,v)},w.prototype.callRejected=function(v){j.reject(this.promise,v)},w.prototype.otherCallRejected=function(v){z(this.promise,this.onRejected,v)};function z(v,N,E){C(function(){var B;try{B=N(E)}catch(K){return j.reject(v,K)}B===v?j.reject(v,new TypeError("Cannot resolve promise with itself")):j.resolve(v,B)})}j.resolve=function(v,N){var E=A(F,N);if(E.status==="error")return j.reject(v,E.value);var B=E.value;if(B)Z(v,B);else{v.state=L,v.outcome=N;for(var K=-1,X=v.queue.length;++K<X;)v.queue[K].callFulfilled(N)}return v},j.reject=function(v,N){v.state=D,v.outcome=N;for(var E=-1,B=v.queue.length;++E<B;)v.queue[E].callRejected(N);return v};function F(v){var N=v&&v.then;if(v&&(typeof v=="object"||typeof v=="function")&&typeof N=="function")return function(){N.apply(v,arguments)}}function Z(v,N){var E=!1;function B(Q){E||(E=!0,j.reject(v,Q))}function K(Q){E||(E=!0,j.resolve(v,Q))}function X(){N(K,B)}var J=A(X);J.status==="error"&&B(J.value)}function A(v,N){var E={};try{E.value=v(N),E.status="success"}catch(B){E.status="error",E.value=B}return E}y.resolve=G;function G(v){return v instanceof this?v:j.resolve(new this(P),v)}y.reject=U;function U(v){var N=new this(P);return j.reject(N,v)}y.all=oe;function oe(v){var N=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=v.length,B=!1;if(!E)return this.resolve([]);for(var K=new Array(E),X=0,J=-1,Q=new this(P);++J<E;)$(v[J],J);return Q;function $(ie,ue){N.resolve(ie).then(le,function(re){B||(B=!0,j.reject(Q,re))});function le(re){K[ue]=re,++X===E&&!B&&(B=!0,j.resolve(Q,K))}}}y.race=ee;function ee(v){var N=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=v.length,B=!1;if(!E)return this.resolve([]);for(var K=-1,X=new this(P);++K<E;)J(v[K]);return X;function J(Q){N.resolve(Q).then(function($){B||(B=!0,j.resolve(X,$))},function($){B||(B=!0,j.reject(X,$))})}}},{1:1}],3:[function(m,x,q){(function(C){typeof C.Promise!="function"&&(C.Promise=m(2))}).call(this,typeof se<"u"?se:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(m,x,q){var C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function P(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function j(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var D=j();function L(){try{if(!D||!D.open)return!1;var e=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),r=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!e||r)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function Y(e,r){e=e||[],r=r||{};try{return new Blob(e,r)}catch(i){if(i.name!=="TypeError")throw i;for(var t=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,o=new t,n=0;n<e.length;n+=1)o.append(e[n]);return o.getBlob(r.type)}}typeof Promise>"u"&&m(3);var y=Promise;function w(e,r){r&&e.then(function(t){r(null,t)},function(t){r(t)})}function z(e,r,t){typeof r=="function"&&e.then(r),typeof t=="function"&&e.catch(t)}function F(e){return typeof e!="string"&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function Z(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var A="local-forage-detect-blob-support",G=void 0,U={},oe=Object.prototype.toString,ee="readonly",v="readwrite";function N(e){for(var r=e.length,t=new ArrayBuffer(r),o=new Uint8Array(t),n=0;n<r;n++)o[n]=e.charCodeAt(n);return t}function E(e){return new y(function(r){var t=e.transaction(A,v),o=Y([""]);t.objectStore(A).put(o,"key"),t.onabort=function(n){n.preventDefault(),n.stopPropagation(),r(!1)},t.oncomplete=function(){var n=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);r(i||!n||parseInt(n[1],10)>=43)}}).catch(function(){return!1})}function B(e){return typeof G=="boolean"?y.resolve(G):E(e).then(function(r){return G=r,G})}function K(e){var r=U[e.name],t={};t.promise=new y(function(o,n){t.resolve=o,t.reject=n}),r.deferredOperations.push(t),r.dbReady?r.dbReady=r.dbReady.then(function(){return t.promise}):r.dbReady=t.promise}function X(e){var r=U[e.name],t=r.deferredOperations.pop();if(t)return t.resolve(),t.promise}function J(e,r){var t=U[e.name],o=t.deferredOperations.pop();if(o)return o.reject(r),o.promise}function Q(e,r){return new y(function(t,o){if(U[e.name]=U[e.name]||g(),e.db)if(r)K(e),e.db.close();else return t(e.db);var n=[e.name];r&&n.push(e.version);var i=D.open.apply(D,n);r&&(i.onupgradeneeded=function(u){var c=i.result;try{c.createObjectStore(e.storeName),u.oldVersion<=1&&c.createObjectStore(A)}catch(d){if(d.name==="ConstraintError")console.warn('The database "'+e.name+'" has been upgraded from version '+u.oldVersion+" to version "+u.newVersion+', but the storage "'+e.storeName+'" already exists.');else throw d}}),i.onerror=function(u){u.preventDefault(),o(i.error)},i.onsuccess=function(){var u=i.result;u.onversionchange=function(c){c.target.close()},t(u),X(e)}})}function $(e){return Q(e,!1)}function ie(e){return Q(e,!0)}function ue(e,r){if(!e.db)return!0;var t=!e.db.objectStoreNames.contains(e.storeName),o=e.version<e.db.version,n=e.version>e.db.version;if(o&&(e.version!==r&&console.warn('The database "'+e.name+`" can't be downgraded from version `+e.db.version+" to version "+e.version+"."),e.version=e.db.version),n||t){if(t){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function le(e){return new y(function(r,t){var o=new FileReader;o.onerror=t,o.onloadend=function(n){var i=btoa(n.target.result||"");r({__local_forage_encoded_blob:!0,data:i,type:e.type})},o.readAsBinaryString(e)})}function re(e){var r=N(atob(e.data));return Y([r],{type:e.type})}function a(e){return e&&e.__local_forage_encoded_blob}function f(e){var r=this,t=r._initReady().then(function(){var o=U[r._dbInfo.name];if(o&&o.dbReady)return o.dbReady});return z(t,e,e),t}function h(e){K(e);for(var r=U[e.name],t=r.forages,o=0;o<t.length;o++){var n=t[o];n._dbInfo.db&&(n._dbInfo.db.close(),n._dbInfo.db=null)}return e.db=null,$(e).then(function(i){return e.db=i,ue(e)?ie(e):i}).then(function(i){e.db=r.db=i;for(var u=0;u<t.length;u++)t[u]._dbInfo.db=i}).catch(function(i){throw J(e,i),i})}function p(e,r,t,o){o===void 0&&(o=1);try{var n=e.db.transaction(e.storeName,r);t(null,n)}catch(i){if(o>0&&(!e.db||i.name==="InvalidStateError"||i.name==="NotFoundError"))return y.resolve().then(function(){if(!e.db||i.name==="NotFoundError"&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),ie(e)}).then(function(){return h(e).then(function(){p(e,r,t,o-1)})}).catch(t);t(i)}}function g(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function I(e){var r=this,t={db:null};if(e)for(var o in e)t[o]=e[o];var n=U[t.name];n||(n=g(),U[t.name]=n),n.forages.push(r),r._initReady||(r._initReady=r.ready,r.ready=f);var i=[];function u(){return y.resolve()}for(var c=0;c<n.forages.length;c++){var d=n.forages[c];d!==r&&i.push(d._initReady().catch(u))}var l=n.forages.slice(0);return y.all(i).then(function(){return t.db=n.db,$(t)}).then(function(s){return t.db=s,ue(t,r._defaultConfig.version)?ie(t):s}).then(function(s){t.db=n.db=s,r._dbInfo=t;for(var b=0;b<l.length;b++){var S=l[b];S!==r&&(S._dbInfo.db=t.db,S._dbInfo.version=t.version)}})}function M(e,r){var t=this;e=F(e);var o=new y(function(n,i){t.ready().then(function(){p(t._dbInfo,ee,function(u,c){if(u)return i(u);try{var d=c.objectStore(t._dbInfo.storeName),l=d.get(e);l.onsuccess=function(){var s=l.result;s===void 0&&(s=null),a(s)&&(s=re(s)),n(s)},l.onerror=function(){i(l.error)}}catch(s){i(s)}})}).catch(i)});return w(o,r),o}function V(e,r){var t=this,o=new y(function(n,i){t.ready().then(function(){p(t._dbInfo,ee,function(u,c){if(u)return i(u);try{var d=c.objectStore(t._dbInfo.storeName),l=d.openCursor(),s=1;l.onsuccess=function(){var b=l.result;if(b){var S=b.value;a(S)&&(S=re(S));var R=e(S,b.key,s++);R!==void 0?n(R):b.continue()}else n()},l.onerror=function(){i(l.error)}}catch(b){i(b)}})}).catch(i)});return w(o,r),o}function ce(e,r,t){var o=this;e=F(e);var n=new y(function(i,u){var c;o.ready().then(function(){return c=o._dbInfo,oe.call(r)==="[object Blob]"?B(c.db).then(function(d){return d?r:le(r)}):r}).then(function(d){p(o._dbInfo,v,function(l,s){if(l)return u(l);try{var b=s.objectStore(o._dbInfo.storeName);d===null&&(d=void 0);var S=b.put(d,e);s.oncomplete=function(){d===void 0&&(d=null),i(d)},s.onabort=s.onerror=function(){var R=S.error?S.error:S.transaction.error;u(R)}}catch(R){u(R)}})}).catch(u)});return w(n,t),n}function ae(e,r){var t=this;e=F(e);var o=new y(function(n,i){t.ready().then(function(){p(t._dbInfo,v,function(u,c){if(u)return i(u);try{var d=c.objectStore(t._dbInfo.storeName),l=d.delete(e);c.oncomplete=function(){n()},c.onerror=function(){i(l.error)},c.onabort=function(){var s=l.error?l.error:l.transaction.error;i(s)}}catch(s){i(s)}})}).catch(i)});return w(o,r),o}function de(e){var r=this,t=new y(function(o,n){r.ready().then(function(){p(r._dbInfo,v,function(i,u){if(i)return n(i);try{var c=u.objectStore(r._dbInfo.storeName),d=c.clear();u.oncomplete=function(){o()},u.onabort=u.onerror=function(){var l=d.error?d.error:d.transaction.error;n(l)}}catch(l){n(l)}})}).catch(n)});return w(t,e),t}function Ge(e){var r=this,t=new y(function(o,n){r.ready().then(function(){p(r._dbInfo,ee,function(i,u){if(i)return n(i);try{var c=u.objectStore(r._dbInfo.storeName),d=c.count();d.onsuccess=function(){o(d.result)},d.onerror=function(){n(d.error)}}catch(l){n(l)}})}).catch(n)});return w(t,e),t}function $e(e,r){var t=this,o=new y(function(n,i){if(e<0){n(null);return}t.ready().then(function(){p(t._dbInfo,ee,function(u,c){if(u)return i(u);try{var d=c.objectStore(t._dbInfo.storeName),l=!1,s=d.openKeyCursor();s.onsuccess=function(){var b=s.result;if(!b){n(null);return}e===0||l?n(b.key):(l=!0,b.advance(e))},s.onerror=function(){i(s.error)}}catch(b){i(b)}})}).catch(i)});return w(o,r),o}function er(e){var r=this,t=new y(function(o,n){r.ready().then(function(){p(r._dbInfo,ee,function(i,u){if(i)return n(i);try{var c=u.objectStore(r._dbInfo.storeName),d=c.openKeyCursor(),l=[];d.onsuccess=function(){var s=d.result;if(!s){o(l);return}l.push(s.key),s.continue()},d.onerror=function(){n(d.error)}}catch(s){n(s)}})}).catch(n)});return w(t,e),t}function rr(e,r){r=Z.apply(this,arguments);var t=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var o=this,n;if(!e.name)n=y.reject("Invalid arguments");else{var i=e.name===t.name&&o._dbInfo.db,u=i?y.resolve(o._dbInfo.db):$(e).then(function(c){var d=U[e.name],l=d.forages;d.db=c;for(var s=0;s<l.length;s++)l[s]._dbInfo.db=c;return c});e.storeName?n=u.then(function(c){if(c.objectStoreNames.contains(e.storeName)){var d=c.version+1;K(e);var l=U[e.name],s=l.forages;c.close();for(var b=0;b<s.length;b++){var S=s[b];S._dbInfo.db=null,S._dbInfo.version=d}var R=new y(function(k,W){var T=D.open(e.name,d);T.onerror=function(H){var Oe=T.result;Oe.close(),W(H)},T.onupgradeneeded=function(){var H=T.result;H.deleteObjectStore(e.storeName)},T.onsuccess=function(){var H=T.result;H.close(),k(H)}});return R.then(function(k){l.db=k;for(var W=0;W<s.length;W++){var T=s[W];T._dbInfo.db=k,X(T._dbInfo)}}).catch(function(k){throw(J(e,k)||y.resolve()).catch(function(){}),k})}}):n=u.then(function(c){K(e);var d=U[e.name],l=d.forages;c.close();for(var s=0;s<l.length;s++){var b=l[s];b._dbInfo.db=null}var S=new y(function(R,k){var W=D.deleteDatabase(e.name);W.onerror=function(){var T=W.result;T&&T.close(),k(W.error)},W.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},W.onsuccess=function(){var T=W.result;T&&T.close(),R(T)}});return S.then(function(R){d.db=R;for(var k=0;k<l.length;k++){var W=l[k];X(W._dbInfo)}}).catch(function(R){throw(J(e,R)||y.resolve()).catch(function(){}),R})})}return w(n,r),n}var tr={_driver:"asyncStorage",_initStorage:I,_support:L(),iterate:V,getItem:M,setItem:ce,removeItem:ae,clear:de,length:Ge,key:$e,keys:er,dropInstance:rr};function nr(){return typeof openDatabase=="function"}var te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",or="~~local_forage_type~",Ae=/^~~local_forage_type~([^~]+)~/,he="__lfsc__:",be=he.length,ge="arbf",_e="blob",Be="si08",ke="ui08",xe="uic8",De="si16",Re="si32",Ce="ur16",Le="ui32",Me="fl32",Te="fl64",ze=be+ge.length,Fe=Object.prototype.toString;function Pe(e){var r=e.length*.75,t=e.length,o,n=0,i,u,c,d;e[e.length-1]==="="&&(r--,e[e.length-2]==="="&&r--);var l=new ArrayBuffer(r),s=new Uint8Array(l);for(o=0;o<t;o+=4)i=te.indexOf(e[o]),u=te.indexOf(e[o+1]),c=te.indexOf(e[o+2]),d=te.indexOf(e[o+3]),s[n++]=i<<2|u>>4,s[n++]=(u&15)<<4|c>>2,s[n++]=(c&3)<<6|d&63;return l}function we(e){var r=new Uint8Array(e),t="",o;for(o=0;o<r.length;o+=3)t+=te[r[o]>>2],t+=te[(r[o]&3)<<4|r[o+1]>>4],t+=te[(r[o+1]&15)<<2|r[o+2]>>6],t+=te[r[o+2]&63];return r.length%3===2?t=t.substring(0,t.length-1)+"=":r.length%3===1&&(t=t.substring(0,t.length-2)+"=="),t}function ir(e,r){var t="";if(e&&(t=Fe.call(e)),e&&(t==="[object ArrayBuffer]"||e.buffer&&Fe.call(e.buffer)==="[object ArrayBuffer]")){var o,n=he;e instanceof ArrayBuffer?(o=e,n+=ge):(o=e.buffer,t==="[object Int8Array]"?n+=Be:t==="[object Uint8Array]"?n+=ke:t==="[object Uint8ClampedArray]"?n+=xe:t==="[object Int16Array]"?n+=De:t==="[object Uint16Array]"?n+=Ce:t==="[object Int32Array]"?n+=Re:t==="[object Uint32Array]"?n+=Le:t==="[object Float32Array]"?n+=Me:t==="[object Float64Array]"?n+=Te:r(new Error("Failed to get type for BinaryArray"))),r(n+we(o))}else if(t==="[object Blob]"){var i=new FileReader;i.onload=function(){var u=or+e.type+"~"+we(this.result);r(he+_e+u)},i.readAsArrayBuffer(e)}else try{r(JSON.stringify(e))}catch(u){console.error("Couldn't convert value into a JSON string: ",e),r(null,u)}}function ar(e){if(e.substring(0,be)!==he)return JSON.parse(e);var r=e.substring(ze),t=e.substring(be,ze),o;if(t===_e&&Ae.test(r)){var n=r.match(Ae);o=n[1],r=r.substring(n[0].length)}var i=Pe(r);switch(t){case ge:return i;case _e:return Y([i],{type:o});case Be:return new Int8Array(i);case ke:return new Uint8Array(i);case xe:return new Uint8ClampedArray(i);case De:return new Int16Array(i);case Ce:return new Uint16Array(i);case Re:return new Int32Array(i);case Le:return new Uint32Array(i);case Me:return new Float32Array(i);case Te:return new Float64Array(i);default:throw new Error("Unkown type: "+t)}}var Ie={serialize:ir,deserialize:ar,stringToBuffer:Pe,bufferToString:we};function Ue(e,r,t,o){e.executeSql("CREATE TABLE IF NOT EXISTS "+r.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],t,o)}function ur(e){var r=this,t={db:null};if(e)for(var o in e)t[o]=typeof e[o]!="string"?e[o].toString():e[o];var n=new y(function(i,u){try{t.db=openDatabase(t.name,String(t.version),t.description,t.size)}catch(c){return u(c)}t.db.transaction(function(c){Ue(c,t,function(){r._dbInfo=t,i()},function(d,l){u(l)})},u)});return t.serializer=Ie,n}function ne(e,r,t,o,n,i){e.executeSql(t,o,n,function(u,c){c.code===c.SYNTAX_ERR?u.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[r.storeName],function(d,l){l.rows.length?i(d,c):Ue(d,r,function(){d.executeSql(t,o,n,i)},i)},i):i(u,c)},i)}function cr(e,r){var t=this;e=F(e);var o=new y(function(n,i){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(c){ne(c,u,"SELECT * FROM "+u.storeName+" WHERE key = ? LIMIT 1",[e],function(d,l){var s=l.rows.length?l.rows.item(0).value:null;s&&(s=u.serializer.deserialize(s)),n(s)},function(d,l){i(l)})})}).catch(i)});return w(o,r),o}function fr(e,r){var t=this,o=new y(function(n,i){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(c){ne(c,u,"SELECT * FROM "+u.storeName,[],function(d,l){for(var s=l.rows,b=s.length,S=0;S<b;S++){var R=s.item(S),k=R.value;if(k&&(k=u.serializer.deserialize(k)),k=e(k,R.key,S+1),k!==void 0){n(k);return}}n()},function(d,l){i(l)})})}).catch(i)});return w(o,r),o}function We(e,r,t,o){var n=this;e=F(e);var i=new y(function(u,c){n.ready().then(function(){r===void 0&&(r=null);var d=r,l=n._dbInfo;l.serializer.serialize(r,function(s,b){b?c(b):l.db.transaction(function(S){ne(S,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,s],function(){u(d)},function(R,k){c(k)})},function(S){if(S.code===S.QUOTA_ERR){if(o>0){u(We.apply(n,[e,d,t,o-1]));return}c(S)}})})}).catch(c)});return w(i,t),i}function sr(e,r,t){return We.apply(this,[e,r,t,1])}function lr(e,r){var t=this;e=F(e);var o=new y(function(n,i){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(c){ne(c,u,"DELETE FROM "+u.storeName+" WHERE key = ?",[e],function(){n()},function(d,l){i(l)})})}).catch(i)});return w(o,r),o}function dr(e){var r=this,t=new y(function(o,n){r.ready().then(function(){var i=r._dbInfo;i.db.transaction(function(u){ne(u,i,"DELETE FROM "+i.storeName,[],function(){o()},function(c,d){n(d)})})}).catch(n)});return w(t,e),t}function vr(e){var r=this,t=new y(function(o,n){r.ready().then(function(){var i=r._dbInfo;i.db.transaction(function(u){ne(u,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],function(c,d){var l=d.rows.item(0).c;o(l)},function(c,d){n(d)})})}).catch(n)});return w(t,e),t}function hr(e,r){var t=this,o=new y(function(n,i){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(c){ne(c,u,"SELECT key FROM "+u.storeName+" WHERE id = ? LIMIT 1",[e+1],function(d,l){var s=l.rows.length?l.rows.item(0).key:null;n(s)},function(d,l){i(l)})})}).catch(i)});return w(o,r),o}function yr(e){var r=this,t=new y(function(o,n){r.ready().then(function(){var i=r._dbInfo;i.db.transaction(function(u){ne(u,i,"SELECT key FROM "+i.storeName,[],function(c,d){for(var l=[],s=0;s<d.rows.length;s++)l.push(d.rows.item(s).key);o(l)},function(c,d){n(d)})})}).catch(n)});return w(t,e),t}function pr(e){return new y(function(r,t){e.transaction(function(o){o.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,i){for(var u=[],c=0;c<i.rows.length;c++)u.push(i.rows.item(c).name);r({db:e,storeNames:u})},function(n,i){t(i)})},function(o){t(o)})})}function mr(e,r){r=Z.apply(this,arguments);var t=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var o=this,n;return e.name?n=new y(function(i){var u;e.name===t.name?u=o._dbInfo.db:u=openDatabase(e.name,"","",0),e.storeName?i({db:u,storeNames:[e.storeName]}):i(pr(u))}).then(function(i){return new y(function(u,c){i.db.transaction(function(d){function l(R){return new y(function(k,W){d.executeSql("DROP TABLE IF EXISTS "+R,[],function(){k()},function(T,H){W(H)})})}for(var s=[],b=0,S=i.storeNames.length;b<S;b++)s.push(l(i.storeNames[b]));y.all(s).then(function(){u()}).catch(function(R){c(R)})},function(d){c(d)})})}):n=y.reject("Invalid arguments"),w(n,r),n}var br={_driver:"webSQLStorage",_initStorage:ur,_support:nr(),iterate:fr,getItem:cr,setItem:sr,removeItem:lr,clear:dr,length:vr,key:hr,keys:yr,dropInstance:mr};function gr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function qe(e,r){var t=e.name+"/";return e.storeName!==r.storeName&&(t+=e.storeName+"/"),t}function _r(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch{return!0}}function wr(){return!_r()||localStorage.length>0}function Ir(e){var r=this,t={};if(e)for(var o in e)t[o]=e[o];return t.keyPrefix=qe(e,r._defaultConfig),wr()?(r._dbInfo=t,t.serializer=Ie,y.resolve()):y.reject()}function Er(e){var r=this,t=r.ready().then(function(){for(var o=r._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);i.indexOf(o)===0&&localStorage.removeItem(i)}});return w(t,e),t}function Sr(e,r){var t=this;e=F(e);var o=t.ready().then(function(){var n=t._dbInfo,i=localStorage.getItem(n.keyPrefix+e);return i&&(i=n.serializer.deserialize(i)),i});return w(o,r),o}function Or(e,r){var t=this,o=t.ready().then(function(){for(var n=t._dbInfo,i=n.keyPrefix,u=i.length,c=localStorage.length,d=1,l=0;l<c;l++){var s=localStorage.key(l);if(s.indexOf(i)===0){var b=localStorage.getItem(s);if(b&&(b=n.serializer.deserialize(b)),b=e(b,s.substring(u),d++),b!==void 0)return b}}});return w(o,r),o}function jr(e,r){var t=this,o=t.ready().then(function(){var n=t._dbInfo,i;try{i=localStorage.key(e)}catch{i=null}return i&&(i=i.substring(n.keyPrefix.length)),i});return w(o,r),o}function Nr(e){var r=this,t=r.ready().then(function(){for(var o=r._dbInfo,n=localStorage.length,i=[],u=0;u<n;u++){var c=localStorage.key(u);c.indexOf(o.keyPrefix)===0&&i.push(c.substring(o.keyPrefix.length))}return i});return w(t,e),t}function Ar(e){var r=this,t=r.keys().then(function(o){return o.length});return w(t,e),t}function Br(e,r){var t=this;e=F(e);var o=t.ready().then(function(){var n=t._dbInfo;localStorage.removeItem(n.keyPrefix+e)});return w(o,r),o}function kr(e,r,t){var o=this;e=F(e);var n=o.ready().then(function(){r===void 0&&(r=null);var i=r;return new y(function(u,c){var d=o._dbInfo;d.serializer.serialize(r,function(l,s){if(s)c(s);else try{localStorage.setItem(d.keyPrefix+e,l),u(i)}catch(b){(b.name==="QuotaExceededError"||b.name==="NS_ERROR_DOM_QUOTA_REACHED")&&c(b),c(b)}})})});return w(n,t),n}function xr(e,r){if(r=Z.apply(this,arguments),e=typeof e!="function"&&e||{},!e.name){var t=this.config();e.name=e.name||t.name,e.storeName=e.storeName||t.storeName}var o=this,n;return e.name?n=new y(function(i){e.storeName?i(qe(e,o._defaultConfig)):i(e.name+"/")}).then(function(i){for(var u=localStorage.length-1;u>=0;u--){var c=localStorage.key(u);c.indexOf(i)===0&&localStorage.removeItem(c)}}):n=y.reject("Invalid arguments"),w(n,r),n}var Dr={_driver:"localStorageWrapper",_initStorage:Ir,_support:gr(),iterate:Or,getItem:Sr,setItem:kr,removeItem:Br,clear:Er,length:Ar,key:jr,keys:Nr,dropInstance:xr},Rr=function(e,r){return e===r||typeof e=="number"&&typeof r=="number"&&isNaN(e)&&isNaN(r)},Cr=function(e,r){for(var t=e.length,o=0;o<t;){if(Rr(e[o],r))return!0;o++}return!1},Ke=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},ve={},Ve={},fe={INDEXEDDB:tr,WEBSQL:br,LOCALSTORAGE:Dr},Lr=[fe.INDEXEDDB._driver,fe.WEBSQL._driver,fe.LOCALSTORAGE._driver],ye=["dropInstance"],Ee=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ye),Mr={description:"",driver:Lr.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Tr(e,r){e[r]=function(){var t=arguments;return e.ready().then(function(){return e[r].apply(e,t)})}}function Se(){for(var e=1;e<arguments.length;e++){var r=arguments[e];if(r)for(var t in r)r.hasOwnProperty(t)&&(Ke(r[t])?arguments[0][t]=r[t].slice():arguments[0][t]=r[t])}return arguments[0]}var zr=function(){function e(r){P(this,e);for(var t in fe)if(fe.hasOwnProperty(t)){var o=fe[t],n=o._driver;this[t]=n,ve[n]||this.defineDriver(o)}this._defaultConfig=Se({},Mr),this._config=Se({},this._defaultConfig,r),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(r){if((typeof r>"u"?"undefined":C(r))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in r){if(t==="storeName"&&(r[t]=r[t].replace(/\W/g,"_")),t==="version"&&typeof r[t]!="number")return new Error("Database version must be a number.");this._config[t]=r[t]}return"driver"in r&&r.driver?this.setDriver(this._config.driver):!0}else return typeof r=="string"?this._config[r]:this._config},e.prototype.defineDriver=function(r,t,o){var n=new y(function(i,u){try{var c=r._driver,d=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!r._driver){u(d);return}for(var l=Ee.concat("_initStorage"),s=0,b=l.length;s<b;s++){var S=l[s],R=!Cr(ye,S);if((R||r[S])&&typeof r[S]!="function"){u(d);return}}var k=function(){for(var T=function(Pr){return function(){var Ur=new Error("Method "+Pr+" is not implemented by the current driver"),Xe=y.reject(Ur);return w(Xe,arguments[arguments.length-1]),Xe}},H=0,Oe=ye.length;H<Oe;H++){var je=ye[H];r[je]||(r[je]=T(je))}};k();var W=function(T){ve[c]&&console.info("Redefining LocalForage driver: "+c),ve[c]=r,Ve[c]=T,i()};"_support"in r?r._support&&typeof r._support=="function"?r._support().then(W,u):W(!!r._support):W(!0)}catch(T){u(T)}});return z(n,t,o),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(r,t,o){var n=ve[r]?y.resolve(ve[r]):y.reject(new Error("Driver not found."));return z(n,t,o),n},e.prototype.getSerializer=function(r){var t=y.resolve(Ie);return z(t,r),t},e.prototype.ready=function(r){var t=this,o=t._driverSet.then(function(){return t._ready===null&&(t._ready=t._initDriver()),t._ready});return z(o,r,r),o},e.prototype.setDriver=function(r,t,o){var n=this;Ke(r)||(r=[r]);var i=this._getSupportedDrivers(r);function u(){n._config.driver=n.driver()}function c(s){return n._extend(s),u(),n._ready=n._initStorage(n._config),n._ready}function d(s){return function(){var b=0;function S(){for(;b<s.length;){var R=s[b];return b++,n._dbInfo=null,n._ready=null,n.getDriver(R).then(c).catch(S)}u();var k=new Error("No available storage method found.");return n._driverSet=y.reject(k),n._driverSet}return S()}}var l=this._driverSet!==null?this._driverSet.catch(function(){return y.resolve()}):y.resolve();return this._driverSet=l.then(function(){var s=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(s).then(function(b){n._driver=b._driver,u(),n._wrapLibraryMethodsWithReady(),n._initDriver=d(i)})}).catch(function(){u();var s=new Error("No available storage method found.");return n._driverSet=y.reject(s),n._driverSet}),z(this._driverSet,t,o),this._driverSet},e.prototype.supports=function(r){return!!Ve[r]},e.prototype._extend=function(r){Se(this,r)},e.prototype._getSupportedDrivers=function(r){for(var t=[],o=0,n=r.length;o<n;o++){var i=r[o];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var r=0,t=Ee.length;r<t;r++)Tr(this,Ee[r])},e.prototype.createInstance=function(r){return new e(r)},e}(),Fr=new zr;x.exports=Fr},{3:3}]},{},[4])(4)})}),et=Ze((_,O)=>{(function(m,x){typeof _=="object"&&typeof O<"u"?x(_):typeof define=="function"&&define.amd?define("localforage-driver-memory",["exports"],x):x(m.LocalforageDriverMemory={})})(typeof self<"u"?self:_,function(m){var x="localforage-driver-memory";function q(a){var f=typeof Symbol=="function"&&a[Symbol.iterator],h=0;return f?f.call(a):{next:function(){return a&&h>=a.length&&(a=void 0),{value:a&&a[h++],done:!a}}}}function C(a,f){a=a||[],f=f||{};try{return new Blob(a,f)}catch(I){if(I.name!=="TypeError")throw I;for(var h=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,p=new h,g=0;g<a.length;g+=1)p.append(a[g]);return p.getBlob(f.type)}}var P=/^~~local_forage_type~([^~]+)~/,j=9,D=j+4,L=Object.prototype.toString;function Y(a){var f=a.length*.75,h=a.length;a[a.length-1]==="="&&(f--,a[a.length-2]==="="&&f--);for(var p=new ArrayBuffer(f),g=new Uint8Array(p),I=0,M=0;I<h;I+=4){var V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[I]),ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[I+1]),ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[I+2]),de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[I+3]);g[M++]=V<<2|ce>>4,g[M++]=(ce&15)<<4|ae>>2,g[M++]=(ae&3)<<6|de&63}return p}function y(a){for(var f=new Uint8Array(a),h="",p=0;p<f.length;p+=3)h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f[p]>>2],h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(f[p]&3)<<4|f[p+1]>>4],h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(f[p+1]&15)<<2|f[p+2]>>6],h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f[p+2]&63];return f.length%3===2?h=h.substring(0,h.length-1)+"=":f.length%3===1&&(h=h.substring(0,h.length-2)+"=="),h}function w(a,f){var h="";if(a&&(h=L.call(a)),a&&(h==="[object ArrayBuffer]"||a.buffer&&L.call(a.buffer)==="[object ArrayBuffer]")){var p=void 0,g="__lfsc__:";a instanceof ArrayBuffer?(p=a,g+="arbf"):(p=a.buffer,h==="[object Int8Array]"?g+="si08":h==="[object Uint8Array]"?g+="ui08":h==="[object Uint8ClampedArray]"?g+="uic8":h==="[object Int16Array]"?g+="si16":h==="[object Uint16Array]"?g+="ur16":h==="[object Int32Array]"?g+="si32":h==="[object Uint32Array]"?g+="ui32":h==="[object Float32Array]"?g+="fl32":h==="[object Float64Array]"?g+="fl64":f(new Error("Failed to get type for BinaryArray"))),f(g+y(p))}else if(h==="[object Blob]"){var I=new FileReader;I.onload=function(){var M="~~local_forage_type~"+a.type+"~"+y(this.result);f("__lfsc__:blob"+M)},I.readAsArrayBuffer(a)}else try{f(JSON.stringify(a))}catch(M){console.error("Couldn't convert value into a JSON string: ",a),f(null,M)}}function z(a){if(a.substring(0,j)!=="__lfsc__:")return JSON.parse(a);var f=a.substring(D),h=a.substring(j,D),p;if(h==="blob"&&P.test(f)){var g=f.match(P);p=g[1],f=f.substring(g[0].length)}var I=Y(f);switch(h){case"arbf":return I;case"blob":return C([I],{type:p});case"si08":return new Int8Array(I);case"ui08":return new Uint8Array(I);case"uic8":return new Uint8ClampedArray(I);case"si16":return new Int16Array(I);case"ur16":return new Uint16Array(I);case"si32":return new Int32Array(I);case"ui32":return new Uint32Array(I);case"fl32":return new Float32Array(I);case"fl64":return new Float64Array(I);default:throw new Error("Unkown type: "+h)}}function F(a){var f,h;if(a===null||typeof a!="object"||"isActiveClone"in a)return a;var p=a instanceof Date?new Date(a):a.constructor();try{for(var g=q(Object.keys(a)),I=g.next();!I.done;I=g.next()){var M=I.value;Object.prototype.hasOwnProperty.call(a,M)&&(a.isActiveClone=null,p[M]=F(a[M]),delete a.isActiveClone)}}catch(V){f={error:V}}finally{try{I&&!I.done&&(h=g.return)&&h.call(g)}finally{if(f)throw f.error}}return p}function Z(a,f){return(a.name||f.name)+"/"+(a.storeName||f.storeName)+"/"}function A(a,f){f&&a.then(function(h){f(null,h)},function(h){f(h)})}function G(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}function U(a,f){var h=this;if(f=G.apply(this,arguments),a=typeof a!="function"&&a||{},!a.name){var p=this.config();a.name=a.name||p.name,a.storeName=a.storeName||p.storeName}var g;return a.name?g=new Promise(function(I){a.storeName?I(Z(a,h._defaultConfig)):I(a.name+"/")}):g=Promise.reject("Invalid arguments"),{promise:g,callback:f}}function oe(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}var ee={bufferToString:y,deserialize:z,serialize:w,stringToBuffer:Y},v={},N=function(){function a(f){this.kp=f,this.data={}}return a.resolve=function(f){return v[f]||(v[f]=new a(f)),v[f]},a.prototype.clear=function(){this.data={}},a.prototype.drop=function(){this.clear(),delete v[this.kp]},a.prototype.get=function(f){return this.data[f]},a.prototype.key=function(f){return this.keys()[f]},a.prototype.keys=function(){return Object.keys(this.data)},a.prototype.rm=function(f){delete this.data[f]},a.prototype.set=function(f,h){this.data[f]=h},a}();function E(a){var f=a?F(a):{},h=Z(f,this._defaultConfig),p=N.resolve(h);return this._dbInfo=f,this._dbInfo.serializer=ee,this._dbInfo.keyPrefix=h,this._dbInfo.mStore=p,Promise.resolve()}function B(a){var f=this,h=this.ready().then(function(){f._dbInfo.mStore.clear()});return A(h,a),h}function K(a,f){var h=U.apply(this,arguments),p=h.promise,g=h.callback,I=p.then(function(M){N.resolve(M).drop()});return A(I,g),p}function X(a,f){var h=this;a=oe(a);var p=this.ready().then(function(){var g=h._dbInfo.mStore.get(a);return g==null?null:h._dbInfo.serializer.deserialize(g)});return A(p,f),p}function J(a,f){var h=this,p=this.ready().then(function(){for(var g=h._dbInfo.mStore,I=g.keys(),M=0;M<I.length;M++){var V=g.get(I[M]);if(V&&(V=h._dbInfo.serializer.deserialize(V)),V=a(V,I[M],M+1),V!==void 0)return V}});return A(p,f),p}function Q(a,f){var h=this,p=this.ready().then(function(){var g;try{g=h._dbInfo.mStore.key(a),g===void 0&&(g=null)}catch{g=null}return g});return A(p,f),p}function $(a){var f=this,h=this.ready().then(function(){return f._dbInfo.mStore.keys()});return A(h,a),h}function ie(a){var f=this.keys().then(function(h){return h.length});return A(f,a),f}function ue(a,f){var h=this;a=oe(a);var p=this.ready().then(function(){h._dbInfo.mStore.rm(a)});return A(p,f),p}function le(a,f,h){var p=this;a=oe(a);var g=this.ready().then(function(){f===void 0&&(f=null);var I=f;return new Promise(function(M,V){p._dbInfo.serializer.serialize(f,function(ce,ae){if(ae)V(ae);else try{p._dbInfo.mStore.set(a,ce),M(I)}catch(de){V(de)}})})});return A(g,h),g}var re=!0;m._support=re,m._driver=x,m._initStorage=E,m.clear=B,m.dropInstance=K,m.getItem=X,m.iterate=J,m.key=Q,m.keys=$,m.length=ie,m.removeItem=ue,m.setItem=le,Object.defineProperty(m,"__esModule",{value:!0})})}),Ne=He($r()),Je=He(et()),rt={display:"none",position:"fixed",top:"0",right:"0",width:"100%",height:"100%",borderRadius:"0",border:"none",zIndex:"2147483647"};function tt(_){for(let[O,m]of Object.entries(rt))_.style[O]=m}function nt(_){return!![].slice.call(document.querySelectorAll(".magic-iframe")).find(m=>m.src.includes(_))}var ot=class extends Kr{constructor(){super(...arguments),this.activeElement=null}init(){this.test="hello",this.iframe=new Promise(_=>{let O=()=>{if(nt(encodeURIComponent(this.parameters)))Xr().log();else{let m=document.createElement("iframe");m.classList.add("magic-iframe"),m.dataset.magicIframeLabel=Ye(this.endpoint).host,m.title="Secure Modal",m.src=Ye(`/send?params=${encodeURIComponent(this.parameters)}`,this.endpoint).href,tt(m),document.body.appendChild(m),_(m)}};["loaded","interactive","complete"].includes(document.readyState)?O():window.addEventListener("load",O,!1)}),window.addEventListener("message",_=>{var O;if(_.origin===this.endpoint&&_.data&&_.data.msgType&&this.messageHandlers.size){_.data.response=(O=_.data.response)!=null?O:{};for(let m of this.messageHandlers.values())m(_)}})}showOverlay(){return me(this,null,function*(){let _=yield this.iframe;_.style.display="block",this.activeElement=document.activeElement,_.focus()})}hideOverlay(){return me(this,null,function*(){var _;let O=yield this.iframe;O.style.display="none",(_=this.activeElement)!=null&&_.focus&&this.activeElement.focus(),this.activeElement=null})}_post(_){return me(this,null,function*(){let O=yield this.iframe;if(O&&O.contentWindow)O.contentWindow.postMessage(_,this.endpoint);else throw Vr()})}},ut=Wr(qr,{platform:"web",sdkName:"magic-sdk",version:"27.0.0",defaultEndpoint:"https://auth.magic.link/",ViewController:ot,configureStorage:()=>me(void 0,null,function*(){let _=Ne.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"});return yield _.defineDriver(Je),yield _.setDriver([Ne.default.INDEXEDDB,Ne.default.LOCALSTORAGE,Je._driver]),_})});export{st as DeepLinkPage,lt as DeviceVerificationEventEmit,dt as DeviceVerificationEventOnReceived,vt as EthChainType,ht as Events,yt as Extension,pt as ExtensionError,mt as ExtensionWarning,bt as LoginWithEmailOTPEventEmit,gt as LoginWithEmailOTPEventOnReceived,_t as LoginWithMagicLinkEventEmit,wt as LoginWithMagicLinkEventOnReceived,ut as Magic,It as MagicIncomingWindowMessage,Et as MagicOutgoingWindowMessage,St as MagicPayloadMethod,Ot as RPCError,jt as RPCErrorCode,Nt as RecencyCheckEventEmit,At as RecencyCheckEventOnReceived,Bt as RecoveryMethodType,kt as SDKError,xt as SDKErrorCode,Dt as SDKWarning,Rt as SDKWarningCode,Ct as UpdateEmailEventEmit,Lt as UpdateEmailEventOnReceived,Mt as Wallets,Tt as isPromiEvent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._image_142g7_1,._main_142g7_2{position:relative;width:64px;height:64px;border-radius:50%!important}._image_142g7_1{overflow:hidden}._network_142g7_13{position:absolute;bottom:0;right:0;width:32px;height:32px;z-index:1}._ellipsis_4huv2_1{margin:auto!important;color:var(--primary-text)}._itemImage_1y9df_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1y9df_10{margin-right:4px}._grid_1y9df_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_1y9df_14:hover{background-color:#24212966;color:var(--text)}._row_1y9df_25{align-items:center!important;font-size:15px}._column_1y9df_30{display:flex!important}._statusColumn_1y9df_34{font-size:13px;text-transform:uppercase}._statusColumn_1y9df_34._synced_1y9df_39{color:#34ce76}._statusColumn_1y9df_34._unsynced_1y9df_43{color:#fc9965}._avatarColumn_1y9df_47{align-items:center;padding-left:10px!important}._nameWrapper_1y9df_52{display:flex;align-items:center;overflow:hidden}._name_1y9df_52{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1y9df_65{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1y9df_72{margin-left:5px}._status_rgxu1_1{text-transform:uppercase;padding:4px 8px;border-radius:32px;display:inline-flex;align-items:center;gap:4px}._status_rgxu1_1 .icon{height:18px}._pending_migration_rgxu1_14{color:#ffbc5b;background-color:#ffbc5b33}._synced_rgxu1_19{color:#65d890;background-color:#65d89033}._unpublished_rgxu1_24,._unsynced_rgxu1_25{color:#63b4f6;background-color:#63b4f633}._pending_mapping_rgxu1_30,._under_review_rgxu1_31{color:#ecebed;background-color:#ecebed33}._icon_rgxu1_10{width:17px;height:17px}._itemImage_1rili_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1rili_10{margin-right:4px}._grid_1rili_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider);position:relative}._grid_1rili_14:not(._loading_1rili_21):hover{background-color:#24212966;color:var(--text)}._row_1rili_26{align-items:center!important;font-size:15px}._column_1rili_31{display:flex!important}._avatarColumn_1rili_35{align-items:center;padding-left:10px!important}._nameWrapper_1rili_40{display:flex;align-items:center;overflow:hidden}._name_1rili_40{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1rili_53{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1rili_60{margin-left:5px}._overlay_1rili_65{position:absolute;pointer-events:none;z-index:100000000;top:0;left:0;width:100%;height:100%;background-color:#00000046;z-index:1000;display:flex;justify-content:center;align-items:center}._itemCheckbox_2k9qa_1{margin-right:10px}._gridHeader_2k9qa_5.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_2k9qa_5.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_2k9qa_5.ui.grid>.row>.column._itemColumn_2k9qa_15{display:flex;align-items:center}._gridHeader_4acv6_1.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_4acv6_1.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_4acv6_1.ui.grid>.row>.column._itemColumn_4acv6_11{display:flex;align-items:center}._itemCheckbox_4acv6_16{margin-right:10px}._linkedToColumn_4acv6_20>span{margin-right:6px}._main_16i8r_3,._main_16i8r_3>.ui.container{display:flex;flex-direction:column;min-height:0;flex:1}._slots_16i8r_11{font-weight:700;text-transform:uppercase;position:relative}._slots_16i8r_11:before{content:"";display:inline-block;background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23FF2D55'/%3e%3c/svg%3e");width:16px;height:16px;top:3px;position:relative;margin-right:8px}.button._slots_16i8r_11._empty_16i8r_28:before{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23736E7D'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23736E7D'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23736E7D'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23736E7D'/%3e%3c/svg%3e")}._searchContainer_16i8r_32{display:flex;align-items:center;justify-content:end}._searchContainer_16i8r_32 .dcl.text-filter{flex:1}._searchContainer_16i8r_32 ._searchInfo_16i8r_42{color:var(--secondary-text)}._syncedStatusList_16i8r_46.ui.dropdown{margin-left:25px;padding-left:7px;margin-right:10px;color:var(--primary)}._selectionInfo_16i8r_53{display:flex;justify-content:center;align-items:center;margin-bottom:20px;padding:10px 0;border:1px solid var(--secondary-text);border-radius:4px}._header_16i8r_63{display:flex;flex-direction:row;align-items:center;gap:16px;padding-right:142px;padding-left:90px;min-width:1400px;width:100%}._header_16i8r_63 ._content_16i8r_74{display:flex;flex-direction:row;background-color:#242129;padding:24px;width:calc(100% - 50px);border-radius:8px}._header_16i8r_63 ._title_16i8r_83{display:flex;flex-direction:row;align-items:center;gap:12px;overflow:hidden;margin-right:20px;flex:1 1 auto;min-width:0}._editCollectionName_16i8r_96{visibility:hidden;padding-left:16px}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101:hover+._editCollectionName_16i8r_96{visibility:visible}._nameAndType_16i8r_105{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}._nameWrapper_16i8r_115{display:flex;flex-direction:row;align-items:center;gap:15px;min-width:0;flex:1}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101{margin-top:0;margin-bottom:0;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:0;width:fit-content}._header_16i8r_63 ._title_16i8r_83 ._size_16i8r_139{font-size:16px}._header_16i8r_63 ._actions_16i8r_143{display:flex;flex-direction:row;align-items:center;gap:16px;flex:0 0 auto}._body_16i8r_151{display:flex;flex-direction:column;padding-right:142px;padding-left:142px;margin-top:16px;gap:16px;min-width:1400px;flex:1}._info_16i8r_162{display:flex;flex-direction:row;gap:10px;align-items:center;font-weight:600}._infoHeader_16i8r_170{display:flex;flex-direction:row;text-transform:uppercase;color:#a09ba8;gap:10px}._infoContent_16i8r_178{display:flex;flex-direction:row;align-items:center;gap:5px;border-radius:6px;padding:8px;background-color:#43404a}._info_16i8r_162 .dui-info-tooltip__trigger{background-repeat:no-repeat;background-size:cover;height:20px;width:20px}._slotsIcon_16i8r_195{background-color:#5e5b67;border-radius:32px;padding:2px;height:24px;width:24px;background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='14'%20viewBox='0%200%2019%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%204H4V0H2C0.9%200%200%200.9%200%202V4ZM0%209H4V5H0V9ZM5%209H9V5H5V9ZM10%209H14V5H10V9ZM5%204H9V0H5V4ZM10%200V4H14V0H10ZM15%209H19V5H15V9ZM2%2014H4V10H0V12C0%2013.1%200.9%2014%202%2014ZM5%2014H9V10H5V14ZM10%2014H14V10H10V14ZM15%2014H17C18.1%2014%2019%2013.1%2019%2012V10H15V14ZM15%200V4H19V2C19%200.9%2018.1%200%2017%200H15Z'%20fill='white'/%3e%3c/svg%3e");background-size:70%;background-position:center;background-repeat:no-repeat}._copyButton_16i8r_207{cursor:pointer}._empty_16i8r_28{padding:200px 0;width:100%;border-radius:8px;justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px;background-color:#242129}._empty_16i8r_28 h3{color:#cfcdd4;margin-bottom:5px}._empty_16i8r_28 p{color:#a09ba8}._sparkles_16i8r_232{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.21.1/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}._start_16i8r_241{width:80px;height:80px;background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6709_15241)'%3e%3cpath%20d='M20%2032.0004H28C29.1%2032.0004%2030%2031.1004%2030%2030.0004V20.0004H33.18C34.96%2020.0004%2035.86%2017.8404%2034.6%2016.5804L25.42%207.40043C24.64%206.62043%2023.38%206.62043%2022.6%207.40043L13.42%2016.5804C12.16%2017.8404%2013.04%2020.0004%2014.82%2020.0004H18V30.0004C18%2031.1004%2018.9%2032.0004%2020%2032.0004ZM12%2036.0004H36C37.1%2036.0004%2038%2036.9004%2038%2038.0004C38%2039.1004%2037.1%2040.0004%2036%2040.0004H12C10.9%2040.0004%2010%2039.1004%2010%2038.0004C10%2036.9004%2010.9%2036.0004%2012%2036.0004Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6709_15241'%3e%3crect%20width='48'%20height='48'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");background-size:48px;background-position:center;background-repeat:no-repeat;border-radius:50%;background-color:#43404a;margin:auto auto 20px}._migrationBanner_16i8r_254{min-width:1116px;color:#000;display:flex;align-items:center;background-color:#ffbc5b;padding:9px 16px;min-height:42px;font-weight:700;text-transform:uppercase;border-radius:8px;margin-right:142px;margin-left:142px;margin-top:15px}._migrationBanner_16i8r_254 .icon{height:18px;margin-right:10px}._type_16i8r_277{display:flex;flex-direction:row;gap:8px}._linkedWearableBadge_16i8r_283{padding:4px 8px;border-radius:32px}._typeBadge_16i8r_288{background-color:#00a146}._programmaticBadge_16i8r_292{background-color:#691fa9}._standardBadge_16i8r_296{background-color:#43404a}._loader_16i8r_302{display:flex;justify-content:center;align-items:center;min-height:0;flex:1}
|
|
1
|
+
._image_142g7_1,._main_142g7_2{position:relative;width:64px;height:64px;border-radius:50%!important}._image_142g7_1{overflow:hidden}._network_142g7_13{position:absolute;bottom:0;right:0;width:32px;height:32px;z-index:1}._ellipsis_4huv2_1{margin:auto!important;color:var(--primary-text)}._itemImage_1y9df_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1y9df_10{margin-right:4px}._grid_1y9df_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_1y9df_14:hover{background-color:#24212966;color:var(--text)}._row_1y9df_25{align-items:center!important;font-size:15px}._column_1y9df_30{display:flex!important}._statusColumn_1y9df_34{font-size:13px;text-transform:uppercase}._statusColumn_1y9df_34._synced_1y9df_39{color:#34ce76}._statusColumn_1y9df_34._unsynced_1y9df_43{color:#fc9965}._avatarColumn_1y9df_47{align-items:center;padding-left:10px!important}._nameWrapper_1y9df_52{display:flex;align-items:center;overflow:hidden}._name_1y9df_52{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1y9df_65{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1y9df_72{margin-left:5px}._status_rgxu1_1{text-transform:uppercase;padding:4px 8px;border-radius:32px;display:inline-flex;align-items:center;gap:4px}._status_rgxu1_1 .icon{height:18px}._pending_migration_rgxu1_14{color:#ffbc5b;background-color:#ffbc5b33}._synced_rgxu1_19{color:#65d890;background-color:#65d89033}._unpublished_rgxu1_24,._unsynced_rgxu1_25{color:#63b4f6;background-color:#63b4f633}._pending_mapping_rgxu1_30,._under_review_rgxu1_31{color:#ecebed;background-color:#ecebed33}._icon_rgxu1_10{width:17px;height:17px}._itemImage_1rili_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1rili_10{margin-right:4px}._grid_1rili_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider);position:relative}._grid_1rili_14:not(._loading_1rili_21):hover{background-color:#24212966;color:var(--text)}._row_1rili_26{align-items:center!important;font-size:15px}._column_1rili_31{display:flex!important}._avatarColumn_1rili_35{align-items:center;padding-left:10px!important}._nameWrapper_1rili_40{display:flex;align-items:center;overflow:hidden}._name_1rili_40{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1rili_53{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1rili_60{margin-left:5px}._overlay_1rili_65{position:absolute;pointer-events:none;z-index:100000000;top:0;left:0;width:100%;height:100%;background-color:#00000046;z-index:1000;display:flex;justify-content:center;align-items:center}._itemCheckbox_2k9qa_1{margin-right:10px}._gridHeader_2k9qa_5.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_2k9qa_5.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_2k9qa_5.ui.grid>.row>.column._itemColumn_2k9qa_15{display:flex;align-items:center}._gridHeader_4acv6_1.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_4acv6_1.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_4acv6_1.ui.grid>.row>.column._itemColumn_4acv6_11{display:flex;align-items:center}._itemCheckbox_4acv6_16{margin-right:10px}._linkedToColumn_4acv6_20>span{margin-right:6px}._main_16i8r_3,._main_16i8r_3>.ui.container{display:flex;flex-direction:column;min-height:0;flex:1}._slots_16i8r_11{font-weight:700;text-transform:uppercase;position:relative}._slots_16i8r_11:before{content:"";display:inline-block;background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23FF2D55'/%3e%3c/svg%3e");width:16px;height:16px;top:3px;position:relative;margin-right:8px}.button._slots_16i8r_11._empty_16i8r_28:before{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23736E7D'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23736E7D'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23736E7D'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23736E7D'/%3e%3c/svg%3e")}._searchContainer_16i8r_32{display:flex;align-items:center;justify-content:end}._searchContainer_16i8r_32 .dcl.text-filter{flex:1}._searchContainer_16i8r_32 ._searchInfo_16i8r_42{color:var(--secondary-text)}._syncedStatusList_16i8r_46.ui.dropdown{margin-left:25px;padding-left:7px;margin-right:10px;color:var(--primary)}._selectionInfo_16i8r_53{display:flex;justify-content:center;align-items:center;margin-bottom:20px;padding:10px 0;border:1px solid var(--secondary-text);border-radius:4px}._header_16i8r_63{display:flex;flex-direction:row;align-items:center;gap:16px;padding-right:142px;padding-left:90px;min-width:1400px;width:100%}._header_16i8r_63 ._content_16i8r_74{display:flex;flex-direction:row;background-color:#242129;padding:24px;width:calc(100% - 50px);border-radius:8px}._header_16i8r_63 ._title_16i8r_83{display:flex;flex-direction:row;align-items:center;gap:12px;overflow:hidden;margin-right:20px;flex:1 1 auto;min-width:0}._editCollectionName_16i8r_96{visibility:hidden;padding-left:16px}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101:hover+._editCollectionName_16i8r_96{visibility:visible}._nameAndType_16i8r_105{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}._nameWrapper_16i8r_115{display:flex;flex-direction:row;align-items:center;gap:15px;min-width:0;flex:1}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101{margin-top:0;margin-bottom:0;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:0;width:fit-content}._header_16i8r_63 ._title_16i8r_83 ._size_16i8r_139{font-size:16px}._header_16i8r_63 ._actions_16i8r_143{display:flex;flex-direction:row;align-items:center;gap:16px;flex:0 0 auto}._body_16i8r_151{display:flex;flex-direction:column;padding-right:142px;padding-left:142px;margin-top:16px;gap:16px;min-width:1400px;flex:1}._info_16i8r_162{display:flex;flex-direction:row;gap:10px;align-items:center;font-weight:600}._infoHeader_16i8r_170{display:flex;flex-direction:row;text-transform:uppercase;color:#a09ba8;gap:10px}._infoContent_16i8r_178{display:flex;flex-direction:row;align-items:center;gap:5px;border-radius:6px;padding:8px;background-color:#43404a}._info_16i8r_162 .dui-info-tooltip__trigger{background-repeat:no-repeat;background-size:cover;height:20px;width:20px}._slotsIcon_16i8r_195{background-color:#5e5b67;border-radius:32px;padding:2px;height:24px;width:24px;background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='14'%20viewBox='0%200%2019%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%204H4V0H2C0.9%200%200%200.9%200%202V4ZM0%209H4V5H0V9ZM5%209H9V5H5V9ZM10%209H14V5H10V9ZM5%204H9V0H5V4ZM10%200V4H14V0H10ZM15%209H19V5H15V9ZM2%2014H4V10H0V12C0%2013.1%200.9%2014%202%2014ZM5%2014H9V10H5V14ZM10%2014H14V10H10V14ZM15%2014H17C18.1%2014%2019%2013.1%2019%2012V10H15V14ZM15%200V4H19V2C19%200.9%2018.1%200%2017%200H15Z'%20fill='white'/%3e%3c/svg%3e");background-size:70%;background-position:center;background-repeat:no-repeat}._copyButton_16i8r_207{cursor:pointer}._empty_16i8r_28{padding:200px 0;width:100%;border-radius:8px;justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px;background-color:#242129}._empty_16i8r_28 h3{color:#cfcdd4;margin-bottom:5px}._empty_16i8r_28 p{color:#a09ba8}._sparkles_16i8r_232{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.21.2-19872797940.commit-aecff8d/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}._start_16i8r_241{width:80px;height:80px;background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6709_15241)'%3e%3cpath%20d='M20%2032.0004H28C29.1%2032.0004%2030%2031.1004%2030%2030.0004V20.0004H33.18C34.96%2020.0004%2035.86%2017.8404%2034.6%2016.5804L25.42%207.40043C24.64%206.62043%2023.38%206.62043%2022.6%207.40043L13.42%2016.5804C12.16%2017.8404%2013.04%2020.0004%2014.82%2020.0004H18V30.0004C18%2031.1004%2018.9%2032.0004%2020%2032.0004ZM12%2036.0004H36C37.1%2036.0004%2038%2036.9004%2038%2038.0004C38%2039.1004%2037.1%2040.0004%2036%2040.0004H12C10.9%2040.0004%2010%2039.1004%2010%2038.0004C10%2036.9004%2010.9%2036.0004%2012%2036.0004Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6709_15241'%3e%3crect%20width='48'%20height='48'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");background-size:48px;background-position:center;background-repeat:no-repeat;border-radius:50%;background-color:#43404a;margin:auto auto 20px}._migrationBanner_16i8r_254{min-width:1116px;color:#000;display:flex;align-items:center;background-color:#ffbc5b;padding:9px 16px;min-height:42px;font-weight:700;text-transform:uppercase;border-radius:8px;margin-right:142px;margin-left:142px;margin-top:15px}._migrationBanner_16i8r_254 .icon{height:18px;margin-right:10px}._type_16i8r_277{display:flex;flex-direction:row;gap:8px}._linkedWearableBadge_16i8r_283{padding:4px 8px;border-radius:32px}._typeBadge_16i8r_288{background-color:#00a146}._programmaticBadge_16i8r_292{background-color:#691fa9}._standardBadge_16i8r_296{background-color:#43404a}._loader_16i8r_302{display:flex;justify-content:center;align-items:center;min-height:0;flex:1}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as l,a4 as E,dF as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dq as B,dv as H,ad as R,bq as O,cT as P,bY as F,ca as A,cW as q}from"./index-
|
|
1
|
+
import{J as l,a4 as E,dF as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dq as B,dv as H,ad as R,bq as O,cT as P,bY as F,ca as A,cW as q}from"./index-4YYgi5nn.js";import{L as z}from"./LoggedInDetailPage.container-D3flN0sg.js";import{B as D}from"./Back-DF3b8Vad.js";import{N as M}from"./NotFound-Dbnnn04F.js";import"./Navigation.container-C6riyJpf.js";import"./selectors-Bdn7uSD3.js";import"./SignInRequired-B9AD3g_2.js";function G(i){const[s,u]=l.useState(void 0),[g,L]=l.useState(void 0),{isLoading:b,ens:o,landTiles:c}=i,m=E(),x=l.useMemo(()=>{const a=Object.values(c||{});if(a.length===1)return a[0].land;let n;for(const d of a)if(d.land.id!==o.landId){n=d.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const d=h(a,n);return c&&d in c?c[d].land:void 0},[c]),f=l.useCallback((a,n)=>{const d=j(a,n);d&&u(d)},[]),v=l.useCallback(()=>{const a=w(c,s.id);u(a)},[s,c]),S=l.useCallback(()=>{s&&m.push(I.landAssignENS(s.id,o.subdomain))},[o,m,s]),C=l.useCallback((a,n)=>{const d=h(a,n);return(!s||s.id!==d)&&g===d},[]),_=l.useCallback((a,n)=>C(a,n)&&j(a,n)?{color:"#fcc6d1",scale:1.4}:null,[]),k=l.useCallback((a,n)=>{L(h(a,n))},[]),p=l.useCallback(()=>{m.goBack()},[m]),N=s&&o&&s.id===o.landId;return e.jsx(z,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(t.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(D,{absolute:!0,onClick:p}),e.jsxs(t.Narrow,{children:[e.jsx(t.Row,{children:e.jsx(t.Column,{children:e.jsxs(t.Section,{children:[e.jsx(t.Header,{className:"title",size:"large",children:r("ens_select_land_page.title",{name:o?o.subdomain:r("global.name")})}),e.jsx("span",{className:"subtitle",children:r("ens_select_land_page.subtitle")})]})})}),e.jsx("div",{className:"atlas-wrapper",children:e.jsx(T,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:v,layers:[_]})}),e.jsxs(t.Row,{className:"atlas-footer",children:[e.jsx(t.Column,{grow:!0,children:s?e.jsxs("div",{className:"selected-land",children:[e.jsx("div",{className:"label",children:r("ens_select_land_page.land_selected")}),e.jsxs("div",{className:"land",children:[s.name," (",s.id,")"]})]}):null}),e.jsx(t.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(t.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(t.Button,{primary:!0,disabled:!s||N,onClick:S,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(M,{})})}const J=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:H(g,u),isLoading:R(i)||O(P(i),q)||F(i),landTiles:A(i)}},X=y(J)(G);export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Y=Object.defineProperty;var J=(r,a,n)=>a in r?Y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>J(r,typeof a!="symbol"?a+"":a,n);import{J as c,N as e,P as X,a4 as Z,R as M,eB as F,e$ as V,f0 as w,f1 as I,eY as H,f2 as $,f3 as ee,f4 as S,f5 as se,f6 as ae,f7 as te,S as i,M as t,dN as ie,f8 as le,f9 as T,fa as ne,fb as ce,fc as re,Q as oe,eA as de,cN as ue,fd as me,fe as z,aR as he,ff as pe,cM as xe,fg as je,fh as ge,fi as ve,fj as Ne,aa as be,ab as g,ej as fe,fk as Ie,fl as _e,fm as Ce,eN as ye,fn as Ee,bq as D,fo as ke,fp as Se,ey as Te,a2 as Pe,eW as Me,fq as we,fr as De}from"./index-CqEav8hD.js";import{d as Re}from"./hooks-DyfSYu7v.js";import{I as Le}from"./ItemProvider.container-CUtJwrIb.js";import{C as Be}from"./ConfirmDelete-BXf4aiA9.js";import{L as Ue}from"./LoggedInDetailPage.container-W6mC_E_U.js";import{N as Oe}from"./NotFound-CJstsdBm.js";import{B as Ae}from"./Back-BatsJM74.js";import"./Navigation.container-CeHK8swJ.js";import"./selectors-iAfkvT41.js";import"./SignInRequired-DIzGXfdC.js";class qe extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(X,{name:"close",onClick:this.handleCloseNotice})]})}}const Fe="dcl-item-notice";function Ve(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:p,onOpenModal:u}=r,j=c.useRef(null),b=Z(),f=c.useCallback(()=>{a&&b.push(M.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:F(a.urn)?V.TP_COLLECTIONS:V.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[I]:s}),h={...a,contents:{...a==null?void 0:a.contents,[I]:l[I]}};v&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(v)&&(h.video=l[I]),p(h,{[I]:s})},[p,a,v]),x=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),R=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),L=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);p({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[p,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},p(a,{[S]:k}))}},[p,a]),A=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),W=c.useCallback((s,l)=>{var q;const h=s.data,K=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Ae,{onClick:()=>b.push(M.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(qe,{storageKey:Fe,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:x,children:(m,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:x})}),e.jsxs(i.Button,{primary:!0,onClick:x,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:M.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:F(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:L,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:f,children:t("collection_detail_page.preview")}),K?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:R,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=pe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:xe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((q=s.data.requiredPermissions)!=null&&q.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,x,L,E,E,A,f,R,f]);return e.jsx(Le,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?W(s,l):e.jsx(Oe,{})})})}const He=()=>{const r=be(),a=Re(),n=g(fe),o=g(d=>a?Ie(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,p=D(N,Me)||D(N,we)||D(N,De),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,x)=>r(Se(d,x)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),f=c.useCallback((d,x)=>r(Pe(d,x)),[r]);return e.jsx(Ve,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:p,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:f})},as=He;export{as as default};
|
|
1
|
+
var Y=Object.defineProperty;var J=(r,a,n)=>a in r?Y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>J(r,typeof a!="symbol"?a+"":a,n);import{J as c,N as e,P as X,a4 as Z,R as M,eB as F,e$ as V,f0 as w,f1 as I,eY as H,f2 as $,f3 as ee,f4 as S,f5 as se,f6 as ae,f7 as te,S as i,M as t,dN as ie,f8 as le,f9 as T,fa as ne,fb as ce,fc as re,Q as oe,eA as de,cN as ue,fd as me,fe as z,aR as he,ff as pe,cM as xe,fg as je,fh as ge,fi as ve,fj as Ne,aa as be,ab as g,ej as fe,fk as Ie,fl as _e,fm as Ce,eN as ye,fn as Ee,bq as D,fo as ke,fp as Se,ey as Te,a2 as Pe,eW as Me,fq as we,fr as De}from"./index-4YYgi5nn.js";import{d as Re}from"./hooks-sFzfMYjS.js";import{I as Le}from"./ItemProvider.container-cnm5in2H.js";import{C as Be}from"./ConfirmDelete-ByyhO6oc.js";import{L as Ue}from"./LoggedInDetailPage.container-D3flN0sg.js";import{N as Oe}from"./NotFound-Dbnnn04F.js";import{B as Ae}from"./Back-DF3b8Vad.js";import"./Navigation.container-C6riyJpf.js";import"./selectors-Bdn7uSD3.js";import"./SignInRequired-B9AD3g_2.js";class qe extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(X,{name:"close",onClick:this.handleCloseNotice})]})}}const Fe="dcl-item-notice";function Ve(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:p,onOpenModal:u}=r,j=c.useRef(null),b=Z(),f=c.useCallback(()=>{a&&b.push(M.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:F(a.urn)?V.TP_COLLECTIONS:V.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[I]:s}),h={...a,contents:{...a==null?void 0:a.contents,[I]:l[I]}};v&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(v)&&(h.video=l[I]),p(h,{[I]:s})},[p,a,v]),x=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),R=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),L=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);p({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[p,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},p(a,{[S]:k}))}},[p,a]),A=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),W=c.useCallback((s,l)=>{var q;const h=s.data,K=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Ae,{onClick:()=>b.push(M.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(qe,{storageKey:Fe,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:x,children:(m,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:x})}),e.jsxs(i.Button,{primary:!0,onClick:x,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:M.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:F(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:L,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:f,children:t("collection_detail_page.preview")}),K?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:R,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=pe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:xe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((q=s.data.requiredPermissions)!=null&&q.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,x,L,E,E,A,f,R,f]);return e.jsx(Le,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?W(s,l):e.jsx(Oe,{})})})}const He=()=>{const r=be(),a=Re(),n=g(fe),o=g(d=>a?Ie(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,p=D(N,Me)||D(N,we)||D(N,De),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,x)=>r(Se(d,x)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),f=c.useCallback((d,x)=>r(Pe(d,x)),[r]);return e.jsx(Ve,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:p,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:f})},as=He;export{as as default};
|