@atproto/oauth-provider-ui 0.5.2 → 0.6.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization-page-CVdjW3kW.js","sources":["../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/defs/Atom.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/defs/BookOpen.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/defs/Certificate.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/defs/ChatCircleDots.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/defs/Envelope.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/defs/Hand.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/defs/IdentificationBadge.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/csr/Atom.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/csr/BookOpen.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/csr/Certificate.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/csr/ChatCircleDots.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/csr/Envelope.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/csr/Hand.es.js","../../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.0.0_react@19.0.0/node_modules/@phosphor-icons/react/dist/csr/IdentificationBadge.es.js","../../oauth-scopes/dist/lib/syntax.js","../../oauth-scopes/dist/lib/util.js","../../oauth-scopes/dist/lib/syntax-string.js","../../oauth-scopes/dist/lib/parser.js","../../oauth-scopes/dist/scopes/account-permission.js","../../oauth-scopes/dist/lib/mime.js","../../oauth-scopes/dist/scopes/blob-permission.js","../../oauth-scopes/dist/scopes/identity-permission.js","../../../syntax/dist/lib/result.js","../../../syntax/dist/nsid.js","../../oauth-scopes/dist/lib/nsid.js","../../oauth-scopes/dist/lib/syntax-lexicon.js","../../oauth-scopes/dist/scopes/repo-permission.js","../../oauth-scopes/dist/scopes/rpc-permission.js","../../oauth-scopes/dist/scopes/include-scope.js","../../oauth-scopes/dist/scope-missing-error.js","../../oauth-scopes/dist/scopes-set.js","../../oauth-scopes/dist/scope-permissions.js","../../oauth-scopes/dist/scope-permissions-transition.js","../src/components/utils/client-image.tsx","../src/lib/oauth-client.ts","../src/components/utils/url-viewer.tsx","../src/components/utils/client-name.tsx","../../../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.0.4_@types+react@19.0.10_react-dom@19.0.0_react@19.0.0/node_modules/@radix-ui/react-dialog/dist/index.mjs","../src/components/utils/description-card.tsx","../src/components/utils/icons.tsx","../src/components/utils/scope-description.tsx","../src/components/consent-form.tsx","../src/components/consent-view.tsx","../src/authorization-page.tsx"],"sourcesContent":["import * as a from \"react\";\nconst c = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M219.23,159.2a196.66,196.66,0,0,0-18-31.2,196.66,196.66,0,0,0,18-31.2c11.84-26.31,11.69-47.48-.43-59.6s-33.29-12.27-59.6-.43a196.66,196.66,0,0,0-31.2,18,196.66,196.66,0,0,0-31.2-18c-26.31-11.84-47.48-11.69-59.6.43s-12.27,33.29-.43,59.6a196.66,196.66,0,0,0,18,31.2,196.66,196.66,0,0,0-18,31.2c-11.84,26.31-11.69,47.48.43,59.6h0C43.33,224.93,51.78,228,62,228c10,0,21.77-2.92,34.76-8.77a196.66,196.66,0,0,0,31.2-18,196.66,196.66,0,0,0,31.2,18c13,5.85,24.74,8.77,34.76,8.77,10.26,0,18.71-3.07,24.84-9.2h0C230.92,206.68,231.07,185.51,219.23,159.2Zm-17.41-105c5.25,5.26,1.79,26-16,53.78-5.61-6.66-11.65-13.25-18.07-19.67S154.7,75.83,148,70.22C175.82,52.39,196.56,48.93,201.82,54.18ZM171.24,128a288.6,288.6,0,0,1-20.51,22.73A288.6,288.6,0,0,1,128,171.24a288.6,288.6,0,0,1-22.73-20.51A288.6,288.6,0,0,1,84.76,128,298.55,298.55,0,0,1,128,84.76a286.83,286.83,0,0,1,22.73,20.51A286.83,286.83,0,0,1,171.24,128ZM54.18,54.18c1.46-1.45,4.1-2.24,7.75-2.24,9.53,0,25.94,5.39,46,18.28-6.66,5.61-13.25,11.65-19.67,18.07S75.83,101.3,70.22,108C52.39,80.18,48.93,59.44,54.18,54.18Zm0,147.64c-5.25-5.26-1.79-26,16-53.78,5.61,6.66,11.65,13.25,18.07,19.67s13,12.46,19.67,18.07C80.18,203.61,59.44,207.07,54.18,201.82Zm147.64,0c-5.26,5.25-26,1.79-53.78-16,6.66-5.61,13.25-11.65,19.67-18.07s12.46-13,18.07-19.67C203.61,175.82,207.07,196.56,201.82,201.82ZM144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M210.26,210.26c-17.23,17.23-68-5.63-113.46-51.06S28.51,63,45.74,45.74s68,5.63,113.46,51.06S227.49,193,210.26,210.26Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.48,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A300.33,300.33,0,0,0,141.27,70C172.15,49,196.91,43.8,204.55,51.45ZM176.29,128a289.14,289.14,0,0,1-22.76,25.53A289.14,289.14,0,0,1,128,176.29a289.14,289.14,0,0,1-25.53-22.76A289.14,289.14,0,0,1,79.71,128,298.62,298.62,0,0,1,128,79.71a289.14,289.14,0,0,1,25.53,22.76A289.14,289.14,0,0,1,176.29,128ZM51.45,51.45c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.2,51.45,204.55Zm153.1,0c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55ZM140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.47,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A302.47,302.47,0,0,0,141.27,70C172.15,49,196.91,43.81,204.55,51.45Zm-153.1,0c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.19,51.45,204.55ZM128,140a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm76.55,64.56c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M193.83,128a195.73,195.73,0,0,0,19.9-33.65c10.74-23.88,11-42.66.8-52.88s-29-9.94-52.88.8A195.73,195.73,0,0,0,128,62.17a195.73,195.73,0,0,0-33.65-19.9c-23.88-10.74-42.66-11-52.88-.8s-9.94,29,.8,52.88A195.73,195.73,0,0,0,62.17,128a195.73,195.73,0,0,0-19.9,33.65c-10.74,23.88-11,42.66-.8,52.88h0c5,5,12,7.47,20.63,7.47,9.1,0,20-2.76,32.25-8.27A195.73,195.73,0,0,0,128,193.83a195.73,195.73,0,0,0,33.65,19.9C173.9,219.24,184.8,222,193.9,222c8.64,0,15.65-2.49,20.63-7.47h0c10.23-10.22,9.94-29-.8-52.88A195.73,195.73,0,0,0,193.83,128ZM206,50c9.28,9.28,2.36,36.29-19.8,68a306.2,306.2,0,0,0-22.78-25.45A306.2,306.2,0,0,0,138,69.76C169.75,47.61,196.77,40.68,206,50Zm-27.19,78A289.17,289.17,0,0,1,155,155a289.17,289.17,0,0,1-27,23.88A289.17,289.17,0,0,1,101,155a290.62,290.62,0,0,1-23.88-27A297.06,297.06,0,0,1,128,77.14,290.74,290.74,0,0,1,155,101,289.17,289.17,0,0,1,178.85,128ZM50,50c2.68-2.69,6.84-4,12.17-4,13.11,0,33.3,8,55.87,23.81A302.94,302.94,0,0,0,92.54,92.54,306.2,306.2,0,0,0,69.76,118C47.6,86.25,40.68,59.24,50,50ZM50,206h0c-9.28-9.28-2.35-36.29,19.8-68a306.2,306.2,0,0,0,22.78,25.45A306.2,306.2,0,0,0,118,186.24C86.25,208.4,59.24,215.32,50,206ZM206,206c-9.28,9.28-36.29,2.35-68-19.81a304.26,304.26,0,0,0,25.45-22.77A306.2,306.2,0,0,0,186.24,138C208.4,169.75,215.32,196.76,206,206Zm-68-78a10,10,0,1,1-10-10A10,10,0,0,1,138,128Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.48,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A300.33,300.33,0,0,0,141.27,70C172.15,49,196.91,43.8,204.55,51.45ZM176.29,128a289.14,289.14,0,0,1-22.76,25.53A289.14,289.14,0,0,1,128,176.29a289.14,289.14,0,0,1-25.53-22.76A289.14,289.14,0,0,1,79.71,128,298.62,298.62,0,0,1,128,79.71a289.14,289.14,0,0,1,25.53,22.76A289.14,289.14,0,0,1,176.29,128ZM51.45,51.45c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.2,51.45,204.55Zm153.1,0c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55ZM140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M211.89,162.47A195.58,195.58,0,0,0,191.36,128a195.58,195.58,0,0,0,20.53-34.47c10.38-23.06,10.81-41,1.21-50.63s-27.57-9.17-50.63,1.21A195.58,195.58,0,0,0,128,64.64,195.58,195.58,0,0,0,93.53,44.11C70.47,33.73,52.49,33.3,42.9,42.9s-9.17,27.57,1.21,50.63A195.58,195.58,0,0,0,64.64,128a195.58,195.58,0,0,0-20.53,34.47c-10.38,23.06-10.81,41-1.21,50.63h0C47.5,217.7,54,220,62.12,220c8.78,0,19.41-2.71,31.41-8.11A195.58,195.58,0,0,0,128,191.36a195.58,195.58,0,0,0,34.47,20.53c12,5.4,22.63,8.11,31.41,8.11,8.09,0,14.62-2.3,19.22-6.9h0C222.7,203.51,222.27,185.53,211.89,162.47ZM207.45,48.55c10.27,10.28,3.14,39.05-21.1,72.84A301,301,0,0,0,162,94a301,301,0,0,0-27.43-24.31C168.4,45.4,197.17,38.27,207.45,48.55Zm-26,79.45a293.16,293.16,0,0,1-25,28.38,291.82,291.82,0,0,1-28.38,25,291.82,291.82,0,0,1-28.38-25,293.16,293.16,0,0,1-25-28.38A302.36,302.36,0,0,1,128,74.58a295.83,295.83,0,0,1,28.37,25A293.16,293.16,0,0,1,181.41,128ZM48.55,48.55c3.05-3,7.71-4.55,13.64-4.55,14.11,0,35.41,8.59,59.19,25.65a304.89,304.89,0,0,0-51.73,51.74C45.41,87.6,38.28,58.83,48.55,48.55Zm0,158.9c-10.27-10.28-3.14-39,21.1-72.84A301,301,0,0,0,94,162a301,301,0,0,0,27.43,24.31C87.6,210.59,58.83,217.72,48.55,207.45Zm158.9,0c-10.28,10.27-39,3.14-72.84-21.1A301,301,0,0,0,162,162a301,301,0,0,0,24.31-27.43C210.59,168.4,217.72,197.17,207.45,207.45ZM136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Z\" }))\n ]\n]);\nexport {\n c as default\n};\n","import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M128,140a12,12,0,0,1-12,12H72a12,12,0,0,1,0-24h44A12,12,0,0,1,128,140ZM116,88H72a12,12,0,0,0,0,24h44a12,12,0,0,0,0-24Zm120,79.14V228a12,12,0,0,1-17.95,10.42L196,225.82,174,238.42A12,12,0,0,1,156,228V204H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216a20,20,0,0,1,20,20V88.86a55.87,55.87,0,0,1,0,78.28ZM196,160a32,32,0,1,0-32-32A32,32,0,0,0,196,160Zm-40,20V167.14a56,56,0,0,1,56-92.8V60H44V180Zm56,27.32V181.66a55.87,55.87,0,0,1-32,0v25.66l10.05-5.74a12,12,0,0,1,11.9,0Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M224,56V90.06h0a44,44,0,1,0-56,67.88h0V192H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M128,136a8,8,0,0,1-8,8H72a8,8,0,0,1,0-16h48A8,8,0,0,1,128,136Zm-8-40H72a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm112,65.47V224A8,8,0,0,1,220,231l-24-13.74L172,231A8,8,0,0,1,160,224V200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216a16,16,0,0,1,16,16V86.53a51.88,51.88,0,0,1,0,74.94ZM160,184V161.47A52,52,0,0,1,216,76V56H40V184Zm56-12a51.88,51.88,0,0,1-40,0v38.22l16-9.16a8,8,0,0,1,7.94,0l16,9.16Zm16-48a36,36,0,1,0-36,36A36,36,0,0,0,232,124Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M232,86.53V56a16,16,0,0,0-16-16H40A16,16,0,0,0,24,56V184a16,16,0,0,0,16,16H160v24A8,8,0,0,0,172,231l24-13.74L220,231A8,8,0,0,0,232,224V161.47a51.88,51.88,0,0,0,0-74.94ZM128,144H72a8,8,0,0,1,0-16h56a8,8,0,0,1,0,16Zm0-32H72a8,8,0,0,1,0-16h56a8,8,0,0,1,0,16Zm88,98.21-16-9.16a8,8,0,0,0-7.94,0l-16,9.16V172a51.88,51.88,0,0,0,40,0ZM196,160a36,36,0,1,1,36-36A36,36,0,0,1,196,160Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M126,136a6,6,0,0,1-6,6H72a6,6,0,0,1,0-12h48A6,6,0,0,1,126,136Zm-6-38H72a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Zm110,62.62V224a6,6,0,0,1-9,5.21l-25-14.3-25,14.3a6,6,0,0,1-9-5.21V198H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216a14,14,0,0,1,14,14V87.38a49.91,49.91,0,0,1,0,73.24ZM196,86a38,38,0,1,0,38,38A38,38,0,0,0,196,86ZM162,186V160.62a50,50,0,0,1,56-81.51V56a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V184a2,2,0,0,0,2,2Zm56-17.11a49.91,49.91,0,0,1-44,0v44.77l19-10.87a6,6,0,0,1,6,0l19,10.87Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M128,136a8,8,0,0,1-8,8H72a8,8,0,0,1,0-16h48A8,8,0,0,1,128,136Zm-8-40H72a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm112,65.47V224A8,8,0,0,1,220,231l-24-13.74L172,231A8,8,0,0,1,160,224V200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216a16,16,0,0,1,16,16V86.53a51.88,51.88,0,0,1,0,74.94ZM160,184V161.47A52,52,0,0,1,216,76V56H40V184Zm56-12a51.88,51.88,0,0,1-40,0v38.22l16-9.16a8,8,0,0,1,7.94,0l16,9.16Zm16-48a36,36,0,1,0-36,36A36,36,0,0,0,232,124Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M124,136a4,4,0,0,1-4,4H72a4,4,0,0,1,0-8h48A4,4,0,0,1,124,136Zm-4-36H72a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Zm108,59.74V224a4,4,0,0,1-6,3.47l-26-14.86-26,14.86a4,4,0,0,1-6-3.47V196H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216a12,12,0,0,1,12,12V88.26a47.92,47.92,0,0,1,0,71.48ZM196,84a40,40,0,1,0,40,40A40,40,0,0,0,196,84ZM164,188V159.74a48,48,0,0,1,56-77.28V56a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V184a4,4,0,0,0,4,4Zm56-22.46a47.81,47.81,0,0,1-48,0v51.57l22-12.58a4,4,0,0,1,4,0l22,12.58Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M120,128a16,16,0,1,1-16-16A16,16,0,0,1,120,128Zm32-16a16,16,0,1,0,16,16A16,16,0,0,0,152,112Zm84,16A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58,10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56,8A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as e from \"react\";\nconst a = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44Zm-96,83.72L62.85,68h130.3ZM92.79,128,44,172.72V83.28Zm17.76,16.28,9.34,8.57a12,12,0,0,0,16.22,0l9.34-8.57L193.15,188H62.85ZM163.21,128,212,83.28v89.44Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M224,56l-96,88L32,56Z\", opacity: \"0.2\" }), /* @__PURE__ */ e.createElement(\"path\", { d: \"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-96,85.15L52.57,64H203.43ZM98.71,128,40,181.81V74.19Zm11.84,10.85,12,11.05a8,8,0,0,0,10.82,0l12-11.05,58,53.15H52.57ZM157.29,128,216,74.18V181.82Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM98.71,128,40,181.81V74.19Zm11.84,10.85,12,11.05a8,8,0,0,0,10.82,0l12-11.05,58,53.15H52.57ZM157.29,128,216,74.18V181.82Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50Zm-96,85.86L47.42,62H208.58ZM101.67,128,38,186.36V69.64Zm8.88,8.14L124,148.42a6,6,0,0,0,8.1,0l13.4-12.28L208.58,194H47.43ZM154.33,128,218,69.64V186.36Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-96,85.15L52.57,64H203.43ZM98.71,128,40,181.81V74.19Zm11.84,10.85,12,11.05a8,8,0,0,0,10.82,0l12-11.05,58,53.15H52.57ZM157.29,128,216,74.18V181.82Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52Zm-96,86.57L42.28,60H213.72ZM104.63,128,36,190.91V65.09Zm5.92,5.43L125.3,147a4,4,0,0,0,5.4,0l14.75-13.52L213.72,196H42.28ZM151.37,128,220,65.09V190.91Z\" }))\n ]\n]);\nexport {\n a as default\n};\n","import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M188,44a32,32,0,0,0-8,1V44a32,32,0,0,0-60.79-14A32,32,0,0,0,76,60v50.83a32,32,0,0,0-52,36.7C55.82,214.6,75.35,244,128,244a92.1,92.1,0,0,0,92-92V76A32,32,0,0,0,188,44Zm8,108a68.08,68.08,0,0,1-68,68c-35.83,0-49.71-14-82.48-83.14-.14-.29-.29-.58-.45-.86a8,8,0,0,1,13.85-8l.21.35,18.68,30A12,12,0,0,0,100,152V60a8,8,0,0,1,16,0v60a12,12,0,0,0,24,0V44a8,8,0,0,1,16,0v76a12,12,0,0,0,24,0V76a8,8,0,0,1,16,0Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M208,76v76a80,80,0,0,1-80,80c-44.18,0-60.75-21.28-93.32-90a20,20,0,0,1,34.64-20L88,152V60a20,20,0,0,1,40,0V44a20,20,0,0,1,40,0V76a20,20,0,0,1,40,0Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M188,48a27.75,27.75,0,0,0-12,2.71V44a28,28,0,0,0-54.65-8.6A28,28,0,0,0,80,60v64l-3.82-6.13a28,28,0,0,0-48.6,27.82c16,33.77,28.93,57.72,43.72,72.69C86.24,233.54,103.2,240,128,240a88.1,88.1,0,0,0,88-88V76A28,28,0,0,0,188,48Zm12,104a72.08,72.08,0,0,1-72,72c-20.38,0-33.51-4.88-45.33-16.85C69.44,193.74,57.26,171,41.9,138.58a6.36,6.36,0,0,0-.3-.58,12,12,0,0,1,20.79-12,1.76,1.76,0,0,0,.14.23l18.67,30A8,8,0,0,0,96,152V60a12,12,0,0,1,24,0v60a8,8,0,0,0,16,0V44a12,12,0,0,1,24,0v76a8,8,0,0,0,16,0V76a12,12,0,0,1,24,0Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M216,64v90.93c0,46.2-36.85,84.55-83,85.06A83.71,83.71,0,0,1,72.6,215.4C50.79,192.33,26.15,136,26.15,136a16,16,0,0,1,6.53-22.23c7.66-4,17.1-.84,21.4,6.62l21,36.44a6.09,6.09,0,0,0,6,3.09l.12,0A8.19,8.19,0,0,0,88,151.74V48a16,16,0,0,1,16.77-16c8.61.4,15.23,7.82,15.23,16.43V112a8,8,0,0,0,8.53,8,8.17,8.17,0,0,0,7.47-8.25V32a16,16,0,0,1,16.77-16c8.61.4,15.23,7.82,15.23,16.43V120a8,8,0,0,0,8.53,8,8.17,8.17,0,0,0,7.47-8.25V64.45c0-8.61,6.62-16,15.23-16.43A16,16,0,0,1,216,64Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M188,50a25.8,25.8,0,0,0-14,4.11V44a26,26,0,0,0-51.41-5.51A26,26,0,0,0,82,60v71l-7.53-12.1a26,26,0,0,0-45.11,25.87C60.76,211,78.51,238,128,238a86.1,86.1,0,0,0,86-86V76A26,26,0,0,0,188,50Zm14,102a74.09,74.09,0,0,1-74,74c-21,0-34.51-5.05-46.75-17.45C67.81,195,55.54,172,40.1,139.43l-.23-.43a14,14,0,0,1,24.25-14l.1.17,18.68,30A6,6,0,0,0,94,152V60a14,14,0,0,1,28,0v60a6,6,0,0,0,12,0V44a14,14,0,0,1,28,0v76a6,6,0,0,0,12,0V76a14,14,0,0,1,28,0Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M188,48a27.75,27.75,0,0,0-12,2.71V44a28,28,0,0,0-54.65-8.6A28,28,0,0,0,80,60v64l-3.82-6.13a28,28,0,0,0-48.6,27.82c16,33.77,28.93,57.72,43.72,72.69C86.24,233.54,103.2,240,128,240a88.1,88.1,0,0,0,88-88V76A28,28,0,0,0,188,48Zm12,104a72.08,72.08,0,0,1-72,72c-20.38,0-33.51-4.88-45.33-16.85C69.44,193.74,57.26,171,41.9,138.58a6.36,6.36,0,0,0-.3-.58,12,12,0,0,1,20.79-12,1.76,1.76,0,0,0,.14.23l18.67,30A8,8,0,0,0,96,152V60a12,12,0,0,1,24,0v60a8,8,0,0,0,16,0V44a12,12,0,0,1,24,0v76a8,8,0,0,0,16,0V76a12,12,0,0,1,24,0Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M188,52a23.9,23.9,0,0,0-16,6.13V44a24,24,0,0,0-47.93-1.8A24,24,0,0,0,84,60v78L72.75,119.94a24,24,0,0,0-41.62,23.92C64.44,214.12,82.17,236,128,236a84.09,84.09,0,0,0,84-84V76A24,24,0,0,0,188,52Zm16,100a76.09,76.09,0,0,1-76,76c-37.29,0-53.59-11.51-89.71-87.71l-.15-.29a16,16,0,0,1,27.71-16,.75.75,0,0,1,.07.12l18.68,30A4,4,0,0,0,92,152V60a16,16,0,0,1,32,0v60a4,4,0,0,0,8,0V44a16,16,0,0,1,32,0v76a4,4,0,0,0,8,0V76a16,16,0,0,1,32,0Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as a from \"react\";\nconst e = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M200,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V40A20,20,0,0,0,200,20Zm-4,192H60V44H196ZM84,68A12,12,0,0,1,96,56h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,68Zm8.8,127.37a48,48,0,0,1,70.4,0,12,12,0,0,0,17.6-16.32,72,72,0,0,0-19.21-14.68,44,44,0,1,0-67.19,0,72.12,72.12,0,0,0-19.2,14.68,12,12,0,0,0,17.6,16.32ZM128,116a20,20,0,1,1-20,20A20,20,0,0,1,128,116Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\n \"path\",\n {\n d: \"M200,32H56a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H200a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32ZM128,168a32,32,0,1,1,32-32A32,32,0,0,1,128,168Z\",\n opacity: \"0.2\"\n }\n ), /* @__PURE__ */ a.createElement(\"path\", { d: \"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M200,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24ZM96,48h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm84.81,150.4a8,8,0,0,1-11.21-1.6,52,52,0,0,0-83.2,0,8,8,0,1,1-12.8-9.6A67.88,67.88,0,0,1,101,165.51a40,40,0,1,1,53.94,0A67.88,67.88,0,0,1,182.4,187.2,8,8,0,0,1,180.81,198.4ZM152,136a24,24,0,1,1-24-24A24,24,0,0,1,152,136Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M151.11,166.13a38,38,0,1,0-46.22,0A65.75,65.75,0,0,0,75.2,188.4a6,6,0,0,0,9.6,7.2,54,54,0,0,1,86.4,0,6,6,0,0,0,9.6-7.2A65.75,65.75,0,0,0,151.11,166.13ZM128,110a26,26,0,1,1-26,26A26,26,0,0,1,128,110Zm72-84H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V40A14,14,0,0,0,200,26Zm2,190a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2ZM90,64a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,64Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(\"path\", { d: \"M146.7,166.75a36,36,0,1,0-37.4,0A63.61,63.61,0,0,0,76.8,189.6a4,4,0,0,0,6.4,4.8,56,56,0,0,1,89.6,0,4,4,0,0,0,6.4-4.8A63.65,63.65,0,0,0,146.7,166.75ZM100,136a28,28,0,1,1,28,28A28,28,0,0,1,100,136ZM200,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V40A12,12,0,0,0,200,28Zm4,188a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4ZM92,64a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,64Z\" }))\n ]\n]);\nexport {\n e as default\n};\n","import * as o from \"react\";\nimport r from \"../lib/IconBase.es.js\";\nimport a from \"../defs/Atom.es.js\";\nconst t = o.forwardRef((m, e) => /* @__PURE__ */ o.createElement(r, { ref: e, ...m, weights: a }));\nt.displayName = \"AtomIcon\";\nconst n = t;\nexport {\n n as Atom,\n t as AtomIcon\n};\n","import * as o from \"react\";\nimport n from \"../lib/IconBase.es.js\";\nimport a from \"../defs/BookOpen.es.js\";\nconst e = o.forwardRef((r, t) => /* @__PURE__ */ o.createElement(n, { ref: t, ...r, weights: a }));\ne.displayName = \"BookOpenIcon\";\nconst c = e;\nexport {\n c as BookOpen,\n e as BookOpenIcon\n};\n","import * as e from \"react\";\nimport a from \"../lib/IconBase.es.js\";\nimport i from \"../defs/Certificate.es.js\";\nconst t = e.forwardRef((o, r) => /* @__PURE__ */ e.createElement(a, { ref: r, ...o, weights: i }));\nt.displayName = \"CertificateIcon\";\nconst m = t;\nexport {\n m as Certificate,\n t as CertificateIcon\n};\n","import * as o from \"react\";\nimport a from \"../lib/IconBase.es.js\";\nimport c from \"../defs/ChatCircleDots.es.js\";\nconst t = o.forwardRef((e, r) => /* @__PURE__ */ o.createElement(a, { ref: r, ...e, weights: c }));\nt.displayName = \"ChatCircleDotsIcon\";\nconst m = t;\nexport {\n m as ChatCircleDots,\n t as ChatCircleDotsIcon\n};\n","import * as e from \"react\";\nimport n from \"../lib/IconBase.es.js\";\nimport a from \"../defs/Envelope.es.js\";\nconst o = e.forwardRef((r, t) => /* @__PURE__ */ e.createElement(n, { ref: t, ...r, weights: a }));\no.displayName = \"EnvelopeIcon\";\nconst c = o;\nexport {\n c as Envelope,\n o as EnvelopeIcon\n};\n","import * as o from \"react\";\nimport t from \"../lib/IconBase.es.js\";\nimport n from \"../defs/Hand.es.js\";\nconst a = o.forwardRef((e, r) => /* @__PURE__ */ o.createElement(t, { ref: r, ...e, weights: n }));\na.displayName = \"HandIcon\";\nconst s = a;\nexport {\n s as Hand,\n a as HandIcon\n};\n","import * as e from \"react\";\nimport i from \"../lib/IconBase.es.js\";\nimport n from \"../defs/IdentificationBadge.es.js\";\nconst o = e.forwardRef((t, a) => /* @__PURE__ */ e.createElement(i, { ref: a, ...t, weights: n }));\no.displayName = \"IdentificationBadgeIcon\";\nconst d = o;\nexport {\n d as IdentificationBadge,\n o as IdentificationBadgeIcon\n};\n","/**\n * Allows to quickly check if a scope is for a specific resource.\n */\nexport function isScopeStringFor(value, prefix) {\n if (value.length > prefix.length) {\n // First, check the next char is either : or ?\n const nextChar = value.charCodeAt(prefix.length);\n if (nextChar !== 0x3a /* : */ && nextChar !== 0x3f /* ? */) {\n return false;\n }\n // Then check the full prefix\n return value.startsWith(prefix);\n }\n else {\n // value and prefix must be equal\n return value === prefix;\n }\n}\nexport function isScopeSyntaxFor(syntax, prefix) {\n return syntax.prefix === prefix;\n}\n//# sourceMappingURL=syntax.js.map","export function minIdx(a, b) {\n if (a === -1)\n return b;\n if (b === -1)\n return a;\n return Math.min(a, b);\n}\nexport function knownValuesValidator(values) {\n const set = new Set(values);\n return (value) => set.has(value);\n}\nexport function isNonNullable(value) {\n return value != null;\n}\n//# sourceMappingURL=util.js.map","import { minIdx } from './util.js';\n/**\n * Translates a scope string into a {@link ScopeSyntax}.\n */\nexport class ScopeStringSyntax {\n constructor(prefix, positional, params) {\n this.prefix = prefix;\n this.positional = positional;\n this.params = params;\n }\n *keys() {\n if (this.params)\n yield* this.params.keys();\n }\n getSingle(key) {\n if (!this.params?.has(key))\n return undefined;\n const value = this.params.getAll(key);\n if (value.length > 1)\n return null;\n return value[0];\n }\n getMulti(key) {\n if (!this.params?.has(key))\n return undefined;\n return this.params.getAll(key);\n }\n toString() {\n let scope = this.prefix;\n if (this.positional !== undefined) {\n scope += `:${normalizeURIComponent(encodeURIComponent(this.positional))}`;\n }\n if (this.params?.size) {\n scope += `?${normalizeURIComponent(this.params.toString())}`;\n }\n return scope;\n }\n static fromString(scopeValue) {\n const paramIdx = scopeValue.indexOf('?');\n const colonIdx = scopeValue.indexOf(':');\n const prefixEnd = minIdx(paramIdx, colonIdx);\n // No param or positional\n if (prefixEnd === -1) {\n return new ScopeStringSyntax(scopeValue);\n }\n const prefix = scopeValue.slice(0, prefixEnd);\n // Parse the positional parameter if present\n const positional = colonIdx !== -1\n ? paramIdx === -1\n ? decodeURIComponent(scopeValue.slice(colonIdx + 1))\n : colonIdx < paramIdx\n ? decodeURIComponent(scopeValue.slice(colonIdx + 1, paramIdx))\n : undefined\n : undefined;\n // Parse the query string if present and non empty\n const params = paramIdx !== -1 && paramIdx < scopeValue.length - 1\n ? new URLSearchParams(scopeValue.slice(paramIdx + 1))\n : undefined;\n return new ScopeStringSyntax(prefix, positional, params);\n }\n}\n/**\n * Set of characters that are allowed in scope components without encoding. This\n * is used to normalize scope components.\n */\nconst ALLOWED_SCOPE_CHARS = new Set(\n// @NOTE This list must not contain \"?\" or \"&\" as it would interfere with\n// query string parsing.\n[':', '/', '+', ',', '@', '%']);\nconst NORMALIZABLE_CHARS_MAP = new Map(Array.from(ALLOWED_SCOPE_CHARS, (c) => [encodeURIComponent(c), c]).filter(([encoded, c]) => \n// Make sure that any char added to ALLOWED_SCOPE_CHARS that is a char\n// that indeed needs encoding. Also, the normalizeURIComponent only\n// supports three-character percent-encoded sequences.\nencoded !== c && encoded.length === 3 && encoded.startsWith('%')));\n/**\n * Assumes a properly url-encoded string.\n */\nfunction normalizeURIComponent(value) {\n // No need to read the last two characters since percent encoded characters\n // are always three characters long.\n let end = value.length - 2;\n for (let i = 0; i < end; i++) {\n // Check if the character is a percent-encoded character\n if (value.charCodeAt(i) === 0x25 /* % */) {\n // Read the next encoded char. Current version only supports\n // three-character percent-encoded sequences.\n const encodedChar = value.slice(i, i + 3);\n // Check if the encoded character is in the normalization map\n const normalizedChar = NORMALIZABLE_CHARS_MAP.get(encodedChar);\n if (normalizedChar) {\n // Replace the encoded character with its normalized version\n value = `${value.slice(0, i)}${normalizedChar}${value.slice(i + encodedChar.length)}`;\n // Adjust index to account for the length change\n i += normalizedChar.length - 1;\n // Adjust end index since we replaced encoded char with normalized char\n end -= encodedChar.length - normalizedChar.length;\n }\n }\n }\n return value;\n}\n//# sourceMappingURL=syntax-string.js.map","import { ScopeStringSyntax } from './syntax-string.js';\nexport class Parser {\n constructor(prefix, schema, positionalName) {\n this.prefix = prefix;\n this.schema = schema;\n this.positionalName = positionalName;\n this.schemaKeys = new Set(Object.keys(schema));\n }\n format(values) {\n const params = new URLSearchParams();\n let positional = undefined;\n for (const key of this.schemaKeys) {\n const value = values[key];\n // Ignore undefined values\n if (value === undefined)\n continue;\n const schema = this.schema[key];\n // Normalize the value if a normalization function is provided\n const normalized = schema.normalize\n ? schema.normalize(value)\n : value;\n // Ignore values that are equal to the default value\n if (!schema.required) {\n if (schema.default === normalized)\n continue;\n if (schema.multiple &&\n schema.default &&\n arrayParamEquals(schema.default, normalized)) {\n continue;\n }\n }\n if (Array.isArray(normalized)) {\n if (key === this.positionalName && normalized.length === 1) {\n positional = String(normalized[0]);\n }\n else {\n // remove duplicates\n const unique = new Set(normalized.map(String));\n for (const v of unique)\n params.append(key, v);\n }\n }\n else {\n if (key === this.positionalName) {\n positional = String(normalized);\n }\n else {\n params.set(key, String(normalized));\n }\n }\n }\n return new ScopeStringSyntax(this.prefix, positional, params).toString();\n }\n // @NOTE If we needed to ever have more detailed reason as to why parsing\n // fails, this function could easily be updated to return a\n // ValidationResult<T> type that explains the reason for failure.\n parse(syntax) {\n // @NOTE no need to check prefix, since the typing (P generic) already\n // ensures it matches\n for (const key of syntax.keys()) {\n if (!this.schemaKeys.has(key))\n return null;\n }\n const result = Object.create(null);\n for (const key of this.schemaKeys) {\n const definition = this.schema[key];\n const param = definition.multiple\n ? syntax.getMulti(key)\n : syntax.getSingle(key);\n if (param === null) {\n return null; // Value is not valid\n }\n else if (param !== undefined) {\n if (key === this.positionalName && syntax.positional !== undefined) {\n // Positional parameter cannot be used with named parameters\n return null;\n }\n if (definition.multiple) {\n // Empty array is not valid\n if (!param.length)\n return null;\n if (!param.every(definition.validate)) {\n return null;\n }\n }\n else {\n if (!definition.validate(param)) {\n return null;\n }\n }\n result[key] = param;\n }\n else if (key === this.positionalName &&\n syntax.positional !== undefined) {\n // No named parameters found, but there is a positional parameter\n const { positional } = syntax;\n if (!definition.validate(positional)) {\n return null;\n }\n result[key] = definition.multiple ? [positional] : positional;\n }\n else if (definition.required) {\n return null;\n }\n else {\n result[key] = definition.default;\n }\n }\n return result;\n }\n}\n/**\n * Two param arrays are considered equal if they contain the same values,\n * regardless of the order and duplicates.\n * @param a - The first array to compare.\n * @param b - The second array to compare.\n */\nfunction arrayParamEquals(a, b) {\n for (const item of a)\n if (!b.includes(item))\n return false;\n for (const item of b)\n if (!a.includes(item))\n return false;\n return true;\n}\n//# sourceMappingURL=parser.js.map","import { Parser } from '../lib/parser.js';\nimport { ScopeStringSyntax } from '../lib/syntax-string.js';\nimport { isScopeStringFor } from '../lib/syntax.js';\nimport { knownValuesValidator } from '../lib/util.js';\nexport const ACCOUNT_ATTRIBUTES = Object.freeze([\n 'email',\n 'repo',\n 'status',\n]);\nexport const ACCOUNT_ACTIONS = Object.freeze(['read', 'manage']);\nexport class AccountPermission {\n constructor(attr, action) {\n this.attr = attr;\n this.action = action;\n }\n matches(options) {\n return (this.attr === options.attr &&\n (this.action.includes('manage') || this.action.includes(options.action)));\n }\n toString() {\n return AccountPermission.parser.format(this);\n }\n static { this.parser = new Parser('account', {\n attr: {\n multiple: false,\n required: true,\n validate: knownValuesValidator(ACCOUNT_ATTRIBUTES),\n },\n action: {\n multiple: true,\n required: false,\n validate: knownValuesValidator(ACCOUNT_ACTIONS),\n default: ['read'],\n },\n }, 'attr'); }\n static fromString(scope) {\n if (!isScopeStringFor(scope, 'account'))\n return null;\n const syntax = ScopeStringSyntax.fromString(scope);\n return AccountPermission.fromSyntax(syntax);\n }\n static fromSyntax(syntax) {\n const result = AccountPermission.parser.parse(syntax);\n if (!result)\n return null;\n return new AccountPermission(result.attr, result.action);\n }\n static scopeNeededFor(options) {\n return AccountPermission.parser.format({\n attr: options.attr,\n action: [options.action],\n });\n }\n}\n//# sourceMappingURL=account-permission.js.map","// @TODO Refactor in shared location for use with other @atproto packages\nfunction isStringSlashString(value) {\n const slashIndex = value.indexOf('/');\n if (slashIndex === -1)\n return false; // Missing slash\n if (slashIndex === 0)\n return false; // No leading part before the slash\n if (slashIndex === value.length - 1)\n return false; // No trailing part after the slash\n if (value.includes('/', slashIndex + 1))\n return false; // More than one slash\n if (value.includes(' '))\n return false; // Spaces are not allowed\n return true;\n}\nexport function isMime(value) {\n return isStringSlashString(value) && !value.includes('*');\n}\nexport function isAccept(value) {\n if (typeof value !== 'string')\n return false;\n if (value === '*/*')\n return true; // Fast path for the most common case\n if (!isStringSlashString(value))\n return false;\n return !value.includes('*') || value.endsWith('/*');\n}\n/**\n * @note \"unsafe\" in that it does not check if either {@link accept} or\n * {@link mime} are actually valid values (and could, therefore, lead to false\n * positives if forged values are used).\n */\nfunction matchesAcceptUnsafe(accept, mime) {\n if (accept === '*/*') {\n return true;\n }\n if (accept.endsWith('/*')) {\n return mime.startsWith(accept.slice(0, -1));\n }\n return accept === mime;\n}\nexport function matchesAccept(accept, mime) {\n return isMime(mime) && matchesAcceptUnsafe(accept, mime);\n}\n/**\n * @note \"unsafe\" in that it does not check if either {@link accept} or\n * {@link mime} are actually valid values (and could, therefore, lead to false\n * positives if forged values are used).\n */\nfunction matchesAnyAcceptUnsafe(acceptable, mime) {\n for (const accept of acceptable) {\n if (matchesAcceptUnsafe(accept, mime)) {\n return true;\n }\n }\n return false;\n}\nexport function matchesAnyAccept(acceptable, mime) {\n return isMime(mime) && matchesAnyAcceptUnsafe(acceptable, mime);\n}\n//# sourceMappingURL=mime.js.map","import { isAccept, matchesAnyAccept } from '../lib/mime.js';\nimport { Parser } from '../lib/parser.js';\nimport { ScopeStringSyntax } from '../lib/syntax-string.js';\nimport { isScopeStringFor, } from '../lib/syntax.js';\nexport const DEFAULT_ACCEPT = Object.freeze(['*/*']);\nexport class BlobPermission {\n constructor(accept) {\n this.accept = accept;\n }\n matches(options) {\n return matchesAnyAccept(this.accept, options.mime);\n }\n toString() {\n return BlobPermission.parser.format(this);\n }\n static { this.parser = new Parser('blob', {\n accept: {\n multiple: true,\n required: true,\n validate: isAccept,\n normalize: (value) => {\n // Returns a more concise representation of the accept values.\n if (value.includes('*/*'))\n return DEFAULT_ACCEPT;\n return value\n .map(toLowerCase)\n .filter(isNonRedundant)\n .sort();\n },\n },\n }, 'accept'); }\n static fromString(scope) {\n if (!isScopeStringFor(scope, 'blob'))\n return null;\n const syntax = ScopeStringSyntax.fromString(scope);\n return BlobPermission.fromSyntax(syntax);\n }\n static fromSyntax(syntax) {\n const result = BlobPermission.parser.parse(syntax);\n if (!result)\n return null;\n return new BlobPermission(result.accept);\n }\n static scopeNeededFor(options) {\n return BlobPermission.parser.format({\n accept: [options.mime],\n });\n }\n}\nfunction toLowerCase(value) {\n return (typeof value === 'string' ? value.toLowerCase() : value);\n}\nfunction isNonRedundant(value, index, arr) {\n if (typeof value !== 'string') {\n return true;\n }\n if (value.endsWith('/*')) {\n // assuming the array contains unique element, wildcards cannot be redundant\n // with one another ('image/*' is not redundant with 'text/*')\n return true;\n }\n const base = value.split('/', 1)[0];\n if (arr.includes(`${base}/*`)) {\n // If another value in the array is a wildcard for the same base, we can\n // skip this one as it is redundant. e.g. if the array contains 'image/png'\n // and 'image/*', we can skip 'image/png' because 'image/*' already covers\n // it.\n return false;\n }\n return true;\n}\n//# sourceMappingURL=blob-permission.js.map","import { Parser } from '../lib/parser.js';\nimport { ScopeStringSyntax } from '../lib/syntax-string.js';\nimport { isScopeStringFor } from '../lib/syntax.js';\nimport { knownValuesValidator } from '../lib/util.js';\nexport const IDENTITY_ATTRIBUTES = Object.freeze(['handle', '*']);\nexport class IdentityPermission {\n constructor(attr) {\n this.attr = attr;\n }\n matches(options) {\n return this.attr === '*' || this.attr === options.attr;\n }\n toString() {\n return IdentityPermission.parser.format(this);\n }\n static { this.parser = new Parser('identity', {\n attr: {\n multiple: false,\n required: true,\n validate: knownValuesValidator(IDENTITY_ATTRIBUTES),\n },\n }, 'attr'); }\n static fromString(scope) {\n if (!isScopeStringFor(scope, 'identity'))\n return null;\n const syntax = ScopeStringSyntax.fromString(scope);\n return IdentityPermission.fromSyntax(syntax);\n }\n static fromSyntax(syntax) {\n const result = IdentityPermission.parser.parse(syntax);\n if (!result)\n return null;\n return new IdentityPermission(result.attr);\n }\n static scopeNeededFor(options) {\n return IdentityPermission.parser.format(options);\n }\n}\n//# sourceMappingURL=identity-permission.js.map","export function success(value) {\n return { success: true, value };\n}\nexport function failure(message) {\n return { success: false, message };\n}\n//# sourceMappingURL=result.js.map","import { failure, success } from './lib/result.js';\nexport class NSID {\n static parse(input) {\n return new NSID(input);\n }\n static create(authority, name) {\n const input = [...authority.split('.').reverse(), name].join('.');\n return new NSID(input);\n }\n static isValid(nsid) {\n return isValidNsid(nsid);\n }\n static from(input) {\n if (input instanceof NSID) {\n // No need to clone, NSID is immutable\n return input;\n }\n if (Array.isArray(input)) {\n return new NSID(input.join('.'));\n }\n return new NSID(String(input));\n }\n constructor(nsid) {\n this.segments = parseNsid(nsid);\n }\n get authority() {\n return this.segments\n .slice(0, this.segments.length - 1)\n .reverse()\n .join('.');\n }\n get name() {\n return this.segments.at(this.segments.length - 1);\n }\n toString() {\n return this.segments.join('.');\n }\n}\nexport function ensureValidNsid(input) {\n const result = validateNsid(input);\n if (!result.success)\n throw new InvalidNsidError(result.message);\n}\nexport function parseNsid(nsid) {\n const result = validateNsid(nsid);\n if (!result.success)\n throw new InvalidNsidError(result.message);\n return result.value;\n}\nexport function isValidNsid(input) {\n // Since the regex version is more performant for valid NSIDs, we use it when\n // we don't care about error details.\n return validateNsidRegex(input).success;\n}\n// Human readable constraints on NSID:\n// - a valid domain in reversed notation\n// - followed by an additional period-separated name, which is camel-case letters\nexport function validateNsid(input) {\n if (input.length > 253 + 1 + 63) {\n return failure('NSID is too long (317 chars max)');\n }\n if (hasDisallowedCharacters(input)) {\n return failure('Disallowed characters in NSID (ASCII letters, digits, dashes, periods only)');\n }\n const segments = input.split('.');\n if (segments.length < 3) {\n return failure('NSID needs at least three parts');\n }\n for (const l of segments) {\n if (l.length < 1) {\n return failure('NSID parts can not be empty');\n }\n if (l.length > 63) {\n return failure('NSID part too long (max 63 chars)');\n }\n if (startsWithHyphen(l) || endsWithHyphen(l)) {\n return failure('NSID parts can not start or end with hyphen');\n }\n }\n if (startsWithNumber(segments[0])) {\n return failure('NSID first part may not start with a digit');\n }\n if (!isValidIdentifier(segments[segments.length - 1])) {\n return failure('NSID name part must be only letters and digits (and no leading digit)');\n }\n return success(segments);\n}\nfunction hasDisallowedCharacters(v) {\n return !/^[a-zA-Z0-9.-]*$/.test(v);\n}\nfunction startsWithNumber(v) {\n const charCode = v.charCodeAt(0);\n return charCode >= 48 && charCode <= 57;\n}\nfunction startsWithHyphen(v) {\n return v.charCodeAt(0) === 45; /* - */\n}\nfunction endsWithHyphen(v) {\n return v.charCodeAt(v.length - 1) === 45; /* - */\n}\nfunction isValidIdentifier(v) {\n // Note, since we already know that \"v\" only contains [a-zA-Z0-9-], we can\n // simplify the following regex by checking only the first char and presence\n // of \"-\".\n // return /^[a-zA-Z][a-zA-Z0-9]*$/.test(v)\n return !startsWithNumber(v) && !v.includes('-');\n}\n/**\n * @deprecated Use {@link ensureValidNsid} if you care about error details,\n * {@link parseNsid}/{@link NSID.parse} if you need the parsed segments, or\n * {@link isValidNsid} if you just want a boolean.\n */\nexport function ensureValidNsidRegex(nsid) {\n const result = validateNsidRegex(nsid);\n if (!result.success)\n throw new InvalidNsidError(result.message);\n}\n/**\n * Regexp based validation that behaves identically to the previous code but\n * provides less detailed error messages (while being 20% to 50% faster).\n */\nexport function validateNsidRegex(value) {\n if (value.length > 253 + 1 + 63) {\n return failure('NSID is too long (317 chars max)');\n }\n if (\n // Fast check for small values\n value.length < 5 ||\n !/^[a-zA-Z](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?:\\.[a-zA-Z](?:[a-zA-Z0-9]{0,62})?)$/.test(value)) {\n return failure(\"NSID didn't validate via regex\");\n }\n return success(value);\n}\nexport class InvalidNsidError extends Error {\n}\n//# sourceMappingURL=nsid.js.map","import { isValidNsid } from '@atproto/syntax';\nexport const isNsid = (v) => typeof v === 'string' && isValidNsid(v);\n//# sourceMappingURL=nsid.js.map","const isArray = Array.isArray;\n/**\n * Translates a {@link LexiconPermission} into a {@link ScopeSyntax}.\n */\nexport class LexPermissionSyntax {\n constructor(lexPermission) {\n this.lexPermission = lexPermission;\n }\n get prefix() {\n return this.lexPermission.resource;\n }\n get positional() {\n return undefined;\n }\n get(key) {\n // Ignore reserved keywords\n if (key === 'type')\n return undefined;\n if (key === 'resource')\n return undefined;\n // Ignore inherited properties (toString(), etc.)\n if (!Object.hasOwn(this.lexPermission, key))\n return undefined;\n return this.lexPermission[key];\n }\n *keys() {\n for (const key of Object.keys(this.lexPermission)) {\n if (this.get(key) !== undefined)\n yield key;\n }\n }\n getSingle(key) {\n const value = this.get(key);\n if (isArray(value))\n return null;\n return value;\n }\n getMulti(key) {\n const value = this.get(key);\n if (value === undefined)\n return undefined;\n if (!isArray(value))\n return null;\n return value;\n }\n toJSON() {\n return this.lexPermission;\n }\n}\n//# sourceMappingURL=syntax-lexicon.js.map","import { isNsid } from '../lib/nsid.js';\nimport { Parser } from '../lib/parser.js';\nimport { ScopeStringSyntax } from '../lib/syntax-string.js';\nimport { isScopeStringFor, } from '../lib/syntax.js';\nimport { knownValuesValidator } from '../lib/util.js';\nexport { isNsid };\nexport const REPO_ACTIONS = Object.freeze([\n 'create',\n 'update',\n 'delete',\n]);\nexport const isRepoAction = knownValuesValidator(REPO_ACTIONS);\nexport const isCollectionParam = (value) => value === '*' || isNsid(value);\nexport class RepoPermission {\n constructor(collection, action) {\n this.collection = collection;\n this.action = action;\n }\n matches({ action, collection }) {\n return (this.action.includes(action) &&\n (this.collection.includes('*') ||\n this.collection.includes(collection)));\n }\n toString() {\n return RepoPermission.parser.format(this);\n }\n static { this.parser = new Parser('repo', {\n collection: {\n multiple: true,\n required: true,\n validate: isCollectionParam,\n normalize: (value) => {\n if (value.length > 1) {\n if (value.includes('*'))\n return ['*'];\n return [...new Set(value)].sort();\n }\n return value;\n },\n },\n action: {\n multiple: true,\n required: false,\n validate: isRepoAction,\n default: REPO_ACTIONS,\n normalize: (value) => {\n return value === REPO_ACTIONS\n ? REPO_ACTIONS // No need to filter if the default was used\n : REPO_ACTIONS.filter(includedIn, value);\n },\n },\n }, 'collection'); }\n static fromString(scope) {\n if (!isScopeStringFor(scope, 'repo'))\n return null;\n const syntax = ScopeStringSyntax.fromString(scope);\n return RepoPermission.fromSyntax(syntax);\n }\n static fromSyntax(syntax) {\n const result = RepoPermission.parser.parse(syntax);\n if (!result)\n return null;\n return new RepoPermission(result.collection, result.action);\n }\n static scopeNeededFor(options) {\n return RepoPermission.parser.format({\n collection: [options.collection],\n action: [options.action],\n });\n }\n}\n/**\n * Special utility function to be used as predicate for array methods like\n * `Array.prototype.includes`, etc. When used as predicate, it expects that\n * the array method is called with a `thisArg` that is a readonly array of\n * the same type as the `value` parameter.\n */\nfunction includedIn(value) {\n return this.includes(value);\n}\n//# sourceMappingURL=repo-permission.js.map","import { isAtprotoAudience } from '@atproto/did';\nimport { isNsid } from '../lib/nsid.js';\nimport { Parser } from '../lib/parser.js';\nimport { ScopeStringSyntax } from '../lib/syntax-string.js';\nimport { isScopeStringFor } from '../lib/syntax.js';\nexport { isAtprotoAudience, isNsid };\nexport const isLxmParam = (value) => value === '*' || isNsid(value);\nexport const isAudParam = (value) => value === '*' || isAtprotoAudience(value);\nexport class RpcPermission {\n constructor(aud, lxm) {\n this.aud = aud;\n this.lxm = lxm;\n }\n matches(options) {\n const { aud, lxm } = this;\n return ((aud === '*' || aud === options.aud) &&\n (lxm.includes('*') || lxm.includes(options.lxm)));\n }\n toString() {\n return RpcPermission.parser.format(this);\n }\n static { this.parser = new Parser('rpc', {\n lxm: {\n multiple: true,\n required: true,\n validate: isLxmParam,\n normalize: (value) => value.length > 1 && value.includes('*')\n ? ['*']\n : [...new Set(value)].sort(),\n },\n aud: {\n multiple: false,\n required: true,\n validate: isAudParam,\n },\n }, 'lxm'); }\n static fromString(scope) {\n if (!isScopeStringFor(scope, 'rpc'))\n return null;\n const syntax = ScopeStringSyntax.fromString(scope);\n return RpcPermission.fromSyntax(syntax);\n }\n static fromSyntax(syntax) {\n const result = RpcPermission.parser.parse(syntax);\n if (!result)\n return null;\n // rpc:*?aud=* is forbidden\n if (result.aud === '*' && result.lxm.includes('*'))\n return null;\n return new RpcPermission(result.aud, result.lxm);\n }\n static scopeNeededFor(options) {\n return RpcPermission.parser.format({\n aud: options.aud,\n lxm: [options.lxm],\n });\n }\n}\n//# sourceMappingURL=rpc-permission.js.map","import { isAtprotoAudience } from '@atproto/did';\nimport { isNsid } from '../lib/nsid.js';\nimport { Parser } from '../lib/parser.js';\nimport { LexPermissionSyntax } from '../lib/syntax-lexicon.js';\nimport { ScopeStringSyntax } from '../lib/syntax-string.js';\nimport { isScopeStringFor, isScopeSyntaxFor, } from '../lib/syntax.js';\nimport { RepoPermission } from './repo-permission.js';\nimport { RpcPermission } from './rpc-permission.js';\nexport { isNsid };\n/**\n * This is used to handle \"include:\" oauth scope values, used to include\n * permissions from a lexicon defined permission set. Not being a resource\n * permission, it does not implement `Matchable`.\n */\nexport class IncludeScope {\n constructor(nsid, aud = undefined) {\n this.nsid = nsid;\n this.aud = aud;\n }\n toString() {\n return IncludeScope.parser.format(this);\n }\n toPermissions(permissionSet) {\n return Array.from(this.buildPermissions(permissionSet));\n }\n toScopes(permissionSet) {\n return Array.from(this.buildPermissions(permissionSet), (p) => p.toString());\n }\n /**\n * Converts an \"include:\" to the list of permissions it includes, based on the\n * lexicon defined permission set.\n */\n *buildPermissions(permissionSet) {\n for (const lexPermission of permissionSet.permissions) {\n const syntax = this.parseLexPermission(lexPermission);\n if (!syntax)\n continue;\n const resourcePermission = toResourcePermission(syntax);\n if (!resourcePermission)\n continue;\n if (this.isAllowedPermission(resourcePermission)) {\n yield resourcePermission;\n }\n }\n }\n parseLexPermission(permission) {\n // This function converts permissions listed in the permission set into\n // their respective ScopeSyntax representations, handling special cases as\n // needed.\n if (isLexPermissionForResource(permission, 'repo')) {\n return new LexPermissionSyntax(permission);\n }\n if (isLexPermissionForResource(permission, 'rpc')) {\n // \"rpc\" permissions with a defined audience are not allowed in permission\n // sets\n if (permission.aud !== undefined && permission.aud !== '*') {\n return null;\n }\n // \"rpc\" permissions can \"inherit\" their audience from \"aud\" param defined\n // in the \"include:<nsid>?aud=<audience>\" scope the permission set was\n // loaded from.\n if (permission.inheritAud === true &&\n permission.aud === undefined &&\n this.aud !== undefined) {\n const { inheritAud, ...rest } = permission;\n return new LexPermissionSyntax({ aud: this.aud, ...rest });\n }\n return new LexPermissionSyntax(permission);\n }\n return null;\n }\n /**\n * Verifies that a permission included through a lexicon permission set is\n * allowed in the context of the `include:` scope. This basically checks that\n * the permission is \"under\" the namespace authority of the `include:` scope,\n * and that it only contains \"repo:\", \"rpc:\", or \"blob:\" permissions.\n */\n isAllowedPermission(permission) {\n if (permission instanceof RpcPermission) {\n return permission.lxm.every(this.isParentAuthorityOf, this);\n }\n if (permission instanceof RepoPermission) {\n return permission.collection.every(this.isParentAuthorityOf, this);\n }\n throw new TypeError(`Unexpected permission ${permission}`);\n }\n /**\n * Verifies that a permission item's nsid is under the same authority as the\n * nsid of the lexicon itself (which is the same as the nsid of the `include:`\n * scope).\n */\n isParentAuthorityOf(otherNsid) {\n if (otherNsid === '*') {\n return false;\n }\n const lexiconNsid = this.nsid;\n const groupPrefixEnd = lexiconNsid.lastIndexOf('.');\n // There should always be a dot, but since this is a security feature, let's\n // be strict about it.\n if (groupPrefixEnd === -1) {\n throw new TypeError('Dot character (\".\") missing from lexicon NSID');\n }\n // Make sure that otherNsid is at least as long as the \"group prefix\"\n if (groupPrefixEnd >= otherNsid.length - 1) {\n return false;\n }\n // Make sure that the \"otherNsid\" starts with the group of the lexiconNsid,\n // up to the dot itself. We check in reverse order as nsids tend to have\n // long common prefixes.\n for (let i = groupPrefixEnd; i >= 0; i--) {\n if (lexiconNsid.charCodeAt(i) !== otherNsid.charCodeAt(i)) {\n return false;\n }\n }\n return true;\n }\n static { this.parser = new Parser('include', {\n nsid: {\n multiple: false,\n required: true,\n validate: isNsid,\n },\n aud: {\n multiple: false,\n required: false,\n validate: isAtprotoAudience,\n },\n }, 'nsid'); }\n static fromString(scope) {\n if (!isScopeStringFor(scope, 'include'))\n return null;\n const syntax = ScopeStringSyntax.fromString(scope);\n return IncludeScope.fromSyntax(syntax);\n }\n static fromSyntax(syntax) {\n const result = IncludeScope.parser.parse(syntax);\n if (!result)\n return null;\n return new IncludeScope(result.nsid, result.aud);\n }\n}\nfunction toResourcePermission(syntax) {\n if (isScopeSyntaxFor(syntax, 'repo')) {\n return RepoPermission.fromSyntax(syntax);\n }\n if (isScopeSyntaxFor(syntax, 'rpc')) {\n return RpcPermission.fromSyntax(syntax);\n }\n return null;\n}\nfunction isLexPermissionForResource(permission, type) {\n return permission.resource === type;\n}\n//# sourceMappingURL=include-scope.js.map","export class ScopeMissingError extends Error {\n get statusCode() {\n return this.status;\n }\n constructor(scope) {\n super(`Missing required scope \"${scope}\"`);\n this.scope = scope;\n this.name = 'ScopeMissingError';\n // compatibility layer with http-errors package. The goal if to make\n // isHttpError(new ScopeMissingError) return true.\n this.status = 403;\n this.expose = true;\n }\n}\n//# sourceMappingURL=scope-missing-error.js.map","import { ScopeMissingError } from './scope-missing-error.js';\nimport { AccountPermission, } from './scopes/account-permission.js';\nimport { BlobPermission, } from './scopes/blob-permission.js';\nimport { IdentityPermission, } from './scopes/identity-permission.js';\nimport { RepoPermission, } from './scopes/repo-permission.js';\nimport { RpcPermission } from './scopes/rpc-permission.js';\nexport { ScopeMissingError };\n/**\n * Utility class to manage a set of scopes and check if they match specific\n * options for a given resource.\n */\nexport class ScopesSet extends Set {\n /**\n * Check if the container has a scope that matches the given options for a\n * specific resource.\n */\n matches(resource, options) {\n for (const scope of this) {\n if (permissionScopeMatches(scope, resource, options))\n return true;\n }\n return false;\n }\n assert(resource, options) {\n if (!this.matches(resource, options)) {\n const scope = scopeNeededFor(resource, options);\n throw new ScopeMissingError(scope);\n }\n }\n some(fn) {\n for (const scope of this)\n if (fn(scope))\n return true;\n return false;\n }\n every(fn) {\n for (const scope of this)\n if (!fn(scope))\n return false;\n return true;\n }\n *filter(fn) {\n for (const scope of this)\n if (fn(scope))\n yield scope;\n }\n *map(fn) {\n for (const scope of this)\n yield fn(scope);\n }\n static fromString(string) {\n return new ScopesSet(string?.split(' '));\n }\n}\nfunction scopeNeededFor(resource, options) {\n switch (resource) {\n case 'account':\n return AccountPermission.scopeNeededFor(options);\n case 'identity':\n return IdentityPermission.scopeNeededFor(options);\n case 'repo':\n return RepoPermission.scopeNeededFor(options);\n case 'rpc':\n return RpcPermission.scopeNeededFor(options);\n case 'blob':\n return BlobPermission.scopeNeededFor(options);\n }\n // @ts-expect-error\n throw new TypeError(`Unknown resource: ${resource}`);\n}\nfunction permissionScopeMatches(scope, resource, options) {\n // @NOTE we might want to cache the parsed scopes though, in practice, a\n // single scope is unlikely to be parsed multiple times during a single\n // request.\n const permission = parsePermissionScope(resource, scope);\n if (!permission)\n return false;\n // @ts-expect-error\n return permission.matches(options);\n}\nfunction parsePermissionScope(resource, scope) {\n switch (resource) {\n case 'account':\n return AccountPermission.fromString(scope);\n case 'identity':\n return IdentityPermission.fromString(scope);\n case 'repo':\n return RepoPermission.fromString(scope);\n case 'rpc':\n return RpcPermission.fromString(scope);\n case 'blob':\n return BlobPermission.fromString(scope);\n default:\n return null;\n }\n}\n//# sourceMappingURL=scopes-set.js.map","import { ScopeMissingError } from './scope-missing-error.js';\nimport { AccountPermission, } from './scopes/account-permission.js';\nimport { BlobPermission, } from './scopes/blob-permission.js';\nimport { IdentityPermission, } from './scopes/identity-permission.js';\nimport { RepoPermission, } from './scopes/repo-permission.js';\nimport { RpcPermission } from './scopes/rpc-permission.js';\nimport { ScopesSet } from './scopes-set.js';\nexport class ScopePermissions {\n constructor(scope) {\n this.scopes = new ScopesSet(!scope // \"\" | null | undefined\n ? undefined\n : typeof scope === 'string'\n ? scope.split(' ')\n : scope);\n }\n allowsAccount(options) {\n return this.scopes.matches('account', options);\n }\n assertAccount(options) {\n if (!this.allowsAccount(options)) {\n const scope = AccountPermission.scopeNeededFor(options);\n throw new ScopeMissingError(scope);\n }\n }\n allowsIdentity(options) {\n return this.scopes.matches('identity', options);\n }\n assertIdentity(options) {\n if (!this.allowsIdentity(options)) {\n const scope = IdentityPermission.scopeNeededFor(options);\n throw new ScopeMissingError(scope);\n }\n }\n allowsBlob(options) {\n return this.scopes.matches('blob', options);\n }\n assertBlob(options) {\n if (!this.allowsBlob(options)) {\n const scope = BlobPermission.scopeNeededFor(options);\n throw new ScopeMissingError(scope);\n }\n }\n allowsRepo(options) {\n return this.scopes.matches('repo', options);\n }\n assertRepo(options) {\n if (!this.allowsRepo(options)) {\n const scope = RepoPermission.scopeNeededFor(options);\n throw new ScopeMissingError(scope);\n }\n }\n allowsRpc(options) {\n return this.scopes.matches('rpc', options);\n }\n assertRpc(options) {\n if (!this.allowsRpc(options)) {\n const scope = RpcPermission.scopeNeededFor(options);\n throw new ScopeMissingError(scope);\n }\n }\n}\n//# sourceMappingURL=scope-permissions.js.map","import { ScopePermissions, } from './scope-permissions.js';\n/**\n * Overrides the default permission set to allow transitional scopes to be used\n * in place of the generic scopes.\n */\nexport class ScopePermissionsTransition extends ScopePermissions {\n get hasTransitionGeneric() {\n return this.scopes.has('transition:generic');\n }\n get hasTransitionEmail() {\n return this.scopes.has('transition:email');\n }\n get hasTransitionChatBsky() {\n return this.scopes.has('transition:chat.bsky');\n }\n allowsAccount(options) {\n if (options.attr === 'email' &&\n options.action === 'read' &&\n this.hasTransitionEmail) {\n return true;\n }\n return super.allowsAccount(options);\n }\n allowsBlob(options) {\n if (this.hasTransitionGeneric) {\n return true;\n }\n return super.allowsBlob(options);\n }\n allowsRepo(options) {\n if (this.hasTransitionGeneric) {\n return true;\n }\n return super.allowsRepo(options);\n }\n allowsRpc(options) {\n const { lxm } = options;\n if (this.hasTransitionGeneric && lxm === '*') {\n return true;\n }\n if (this.hasTransitionGeneric && !lxm.startsWith('chat.bsky.')) {\n return true;\n }\n if (this.hasTransitionChatBsky && lxm.startsWith('chat.bsky.')) {\n return true;\n }\n return super.allowsRpc(options);\n }\n}\n//# sourceMappingURL=scope-permissions-transition.js.map","import { InfoIcon } from '@phosphor-icons/react'\nimport { useEffect, useState } from 'react'\nimport type { OAuthClientMetadata } from '@atproto/oauth-types'\n\nexport type ClientImageProps = {\n clientId: string\n clientMetadata: OAuthClientMetadata\n clientTrusted: boolean\n}\n\nexport function ClientImage({\n clientId,\n clientMetadata,\n clientTrusted,\n}: ClientImageProps) {\n const [errored, setErrored] = useState(false)\n\n const src = clientTrusted ? clientMetadata.logo_uri : undefined\n const alt = clientMetadata.client_name || clientId\n\n useEffect(() => {\n setErrored(false)\n }, [src])\n\n return src && !errored ? (\n <img\n aria-hidden\n src={src}\n alt={alt}\n className=\"-ml-1 size-8\"\n onError={() => setErrored(true)}\n />\n ) : (\n <div\n aria-hidden\n className=\"bg-primary flex size-8 items-center justify-center overflow-hidden rounded-full text-white\"\n >\n <InfoIcon className=\"size-4\" />\n </div>\n )\n}\n","export type { OAuthClientMetadata } from '@atproto/oauth-types'\n\n// @NOTE: not importing these from @atproto/oauth-types here because 1) we don't\n// need to validate here and 2) we prefer not to import un-necessary code to\n// improve bundle size (~100k impact)\nexport const isOAuthClientIdLoopback = (clientId: string) =>\n clientId.startsWith('http://')\nexport const isConventionalOAuthClientId = (clientId: string) => {\n try {\n const url = new URL(clientId)\n return (\n url.protocol === 'https:' &&\n url.pathname === '/oauth-client-metadata.json' &&\n !url.port &&\n !url.search\n )\n } catch {\n return false\n }\n}\n","import { JSX, useMemo } from 'react'\nimport { Override } from '#/lib/util.ts'\n\nexport type UrlPartRenderingOptions = {\n faded?: boolean\n bold?: boolean\n}\n\nexport type UrlRendererProps = {\n url: string | URL\n proto?: boolean | UrlPartRenderingOptions\n host?: boolean | UrlPartRenderingOptions\n path?: boolean | UrlPartRenderingOptions\n query?: boolean | UrlPartRenderingOptions\n hash?: boolean | UrlPartRenderingOptions\n as?: string\n}\n\nexport function UrlViewer<As extends keyof JSX.IntrinsicElements = 'span'>({\n url,\n proto = false,\n host = true,\n path = false,\n query = false,\n hash = false,\n as: As = 'span',\n\n // Element\n ...props\n}: Override<JSX.IntrinsicElements[As], UrlRendererProps>) {\n const urlObj = useMemo(() => (url instanceof URL ? url : new URL(url)), [url])\n\n return (\n <As {...props}>\n {proto && (\n <UrlPartViewer\n value={`${urlObj.protocol}//`}\n {...(proto === true ? null : proto)}\n />\n )}\n {host && (\n <UrlPartViewer\n value={urlObj.host}\n {...(host === true ? { faded: false, bold: true } : host)}\n />\n )}\n {path && (\n <UrlPartViewer\n value={urlObj.pathname}\n {...(path === true ? null : path)}\n />\n )}\n {query && (\n <UrlPartViewer\n value={urlObj.search}\n {...(query === true ? null : query)}\n />\n )}\n {hash && (\n <UrlPartViewer value={urlObj.hash} {...(hash === true ? null : hash)} />\n )}\n </As>\n )\n}\n\nfunction UrlPartViewer({\n value,\n faded = true,\n bold = false,\n}: { value: string } & UrlPartRenderingOptions) {\n const Comp = bold ? 'b' : 'span'\n return <Comp className={faded ? 'opacity-50' : ''}>{value}</Comp>\n}\n","import { Trans } from '@lingui/react/macro'\nimport { JSX, useMemo } from 'react'\nimport {\n OAuthClientMetadata,\n isConventionalOAuthClientId,\n} from '#/lib/oauth-client.ts'\nimport { Override } from '#/lib/util.ts'\nimport { UrlViewer } from './url-viewer.tsx'\n\nexport type ClientNameProps = Override<\n Omit<JSX.IntrinsicElements['span'], 'children'>,\n {\n clientId: string\n clientMetadata: OAuthClientMetadata\n clientTrusted: boolean\n }\n>\n\nexport function ClientName({\n clientId,\n clientMetadata,\n clientTrusted,\n\n // span\n ...attrs\n}: ClientNameProps) {\n const url = useMemo(() => {\n try {\n return new URL(clientId)\n } catch {\n return null\n }\n }, [clientId])\n\n if (clientTrusted && clientMetadata.client_name) {\n return <span {...attrs}>{clientMetadata.client_name}</span>\n }\n\n // @NOTE: not using isOAuthClientIdLoopback & isOAuthClientIdDiscoverable from\n // @atproto/oauth-types here because 1) we don't need to validate here and 2)\n // we prefer not to import un-necessary code to improve bundle size.\n\n if (url?.protocol === 'http:') {\n return (\n <span {...attrs}>\n <Trans>An application on your device</Trans>\n </span>\n )\n }\n\n if (url?.protocol === 'https:') {\n // Only display the url details if the client id does not follow our\n // convention.\n const simplifiedView = isConventionalOAuthClientId(clientId)\n\n return (\n <UrlViewer\n {...attrs}\n url={url}\n proto={!simplifiedView}\n host={true}\n path={!simplifiedView}\n query={!simplifiedView}\n hash={false}\n />\n )\n }\n\n return <span {...attrs}>{clientId}</span>\n}\n","\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","import { useLingui } from '@lingui/react/macro'\nimport { QuestionIcon, XIcon } from '@phosphor-icons/react'\nimport * as Dialog from '@radix-ui/react-dialog'\nimport { HTMLAttributes, ReactNode } from 'react'\nimport { Button } from '#/components/forms/button.tsx'\nimport { Override } from '#/lib/util.ts'\n\nexport type DescriptionCardProps = Override<\n HTMLAttributes<HTMLDivElement>,\n {\n hint?: string\n image: ReactNode\n title: ReactNode\n description?: ReactNode\n append?: ReactNode\n children?: ReactNode\n extra?: ReactNode\n }\n>\n\nexport function DescriptionCard({\n hint,\n image,\n title,\n description,\n append,\n children,\n extra,\n\n // HTMLDivElement\n ...attrs\n}: DescriptionCardProps) {\n const { t } = useLingui()\n\n return (\n <div {...attrs}>\n <div className={`flex items-center justify-start gap-2`}>\n <div\n className=\"ml-2 flex w-8 flex-grow-0 items-center justify-center\"\n aria-hidden\n >\n {image}\n </div>\n\n <div className={`flex flex-1 flex-col`}>\n <h3>{title}</h3>\n {description && <p className=\"text-sm\">{description}</p>}\n </div>\n\n <div className=\"flex shrink-0 grow-0 items-center justify-center\">\n {append}\n {!!children && (\n <Dialog.Root>\n <Dialog.Trigger asChild>\n <Button\n shape=\"circle\"\n aria-label={hint ?? t`Expand details`}\n aria-haspopup=\"dialog\"\n size=\"sm\"\n >\n <QuestionIcon className=\"size-4\" aria-hidden />\n </Button>\n </Dialog.Trigger>\n\n <Dialog.Portal>\n <Dialog.Overlay className=\"bg-contrast-900/30 dark:bg-contrast-0/60 fixed inset-0\" />\n\n <Dialog.Content\n role=\"dialog\"\n aria-label={!title ? t`Details` : undefined}\n className=\"fixed left-1/2 top-1/2 max-h-[85vh] w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-lg border border-slate-200 bg-white p-6 shadow-xl dark:border-slate-700 dark:bg-slate-800\"\n >\n <div className=\"relative flex flex-col gap-4\">\n <Dialog.Title className=\"text-text-default text-lg font-semibold\">\n {title}\n </Dialog.Title>\n <Dialog.Description className=\"text-text-light text-sm\">\n {children}\n </Dialog.Description>\n {extra}\n <Dialog.Close\n className=\"absolute right-0 top-0 rounded-full bg-slate-100 p-1 hover:bg-slate-200 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 dark:bg-slate-700 dark:hover:bg-slate-600\"\n aria-label={t`Close details`}\n >\n <XIcon className=\"text-text-light size-4\" aria-hidden />\n </Dialog.Close>\n </div>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n )}\n </div>\n </div>\n </div>\n )\n}\n","import { type FunctionComponent, type JSX, forwardRef } from 'react'\nimport { Override } from '#/lib/util.ts'\n\nexport type IconProps = Override<\n Omit<JSX.IntrinsicElements['svg'], 'viewBox' | 'children' | 'xmlns'>,\n {\n /**\n * The title of the icon, used for accessibility.\n */\n title?: string\n }\n>\n\nexport function makeSvgComponent(path: string, displayName?: string) {\n const SvgComponent: FunctionComponent<IconProps> = forwardRef(\n ({ title, ...props }, ref) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n {...props}\n ref={ref}\n aria-hidden={!title}\n >\n {title && <title>{title}</title>}\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d={path}\n ></path>\n </svg>\n ),\n )\n if (displayName) SvgComponent.displayName = displayName\n return SvgComponent\n}\n\nexport const ButterflyIcon = makeSvgComponent(\n // https://github.com/bluesky-social/social-app/blob/b32568260f98ea879468fd1bdedacf85d1e6ae8c/src/components/icons/Logo.tsx#L4\n 'M6.335 4.212c2.293 1.76 4.76 5.327 5.665 7.241.906-1.914 3.372-5.482 5.665-7.241C19.319 2.942 22 1.96 22 5.086c0 .624-.35 5.244-.556 5.994-.713 2.608-3.315 3.273-5.629 2.87 4.045.704 5.074 3.035 2.852 5.366-4.22 4.426-6.066-1.111-6.54-2.53-.086-.26-.126-.382-.127-.278 0-.104-.041.018-.128.278-.473 1.419-2.318 6.956-6.539 2.53-2.222-2.331-1.193-4.662 2.852-5.366-2.314.403-4.916-.262-5.63-2.87C2.35 10.33 2 5.71 2 5.086c0-3.126 2.68-2.144 4.335-.874Z',\n 'ButterflyIcon',\n)\n","import { Trans, useLingui } from '@lingui/react/macro'\nimport {\n AtomIcon,\n BookOpenIcon,\n CertificateIcon,\n ChatCircleDotsIcon,\n CheckIcon,\n EnvelopeIcon,\n HandIcon,\n IdentificationBadgeIcon,\n UserIcon,\n} from '@phosphor-icons/react'\nimport { Fragment, HTMLAttributes, ReactNode, useMemo } from 'react'\nimport {\n AudParam,\n BlobPermission,\n CollectionParam,\n IncludeScope,\n LxmParam,\n RepoPermission,\n RpcPermission,\n ScopePermissionsTransition,\n} from '@atproto/oauth-scopes'\nimport type { PermissionSet, PermissionSets } from '#/hydration-data.d.ts'\nimport { Override } from '#/lib/util'\nimport { Checkbox } from '../forms/checkbox.tsx'\nimport { Admonition } from './admonition.tsx'\nimport { DescriptionCard } from './description-card.tsx'\nimport { ButterflyIcon } from './icons.tsx'\nimport { LangProp } from './lang-string.tsx'\n\nexport type ScopeDescriptionProps = Override<\n HTMLAttributes<HTMLDivElement>,\n {\n clientTrusted?: boolean\n clientFirstParty?: boolean\n scope?: string\n permissionSets?: PermissionSets\n\n allowEmail?: boolean\n onAllowEmail?: (allowed: boolean) => void\n }\n>\n\nexport function ScopeDescription({\n scope,\n permissionSets,\n clientTrusted = false,\n clientFirstParty = false,\n allowEmail,\n onAllowEmail,\n\n // div\n className = '',\n ...attrs\n}: ScopeDescriptionProps) {\n const includeScopes = useMemo(() => {\n return Array.from(\n new Set(\n scope\n ?.split(' ')\n .map((v) => IncludeScope.fromString(v))\n .filter((v) => v != null),\n ),\n )\n }, [scope])\n const permissions = useMemo(() => {\n return new ScopePermissionsTransition(scope)\n }, [scope])\n\n if (permissions.scopes.size === 0) return null\n if (permissions.scopes.size === 1 && permissions.scopes.has('atproto')) {\n return null\n }\n\n return (\n <div className={`flex flex-col gap-2 ${className}`} {...attrs} role=\"list\">\n <EmailPermissions\n permissions={permissions}\n allowEmail={allowEmail}\n onAllowEmail={onAllowEmail}\n />\n <IdentityPermissions permissions={permissions} />\n <AccountPermissions permissions={permissions} />\n\n {/* Bluesky business logic specific scopes */}\n <BlueskyAppviewPermissions permissions={permissions} />\n <BlueskyChatPermissions permissions={permissions} />\n\n <IncludedPermissions\n includeScopes={includeScopes}\n permissionSets={permissionSets}\n />\n\n <FineGrainedPermissions permissions={permissions} />\n\n {(!clientFirstParty || !clientTrusted) && (\n <IdentityWarning permissions={permissions} />\n )}\n </div>\n )\n}\n\nfunction IncludedPermissions({\n includeScopes,\n permissionSets,\n}: {\n includeScopes: IncludeScope[]\n permissionSets?: PermissionSets\n}): ReactNode {\n return includeScopes.map((includeScope, i) => (\n <IncludeScopePermissions\n key={i}\n includeScope={includeScope}\n permissionSet={permissionSets?.[includeScope.nsid]}\n />\n ))\n}\n\nfunction IncludeScopePermissions({\n includeScope,\n permissionSet,\n}: {\n includeScope: IncludeScope\n permissionSet?: PermissionSet\n}) {\n const { nsid } = includeScope\n\n const permissions = useMemo(() => {\n if (!permissionSet) return null\n return new ScopePermissionsTransition(includeScope.toScopes(permissionSet))\n }, [includeScope, permissionSet])\n\n return (\n <DescriptionCard\n role=\"listitem\"\n image={\n isBskyAppNsid(nsid) ? (\n <ButterflyIcon className=\"size-6\" />\n ) : isBskyChatNsid(nsid) ? (\n <ChatCircleDotsIcon className=\"size-6\" />\n ) : nsid.startsWith('com.atproto.moderation.') ? (\n <HandIcon className=\"size-6\" />\n ) : (\n <AtomIcon className=\"size-6\" />\n )\n }\n title={\n <LangProp object={permissionSet} property=\"title\" fallback={nsid} />\n }\n description={\n <LangProp\n object={permissionSet}\n property=\"detail\"\n fallback={\n // Do not set the \"nsid\" as fallback for the \"detail\" if is was already used when displaying the \"title\"\n permissionSet?.title ? nsid : null\n }\n />\n }\n extra={\n permissions ? (\n <>\n <RpcMethodsTable className=\"mt-2\" permissions={permissions} />\n <RepoTable className=\"mt-2\" permissions={permissions} />\n </>\n ) : null\n }\n >\n <Trans>\n The application requests the permissions necessary to perform the\n following actions on your behalf:\n </Trans>\n </DescriptionCard>\n )\n}\n\nfunction IdentityWarning({\n permissions,\n}: {\n permissions: ScopePermissionsTransition\n}) {\n const hasFullIdentityAccess = useMemo(() => {\n return permissions.allowsIdentity({ attr: '*' })\n }, [permissions])\n\n if (hasFullIdentityAccess) {\n return (\n <Admonition role=\"status\">\n <Trans>\n The application is asking for full control over your network identity,\n meaning that it could <b>permanently break</b>, or even <b>steal</b>,\n your account. Only grant this permission to applications you really\n trust.\n </Trans>\n </Admonition>\n )\n }\n\n return null\n}\n\nfunction EmailPermissions({\n permissions,\n allowEmail,\n onAllowEmail,\n}: {\n permissions: ScopePermissionsTransition\n allowEmail?: boolean\n onAllowEmail?: (allowed: boolean) => void\n}) {\n const { t } = useLingui()\n\n const allowedAction = useMemo(() => {\n return (['manage', 'read'] as const).find((action) =>\n permissions.allowsAccount({ attr: 'email', action }),\n )\n }, [permissions])\n\n if (allowedAction) {\n return (\n <label className={onAllowEmail ? 'cursor-pointer' : undefined}>\n <DescriptionCard\n role=\"listitem\"\n image={<EnvelopeIcon className=\"size-6\" />}\n title={t`Email`}\n description={\n allowedAction === 'manage' ? (\n <Trans>Read and update your account's email address</Trans>\n ) : (\n <Trans>Read your account's email address</Trans>\n )\n }\n append={\n onAllowEmail && (\n <Checkbox\n className=\"m-2\"\n checked={allowEmail}\n onChange={(e) => onAllowEmail(e.target.checked)}\n />\n )\n }\n />\n </label>\n )\n }\n\n return null\n}\n\nfunction AccountPermissions({\n permissions,\n}: {\n permissions: ScopePermissionsTransition\n}) {\n const { t } = useLingui()\n\n // @NOTE \"account:email\" already covered by EmailPermissions\n // @NOTE \"account:repo?action=manage\" already covered by RepoPermissions\n\n if (permissions.allowsAccount({ attr: 'status', action: 'manage' })) {\n return (\n <DescriptionCard\n role=\"listitem\"\n image={<UserIcon className=\"size-6\" />}\n title={t`Account`}\n description={t`Temporarily activate or deactivate your account`}\n />\n )\n }\n\n return null\n}\n\n/**\n * Will display detailed rep and rpc permissions unless the app only has\n * app.bsky or chat.bsky specific permissions, in which case the\n * <BlueskyAppviewPermissions /> and <BlueskyChatPermissions /> components cover\n * them.\n */\nfunction FineGrainedPermissions({\n permissions,\n}: {\n permissions: ScopePermissionsTransition\n}) {\n const hasOnlyBskyAppSpecificPermissions = useMemo(() => {\n if (permissions.allowsAccount({ attr: 'repo', action: 'manage' })) {\n return false\n }\n\n let foundOne = false\n\n for (const s of permissions.scopes) {\n const rpc = RpcPermission.fromString(s)\n if (rpc) {\n foundOne = true\n if (isOfficialBlueskyAppviewServiceId(rpc.aud)) continue\n if (rpc.lxm.every(isBlueskySpecificNsid)) continue\n return false\n }\n\n const repo = RepoPermission.fromString(s)\n if (repo) {\n foundOne = true\n if (repo.collection.every(isBlueskySpecificNsid)) continue\n return false\n }\n }\n\n return foundOne\n }, [permissions])\n\n if (hasOnlyBskyAppSpecificPermissions) return null\n\n return (\n <>\n <RepoPermissions permissions={permissions} />\n <RpcMethodsDetails permissions={permissions} />\n </>\n )\n}\n\nfunction BlueskyAppviewPermissions({\n permissions,\n}: {\n permissions: ScopePermissionsTransition\n}) {\n const hasBskyAppRepo = useMemo(() => {\n return permissions.scopes.some(scopeEnablesBskyAppRepo)\n }, [permissions])\n\n const hasBskyAppRpc = useMemo(() => {\n return permissions.scopes.some(scopeEnablesPrivateBskyAppMethods)\n }, [permissions])\n\n if (hasBskyAppRepo || hasBskyAppRpc) {\n return (\n <DescriptionCard\n role=\"listitem\"\n image={<ButterflyIcon className=\"size-6\" />}\n title={'Bluesky'}\n description={\n hasBskyAppRepo && hasBskyAppRpc ? (\n <Trans>\n Manage your profile, posts, likes and follows as well as read your\n private preferences\n </Trans>\n ) : (\n <Trans>Manage your profile, posts, likes and follows</Trans>\n )\n }\n />\n )\n }\n\n return null\n}\n\nfunction BlueskyChatPermissions({\n permissions,\n}: {\n permissions: ScopePermissionsTransition\n}) {\n const { t } = useLingui()\n\n const enablesChat = useMemo(() => {\n return (\n permissions.hasTransitionChatBsky ||\n permissions.scopes.some(scopeEnablesChat)\n )\n }, [permissions])\n\n if (enablesChat) {\n return (\n <DescriptionCard\n role=\"listitem\"\n image={<ChatCircleDotsIcon className=\"size-6\" />}\n title={t`Chat`}\n description={t`Read and send messages`}\n />\n )\n }\n\n return null\n}\n\nfunction IdentityPermissions({\n permissions,\n}: {\n permissions: ScopePermissionsTransition\n}) {\n const { t } = useLingui()\n\n const attr = useMemo(() => {\n if (permissions.allowsIdentity({ attr: '*' })) {\n return '*' as const\n }\n\n if (permissions.allowsIdentity({ attr: 'handle' })) {\n return 'handle' as const\n }\n\n return null\n }, [permissions])\n\n if (attr) {\n return (\n <DescriptionCard\n role=\"listitem\"\n image={<IdentificationBadgeIcon className=\"size-6\" />}\n title={t`Identity`}\n description={\n attr === '*' ? (\n <Trans>\n Manage your <b>full identity</b> including your <b>@handle</b>\n </Trans>\n ) : (\n <Trans>\n Change your <b>@handle</b>\n </Trans>\n )\n }\n />\n )\n }\n\n return null\n}\n\nfunction RpcMethodsDetails({\n permissions,\n}: {\n permissions: ScopePermissionsTransition\n}) {\n const { t } = useLingui()\n\n if (permissions.hasTransitionGeneric) {\n return (\n <DescriptionCard\n role=\"listitem\"\n image={<CertificateIcon className=\"size-6\" />}\n title={t({ context: 'OAuthScope', message: 'Authenticate' })}\n description={\n <Trans>\n Perform authenticated actions towards <b>any service</b> on your\n behalf\n </Trans>\n }\n />\n )\n }\n\n if (permissions.scopes.some((s) => RpcPermission.fromString(s) != null)) {\n return (\n <DescriptionCard\n role=\"listitem\"\n image={<CertificateIcon className=\"size-6\" />}\n title={t({ context: 'OAuthScope', message: 'Authenticate' })}\n description={t`Perform actions on your behalf`}\n extra={<RpcMethodsTable className=\"mt-2\" permissions={permissions} />}\n >\n <Trans>\n The AT Protocol network uses an authentication mechanism that allows\n to uniquely identify users when communicating with external services.\n This is typically used to retrieve or update data linked to your\n account, such as chat messages, feeds or moderation content. The\n application requests the permissions necessary to perform the\n following authenticated actions on your behalf:\n </Trans>\n </DescriptionCard>\n )\n }\n\n return null\n}\n\ntype RpcMethodsTableProps = Override<\n HTMLAttributes<HTMLTableElement>,\n {\n permissions: ScopePermissionsTransition\n children?: never\n }\n>\nfunction RpcMethodsTable({\n permissions,\n className = '',\n ...attrs\n}: RpcMethodsTableProps) {\n const audLxmsEntries = useMemo(() => {\n const map = new Map<AudParam, Set<LxmParam>>()\n\n for (const s of permissions.scopes) {\n const parsed = RpcPermission.fromString(s)\n if (!parsed) continue\n\n let set = map.get(parsed.aud)\n if (!set) map.set(parsed.aud, (set = new Set()))\n for (const lxm of parsed.lxm) set.add(lxm)\n }\n\n return Array.from(map.entries())\n .sort(([a], [b]) => a.localeCompare(b))\n .map(\n ([aud, lxms]) =>\n [\n aud,\n lxms.has('*')\n ? (['*'] as const)\n : Array.from(lxms).sort((a, b) => a.localeCompare(b)),\n ] as const,\n )\n }, [permissions])\n\n if (!audLxmsEntries.length) return null\n\n return (\n <table className={`w-full table-auto ${className}`} {...attrs}>\n <thead>\n <tr className=\"text-sm\">\n <th className=\"text-left font-normal\">\n <Trans context=\"RPC lxm\">Call</Trans>\n </th>\n <th className=\"text-left font-normal\">\n <Trans context=\"RPC aud\">Towards</Trans>\n </th>\n </tr>\n </thead>\n <tbody>\n {audLxmsEntries.map(([aud, lxms]) =>\n lxms.map((lxm, i, array) => (\n <tr key={lxm} className=\"text-xs\">\n <td className={i > 0 ? 'pt-1' : undefined}>\n <Lxm lxm={lxm} />\n </td>\n {i === 0 && (\n <td className=\"align-top\" rowSpan={array.length}>\n <Aud aud={aud} />\n </td>\n )}\n </tr>\n )),\n )}\n </tbody>\n </table>\n )\n}\n\nfunction RepoPermissions({\n permissions,\n}: {\n permissions: ScopePermissionsTransition\n}) {\n const { t } = useLingui()\n\n if (\n permissions.hasTransitionGeneric ||\n permissions.allowsAccount({ attr: 'repo', action: 'manage' }) ||\n (permissions.allowsRepo({ collection: '*', action: 'create' }) &&\n permissions.allowsRepo({ collection: '*', action: 'delete' }) &&\n permissions.allowsRepo({ collection: '*', action: 'update' }))\n ) {\n return (\n <DescriptionCard\n role=\"listitem\"\n image={<BookOpenIcon className=\"size-6\" />}\n title={t`Repository`}\n description={\n <Trans>\n Create, update, and delete any public data linked to your account\n </Trans>\n }\n />\n )\n }\n\n if (permissions.scopes.some((s) => RepoPermission.fromString(s) != null)) {\n return (\n <DescriptionCard\n role=\"listitem\"\n image={<BookOpenIcon className=\"size-6\" />}\n title={t`Repository`}\n description={t`Publish changes`}\n extra={<RepoTable className=\"mt-2\" permissions={permissions} />}\n >\n <Trans>\n Your repository contains all the data publicly available on the AT\n Protocol network, such as Bluesky posts, likes, and follows. It also\n contains data created through other apps you've signed into using this\n account. The application requests the permissions necessary to publish\n the following changes to your repository:\n </Trans>\n </DescriptionCard>\n )\n }\n\n return null\n}\n\ntype RepoTableProps = Override<\n HTMLAttributes<HTMLTableElement>,\n {\n permissions: ScopePermissionsTransition\n children?: never\n }\n>\nfunction RepoTable({ permissions, className, ...attrs }: RepoTableProps) {\n const { t } = useLingui()\n\n const nsidActions = useMemo(() => {\n const map = new Map<\n CollectionParam,\n {\n create: boolean\n update: boolean\n delete: boolean\n }\n >()\n\n for (const s of permissions.scopes) {\n const parsed = RepoPermission.fromString(s)\n if (!parsed) continue\n\n for (const coll of parsed.collection) {\n if (map.has(coll)) {\n const actions = map.get(coll)!\n for (const action of parsed.action) actions[action] = true\n } else {\n map.set(coll, {\n create: parsed.action.includes('create'),\n update: parsed.action.includes('update'),\n delete: parsed.action.includes('delete'),\n })\n }\n }\n }\n\n return map\n }, [permissions])\n\n const blobScopes = useMemo(() => {\n if (permissions.hasTransitionGeneric) {\n return [new BlobPermission(['*/*'])]\n }\n return Array.from(\n permissions.scopes.map((v) => BlobPermission.fromString(v)),\n ).filter((v) => v != null)\n }, [permissions])\n\n if (!nsidActions.size) return null\n\n const starActions = nsidActions.get('*')\n\n const nsidActionsEntries = useMemo(() => {\n return Array.from(nsidActions.entries()).sort(([a], [b]) =>\n a.localeCompare(b),\n )\n }, [nsidActions])\n\n return (\n <table className={`w-full table-auto text-left ${className}`} {...attrs}>\n <thead>\n <tr className=\"text-sm\">\n <th className=\"font-normal\">{t`Data`}</th>\n <th className=\"text-center font-normal\">{t`Create`}</th>\n <th className=\"text-center font-normal\">{t`Update`}</th>\n <th className=\"text-center font-normal\">{t`Delete`}</th>\n </tr>\n </thead>\n <tbody>\n {nsidActionsEntries.map(([coll, actions], i) => (\n <tr key={coll} className=\"text-xs\">\n <td className={i > 0 ? 'pt-1' : undefined}>\n <Collection coll={coll} />\n </td>\n <td className=\"text-center\">\n {starActions?.create || actions.create ? (\n <CheckIcon className=\"inline-block size-3\" />\n ) : null}\n </td>\n <td className=\"text-center\">\n {starActions?.update || actions.update ? (\n <CheckIcon className=\"inline-block size-3\" />\n ) : null}\n </td>\n <td className=\"text-center\">\n {starActions?.delete || actions.delete ? (\n <CheckIcon className=\"inline-block size-3\" />\n ) : null}\n </td>\n </tr>\n ))}\n {blobScopes.length > 0 && (\n <tr>\n <td className=\"pt-2\">\n <Trans>Blob storage</Trans>\n </td>\n <td colSpan={3} className=\"pt-2 text-center\">\n <Trans>Upload files</Trans>\n </td>\n </tr>\n )}\n </tbody>\n </table>\n )\n}\n\n// UTILS\n\nfunction isOfficialBlueskyAppviewServiceId(aud: string): boolean {\n return aud === 'did:web:bsky.app#bsky_appview'\n}\n\nfunction isBskyAppNsid(nsid: string): nsid is `app.bsky.${string}` {\n return nsid.startsWith('app.bsky.')\n}\nfunction isBskyChatNsid(nsid: string): nsid is `chat.bsky.${string}` {\n return nsid.startsWith('chat.bsky.')\n}\n\nfunction scopeEnablesChat(scope: string): boolean {\n if (scope === 'transition:chat.bsky') return true\n const rpc = RpcPermission.fromString(scope)\n if (!rpc) return false\n // Official Bluesky chat is not hosted by the appview service\n if (isOfficialBlueskyAppviewServiceId(rpc.aud)) return false\n return rpc.lxm.includes('*') || rpc.lxm.some(isBskyChatNsid)\n}\n\nfunction isBlueskySpecificNsid(nsid: CollectionParam | LxmParam): boolean {\n return nsid === '*'\n ? false\n : nsid === 'com.atproto.moderation.createReport' ||\n isBskyAppNsid(nsid) ||\n isBskyChatNsid(nsid)\n}\n\nfunction scopeEnablesBskyAppRepo(scope: string): boolean {\n if (scope === 'transition:generic') return true\n const repo = RepoPermission.fromString(scope)\n if (!repo) return false\n return (\n repo.collection.includes('*') || repo.collection.some(isBlueskySpecificNsid)\n )\n}\n\nfunction scopeEnablesPrivateBskyAppMethods(scope: string): boolean {\n if (scope === 'transition:generic') return true\n const rpc = RpcPermission.fromString(scope)\n if (!rpc) return false\n return (\n rpc.lxm.includes('app.bsky.actor.getPreferences') ||\n rpc.lxm.includes('app.bsky.graph.block') ||\n rpc.lxm.includes('app.bsky.graph.muteActor') ||\n rpc.lxm.includes('app.bsky.graph.muteActorList') ||\n rpc.lxm.includes('app.bsky.graph.muteThread') ||\n rpc.lxm.includes('app.bsky.graph.unmuteActor') ||\n rpc.lxm.includes('app.bsky.graph.unmuteActorList') ||\n rpc.lxm.includes('app.bsky.graph.unmuteThread') ||\n rpc.lxm.includes('app.bsky.graph.getMutes') ||\n rpc.lxm.includes('*')\n )\n}\n\ntype LxmProps = Override<\n Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n { lxm: LxmParam }\n>\nfunction Lxm({ lxm, ...attrs }: LxmProps) {\n return lxm === '*' ? (\n <ItemDescription {...attrs}>\n <Trans>Any method</Trans>\n </ItemDescription>\n ) : (\n <Nsid {...attrs} nsid={lxm} />\n )\n}\n\ntype AudProps = Override<\n Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'title'>,\n { aud: AudParam }\n>\nfunction Aud({ aud, ...attrs }: AudProps) {\n if (aud.startsWith('did:web:api.bsky.app#')) {\n return (\n <ItemDescription {...attrs} title={aud}>\n <Trans>Bluesky App services</Trans>\n </ItemDescription>\n )\n }\n if (aud.startsWith('did:web:api.bsky.chat#')) {\n return (\n <ItemDescription {...attrs} title={aud}>\n <Trans>Bluesky Chat services</Trans>\n </ItemDescription>\n )\n }\n if (aud.startsWith('did:web:') && aud.includes('#')) {\n const domain = aud.slice(8, aud.indexOf('#'))\n return (\n <ItemDescription {...attrs} title={aud}>\n <Trans>\n A service controlled by <b>{domain}</b>\n </Trans>\n </ItemDescription>\n )\n }\n if (aud === '*') {\n return (\n <ItemDescription {...attrs}>\n <Trans>Any service</Trans>\n </ItemDescription>\n )\n }\n\n return (\n <Identifier {...attrs} title={aud}>\n {aud}\n </Identifier>\n )\n}\n\ntype CollectionProps = Override<\n HTMLAttributes<HTMLDivElement>,\n { coll: CollectionParam; children?: never }\n>\nfunction Collection({ coll, ...attrs }: CollectionProps) {\n return coll === '*' ? (\n <ItemDescription {...attrs}>\n <Trans>Any collection</Trans>\n </ItemDescription>\n ) : (\n <Nsid {...attrs} nsid={coll} />\n )\n}\n\ntype ItemDescriptionProps = HTMLAttributes<HTMLDivElement>\nfunction ItemDescription({\n children,\n className = '',\n ...attrs\n}: ItemDescriptionProps) {\n return (\n <em {...attrs} className={`text-text-light ${className}`}>\n {children}\n </em>\n )\n}\n\ntype NsidProps = Override<IdentifierProps, { nsid: string; children?: never }>\nfunction Nsid({ nsid, ...attrs }: NsidProps) {\n return (\n <Identifier {...attrs}>\n {nsid.split('.').map((part, i) =>\n i === 0 ? (\n part\n ) : (\n // line break **after** the dot\n <Fragment key={i}>\n {'.'}\n <wbr />\n {part}\n </Fragment>\n ),\n )}\n </Identifier>\n )\n}\n\ntype IdentifierProps = HTMLAttributes<HTMLDivElement>\nfunction Identifier({\n children,\n className = '',\n ...attrs\n}: IdentifierProps): ReactNode {\n return (\n <code {...attrs} className={`text-text-light ${className}`}>\n {children}\n </code>\n )\n}\n","import { Trans, useLingui } from '@lingui/react/macro'\nimport { ReactNode, useState } from 'react'\nimport type { Account } from '@atproto/oauth-provider-api'\nimport { AccountPermission } from '@atproto/oauth-scopes'\nimport type { OAuthClientMetadata } from '@atproto/oauth-types'\nimport type { PermissionSets } from '#/hydration-data.d.ts'\nimport { Button } from './forms/button.tsx'\nimport { FormCard } from './forms/form-card.tsx'\nimport { AccountIdentifier } from './utils/account-identifier.tsx'\nimport { ClientImage } from './utils/client-image.tsx'\nimport { ClientName } from './utils/client-name.tsx'\nimport { DescriptionCard } from './utils/description-card.tsx'\nimport { ScopeDescription } from './utils/scope-description.tsx'\n\nexport type ConsentFormProps = {\n clientId: string\n clientMetadata: OAuthClientMetadata\n clientTrusted: boolean\n clientFirstParty: boolean\n permissionSets: PermissionSets\n\n account: Account\n scope?: string\n\n onConsent: (scope?: string) => void\n consentLabel?: ReactNode\n\n onReject: () => void\n rejectLabel?: ReactNode\n\n onBack?: () => void\n backLabel?: ReactNode\n}\n\nfunction isTransitionScope(scope: string): scope is `transition:${string}` {\n return scope.startsWith('transition:')\n}\n\nfunction isAccountEmailScope(scope: string): boolean {\n const parsed = AccountPermission.fromString(scope)\n if (!parsed) return false\n return parsed.matches({ attr: 'email', action: 'read' })\n}\n\nfunction stripAccountEmailScope(scope?: string): string | undefined {\n return scope\n ?.split(' ')\n .filter((s) => !isAccountEmailScope(s))\n .join(' ')\n}\n\nexport function ConsentForm({\n clientId,\n clientMetadata,\n clientTrusted,\n clientFirstParty,\n permissionSets,\n\n account,\n scope,\n\n onConsent,\n onReject,\n onBack,\n}: ConsentFormProps) {\n const { t } = useLingui()\n const [allowEmail, setAllowEmail] = useState(true)\n\n // Require the granular scope system to be able to unset the `account:email`\n // scope.\n const canUnsetEmail = !scope?.split(' ').some(isTransitionScope)\n\n return (\n <FormCard\n onSubmit={(event) => {\n event.preventDefault()\n const acceptedScope =\n canUnsetEmail && !allowEmail ? stripAccountEmailScope(scope) : scope\n onConsent(acceptedScope)\n }}\n cancel={onBack && <Button onClick={onBack}>{<Trans>Back</Trans>}</Button>}\n actions={\n <>\n <Button type=\"submit\" color=\"primary\">\n {<Trans context=\"OAuthConsent\">Authorize</Trans>}\n </Button>\n\n <Button onClick={onReject}>\n {<Trans context=\"OAuthConsent\">Deny access</Trans>}\n </Button>\n </>\n }\n >\n <DescriptionCard\n image={\n <ClientImage\n clientId={clientId}\n clientMetadata={clientMetadata}\n clientTrusted={clientTrusted}\n />\n }\n title={\n <ClientName\n clientId={clientId}\n clientMetadata={clientMetadata}\n clientTrusted={clientTrusted}\n />\n }\n description={\n !scope || scope === 'atproto' ? (\n <Trans>\n wants to uniquely identify you through your{' '}\n <AccountIdentifier account={account} className=\"font-bold\" />{' '}\n account\n </Trans>\n ) : (\n <Trans>\n wants to access your{' '}\n <AccountIdentifier account={account} className=\"font-bold\" />{' '}\n account\n </Trans>\n )\n }\n hint={t`Technical details`}\n >\n {scope ? (\n <>\n <p>\n <Trans>\n This application is requesting the following permissions\n (scopes) to access your account:\n </Trans>\n </p>\n <pre className=\"bg-light mt-2 overflow-x-auto whitespace-pre-wrap rounded border p-2 text-sm\">\n {scope}\n </pre>\n </>\n ) : null}\n </DescriptionCard>\n\n <ScopeDescription\n scope={scope}\n permissionSets={permissionSets}\n clientTrusted={clientTrusted}\n clientFirstParty={clientFirstParty}\n allowEmail={canUnsetEmail ? allowEmail : true}\n onAllowEmail={canUnsetEmail ? setAllowEmail : undefined}\n />\n\n <p>\n <Trans>\n By clicking <b>{<Trans context=\"OAuthConsent\">Authorize</Trans>}</b>,\n you will grant this application access to your account in accordance\n with its{' '}\n <a\n role=\"link\"\n href={clientMetadata.tos_uri}\n rel=\"nofollow noopener\"\n target=\"_blank\"\n className={\n clientMetadata.tos_uri ? 'text-primary underline' : undefined\n }\n >\n <Trans>terms of service</Trans>\n </a>\n {' and '}\n <a\n role=\"link\"\n href={clientMetadata.policy_uri}\n rel=\"nofollow noopener\"\n target=\"_blank\"\n className={\n clientMetadata.policy_uri ? 'text-primary underline' : undefined\n }\n >\n <Trans>privacy policy</Trans>\n </a>\n .\n </Trans>\n </p>\n </FormCard>\n )\n}\n","import { msg } from '@lingui/core/macro'\nimport { Trans } from '@lingui/react/macro'\nimport type { Account } from '@atproto/oauth-provider-api'\nimport type { OAuthClientMetadata } from '@atproto/oauth-types'\nimport type { PermissionSets } from '#/hydration-data.d.ts'\nimport { ConsentForm } from './consent-form.tsx'\nimport { LayoutTitle } from './layouts/layout-title.tsx'\nimport { AccountIdentifier } from './utils/account-identifier.tsx'\n\nexport type ConsentViewProps = {\n clientId: string\n clientMetadata: OAuthClientMetadata\n clientTrusted: boolean\n clientFirstParty: boolean\n permissionSets: PermissionSets\n\n account: Account\n scope?: string\n\n onConsent: (scope?: string) => void\n onReject: () => void\n onBack?: () => void\n}\n\nexport function ConsentView({\n clientId,\n clientMetadata,\n clientTrusted,\n clientFirstParty,\n permissionSets,\n account,\n scope,\n onConsent,\n onReject,\n onBack,\n}: ConsentViewProps) {\n return (\n <LayoutTitle\n title={msg({ message: 'Authorize', context: 'OAuthConsent' })}\n subtitle={\n <Trans>\n Grant access to your <AccountIdentifier account={account} /> account\n </Trans>\n }\n >\n <ConsentForm\n clientId={clientId}\n clientMetadata={clientMetadata}\n clientTrusted={clientTrusted}\n clientFirstParty={clientFirstParty}\n permissionSets={permissionSets}\n account={account}\n scope={scope}\n onBack={onBack}\n onConsent={onConsent}\n onReject={onReject}\n />\n </LayoutTitle>\n )\n}\n","import './style.css'\n\nimport { msg } from '@lingui/core/macro'\nimport { Trans } from '@lingui/react/macro'\nimport { StrictMode, useCallback, useState } from 'react'\nimport { createRoot } from 'react-dom/client'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { ConsentView } from '#/components/consent-view.tsx'\nimport { errorViewRender } from '#/components/error-view.tsx'\nimport { LayoutTitle } from '#/components/layouts/layout-title'\nimport { AuthenticationProvider } from '#/contexts/authentication.tsx'\nimport { CustomizationProvider } from '#/contexts/customization.tsx'\nimport { NotificationsProvider } from '#/contexts/notifications.tsx'\nimport { SessionProvider, useSessionContext } from '#/contexts/session.tsx'\nimport type { HydrationData } from '#/hydration-data.d.ts'\nimport { LocaleProvider } from '#/locales/locale-provider.tsx'\n\nconst {\n __authorizeData: authorizeData,\n __customizationData: customizationData,\n __sessions: initialSessions,\n} = window as typeof window & HydrationData['authorization-page']\n\n// When the user is logging in, make sure the page URL contains the\n// \"request_uri\" in case the user refreshes the page.\n// @TODO Actually do this on the backend through a redirect.\nconst url = new URL(window.location.href)\nif (\n url.pathname === '/oauth/authorize' &&\n !url.searchParams.has('request_uri')\n) {\n url.search = ''\n url.searchParams.set('client_id', authorizeData.clientId)\n url.searchParams.set('request_uri', authorizeData.requestUri)\n window.history.replaceState(history.state, '', url.pathname + url.search)\n}\n\nconst container = document.getElementById('root')!\n\ncreateRoot(container).render(\n <StrictMode>\n <CustomizationProvider value={customizationData}>\n <LocaleProvider userLocales={authorizeData.uiLocales?.split(' ')}>\n <NotificationsProvider>\n <ErrorBoundary fallbackRender={errorViewRender}>\n <SessionProvider\n initialSessions={initialSessions}\n initialSelected={authorizeData.selectedSub}\n >\n <App />\n </SessionProvider>\n </ErrorBoundary>\n </NotificationsProvider>\n </LocaleProvider>\n </CustomizationProvider>\n </StrictMode>,\n)\n\n// @NOTE We do not want to use a router here because we do not want any change\n// in the view to be reflected as a browser navigation.\nfunction App() {\n const loginHint = authorizeData.loginHint || undefined\n\n const { session, setSession, doConsent, doReject } = useSessionContext()\n const [isDone, setIsDone] = useState(\n session != null && session.consentRequired === false,\n )\n\n const performRedirect = useCallback((url: string) => {\n // @TODO At this point, the request cannot be accepted/rejected anymore.\n // We should probably change the app's state to something that indicates\n // that in order to improve UX in case the user comes back to the app.\n // This is currently ensured by the backend (through back-forward cache\n // busting) but handling it here would provide a better UX since the\n // backend will remove (and prevent access) to accepted/rejected requests\n // data, while the back-forward cache remembers them.\n\n window.location.href = url\n setTimeout(() => setIsDone(true))\n }, [])\n\n const doConsentAndRedirect = useCallback(\n async (...args: Parameters<typeof doConsent>) => {\n const { url } = await doConsent(...args)\n performRedirect(url)\n },\n [doConsent, performRedirect],\n )\n\n const doRejectAndRedirect = useCallback(\n async (...args: Parameters<typeof doReject>) => {\n const { url } = await doReject(...args)\n performRedirect(url)\n },\n [doReject, performRedirect],\n )\n\n return (\n <AuthenticationProvider\n onCancel={doRejectAndRedirect}\n forcedIdentifier={loginHint}\n promptMode={authorizeData.promptMode}\n >\n {session && !isDone ? (\n <ConsentView\n clientId={authorizeData.clientId}\n clientMetadata={authorizeData.clientMetadata}\n clientTrusted={authorizeData.clientTrusted}\n clientFirstParty={authorizeData.clientFirstParty}\n permissionSets={authorizeData.permissionSets}\n account={session.account}\n scope={authorizeData.scope}\n onConsent={(scope) =>\n doConsentAndRedirect(session.account.sub, scope)\n }\n onReject={doRejectAndRedirect}\n onBack={loginHint ? undefined : () => setSession(null)}\n />\n ) : (\n <LayoutTitle title={msg`Login complete`}>\n <Trans>You are being redirected...</Trans>\n </LayoutTitle>\n )}\n </AuthenticationProvider>\n )\n}\n"],"names":["c","a.createElement","a.Fragment","e","a","e.createElement","e.Fragment","t","o.forwardRef","m","o.createElement","r","n","e.forwardRef","o","i","isScopeStringFor","value","prefix","nextChar","isScopeSyntaxFor","syntax","minIdx","b","knownValuesValidator","values","set","ScopeStringSyntax","positional","params","key","_a","scope","normalizeURIComponent","scopeValue","paramIdx","colonIdx","prefixEnd","ALLOWED_SCOPE_CHARS","NORMALIZABLE_CHARS_MAP","encoded","end","encodedChar","normalizedChar","Parser","schema","positionalName","normalized","arrayParamEquals","unique","v","result","definition","param","item","ACCOUNT_ATTRIBUTES","ACCOUNT_ACTIONS","_AccountPermission","attr","action","options","AccountPermission","isStringSlashString","slashIndex","isMime","isAccept","matchesAcceptUnsafe","accept","mime","matchesAnyAcceptUnsafe","acceptable","matchesAnyAccept","DEFAULT_ACCEPT","_BlobPermission","toLowerCase","isNonRedundant","BlobPermission","index","arr","base","IDENTITY_ATTRIBUTES","_IdentityPermission","IdentityPermission","success","failure","message","isValidNsid","input","validateNsidRegex","isNsid","isArray","LexPermissionSyntax","lexPermission","REPO_ACTIONS","isRepoAction","isCollectionParam","_RepoPermission","collection","includedIn","RepoPermission","isLxmParam","isAudParam","isAtprotoAudience","_RpcPermission","aud","lxm","RpcPermission","_IncludeScope","nsid","permissionSet","p","resourcePermission","toResourcePermission","permission","isLexPermissionForResource","inheritAud","rest","otherNsid","lexiconNsid","groupPrefixEnd","IncludeScope","type","ScopeMissingError","ScopesSet","resource","permissionScopeMatches","scopeNeededFor","fn","string","parsePermissionScope","ScopePermissions","ScopePermissionsTransition","ClientImage","clientId","clientMetadata","clientTrusted","errored","setErrored","useState","src","logo_uri","undefined","alt","client_name","useEffect","_jsx","img","aria-hidden","className","onError","div","InfoIcon","isConventionalOAuthClientId","url","URL","protocol","pathname","port","search","UrlViewer","proto","host","path","query","hash","as","As","props","urlObj","useMemo","UrlPartViewer","faded","bold","Comp","ClientName","attrs","span","Trans_","simplifiedView","DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","__scopeDialog","children","openProp","defaultOpen","onOpenChange","modal","triggerRef","React.useRef","contentRef","open","setOpen","useControllableState","jsx","useId","React.useCallback","prevOpen","TRIGGER_NAME","DialogTrigger","React.forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","DialogPortal","forceMount","container","React.Children","child","Presence","PortalPrimitive","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","Slot","createSlot","RemoveScroll","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","React.useEffect","content","hideOthers","DialogContentImpl","event","originalEvent","ctrlLeftClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","_b","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","DismissableLayer","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","DESCRIPTION_NAME","DialogDescription","descriptionProps","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","titleId","titleWarningContext","MESSAGE","DESCRIPTION_WARNING_NAME","descriptionId","describedById","Root","Trigger","Portal","Overlay","Content","Title","Description","Close","DescriptionCard","hint","image","title","description","append","extra","useLingui","h3","_jsxs","asChild","Button","shape","aria-label","aria-haspopup","size","QuestionIcon","role","$__i18n","XIcon","makeSvgComponent","displayName","SvgComponent","forwardRef","ref","svg","xmlns","viewBox","fill","fillRule","clipRule","d","ButterflyIcon","ScopeDescription","permissionSets","clientFirstParty","allowEmail","onAllowEmail","includeScopes","Array","from","Set","split","map","fromString","filter","permissions","scopes","has","EmailPermissions","IdentityPermissions","AccountPermissions","BlueskyAppviewPermissions","BlueskyChatPermissions","IncludedPermissions","FineGrainedPermissions","IdentityWarning","includeScope","IncludeScopePermissions","toScopes","isBskyAppNsid","isBskyChatNsid","ChatCircleDotsIcon","startsWith","HandIcon","AtomIcon","LangProp","object","property","fallback","_Fragment","RpcMethodsTable","RepoTable","allowsIdentity","Admonition","allowedAction","find","allowsAccount","label","EnvelopeIcon","Checkbox","checked","onChange","UserIcon","foundOne","s","rpc","isOfficialBlueskyAppviewServiceId","every","isBlueskySpecificNsid","repo","RepoPermissions","RpcMethodsDetails","hasBskyAppRepo","some","scopeEnablesBskyAppRepo","hasBskyAppRpc","scopeEnablesPrivateBskyAppMethods","hasTransitionChatBsky","scopeEnablesChat","IdentificationBadgeIcon","hasTransitionGeneric","CertificateIcon","audLxmsEntries","Map","parsed","get","add","entries","sort","localeCompare","lxms","length","table","thead","tr","th","tbody","array","td","Lxm","rowSpan","Aud","allowsRepo","BookOpenIcon","nsidActions","coll","actions","create","includes","update","delete","blobScopes","starActions","nsidActionsEntries","Collection","CheckIcon","colSpan","ItemDescription","Nsid","domain","slice","indexOf","Identifier","em","part","wbr","code","isTransitionScope","isAccountEmailScope","matches","stripAccountEmailScope","join","ConsentForm","account","onConsent","onReject","onBack","setAllowEmail","canUnsetEmail","FormCard","onSubmit","preventDefault","acceptedScope","cancel","onClick","color","AccountIdentifier","pre","href","tos_uri","rel","policy_uri","ConsentView","LayoutTitle","subtitle","__authorizeData","authorizeData","__customizationData","customizationData","__sessions","initialSessions","window","location","searchParams","requestUri","history","replaceState","state","document","getElementById","createRoot","render","StrictMode","CustomizationProvider","LocaleProvider","userLocales","uiLocales","NotificationsProvider","ErrorBoundary","fallbackRender","errorViewRender","SessionProvider","initialSelected","selectedSub","App","loginHint","session","setSession","doConsent","doReject","useSessionContext","isDone","setIsDone","consentRequired","performRedirect","useCallback","doConsentAndRedirect","args","doRejectAndRedirect","AuthenticationProvider","onCancel","forcedIdentifier","promptMode","sub"],"mappings":"ydACA,MAAMA,GAAoB,IAAI,IAAI,CAChC,CACE,OACgBC,EAAe,cAACC,EAAU,SAAE,KAAsBD,EAAAA,cAAgB,OAAQ,CAAE,EAAG,g2CAAi2C,CAAC,CACl8C,EACD,CACE,UACgBA,gBAAgBC,EAAAA,SAAY,KAAsBD,EAAe,cAC/E,OACA,CACE,EAAG,uHACH,QAAS,KACjB,CACK,EAAkBA,EAAe,cAAC,OAAQ,CAAE,EAAG,8qCAA8qC,CAAE,CAAC,CACluC,EACD,CACE,OACgBA,EAAe,cAACC,EAAU,SAAE,KAAsBD,EAAAA,cAAgB,OAAQ,CAAE,EAAG,48BAA68B,CAAC,CAC9iC,EACD,CACE,QACgBA,EAAe,cAACC,EAAU,SAAE,KAAsBD,EAAAA,cAAgB,OAAQ,CAAE,EAAG,qzCAAszC,CAAC,CACv5C,EACD,CACE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