1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55214],{39043:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var l=t(6029),r=t(60273),i=t(34793),n=t(65946);function a(e){let{text:s}=e,{t}=(0,i.y)("profile");return(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("p",{className:"text-ter",children:(0,l.jsx)(r.A,{href:`${n.v}/gpg-keys`,children:t("SIDEBAR_SSH_GPG_KEYS")})}),(0,l.jsx)("p",{className:"font-semibold text-pri",children:"/"}),(0,l.jsx)("p",{className:"font-semibold text-pri",children:s})]})}},39425:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/gpg-keys/create",function(){return t(84445)}])},47333:(e,s,t)=>{"use strict";t.d(s,{g:()=>r});var l=t(6029);function r(e){let{text:s,style:t={},sub:r,grouping:i}=e;return(0,l.jsx)("p",{style:t,className:`${r?"font-light":"text-base"} ${i?"font-semibold":"font-normal"} text-pri`,children:s})}},47647:(e,s,t)=>{"use strict";t.d(s,{SB:()=>o,SY:()=>u,Wb:()=>d,gF:()=>i,xt:()=>c});var l=t(66031),r=t(68796);let i=e=>({validator:s=>!s||(0,r.getCustomLength)(s)<l.llI?{result:!1,message:e("DECS_ERROR_1"),trigger:"blur"}:(0,r.getCustomLength)(s)>l.Dp_?{result:!1,message:e("DECS_ERROR_2"),trigger:"blur"}:{result:!0,message:"",trigger:"blur"}}),n=new Map,a=new Map,o=e=>{let{scope:s,group:t,keyName:r,values:i}=e,a=Array.isArray(i)?i:[],o=`${s}_${t}_${r}`;if(!n.has(o)){var c,u;let e=(null===l.PAq||void 0===l.PAq||null==(u=l.PAq[s])||null==(c=u[t])?void 0:c[r])||[];n.set(o,new Set(e))}let d=n.get(o);return a.map(e=>({val:e,disabled:d.has(e)}))},c=e=>{var s,t;let{scope:r,group:i,keyName:n}=e,o=`${r}_${i}_${n}`;if(a.has(o))return a.get(o);let c=!!(null===l.yT5||void 0===l.yT5||null==(t=l.yT5[r])||null==(s=t[i])?void 0:s.includes(n));return a.set(o,c),c},u=e=>({validator:s=>!s||(0,r.getCustomLength)(s)<l.mMW?{result:!1,message:e("DECS_ERROR_1"),trigger:"blur"}:(0,r.getCustomLength)(s)>l.yHK?{result:!1,message:e("DECS_ERROR_2"),trigger:"blur"}:{result:!0,message:"",trigger:"blur"}}),d=e=>({validator:s=>!s||(0,r.getCustomLength)(s)<l.mMW?{result:!1,message:e("SSH_KEYS_NAME_REQUIRED"),trigger:"blur"}:(0,r.getCustomLength)(s)>l.yHK?{result:!1,message:e("SSH_KEYS_NAME_LENGTH_ERROR"),trigger:"blur"}:{result:!0,message:"",trigger:"blur"}})},65946:(e,s,t)=>{"use strict";t.d(s,{J:()=>R,v:()=>A});var l=t(6029);t(55729);var r=t(20719),i=t(73705),n=t(34819),a=t(47723),o=t(59814),c=t(73571),u=t(68466),d=t(50962),x=t(57882),p=t(25378),g=t(21184),E=t(39131),_=t(66031),m=t(86887);function h(e){return!1!==e&&("string"!=typeof e||"false"!==e.toLowerCase())}let A="/profile",f=(0,E.A)(m.V.PROFILE_TAPD_ACCOUNT),S=(0,E.A)(m.V.PROFILE_OAUTH_ENABLED),j=(0,E.A)(m.V.PROFILE_EXT_IDENTITY_ENABLED),R={"/":{text:"SIDEBAR_PROFILE",icon:(0,l.jsx)(r.A,{size:16})},"/account":{text:"SIDEBAR_ACCOUNT",icon:(0,l.jsx)(i.A,{size:16})},"/auth":{text:"SIDEBAR_AUTHENTICATION",icon:(0,l.jsx)(n.A,{size:16}),isHidden:!_.m5x},"/email":{text:"SIDEBAR_EMAIL",icon:(0,l.jsx)(a.A,{size:16})},"/gpg-keys":{text:"SIDEBAR_SSH_GPG_KEYS",icon:(0,l.jsx)(o.A,{size:16})},"/ssh-keys/create":{sub:!0,parent:"/gpg-keys"},"/gpg-keys/create":{sub:!0,parent:"/gpg-keys"},"/token":{text:"SIDEBAR_TOKEN",icon:(0,l.jsx)(c.A,{size:16})},"/token/create":{sub:!0,parent:"/token"},"/language":{text:"SIDEBAR_LANGUAGE",icon:(0,l.jsx)(u.A,{size:16})},"/appearance":{text:"SIDEBAR_APPEARANCE",icon:(0,l.jsx)(d.A,{size:16})},"/tapd":{text:"SIDEBAR_TAPD",icon:(0,l.jsx)(i.A,{size:16}),isHidden:!f},"/oauth":{text:"SIDEBAR_OAUTH",icon:(0,l.jsx)(x.A,{size:16}),isHidden:!(h(_.J2A)&&h(S))},"/oauth/detail":{sub:!0,parent:"/oauth"},"/ext-identity":{text:"SIDEBAR_EXT_IDENTITY",icon:(0,l.jsx)(p.A,{size:16}),isHidden:!j},"/workspaces":{text:"SIDEBAR_WORKSPACES",icon:(0,l.jsx)(g.A,{size:16})}}},84445:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>S,default:()=>j});var l=t(6029),r=t(97137),i=t(34793),n=t(96277),a=t(39043),o=t(1910),c=t(76498),u=t(46833),d=t(45783),x=t(81278),p=t(47333),g=t(55729),E=t(66031),_=t(67011),m=t(47647),h=t(57250);let{FormItem:A}=o.l;var f=function(e){return e.INITIAL="initial",e.PENDING="pending",e.SUCCESS="success",e.ERROR="error",e}(f||{}),S=!0;function j(){let{t:e}=(0,i.y)("profile"),{t:s}=(0,i.y)("description"),t=(0,x.useRouter)(),[f,S]=(0,g.useState)("initial"),[j]=o.l.useForm(),[R,N]=(0,g.useState)(""),v=async s=>{if(S("pending"),!0===s.validateResult){if(!(await (0,_.xv)({name:s.fields.gpg_keys_name,armoredPublicKey:encodeURIComponent(s.fields.gpg_keys)})).error){S("success"),c.xT.success(e("CREATE_GPG_KEYS_SUCCESS")),t.replace("/profile/gpg-keys");return}S("error");return}S("error")},C=(0,g.useMemo)(()=>({gpg_keys_name:[(0,m.SY)(e)],gpg_keys:[{required:!0,message:e("GPG_KEYS_IS_REQUIRED"),trigger:"blur"}]}),[e]);return(0,l.jsxs)(n.n,{children:[(0,l.jsx)(r.A,{titleName:e("PROFILE_TOKEN_PAGE_TITLE"),description:s("DEFAULT_DESCRIPTION")}),(0,l.jsxs)("div",{className:"px-8 mb-6 max-laptop:px-0",children:[(0,l.jsx)("div",{className:"w-full h-full mb-4",children:(0,l.jsx)(a.A,{text:e("ADD_GPG_KEYS")})}),(0,l.jsx)("div",{className:"flex flex-col gap-4",children:(0,l.jsx)(o.l,{requiredMark:!1,className:"profile-form",labelAlign:"top",onSubmit:v,form:j,rules:C,scrollToFirstError:"smooth",children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("div",{children:(0,l.jsx)(A,{label:(0,l.jsx)(p.g,{text:e("GPG_KEYS_NAME")}),name:"gpg_keys_name",children:(0,l.jsx)(h.pd,{className:"w-[768px]",maxcharacter:E.yHK,placeholder:e("CREATE_GPG_KEYS_NAME_PLACEHOLDER")||""})})}),(0,l.jsx)("div",{children:(0,l.jsx)(A,{label:(0,l.jsx)(p.g,{text:e("GPG_KEYS")}),name:"gpg_keys",children:(0,l.jsx)(u.T,{placeholder:`-----BEGIN PGP PUBLIC KEY BLOCK----- 2 ${e("CREATE_GPG_KEYS_PLACEHOLDER")} 3-----END PGP PUBLIC KEY BLOCK-----`,value:R,onChange:e=>N(e),rows:8,className:"font-mono"})})}),(0,l.jsxs)("div",{className:"flex gap-3 mt-2",children:[(0,l.jsx)(d.$,{type:"submit",theme:"primary",loading:"pending"===f,children:e("CREATE")}),(0,l.jsx)(d.$,{onClick:()=>{t.replace("/profile/gpg-keys")},theme:"default",variant:"outline",children:e("CANCEL")})]})]})})})]})]})}},96277:(e,s,t)=>{"use strict";t.d(s,{n:()=>m});
3var l=t(6029),r=t(34793),i=t(55729),n=t(46917),a=t(81278),o=t(65946);let{MenuItem:c,SubMenu:u}=n.W;function d(){let{t:e}=(0,r.y)("profile"),s=(0,a.useRouter)(),t=(0,i.useMemo)(()=>{let e=s.route,t=e.replace(o.v,"");return(t=""===t?"/":t,o.J[t])?o.J[t].sub?`${o.v}${o.J[t].parent}`:e:""},[s]),u=(0,i.useMemo)(()=>Object.keys(o.J).map(s=>{var t;return(t=o.J[s]).sub||t.isHidden?null:(0,l.jsx)(c,{icon:null==t?void 0:t.icon,value:`${o.v}${"/"===s?"":s}`,children:(0,l.jsx)("p",{children:e(t.text)})},s)}),[e]);return(0,l.jsx)("div",{className:"laptop:h-full laptop:w-56 shrink-0 laptop:border-r laptop:border-divider laptop:px-2 laptop:py-1",children:(0,l.jsx)(n.W,{expandType:"normal",className:"profile-sidebar-menu",defaultExpanded:[],theme:"light",style:{width:"100%"},onChange:e=>{s.push(e)},value:t,children:u})})}var x=t(14777),p=t(11317),g=t(78409),E=t(88438);function _(){let{userProfile:e}=(0,p.GV)(e=>e.profile.setting);return(0,l.jsxs)("div",{className:"flex items-center h-12 gap-2 px-2",children:[(0,l.jsx)(x.e,{imageSrc:(0,g.cG)(null==e?void 0:e.username),size:32,shape:"circle"}),(0,l.jsx)(E.A,{children:(0,l.jsxs)("p",{className:"font-semibold text-m text-pri",children:[(0,l.jsx)("span",{children:null==e?void 0:e.nickname}),(0,l.jsxs)("span",{className:"text-ter",children:["(",null==e?void 0:e.username,")"]})]})})]})}function m(e){let{children:s}=e;return(0,l.jsxs)("div",{className:"box-content flex flex-col h-full max-w-2xl gap-4 py-4 mx-auto",children:[(0,l.jsx)(_,{}),(0,l.jsxs)("div",{className:"flex flex-col flex-1 h-full laptop:flex-row",children:[(0,l.jsx)(d,{}),(0,l.jsx)("div",{className:"flex-1 h-full shrink",children:s})]})]})}}},e=>{e.O(0,[39910,88028,56932,52472,5854,42441,37165,34223,18096,49121,46593,5053,90636,38792],()=>e(e.s=39425)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.