1import{_ as ie}from"./C58gv5T8.js";import{_ as ne,f as te,a as ae,b as se,u as oe}from"./JX7cFKKt.js";import{_ as re}from"./xNsLwMG1.js";import{m as T}from"./nONxPwN9.js";import{c as le}from"./BoAPWlRe.js";import{d as de}from"./Dr37crrY.js";import{K as y,O as c,W as v,S as l,a7 as t,a4 as m,Q as u,P as A,Y as K,U as ue,Z as h,X as me,a9 as fe,a8 as ce}from"./CIEBbpzO.js";import{a2 as w,a1 as pe}from"./wamUqNAp.js";import{u as ye}from"./B9M3lakr.js";import"./C-OzLE0_.js";import"./NMUp8mdr.js";import"./DyoFqzgu.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};i.SENTRY_RELEASE={id:"bb50ab016c9c190fc534363a83213cea92fa47e8"};var e=new i.Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="feef8a00-0cba-4701-afd5-dfdcc2a31934",i._sentryDebugIdIdentifier="sentry-dbid-feef8a00-0cba-4701-afd5-dfdcc2a31934")}catch{}})();var E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"apiKeys"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"apiKeys"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"keyPreview"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expiresAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastUsedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"revokedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isExpired"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isRevoked"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:163}};E.loc.source={body:`query apiKeys { 2 apiKeys { 3 id 4 name 5 keyPreview 6 expiresAt 7 lastUsedAt 8 revokedAt 9 createdAt 10 isActive 11 isExpired 12 isRevoked 13 } 14} 15`,name:"GraphQL request",locationOffset:{line:1,column:1}};function I(i,e){if(i.kind==="FragmentSpread")e.add(i.name.value);else if(i.kind==="VariableDefinition"){var n=i.type;n.kind==="NamedType"&&e.add(n.name.value)}i.selectionSet&&i.selectionSet.selections.forEach(function(a){I(a,e)}),i.variableDefinitions&&i.variableDefinitions.forEach(function(a){I(a,e)}),i.definitions&&i.definitions.forEach(function(a){I(a,e)})}var O={};(function(){E.definitions.forEach(function(e){if(e.name){var n=new Set;I(e,n),O[e.name.value]=n}})})();function B(i,e){for(var n=0;n<i.definitions.length;n++){var a=i.definitions[n];if(a.name&&a.name.value==e)return a}}function ve(i,e){var n={kind:i.kind,definitions:[B(i,e)]};i.hasOwnProperty("loc")&&(n.loc=i.loc);var a=O[e]||new Set,s=new Set,r=new Set;for(a.forEach(function(d){r.add(d)});r.size>0;){var g=r;r=new Set,g.forEach(function(d){if(!s.has(d)){s.add(d);var f=O[d]||new Set;f.forEach(function(p){r.add(p)})}})}return s.forEach(function(d){var f=B(i,d);f&&n.definitions.push(f)}),n}ve(E,"apiKeys");var D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"authorizedApps"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"authorizedApps"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"clientId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scopes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authorizedAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:105}};D.loc.source={body:`query authorizedApps { 16 authorizedApps { 17 id 18 name 19 clientId 20 scopes 21 authorizedAt 22 } 23} 24`,name:"GraphQL request",locationOffset:{line:1,column:1}};function x(i,e){if(i.kind==="FragmentSpread")e.add(i.name.value);else if(i.kind==="VariableDefinition"){var n=i.type;n.kind==="NamedType"&&e.add(n.name.value)}i.selectionSet&&i.selectionSet.selections.forEach(function(a){x(a,e)}),i.variableDefinitions&&i.variableDefinitions.forEach(function(a){x(a,e)}),i.definitions&&i.definitions.forEach(function(a){x(a,e)})}var $={};(function(){D.definitions.forEach(function(e){if(e.name){var n=new Set;x(e,n),$[e.name.value]=n}})})();function Y(i,e){for(var n=0;n<i.definitions.length;n++){var a=i.definitions[n];if(a.name&&a.name.value==e)return a}}function ge(i,e){var n={kind:i.kind,definitions:[Y(i,e)]};i.hasOwnProperty("loc")&&(n.loc=i.loc);var a=$[e]||new Set,s=new Set,r=new Set;
24for(a.forEach(function(d){r.add(d)});r.size>0;){var g=r;r=new Set,g.forEach(function(d){if(!s.has(d)){s.add(d);var f=$[d]||new Set;f.forEach(function(p){r.add(p)})}})}return s.forEach(function(d){var f=Y(i,d);f&&n.definitions.push(f)}),n}ge(D,"authorizedApps");var F={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"revokeApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"revokeApiKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:122}};F.loc.source={body:`mutation revokeApiKey($id: ID!) { 25 revokeApiKey(id: $id) { 26 success 27 errors { 28 message 29 code 30 } 31 } 32} 33`,name:"GraphQL request",locationOffset:{line:1,column:1}};function N(i,e){if(i.kind==="FragmentSpread")e.add(i.name.value);else if(i.kind==="VariableDefinition"){var n=i.type;n.kind==="NamedType"&&e.add(n.name.value)}i.selectionSet&&i.selectionSet.selections.forEach(function(a){N(a,e)}),i.variableDefinitions&&i.variableDefinitions.forEach(function(a){N(a,e)}),i.definitions&&i.definitions.forEach(function(a){N(a,e)})}var L={};(function(){F.definitions.forEach(function(e){if(e.name){var n=new Set;N(e,n),L[e.name.value]=n}})})();function H(i,e){for(var n=0;n<i.definitions.length;n++){var a=i.definitions[n];if(a.name&&a.name.value==e)return a}}function ke(i,e){var n={kind:i.kind,definitions:[H(i,e)]};i.hasOwnProperty("loc")&&(n.loc=i.loc);var a=L[e]||new Set,s=new Set,r=new Set;for(a.forEach(function(d){r.add(d)});r.size>0;){var g=r;r=new Set,g.forEach(function(d){if(!s.has(d)){s.add(d);var f=L[d]||new Set;f.forEach(function(p){r.add(p)})}})}return s.forEach(function(d){var f=H(i,d);f&&n.definitions.push(f)}),n}ke(F,"revokeApiKey");var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteApiKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:122}};R.loc.source={body:`mutation deleteApiKey($id: ID!) { 34 deleteApiKey(id: $id) { 35 success 36 errors { 37 message 38 code 39 } 40 } 41} 42`,name:"GraphQL request",locationOffset:{line:1,column:1}};function P(i,e){if(i.kind==="FragmentSpread")e.add(i.name.value);else if(i.kind==="VariableDefinition"){var n=i.type;n.kind==="NamedType"&&e.add(n.name.value)}i.selectionSet&&i.selectionSet.selections.forEach(function(a){P(a,e)}),i.variableDefinitions&&i.variableDefinitions.forEach(function(a){P(a,e)}),i.definitions&&i.definitions.forEach(function(a){P(a,e)})}var M={};(function(){R.definitions.forEach(function(e){if(e.name){var n=new Set;P(e,n),M[e.name.value]=n}})})();function W(i,e){for(var n=0;n<i.definitions.length;n++){var a=i.definitions[n];if(a.name&&a.name.value==e)return a}}function be(i,e){var n={kind:i.kind,definitions:[W(i,e)]};i.hasOwnProperty("loc")&&(n.loc=i.loc);var a=M[e]||new Set,s=new Set,r=new Set;
42for(a.forEach(function(d){r.add(d)});r.size>0;){var g=r;r=new Set,g.forEach(function(d){if(!s.has(d)){s.add(d);var f=M[d]||new Set;f.forEach(function(p){r.add(p)})}})}return s.forEach(function(d){var f=W(i,d);f&&n.definitions.push(f)}),n}be(R,"deleteApiKey");var z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"revokeAuthorizedApp"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"applicationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"revokeAuthorizedApp"},arguments:[{kind:"Argument",name:{kind:"Name",value:"applicationId"},value:{kind:"Variable",name:{kind:"Name",value:"applicationId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:169}};z.loc.source={body:`mutation revokeAuthorizedApp($applicationId: ID!) { 43 revokeAuthorizedApp(applicationId: $applicationId) { 44 success 45 errors { 46 message 47 code 48 } 49 } 50} 51`,name:"GraphQL request",locationOffset:{line:1,column:1}};function C(i,e){if(i.kind==="FragmentSpread")e.add(i.name.value);else if(i.kind==="VariableDefinition"){var n=i.type;n.kind==="NamedType"&&e.add(n.name.value)}i.selectionSet&&i.selectionSet.selections.forEach(function(a){C(a,e)}),i.variableDefinitions&&i.variableDefinitions.forEach(function(a){C(a,e)}),i.definitions&&i.definitions.forEach(function(a){C(a,e)})}var q={};(function(){z.definitions.forEach(function(e){if(e.name){var n=new Set;C(e,n),q[e.name.value]=n}})})();function j(i,e){for(var n=0;n<i.definitions.length;n++){var a=i.definitions[n];if(a.name&&a.name.value==e)return a}}function Ae(i,e){var n={kind:i.kind,definitions:[j(i,e)]};i.hasOwnProperty("loc")&&(n.loc=i.loc);var a=q[e]||new Set,s=new Set,r=new Set;for(a.forEach(function(d){r.add(d)});r.size>0;){var g=r;r=new Set,g.forEach(function(d){if(!s.has(d)){s.add(d);var f=q[d]||new Set;f.forEach(function(p){r.add(p)})}})}return s.forEach(function(d){var f=j(i,d);f&&n.definitions.push(f)}),n}Ae(z,"revokeAuthorizedApp");const he=w("/img/brands/icons/claude.svg"),we=w("/img/llms/openai.svg"),Se=w("/img/brands/icons/cursor.svg"),Ke=w("/img/llms/perplexity.svg"),Ie=w("/img/llms/grok.svg"),xe=w("/img/brands/icons/n8n.svg"),Ne=w("/img/brands/icons/mcp.svg"),Pe={name:"SettingsAPI",setup(){pe({title:"API Settings"}),ye({title:"API Settings",links:[{label:"Postpone API",description:"Create scripts and automations using the Postpone API.",url:"/scheduling/automation/postpone-api",icon:"code"},{label:"API Access",description:"Create and manage API keys for programmatic access.",url:"/account-and-billing/account/api-access",icon:"key"}]})},data(){return{activeTab:0,isLoading:!0,isCreating:!1,apiKeys:[],newKeyName:"",newKeyExpiration:"never",newlyCreatedKey:null,revokingKeyId:null,deletingKeyId:null,showCreateModal:!1,isLoadingApps:!0,authorizedApps:[],revokingAppId:null}},computed:{...se(oe,["profile","hasConfirmedEmail"]),defaultKeyName(){return`API Key #${this.apiKeys.length+1}`},sortedApiKeys(){return[...this.apiKeys].sort((i,e)=>i.isRevoked===e.isRevoked?0:i.isRevoked?1:-1)}},methods:{formatDate:te,focusNameInput(){this.$refs.nameInput?.focus()},getExpirationDate(){switch(this.newKeyExpiration){case"30days":return T().add(30,"days").endOf("day").toISOString();case"6months":return T().add(6,"months").endOf("day").toISOString();case"1year":return T().add(1,"year").endOf("day").toISOString();default:return null}},async fetchApiKeys(){this.isLoading=!0;try{const i=await this.$apollo.query({query:E,fetchPolicy:"network-only"});this.apiKeys=i.data.apiKeys||[]}
51catch{this.$buefy.toast.open({message:"Failed to load API keys",type:"is-danger"})}finally{this.isLoading=!1}},async fetchAuthorizedApps(){this.isLoadingApps=!0;try{const i=await this.$apollo.query({query:D,fetchPolicy:"network-only"});this.authorizedApps=i.data.authorizedApps||[]}catch{this.$buefy.toast.open({message:"Failed to load authorized apps",type:"is-danger"})}finally{this.isLoadingApps=!1}},async onCreateKey(){this.isCreating=!0;try{const i=await this.$apollo.mutate({mutation:de,variables:{name:this.newKeyName.trim()||this.defaultKeyName,expiresAt:this.getExpirationDate()}});if(i.data.createApiKey.success)this.newlyCreatedKey=i.data.createApiKey.apiKey,this.newKeyName="",this.newKeyExpiration="never",this.showCreateModal=!1,await this.fetchApiKeys(),this.$buefy.toast.open({message:"API key created successfully",type:"is-success"});else{const e=i.data.createApiKey.errors?.[0]?.message||"Failed to create API key";this.$buefy.toast.open({message:e,type:"is-danger"})}}catch{this.$buefy.toast.open({message:"Failed to create API key",type:"is-danger"})}finally{this.isCreating=!1}},async onRevokeKey(i){this.$buefy.dialog.confirm({title:"Revoke API Key",message:`Are you sure you want to revoke the API key "<strong>${i.name}</strong>"? Any integrations using this key will stop working immediately.`,confirmText:"Revoke Key",type:"is-danger",hasIcon:!0,onConfirm:async()=>{this.revokingKeyId=i.id;try{const e=await this.$apollo.mutate({mutation:F,variables:{id:i.id}});if(e.data.revokeApiKey.success)await this.fetchApiKeys(),this.$buefy.toast.open({message:"API key revoked",type:"is-success"});else{const n=e.data.revokeApiKey.errors?.[0]?.message||"Failed to revoke API key";this.$buefy.toast.open({message:n,type:"is-danger"})}}catch{this.$buefy.toast.open({message:"Failed to revoke API key",type:"is-danger"})}finally{this.revokingKeyId=null}}})},async onDeleteKey(i){this.$buefy.dialog.confirm({title:"Delete API Key",message:`Are you sure you want to permanently delete the API key "<strong>${i.name}</strong>"?`,confirmText:"Delete Key",type:"is-danger",hasIcon:!0,onConfirm:async()=>{this.deletingKeyId=i.id;try{const e=await this.$apollo.mutate({mutation:R,variables:{id:i.id}});if(e.data.deleteApiKey.success)await this.fetchApiKeys(),this.$buefy.toast.open({message:"API key deleted",type:"is-success"});else{const n=e.data.deleteApiKey.errors?.[0]?.message||"Failed to delete API key";this.$buefy.toast.open({message:n,type:"is-danger"})}}catch{this.$buefy.toast.open({message:"Failed to delete API key",type:"is-danger"})}finally{this.deletingKeyId=null}}})},async onRevokeApp(i){this.$buefy.dialog.confirm({title:"Revoke Access",message:`Are you sure you want to revoke access for "<strong>${i.name}</strong>"? The app will immediately lose access to your Postpone account.`,confirmText:"Revoke Access",type:"is-danger",hasIcon:!0,onConfirm:async()=>{this.revokingAppId=i.id;try{const e=await this.$apollo.mutate({mutation:z,variables:{applicationId:i.id}});if(e.data.revokeAuthorizedApp.success)await this.fetchAuthorizedApps(),this.$buefy.toast.open({message:"Access revoked",type:"is-success"});else{const n=e.data.revokeAuthorizedApp.errors?.[0]?.message||"Failed to revoke access";this.$buefy.toast.open({message:n,type:"is-danger"})}}catch{this.$buefy.toast.open({message:"Failed to revoke access",type:"is-danger"})}finally{this.revokingAppId=null}}})},copyToClipboard(i){le(i,"API key copied to clipboard")}},mounted(){if(!this.profile?.account?.hasApiAccess){this.$router.push("/settings");return}this.fetchApiKeys(),this.fetchAuthorizedApps()}},Ce={class:"is-flex is-align-items-center is-flex-gap-small u-mb3"},Ee={key:1,class:"card u-mb4"},De={class:"card-content"},Fe={class:"subtitle is-5 has-text-weight-semibold u-mb2"},Re={class:"control"},ze={class:"is-flex is-justify-content-space-between is-align-items-center u-mb3"},Ve={key:0,class:"has-text-grey"},_e={class:"is-size-7"},Te={key:0},Oe={key:1,class:"has-text-grey"},$e={key:0},Le={key:1,class:"has-text-grey"},Me={class:"card u-mt4"},qe={class:"card-content"},Ue={key:0,class:"is-flex is-align-items-center is-flex-wrap-wrap is-flex-gap-xs"},Qe={key:1,class:"has-text-grey"},Ge={key:0},Be={key:1,class:"has-text-grey"},Ye={class:"modal-card"},He={class:"modal-card-head"},We={class:"modal-card-body"},je={class:"modal-card-foot is-flex is-align-items-center is-justify-content-space-between"};function Xe(i,e,n,a,s,r){const g=ie,d=y("b-message"),f=y("b-icon"),p=y("b-input"),b=ae,V=y("b-field"),U=y("b-loading"),_=y("b-tag"),k=y("b-table-column"),Q=y("b-table"),G=y("b-tab-item"),X=re,Z=y("b-tabs"),J=y("b-select"),ee=y("b-modal");return c(),v("div",null,[l("header",Ce,[e[10]||(e[10]=l("h2",{class:"subtitle has-text-fraunces is-3 u-mb0"},"API Settings",-1)),e[11]||(e[11]=t()),m(g)]),e[66]||(e[66]=t()),m(Z,{modelValue:s.activeTab,"onUpdate:modelValue":e[3]||(e[3]=o=>s.activeTab=o),class:"api-tabs"},{default:u(()=>[m(G,{label:"API Keys"},{default:u(()=>[e[44]||(e[44]=l("p",{class:"u-mb3"},[t(` 52 Manage your API keys. Read 53 `),l("a",{href:"https://developers.postpone.app",target:"_blank"},` 54 Postpone's API documentation 55 `),t(` 56 to get started. 57 `)],-1)),e[45]||(e[45]=t()),i.hasConfirmedEmail?K("",!0):(c(),A(d,{key:0,t
57ype:"is-warning",class:"u-mb3"},{default:u(()=>[...e[12]||(e[12]=[t(` 58 A confirmed email address is required to create API keys. 59 `,-1)])]),_:1})),e[46]||(e[46]=t()),s.newlyCreatedKey?(c(),v("div",Ee,[l("div",De,[l("h3",Fe,[m(f,{icon:"check-circle",pack:"far",type:"is-success"}),e[13]||(e[13]=t(` 60 API Key Created 61 `,-1))]),e[18]||(e[18]=t()),m(d,{type:"is-warning",class:"u-mb2"},{default:u(()=>[...e[14]||(e[14]=[l("strong",null,"Please copy the key now.",-1),t(` This is the only time 62 you will see this key. If you lose it, you will need to create a 63 new one. 64 `,-1)])]),_:1}),e[19]||(e[19]=t()),m(V,{label:s.newlyCreatedKey.name,message:s.newlyCreatedKey.expiresAt?`Expires: ${r.formatDate(s.newlyCreatedKey.expiresAt)}`:null},{default:u(()=>[m(p,{modelValue:s.newlyCreatedKey.key,readonly:"",disabled:"",expanded:""},null,8,["modelValue"]),e[16]||(e[16]=t()),l("p",Re,[m(b,{"icon-left":"copy",type:"is-primary",onClick:e[0]||(e[0]=o=>r.copyToClipboard(s.newlyCreatedKey.key))},{default:u(()=>[...e[15]||(e[15]=[t(` 65 Copy 66 `,-1)])]),_:1})])]),_:1},8,["label","message"]),e[20]||(e[20]=t()),m(b,{size:"is-small",class:"u-mt2",onClick:e[1]||(e[1]=o=>s.newlyCreatedKey=null)},{default:u(()=>[...e[17]||(e[17]=[t(` 67 Dismiss 68 `,-1)])]),_:1})])])):K("",!0),e[47]||(e[47]=t()),l("div",null,[l("div",ze,[e[22]||(e[22]=l("h3",{class:"subtitle is-5 has-text-weight-semibold u-mb0"},` 69 Your API Keys 70 `,-1)),e[23]||(e[23]=t()),m(b,{type:"is-primary","icon-left":"plus","icon-pack":"far",disabled:!i.hasConfirmedEmail,onClick:e[2]||(e[2]=o=>s.showCreateModal=!0)},{default:u(()=>[...e[21]||(e[21]=[t(` 71 Create API Key 72 `,-1)])]),_:1},8,["disabled"])]),e[35]||(e[35]=t()),m(U,{"is-full-page":!1,active:s.isLoading},null,8,["active"]),e[36]||(e[36]=t()),!s.isLoading&&s.apiKeys.length===0?(c(),v("div",Ve,[...e[24]||(e[24]=[l("p",null,"No API keys yet. Create one to get started.",-1)])])):s.isLoading?K("",!0):(c(),A(Q,{key:1,data:r.sortedApiKeys,"mobile-cards":!0,paginated:r.sortedApiKeys.length>10,"per-page":10,"pagination-simple":"","aria-next-label":"Next page","aria-previous-label":"Previous page","aria-page-label":"Page","aria-current-label":"Current page"},{default:u(()=>[m(k,{field:"name",label:"Name"},{default:u(o=>[l("span",{class:ue({"has-text-grey":!o.row.isActive})},h(o.row.name),3),e[27]||(e[27]=t()),o.row.isRevoked?(c(),A(_,{key:0,type:"is-danger is-light",size:"is-small",class:"u-ml1"},{default:u(()=>[...e[25]||(e[25]=[t(` 73 Revoked 74 `,-1)])]),_:1})):o.row.isExpired?(c(),A(_,{key:1,type:"is-warning is-light",size:"is-small",class:"u-ml1"},{default:u(()=>[...e[26]||(e[26]=[t(` 75 Expired 76 `,-1)])]),_:1})):K("",!0)]),_:1}),e[30]||(e[30]=t()),m(k,{field:"keyPreview",label:"Key"},{default:u(o=>[l("code",_e,h(o.row.keyPreview),1)]),_:1}),e[31]||(e[31]=t()),m(k,{field:"createdAt",label:"Created"},{default:u(o=>[t(h(r.formatDate(o.row.createdAt)),1)]),_:1}),e[32]||(e[32]=t()),m(k,{field:"expiresAt",label:"Expires"},{default:u(o=>[o.row.expiresAt?(c(),v("span",Te,h(r.formatDate(o.row.expiresAt)),1)):(c(),v("span",Oe,"Never"))]),_:1}),e[33]||(e[33]=t()),m(k,{field:"lastUsedAt",label:"Last Used"},{default:u(o=>[o.row.lastUsedAt?(c(),v("span",$e,h(r.formatDate(o.row.lastUsedAt)),1)):(c(),v("span",Le,"Never"))]),_:1}),e[34]||(e[34]=t()),m(k,{width:"120"},{default:u(o=>[o.row.isActive?(c(),A(b,{key:0,size:"is-small","icon-left":"ban",onClick:S=>r.onRevokeKey(o.row),loading:s.revokingKeyId===o.row.id},{default:u(()=>[...e[28]||(e[28]=[t(` 77 Revoke 78 `,-1)])]),_:1},8,["onClick","loading"])):(c(),A(b,{key:1,size:"is-small","icon-left":"trash",onClick:S=>r.onDeleteKey(o.row),loading:s.deletingKeyId===o.row.id},{default:u(()=>[...e[29]||(e[29]=[t(` 79 Delete 80 `,-1)])]),_:1},8,["onClick","loading"]))]),_:1})]),_:1},8,["data","paginated"]))]),e[48]||(e[48]=t()),l("div",Me,[l("div",qe,[e[38]||(e[38]=l("h3",{class:"subtitle is-5 has-text-weight-semibold u-mb1"},` 81 Postpone MCP support is here! 82 `,-1)),e[39]||(e[39]=t()),e[40]||(e[40]=l("p",{class:"u-mb3"},` 83 Use your API key to create, schedule, and manage posts from 84 Claude, ChatGPT, Cursor, Perplexity, Grok, and any MCP-compatible 85 client. 86 `,-1)),e[41]||(e[41]=t()),e[42]||(e[42]=l("div",{class:"is-flex is-align-items-center is-flex-gap-small u-mb3"},[l("figure",{class:"image is-24x24"},[l("img",{src:he,alt:"Claude"})]),t(),l("figure",{class:"image is-24x24"},[l("img",{src:we,alt:"ChatGPT"})]),t(),l("figure",{class:"image is-24x24"},[l("img",{src:Se,alt:"Cursor"})]),t(),l("figure",{class:"image is-24x24"},[l("img",{src:Ke,alt:"Perplexity"})]),t(),l("figure",{class:"image is-24x24"},[l("img",{src:Ie,alt:"Grok"})]),t(),l("figure",{class:"image is-24x24"},[l("img",{src:xe,alt:"n8n"})]),t(),l("figure",{class:"image is-24x24"},[l("img",{src:Ne,alt:"MCP"})])],-1)),e[43]||(e[43]=t()),m(b,{"icon-right":"arrow-right","icon-pack":"far",tag:"router-link",to:"/settings/mcp",class:"has-text-primary"},{default:u(()=>
86[...e[37]||(e[37]=[t(` 87 Set up AI Agents & MCP 88 `,-1)])]),_:1})])])]),_:1}),e[56]||(e[56]=t()),m(G,{label:"Authorized Apps"},{default:u(()=>[e[53]||(e[53]=l("p",{class:"u-mb3"},` 89 Third-party apps you've authorized to access your Postpone account. 90 Revoking an app immediately removes its access. 91 `,-1)),e[54]||(e[54]=t()),m(U,{"is-full-page":!1,active:s.isLoadingApps},null,8,["active"]),e[55]||(e[55]=t()),!s.isLoadingApps&&s.authorizedApps.length===0?(c(),A(X,{key:0,heading:"No Authorized Apps",text:"You haven't authorized any apps to access your account. When you connect Postpone to a third-party app, it will appear here.",icon:"shield-check"})):s.isLoadingApps?K("",!0):(c(),A(Q,{key:1,data:s.authorizedApps,"mobile-cards":!0,paginated:s.authorizedApps.length>10,"per-page":10,"pagination-simple":"","aria-next-label":"Next page","aria-previous-label":"Previous page","aria-page-label":"Page","aria-current-label":"Current page"},{default:u(()=>[m(k,{field:"name",label:"App","cell-class":"is-vcentered"},{default:u(o=>[t(h(o.row.name),1)]),_:1}),e[50]||(e[50]=t()),m(k,{field:"scopes",label:"Permissions","cell-class":"is-vcentered"},{default:u(o=>[o.row.scopes&&o.row.scopes.length?(c(),v("span",Ue,[(c(!0),v(me,null,fe(o.row.scopes,S=>(c(),A(_,{key:S,size:"is-small"},{default:u(()=>[t(h(S),1)]),_:2},1024))),128))])):(c(),v("span",Qe,"â"))]),_:1}),e[51]||(e[51]=t()),m(k,{field:"authorizedAt",label:"Authorized","cell-class":"is-vcentered"},{default:u(o=>[o.row.authorizedAt?(c(),v("span",Ge,h(r.formatDate(o.row.authorizedAt)),1)):(c(),v("span",Be,"â"))]),_:1}),e[52]||(e[52]=t()),m(k,{"cell-class":"is-vcentered",width:"120"},{default:u(o=>[m(b,{size:"is-small","icon-left":"ban",onClick:S=>r.onRevokeApp(o.row),loading:s.revokingAppId===o.row.id},{default:u(()=>[...e[49]||(e[49]=[t(` 92 Revoke 93 `,-1)])]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["data","paginated"]))]),_:1})]),_:1},8,["modelValue"]),e[67]||(e[67]=t()),m(ee,{modelValue:s.showCreateModal,"onUpdate:modelValue":e[9]||(e[9]=o=>s.showCreateModal=o),"has-modal-card":"","trap-focus":"","aria-role":"dialog","aria-modal":"",onAfterEnter:r.focusNameInput},{default:u(()=>[l("div",Ye,[l("header",He,[e[57]||(e[57]=l("p",{class:"modal-card-title"},"Create an API Key",-1)),e[58]||(e[58]=t()),l("button",{type:"button",class:"delete",onClick:e[4]||(e[4]=o=>s.showCreateModal=!1)})]),e[64]||(e[64]=t()),l("section",We,[l("form",{id:"create-api-key-form",onSubmit:e[7]||(e[7]=ce((...o)=>r.onCreateKey&&r.onCreateKey(...o),["prevent"]))},[m(V,{label:"Name"},{default:u(()=>[m(p,{ref:"nameInput",modelValue:s.newKeyName,"onUpdate:modelValue":e[5]||(e[5]=o=>s.newKeyName=o),placeholder:r.defaultKeyName,maxlength:"100","has-counter":s.newKeyName.length>=70},null,8,["modelValue","placeholder","has-counter"])]),_:1}),e[60]||(e[60]=t()),m(V,{label:"Expiration",style:{width:"20rem"}},{default:u(()=>[m(J,{modelValue:s.newKeyExpiration,"onUpdate:modelValue":e[6]||(e[6]=o=>s.newKeyExpiration=o),expanded:""},{default:u(()=>[...e[59]||(e[59]=[l("option",{value:"never"},"Never",-1),t(),l("option",{value:"30days"},"30 days",-1),t(),l("option",{value:"6months"},"6 months",-1),t(),l("option",{value:"1year"},"1 year",-1)])]),_:1},8,["modelValue"])]),_:1})],32)]),e[65]||(e[65]=t()),l("footer",je,[m(b,{type:"is-primary","native-type":"submit",form:"create-api-key-form",loading:s.isCreating},{default:u(()=>[...e[61]||(e[61]=[t(` 94 Create API Key 95 `,-1)])]),_:1},8,["loading"]),e[63]||(e[63]=t()),m(b,{onClick:e[8]||(e[8]=o=>s.showCreateModal=!1)},{default:u(()=>[...e[62]||(e[62]=[t(" Cancel ",-1)])]),_:1})])])]),_:1},8,["modelValue","onAfterEnter"])])}const ui=ne(Pe,[["render",Xe],["__scopeId","data-v-8a67662b"]]);export{ui as default};
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.