Integrate MAS with Synapse

This commit is contained in:
Your Name
2025-12-01 08:14:13 -06:00
parent df07d51d8b
commit a3d39d901b
404 changed files with 22542 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
import{r as f,a4 as u,w as m,j as g}from"./main-CiAhdYQG.js";const h="@",v="#",A="+",I=new Intl.Segmenter;function M(t){if(t.length<1)return"";const e=t[0];[h,v,A].includes(e)&&(t=t.substring(1));const a=I.segment(t)[Symbol.iterator]().next();return a.done?"":a.value.segment}const E="_avatar_1qbcf_8",R="_image_1qbcf_41",o={avatar:E,image:R,"avatar-imageless":"_avatar-imageless_1qbcf_52"};function X(t){return t.split("").reduce((r,n)=>r+n.charCodeAt(0),0)%6+1}function b(t){return!!(t.onClick||t.onKeyDown||t.onKeyUp)}const y=f.forwardRef(function({src:e,id:a,name:c="",type:r="round",className:n="",size:s,style:i={},onError:d,...l},_){return u.createElement(b(l)?"button":"span",{ref:_,role:"img","aria-label":a,...l,"data-type":r,"data-color":X(a),className:m(o.avatar,n,{[o["avatar-imageless"]]:!e}),style:{...i,"--cpd-avatar-size":s}},g.jsx(u.Fragment,{children:e?g.jsx("img",{loading:"lazy",alt:"",src:e,referrerPolicy:"no-referrer",className:m(o.image),"data-type":r,style:i,width:s,height:s,onError:d}):M(c)}))});export{y as A};
//# sourceMappingURL=Avatar-B3RWCmae.js.map

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
{"version":3,"file":"Avatar-B3RWCmae.js","sources":["../node_modules/@vector-im/compound-web/dist/utils/string.js","../node_modules/@vector-im/compound-web/dist/components/Avatar/Avatar.module.css.js","../node_modules/@vector-im/compound-web/dist/components/Avatar/useIdColorHash.js","../node_modules/@vector-im/compound-web/dist/components/Avatar/Avatar.js"],"sourcesContent":["const MX_USERNAME_PREFIX = \"@\";\nconst MX_ROOM_PREFIX = \"#\";\nconst MX_ALIAS_PREFIX = \"+\";\nconst graphemeSegmenter = new Intl.Segmenter();\nfunction getInitialLetter(name) {\n if (name.length < 1) {\n return \"\";\n }\n const initial = name[0];\n if ([MX_USERNAME_PREFIX, MX_ROOM_PREFIX, MX_ALIAS_PREFIX].includes(initial)) {\n name = name.substring(1);\n }\n const result = graphemeSegmenter.segment(name)[Symbol.iterator]().next();\n return result.done ? \"\" : result.value.segment;\n}\nexport {\n MX_ALIAS_PREFIX,\n MX_ROOM_PREFIX,\n MX_USERNAME_PREFIX,\n getInitialLetter\n};\n//# sourceMappingURL=string.js.map\n","const avatar = \"_avatar_1qbcf_8\";\nconst image = \"_image_1qbcf_41\";\nconst styles = {\n avatar,\n image,\n \"avatar-imageless\": \"_avatar-imageless_1qbcf_52\",\n \"stacked-avatars\": \"_stacked-avatars_1qbcf_102\",\n \"clip-path\": \"_clip-path_1qbcf_121\"\n};\nexport {\n avatar,\n styles as default,\n image\n};\n//# sourceMappingURL=Avatar.module.css.js.map\n","function useIdColorHash(id) {\n const MIN = 1;\n const MAX = 6;\n const charCodeSum = id.split(\"\").reduce((sum, char) => {\n return sum + char.charCodeAt(0);\n }, 0);\n return charCodeSum % MAX + MIN;\n}\nexport {\n useIdColorHash\n};\n//# sourceMappingURL=useIdColorHash.js.map\n","import { jsx } from \"react/jsx-runtime\";\nimport classNames from \"classnames\";\nimport React, { forwardRef } from \"react\";\nimport { getInitialLetter } from \"../../utils/string.js\";\nimport styles from \"./Avatar.module.css.js\";\nimport { useIdColorHash } from \"./useIdColorHash.js\";\nfunction shouldBeAButton(props) {\n return !!(props.onClick || props.onKeyDown || props.onKeyUp);\n}\nconst Avatar = forwardRef(function Avatar2({\n src,\n id,\n name = \"\",\n type = \"round\",\n className = \"\",\n size,\n style = {},\n onError,\n ...props\n}, ref) {\n return React.createElement(\n shouldBeAButton(props) ? \"button\" : \"span\",\n {\n ref,\n role: \"img\",\n // Default the aria-label to id\n \"aria-label\": id,\n ...props,\n \"data-type\": type,\n \"data-color\": useIdColorHash(id),\n className: classNames(styles.avatar, className, {\n [styles[\"avatar-imageless\"]]: !src\n }),\n style: {\n ...style,\n \"--cpd-avatar-size\": size\n }\n },\n /* @__PURE__ */ jsx(React.Fragment, { children: !src ? getInitialLetter(name) : /* @__PURE__ */ jsx(\n \"img\",\n {\n loading: \"lazy\",\n alt: \"\",\n src,\n referrerPolicy: \"no-referrer\",\n className: classNames(styles.image),\n \"data-type\": type,\n style,\n width: size,\n height: size,\n onError\n }\n ) })\n );\n});\nexport {\n Avatar\n};\n//# sourceMappingURL=Avatar.js.map\n"],"names":["MX_USERNAME_PREFIX","MX_ROOM_PREFIX","MX_ALIAS_PREFIX","graphemeSegmenter","getInitialLetter","name","initial","result","avatar","image","styles","useIdColorHash","id","sum","char","shouldBeAButton","props","Avatar","forwardRef","src","type","className","size","style","onError","ref","React","classNames","jsx"],"mappings":"6DAAA,MAAMA,EAAqB,IACrBC,EAAiB,IACjBC,EAAkB,IAClBC,EAAoB,IAAI,KAAK,UACnC,SAASC,EAAiBC,EAAM,CAC9B,GAAIA,EAAK,OAAS,EAChB,MAAO,GAET,MAAMC,EAAUD,EAAK,CAAC,EAClB,CAACL,EAAoBC,EAAgBC,CAAe,EAAE,SAASI,CAAO,IACxED,EAAOA,EAAK,UAAU,CAAC,GAEzB,MAAME,EAASJ,EAAkB,QAAQE,CAAI,EAAE,OAAO,QAAQ,EAAC,EAAG,KAAI,EACtE,OAAOE,EAAO,KAAO,GAAKA,EAAO,MAAM,OACzC,CCdA,MAAMC,EAAS,kBACTC,EAAQ,kBACRC,EAAS,CACb,OAAAF,EACA,MAAAC,EACA,mBAAoB,4BAGtB,ECRA,SAASE,EAAeC,EAAI,CAM1B,OAHoBA,EAAG,MAAM,EAAE,EAAE,OAAO,CAACC,EAAKC,IACrCD,EAAMC,EAAK,WAAW,CAAC,EAC7B,CAAC,EACiB,EAAM,CAC7B,CCDA,SAASC,EAAgBC,EAAO,CAC9B,MAAO,CAAC,EAAEA,EAAM,SAAWA,EAAM,WAAaA,EAAM,QACtD,CACK,MAACC,EAASC,EAAAA,WAAW,SAAiB,CACzC,IAAAC,EACA,GAAAP,EACA,KAAAP,EAAO,GACP,KAAAe,EAAO,QACP,UAAAC,EAAY,GACZ,KAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,QAAAC,EACA,GAAGR,CACL,EAAGS,EAAK,CACN,OAAOC,EAAM,cACXX,EAAgBC,CAAK,EAAI,SAAW,OACpC,CACE,IAAAS,EACA,KAAM,MAEN,aAAcb,EACd,GAAGI,EACH,YAAaI,EACb,aAAcT,EAAeC,CAAE,EAC/B,UAAWe,EAAWjB,EAAO,OAAQW,EAAW,CAC9C,CAACX,EAAO,kBAAkB,CAAC,EAAG,CAACS,CACvC,CAAO,EACD,MAAO,CACL,GAAGI,EACH,oBAAqBD,CAC7B,CACA,EACoBM,MAAIF,EAAM,SAAU,CAAE,SAAWP,EAA+CS,EAAAA,IAC9F,MACA,CACE,QAAS,OACT,IAAK,GACL,IAAAT,EACA,eAAgB,cAChB,UAAWQ,EAAWjB,EAAO,KAAK,EAClC,YAAaU,EACb,MAAAG,EACA,MAAOD,EACP,OAAQA,EACR,QAAAE,CACR,CACA,EAd2DpB,EAAiBC,CAAI,CAc3E,CAAE,CACP,CACA,CAAC","x_google_ignoreList":[0,1,2,3]}

Binary file not shown.

View File

@@ -0,0 +1 @@
a._button-link_x5txo_8[href]{inline-size:initial}

View File

@@ -0,0 +1,2 @@
import{ag as e,r as i,j as r,B as c,w as l}from"./main-CiAhdYQG.js";const u="_button-link_x5txo_8",b={buttonLink:u},x=e(i.forwardRef(({children:s,className:a,...t},n)=>{const o=!!t.disabled||!!t["aria-disabled"]||!1;return r.jsx(c,{as:"a",...t,className:l(b.buttonLink,a),disabled:o,ref:n,children:s})}));export{x as B};
//# sourceMappingURL=ButtonLink-kWcKQZoZ.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ButtonLink-kWcKQZoZ.js","sources":["../src/components/ButtonLink.tsx"],"sourcesContent":["// Copyright 2024, 2025 New Vector Ltd.\n// Copyright 2024 The Matrix.org Foundation C.I.C.\n//\n// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\n// Please see LICENSE files in the repository root for full details.\n\nimport { createLink } from \"@tanstack/react-router\";\nimport { Button } from \"@vector-im/compound-web\";\nimport cx from \"classnames\";\nimport { forwardRef, type PropsWithChildren } from \"react\";\nimport styles from \"./ButtonLink.module.css\";\n\ntype Props = {\n kind?: \"primary\" | \"secondary\" | \"tertiary\";\n size?: \"sm\" | \"lg\";\n Icon?: React.ComponentType<React.SVGAttributes<SVGElement>>;\n destructive?: boolean;\n disabled?: boolean;\n className?: string;\n} & React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nexport const ButtonLink = createLink(\n forwardRef<HTMLAnchorElement, PropsWithChildren<Props>>(\n ({ children, className, ...props }, ref) => {\n const disabled = !!props.disabled || !!props[\"aria-disabled\"] || false;\n return (\n <Button\n as=\"a\"\n {...props}\n className={cx(styles.buttonLink, className)}\n disabled={disabled}\n ref={ref}\n >\n {children}\n </Button>\n );\n },\n ),\n);\n"],"names":["ButtonLink","createLink","forwardRef","children","className","props","ref","disabled","jsx","Button","cx","styles"],"mappings":"oHAqBaA,EAAaC,EACxBC,EAAAA,WACE,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAAQ,CAC1C,MAAMC,EAAW,CAAC,CAACF,EAAM,UAAY,CAAC,CAACA,EAAM,eAAe,GAAK,GACjE,OACEG,EAAAA,IAACC,EAAA,CACC,GAAG,IACF,GAAGJ,EACJ,UAAWK,EAAGC,EAAO,WAAYP,CAAS,EAC1C,SAAAG,EACA,IAAAD,EAEC,SAAAH,CAAA,CAAA,CAGP,CAAA,CAEJ"}

View File

@@ -0,0 +1,21 @@
import{r as l,j as e,u as _,w as p,ag as A,D as I,e as B,G as C,B as m,N as v,h as S,i as q,c as w,d as x,l as y,k as h,b as T}from"./main-CiAhdYQG.js";import{I as k,C as E}from"./computer-Cx9wZ7Nf.js";function f(s,n){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",ref:n,...s,children:e.jsx("path",{d:"M7 23q-.824 0-1.412-.587A1.93 1.93 0 0 1 5 21V3q0-.824.588-1.412A1.93 1.93 0 0 1 7 1h10q.824 0 1.413.587Q19 2.176 19 3v18q0 .824-.587 1.413A1.93 1.93 0 0 1 17 23zm0-5h10V6H7z"})})}f.displayName="MobileIcon";const M=l.forwardRef(f);function b(s,n){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",ref:n,...s,children:[e.jsx("path",{d:"M5 21q-.824 0-1.412-.587A1.93 1.93 0 0 1 3 19V5q0-.824.587-1.412A1.93 1.93 0 0 1 5 3h14q.824 0 1.413.587Q21 4.176 21 5v14q0 .824-.587 1.413A1.93 1.93 0 0 1 19 21zm0-2h14V5H5z"}),e.jsx("path",{d:"M11 10a1 1 0 1 1 1.479.878c-.31.17-.659.413-.94.741-.286.334-.539.8-.539 1.381a1 1 0 0 0 2 .006.3.3 0 0 1 .057-.085 1.4 1.4 0 0 1 .382-.288A3 3 0 1 0 9 10a1 1 0 1 0 2 0m1.999 3.012v-.005zM12 17a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})]})}b.displayName="UnknownIcon";const L=l.forwardRef(b);function j(s,n){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",ref:n,...s,children:e.jsx("path",{d:"M4 20q-.824 0-1.412-.587A1.93 1.93 0 0 1 2 18V6q0-.824.587-1.412A1.93 1.93 0 0 1 4 4h16q.824 0 1.413.588Q22 5.175 22 6v12q0 .824-.587 1.413A1.93 1.93 0 0 1 20 20zm0-2h16V8H4z"})})}j.displayName="WebBrowserIcon";const R=l.forwardRef(j),D="_device-type-icon_10tr1_8",O={deviceTypeIcon:D},Q={UNKNOWN:L,PC:k,MOBILE:M,TABLET:R},K=({deviceType:s})=>{const{t:n}=_(),a=Q[s],i={UNKNOWN:n("frontend.device_type_icon_label.unknown"),PC:n("frontend.device_type_icon_label.pc"),MOBILE:n("frontend.device_type_icon_label.mobile"),TABLET:n("frontend.device_type_icon_label.tablet")}[s];return e.jsx(a,{className:O.deviceTypeIcon,"aria-label":i})},z="_session-card-root_8sc98_8",H="_action_8sc98_13",U="_session-card_8sc98_8",V="_card-header_8sc98_13",P="_disabled_8sc98_59",W="_compact_8sc98_65",F="_content_8sc98_75",$="_name_8sc98_84",G="_client_8sc98_94",J="_metadata_8sc98_109",X="_key_8sc98_118",Y="_value_8sc98_124",t={sessionCardRoot:z,action:H,sessionCard:U,cardHeader:V,disabled:P,compact:W,content:F,name:$,client:G,metadata:J,key:X,value:Y},re=({children:s})=>e.jsx("section",{className:t.sessionCardRoot,children:s}),ce=A(l.forwardRef(({children:s,compact:n,className:a,...o},i)=>{const r=!!o.disabled||!!o["aria-disabled"]||!1;return e.jsx("a",{className:p(a,t.sessionCard,n&&t.compact,r&&t.disabled),...o,ref:i,children:s})})),Z=({children:s,compact:n,disabled:a})=>e.jsx("div",{className:p(t.sessionCard,n&&t.compact,a&&t.disabled),children:s}),ee=({type:s,children:n})=>e.jsxs("header",{className:t.cardHeader,children:[e.jsx(K,{deviceType:s}),e.jsx("div",{className:t.content,children:n})]}),se=({name:s})=>e.jsx("div",{className:t.name,children:s}),ne=({name:s,logoUri:n})=>e.jsxs("div",{className:t.client,children:[e.jsx(E,{name:s,size:"var(--cpd-space-5x)",logoUri:n}),s]}),de=({children:s})=>e.jsx("ul",{className:t.metadata,children:s}),le=({label:s,children:n})=>e.jsxs("li",{children:[e.jsx("div",{className:t.key,children:s}),e.jsx("div",{className:t.value,children:n})]}),ue=({children:s})=>e.jsx("div",{className:t.action,children:s}),oe=({children:s,mutation:n,size:a})=>{const[o,i]=l.useState(!1),{t:r}=_(),u=c=>{c.preventDefault(),n.mutate(void 0,{onSuccess:()=>i(!1)})};return e.jsxs(I,{open:o,onOpenChange:i,trigger:e.jsx(m,{kind:"secondary",destructive:!0,size:a,Icon:v,children:r("frontend.end_session_button.text")}),children:[e.jsx(B,{children:r("frontend.end_session_button.confirmation_modal_title")}),s&&e.jsx(C,{children:s}),e.jsxs(m,{type:"button",kind:"primary",destructive:!0,onClick:u,disabled:n.isPending,Icon:n.isPending?void 0:v,children:[n.isPending&&e.jsx(S,{inline:!0}),r("frontend.end_session_button.text")]}),e.jsx(q,{asChild:!0,children:e.jsx(m,{kind:"tertiary",children:r("action.cancel")})})]})},te=h(`
fragment EndBrowserSessionButton_session on BrowserSession {
id
userAgent {
name
os
model
deviceType
}
}
`),g=h(`
mutation EndBrowserSession($id: ID!) {
endBrowserSession(input: { browserSessionId: $id }) {
status
browserSession {
id
}
}
}
`),me=(s,n)=>{const a=w();return x({mutationFn:()=>y({query:g,variables:{id:s}}),onSuccess:i=>{a.invalidateQueries({queryKey:["sessionsOverview"]}),a.invalidateQueries({queryKey:["browserSessionList"]}),a.invalidateQueries({queryKey:["sessionDetail",i.endBrowserSession.browserSession?.id]}),window.location.reload()}})},_e=({session:s,size:n})=>{const{t:a}=_(),o=T(te,s),i=w(),r=x({mutationFn:()=>y({query:g,variables:{id:o.id}}),onSuccess:N=>{i.invalidateQueries({queryKey:["sessionsOverview"]}),i.invalidateQueries({queryKey:["appSessionList"]}),i.invalidateQueries({queryKey:["sessionDetail",N.endBrowserSession.browserSession?.id]})}}),u=o.userAgent?.deviceType??"UNKNOWN";let c=null,d=null;return o.userAgent?.model?(c=o.userAgent.model,o.userAgent?.name&&(o.userAgent?.os?d=a("frontend.session.name_for_platform",{name:o.userAgent.name,platform:o.userAgent.os}):d=o.userAgent.name)):(c=o.userAgent?.name??a("frontend.session.unknown_browser"),d=o.userAgent?.os??null),e.jsx(oe,{mutation:r,size:n,children:e.jsx(Z,{compact:!0,children:e.jsxs(ee,{type:u,children:[e.jsx(se,{name:c}),d&&e.jsx(ne,{name:d})]})})})};export{ue as A,Z as B,ne as C,_e as E,ee as H,le as I,ce as L,de as M,se as N,re as R,oe as a,me as u};
//# sourceMappingURL=EndBrowserSessionButton-DXsnVcVV.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
._device-type-icon_10tr1_8{color:var(--cpd-color-icon-secondary);background-color:var(--cpd-color-bg-subtle-secondary);box-sizing:content-box;height:var(--cpd-space-6x);width:var(--cpd-space-6x);padding:var(--cpd-space-2x);border-radius:var(--cpd-space-2x)}._session-card-root_8sc98_8{position:relative}@media screen and (min-width: 768px){._session-card-root_8sc98_8:has(._action_8sc98_13) ._session-card_8sc98_8 ._card-header_8sc98_13{padding-inline-end:calc(var(--cpd-space-16x) + 10ch)}}@media screen and (max-width: 767px){._session-card-root_8sc98_8:has(._action_8sc98_13) ._session-card_8sc98_8{padding-block-end:calc(var(--cpd-space-9x) + var(--cpd-space-6x) + var(--cpd-space-6x))}}._session-card_8sc98_8{display:flex;gap:var(--cpd-space-4x);flex-direction:column;text-align:start;border-radius:var(--cpd-space-4x);background-color:var(--cpd-color-bg-canvas-default);outline:1px solid var(--cpd-color-border-interactive-secondary);outline-offset:-1px;box-shadow:0 1.2px 2.4px #00000026;padding:var(--cpd-space-6x)}._session-card_8sc98_8._disabled_8sc98_59{outline-color:var(--cpd-color-border-disabled);background-color:var(--cpd-color-bg-canvas-disabled);box-shadow:none}._session-card_8sc98_8._compact_8sc98_65{box-shadow:none;padding:var(--cpd-space-3x)}._session-card_8sc98_8 ._card-header_8sc98_13{display:flex;gap:var(--cpd-space-4x);align-items:center}:is(._session-card_8sc98_8 ._card-header_8sc98_13) ._content_8sc98_75{display:flex;flex-direction:column;flex:0 1 auto;min-width:0}._auto_8sc98_83:is(:is(._session-card_8sc98_8 ._card-header_8sc98_13) ._content_8sc98_75) div:first-child,:is(:is(._session-card_8sc98_8 ._card-header_8sc98_13) ._content_8sc98_75) ._name_8sc98_84{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:var(--cpd-font-body-md-semibold);letter-spacing:var(--cpd-font-letter-spacing-body-md);color:var(--cpd-color-text-primary)}._auto_8sc98_83:is(:is(._session-card_8sc98_8 ._card-header_8sc98_13) ._content_8sc98_75) div:not(:first-child),:is(:is(._session-card_8sc98_8 ._card-header_8sc98_13) ._content_8sc98_75) ._client_8sc98_94{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:var(--cpd-font-body-sm-regular);letter-spacing:var(--cpd-font-letter-spacing-body-sm);color:var(--cpd-color-text-secondary)}:is(._auto_8sc98_83:is(:is(._session-card_8sc98_8 ._card-header_8sc98_13) ._content_8sc98_75) div:not(:first-child),:is(:is(._session-card_8sc98_8 ._card-header_8sc98_13) ._content_8sc98_75) ._client_8sc98_94) img{margin-inline-end:var(--cpd-space-1x)}._session-card_8sc98_8 ._metadata_8sc98_109{display:flex;flex-wrap:wrap;gap:var(--cpd-space-4x) var(--cpd-space-10x)}:is(._session-card_8sc98_8 ._metadata_8sc98_109)>*{min-width:0}:is(._session-card_8sc98_8 ._metadata_8sc98_109) ._key_8sc98_118{font:var(--cpd-font-body-sm-regular);letter-spacing:var(--cpd-font-letter-spacing-body-sm);color:var(--cpd-color-text-secondary)}:is(._session-card_8sc98_8 ._metadata_8sc98_109) ._value_8sc98_124{font:var(--cpd-font-body-md-regular);letter-spacing:var(--cpd-font-letter-spacing-body-md);color:var(--cpd-color-text-primary);overflow:hidden;text-overflow:ellipsis}a._session-card_8sc98_8:not(._disabled_8sc98_59){transition-property:outline-color,box-shadow;transition-duration:.1s;transition-timing-function:linear}a._session-card_8sc98_8:not(._disabled_8sc98_59):hover,a._session-card_8sc98_8:not(._disabled_8sc98_59):focus-visible{box-shadow:none;outline:2px solid var(--cpd-color-border-interactive-hovered);outline-offset:-2px}a._session-card_8sc98_8:not(._disabled_8sc98_59):focus-visible{outline-color:var(--cpd-color-border-focused)}@media screen and (min-width: 768px){._session-card-root_8sc98_8 ._action_8sc98_13{position:absolute;padding:var(--cpd-space-6x) var(--cpd-space-6x) var(--cpd-space-2x) var(--cpd-space-2x);inset-block-start:0;inset-inline-end:0}}@media screen and (max-width: 767px){._session-card-root_8sc98_8 ._action_8sc98_13{display:flex;flex-direction:column;position:absolute;padding:var(--cpd-space-6x);inset-block-end:0;inset-inline:0}}

View File

@@ -0,0 +1,52 @@
import{u as l,c as p,d as S,l as g,k as r,b as y,j as t}from"./main-CiAhdYQG.js";import{a as v,B as A,H as N,N as E,C as h}from"./EndBrowserSessionButton-DXsnVcVV.js";const T=s=>{let n;try{n=new URL(s)}catch{return s}return n.search="",n.hash="",n.protocol==="https:"?n.hostname:n.toString()},I=r(`
fragment EndCompatSessionButton_session on CompatSession {
id
userAgent {
name
os
model
deviceType
}
ssoLogin {
id
redirectUri
}
}
`),f=r(`
mutation EndCompatSession($id: ID!) {
endCompatSession(input: { compatSessionId: $id }) {
status
compatSession {
id
}
}
}
`),D=({session:s,size:n})=>{const{t:i}=l(),e=y(I,s),o=p(),c=S({mutationFn:()=>g({query:f,variables:{id:e.id}}),onSuccess:m=>{o.invalidateQueries({queryKey:["sessionsOverview"]}),o.invalidateQueries({queryKey:["appSessionList"]}),o.invalidateQueries({queryKey:["sessionDetail",m.endCompatSession.compatSession?.id]})}}),a=e.ssoLogin?.redirectUri?T(e.ssoLogin.redirectUri):void 0,u=e.userAgent?.deviceType??"UNKNOWN",d=e.userAgent?.model??(e.userAgent?.name?e.userAgent?.os?i("frontend.session.name_for_platform",{name:e.userAgent.name,platform:e.userAgent.os}):e.userAgent.name:i("frontend.session.unknown_device"));return t.jsx(v,{mutation:c,size:n,children:t.jsx(A,{compact:!0,children:t.jsxs(N,{type:u,children:[t.jsx(E,{name:d}),a&&t.jsx(h,{name:a})]})})})},_="urn:matrix:org.matrix.msc2967.client:device:",x="urn:matrix:client:device:",B=s=>{const[,n]=s.split(x),[,i]=s.split(_);return n||i},O=r(`
fragment EndOAuth2SessionButton_session on Oauth2Session {
id
userAgent {
name
model
os
deviceType
}
client {
clientId
clientName
applicationType
logoUri
}
}
`),C=r(`
mutation EndOAuth2Session($id: ID!) {
endOauth2Session(input: { oauth2SessionId: $id }) {
status
oauth2Session {
id
}
}
}
`),U=s=>s==="WEB"?"PC":s==="NATIVE"?"MOBILE":"UNKNOWN",F=({session:s,size:n})=>{const{t:i}=l(),e=y(O,s),o=p(),c=S({mutationFn:()=>g({query:C,variables:{id:e.id}}),onSuccess:m=>{o.invalidateQueries({queryKey:["sessionsOverview"]}),o.invalidateQueries({queryKey:["appSessionList"]}),o.invalidateQueries({queryKey:["sessionDetail",m.endOauth2Session.oauth2Session?.id]})}}),a=(e.userAgent?.deviceType==="UNKNOWN"?null:e.userAgent?.deviceType)??U(e.client.applicationType),u=e.client.clientName||e.client.clientId,d=e.userAgent?.model??(e.userAgent?.name?e.userAgent?.os?i("frontend.session.name_for_platform",{name:e.userAgent.name,platform:e.userAgent.os}):e.userAgent.name:i("frontend.session.unknown_device"));return t.jsx(v,{mutation:c,size:n,children:t.jsx(A,{compact:!0,children:t.jsxs(N,{type:a,children:[t.jsx(E,{name:d}),t.jsx(h,{name:u,logoUri:e.client.logoUri??void 0})]})})})};export{D as E,F as a,B as g,T as s};
//# sourceMappingURL=EndOAuth2SessionButton-CPWjVtc_.js.map

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1,16 @@
import{u as _,b as x,j as s,k as g,r as f,w as u,ag as p,C as w}from"./main-CiAhdYQG.js";import{p as d,L as h,D as j,B as v}from"./LastActive-D4SP35FS.js";import{R as b,L as N,H as y,N as B,C as F,M as S,I as m,A as I,E as L}from"./EndBrowserSessionButton-DXsnVcVV.js";const E=""+new URL("chrome_64x64-TTj2uZYF.png",import.meta.url).href,R=""+new URL("firefox_64x64-sbBPu9C9.png",import.meta.url).href,T=""+new URL("safari_64x64-DJVjfeAY.png",import.meta.url).href,C=g(`
fragment BrowserSession_session on BrowserSession {
id
createdAt
finishedAt
...EndBrowserSessionButton_session
userAgent {
deviceType
name
os
model
}
lastActiveAt
}
`),U=r=>{const t=r?.toLowerCase();if(t?.includes("chrome")||t?.includes("chromium"))return E;if(t?.includes("firefox"))return R;if(t?.includes("safari"))return T},G=({session:r,isCurrent:t})=>{const e=x(C,r),{t:n}=_(),a=e.userAgent?.deviceType??"UNKNOWN";let o=null,i=null;e.userAgent?.model?(o=e.userAgent.model,e.userAgent?.name&&(e.userAgent?.os?i=n("frontend.session.name_for_platform",{name:e.userAgent.name,platform:e.userAgent.os}):i=e.userAgent.name)):(o=e.userAgent?.name??n("frontend.session.unknown_browser"),i=e.userAgent?.os??null);const A=d(e.createdAt),c=e.lastActiveAt?d(e.lastActiveAt):void 0;return s.jsxs(b,{children:[s.jsxs(N,{to:"/sessions/$id",params:{id:e.id},disabled:!!e.finishedAt,children:[s.jsxs(y,{type:a,children:[s.jsx(B,{name:o}),i&&s.jsx(F,{name:i,logoUri:U(e.userAgent?.name??void 0)})]}),s.jsxs(S,{children:[c&&!t&&s.jsx(m,{label:n("frontend.session.last_active_label"),children:s.jsx(h,{lastActive:c})}),s.jsx(m,{label:n("frontend.session.signed_in_label"),children:s.jsx(j,{datetime:A})}),t&&s.jsx(v,{kind:"green",className:"self-center",children:n("frontend.session.current")})]})]}),!e.finishedAt&&s.jsx(I,{children:s.jsx(L,{session:e,size:"sm"})})]})},k="_empty-state_1lwui_8",D={emptyState:k},J=f.forwardRef(function({children:t,...e},n){const a=u(D.emptyState,e.className);return s.jsx("div",{ref:n,...e,className:a,children:t})}),M="_filter_nv8wu_8",H="_enabled-filter_nv8wu_18",O="_close-icon_nv8wu_22",Y="_disabled-filter_nv8wu_43",l={filter:M,enabledFilter:H,closeIcon:O,disabledFilter:Y},K=p(f.forwardRef(function({children:t,enabled:e,...n},a){const o=u(l.filter,e?l.enabledFilter:l.disabledFilter,n.className);return s.jsxs("a",{...n,ref:a,className:o,children:[t,e&&s.jsx(w,{className:l.closeIcon})]})}));export{G as B,J as E,K as F,U as b};
//# sourceMappingURL=Filter-_9i8iQpA.js.map

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1 @@
._empty-state_1lwui_8{display:flex;flex-direction:column;gap:var(--cpd-space-2x);padding:var(--cpd-space-4x);background:var(--cpd-color-gray-200);color:var(--cpd-color-text-secondary);font:var(--cpd-font-body-sm-regular);letter-spacing:var(--cpd-font-letter-spacing-body-sm)}._filter_nv8wu_8{display:flex;align-items:center;gap:var(--cpd-space-2x);font:var(--cpd-font-body-xs-regular);letter-spacing:var(--cpd-font-letter-spacing-body-xs);padding:var(--cpd-space-2x) var(--cpd-space-3x);border-radius:var(--cpd-radius-pill-effect)}._enabled-filter_nv8wu_18{background:var(--cpd-color-bg-action-primary-rest);color:var(--cpd-color-text-on-solid-primary)}._enabled-filter_nv8wu_18>._close-icon_nv8wu_22{height:var(--cpd-space-4x);width:var(--cpd-space-4x);opacity:.5}._enabled-filter_nv8wu_18:hover{background:var(--cpd-color-bg-action-primary-hovered)}._enabled-filter_nv8wu_18:hover>._close-icon_nv8wu_22{opacity:1}._enabled-filter_nv8wu_18:active{background:var(--cpd-color-bg-action-primary-rest)}._enabled-filter_nv8wu_18:active>._close-icon_nv8wu_22{opacity:1}._disabled-filter_nv8wu_43{color:var(--cpd-color-text-action-primary);background:var(--cpd-color-bg-canvas-default);outline:1px solid var(--cpd-color-border-interactive-secondary)}._disabled-filter_nv8wu_43:hover{background:var(--cpd-color-bg-subtle-secondary)}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,3 @@
xÚ¥TAŽÛ0 ¼÷9Vïl`¿bÈ­•%<25>¢Aÿ^Øi€x{·íÅ€8r8¤µ¯±<BbÉXÜ9ÛúxÑ6E'Dzu8TÓ´%Tlƒ/Up¹ó•±ì%}PQCŠR!ƒ¨¢ÔÚzó€½
¢j¤úi(d¯ï`\ 0$G(^^D5Ÿ<70>
^KÏw—¦#4A<34><41>: 4ÙI•Cf¤YÀRÒ|}‰ÞØâ×¾n­c¤Ú÷Çsþè†tÖx°Œ]*zFZµbUã<55>þGã<47>Ö].±û{<7B>œ¤€¤¶9ݱ®ˆÖ9À¶EÅSÿèeãPÇÃñ²1¿Æ€œ÷"ÙNÒ„‰7§<¤à¬¾16*¿ïkåBB°*ø?Ñ¢¸œÐš?]µ³Õ|zŠ„ÉKËý<C38B>õzå)ôH×ïLA->˺ÒËMÖaƒ?UìñÆðiÎ/ˆÒ6=ÉðözÙñRËæÐPÒ÷2<C3B7>ÆVfÇ¢

View File

@@ -0,0 +1,2 @@
import{j as t,av as r,T as o}from"./main-CiAhdYQG.js";const a=({as:s="h1",children:e,...i})=>t.jsx(r,{as:s,type:"heading",...i,children:e}),h=({children:s,...e})=>t.jsx(a,{as:"h3",weight:"semibold",size:"md",...e,children:s}),m=({children:s,...e})=>t.jsx(a,{as:"h4",weight:"semibold",size:"sm",...e,children:s}),x=({children:s,...e})=>t.jsx(o,{as:"h5",weight:"semibold",size:"lg",...e,children:s});export{a as H,m as a,h as b,x as c};
//# sourceMappingURL=Heading-zTQC9Kqs.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Heading-zTQC9Kqs.js","sources":["../node_modules/@vector-im/compound-web/dist/components/Typography/Heading.js"],"sourcesContent":["import { jsx } from \"react/jsx-runtime\";\nimport { Typography } from \"./Typography.js\";\nimport { Text } from \"./Text.js\";\nconst Heading = ({ as = \"h1\", children, ...props }) => {\n return /* @__PURE__ */ jsx(Typography, { as, type: \"heading\", ...props, children });\n};\nconst H1 = ({ children, ...props }) => {\n return /* @__PURE__ */ jsx(Heading, { as: \"h1\", weight: \"semibold\", size: \"xl\", ...props, children });\n};\nconst H2 = ({ children, ...props }) => {\n return /* @__PURE__ */ jsx(Heading, { as: \"h2\", weight: \"semibold\", size: \"lg\", ...props, children });\n};\nconst H3 = ({ children, ...props }) => {\n return /* @__PURE__ */ jsx(Heading, { as: \"h3\", weight: \"semibold\", size: \"md\", ...props, children });\n};\nconst H4 = ({ children, ...props }) => {\n return /* @__PURE__ */ jsx(Heading, { as: \"h4\", weight: \"semibold\", size: \"sm\", ...props, children });\n};\nconst H5 = ({ children, ...props }) => {\n return /* @__PURE__ */ jsx(Text, { as: \"h5\", weight: \"semibold\", size: \"lg\", ...props, children });\n};\nconst H6 = ({ children, ...props }) => {\n return /* @__PURE__ */ jsx(Text, { as: \"h6\", weight: \"semibold\", size: \"md\", ...props, children });\n};\nexport {\n H1,\n H2,\n H3,\n H4,\n H5,\n H6,\n Heading\n};\n//# sourceMappingURL=Heading.js.map\n"],"names":["Heading","as","children","props","jsx","Typography","H3","H4","H5","Text"],"mappings":"sDAGK,MAACA,EAAU,CAAC,CAAE,GAAAC,EAAK,KAAM,SAAAC,EAAU,GAAGC,KAClBC,EAAAA,IAAIC,EAAY,CAAE,GAAAJ,EAAI,KAAM,UAAW,GAAGE,EAAO,SAAAD,EAAU,EAQ9EI,EAAK,CAAC,CAAE,SAAAJ,EAAU,GAAGC,CAAK,IACPC,MAAIJ,EAAS,CAAE,GAAI,KAAM,OAAQ,WAAY,KAAM,KAAM,GAAGG,EAAO,SAAAD,CAAQ,CAAE,EAEhGK,EAAK,CAAC,CAAE,SAAAL,EAAU,GAAGC,CAAK,IACPC,MAAIJ,EAAS,CAAE,GAAI,KAAM,OAAQ,WAAY,KAAM,KAAM,GAAGG,EAAO,SAAAD,CAAQ,CAAE,EAEhGM,EAAK,CAAC,CAAE,SAAAN,EAAU,GAAGC,CAAK,IACPC,MAAIK,EAAM,CAAE,GAAI,KAAM,OAAQ,WAAY,KAAM,KAAM,GAAGN,EAAO,SAAAD,CAAQ,CAAE","x_google_ignoreList":[0]}

View File

@@ -0,0 +1 @@
._active_1y6r4_8{color:var(--cpd-color-text-success-primary)}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1,2 @@
import{ag as a,a8 as i}from"./main-CiAhdYQG.js";const o=a(i);export{o as L};
//# sourceMappingURL=Link-Do_sTHM7.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Link-Do_sTHM7.js","sources":["../src/components/Link.tsx"],"sourcesContent":["// Copyright 2024, 2025 New Vector Ltd.\n// Copyright 2023, 2024 The Matrix.org Foundation C.I.C.\n//\n// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\n// Please see LICENSE files in the repository root for full details.\n\nimport { createLink } from \"@tanstack/react-router\";\nimport { Link as CompoundLink } from \"@vector-im/compound-web\";\n\nexport const Link = createLink(CompoundLink);\n"],"names":["Link","createLink","CompoundLink"],"mappings":"gDASO,MAAMA,EAAOC,EAAWC,CAAY"}

View File

@@ -0,0 +1 @@
._separator_1qgmy_7{border-block-start:1px solid var(--cpd-color-bg-subtle-primary)}._section_1qgmy_11{border-block-start-width:2px}

View File

@@ -0,0 +1,2 @@
import{r as e,j as n,w as c}from"./main-CiAhdYQG.js";const i="_separator_1qgmy_7",p="_section_1qgmy_11",s={separator:i,section:p},_=e.forwardRef(({kind:a,className:o,...r},t)=>n.jsx("div",{"aria-orientation":"horizontal",role:"separator",className:c(s.separator,a==="section"&&s.section,o),...r,ref:t}));export{_ as S};
//# sourceMappingURL=Separator-CVNE-7yB.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Separator-CVNE-7yB.js","sources":["../src/components/Separator/Separator.tsx"],"sourcesContent":["// Copyright 2025 New Vector Ltd.\n//\n// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\n// Please see LICENSE files in the repository root for full details.\n\n// biome-ignore-all lint/a11y/useFocusableInteractive: this is a false positive\n// biome-ignore-all lint/a11y/useAriaPropsForRole: this is a false positive\n// biome-ignore-all lint/a11y/useSemanticElements: I don't want to use an <hr />\n\nimport cx from \"classnames\";\nimport { forwardRef } from \"react\";\n\nimport styles from \"./Separator.module.css\";\n\ntype Props = {\n kind?: \"section\";\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst Separator = forwardRef<HTMLDivElement, Props>(\n ({ kind, className, ...props }: Props, ref) => (\n <div\n aria-orientation=\"horizontal\"\n role=\"separator\"\n className={cx(\n styles.separator,\n kind === \"section\" && styles.section,\n className,\n )}\n {...props}\n ref={ref}\n />\n ),\n);\n\nexport default Separator;\n"],"names":["Separator","forwardRef","kind","className","props","ref","jsx","cx","styles"],"mappings":"kIAkBMA,EAAYC,EAAAA,WAChB,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,GAAGC,CAAA,EAAgBC,IACrCC,EAAAA,IAAC,MAAA,CACC,mBAAiB,aACjB,KAAK,YACL,UAAWC,EACTC,EAAO,UACPN,IAAS,WAAaM,EAAO,QAC7BL,CAAA,EAED,GAAGC,EACJ,IAAAC,CAAA,CAAA,CAGN"}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1,2 @@
import{r as i,j as t,S as o,B as u}from"./main-CiAhdYQG.js";const m=i.forwardRef(function(r,s){return t.jsx(o,{asChild:!0,children:t.jsx(u,{type:"submit",ref:s,...r})})});export{m as S};
//# sourceMappingURL=Submit-DW2aiKTW.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Submit-DW2aiKTW.js","sources":["../node_modules/@vector-im/compound-web/dist/components/Form/Submit.js"],"sourcesContent":["import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { Submit as Submit$1 } from \"@radix-ui/react-form\";\nimport { Button } from \"../Button/Button.js\";\nconst Submit = forwardRef(\n function Submit2(props, ref) {\n return /* @__PURE__ */ jsx(Submit$1, { asChild: true, children: /* @__PURE__ */ jsx(Button, { type: \"submit\", ref, ...props }) });\n }\n);\nexport {\n Submit\n};\n//# sourceMappingURL=Submit.js.map\n"],"names":["Submit","forwardRef","props","ref","jsx","Submit$1","Button"],"mappings":"4DAIK,MAACA,EAASC,EAAAA,WACb,SAAiBC,EAAOC,EAAK,CAC3B,OAAuBC,EAAAA,IAAIC,EAAU,CAAE,QAAS,GAAM,SAA0BD,EAAAA,IAAIE,EAAQ,CAAE,KAAM,SAAU,IAAAH,EAAK,GAAGD,CAAK,CAAE,CAAC,CAAE,CAClI,CACF","x_google_ignoreList":[0]}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1,2 @@
import{j as e,w as a}from"./main-CiAhdYQG.js";const n={"visual-list":"_visual-list_15wzx_8"};function o({className:i,children:t,...l}){return e.jsx("ul",{className:a(n["visual-list"],i),...l,children:t})}const s={"visual-list-item":"_visual-list-item_1ma3e_8","visual-list-item-icon":"_visual-list-item-icon_1ma3e_17","visual-list-item-icon-success":"_visual-list-item-icon-success_1ma3e_22","visual-list-item-icon-destructive":"_visual-list-item-icon-destructive_1ma3e_26"};function _({className:i,children:t,Icon:l,success:u=!1,destructive:c=!1,...m}){return e.jsxs("li",{className:a(s["visual-list-item"],i),...m,children:[e.jsx(l,{className:a(s["visual-list-item-icon"],{[s["visual-list-item-icon-success"]]:u,[s["visual-list-item-icon-destructive"]]:c}),width:"24px",height:"24px","aria-hidden":!0}),t]})}export{o as V,_ as a};
//# sourceMappingURL=VisualListItem-Dd-weqBc.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"VisualListItem-Dd-weqBc.js","sources":["../node_modules/@vector-im/compound-web/dist/components/VisualList/VisualList.module.css.js","../node_modules/@vector-im/compound-web/dist/components/VisualList/VisualList.js","../node_modules/@vector-im/compound-web/dist/components/VisualList/VisualListItem.module.css.js","../node_modules/@vector-im/compound-web/dist/components/VisualList/VisualListItem.js"],"sourcesContent":["const styles = {\n \"visual-list\": \"_visual-list_15wzx_8\"\n};\nexport {\n styles as default\n};\n//# sourceMappingURL=VisualList.module.css.js.map\n","import { jsx } from \"react/jsx-runtime\";\nimport styles from \"./VisualList.module.css.js\";\nimport classNames from \"classnames\";\nfunction VisualList({\n className,\n children,\n ...props\n}) {\n return /* @__PURE__ */ jsx(\"ul\", { className: classNames(styles[\"visual-list\"], className), ...props, children });\n}\nexport {\n VisualList\n};\n//# sourceMappingURL=VisualList.js.map\n","const styles = {\n \"visual-list-item\": \"_visual-list-item_1ma3e_8\",\n \"visual-list-item-icon\": \"_visual-list-item-icon_1ma3e_17\",\n \"visual-list-item-icon-success\": \"_visual-list-item-icon-success_1ma3e_22\",\n \"visual-list-item-icon-destructive\": \"_visual-list-item-icon-destructive_1ma3e_26\"\n};\nexport {\n styles as default\n};\n//# sourceMappingURL=VisualListItem.module.css.js.map\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport styles from \"./VisualListItem.module.css.js\";\nimport classNames from \"classnames\";\nfunction VisualListItem({\n className,\n children,\n Icon,\n success = false,\n destructive = false,\n ...props\n}) {\n return /* @__PURE__ */ jsxs(\n \"li\",\n {\n className: classNames(styles[\"visual-list-item\"], className),\n ...props,\n children: [\n /* @__PURE__ */ jsx(\n Icon,\n {\n className: classNames(styles[\"visual-list-item-icon\"], {\n [styles[\"visual-list-item-icon-success\"]]: success,\n [styles[\"visual-list-item-icon-destructive\"]]: destructive\n }),\n width: \"24px\",\n height: \"24px\",\n \"aria-hidden\": true\n }\n ),\n children\n ]\n }\n );\n}\nexport {\n VisualListItem\n};\n//# sourceMappingURL=VisualListItem.js.map\n"],"names":["styles","VisualList","className","children","props","jsx","classNames","VisualListItem","Icon","success","destructive","jsxs"],"mappings":"8CAAA,MAAMA,EAAS,CACb,cAAe,sBACjB,ECCA,SAASC,EAAW,CAClB,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAG,CACD,OAAuBC,MAAI,KAAM,CAAE,UAAWC,EAAWN,EAAO,aAAa,EAAGE,CAAS,EAAG,GAAGE,EAAO,SAAAD,CAAQ,CAAE,CAClH,CCTA,MAAMH,EAAS,CACb,mBAAoB,4BACpB,wBAAyB,kCACzB,gCAAiC,0CACjC,oCAAqC,6CACvC,ECFA,SAASO,EAAe,CACtB,UAAAL,EACA,SAAAC,EACA,KAAAK,EACA,QAAAC,EAAU,GACV,YAAAC,EAAc,GACd,GAAGN,CACL,EAAG,CACD,OAAuBO,EAAAA,KACrB,KACA,CACE,UAAWL,EAAWN,EAAO,kBAAkB,EAAGE,CAAS,EAC3D,GAAGE,EACH,SAAU,CACQC,EAAAA,IACdG,EACA,CACE,UAAWF,EAAWN,EAAO,uBAAuB,EAAG,CACrD,CAACA,EAAO,+BAA+B,CAAC,EAAGS,EAC3C,CAACT,EAAO,mCAAmC,CAAC,EAAGU,CAC7D,CAAa,EACD,MAAO,OACP,OAAQ,OACR,cAAe,EAC3B,CACA,EACQP,CACR,CACA,CACA,CACA","x_google_ignoreList":[0,1,2,3]}

View File

@@ -0,0 +1,34 @@
import{j as e,a as U,r as p,b as g,c as A,d as B,u as N,T as u,D,e as F,R as S,F as h,f as _,A as w,C as G,H as E,g as R,h as L,i as M,B as O,k as c,l as I,m as z,n as k,o as $,q as H,p as P,L as Q,O as K}from"./main-CiAhdYQG.js";import{H as V}from"./Heading-zTQC9Kqs.js";import{I as Y}from"./edit-DvN6hAeY.js";import{A as v}from"./Avatar-B3RWCmae.js";import{S as J}from"./Submit-DW2aiKTW.js";import"./_commonjsHelpers-DaWZu8wl.js";/* empty css */const W="_nav-bar_16kbp_8",X="_nav-bar-items_16kbp_12",y={navBar:W,navBarItems:X},Z=({children:a})=>e.jsx("nav",{className:y.navBar,children:e.jsx("ul",{className:y.navBarItems,children:a})}),ee="_nav-tab_9fhit_8",se="_nav-item_9fhit_26",j={navTab:ee,navItem:se},x=a=>e.jsx("li",{className:j.navTab,children:e.jsx(U,{className:j.navItem,activeProps:{"aria-current":"page"},...a})}),ae="_user_lnqhg_8",te="_meta_lnqhg_19",ne="_edit-button_lnqhg_32",ie="_mxid_lnqhg_36",re="_dialog-form_lnqhg_40",o={user:ae,meta:te,editButton:ne,mxid:ie,dialogForm:re},oe=c(`
fragment UserGreeting_user on User {
id
matrix {
mxid
displayName
}
}
`),le=c(`
fragment UserGreeting_siteConfig on SiteConfig {
displayNameChangeAllowed
}
`),ce=c(`
mutation SetDisplayName($userId: ID!, $displayName: String) {
setDisplayName(input: { userId: $userId, displayName: $displayName }) {
status
}
}
`),de=p.forwardRef(({label:a,...r},t)=>e.jsx(z,{label:a,children:e.jsx(k,{ref:t,type:"button",size:"var(--cpd-space-6x)",className:o.editButton,...r,children:e.jsx(Y,{})})})),me=({user:a,siteConfig:r})=>{const t=p.useRef(null),s=g(oe,a),{displayNameChangeAllowed:d}=g(le,r),b=A(),l=B({mutationFn:({userId:i,displayName:m})=>I({query:ce,variables:{userId:i,displayName:m}}),onSuccess:i=>{b.invalidateQueries({queryKey:["currentUserGreeting"]}),i.setDisplayName.status==="SET"&&f(!1)}}),[C,f]=p.useState(!1),{t:n}=N(),q=i=>{i.preventDefault();const m=i.currentTarget,T=new FormData(m).get("displayname")||null;l.mutate({displayName:T,userId:s.id})};return e.jsxs("div",{className:o.user,children:[e.jsx(v,{size:"var(--cpd-space-14x)",id:s.matrix.mxid,name:s.matrix.displayName||s.matrix.mxid,className:o.avatar}),e.jsx("div",{className:o.meta,children:s.matrix.displayName?e.jsxs(e.Fragment,{children:[e.jsx(u,{size:"lg",weight:"semibold",children:s.matrix.displayName}),e.jsx(u,{size:"md",className:o.mxid,children:s.matrix.mxid})]}):e.jsx(u,{size:"lg",weight:"semibold",children:s.matrix.mxid})}),d&&e.jsxs(D,{trigger:e.jsx(de,{label:n("action.edit")}),open:C,onOpenChange:i=>{t.current?.form?.reset(),f(i)},children:[e.jsx(F,{children:n("frontend.account.edit_profile.title")}),e.jsx(v,{size:"88px",className:"self-center",id:s.matrix.mxid,name:s.matrix.displayName||s.matrix.mxid}),e.jsxs(S,{onSubmit:q,children:[e.jsxs("div",{className:o.dialogForm,children:[e.jsxs(h,{name:"displayname",serverInvalid:l.data?.setDisplayName.status==="INVALID",children:[e.jsx(_,{children:n("frontend.account.edit_profile.display_name_label")}),e.jsx(w,{type:"text",Icon:G,autoComplete:"name",defaultValue:s.matrix.displayName||void 0,actionLabel:n("action.clear"),ref:t,onActionClick:()=>{t.current&&(t.current.value="",t.current.focus())}}),e.jsx(E,{children:n("frontend.account.edit_profile.display_name_help")})]}),e.jsxs(h,{name:"mxid",children:[e.jsx(_,{children:n("frontend.account.edit_profile.username_label")}),e.jsx(R,{value:s.matrix.mxid,readOnly:!0})]})]}),e.jsxs(J,{disabled:l.isPending,children:[l.isPending&&e.jsx(L,{inline:!0}),n("action.save")]})]}),e.jsx(M,{asChild:!0,children:e.jsx(O,{kind:"tertiary",children:n("action.cancel")})})]})]})},ue=c(`
query CurrentUserGreeting {
viewer {
__typename
... on User {
...UserGreeting_user
}
}
siteConfig {
...UserGreeting_siteConfig
planManagementIframeUri
}
}
`),xe=H({queryKey:["currentUserGreeting"],queryFn:({signal:a})=>I({query:ue,signal:a})});function Ne(){const{t:a}=N(),r=$(xe),t=r.data.viewer;if(t?.__typename!=="User")throw P();const{siteConfig:s}=r.data,{planManagementIframeUri:d}=s;return e.jsxs(Q,{wide:!0,children:[e.jsxs("div",{className:"flex flex-col gap-10",children:[e.jsx(V,{size:"md",weight:"semibold",children:a("frontend.account.title")}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(me,{user:t,siteConfig:s}),e.jsxs(Z,{children:[e.jsx(x,{to:"/",children:a("frontend.nav.settings")}),e.jsx(x,{to:"/sessions",children:a("frontend.nav.devices")}),d&&e.jsx(x,{to:"/plan",children:a("frontend.nav.plan")})]})]})]}),e.jsx(K,{})]})}export{Ne as component};
//# sourceMappingURL=_account-BMDlqbFy.js.map

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1 @@
._nav-bar_16kbp_8{border-bottom:var(--cpd-border-width-1) solid var(--cpd-color-gray-400)}._nav-bar-items_16kbp_12{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:var(--cpd-space-3x)}._nav-tab_9fhit_8{padding:var(--cpd-space-4x) 0;position:relative}._nav-tab_9fhit_8:before{content:"";position:absolute;bottom:0;left:0;right:0;height:0;border-radius:var(--cpd-radius-pill-effect) var(--cpd-radius-pill-effect) 0 0;background-color:var(--cpd-color-bg-action-primary-rest);transition:height .1s ease-in-out}._nav-tab_9fhit_8:has(._nav-item_9fhit_26[aria-current=page]):before{height:var(--cpd-border-width-4)}._nav-item_9fhit_26{padding:var(--cpd-space-1x) var(--cpd-space-2x);color:var(--cpd-color-text-secondary);line-height:var(--cpd-space-6x);border-radius:var(--cpd-radius-pill-effect);border:transparent var(--cpd-border-width-2) solid}._nav-item_9fhit_26._external-link_9fhit_39{text-decoration:underline;color:var(--cpd-color-text-primary)}._nav-item_9fhit_26:hover{color:var(--cpd-color-text-primary);background-color:var(--cpd-color-bg-subtle-secondary)}._nav-item_9fhit_26:active{color:var(--cpd-color-text-primary);background-color:var(--cpd-color-bg-subtle-primary)}._nav-item_9fhit_26:focus{outline:none;border-color:var(--cpd-color-border-focused)}._nav-item_9fhit_26[aria-current=page]{color:var(--cpd-color-text-primary)}._user_lnqhg_8{display:flex;flex-direction:row;align-items:center;gap:var(--cpd-space-4x);outline:1px solid var(--cpd-color-gray-400);outline-offset:-1px;border-radius:var(--cpd-space-3x);padding:var(--cpd-space-4x)}._meta_lnqhg_19{flex:1 1;min-width:0}._meta_lnqhg_19 p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._edit-button_lnqhg_32{align-self:flex-start}._mxid_lnqhg_36{color:var(--cpd-color-text-secondary)}._dialog-form_lnqhg_40{display:flex;flex-direction:column;gap:var(--cpd-space-4x);align-self:center;max-width:378px;width:100%;margin-block-end:var(--cpd-space-9x)}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
._link_1g96u_8{display:inline-block;text-decoration:underline;color:var(--cpd-color-text-primary);font-weight:var(--cpd-font-weight-medium);border-radius:var(--cpd-radius-pill-effect);padding-inline:.25rem}._link_1g96u_8:hover{background:var(--cpd-color-gray-300)}._link_1g96u_8:active{background:var(--cpd-color-text-primary);color:var(--cpd-color-text-on-solid-primary)}._root_1hqni_8{display:flex;flex-direction:column;gap:var(--cpd-space-6x)}._heading_1hqni_14{display:flex;flex-direction:column;gap:var(--cpd-space-2x)}._trigger_1hqni_20{display:flex;width:100%;align-items:center;justify-content:space-between;text-align:start;gap:var(--cpd-space-2x)}._trigger-title_1hqni_29{cursor:pointer;flex-grow:1}._trigger-icon_1hqni_34{transition:transform .1s ease-out}._root_1hqni_8[data-state=closed] ._trigger-icon_1hqni_34{transform:rotate(180deg)}._description_1hqni_42{color:var(--cpd-color-text-secondary);font:var(--cpd-font-body-md-regular);letter-spacing:var(--cpd-font-letter-spacing-body-md)}._content_1hqni_48{display:flex;flex-direction:column;gap:var(--cpd-space-6x)}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,73 @@
import{r,j as e,v as we,w as $,x as O,y as Ce,R as z,F as D,f as S,g as G,m as X,S as be,B as y,C as ve,z as ye,E as Ee,V as Ae,H,b as T,u as I,d as te,l as V,k as E,D as se,e as ne,G as Ne,T as k,J as Re,K as C,M as Ie,N as Z,h as re,i as ae,a as Se,Q as Te,U as ke,W as Pe,X as Q,Y as De,Z as Fe,_ as qe,$ as Me,n as Oe,c as Be,a0 as Le,a1 as Ue,a2 as $e,o as ze,q as Ge,p as He,a3 as Ve}from"./main-CiAhdYQG.js";import{A as Qe}from"./Avatar-B3RWCmae.js";import{I as oe}from"./check-Cx46Fv0J.js";import{S as R}from"./Separator-CVNE-7yB.js";import{T as We}from"./Trans-CeobkUgR.js";import{B as Ke}from"./ButtonLink-kWcKQZoZ.js";import{a as Ye}from"./Heading-zTQC9Kqs.js";import{u as Je}from"./EndBrowserSessionButton-DXsnVcVV.js";import"./_commonjsHelpers-DaWZu8wl.js";/* empty css */import"./computer-Cx9wZ7Nf.js";const Xe="_container_1hel1_10",Ze="_input_1hel1_18",et="_ui_1hel1_19",B={container:Xe,input:Ze,ui:et},tt=r.forwardRef(function({className:t,...a},n){const i=$(B.container,t);return e.jsxs("div",{className:i,children:[e.jsx("input",{ref:n,className:B.input,...a,type:"checkbox"}),e.jsx("div",{className:B.ui,children:e.jsx(oe,{"aria-hidden":!0})})]})}),st=r.forwardRef(function(t,a){return e.jsx(we,{asChild:!0,children:e.jsx(tt,{ref:a,...t})})}),nt=r.forwardRef(function({className:t,control:a,children:n,...i},u){const c=$(O["inline-field"],t);return e.jsxs(Ce,{ref:u,...i,className:c,children:[e.jsx("div",{className:O["inline-field-control"],children:a}),e.jsx("div",{className:O["inline-field-body"],children:n})]})}),rt="_controls_17lij_8",L={controls:rt,"button-group":"_button-group_17lij_18"};function at(s,t){switch(t){case 0:return s===0||s===3?1:s;case 1:return 2;case 4:return 0;case 2:return s===2?3:s;case 3:return s===2?0:s;case 5:return s===3?0:s}ot(t)}function ot(s){throw new Error(`Unreachable value: ${s}`)}const it=r.forwardRef(function({className:t,label:a,onSave:n,onCancel:i,onInput:u,onClearServerErrors:c,serverInvalid:h,saveButtonLabel:p,cancelButtonLabel:f,savedLabel:g,savingLabel:x,helpLabel:_,disabled:m,children:b,...o},j){const[l,d]=r.useReducer(at,0),v=r.useRef(!1),[q,P]=r.useState(!1),he=l===1||l===2||q,N=r.useRef(void 0);r.useEffect(()=>(l===3&&(N.current=setTimeout(()=>{d(5),N.current=void 0},2e3)),()=>{N.current&&clearTimeout(N.current),N.current=void 0}),[l]);const fe=r.useRef(null),J=r.useRef(null),M=r.useRef(null),pe=r.useCallback(()=>{v.current||(v.current=!0,P(!0))},[q,P]),ge=r.useCallback(w=>{v.current&&(w.currentTarget.contains(w.relatedTarget)||(v.current=!1,P(!1)))},[q,P]),xe=r.useCallback(w=>{d(0),u?.(w)},[d,u]),_e=r.useCallback(async w=>{if(w.preventDefault(),l!==0)try{d(1),J.current?.blur(),await n?.(w),d(2)}catch{d(3)}},[n,l,N]),je=r.useCallback(w=>{M.current?.blur(),i?.(w),d(4)},[M,i]);return e.jsx(z,{className:t,onSubmit:_e,onReset:je,onFocus:pe,onBlur:ge,onClearServerErrors:c,ref:fe,children:e.jsxs(D,{name:"input",serverInvalid:h,children:[e.jsx(S,{children:a}),e.jsxs("div",{className:L.controls,children:[e.jsx(G,{ref:j,...o,onInput:xe,disabled:m||l===2}),he&&e.jsxs("div",{className:L["button-group"],children:[e.jsx(X,{label:p,children:e.jsx(be,{asChild:!0,children:e.jsx(y,{type:"submit",kind:"primary",size:"sm",ref:J,disabled:l!==1,iconOnly:!0,Icon:oe})})}),e.jsx(X,{label:f,children:e.jsx(y,{type:"reset",kind:"secondary",size:"sm",ref:M,className:L.button,disabled:l===2,iconOnly:!0,Icon:ve})})]})]}),l===2?e.jsx(ye,{children:x}):b,g&&l===3&&e.jsx(Ee,{children:g}),_&&(l===0||l===1)&&e.jsx(Ae,{children:w=>(w===void 0||w.valid)&&!h&&e.jsx(H,{children:_})})]})})});function ie(s,t){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",ref:t,...s,children:e.jsx("path",{d:"M9 12.031q0-.424.288-.712A.97.97 0 0 1 10 11.03h7.15l-1.875-1.875a.96.96 0 0 1-.3-.7q0-.4.325-.725a.93.93 0 0 1 .712-.287.98.98 0 0 1 .688.287l3.6 3.6q.15.15.212.325.063.175.063.375 0 .201-.062.375a.9.9 0 0 1-.213.325l-3.6 3.6q-.3.3-.712.288a.98.98 0 0 1-.688-.288 1.02 1.02 0 0 1-.312-.712.93.93 0 0 1 .287-.713l1.875-1.875H10a.97.97 0 0 1-.712-.287A.97.97 0 0 1 9 12.03m-6-7q0-.824.588-1.412A1.93 1.93 0 0 1 5 3.03h6q.424 0 .713.288.287.287.287.712t-.287.713A.97.97 0 0 1 11 5.03H5v14h6q.424 0 .713.288.287.287.287.712t-.287.713a.97.97 0 0 1-.713.287H5q-.824 0-1.412-.587A1.93 1.93 0 0 1 3 19.03z"})})}ie.displayName="SignOutIcon";const ee=r.forwardRef(ie),ct=E(`
fragment AccountDeleteButton_user on User {
username
hasPassword
matrix {
mxid
displayName
}
}
`),lt=E(`
fragment AccountDeleteButton_siteConfig on SiteConfig {
passwordLoginEnabled
}
`),dt=E(`
mutation DeactivateUser($hsErase: Boolean!, $password: String) {
deactivateUser(input: { hsErase: $hsErase, password: $password }) {
status
}
}
`),ut=({mxid:s,displayName:t,username:a})=>e.jsxs("section",{className:"flex items-center p-4 gap-4 border border-[var(--cpd-color-gray-400)] rounded-xl",children:[e.jsx(Qe,{id:s,name:t||a,size:"56px"}),e.jsxs("div",{className:"flex-1 flex flex-col",children:[e.jsx(k,{type:"body",weight:"semibold",size:"lg",className:"text-primary",children:t||a}),e.jsx(k,{type:"body",weight:"regular",size:"md",className:"text-secondary",children:s})]})]}),mt=s=>{const t=T(ct,s.user),a=T(lt,s.siteConfig),{t:n}=I(),i=te({mutationFn:({password:o,hsErase:j})=>V({query:dt,variables:{password:o,hsErase:j}}),onSuccess:o=>{o.deactivateUser.status==="DEACTIVATED"&&window.location.reload()}}),[u,c]=r.useState(!1),[h,p]=r.useState(!1);r.useEffect(()=>{if(u){const o=setTimeout(()=>{p(!0)},500);return()=>clearTimeout(o)}p(!1)},[u]);const f=r.useCallback(o=>{c(o.currentTarget.value!=="")},[]),g=r.useCallback(o=>{c(o.currentTarget.value===t.matrix.mxid)},[t.matrix.mxid]),x=r.useCallback(o=>{if(o.preventDefault(),!h)return;const j=new FormData(o.currentTarget),l=j.get("password");if(l!==null&&typeof l!="string")throw new Error;const d=j.get("hs-erase")==="on";i.mutate({password:l,hsErase:d})},[i.mutate,h]),_=i.data?.deactivateUser.status==="INCORRECT_PASSWORD",m=i.isPending||i.data?.deactivateUser.status==="DEACTIVATED",b=t.hasPassword&&a.passwordLoginEnabled;return e.jsxs(se,{trigger:e.jsx(y,{kind:"tertiary",destructive:!0,size:"sm",className:"self-center",Icon:Z,children:n("frontend.account.delete_account.button")}),children:[e.jsx(ne,{children:n("frontend.account.delete_account.dialog_title")}),e.jsx(Ne,{className:"flex flex-col gap-4",children:e.jsx(We,{t:n,i18nKey:"frontend.account.delete_account.dialog_description",components:{text:e.jsx(k,{type:"body",weight:"regular",size:"md"}),list:e.jsx("ul",{className:"list-disc list-outside pl-6"}),item:e.jsx(k,{as:"li",type:"body",weight:"regular",size:"md"}),profile:e.jsx(ut,{mxid:t.matrix.mxid,username:t.username,displayName:t.matrix.displayName})}})}),e.jsxs(z,{onSubmit:x,children:[e.jsx(nt,{control:e.jsx(st,{}),name:"hs-erase",children:e.jsx(S,{children:n("frontend.account.delete_account.erase_checkbox_label")})}),e.jsx(R,{className:"my-1"}),b?e.jsxs(D,{name:"password",serverInvalid:_,children:[e.jsx(S,{children:n("frontend.account.delete_account.password_label")}),e.jsx(Re,{autoComplete:"current-password",required:!0,onInput:f}),e.jsx(C,{match:"valueMissing",children:n("frontend.errors.field_required")}),_&&e.jsx(C,{children:n("frontend.account.delete_account.incorrect_password")})]}):e.jsxs(D,{name:"mxid",children:[e.jsx(S,{children:n("frontend.account.delete_account.mxid_label",{mxid:t.matrix.mxid})}),e.jsx(G,{required:!0,placeholder:t.matrix.mxid,onInput:g}),e.jsx(C,{match:"valueMissing",children:n("frontend.errors.field_required")}),e.jsx(C,{match:o=>o!==t.matrix.mxid,children:n("frontend.account.delete_account.mxid_mismatch")})]}),u&&e.jsx(Ie,{type:"critical",title:n("frontend.account.delete_account.alert_title"),children:n("frontend.account.delete_account.alert_description")}),e.jsxs(y,{type:"submit",kind:"primary",destructive:!0,disabled:!h||m,Icon:m?void 0:Z,children:[m&&e.jsx(re,{inline:!0}),n("frontend.account.delete_account.button")]})]}),e.jsx(ae,{asChild:!0,children:e.jsx(y,{kind:"tertiary",children:n("action.cancel")})})]})},ht="_link_1g96u_8",ft={link:ht},pt=E(`
fragment PasswordChange_siteConfig on SiteConfig {
passwordChangeAllowed
}
`);function gt({siteConfig:s}){const{t}=I(),{passwordChangeAllowed:a}=T(pt,s);return e.jsx(z,{children:e.jsxs(D,{name:"password_preview",children:[e.jsx(S,{children:t("frontend.account.password.label")}),e.jsx(G,{type:"password",readOnly:!0,value:"this looks like a password"}),e.jsxs(H,{children:[a&&e.jsx(Se,{to:"/password/change",className:ft.link,children:t("frontend.account.password.change")}),!a&&t("frontend.account.password.change_disabled")]})]})})}var F="Collapsible",[xt,Kt]=ke(F),[_t,W]=xt(F),ce=r.forwardRef((s,t)=>{const{__scopeCollapsible:a,open:n,defaultOpen:i,disabled:u,onOpenChange:c,...h}=s,[p,f]=Te({prop:n,defaultProp:i??!1,onChange:c,caller:F});return e.jsx(_t,{scope:a,disabled:u,contentId:Pe(),open:p,onOpenToggle:r.useCallback(()=>f(g=>!g),[f]),children:e.jsx(Q.div,{"data-state":Y(p),"data-disabled":u?"":void 0,...h,ref:t})})});ce.displayName=F;var le="CollapsibleTrigger",de=r.forwardRef((s,t)=>{const{__scopeCollapsible:a,...n}=s,i=W(le,a);return e.jsx(Q.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Y(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:De(s.onClick,i.onOpenToggle)})});de.displayName=le;var K="CollapsibleContent",ue=r.forwardRef((s,t)=>{const{forceMount:a,...n}=s,i=W(K,s.__scopeCollapsible);return e.jsx(Fe,{present:a||i.open,children:({present:u})=>e.jsx(jt,{...n,ref:t,present:u})})});ue.displayName=K;var jt=r.forwardRef((s,t)=>{const{__scopeCollapsible:a,present:n,children:i,...u}=s,c=W(K,a),[h,p]=r.useState(n),f=r.useRef(null),g=qe(t,f),x=r.useRef(0),_=x.current,m=r.useRef(0),b=m.current,o=c.open||h,j=r.useRef(o),l=r.useRef(void 0);return r.useEffect(()=>{const d=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(d)},[]),Me(()=>{const d=f.current;if(d){l.current=l.current||{transitionDuration:d.style.transitionDuration,animationName:d.style.animationName},d.style.transitionDuration="0s",d.style.animationName="none";const v=d.getBoundingClientRect();x.current=v.height,m.current=v.width,j.current||(d.style.transitionDuration=l.current.transitionDuration,d.style.animationName=l.current.animationName),p(n)}},[c.open,n]),e.jsx(Q.div,{"data-state":Y(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!o,...u,ref:g,style:{"--radix-collapsible-content-height":_?`${_}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...s.style},children:o&&i})});function Y(s){return s?"open":"closed"}var wt=ce,Ct=de,bt=ue;function me(s,t){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",ref:t,...s,children:e.jsx("path",{d:"m12 10.775-3.9 3.9a.95.95 0 0 1-.7.275.95.95 0 0 1-.7-.275.95.95 0 0 1-.275-.7q0-.425.275-.7l4.6-4.6q.15-.15.325-.212Q11.8 8.4 12 8.4t.375.063a.9.9 0 0 1 .325.212l4.6 4.6a.95.95 0 0 1 .275.7.95.95 0 0 1-.275.7.95.95 0 0 1-.7.275.95.95 0 0 1-.7-.275z"})})}me.displayName="ChevronUpIcon";const vt=r.forwardRef(me),yt="_root_1hqni_8",Et="_heading_1hqni_14",At="_trigger_1hqni_20",Nt="_trigger-title_1hqni_29",Rt="_trigger-icon_1hqni_34",It="_description_1hqni_42",St="_content_1hqni_48",A={root:yt,heading:Et,trigger:At,triggerTitle:Nt,triggerIcon:Rt,description:It,content:St},U=({title:s,description:t,defaultOpen:a,className:n,children:i,...u})=>{const{t:c}=I(),[h,p]=r.useState(a||!1),f=r.useId(),g=r.useId(),x=r.useCallback(_=>{_.preventDefault(),p(m=>!m)},[]);return e.jsx(wt,{...u,open:h,onOpenChange:p,asChild:!0,"aria-labelledby":f,"aria-describedby":t?g:void 0,className:$(A.root,n),children:e.jsxs("section",{children:[e.jsxs("header",{className:A.heading,children:[e.jsxs("div",{className:A.trigger,children:[e.jsx(Ye,{onClick:x,id:f,className:A.triggerTitle,children:s}),e.jsx(Ct,{className:A.triggerIcon,asChild:!0,children:e.jsx(Oe,{tooltip:c(h?"action.collapse":"action.expand"),children:e.jsx(vt,{})})})]}),t&&e.jsx("p",{className:A.description,id:g,children:t})]}),e.jsx(bt,{asChild:!0,children:e.jsx("article",{className:A.content,children:i})})]})})},Tt=E(`
fragment AddEmailForm_user on User {
hasPassword
}
`),kt=E(`
fragment AddEmailForm_siteConfig on SiteConfig {
passwordLoginEnabled
}
`),Pt=E(`
mutation AddEmail($email: String!, $password: String, $language: String!) {
startEmailAuthentication(
input: { email: $email, password: $password, language: $language }
) {
status
violations
authentication {
id
}
}
}
`),Dt=({user:s,siteConfig:t,onAdd:a})=>{const{hasPassword:n}=T(Tt,s),{passwordLoginEnabled:i}=T(kt,t),u=n&&i,{t:c,i18n:h}=I(),p=Be(),[f,g]=Le(),x=te({mutationFn:({email:o,password:j,language:l})=>V({query:Pt,variables:{email:o,password:j,language:l}}),onSuccess:async o=>{if(p.invalidateQueries({queryKey:["userEmails"]}),o.startEmailAuthentication.status==="STARTED"){if(!o.startEmailAuthentication.authentication?.id)throw new Error("Unexpected response from server");await a(o.startEmailAuthentication.authentication?.id)}}}),_=r.useCallback(async o=>{o.preventDefault();const l=new FormData(o.currentTarget).get("input");let d;if(u&&(d=await f()),(await x.mutateAsync({email:l,password:d,language:h.languages[0]})).startEmailAuthentication.status!=="STARTED")throw new Error},[x.mutateAsync,u,f,h.languages]),m=x.data?.startEmailAuthentication.status??null,b=x.data?.startEmailAuthentication.violations??[];return e.jsxs(e.Fragment,{children:[e.jsx(Ue,{title:c("frontend.add_email_form.password_confirmation"),ref:g}),e.jsxs(it,{onSave:_,required:!0,type:"email",serverInvalid:!!m&&m!=="STARTED",label:c("frontend.add_email_form.email_field_label"),helpLabel:c("frontend.add_email_form.email_field_help"),saveButtonLabel:c("action.save"),savingLabel:c("common.saving"),savedLabel:c("common.saved"),cancelButtonLabel:c("action.cancel"),children:[e.jsx(C,{match:"typeMismatch",forceMatch:m==="INVALID_EMAIL_ADDRESS",children:c("frontend.add_email_form.email_invalid_error")}),m==="IN_USE"&&e.jsx(C,{children:c("frontend.add_email_form.email_in_use_error")}),m==="RATE_LIMITED"&&e.jsx(C,{children:c("frontend.errors.rate_limit_exceeded")}),m==="DENIED"&&e.jsxs(e.Fragment,{children:[e.jsx(C,{children:c("frontend.add_email_form.email_denied_error")}),b.map(o=>e.jsx(H,{children:o},o))]}),m==="INCORRECT_PASSWORD"&&e.jsx(C,{children:c("frontend.add_email_form.incorrect_password_error")})]})]})},Ft=E(`
query UserProfile {
viewerSession {
__typename
... on BrowserSession {
id
user {
...AddEmailForm_user
...UserEmailList_user
...AccountDeleteButton_user
hasPassword
emails(first: 0) {
totalCount
}
}
}
}
siteConfig {
emailChangeAllowed
passwordLoginEnabled
accountDeactivationAllowed
...AddEmailForm_siteConfig
...UserEmailList_siteConfig
...PasswordChange_siteConfig
...AccountDeleteButton_siteConfig
}
}
`),qt=Ge({queryKey:["userProfile"],queryFn:({signal:s})=>V({query:Ft,signal:s})}),Mt=({id:s})=>{const{t}=I(),a=Je(s);return e.jsxs(se,{trigger:e.jsx(y,{kind:"primary",destructive:!0,size:"lg",Icon:ee,children:t("frontend.account.sign_out.button")}),children:[e.jsx(ne,{children:t("frontend.account.sign_out.dialog")}),e.jsxs(y,{type:"button",kind:"primary",destructive:!0,onClick:()=>a.mutate(),disabled:a.isPending,Icon:a.isPending?void 0:ee,children:[a.isPending&&e.jsx(re,{inline:!0}),t("action.sign_out")]}),e.jsx(ae,{asChild:!0,children:e.jsx(y,{kind:"tertiary",children:t("action.cancel")})})]})};function Yt(){const s=$e(),{t}=I(),{data:{viewerSession:a,siteConfig:n}}=ze(qt);if(a?.__typename!=="BrowserSession")throw He();const i=async u=>{await s({to:"/emails/$id/verify",params:{id:u}})};return e.jsxs("div",{className:"flex flex-col gap-6",children:[(n.emailChangeAllowed||a.user.emails.totalCount>0)&&e.jsxs(e.Fragment,{children:[e.jsxs(U,{defaultOpen:!0,title:t("frontend.account.contact_info"),children:[e.jsx(Ve,{user:a.user,siteConfig:n}),n.emailChangeAllowed&&e.jsx(Dt,{user:a.user,siteConfig:n,onAdd:i})]}),e.jsx(R,{kind:"section"})]}),n.passwordLoginEnabled&&a.user.hasPassword&&e.jsxs(e.Fragment,{children:[e.jsx(U,{defaultOpen:!0,title:t("frontend.account.account_password"),children:e.jsx(gt,{siteConfig:n})}),e.jsx(R,{kind:"section"})]}),e.jsxs(U,{title:t("common.e2ee"),children:[e.jsx(k,{className:"text-secondary",size:"md",children:t("frontend.reset_cross_signing.description")}),e.jsx(Ke,{to:"/reset-cross-signing",kind:"secondary",destructive:!0,children:t("frontend.reset_cross_signing.start_reset")})]}),e.jsx(R,{kind:"section"}),e.jsx(Mt,{id:a.id}),n.accountDeactivationAllowed&&e.jsxs(e.Fragment,{children:[e.jsx(R,{}),e.jsx(mt,{user:a.user,siteConfig:n})]}),e.jsx(R,{})]})}export{Yt as component};
//# sourceMappingURL=_account.index-Bgj2uEUe.js.map

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1,2 @@
import{o as c,ah as l,j as u,ai as m,r as o}from"./main-CiAhdYQG.js";import"./_commonjsHelpers-DaWZu8wl.js";/* empty css */function b(){const a=c(l),{planManagementIframeUri:t}=a.data.siteConfig;return t?u.jsx(f,{planManagementIframeUri:t}):u.jsx(m,{to:"/",replace:!0})}function f({planManagementIframeUri:a}){const t=o.useRef(null),r=o.useCallback(()=>{const e=t.current;if(!e)return;const n=e.contentWindow?.document.body.parentElement?.scrollHeight;n?e.height=`${n}px`:e.height="500px"},[]),s=o.useMemo(()=>new MutationObserver(e=>{r(),setTimeout(()=>{r()},1e3)}),[r]),i=o.useCallback(e=>{const n=e.contentWindow?.document.body;n&&(r(),s.observe(n,{childList:!0,subtree:!0,attributes:!0}))},[r,s]);return o.useEffect(()=>{const e=t.current;return e&&i(e),()=>s.disconnect()},[s,i]),u.jsx("iframe",{title:"iframe",ref:t,onLoad:e=>i(e.target),src:a,scrolling:"no"})}export{b as component};
//# sourceMappingURL=_account.plan.index-az7l7N5p.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
._browser-sessions-overview_xlk0o_8{display:flex;align-items:center;gap:var(--cpd-space-4x);padding:var(--cpd-space-4x);border-radius:var(--cpd-space-3x);background-color:var(--cpd-color-bg-canvas-default);outline:1px solid var(--cpd-color-gray-400);outline-offset:-1px}

View File

@@ -0,0 +1,47 @@
import{u as l,au as u,o as f,q as m,p as v,ae as p,j as s,l as w,k as _,af as b}from"./main-CiAhdYQG.js";import{c as x}from"./Heading-zTQC9Kqs.js";import{F as S,B as g,E as h}from"./Filter-_9i8iQpA.js";import{B as d}from"./ButtonLink-kWcKQZoZ.js";import"./_commonjsHelpers-DaWZu8wl.js";/* empty css */import"./LastActive-D4SP35FS.js";import"./EndBrowserSessionButton-DXsnVcVV.js";import"./computer-Cx9wZ7Nf.js";const y=6,j=_(`
query BrowserSessionList(
$first: Int
$after: String
$last: Int
$before: String
$lastActive: DateFilter
) {
viewerSession {
__typename
... on BrowserSession {
id
user {
id
browserSessions(
first: $first
after: $after
last: $last
before: $before
lastActive: $lastActive
state: ACTIVE
) {
totalCount
edges {
cursor
node {
id
...BrowserSession_session
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}
}
}
}
`),q=(e,r)=>m({queryKey:["browserSessionList",r,e],queryFn:({signal:o})=>w({query:j,variables:{lastActive:r?{before:b()}:void 0,...e},signal:o})});function N(){const{t:e}=l(),{inactive:r,pagination:o}=u.useLoaderDeps(),{data:{viewerSession:t}}=f(q(o,r));if(t.__typename!=="BrowserSession")throw v();const[i,n]=p(o,t.user.browserSessions.pageInfo,y),c=[...t.user.browserSessions.edges].reverse();return s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(x,{children:e("frontend.browser_sessions_overview.heading")}),s.jsx("div",{className:"flex gap-2 items-start",children:s.jsx(S,{to:"/sessions/browsers",enabled:r,search:{inactive:r?void 0:!0},children:e("frontend.last_active.inactive_90_days")})}),c.map(a=>s.jsx(g,{session:a.node,isCurrent:t.id===a.node.id},a.cursor)),t.user.browserSessions.totalCount===0&&s.jsx(h,{children:e(r?"frontend.browser_sessions_overview.no_active_sessions.inactive_90_days":"frontend.browser_sessions_overview.no_active_sessions.default")}),(n||i)&&s.jsxs("div",{className:"flex *:flex-1",children:[s.jsx(d,{kind:"secondary",size:"sm",disabled:!n,to:"/sessions/browsers",search:n||o,resetScroll:!0,children:e("common.previous")}),s.jsx("div",{}),s.jsx(d,{kind:"secondary",size:"sm",disabled:!i,to:"/sessions/browsers",search:i||o,resetScroll:!0,children:e("common.next")})]})]})}export{N as component};
//# sourceMappingURL=_account.sessions.browsers-DNRESZGR.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,110 @@
import{u as v,b as f,j as s,k as m,T as U,ad as C,o as _,q as g,p as h,ae as L,l as j,af as $}from"./main-CiAhdYQG.js";import{c as q,b as k}from"./Heading-zTQC9Kqs.js";import{B as x}from"./ButtonLink-kWcKQZoZ.js";import{s as B,E as F,g as R,a as P}from"./EndOAuth2SessionButton-CPWjVtc_.js";import{b as D,F as M,E as K}from"./Filter-_9i8iQpA.js";import{p as u,L as y,D as w}from"./LastActive-D4SP35FS.js";import{R as S,L as b,H as N,N as T,C as E,M as I,I as d,A as O}from"./EndBrowserSessionButton-DXsnVcVV.js";import{S as z}from"./Separator-CVNE-7yB.js";import{L as G}from"./Link-Do_sTHM7.js";import"./_commonjsHelpers-DaWZu8wl.js";/* empty css */import"./computer-Cx9wZ7Nf.js";const H=m(`
fragment CompatSession_session on CompatSession {
id
createdAt
deviceId
finishedAt
lastActiveIp
lastActiveAt
humanName
...EndCompatSessionButton_session
userAgent {
name
os
model
deviceType
}
ssoLogin {
id
redirectUri
}
}
`),Q=({session:t})=>{const{t:n}=v(),e=f(H,t),o=e.humanName??(e.ssoLogin?.redirectUri?B(e.ssoLogin.redirectUri):void 0),c=e.userAgent?.deviceType??"UNKNOWN",i=e.userAgent?.model??(e.userAgent?.name?e.userAgent?.os?n("frontend.session.name_for_platform",{name:e.userAgent.name,platform:e.userAgent.os}):e.userAgent.name:n("frontend.session.unknown_device")),a=u(e.createdAt),r=e.lastActiveAt?u(e.lastActiveAt):void 0;return s.jsxs(S,{children:[s.jsxs(b,{to:"/sessions/$id",params:{id:e.id},disabled:!!e.finishedAt,children:[s.jsxs(N,{type:c,children:[s.jsx(T,{name:i}),o&&s.jsx(E,{name:o,logoUri:D(e.userAgent?.name??void 0)})]}),s.jsxs(I,{children:[r&&s.jsx(d,{label:n("frontend.session.last_active_label"),children:s.jsx(y,{lastActive:r})}),s.jsx(d,{label:n("frontend.session.signed_in_label"),children:s.jsx(w,{datetime:a})}),s.jsx(d,{label:n("frontend.session.device_id_label"),children:e.deviceId})]})]}),!e.finishedAt&&s.jsx(O,{children:s.jsx(F,{session:e,size:"sm"})})]})},W=m(`
fragment OAuth2Session_session on Oauth2Session {
id
scope
createdAt
finishedAt
lastActiveIp
lastActiveAt
humanName
...EndOAuth2SessionButton_session
userAgent {
name
model
os
deviceType
}
client {
id
clientId
clientName
applicationType
logoUri
}
}
`),V=t=>t==="WEB"?"PC":t==="NATIVE"?"MOBILE":"UNKNOWN",Y=({session:t})=>{const{t:n}=v(),e=f(W,t),o=R(e.scope),c=u(e.createdAt),i=e.lastActiveAt?u(e.lastActiveAt):void 0,a=(e.userAgent?.deviceType==="UNKNOWN"?null:e.userAgent?.deviceType)??V(e.client.applicationType),r=e.client.clientName||e.client.clientId,p=e.humanName??e.userAgent?.model??(e.userAgent?.name?e.userAgent?.os?n("frontend.session.name_for_platform",{name:e.userAgent.name,platform:e.userAgent.os}):e.userAgent.name:n("frontend.session.unknown_device"));return s.jsxs(S,{children:[s.jsxs(b,{to:"/sessions/$id",params:{id:e.id},disabled:!!e.finishedAt,children:[s.jsxs(N,{type:a,children:[s.jsx(T,{name:p}),s.jsx(E,{name:r,logoUri:e.client.logoUri??void 0})]}),s.jsxs(I,{children:[i&&s.jsx(d,{label:n("frontend.session.last_active_label"),children:s.jsx(y,{lastActive:i})}),s.jsx(d,{label:n("frontend.session.signed_in_label"),children:s.jsx(w,{datetime:c})}),o&&s.jsx(d,{label:n("frontend.session.device_id_label"),children:o})]})]}),!e.finishedAt&&s.jsx(O,{children:s.jsx(P,{session:e,size:"sm"})})]})},Z="_browser-sessions-overview_xlk0o_8",J={browserSessionsOverview:Z},X=m(`
fragment BrowserSessionsOverview_user on User {
id
browserSessions(first: 0, state: ACTIVE) {
totalCount
}
}
`),ee=({user:t})=>{const n=f(X,t),{t:e}=v();return s.jsxs("div",{className:J.browserSessionsOverview,children:[s.jsxs("div",{className:"flex flex-1 flex-col",children:[s.jsx(q,{children:e("frontend.browser_sessions_overview.heading")}),s.jsx(U,{children:e("frontend.browser_sessions_overview.body",{count:n.browserSessions.totalCount})})]}),s.jsx(G,{to:"/sessions/browsers",children:e("frontend.browser_sessions_overview.view_all_button")})]})},se=6,ne=m(`
query SessionsOverview {
viewer {
__typename
... on User {
id
...BrowserSessionsOverview_user
}
}
}
`),te=g({queryKey:["sessionsOverview"],queryFn:({signal:t})=>j({query:ne,signal:t})}),oe=m(`
query AppSessionsList(
$before: String
$after: String
$first: Int
$last: Int
$lastActive: DateFilter
) {
viewer {
__typename
... on User {
id
appSessions(
before: $before
after: $after
first: $first
last: $last
lastActive: $lastActive
state: ACTIVE
) {
edges {
cursor
node {
__typename
...CompatSession_session
...OAuth2Session_session
}
}
totalCount
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
}
}
}
`),ie=(t,n)=>g({queryKey:["appSessionList",n,t],queryFn:({signal:e})=>j({query:oe,variables:{lastActive:n?{before:$()}:void 0,...t},signal:e})}),re=t=>{throw new Error(`Unknown session type: ${t}`)};function xe(){const{t}=v(),{inactive:n,pagination:e}=C.useLoaderDeps(),{data:{viewer:o}}=_(te);if(o.__typename!=="User")throw h();const{data:c}=_(ie(e,n));if(c.viewer.__typename!=="User")throw h();const i=c.viewer.appSessions,[a,r]=L(e,i.pageInfo,se),p=[...i.edges].reverse();return s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(k,{children:t("frontend.user_sessions_overview.heading")}),s.jsx(ee,{user:o}),s.jsx(z,{kind:"section"}),s.jsx("div",{className:"flex gap-2 justify-start items-center",children:s.jsx(M,{to:"/sessions",enabled:n,search:{inactive:n?void 0:!0},children:t("frontend.last_active.inactive_90_days")})}),p.map(l=>{const A=l.node.__typename;switch(A){case"Oauth2Session":return s.jsx(Y,{session:l.node},l.cursor);case"CompatSession":return s.jsx(Q,{session:l.node},l.cursor);default:return re(A)}}),i.totalCount===0&&s.jsx(K,{children:t(n?"frontend.user_sessions_overview.no_active_sessions.inactive_90_days":"frontend.user_sessions_overview.no_active_sessions.default")}),(r||a)&&s.jsxs("div",{className:"flex *:flex-1",children:[s.jsx(x,{kind:"secondary",size:"sm",disabled:!r,to:"/sessions",search:{inactive:n,...r||e},resetScroll:!0,children:t("common.previous")}),s.jsx("div",{}),s.jsx(x,{kind:"secondary",size:"sm",disabled:!a,to:"/sessions",search:{inactive:n,...a||e},resetScroll:!0,children:t("common.next")})]})]})}export{xe as component};
//# sourceMappingURL=_account.sessions.index-ChqhRgNC.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function c(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var t=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),t}export{c as a,u as g};
//# sourceMappingURL=_commonjsHelpers-DaWZu8wl.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"_commonjsHelpers-DaWZu8wl.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}

View File

@@ -0,0 +1,2 @@
import{r as a,j as r}from"./main-CiAhdYQG.js";function o(t,e){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",ref:e,...t,children:r.jsx("path",{d:"M12.207 5.293a1 1 0 0 1 0 1.414L7.914 11H18.5a1 1 0 1 1 0 2H7.914l4.293 4.293a1 1 0 0 1-1.414 1.414l-6-6a1 1 0 0 1 0-1.414l6-6a1 1 0 0 1 1.414 0"})})}o.displayName="ArrowLeftIcon";const n=a.forwardRef(o);export{n as I};
//# sourceMappingURL=arrow-left-BJ2z0Kiz.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"arrow-left-BJ2z0Kiz.js","sources":["../node_modules/@vector-im/compound-design-tokens/assets/web/icons/arrow-left.js"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction ArrowLeftIcon(props, ref) {\n return /*#__PURE__*/_jsx(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"1em\",\n height: \"1em\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n ref: ref,\n ...props,\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.207 5.293a1 1 0 0 1 0 1.414L7.914 11H18.5a1 1 0 1 1 0 2H7.914l4.293 4.293a1 1 0 0 1-1.414 1.414l-6-6a1 1 0 0 1 0-1.414l6-6a1 1 0 0 1 1.414 0\"\n })\n });\n}\n;\nArrowLeftIcon.displayName = \"ArrowLeftIcon\";\nexport default forwardRef(ArrowLeftIcon);"],"names":["ArrowLeftIcon","props","ref","_jsx","IconArrowLeft","forwardRef"],"mappings":"8CAEA,SAASA,EAAcC,EAAOC,EAAK,CACjC,OAAoBC,EAAAA,IAAK,MAAO,CAC9B,MAAO,6BACP,MAAO,MACP,OAAQ,MACR,KAAM,eACN,QAAS,YACT,IAAKD,EACL,GAAGD,EACH,SAAuBE,EAAAA,IAAK,OAAQ,CAClC,EAAG,kJACT,CAAK,CACL,CAAG,CACH,CAEAH,EAAc,YAAc,gBAC5B,MAAAI,EAAeC,EAAAA,WAAWL,CAAa","x_google_ignoreList":[0]}

View File

@@ -0,0 +1,2 @@
import{r as s,j as r}from"./main-CiAhdYQG.js";function e(o,t){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",ref:t,...o,children:r.jsx("path",{d:"M9.55 17.575q-.2 0-.375-.062a.9.9 0 0 1-.325-.213L4.55 13q-.274-.274-.262-.713.012-.437.287-.712a.95.95 0 0 1 .7-.275q.425 0 .7.275L9.55 15.15l8.475-8.475q.274-.275.713-.275.437 0 .712.275.275.274.275.713 0 .437-.275.712l-9.2 9.2q-.15.15-.325.212a1.1 1.1 0 0 1-.375.063"})})}e.displayName="CheckIcon";const c=s.forwardRef(e);export{c as I};
//# sourceMappingURL=check-Cx46Fv0J.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"check-Cx46Fv0J.js","sources":["../node_modules/@vector-im/compound-design-tokens/assets/web/icons/check.js"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction CheckIcon(props, ref) {\n return /*#__PURE__*/_jsx(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"1em\",\n height: \"1em\",\n fill: \"currentColor\",\n viewBox: \"0 0 24 24\",\n ref: ref,\n ...props,\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M9.55 17.575q-.2 0-.375-.062a.9.9 0 0 1-.325-.213L4.55 13q-.274-.274-.262-.713.012-.437.287-.712a.95.95 0 0 1 .7-.275q.425 0 .7.275L9.55 15.15l8.475-8.475q.274-.275.713-.275.437 0 .712.275.275.274.275.713 0 .437-.275.712l-9.2 9.2q-.15.15-.325.212a1.1 1.1 0 0 1-.375.063\"\n })\n });\n}\n;\nCheckIcon.displayName = \"CheckIcon\";\nexport default forwardRef(CheckIcon);"],"names":["CheckIcon","props","ref","_jsx","IconCheck","forwardRef"],"mappings":"8CAEA,SAASA,EAAUC,EAAOC,EAAK,CAC7B,OAAoBC,EAAAA,IAAK,MAAO,CAC9B,MAAO,6BACP,MAAO,MACP,OAAQ,MACR,KAAM,eACN,QAAS,YACT,IAAKD,EACL,GAAGD,EACH,SAAuBE,EAAAA,IAAK,OAAQ,CAClC,EAAG,+QACT,CAAK,CACL,CAAG,CACH,CAEAH,EAAU,YAAc,YACxB,MAAAI,EAAeC,EAAAA,WAAWL,CAAS","x_google_ignoreList":[0]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1 @@
._external-link_b03cz_8{color:var(--cpd-color-text-link-external)!important}

View File

@@ -0,0 +1,19 @@
import{j as e,a8 as c,w as d,u,b as h,k as o,a9 as x,o as m,q as j,p,L as f,l as y}from"./main-CiAhdYQG.js";import{b as _}from"./Heading-zTQC9Kqs.js";import{C as U}from"./computer-Cx9wZ7Nf.js";import{D as C,a as L,b as N,c as i,d as s,e as r}from"./SessionInfo-BtmlaGNW.js";import"./_commonjsHelpers-DaWZu8wl.js";/* empty css */import"./VisualListItem-Dd-weqBc.js";import"./Separator-CVNE-7yB.js";const g="_external-link_b03cz_8",q={externalLink:g},D=({children:n,className:t,...a})=>e.jsx(c,{className:d(t,q.externalLink),target:"_blank",...a,children:n}),k=o(`
fragment OAuth2Client_detail on Oauth2Client {
id
clientId
clientName
clientUri
logoUri
tosUri
policyUri
redirectUris
}
`),l=({uri:n})=>{if(!n)return null;const t=new URL(n),a=t.host+t.pathname;return e.jsx(D,{href:n,children:a})},b=({client:n})=>{const t=h(k,n),{t:a}=u();return e.jsxs("div",{className:"flex flex-col gap-10",children:[e.jsxs("header",{className:"flex flex-row gap-2 justify-start items-center",children:[e.jsx(U,{logoUri:t.logoUri||void 0,name:t.clientName||t.clientId,size:"1.5rem"}),e.jsx(_,{children:t.clientName})]}),e.jsxs(C,{children:[e.jsx(L,{children:a("frontend.oauth2_client_detail.details_title")}),e.jsxs(N,{children:[t.clientName&&e.jsxs(i,{children:[e.jsx(s,{children:a("frontend.oauth2_client_detail.name")}),e.jsx(r,{children:t.clientName})]}),t.tosUri&&e.jsxs(i,{children:[e.jsx(s,{children:a("frontend.oauth2_client_detail.terms")}),e.jsx(r,{children:e.jsx(l,{uri:t.tosUri})})]}),t.policyUri&&e.jsxs(i,{children:[e.jsx(s,{children:a("frontend.oauth2_client_detail.policy")}),e.jsx(r,{children:e.jsx(l,{uri:t.policyUri})})]})]})]})]})},A=o(`
query OAuth2Client($id: ID!) {
oauth2Client(id: $id) {
...OAuth2Client_detail
}
}
`),O=n=>j({queryKey:["oauth2Client",n],queryFn:({signal:t})=>y({query:A,variables:{id:n},signal:t})});function S(){const{id:n}=x.useParams(),{data:{oauth2Client:t}}=m(O(n));if(!t)throw p();return e.jsx(f,{children:e.jsx(b,{client:t})})}export{S as component};
//# sourceMappingURL=clients._id-CBcE7ZJr.js.map

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More