(this.webpackJsonp=this.webpackJsonp||[]).push([["main","5bc462ce","85a2dfb8","d0586073","28d36ba3","300c5ed8"],{"++os":function(e,t,n){"use strict";var i=n("ZfjD"),r=n("C9fy"),a=n("PCyZ").remove;i({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=r(this),n=!0,i=0,o=arguments.length;i0;){var l=s;s=new Set,l.forEach((function(e){r.has(e)||(r.add(e),(a[e]||new Set).forEach((function(e){s.add(e)})))}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(i,"getUserAgentFlows")},"+602":function(e,t,n){"use strict";var i=n("Iwu2"),r=String;e.exports=function(e){if("Symbol"===i(e))throw new TypeError("Cannot convert a Symbol value to a string");return r(e)}},"+78e":function(e,t,n){"use strict";var i=n("ejl/");e.exports=function(e,t){for(var n=i(e),r=new t(n),a=0;a"string"==typeof e)));var t}var w=n("Pyw5"),S=n.n(w);const O={name:"DuoChatContextItemPopover",components:{GlBadge:h.a,GlTruncate:f.a,GlAlert:m.a,GlIcon:r.a,GlPopover:g.a},props:{contextItem:{type:Object,required:!0},target:{type:String,required:!0},placement:{type:String,default:"bottom",required:!1}},computed:{filePath(){return this.contextItem.category===v?this.contextItem.metadata.relativePath||"":null},filePathArray(){var e;return null===(e=this.filePath)||void 0===e?void 0:e.split("/")},isEnabled(){return!1!==this.contextItem.metadata.enabled},disabledMessage(){return Array.isArray(this.contextItem.metadata.disabledReasons)&&this.contextItem.metadata.disabledReasons.length>0?this.contextItem.metadata.disabledReasons.join(", "):Object(i.b)("DuoChatContextItemPopover.DisabledReason","This item is disabled")},itemSource(){return(e=this.contextItem).metadata.repositoryName||e.metadata.project||null;var e}},methods:{translate:i.b}};var C=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("gl-popover",{attrs:{target:e.target,triggers:"hover focus",placement:e.placement,title:e.contextItem.metadata.title,"custom-class":"duo-chat-item-popover"},scopedSlots:e._u([{key:"title",fn:function(){return[n("div",[n("div",{staticClass:"gl-heading-3 gl-mb-1 gl-mt-2 gl-leading-1",attrs:{"data-testid":"chat-context-popover-title"}},[e._v("\n "+e._s(e.contextItem.metadata.title)+"\n ")]),e._v(" "),e.contextItem.metadata.subTypeLabel?n("div",{staticClass:"gl-flex gl-items-center gl-font-normal gl-text-subtle"},[n("gl-truncate",{staticClass:"gl-min-w-0",attrs:{text:e.contextItem.metadata.subTypeLabel}})],1):e._e()])]},proxy:!0}])},[e._v(" "),n("div",[e.itemSource?n("gl-badge",{staticClass:"gl-w-full"},[n("gl-truncate",{attrs:{text:e.itemSource,position:"middle"}})],1):e._e(),e._v(" "),e.contextItem.metadata.secondaryText?n("div",{staticClass:"gl-flex gl-items-center"},[n("gl-icon",{staticClass:"gl-mr-1 gl-shrink-0",attrs:{name:e.contextItem.metadata.icon,size:12,variant:"subtle"}}),e._v(" "),n("gl-truncate",{staticClass:"gl-flex-2 gl-min-w-[33%]",attrs:{text:e.contextItem.metadata.secondaryText,position:"middle"}})],1):e.filePath?n("div",[n("gl-icon",{attrs:{name:"document",size:12,variant:"subtle"}}),e._v(" "),n("span",{staticClass:"gl-break-all"},[e._v(e._s(e.contextItem.metadata.project))]),e._v(" "),e._l(e.filePathArray,(function(t,i){return n("span",{key:t,staticClass:"gl-break-all"},[e._v(e._s(t)+e._s(i+1e=>{e.classList.add("duo-chat-markdown","duo-chat-compact-markdown")}}},props:{contextItem:{type:Object,required:!0,validator:k}},data:()=>({contentErrorIsVisible:!1}),computed:{isLoadingContent(){return void 0===this.contextItem.content},languageIdentifierClass(){var e,t,n;if(this.contextItem.category===b)return"language-diff";const i=null===(e=this.contextItem.metadata)||void 0===e||null===(t=e.relativePath)||void 0===t?void 0:t.split(".").at(-1);return i&&i!==(null===(n=this.contextItem.metadata)||void 0===n?void 0:n.relativePath)?"language-"+i:"language-plaintext"},title(){var e,t;return(null===(e=this.contextItem.metadata)||void 0===e?void 0:e.title)||(null===(t=this.contextItem.metadata)||void 0===t?void 0:t.relativePath)||Object(i.b)("DuoChatContextItemDetailsModal.title","Preview")},isDependencies(){return this.contextItem.category===y}},watch:{contextItem:{async handler(e,t){if(e.category===y)return;!(null!=e&&e.content)||(null==e?void 0:e.content)===(null==t?void 0:t.content)||(await Object(D.nextTick)(),await this.hydrateContentWithGFM())},immediate:!0}},methods:{async hydrateContentWithGFM(){await Object(D.nextTick)(),this.$refs.content&&this.renderGFM(this.$refs.content)},parseDependencies(){if(this.contextItem.category!==y)return null;if(!this.contextItem.content)return null;try{return JSON.parse(this.contextItem.content)}catch(e){return this.contentErrorIsVisible=!0,{}}},onModalVisibilityChange(e){e||this.$emit("close")}},CONTENT_ERROR_MESSAGE:Object(i.b)("DuoChatContextItemDetailsModal.contentErrorMessage","Item content could not be displayed.")};var E=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("gl-modal",{attrs:{"modal-id":"context-item-details-modal",title:e.title,visible:!0,scrollable:!0,"hide-footer":"",size:"lg"},on:{change:e.onModalVisibilityChange}},[e.isLoadingContent?n("gl-skeleton-loader"):e.contentErrorIsVisible?n("gl-alert",{attrs:{variant:"danger",dismissible:!1,"data-testid":"content-error-alert"}},[e._v("\n "+e._s(e.$options.CONTENT_ERROR_MESSAGE)+"\n ")]):e.isDependencies?n("div",{attrs:{"data-testid":"context-item-content"}},[n("p",[e._v("Project dependencies from "+e._s(e.contextItem.metadata.secondaryText))]),e._v(" "),e._l(e.parseDependencies(),(function(t,i){return n("div",{key:i},e._l(t,(function(t,i){return n("div",{key:i},[n("h3",{staticClass:"gl-heading-4 gl-mb-2"},[e._v(e._s(i))]),e._v(" "),n("ul",{staticClass:"gl-pl-6"},e._l(t,(function(t){return n("li",{key:t},[e._v("\n "+e._s(t)+"\n ")])})),0)])})),0)}))],2):n("div",{ref:"content",attrs:{"data-testid":"context-item-content"}},[n("pre",{directives:[{name:"safe-html",rawName:"v-safe-html",value:e.contextItem.content,expression:"contextItem.content"}],staticClass:"code js-syntax-highlight gl-p-3",class:e.languageIdentifierClass})])],1)},staticRenderFns:[]},void 0,x,void 0,!1,void 0,!1,void 0,void 0,void 0);const I={name:"DuoChatContextItemSelections",components:{GlTruncate:f.a,DuoChatContextItemDetailsModal:E,GlIcon:r.a,DuoChatContextItemPopover:C,GlToken:p.a},props:{selections:{type:Array,required:!0,validator:function(e){return Array.isArray(e)&&e.every(e=>k(e))}},title:{type:String,required:!0},defaultCollapsed:{type:Boolean,required:!0},removable:{type:Boolean,required:!1,default:!1},variant:{type:String,required:!1,default:"assistant"}},data(){return{isCollapsed:this.defaultCollapsed,selectionsId:Object(d.a)(),previewContextItemId:null}},computed:{collapseIconName(){return this.isCollapsed?"chevron-right":"chevron-down"},variantClasses(){return"user"===this.variant?"gl-pl-4 gl-text-blue-700":"gl-text-gray-500"},tokenVariantClasses(){return"user"===this.variant?"gl-bg-blue-50 gl-text-blue-600":""},contextItemPreview(){return this.selections.find(e=>e.id===this.previewContextItemId)}},methods:{toggleCollapse(){this.isCollapsed=!this.isCollapsed},onRemoveItem(e){this.$emit("remove",e)},onOpenItem(e,t){"keydown"===e.type&&e.target!==e.currentTarget||this.canOpen(t)&&(void 0===t.content&&this.$emit("get-content",t),this.previewContextItemId=t.id)},canOpen:e=>[b,v,y,_].includes(e.category),onClosePreview(){this.previewContextItemId=null}}};var A=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"gl-flex gl-flex-col",class:e.variantClasses},[n("button",{staticClass:"gl-flex gl-w-full gl-items-center gl-border-0 gl-bg-transparent gl-p-0 gl-text-left gl-text-xs gl-lowercase gl-text-inherit",attrs:{"data-testid":"chat-context-selections-title",type:"button"},on:{click:e.toggleCollapse}},[e._v("\n "+e._s(e.title)+" "),n("gl-icon",{attrs:{name:e.collapseIconName,"data-testid":"chat-context-collapse-icon"}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.isCollapsed,expression:"!isCollapsed"}],staticClass:"gl-mt-1 gl-flex gl-grow gl-flex-wrap",attrs:{"data-testid":"chat-context-tokens-wrapper"}},e._l(e.selections,(function(t){return n("gl-token",{key:t.id,staticClass:"gl-mb-2 gl-mr-2 gl-max-w-full",class:e.tokenVariantClasses,attrs:{"view-only":!e.removable,variant:"default",tabindex:e.canOpen(t)?0:-1,role:e.canOpen(t)?"button":void 0},on:{click:function(n){return e.onOpenItem(n,t)},keydown:[function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.onOpenItem(n,t)},function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:(n.preventDefault(),e.onOpenItem(n,t))}],close:function(n){return e.onRemoveItem(t)}}},[n("div",{staticClass:"gl-flex gl-min-w-0 gl-items-center"},[t.metadata.icon?n("gl-icon",{staticClass:"gl-mr-1",attrs:{name:t.metadata.icon,size:12}}):e._e(),e._v(" "),n("gl-truncate",{attrs:{id:"context-item-"+t.id+"-"+e.selectionsId+"-title",text:t.metadata.title,position:"middle"}})],1),e._v(" "),n("duo-chat-context-item-popover",{attrs:{"context-item":t,target:"context-item-"+t.id+"-"+e.selectionsId+"-title",placement:"bottom"},on:{"show-git-diff":function(n){return e.onOpenItem(t)}}})],1)})),1),e._v(" "),e.contextItemPreview?n("duo-chat-context-item-details-modal",{attrs:{"context-item":e.contextItemPreview},on:{close:e.onClosePreview}}):e._e()],1)},staticRenderFns:[]},void 0,I,void 0,!1,void 0,!1,void 0,void 0,void 0),N=n("AzHU"),F=n("Jx7q");const P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return Object(c.c)("DuoChatMessageSources.messageSources","Source","Sources")(e)};const L={name:"DuoChatMessageSources",components:{GlLink:F.a},props:{sources:{type:Array,required:!0}},computed:{sourceLabel(){return P(this.sources.length)}},methods:{getSourceTitle(e){let{title:t,source_type:n,stage:i,group:r,date:a,author:o}=e;return t||(n===N.h.DOC.value&&i&&r?`${i} / ${r}`:n===N.h.BLOG.value&&a&&o?`${a} / ${o}`:this.sourceLabel)},getLinkTarget(e){if(e&&"string"==typeof e)try{const{hostname:t}=new URL(e);return t!==window.location.hostname?"_blank":null}catch(e){return null}return null}}};var R=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"gl-mr-3 gl-mt-4 gl-text-subtle",attrs:{"data-testid":"duo-chat-message-sources"}},[e.sources.length?n("span",[e._v(e._s(e.sourceLabel)+":")]):e._e(),e._v(" "),n("ul",{staticClass:"gl-m-0 gl-list-none gl-p-0 gl-pt-2"},e._l(e.sources,(function(t,i){return n("li",{key:i,staticClass:"gl-flex gl-items-center gl-pt-1",attrs:{"data-testid":"source-list-item"}},[n("gl-link",{staticClass:"gl-text-sm",attrs:{href:t.source_url,target:e.getLinkTarget(t.source_url),"show-external-icon":"",variant:"inline"}},[e._v("\n "+e._s(e.getSourceTitle(t))+"\n ")])],1)})),0)])},staticRenderFns:[]},void 0,L,void 0,!1,void 0,!1,void 0,void 0,void 0),M=n("6/kH");const B={name:"AgenticBinaryFeedback",i18n:{THANKS:Object(c.b)("AgenticBinaryFeedback.thanks","Thanks for the feedback!"),THUMBS_UP:Object(c.b)("AgenticBinaryFeedback.thumbsUp","Helpful"),THUMBS_DOWN:Object(c.b)("AgenticBinaryFeedback.thumbsDown","Not helpful")},components:{GlButton:o.a,GlIcon:r.a},directives:{GlTooltip:l.a},props:{feedbackChoice:{type:String,required:!1,default:null,validator:e=>null===e||["thumbs_up","thumbs_down"].includes(e)},submitted:{type:Boolean,required:!1,default:!1}},computed:{isThumbsUp(){return"thumbs_up"===this.feedbackChoice},isThumbsDown(){return"thumbs_down"===this.feedbackChoice},showButtons(){return!this.feedbackChoice&&!this.submitted},showSelectedIcon(){return this.feedbackChoice&&!this.submitted}},methods:{selectFeedbackType(e){this.$emit("select-type",e)}}};var q=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"agentic-binary-feedback gl-flex gl-items-center gl-gap-2"},[e.showButtons?[n("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{title:e.$options.i18n.THUMBS_UP,"aria-label":e.$options.i18n.THUMBS_UP,icon:"thumb-up",category:"tertiary",size:"small","data-testid":"thumb-up-button"},on:{click:function(t){return e.selectFeedbackType("thumbs_up")}}}),e._v(" "),n("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{title:e.$options.i18n.THUMBS_DOWN,"aria-label":e.$options.i18n.THUMBS_DOWN,icon:"thumb-down",category:"tertiary",size:"small","data-testid":"thumb-down-button"},on:{click:function(t){return e.selectFeedbackType("thumbs_down")}}})]:e.showSelectedIcon?n("div",{staticClass:"gl-flex gl-h-6 gl-items-center"},[n("gl-icon",{class:e.isThumbsUp?"gl-text-success":"gl-text-danger",attrs:{name:e.isThumbsUp?"thumb-up":"thumb-down",size:16,"data-testid":"selected-thumb-icon"}})],1):e.submitted?n("div",{staticClass:"gl-relative gl-flex gl-items-center gl-gap-2",attrs:{"data-testid":"feedback-given"}},[n("div",{staticClass:"feedback-colored-icon",attrs:{"data-testid":"feedback-colored-icon"}},[e.isThumbsUp?n("gl-icon",{staticClass:"gl-text-success",attrs:{name:"thumb-up",size:16,"data-testid":"thumb-up-icon-success"}}):e.isThumbsDown?n("gl-icon",{staticClass:"gl-text-danger",attrs:{name:"thumb-down",size:16,"data-testid":"thumb-down-icon-danger"}}):e._e()],1),e._v(" "),n("div",{staticClass:"feedback-thanks gl-m-l-0 gl-w-0 gl-overflow-hidden gl-whitespace-nowrap gl-opacity-0",attrs:{"data-testid":"feedback-thanks"}},[n("gl-icon",{staticClass:"gl-text-success",attrs:{name:"check-xs",size:16,"data-testid":"check-icon"}}),e._v(" "),n("span",{staticClass:"gl-text-sm gl-text-subtle"},[e._v(e._s(e.$options.i18n.THANKS))])],1)]):e._e()],2)},staticRenderFns:[]},void 0,B,void 0,!1,void 0,!1,void 0,void 0,void 0),$=n("HuCl"),V=n("nrbW");const U={TELL_US_MORE:Object(c.b)("AgenticBinaryFeedback.tellUsMore","Tell us more"),SUBMIT:Object(c.b)("AgenticBinaryFeedback.submit","Submit"),BACK:Object(c.b)("AgenticBinaryFeedback.back","Back"),CLOSE:Object(c.b)("AgenticBinaryFeedback.close","Close"),FEEDBACK_PLACEHOLDER:Object(c.b)("AgenticBinaryFeedback.placeholder","Share your feedback..."),THUMBS_UP_HEADER:Object(c.b)("AgenticBinaryFeedback.thumbsUpHeader","What made this helpful?"),THUMBS_DOWN_HEADER:Object(c.b)("AgenticBinaryFeedback.thumbsDownHeader","What would have been more helpful?"),TOO_GENERIC:Object(c.b)("AgenticBinaryFeedback.tooGeneric","Too generic"),MISSING_STEPS:Object(c.b)("AgenticBinaryFeedback.missingSteps","Missing steps"),WRONG_CONTEXT:Object(c.b)("AgenticBinaryFeedback.wrongContext","Wrong context"),OUTDATED_INCORRECT:Object(c.b)("AgenticBinaryFeedback.outdatedIncorrect","Outdated/incorrect"),SOLVED_PROBLEM:Object(c.b)("AgenticBinaryFeedback.solvedProblem","Solved my problem"),SAVED_TIME:Object(c.b)("AgenticBinaryFeedback.savedTime","Saved me time"),GOOD_EXAMPLES:Object(c.b)("AgenticBinaryFeedback.goodExamples","Good examples"),ACCURATE_INFO:Object(c.b)("AgenticBinaryFeedback.accurateInfo","Accurate information")},G="reason_list",W="tell_us_more";const z={name:"AgenticFeedbackPanel",i18n:U,thumbsUpReasons:[{key:"solved_problem",label:U.SOLVED_PROBLEM},{key:"saved_time",label:U.SAVED_TIME},{key:"good_examples",label:U.GOOD_EXAMPLES},{key:"accurate_info",label:U.ACCURATE_INFO},{key:"tell_us_more",label:U.TELL_US_MORE,isCustom:!0}],thumbsDownReasons:[{key:"too_generic",label:U.TOO_GENERIC},{key:"missing_steps",label:U.MISSING_STEPS},{key:"wrong_context",label:U.WRONG_CONTEXT},{key:"outdated_incorrect",label:U.OUTDATED_INCORRECT},{key:"tell_us_more",label:U.TELL_US_MORE,isCustom:!0}],components:{GlButton:o.a,GlFormTextarea:$.a,GlForm:V.a},props:{feedbackType:{type:String,required:!0,validator:e=>["thumbs_up","thumbs_down"].includes(e)}},data:()=>({panelView:G,customFeedback:""}),computed:{isThumbsUp(){return"thumbs_up"===this.feedbackType},reasonOptions(){return this.isThumbsUp?this.$options.thumbsUpReasons:this.$options.thumbsDownReasons},reasonHeader(){return this.isThumbsUp?this.$options.i18n.THUMBS_UP_HEADER:this.$options.i18n.THUMBS_DOWN_HEADER},isOverCharacterLimit(){return this.customFeedback.length>140},trimmedFeedback(){return this.customFeedback.trim()},isTextareaValid(){return 0===this.trimmedFeedback.length?null:!this.isOverCharacterLimit},canSubmitCustomFeedback(){return this.trimmedFeedback.length>0&&!this.isOverCharacterLimit},characterCountText(){const e=140-this.customFeedback.length;if(e>=0)return 1===e?e+" character remaining":e+" characters remaining";const t=Math.abs(e);return 1===t?t+" character over limit":t+" characters over limit"},isReasonListVisible(){return this.panelView===G},isTellUsMoreVisible(){return this.panelView===W}},methods:{selectReason(e){e.isCustom?this.panelView=W:this.$emit("submit",{feedbackType:this.feedbackType,feedbackReason:e.key})},submitCustomFeedback(){this.$emit("submit",{feedbackType:this.feedbackType,feedbackReason:"custom_"+this.customFeedback.trim()})},goBackToReasons(){this.panelView=G,this.customFeedback=""},close(){this.$emit("close")}}};var H=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"agentic-feedback-panel gl-border gl-mt-2 gl-rounded-lg gl-border-default gl-bg-subtle gl-p-3",attrs:{"data-testid":"feedback-reason-dropdown"}},[n("div",{staticClass:"gl-mb-3 gl-flex gl-items-center gl-justify-between gl-gap-2"},[n("p",{staticClass:"gl-m-0 gl-text-sm gl-font-bold",attrs:{"data-testid":"reason-header"}},[e._v("\n "+e._s(e.reasonHeader)+"\n ")]),e._v(" "),n("div",{staticClass:"gl-flex gl-shrink-0 gl-items-center gl-gap-1"},[e.isTellUsMoreVisible?n("gl-button",{attrs:{icon:"go-back",category:"tertiary",size:"small","aria-label":e.$options.i18n.BACK,"data-testid":"back-button"},on:{click:e.goBackToReasons}}):e._e(),e._v(" "),n("gl-button",{staticClass:"gl-mr-[-5px]",attrs:{icon:"close",category:"tertiary",size:"small","aria-label":e.$options.i18n.CLOSE,"data-testid":"close-dropdown-button"},on:{click:e.close}})],1)]),e._v(" "),e.isReasonListVisible?n("div",{staticClass:"gl-flex gl-flex-wrap gl-gap-2",attrs:{"data-testid":"reason-buttons"}},e._l(e.reasonOptions,(function(t){return n("gl-button",{key:t.key,staticClass:"gl-rounded-full",attrs:{category:"secondary",size:"small",icon:t.isCustom?"pencil":void 0,"data-testid":"reason-"+t.key},on:{click:function(n){return e.selectReason(t)}}},[e._v("\n "+e._s(t.label)+"\n ")])})),1):e._e(),e._v(" "),e.isTellUsMoreVisible?n("div",{staticClass:"gl-flex gl-w-full gl-flex-col gl-gap-3",attrs:{"data-testid":"tell-us-more-view"}},[n("gl-form",{staticClass:"gl-flex gl-w-full gl-flex-col gl-gap-3",on:{submit:function(t){t.preventDefault(),e.canSubmitCustomFeedback&&e.submitCustomFeedback()}}},[n("gl-form-textarea",{attrs:{state:e.isTextareaValid,placeholder:e.$options.i18n.FEEDBACK_PLACEHOLDER,rows:3,"max-rows":5,"data-testid":"custom-feedback-textarea"},model:{value:e.customFeedback,callback:function(t){e.customFeedback=t},expression:"customFeedback"}}),e._v(" "),n("div",{staticClass:"gl-flex gl-items-center gl-justify-between"},[n("gl-button",{attrs:{variant:"confirm",size:"small",type:"submit","data-testid":"submit-custom-feedback-button"}},[e._v("\n "+e._s(e.$options.i18n.SUBMIT)+"\n ")]),e._v(" "),n("span",{staticClass:"gl-text-sm",class:e.isOverCharacterLimit?"gl-text-danger":"gl-text-subtle",attrs:{"data-testid":"character-count"}},[e._v("\n "+e._s(e.characterCountText)+"\n ")])],1)],1)],1):e._e()])},staticRenderFns:[]},void 0,z,void 0,!1,void 0,!1,void 0,void 0,void 0);const K={name:"MessageActionBar"};var Q=S()({render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"message-action-bar -gl-ml-2 gl-flex gl-items-start gl-gap-3"},[this._t("default")],2)},staticRenderFns:[]},void 0,K,void 0,!1,void 0,!1,void 0,void 0,void 0),Y=n("L78D"),J=n("0aXu");const Z={MODAL:{TITLE:"Give feedback on GitLab Duo",DESCRIPTION:"To help improve GitLab Duo, send your feeback to GitLab team members.",ALERT:"GitLab team members cannot see the AI content. Please be as descriptive as possible.",OPTIONS_LABEL:"How could the AI content be improved?",SITUATION_DESCRIPTION_LABEL:"What were you doing?",SITUATION_DESCRIPTION_PLACEHOLDER:"The situation in which you interacted with GitLab Duo Chat.",IMPROVEMENT_SUGGESTION_LABEL:"How could the response be improved?",IMPROVEMENT_SUGGESTION_PLACEHOLDER:"How the response might better meet your needs.",MORE_LABEL:"More information",MORE_PLACEHOLDER:"How could the content be improved?",REQUIRED_VALIDATION_ERROR:"Select at least one option.",FEEDBACK_OPTIONS:{helpful:"Helpful",unhelpful:"Unhelpful or irrelevant",incorrect:"Factually incorrect",long:"Too long",abuse:"Abusive or offensive",other:"Something else"},ACTIONS:{submit:"Submit",cancel:"Cancel"}}},X=[{text:Z.MODAL.FEEDBACK_OPTIONS.helpful,value:"helpful"},{text:Z.MODAL.FEEDBACK_OPTIONS.unhelpful,value:"unhelpful"},{text:Z.MODAL.FEEDBACK_OPTIONS.incorrect,value:"incorrect"},{text:Z.MODAL.FEEDBACK_OPTIONS.long,value:"long"},{text:Z.MODAL.FEEDBACK_OPTIONS.abuse,value:"abuse"},{text:Z.MODAL.FEEDBACK_OPTIONS.other,value:"other"}];const ee={name:"DuoChatFeedbackModal",components:{GlModal:T.a,GlAlert:m.a,GlFormCheckboxGroup:J.a,GlFormGroup:Y.a,GlFormTextarea:$.a},inject:{modalTitle:{default:Z.MODAL.TITLE},modalAlert:{default:Z.MODAL.ALERT}},data:()=>({selectedFeedbackOptions:[],extendedFeedback:"",isValid:null}),watch:{selectedFeedbackOptions(e){this.isValid=e.length>0}},methods:{close(){this.$refs.feedbackModal.hide()},show(){this.$refs.feedbackModal.show()},onFeedbackSubmit(e){this.selectedFeedbackOptions.length?(this.$emit("feedback-submitted",{feedbackChoices:this.selectedFeedbackOptions,extendedTextFeedback:this.extendedFeedback}),this.close(),this.isValid=null):(null==e||e.preventDefault(),this.isValid=!1)}},actions:{primary:{text:Z.MODAL.ACTIONS.submit},cancel:{text:Z.MODAL.ACTIONS.cancel}},feedbackOptions:X,i18n:Z};var te=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("gl-modal",{ref:"feedbackModal",attrs:{"modal-id":"feedbackModal",title:e.modalTitle,"action-primary":e.$options.actions.primary,"action-cancel":e.$options.actions.cancel,visible:!1,size:"sm"},on:{primary:e.onFeedbackSubmit,canceled:e.close}},[n("p",[e._v(e._s(e.$options.i18n.MODAL.DESCRIPTION))]),e._v(" "),n("gl-form-group",{attrs:{"invalid-feedback":e.$options.i18n.MODAL.REQUIRED_VALIDATION_ERROR,state:e.isValid,label:e.$options.i18n.MODAL.OPTIONS_LABEL,"label-for":"feedback-options-checkbox-group","data-testid":"feedback-options"}},[n("gl-form-checkbox-group",{attrs:{id:"feedback-options-checkbox-group",options:e.$options.feedbackOptions},model:{value:e.selectedFeedbackOptions,callback:function(t){e.selectedFeedbackOptions=t},expression:"selectedFeedbackOptions"}})],1),e._v(" "),n("gl-alert",{staticClass:"gl-mb-5",attrs:{dismissible:!1}},[e._v(e._s(e.modalAlert))]),e._v(" "),e._t("feedback-extra-fields",(function(){return[n("gl-form-group",{attrs:{label:e.$options.i18n.MODAL.MORE_LABEL,optional:""}},[n("gl-form-textarea",{attrs:{placeholder:e.$options.i18n.MODAL.MORE_PLACEHOLDER},model:{value:e.extendedFeedback,callback:function(t){e.extendedFeedback=t},expression:"extendedFeedback"}})],1)]}))],2)},staticRenderFns:[]},void 0,ee,void 0,!1,void 0,!1,void 0,void 0,void 0);const ne={FEEDBACK_LINK_TEXT:"Give feedback to improve this answer",FEEDBACK_THANKS:"Thank you for your feedback"};const ie={name:"GlDuoUserFeedback",components:{GlButton:o.a,FeedbackModal:te},props:{feedbackReceived:{type:Boolean,required:!1,default:!1},feedbackLinkText:{type:String,required:!1,default:ne.FEEDBACK_LINK_TEXT},feedbackLinkUrl:{type:String,required:!1,default:""}},computed:{shouldRenderModal(){return!this.feedbackReceived&&!this.feedbackLinkUrl}},methods:{notify(e){this.$emit("feedback",e)}},i18n:ne};var re=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("gl-button",{attrs:{category:"tertiary",size:"small","button-text-classes":"gl-text-subtle",target:"_blank",disabled:e.feedbackReceived,href:e.feedbackLinkUrl},on:{click:function(t){e.shouldRenderModal&&e.$refs.feedbackModal.show()}}},[e._v(e._s(e.feedbackReceived?e.$options.i18n.FEEDBACK_THANKS:e.feedbackLinkText))]),e._v(" "),e.shouldRenderModal?n("feedback-modal",{ref:"feedbackModal",on:{"feedback-submitted":e.notify},scopedSlots:e._u([{key:"feedback-extra-fields",fn:function(){return[e._t("feedback-extra-fields")]},proxy:!0}],null,!0)}):e._e()],1)},staticRenderFns:[]},void 0,ie,void 0,!1,void 0,!1,void 0,void 0,void 0);const ae={TITLE:Object(c.b)("DuoChatMessage.modalTitle","Give feedback on GitLab Duo Chat"),ALERT_TEXT:Object(c.b)("DuoChatMessage.modalAlertText","GitLab team members cannot view your conversation. Please be as descriptive as possible."),DID_WHAT:Object(c.b)("DuoChatMessage.modalDidWhat","What were you doing?"),INTERACTION:Object(c.b)("DuoChatMessage.modalInteraction","The situation in which you interacted with GitLab Duo Chat."),IMPROVE_WHAT:Object(c.b)("DuoChatMessage.modalImproveWhat","How could the response be improved?"),BETTER_RESPONSE:Object(c.b)("DuoChatMessage.modalBetterResponse","How the response might better meet your needs."),MESSAGE_ERROR:Object(c.b)("DuoChatMessage.modalMessageError","Error sending the message")};const oe={i18n:ae,name:"MessageFeedback",components:{GlDuoUserFeedback:re,GlFormGroup:Y.a,GlFormTextarea:$.a},provide:()=>({modalTitle:ae.TITLE,modalAlertText:ae.ALERT_TEXT}),props:{hasFeedback:{required:!1,default:!1,type:Boolean}},data:()=>({didWhat:"",improveWhat:""}),methods:{logEvent(e){this.$emit("feedback",{...e,didWhat:this.didWhat,improveWhat:this.improveWhat})}}};var se=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("gl-duo-user-feedback",{attrs:{"feedback-received":e.hasFeedback,"modal-title":e.$options.i18n.TITLE,"modal-alert":e.$options.i18n.ALERT_TEXT},on:{feedback:e.logEvent},scopedSlots:e._u([{key:"feedback-extra-fields",fn:function(){return[n("gl-form-group",{attrs:{label:e.$options.i18n.DID_WHAT,optional:"","data-testid":"did-what-form-group"}},[n("gl-form-textarea",{attrs:{placeholder:e.$options.i18n.INTERACTION},model:{value:e.didWhat,callback:function(t){e.didWhat=t},expression:"didWhat"}})],1),e._v(" "),n("gl-form-group",{attrs:{label:e.$options.i18n.IMPROVE_WHAT,optional:"","data-testid":"improve-what-form-group"}},[n("gl-form-textarea",{attrs:{placeholder:e.$options.i18n.BETTER_RESPONSE},model:{value:e.improveWhat,callback:function(t){e.improveWhat=t},expression:"improveWhat"}})],1)]},proxy:!0}])})},staticRenderFns:[]},void 0,oe,void 0,!1,void 0,!1,void 0,void 0,void 0),le=n("Idki"),ce=n("xRYP"),ue=n.n(ce),de=n("gKmt"),fe=n("jsvc"),pe=n.n(fe),he=n("NCQA");const me={async:!0,breaks:!1,gfm:!1},ge=new le.Renderer({...me}),ve={code(){return ge.code(...arguments).replace("
",'
\n\n\n
').replace("
","
")}},be=new le.Marked([{...me},ue()()]),ye={ADD_TAGS:["insert-code-snippet","copy-code","gl-markdown","#text","gl-compact-markdown"],ADD_ATTR:["data-canonical-lang","data-sourcepos","lang","data-src","img"],FORBID_TAGS:["script","style","iframe","form","button","svg","video","audio","embed","object"],FORBID_ATTR:["onerror","onload","onclick"]},_e=e=>{var t;if("img"!==(null===(t=e.nodeName)||void 0===t?void 0:t.toLowerCase()))return e;const n=e.ownerDocument.createElement("code");return n.textContent=e.outerHTML,e.parentNode.replaceChild(n,e),e};function ke(e){if(!e.startsWith("/")||e.startsWith("//"))return!1;return!/(?:(?:https?|ftp|mailto|tel|file|data|ssh|git):?\/\/)|(?:www\.)/i.test(e)}const we=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>{if(!t.hasAttribute("href"))return;const n=t.getAttribute("href");try{if(ke(n))return;new URL(n)}catch(e){return void t.removeAttribute("href")}const i=new URL(n).hostname.toLowerCase(),r="docs.gitlab.com"===i,a=e.includes(i);if(r||a||"gitlab.com"===i||"gdk.test"===i)return;const o=document.createElement("code"),s=document.createElement("span");for(o.appendChild(s);t.firstChild;)s.appendChild(t.firstChild);t.appendChild(o),s.setAttribute("data-href",t.getAttribute("href")),t.removeAttribute("href")}};function Se(e){const t=e.toString().trim();if(0===t.length||!t.startsWith("<")||!t.includes(">"))return!1;const n=(new DOMParser).parseFromString(t,"text/html");return null===n.querySelector("parsererror")&&Array.from(n.body.childNodes).some(e=>e.nodeType===Node.ELEMENT_NODE)}async function Oe(e){let{trustedUrls:t=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";pe.a.addHook("beforeSanitizeElements",_e),pe.a.addHook("afterSanitizeAttributes",we(t));const n=Se(e)?e:await be.parse(e.toString()),i=pe.a.sanitize(n,ye);return pe.a.removeHook("beforeSanitizeElements"),pe.a.removeHook("afterSanitizeAttributes"),i}be.use(Object(de.markedHighlight)({async:!0,langPrefix:"hljs language-",highlight:(e,t)=>Object(he.a)(e,[t])})),be.use({renderer:ve});const Ce={name:"MarkdownRenderer",directives:{SafeHtml:s.a},inject:{renderGFM:{from:"renderGFM",default:()=>e=>{e.classList.add("gl-markdown","gl-compact-markdown","gl-text-sm")}},renderMarkdown:{from:"renderMarkdown",default:()=>Oe},markdownClass:{from:"markdownClass",default:""}},props:{markdown:{type:String,required:!1,default:""},isHtml:{type:Boolean,required:!1,default:!1},trustedUrls:{type:Array,required:!1,default:()=>[]}},data:()=>({renderedMarkdown:""}),watch:{async markdown(){this.render()}},created(){this.render()},methods:{async render(){this.renderedMarkdown=this.isHtml?this.markdown:await this.renderMarkdown(this.markdown,{trustedUrls:this.trustedUrls})}},safeHtmlConfigExtension:{ADD_TAGS:["copy-code","insert-code-snippet"]}};var De=S()({render:function(){var e=this.$createElement;return(this._self._c||e)("div",{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfigExtension]",value:this.renderedMarkdown,expression:"renderedMarkdown",arg:this.$options.safeHtmlConfigExtension}],ref:"content",class:this.markdownClass})},staticRenderFns:[]},void 0,Ce,void 0,!1,void 0,!1,void 0,void 0,void 0),je=n("cc68");const Te=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Insert the code snippet",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"insert";const n=document.createElement("button");n.type="button",n.classList.add("btn","btn-default","btn-md","gl-button","btn-default-secondary","btn-icon"),n.dataset.title=e,n.setAttribute("aria-label",e);const i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("role","img"),i.setAttribute("aria-hidden","true"),i.classList.add("gl-button-icon","gl-icon","s16");const r=document.createElementNS("http://www.w3.org/2000/svg","use");return r.setAttribute("href",`${je.a}#${t}`),i.appendChild(r),n.appendChild(i),n};var xe=n("WrwP");const Ee=async(e,t)=>{const n=document.createElement("div");n.classList.add("gl-tooltip"),n.setAttribute("role","tooltip"),n.textContent=t;const i=document.createElement("div");i.classList.add("arrow"),n.appendChild(i);const r=()=>{n.style.display="block",(async()=>{const{x:t,y:r,placement:a,middlewareData:o}=await Object(xe.computePosition)(e,n,{placement:"top",middleware:[Object(xe.offset)(10),Object(xe.shift)(),Object(xe.arrow)({element:i})]});Object.assign(n.style,{left:t+"px",top:r+"px"});const{x:s,y:l}=o.arrow,c={top:"bottom",right:"left",bottom:"top",left:"right"}[a.split("-")[0]];Object.assign(i.style,{left:null!=s?s+"px":"",top:null!=l?l+"px":"",right:"",bottom:"",[c]:"-4px"})})()},a=()=>{n.style.display=""};return[["mouseenter",r],["mouseleave",a],["focus",r],["blur",a]].forEach(t=>{let[n,i]=t;e.addEventListener(n,i)}),n};function Ie(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ae extends HTMLElement{constructor(){super(),Ie(this,"getCodeElement",()=>{const e=this.parentNode;return e.getElementsByTagName("code")[0]||e.getElementsByTagName("pre")[0]}),this.initialize()}async initialize(){if(!this.getCodeElement())return;const e=Te("Copy to clipboard","copy-to-clipboard");this.appendChild(e);const t=await Ee(e,"Copy to clipboard");this.appendChild(t),e.addEventListener("click",async()=>{const e=this.getCodeElement(),t=e.innerText;try{await Object(M.b)(t,e)}catch(e){console.warn("Failed to copy to clipboard:",e)}})}}function Ne(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function Fe(e,t){return e.get(Ne(e,t))}function Pe(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Le(e,t,n){return e.set(Ne(e,t),n),n}function Re(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Me=new WeakMap,Be=new WeakMap,qe=new WeakMap;class $e extends HTMLElement{constructor(e){super(),Pe(this,Me,void 0),Pe(this,Be,void 0),Pe(this,qe,()=>{const e=this.getCodeElement(Fe(Be,this));e&&e.dispatchEvent(new CustomEvent("insert-code-snippet",{bubbles:!0,cancelable:!0,detail:{code:e.textContent.trim()}}))}),Re(this,"getCodeElement",e=>{const t=null!=e?e:this.closest(".js-markdown-code");return t.getElementsByTagName("code")[0]||t.getElementsByTagName("pre")[0]}),this.initialize(e)}async initialize(e){if(!this.getCodeElement(e))return;Le(Be,this,e),Le(Me,this,Te());const t=await Ee(Fe(Me,this),"Insert at cursor");this.appendChild(t)}connectedCallback(){Fe(Me,this)&&(this.appendChild(Fe(Me,this)),Fe(Me,this).addEventListener("click",Fe(qe,this)))}disconnectedCallback(){Fe(Me,this)&&Fe(Me,this).removeEventListener("click",Fe(qe,this))}}const Ve={name:"DuoBaseMessage",components:{GlIcon:r.a,MarkdownRenderer:De},directives:{GlTooltip:l.a},inject:{renderGFM:{from:"renderGFM",default:()=>e=>{e.classList.add("gl-markdown","gl-compact-markdown","gl-text-sm")}}},props:{message:{type:Object,required:!0,validate:e=>e&&e.content&&e.role&&e.errors}},computed:{isDoneStreaming(){return Object.hasOwn(this.message,"status")?"success"===this.message.status:!this.isChunk},isChunk(){return"number"==typeof this.message.chunkId},hasContentHtml(){var e,t;return(null===(e=this.message)||void 0===e||null===(t=e.contentHtml)||void 0===t?void 0:t.length)>0},messageContent(){var e;return this.hasContentHtml?this.message.contentHtml:null===(e=this.message)||void 0===e?void 0:e.content},renderedError(){var e;return(null===(e=this.message.errors)||void 0===e?void 0:e.join("; "))||""},hasError(){var e,t;return Boolean(null===(e=this.message)||void 0===e||null===(t=e.errors)||void 0===t?void 0:t.length)}},mounted(){this.hydrateContentWithGFM()},updated(){this.hydrateContentWithGFM()},methods:{hydrateContentWithGFM(){this.$refs.content&&this.$nextTick(()=>{this.renderGFM(this.$refs.content.$el,this.message.role)})}}};var Ue=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"duo-chat-message gl-w-full gl-flex-grow gl-leading-20 gl-break-anywhere",class:{"gl-items-top gl-flex":e.hasError,"duo-chat-message-complete":e.isDoneStreaming}},[e.hasError?n("gl-icon",{staticClass:"error-icon gl-border gl-mr-3 gl-mt-2 gl-shrink-0 gl-rounded-full gl-border-red-500 gl-text-red-600",attrs:{name:"status_warning_borderless",size:16,"data-testid":"error"}}):e._e(),e._v(" "),n("div",{ref:"content-wrapper",class:{"has-error":e.hasError}},[e.hasError?n("markdown-renderer",{ref:"error-message",attrs:{markdown:e.renderedError}}):n("div",[e._t("message",(function(){return[n("markdown-renderer",{ref:"content",attrs:{"is-html":e.hasContentHtml,markdown:e.messageContent}})]}),null,{content:e.messageContent,isHtml:e.hasContentHtml})],2)],1)],1)},staticRenderFns:[]},void 0,Ve,void 0,!1,void 0,!1,void 0,void 0,void 0);const Ge={name:"DuoAgentMessage",components:{BaseMessage:Ue,GlIcon:r.a,MessageFeedback:se,MarkdownRenderer:De},safeHtmlConfigExtension:{ADD_TAGS:["copy-code","insert-code-snippet"]},props:{message:{required:!0,type:Object},withFeedback:{required:!1,default:!1,type:Boolean}},computed:{hasError(){var e,t;return Boolean(null===(e=this.message)||void 0===e||null===(t=e.errors)||void 0===t?void 0:t.length)}},methods:{onInsertCodeSnippet(e){this.$emit("insert-code-snippet",e)},onCopyCodeSnippet(e){this.$emit("copy-code-snippet",e)}}};var We=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("base-message",{staticClass:"gl-text-gray-900",attrs:{message:e.message},scopedSlots:e._u([{key:"message",fn:function(t){return[e.message.title?n("div",{staticClass:"gl-my-3 gl-flex gl-flex-col"},[n("div",{staticClass:"gl-flex gl-items-center gl-gap-x-2"},[e.message.icon?n("gl-icon",{attrs:{name:e.message.icon,size:e.message.iconSize,variant:e.message.iconVariant}}):e._e(),e._v(" "),n("span",{staticClass:"gl-text-lg",attrs:{"data-testid":"message-title"}},[e._v(e._s(e.message.title))])],1)]):e._e(),e._v(" "),e._t("message",(function(){return[n("markdown-renderer",{ref:"content",attrs:{"is-html":t.isHtml,markdown:t.content},on:{"insert-code-snippet":e.onInsertCodeSnippet,"copy-code-snippet":e.onCopyCodeSnippet}})]}),null,t),e._v(" "),e.withFeedback?n("message-feedback",{on:{feedback:function(t){return e.$emit("feedback",t)}}}):e._e()]}}],null,!0)})},staticRenderFns:[]},void 0,Ge,void 0,!1,void 0,!1,void 0,void 0,void 0);const ze={name:"DuoUserMessage",components:{BaseMessage:Ue},props:{message:{required:!0,type:Object}}};var He=S()({render:function(){var e=this.$createElement;return(this._self._c||e)("base-message",{staticClass:"gl-ml-auto gl-bg-blue-100 gl-p-4 gl-text-blue-900",attrs:{message:this.message}})},staticRenderFns:[]},void 0,ze,void 0,!1,void 0,!1,void 0,void 0,void 0);const Ke={name:"DuoInputRequestedMessage",components:{AgentMessage:We},props:{message:{required:!0,type:Object}}};var Qe=S()({render:function(){var e=this.$createElement;return(this._self._c||e)("agent-message",{staticClass:"duo-highlight-message input-requested",attrs:{message:this.message}})},staticRenderFns:[]},void 0,Ke,void 0,!1,void 0,!1,void 0,void 0,void 0),Ye=n("kIRW");const Je={name:"MessageToolDetails",components:{ToolKvSection:n("r3H8").a},props:{message:{type:Object,required:!0},isExpanded:{type:Boolean,required:!0}},computed:{toolInfo(){var e;return(null===(e=this.message)||void 0===e?void 0:e.tool_info)||{}}},methods:{onCopyCodeSnippet(e){this.$emit("copy-code-snippet",e)}}};var Ze=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"gl-mt-4 gl-grid gl-gap-3"},[e.toolInfo.args?n("tool-kv-section",{attrs:{title:"Request",value:e.toolInfo.args},on:{"copy-code-snippet":e.onCopyCodeSnippet}}):e._e(),e._v(" "),e.toolInfo.tool_response?n("tool-kv-section",{attrs:{title:"Response",value:e.toolInfo.tool_response},on:{"copy-code-snippet":e.onCopyCodeSnippet}}):e._e()],1)},staticRenderFns:[]},void 0,Je,void 0,!1,void 0,!1,void 0,void 0,void 0);const Xe={PROJECT_LABEL:Object(i.b)("DuoChatMessage.projectLabel","Project"),BRANCH_LABEL:Object(i.b)("DuoChatMessage.branchLabel","Branch"),START_BRANCH_LABEL:Object(i.b)("DuoChatMessage.startBranchLabel","Start branch"),COLLAPSE_DETAILS:Object(i.b)("DuoChatMessage.collapseDetails","Collapse details"),EXPAND_DETAILS:Object(i.b)("DuoChatMessage.expandDetails","Expand details")},et=["command_output"];const tt={name:"DuoToolMessage",components:{BaseMessage:Ue,MessageToolDetails:Ze,GlButton:o.a,GlCollapse:Ye.a,GlIcon:r.a,GlLink:F.a},i18n:Xe,provide:{renderGFM:{from:"renderGFM",default:()=>e=>{e.classList.add("gl-markdown","gl-compact-markdown"),e.classList.add("duo-system-message","gl-text-sm")}}},inject:{detailsExpanded:{default:!1}},props:{message:{required:!0,type:Object,validate:e=>e&&e.tool_info},workingDirectory:{required:!1,type:String,default:""}},data(){return{isDetailsOpen:this.detailsExpanded}},computed:{iconName(){switch(this.toolName){case"read_file":return"eye";case"write_file":return"pencil";case"grep_files":case"list_files":return"search";case"get_issue":case"list_issue_notes":return"issues";case"create_commit":return"commit";default:return"issue-type-maintenance"}},messageContent(){var e;return(null===(e=this.message.content)||void 0===e?void 0:e.toLowerCase())||""},messageFilePath(){var e,t;return null===(e=this.message.tool_info)||void 0===e||null===(t=e.args)||void 0===t?void 0:t.file_path},toolArgs(){var e;return(null===(e=this.message.tool_info)||void 0===e?void 0:e.args)||{}},projectId(){return this.toolArgs.project_id},branchName(){return this.toolArgs.branch},startBranch(){return this.toolArgs.start_branch},shouldShowProjectId(){return!!this.projectId&&!this.messageContent.includes(String(this.projectId))},shouldShowBranch(){return!!this.branchName&&!this.messageContent.includes(this.branchName.toLowerCase())},shouldShowStartBranch(){return!!this.startBranch&&!this.messageContent.includes(this.startBranch.toLowerCase())},shouldShowFilePath(){return!!this.messageFilePath&&!this.messageContent.includes(this.messageFilePath.toLowerCase())},hasMetadataToShow(){return this.shouldShowProjectId||this.shouldShowBranch||this.shouldShowStartBranch},hasCommandOutput(){return"command_output"===this.message.message_sub_type},hasToolInfoArgs(){return Object.keys(this.toolArgs).length>0},hasToolInfoResponse(){return Object.prototype.hasOwnProperty.call(this.message.tool_info||{},"tool_response")},toolName(){var e;return null===(e=this.message.tool_info)||void 0===e?void 0:e.name},toolResponseContent(){var e;const t=null===(e=this.message.tool_info)||void 0===e?void 0:e.tool_response;return t?"object"==typeof t&&t.content?t.content:"string"==typeof t?t:"":""},collapseIconName(){return this.isDetailsOpen?"chevron-down":"chevron-right"},shouldShowDetails(){var e;return!et.includes(null===(e=this.message)||void 0===e?void 0:e.message_sub_type)&&(this.hasToolInfoArgs||this.hasToolInfoResponse)}},methods:{onOpenFilePath(e){const t=e||this.messageFilePath;t&&this.$emit("open-file-path",t)},toggleDetails(){this.shouldShowDetails&&(this.isDetailsOpen=!this.isDetailsOpen)},onCopyCodeSnippet(e){this.$emit("copy-code-snippet",e)}}};var nt=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("base-message",{attrs:{message:e.message},scopedSlots:e._u([{key:"message",fn:function(t){var i=t.content;return[n("div",{staticClass:"gl-border gl-flex-col gl-rounded-lg gl-border-default gl-p-4"},[n("div",{staticClass:"gl-flex gl-flex-col gl-gap-2 gl-text-base gl-text-subtle"},[n("div",{staticClass:"gl-flex gl-items-start gl-gap-x-3"},[n("div",{staticClass:"gl-mt-1 gl-flex gl-flex-shrink-0"},[n("gl-icon",{attrs:{name:e.iconName}})],1),e._v(" "),n("div",{staticClass:"gl-flex gl-min-w-0 gl-grow gl-flex-wrap gl-items-center gl-gap-x-2"},[n("span",{attrs:{"data-testid":"tool-message-content"}},[e._v(e._s(i))]),e._v(" "),e.shouldShowFilePath?n("gl-link",{staticClass:"file-path-link gl-min-w-0 gl-break-all gl-font-monospace",attrs:{"data-testid":"tool-message-file-path-link"},on:{click:function(t){return t.preventDefault(),e.onOpenFilePath(e.messageFilePath)}}},[n("code",{staticClass:"gl-rounded-base gl-px-2 gl-py-1 gl-text-default"},[e._v(e._s(e.messageFilePath))])]):e._e()],1),e._v(" "),e.shouldShowDetails?n("gl-button",{staticClass:"-gl-mt-1",attrs:{category:"tertiary",size:"small",icon:e.collapseIconName,"aria-label":e.isDetailsOpen?e.$options.i18n.COLLAPSE_DETAILS:e.$options.i18n.EXPAND_DETAILS,"data-testid":"tool-message-toggle-button"},on:{click:e.toggleDetails}}):e._e()],1),e._v(" "),e.hasMetadataToShow?n("div",{staticClass:"gl-ml-5 gl-flex gl-flex-wrap gl-gap-2 gl-text-sm"},[e.shouldShowProjectId?n("div",{staticClass:"gl-flex gl-min-w-0 gl-gap-x-2 gl-rounded-full gl-bg-strong gl-px-3",attrs:{"data-testid":"tool-message-project-info"}},[n("span",{staticClass:"gl-whitespace-nowrap"},[e._v(e._s(e.$options.i18n.PROJECT_LABEL)+":")]),e._v(" "),n("span",{staticClass:"gl-truncate",attrs:{"data-testid":"tool-message-project-id"}},[e._v(e._s(e.projectId))])]):e._e(),e._v(" "),e.shouldShowBranch?n("div",{staticClass:"gl-flex gl-min-w-0 gl-gap-x-2 gl-rounded-full gl-bg-strong gl-px-3",attrs:{"data-testid":"tool-message-branch-info"}},[n("span",{staticClass:"gl-whitespace-nowrap"},[e._v(e._s(e.$options.i18n.BRANCH_LABEL)+":")]),e._v(" "),n("span",{staticClass:"gl-truncate",attrs:{"data-testid":"tool-message-branch-name"}},[e._v(e._s(e.branchName))])]):e._e(),e._v(" "),e.shouldShowStartBranch?n("div",{staticClass:"gl-flex gl-min-w-0 gl-gap-x-2 gl-rounded-full gl-bg-strong gl-px-3",attrs:{"data-testid":"tool-message-start-branch-info"}},[n("span",{staticClass:"gl-whitespace-nowrap"},[e._v(e._s(e.$options.i18n.START_BRANCH_LABEL)+":")]),e._v(" "),n("span",{staticClass:"gl-truncate",attrs:{"data-testid":"tool-message-start-branch-name"}},[e._v(e._s(e.startBranch))])]):e._e()]):e._e()]),e._v(" "),e.shouldShowDetails?n("gl-collapse",{staticClass:"gl-overflow-hidden",attrs:{visible:e.isDetailsOpen}},[n("message-tool-details",{attrs:{message:e.message,"is-expanded":e.isDetailsOpen},on:{"copy-code-snippet":e.onCopyCodeSnippet}})],1):e._e()],1)]}}])})},staticRenderFns:[]},void 0,tt,void 0,!1,void 0,!1,void 0,void 0,void 0),it=n("4Fqu"),rt=n("vxCR"),at=n("2TqH"),ot=n("vyQ9"),st=n("LTx3"),lt=n("eLCI"),ct=Object(st.a)((function(e,t,n){return e+(n?" ":"")+Object(lt.a)(t)})),ut=n("gOC4"),dt=n("Zq5U");const ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(ut.a)(e,(e,t)=>Object(dt.a)(t))};var pt=n("dIEn"),ht=n("dqW0"),mt=n("4GTW"),gt=n("bbiF"),vt=n("U0Yw");const bt={name:"ToolParamsJsonView",components:{PreBlock:vt.a},props:{toolParams:{type:Object,required:!0}},computed:{hasToolParams(){return Object.keys(this.toolParams||{}).length>0}},i18n:{REQUEST_TEXT:Object(i.b)("MessageToolApproval.parametersText","Request parameters"),NO_PARAMETERS_TEXT:Object(i.b)("MessageToolApproval.noParametersText","No parameters will be sent with this request.")}};var yt=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("figure",{staticClass:"gl-m-0 gl-flex gl-flex-col gl-gap-2"},[n("figcaption",{staticClass:"gl-text-subtle"},[e._v("\n "+e._s(e.$options.i18n.REQUEST_TEXT)+"\n ")]),e._v(" "),e.hasToolParams?n("pre-block",{attrs:{languages:["json"],"data-testid":"tool-parameters"}},[e._v(e._s(JSON.stringify(e.toolParams,null,2)))]):n("span",{staticClass:"gl-text-sm gl-text-gray-500",attrs:{"data-testid":"no-parameters-message"}},[e._v("\n "+e._s(e.$options.i18n.NO_PARAMETERS_TEXT)+"\n ")])],1)},staticRenderFns:[]},void 0,bt,void 0,!1,void 0,!1,void 0,void 0,void 0);const _t=Object(i.b)("BaseToolParams.projectLabel","Project"),kt=Object(i.b)("BaseToolParams.groupLabel","Group"),wt=Object(i.b)("BaseToolParams.issueLabel","Issue"),St=Object(i.b)("BaseToolParams.mergeRequestLabel","Merge request"),Ot=Object(i.b)("BaseToolParams.workItemLabel","Work item"),Ct=Object(i.b)("BaseToolParams.epicLabel","Epic"),Dt=Object(i.b)("BaseToolParams.sourceBranchLabel","Source branch"),jt=Object(i.b)("BaseToolParams.targetBranchLabel","Target branch"),Tt=Object(i.b)("BaseToolParams.startDateLabel","Start date"),xt=Object(i.b)("BaseToolParams.dueDateLabel","Due date"),Et=Object(i.b)("BaseToolParams.healthStatusLabel","Health status"),It=Object(i.b)("BaseToolParams.labelsLabel","Labels"),At=Object(i.b)("BaseToolParams.vulnerabilityLabel","Vulnerability"),Nt=Object(i.b)("BaseToolParams.dismissalReasonLabel","Dismissal reason"),Ft={projectId:{icon:"project",label:_t},projectName:{icon:"project",label:_t},projectPath:{icon:"project",label:_t},projectFullPath:{icon:"project",label:_t},groupId:{icon:"group",label:kt},groupPath:{icon:"group",label:kt},issueId:{icon:"issues",label:wt},issueIid:{icon:"issues",label:wt},mergeRequestId:{icon:"merge-request",label:St},mergeRequestIid:{icon:"merge-request",label:St},workItemIid:{icon:"work-items",label:Ot},epicIid:{icon:"epics",label:Ct},sourceBranch:{icon:"branch",label:Dt},targetBranch:{icon:"branch",label:jt},url:{icon:"external-link",type:"url"},startDate:{icon:"calendar",label:Tt},dueDate:{icon:"calendar",label:xt},healthStatus:{icon:"status-health",label:Et},state:{label:Object(i.b)("BaseToolParams.stateLabel","State"),icon:e=>"opened"===e?"status_open":"status_closed"},labels:{icon:"labels",label:It},addLabelIds:{icon:"labels",label:It},confidential:{icon:e=>e?"eye-slash":"eye",label:Object(i.b)("BaseToolParams.confidentialLabel","Confidential")},typeName:{icon:e=>"work-item-"+e.toLowerCase(),label:Object(i.b)("BaseToolParams.typeLabel","Type")},vulnerabilityId:{label:At},dismissalReason:{icon:"information",label:Nt}};const Pt={name:"BaseToolParams",components:{GlAccordion:ht.a,GlAccordionItem:mt.a,GlBadge:h.a,PreBlock:vt.a,ToolParamsJsonView:yt},directives:{SafeHtml:s.a},props:{message:{type:String,required:!1,default:""},description:{type:String,required:!1,default:""},toolParams:{type:Object,required:!1,default:()=>{}},customAccordionTitle:{type:String,required:!1,default:""},withJsonView:{type:Boolean,required:!1,default:!1}},computed:{accordionTitle(){return this.customAccordionTitle||this.$options.i18n.DESCRIPTION_ACCORDION_TITLE},metadataProperties(){const e=this.toolParams||{},t=["projectFullPath","projectPath","projectName","projectId"],n=t.find(t=>e[t]);return Object.entries(Ft).filter(i=>{let[r]=i;return!!e[r]&&(!t.includes(r)||r===n)}).map(t=>{let[n,i]=t;return{key:n,value:e[n],...i}})},hasMetadataProperties(){return this.metadataProperties.length>0}},methods:{formatPropertyValue:e=>Array.isArray(e)?e.join(", "):"boolean"==typeof e?e?Object(i.b)("Yes","Yes"):Object(i.b)("No","No"):e,processPropertyIcon:(e,t)=>"function"==typeof e?e(t):e},i18n:{DESCRIPTION_ACCORDION_TITLE:Object(i.b)("BaseToolParams.ExpandDescriptionTitle","Read description"),EXPAND_JSON_VIEW_TITLE:Object(i.b)("BaseToolParams.ExpandJsonViewTitle","See request parameters as JSON")}};var Lt=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"gl-flex gl-flex-col gl-gap-3"},[e.hasMetadataProperties?n("div",{staticClass:"gl-flex gl-flex-wrap gl-gap-2"},e._l(e.metadataProperties,(function(t){return n("span",{key:t.key,staticClass:"gl-overflow-hidden"},["url"==t.type?n("gl-badge",{attrs:{icon:t.icon,href:t.value,title:t.value}},[n("span",{staticClass:"gl-truncate"},[e._v("\n "+e._s(t.value)+"\n ")])]):n("gl-badge",{attrs:{icon:e.processPropertyIcon(t.icon,t.value)}},[e._v("\n "+e._s(t.label)+": "+e._s(e.formatPropertyValue(t.value))+"\n ")])],1)})),0):e._e(),e._v(" "),e.message?n("div",{directives:[{name:"safe-html",rawName:"v-safe-html",value:e.message,expression:"message"}]}):e._t("default"),e._v(" "),e.message||e.description?n("gl-accordion",{staticClass:"-gl-ml-2",attrs:{"header-level":3}},[e.description?n("gl-accordion-item",{staticClass:"gl-mb-3",attrs:{title:e.accordionTitle}},[n("pre-block",{attrs:{languages:["markdown"]}},[e._v(e._s(e.description))])],1):e._e(),e._v(" "),e.withJsonView?n("gl-accordion-item",{attrs:{title:e.$options.i18n.EXPAND_JSON_VIEW_TITLE}},[n("tool-params-json-view",{attrs:{"tool-params":e.toolParams}})],1):e._e()],1):e.message||e.description||!e.withJsonView?e._e():n("tool-params-json-view",{attrs:{"tool-params":e.toolParams}})],2)},staticRenderFns:[]},void 0,Pt,void 0,!1,void 0,!1,void 0,void 0,void 0);const Rt={name:"CreateCommitToolParams",components:{GlSprintf:pt.a,GlAccordion:ht.a,GlAccordionItem:mt.a,BaseToolParams:Lt,PreBlock:vt.a},props:{toolParams:{type:Object,required:!0}},computed:{branch(){var e;return null===(e=this.toolParams)||void 0===e?void 0:e.branch},repository(){var e,t,n,i,r;return(null===(e=this.toolParams)||void 0===e?void 0:e.projectName)||(null===(t=this.toolParams)||void 0===t?void 0:t.projectPath)||(null===(n=this.toolParams)||void 0===n?void 0:n.projectFullPath)||(null===(i=this.toolParams)||void 0===i?void 0:i.url)||(null===(r=this.toolParams)||void 0===r?void 0:r.projectId)},summaryMessage(){return this.branch&&this.repository?this.$options.i18n.COMMIT_SUMMARY_MESSAGE:this.branch?this.$options.i18n.COMMIT_SUMMARY_MESSAGE_NO_REPO:this.repository?this.$options.i18n.COMMIT_SUMMARY_AUTO_BRANCH_MESSAGE:this.$options.i18n.COMMIT_SUMMARY_AUTO_BRANCH_MESSAGE_NO_REPO},commitMessage(){var e;return null===(e=this.toolParams)||void 0===e?void 0:e.commitMessage},actions(){var e;return(null===(e=this.toolParams)||void 0===e?void 0:e.actions)||[]},actionsCount(){return this.actions.length},actionsCountMessage(){return this.actionsCount?Object(i.a)(Object(i.c)("CreateCommitToolParams.actionsCountMessage","The commit contains %{count} file change.","The commit contains %{count} file changes.")(this.actionsCount),{count:this.actionsCount}):Object(i.b)("CreateCommitToolParams.noActionsMessage","The commit does not contain changes.")}},methods:{getActionTitle(e){let{action:t,file_path:n,previous_path:r}=e;switch(t){case"create":return Object(i.a)(this.$options.i18n.CREATE_FILE_ACTION_LABEL,{filePath:n});case"update":return Object(i.a)(this.$options.i18n.UPDATE_FILE_ACTION_LABEL,{filePath:n});case"delete":return Object(i.a)(this.$options.i18n.DELETE_FILE_ACTION_LABEL,{filePath:n});case"move":return Object(i.a)(this.$options.i18n.MOVE_FILE_ACTION_LABEL,{filePath:r});case"chmod":return Object(i.a)(this.$options.i18n.CHMOD_FILE_ACTION_LABEL,{filePath:n});default:return Object(i.a)(this.$options.i18n.UNKNOWN_FILE_ACTION_LABEL,{filePath:n})}},getActionFileExtension(e){let{file_path:t}=e;return t.split(".").pop()||"plaintext"},getActionContent(e){let{action:t,content:n,encoding:i,old_str:r,new_str:a,file_path:o}=e;if(!["create","update"].includes(t))return this.$options.i18n.ACTION_WITH_NO_CONTENT;if(i&&"text"!==i)return"";if(r&&a){const e=Object(gt.createPatch)(o,r,a,void 0,void 0,{context:50});return((null==e?void 0:e.split("\n"))||[]).filter(e=>"\\ No newline at end of file"!==e).slice(2).join("\n")}return n}},i18n:{COMMIT_SUMMARY_MESSAGE:Object(i.b)("CreateCommitToolParams.commitSummaryMessage","Commit and push to branch %{branch} in repository %{repository}."),COMMIT_SUMMARY_MESSAGE_NO_REPO:Object(i.b)("CreateCommitToolParams.commitSummaryMessageNoRepo","Commit and push to branch %{branch}."),COMMIT_SUMMARY_AUTO_BRANCH_MESSAGE:Object(i.b)("CreateCommitToolParams.commitSummaryAutoBranchMessage","Commit and push to a new branch in repository %{repository}."),COMMIT_SUMMARY_AUTO_BRANCH_MESSAGE_NO_REPO:Object(i.b)("CreateCommitToolParams.commitSummaryAutoBranchMessageNoRepo","Commit and push to a new branch."),READ_COMMIT_MESSAGE:Object(i.b)("CreateCommitToolParams.readCommitMessage","Read commit message"),CREATE_FILE_ACTION_LABEL:Object(i.b)("CreateCommitToolParams.createFileActionLabel","Create file %{filePath}"),UPDATE_FILE_ACTION_LABEL:Object(i.b)("CreateCommitToolParams.updateFileActionLabel","Update file %{filePath}"),DELETE_FILE_ACTION_LABEL:Object(i.b)("CreateCommitToolParams.deleteFileActionLabel","Delete file %{filePath}"),MOVE_FILE_ACTION_LABEL:Object(i.b)("CreateCommitToolParams.moveFileActionLabel","Move file %{filePath}"),CHMOD_FILE_ACTION_LABEL:Object(i.b)("CreateCommitToolParams.chmodFileActionLabel","Change permissions for file %{filePath}"),UNKNOWN_FILE_ACTION_LABEL:Object(i.b)("CreateCommitToolParams.unknownFileActionLabel","Modify file %{filePath}"),ACTION_WITH_NO_CONTENT:Object(i.b)("CreateCommitToolParams.actionWithNoContent","This action does not have any content."),EXPAND_CHANGES:Object(i.b)("CreateCommitToolParams.expandFileChanges","Expand file changes")}};var Mt=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("base-tool-params",{attrs:{"tool-params":e.toolParams}},[n("div",[n("gl-sprintf",{attrs:{message:e.summaryMessage},scopedSlots:e._u([e.branch?{key:"branch",fn:function(){return[n("code",[e._v(e._s(e.branch))])]},proxy:!0}:null,e.repository?{key:"repository",fn:function(){return[n("code",[e._v(e._s(e.repository))])]},proxy:!0}:null],null,!0)}),e._v("\n "+e._s(e.actionsCountMessage)+"\n ")],1),e._v(" "),n("gl-accordion",{staticClass:"-gl-ml-2",attrs:{"header-level":3}},[e.commitMessage?n("gl-accordion-item",{staticClass:"gl-mb-3",attrs:{title:e.$options.i18n.READ_COMMIT_MESSAGE}},[n("pre-block",{attrs:{languages:["markdown"]}},[e._v(e._s(e.commitMessage))])],1):e._e(),e._v(" "),e.actionsCount?n("gl-accordion-item",{attrs:{title:e.$options.i18n.EXPAND_CHANGES}},[n("gl-accordion",{attrs:{"header-level":4}},e._l(e.actions,(function(t,i){return n("gl-accordion-item",{key:i,staticClass:"gl-mb-3",attrs:{title:e.getActionTitle(t)}},[n("pre-block",{attrs:{languages:[e.getActionFileExtension(t),"diff"]}},[e._v(e._s(e.getActionContent(t)))])],1)})),1)],1):e._e()],1)],1)},staticRenderFns:[]},void 0,Rt,void 0,!1,void 0,!1,void 0,void 0,void 0);const Bt={name:"DefaultToolParams",components:{BaseToolParams:Lt},props:{toolName:{type:String,required:!1,default:""},toolParams:{type:Object,required:!0}},computed:{title(){var e;return null===(e=this.toolParams)||void 0===e?void 0:e.title},description(){var e,t,n;return(null===(e=this.toolParams)||void 0===e?void 0:e.description)||(null===(t=this.toolParams)||void 0===t?void 0:t.body)||(null===(n=this.toolParams)||void 0===n?void 0:n.comment)},isNote(){return[N.a.createMergeRequestNote,N.a.createWorkItemNote,N.a.createIssueNote].includes(this.toolName)},message(){const e=this.title?this.$options.i18n.TITLE_MESSAGE:"";return Object(i.a)(e,{...this.toolParams})},accordionTitle(){return this.isNote?this.$options.i18n.NOTE_ACCORDION_TITLE:""},displayRawOutput(){return!this.message}},i18n:{TITLE_MESSAGE:Object(i.b)("IssuableToolParams.TITLE_MESSAGE",'Set the title "%{title}".'),NOTE_ACCORDION_TITLE:Object(i.b)("IssuableToolParams.NOTE_ACCORDION_TITLE","Read note's content")}};var qt=S()({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("base-tool-params",{attrs:{"with-json-view":"","tool-params":this.toolParams,message:this.message,description:this.description,"custom-accordion-title":this.accordionTitle}})],1)},staticRenderFns:[]},void 0,Bt,void 0,!1,void 0,!1,void 0,void 0,void 0);const $t={name:"RunCommandToolParams",components:{GlIcon:r.a,BaseToolParams:Lt},props:{toolName:{type:String,required:!0},program:{type:String,required:!1,default:""},args:{type:String,required:!1,default:""},command:{type:String,required:!1,default:""},toolResponse:{type:[Object,String],required:!1,default:null},workingDirectory:{type:String,required:!1,default:""}},computed:{formattedCommand(){var e;return this.toolName===N.a.runCommand?null!==(e=this.command)&&void 0!==e&&e.length?this.command:`${this.program} ${this.args}`:`git ${this.command} ${this.args}`},withWorkingDirectory(){var e;return null!==(e=this.workingDirectory)&&void 0!==e&&e.length?`${this.workingDirectory}> ${this.formattedCommand}`:this.formattedCommand},commandOutput(){return this.toolResponse?"object"==typeof this.toolResponse&&this.toolResponse.content?this.toolResponse.content:"string"==typeof this.toolResponse?this.toolResponse:"":""}},i18n:{SEE_COMMAND_OUTPUT:Object(i.b)("RunCommandToolParams.ACCORDION_TITLE","Expand command output")}};var Vt=S()({render:function(){var e=this.$createElement,t=this._self._c||e;return t("base-tool-params",{attrs:{description:this.commandOutput,"custom-accordion-title":this.$options.i18n.SEE_COMMAND_OUTPUT}},[t("div",{staticClass:"gl-flex gl-items-center gl-gap-3"},[t("gl-icon",{staticClass:"gl-shrink-0",attrs:{name:"terminal"}}),this._v(" "),t("code",{staticClass:"gl-whitespace-pre-wrap gl-break-words gl-break-all"},[this._v(this._s(this.withWorkingDirectory))])],1)])},staticRenderFns:[]},void 0,$t,void 0,!1,void 0,!1,void 0,void 0,void 0);const Ut="approving",Gt="denying",Wt=null,zt="pending",Ht="approved",Kt={TOOL_APPROVAL_DESCRIPTION:Object(i.b)("MessageToolApproval.toolApprovalDescription","GitLab Duo Agentic Chat wants to execute a tool. Do you want to proceed?"),TOOL_LABEL:Object(i.b)("MessageToolApproval.toolLabel","Tool:"),TOOL_UNKNOWN:Object(i.b)("MessageToolApproval.toolUnknown","Unknown"),APPROVE_TEXT:Object(i.b)("MessageToolApproval.approveText","Approve"),APPROVE_SESSION_TEXT:Object(i.b)("MessageToolApproval.approveSessionText","Approve for session"),APPROVE_ALL_TEXT:Object(i.b)("MessageToolApproval.approveAllText","Always approve this tool"),APPROVING_TEXT:Object(i.b)("MessageToolApproval.approvingText","Approving..."),DENY_TEXT:Object(i.b)("MessageToolApproval.denyText","Deny"),DENYING_TEXT:Object(i.b)("MessageToolApproval.denyingText","Denying..."),DENIAL_REASON_LABEL:Object(i.b)("MessageToolApproval.denialReasonLabel","Rejection reason"),DENIAL_REASON_PLACEHOLDER:Object(i.b)("MessageToolApproval.denialReasonPlaceholder","Tell Duo why you're rejecting this tool execution..."),CANCEL_TEXT:Object(i.b)("MessageToolApproval.cancelText","Cancel"),[zt]:Object(i.b)("MessageToolApproval.toolStatusPending","Pending"),[Ht]:Object(i.b)("MessageToolApproval.toolStatusApproved","Approved"),TOGGLE_PARAMS_BUTTON_EXPAND:Object(i.b)("MessageToolApproval.collapseButtonCollapsed","Display tool details"),TOGGLE_PARAMS_BUTTON_COLLAPSE:Object(i.b)("MessageToolApproval.collapseButtonExpanded","Hide tool details"),MULTI_TOOL_TITLE:Object(i.b)("MessageToolApproval.multiToolTitle","Duo wants to execute %{count} tools.")},Qt={[N.a.createCommit]:"CreateCommitToolParams",[N.a.runCommand]:"RunCommandToolParams",[N.a.runGitCommand]:"RunCommandToolParams"},Yt={[N.a.createCommit]:Object(i.b)("MessageToolApproval.createCommitTitle","Commit and push to repository")};const Jt={name:"MessageToolApproval",components:{GlButton:o.a,GlButtonGroup:it.a,GlCard:rt.a,GlFormTextarea:$.a,GlFormGroup:Y.a,GlBadge:h.a,GlDisclosureDropdown:at.a,CreateCommitToolParams:Mt,DefaultToolParams:qt,RunCommandToolParams:Vt},props:{messages:{required:!0,type:Array},workingDirectory:{type:String,required:!1,default:""},isProcessing:{type:Boolean,required:!1,default:!1},approvalStatus:{type:String,required:!1,default:zt},approvalOptions:{type:Array,required:!1,default:()=>[{type:N.o.APPROVE_TOOL_ONCE,text:Kt.APPROVE_TEXT,primary:!0}],validator:e=>!!Array.isArray(e)&&(!!e.some(e=>e.type===N.o.APPROVE_TOOL_ONCE)&&e.every(e=>!("secondaryText"in e)||"string"==typeof e.secondaryText))}},data(){return{showDenialReason:!1,denialReason:"",localProcessingState:Wt,collapsed:this.approvalStatus===Ht}},computed:{multipleApprovalsNeeded(){return this.messages.length>1},primaryMessage(){return this.messages[0]||null},toolName(){var e,t;return(null===(e=this.primaryMessage)||void 0===e||null===(t=e.tool_info)||void 0===t?void 0:t.name)||this.$options.i18n.TOOL_UNKNOWN},toolParameters(){var e,t;return(null===(e=this.primaryMessage)||void 0===e||null===(t=e.tool_info)||void 0===t?void 0:t.args)||{}},toolResponse(){var e,t;return null===(e=this.primaryMessage)||void 0===e||null===(t=e.tool_info)||void 0===t?void 0:t.tool_response},camelCaseToolParameters(){return ft(this.toolParameters)},hasToolParameters(){return Object.keys(this.toolParameters).length>0},toolApprovalTitle(){return this.multipleApprovalsNeeded?this.$options.i18n.MULTI_TOOL_TITLE.replace("%{count}",this.messages.length):Yt[this.toolName]?Yt[this.toolName]:Object(ot.a)(ct(this.toolName))},toolStatusLabel(){return Kt[this.approvalStatus]},toolStatusVariant(){return{[zt]:"neutral",[Ht]:"info"}[this.approvalStatus]},collapsible(){return this.approvalStatus===Ht},collapseButtonProps(){return this.collapsed?{icon:"chevron-right",title:Kt.TOGGLE_PARAMS_BUTTON_EXPAND}:{icon:"chevron-down",title:Kt.TOGGLE_PARAMS_BUTTON_COLLAPSE}},isApproved(){return this.approvalStatus===Ht},isApproving(){return this.localProcessingState===Ut||this.isProcessing},isDenying(){return this.localProcessingState===Gt},buttonsDisabled(){return this.localProcessingState!==Wt||this.isProcessing},approveButtonText(){return this.isApproving?this.$options.i18n.APPROVING_TEXT:this.$options.i18n.APPROVE_TEXT},denyButtonText(){return this.isDenying?this.$options.i18n.DENYING_TEXT:this.$options.i18n.DENY_TEXT},toolParamsViewComponent(){return Qt[this.toolName]},safeApprovalOptions(){return this.approvalOptions||[]},primaryApprovalOption(){return this.safeApprovalOptions.find(e=>!0===e.primary)||this.safeApprovalOptions[0]||{}},additionalApprovalOptions(){return this.safeApprovalOptions.filter(e=>!0!==e.primary)},showSplitButton(){return this.safeApprovalOptions.length>1},approvalDropdownItems(){return this.additionalApprovalOptions.map(e=>({text:e.text,...e.secondaryText?{secondaryText:e.secondaryText}:{},extraAttrs:{...e.disabled?{disabled:!0}:{},"data-testid":"approve-dropdown-item"},action:()=>{var t;null===(t=this.$refs.approvalDropdown)||void 0===t||t.close(),this.handleDropdownSelection(e)}}))}},watch:{approvalStatus(e){e===Ht&&(this.collapsed=!0)}},methods:{approveWithType(e){this.localProcessingState===Wt&&(this.localProcessingState=Ut,this.$emit("approve-tool",{type:e}))},handleApprove(){const e=this.primaryApprovalOption.type||N.o.APPROVE_TOOL_ONCE;this.approveWithType(e)},handlePrimaryApprove(){this.approveWithType(this.primaryApprovalOption.type)},handleDropdownSelection(e){this.approveWithType(e.type)},handleDeny(){this.showDenialReason=!0},cancelDenial(){this.showDenialReason=!1,this.denialReason=""},submitDenial(){this.localProcessingState===Wt&&(this.localProcessingState=Gt,this.$emit("deny-tool",this.denialReason||null))},resetProcessingState(){this.localProcessingState=Wt,this.showDenialReason=!1,this.denialReason=""},convertKeysToCamelCase:e=>ft(e),getToolParamsComponent:e=>Qt[e]||"DefaultToolParams"},i18n:Kt,APPROVAL_TOOL_NAMES:N.a};var Zt=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("gl-card",{staticClass:"gl-w-full",class:{"message-tool-approval-collapsed":e.collapsed},attrs:{"header-class":{"message-tool-approval-collapsed-header":e.collapsed},"body-class":{"gl-hidden":e.collapsed}},scopedSlots:e._u([{key:"header",fn:function(){return[n("div",{staticClass:"gl-flex gl-items-center gl-justify-between gl-gap-3"},[n("span",{staticClass:"gl-inline-flex gl-items-center gl-gap-2"},[e.collapsible?n("gl-button",e._b({attrs:{variant:"default",category:"tertiary",size:"small","data-testid":"toggle-details-button"},on:{click:function(t){e.collapsed=!e.collapsed}}},"gl-button",e.collapseButtonProps,!1)):e._e(),e._v(" "),n("span",[e._v("\n "+e._s(e.toolApprovalTitle)+"\n ")])],1),e._v(" "),n("gl-badge",{attrs:{variant:e.toolStatusVariant}},[e._v("\n "+e._s(e.toolStatusLabel)+"\n ")])],1)]},proxy:!0},e.isApproved?null:{key:"footer",fn:function(){return[e.showDenialReason?n("div",[n("gl-form-group",{staticClass:"gl-mb-3",attrs:{label:e.$options.i18n.DENIAL_REASON_LABEL,"label-for":"inline-rejection-reason",optional:!0}},[n("gl-form-textarea",{attrs:{id:"inline-rejection-reason",placeholder:e.$options.i18n.DENIAL_REASON_PLACEHOLDER,rows:2,"no-resize":!0,"submit-on-enter":!1,disabled:e.buttonsDisabled,"data-testid":"denial-reason-textarea",autofocus:""},on:{submit:e.submitDenial},model:{value:e.denialReason,callback:function(t){e.denialReason=t},expression:"denialReason"}})],1),e._v(" "),n("div",{staticClass:"gl-flex gl-gap-3"},[n("gl-button",{attrs:{size:"small","data-testid":"submit-denial",variant:"confirm",disabled:e.buttonsDisabled,loading:e.isDenying},on:{click:e.submitDenial}},[e._v("\n "+e._s(e.denyButtonText)+"\n ")]),e._v(" "),n("gl-button",{attrs:{size:"small","data-testid":"cancel-denial",disabled:e.buttonsDisabled},on:{click:e.cancelDenial}},[e._v("\n "+e._s(e.$options.i18n.CANCEL_TEXT)+"\n ")])],1)],1):n("div",{staticClass:"gl-flex gl-gap-2"},[e.showSplitButton?n("gl-button-group",{attrs:{"data-testid":"approve-dropdown"}},[n("gl-button",{attrs:{variant:"confirm",size:"small",disabled:e.buttonsDisabled||e.primaryApprovalOption.disabled,loading:e.isApproving,"data-testid":"approve-dropdown-primary"},on:{click:e.handlePrimaryApprove}},[e._v("\n "+e._s(e.primaryApprovalOption.text)+"\n ")]),e._v(" "),n("gl-disclosure-dropdown",{ref:"approvalDropdown",attrs:{variant:"confirm",category:"primary",size:"small","no-caret":"",icon:"chevron-down","toggle-text":"More approval options","text-sr-only":"",placement:"bottom-end",disabled:e.buttonsDisabled||e.primaryApprovalOption.disabled,items:e.approvalDropdownItems},scopedSlots:e._u([{key:"list-item",fn:function(t){var i=t.item;return[n("span",[e._v(e._s(i.text))]),e._v(" "),i.secondaryText?n("span",{staticClass:"gl-block gl-text-sm gl-text-subtle"},[e._v("\n "+e._s(i.secondaryText)+"\n ")]):e._e()]}}],null,!1,1049862671)})],1):n("gl-button",{attrs:{variant:"confirm",size:"small","data-testid":"approve-tool-inline",disabled:e.buttonsDisabled||e.primaryApprovalOption.disabled,loading:e.isApproving},on:{click:e.handlePrimaryApprove}},[e._v("\n "+e._s(e.primaryApprovalOption.text)+"\n ")]),e._v(" "),n("gl-button",{attrs:{size:"small","data-testid":"deny-tool-inline",disabled:e.buttonsDisabled,loading:e.isDenying},on:{click:e.handleDeny}},[e._v("\n "+e._s(e.denyButtonText)+"\n ")])],1)]},proxy:!0}],null,!0)},[e._v(" "),e._l(e.messages,(function(t,i){return n("div",{key:t.id||i},[n(e.getToolParamsComponent(t.tool_info&&t.tool_info.name),e._b({tag:"component",class:["gl-leading-20",{"gl-border-t gl-mt-3 gl-border-gray-100 gl-pt-3":i>0}],attrs:{"tool-name":t.tool_info&&t.tool_info.name,"tool-params":e.convertKeysToCamelCase(t.tool_info&&t.tool_info.args||{}),"tool-response":t.tool_info&&t.tool_info.tool_response,"working-directory":e.workingDirectory}},"component",e.convertKeysToCamelCase(t.tool_info&&t.tool_info.args||{}),!1))],1)}))],2)},staticRenderFns:[]},void 0,Jt,void 0,!1,void 0,!1,void 0,void 0,void 0);const Xt={name:"MessageToolApproved",components:{MessageToolApproval:Zt},props:{message:{required:!0,type:Object},workingDirectory:{required:!1,type:String,default:""}},computed:{messages(){return[this.message]}}};var en=S()({render:function(){var e=this.$createElement;return(this._self._c||e)("message-tool-approval",this._g({attrs:{messages:this.messages,"working-directory":this.workingDirectory,"approval-status":"approved"}},this.$listeners))},staticRenderFns:[]},void 0,Xt,void 0,!1,void 0,!1,void 0,void 0,void 0);const tn={name:"DuoWorkflowEndMessage",components:{AgentMessage:We,GlButton:o.a},props:{endMessage:{required:!1,type:String,default:"Review the changes. To improve the implementation, create another session and describe the specific changes you'd like to see."},action:{required:!1,type:Object,default:null}},computed:{route(){return this.action&&Object.keys(this.action).length>0?void 0:this.$options.newRoute},buttonText(){var e;return(null===(e=this.action)||void 0===e?void 0:e.text)||"New session"}},newRoute:{name:"workflow-new"}};const nn=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("agent-message",{attrs:{message:{content:e.endMessage}},scopedSlots:e._u([{key:"message",fn:function(t){var i=t.content;return[n("p",[e._v("\n "+e._s(i)+"\n ")]),e._v(" "),n("gl-button",{staticClass:"gl-mt-4",attrs:{to:e.route},on:{click:function(t){return e.$emit("new-flow")}}},[e._v(e._s(e.buttonText))])]}}])})},staticRenderFns:[]},void 0,tn,void 0,!1,void 0,!1,void 0,void 0,void 0);const rn=[{component:We,matchMessage:e=>e.message_type===N.l.agent},{component:nn,matchMessage:e=>e.message_type===N.l.workflow_end},{component:Qe,matchMessage:e=>e.message_type===N.l.request},{component:en,matchMessage:e=>{var t;return e.message_type===N.l.tool&&Object.values(N.a).includes(null===(t=e.tool_info)||void 0===t?void 0:t.name)}},{component:nt,matchMessage:e=>e.message_type===N.l.tool},{component:He,matchMessage:e=>e.message_type===N.l.user}];const an={name:"MessageMap",props:{message:{type:Object,required:!0,validator:e=>e.message_type},messageRenderers:{type:Array,required:!1,validator:M.c,default:()=>[]},customStyles:{type:Object,required:!1,default:()=>({})},workingDirectory:{type:String,required:!1,default:""}},computed:{messageComponent(){const e=[...this.messageRenderers,...rn];try{var t;const n=e.find(e=>{let{matchMessage:t}=e;return t(this.message)});return null!==(t=null==n?void 0:n.component)&&void 0!==t?t:We}catch(e){return console.warn("Invalid message renderer found. Falling back to the default agent message renderer",e),We}}}};var on=S()({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.messageComponent,e._g(e._b({tag:"component",staticClass:"message-map-item gl-w-full",style:e.customStyles,attrs:{message:e.message,"working-directory":e.workingDirectory}},"component",e.$attrs,!1),e.$listeners))},staticRenderFns:[]},void 0,an,void 0,!1,void 0,!1,void 0,void 0,void 0);const sn={name:"DuoChatMessage",i18n:{CHAT_MESSAGE_COPIED:Object(c.b)("DuoChatMessage.chatMessageCopied","Copied"),CHAT_MESSAGE_COPY:Object(c.b)("DuoChatMessage.chatMessageCopyToClipboard","Copy to clipboard"),FROM_ME:Object(c.b)("DuoChatMessage.fromMe","Me:"),FROM_DUO:Object(c.b)("DuoChatMessage.fromDuo","Duo:")},safeHtmlConfigExtension:{ADD_TAGS:["copy-code","insert-code-snippet"]},components:{AgenticBinaryFeedback:q,AgenticFeedbackPanel:H,DocumentationSources:R,DuoChatContextItemSelections:A,MessageActionBar:Q,MessageFeedback:se,MessageMap:on,GlIcon:r.a,GlAnimatedLoaderIcon:a.a,GlButton:o.a,MarkdownRenderer:De},directives:{SafeHtml:s.a,GlTooltip:l.a},inject:{renderGFM:{from:"renderGFM",default:()=>e=>{e.classList.add("duo-chat-markdown","duo-chat-compact-markdown")}}},props:{message:{type:Object,required:!0},isCancelled:{type:Boolean,required:!0},trustedUrls:{type:Array,required:!1,default:()=>[],validator:e=>e.every(e=>"string"==typeof e)},withFeedback:{type:Boolean,required:!1,default:!0},workingDirectory:{type:String,required:!1,default:""},isBinaryFeedbackEnabled:{type:Boolean,required:!1,default:!1},showBinaryFeedback:{type:Boolean,required:!1,default:!1},messageRenderers:{type:Array,required:!1,validator:M.c,default:()=>[]}},data:()=>({messageWatcher:null,messageChunks:[],selectedContextItemsDefaultCollapsed:N.n,copied:!1,feedbackChoice:null,feedbackSubmitted:!1}),computed:{isDoneStreaming(){return Object.hasOwn(this.message,"status")?"success"===this.message.status:!this.isChunk},isChunk(){return"number"==typeof this.message.chunkId},isNotChunkOrCancelled(){return!this.isChunk||this.isCancelled},isChunkAndNotCancelled(){return this.isChunk&&!this.isCancelled},isAssistantMessage(){return this.isMessageOfType(N.l.assistant)},isUserMessage(){return this.isMessageOfType(N.l.user)},sources(){var e;return null===(e=this.message.extras)||void 0===e?void 0:e.sources},hasFeedback(){var e;return Boolean(null===(e=this.message.extras)||void 0===e?void 0:e.hasFeedback)},hasContentHtml(){var e;return(null===(e=this.message.contentHtml)||void 0===e?void 0:e.length)>0},defaultContent(){return this.hasContentHtml?this.message.contentHtml:this.message.content},messageContent(){return this.isAssistantMessage&&this.isChunk?Object(M.a)(this.messageChunks):this.defaultContent||Object(M.a)(this.message.chunks)},renderedError(){var e;return null===(e=this.message.errors)||void 0===e?void 0:e.join("; ")},error(){var e,t;return Boolean(null===(e=this.message)||void 0===e||null===(t=e.errors)||void 0===t?void 0:t.length)&&this.message.errors.join("; ")},selectedContextItems(){var e;return(null===(e=this.message.extras)||void 0===e?void 0:e.contextItems)||[]},displaySelectedContextItems(){return Boolean(this.selectedContextItems.length)},selectedContextItemsTitle(){if(!this.displaySelectedContextItems)return"";const e=this.selectedContextItems.length;return this.isUserMessage?Object(c.c)("DuoChatMessage.SelectedContextItemsTitleUserMessage","Included reference","Included references")(e):Object(c.a)(Object(c.c)("DuoChatMessage.SelectedContextItemsTitleAssistantMessage","Used %{count} included reference","Used %{count} included references")(e),{count:e})},shouldShowCopyAction(){return Boolean(!this.isChunk&&this.isAssistantMessage)},shouldShowFeedbackLink(){return this.withFeedback&&this.isNotChunkOrCancelled&&this.isAssistantMessage}},beforeCreate(){customElements.get("copy-code")||customElements.define("copy-code",Ae),customElements.get("insert-code-snippet")||customElements.define("insert-code-snippet",$e)},mounted(){this.isAssistantMessage&&(this.messageWatcher=this.$watch("message",this.manageMessageUpdate)),this.setChunks(),this.hydrateContentWithGFM()},updated(){this.hydrateContentWithGFM()},methods:{isMessageOfType(e){var t,n,i,r;return(null===(t=this.message)||void 0===t||null===(n=t.role)||void 0===n?void 0:n.toLowerCase())===e||(null===(i=this.message)||void 0===i||null===(r=i.message_type)||void 0===r?void 0:r.toLowerCase())===e},setChunks(){if(this.isChunk){const{chunkId:e,content:t}=this.message;this.$set(this.messageChunks,e-1,t)}else this.messageChunks=[]},stopWatchingMessage(){this.messageWatcher&&(this.messageWatcher(),this.messageWatcher=null)},async hydrateContentWithGFM(){await this.$nextTick(),this.isDoneStreaming&&this.$refs.content&&this.renderGFM(this.$refs.content.$el),this.detectScrollableCodeBlocks()},logEvent(e){this.$emit("track-feedback",{...e,message:this.message})},manageMessageUpdate(){this.setChunks(),this.isChunk||this.stopWatchingMessage()},onInsertCodeSnippet(e){this.$emit("insert-code-snippet",e)},onCopyCodeSnippet(e){this.$emit("copy-code-snippet",e)},onGetContextItemContent(e){this.$emit("get-context-item-content",{messageId:this.message.id,contextItem:e})},detectScrollableCodeBlocks(){document.querySelectorAll(".duo-chat-message pre").forEach(e=>{e.scrollHeight>e.offsetHeight&&(e.classList.add("scrim-bottom"),e.addEventListener("scroll",Object(u.a)(()=>this.toggleScrolling(e),200)))})},toggleScrolling(e){e.scrollHeight-e.scrollTop<=e.offsetHeight+16?e.classList.remove("scrim-bottom"):e.classList.add("scrim-bottom"),e.scrollTop>16?e.classList.add("scrim-top"):e.classList.remove("scrim-top")},onFeedbackTypeSelected(e){this.feedbackChoice=e},onFeedbackPanelSubmit(e){this.feedbackSubmitted=!0,this.logEvent(e)},onFeedbackPanelClose(){this.feedbackChoice=null},async copyMessage(){try{await Object(M.b)(this.message.content,this.$el),this.$emit("copy-message",{detail:{message:this.message.content}}),this.copied=!0}catch(e){console.warn("Failed to copy message:",e)}},onOpenFilePath(e){this.$emit("open-file-path",e)}}};var ln=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"content-wrapper",staticClass:"duo-chat-message-container gl-group gl-relative gl-flex gl-flex-col gl-gap-4 gl-text-base gl-break-anywhere",class:{"gl-pr-7":e.isAssistantMessage,"gl-justify-end gl-pl-7":e.isUserMessage,"duo-chat-message-complete":e.isDoneStreaming},on:{"insert-code-snippet":e.onInsertCodeSnippet,"copy-code-snippet":e.onCopyCodeSnippet}},[e.error?n("div",{ref:"error-message",staticClass:"duo-chat-message-with-error gl-flex gl-bg-feedback-danger gl-p-4"},[e.error?n("gl-icon",{staticClass:"error-icon !gl-mt-1 gl-mr-3 gl-shrink-0 gl-text-danger",attrs:{"aria-label":e.$options.i18n.MESSAGE_ERROR,name:"error",size:16,"data-testid":"error"}}):e._e(),e._v(" "),e.error?n("markdown-renderer",{ref:"error-message",staticClass:"duo-chat-message-error",attrs:{markdown:e.renderedError,"trusted-urls":e.trustedUrls}}):e._e()],1):e.isAssistantMessage||e.isUserMessage?[n("div",{staticClass:"gl-sr-only"},[e._v("\n "+e._s(e.isUserMessage?e.$options.i18n.FROM_ME:e.$options.i18n.FROM_DUO)+"\n ")]),e._v(" "),e.displaySelectedContextItems&&e.isAssistantMessage?n("duo-chat-context-item-selections",{attrs:{selections:e.selectedContextItems,title:e.selectedContextItemsTitle,"default-collapsed":e.selectedContextItemsDefaultCollapsed,variant:"assistant"},on:{"get-content":e.onGetContextItemContent}}):e._e(),e._v(" "),n("markdown-renderer",{ref:"content",staticClass:"duo-chat-message",class:{"gl-bg-feedback-info gl-p-4 gl-text-feedback-info":e.isUserMessage},attrs:{"is-html":e.hasContentHtml,markdown:e.messageContent,"trusted-urls":e.trustedUrls}}),e._v(" "),e.sources?n("documentation-sources",{attrs:{sources:e.sources}}):e._e(),e._v(" "),e.isAssistantMessage?[n("message-action-bar",[e.isChunkAndNotCancelled?n("gl-animated-loader-icon",{attrs:{"is-on":!0}}):e._e(),e._v(" "),e.shouldShowFeedbackLink&&e.isBinaryFeedbackEnabled?[e.showBinaryFeedback?n("agentic-binary-feedback",{attrs:{"feedback-choice":e.feedbackChoice,submitted:e.feedbackSubmitted,"data-testid":"agentic-feedback-latest"},on:{"select-type":e.onFeedbackTypeSelected}}):n("div",{staticClass:"agentic-feedback-hover-wrapper",class:{"-gl-mr-3 gl-w-0 gl-overflow-hidden gl-opacity-0":!e.feedbackChoice&&!e.feedbackSubmitted},attrs:{"data-testid":"agentic-feedback-hover-container"}},[n("agentic-binary-feedback",{attrs:{"feedback-choice":e.feedbackChoice,submitted:e.feedbackSubmitted},on:{"select-type":e.onFeedbackTypeSelected}})],1)]:e.shouldShowFeedbackLink?n("message-feedback",{attrs:{"has-feedback":e.hasFeedback},on:{feedback:e.logEvent}}):e._e(),e._v(" "),e.shouldShowCopyAction?n("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:{"!gl-text-success":e.copied,"!gl-text-subtle":!e.copied},attrs:{title:e.copied?e.$options.i18n.CHAT_MESSAGE_COPIED:e.$options.i18n.CHAT_MESSAGE_COPY,icon:e.copied?"check-circle-filled":"copy-to-clipboard",category:"tertiary",size:"small"},on:{click:e.copyMessage,focusout:function(t){e.copied=!1}}}):e._e()],2),e._v(" "),e.feedbackChoice&&!e.feedbackSubmitted?n("agentic-feedback-panel",{attrs:{"feedback-type":e.feedbackChoice},on:{submit:e.onFeedbackPanelSubmit,close:e.onFeedbackPanelClose}}):e._e()]:e._e(),e._v(" "),e.displaySelectedContextItems&&e.isUserMessage?n("duo-chat-context-item-selections",{attrs:{selections:e.selectedContextItems,title:e.selectedContextItemsTitle,"default-collapsed":e.selectedContextItemsDefaultCollapsed,variant:"user"},on:{"get-content":e.onGetContextItemContent}}):e._e()]:n("message-map",{attrs:{message:e.message,"message-renderers":e.messageRenderers,"with-feedback":e.withFeedback,"working-directory":e.workingDirectory,"data-testid":"workflow-message"},on:{"open-file-path":e.onOpenFilePath,feedback:e.logEvent}})],2)},staticRenderFns:[]},void 0,sn,void 0,!1,void 0,!1,void 0,void 0,void 0);const cn={CONVERSATION_NEW_CHAT:Object(i.b)("DuoChatConversation.newChat","New chat")},un=e=>Boolean(e)&&(null==e?void 0:e.role);const dn={name:"DuoChatConversation",components:{DuoChatMessage:ln,DuoChatMessageToolApproval:Zt},props:{messages:{type:Array,required:!1,default:()=>[],validator:e=>e.every(un)},canceledRequestIds:{type:Array,required:!1,default:()=>[]},enableCodeInsertion:{type:Boolean,required:!0},showDelimiter:{type:Boolean,required:!1,default:!0},trustedUrls:{type:Array,required:!1,default:()=>[],validator:e=>e.every(e=>"string"==typeof e)},withFeedback:{type:Boolean,required:!1,default:!0},isToolApprovalProcessing:{type:Boolean,required:!1,default:!1},workingDirectory:{type:String,required:!1,default:""},isBinaryFeedbackEnabled:{type:Boolean,required:!1,default:!1},messageRenderers:{type:Array,required:!1,validator:M.c,default:()=>[]}},computed:{isLastMessageToolApproval(){const e=this.messages[this.messages.length-1];return"request"===(null==e?void 0:e.message_type)&&Boolean(null==e?void 0:e.tool_info)},pendingToolApprovals(){if(!this.isLastMessageToolApproval)return[];const e=this.messages.findLastIndex(e=>"request"!==e.message_type||!e.tool_info);return this.messages.slice(e+1)},hasPendingToolApprovals(){return this.pendingToolApprovals.length>0},toolApprovalOptions(){var e;const t=this.pendingToolApprovals.length-1;return null===(e=this.pendingToolApprovals[t])||void 0===e?void 0:e.approvalOptions},lastAssistantMessageIndex(){return this.messages.findLastIndex(e=>{var t,n;return"assistant"===(null==e||null===(t=e.role)||void 0===t?void 0:t.toLowerCase())||"agent"===(null==e||null===(n=e.message_type)||void 0===n?void 0:n.toLowerCase())})}},methods:{onTrackFeedback(e){this.$emit("track-feedback",e)},onInsertCodeSnippet(e){this.$emit("insert-code-snippet",e)},onCopyCodeSnippet(e){this.$emit("copy-code-snippet",e)},onCopyMessage(e){this.$emit("copy-message",e)},onGetContextItemContent(e){this.$emit("get-context-item-content",e)},onOpenFilePath(e){this.$emit("open-file-path",e)},onApproveToolCall(e){this.$emit("approve-tool",e)},onDenyToolCall(e){this.$emit("deny-tool",e)}},i18n:cn};const fn=S()({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["gl-flex gl-flex-col gl-justify-end gl-gap-6",{"insert-code-hidden":!e.enableCodeInsertion}]},[e.showDelimiter?n("div",{staticClass:"gl-my-5 gl-flex gl-items-center gl-gap-4 gl-text-gray-500",attrs:{"data-testid":"conversation-delimiter"}},[n("hr",{staticClass:"gl-grow"}),e._v(" "),n("span",[e._v(e._s(e.$options.i18n.CONVERSATION_NEW_CHAT))]),e._v(" "),n("hr",{staticClass:"gl-grow"})]):e._e(),e._v(" "),e._l(e.messages,(function(t,i){return n("duo-chat-message",{key:t.role+"-"+i,attrs:{message:t,"trusted-urls":e.trustedUrls,"is-cancelled":e.canceledRequestIds.includes(t.requestId),"with-feedback":e.withFeedback,"working-directory":e.workingDirectory,"is-binary-feedback-enabled":e.isBinaryFeedbackEnabled,"show-binary-feedback":i===e.lastAssistantMessageIndex,"message-renderers":e.messageRenderers},on:{"track-feedback":e.onTrackFeedback,"insert-code-snippet":e.onInsertCodeSnippet,"copy-code-snippet":e.onCopyCodeSnippet,"copy-message":e.onCopyMessage,"get-context-item-content":e.onGetContextItemContent,"open-file-path":e.onOpenFilePath}})})),e._v(" "),e.hasPendingToolApprovals?n("duo-chat-message-tool-approval",{attrs:{messages:e.pendingToolApprovals,"is-processing":e.isToolApprovalProcessing,"approval-options":e.toolApprovalOptions},on:{"approve-tool":e.onApproveToolCall,"deny-tool":e.onDenyToolCall}}):e._e()],2)},staticRenderFns:[]},void 0,dn,void 0,!1,void 0,!1,void 0,void 0,void 0);t.a=fn},"+MKM":function(e,t,n){"use strict";var i=n("/iFl");t.a=function(){if(!arguments.length)return[];var e=arguments[0];return Object(i.a)(e)?e:[e]}},"+S2o":function(e,t,n){"use strict";var i=n("Kf9q"),r=n("7Pqr");var a=function(e,t){return Object(i.a)(e,t,(function(t,n){return Object(r.a)(e,n)}))},o=n("R242"),s=Object(o.a)((function(e,t){return null==e?{}:a(e,t)}));t.a=s},"+UhQ":function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"+WI6":function(e,t){var n={kind:"Document",definitions:[{kind:"EnumTypeDefinition",name:{kind:"Name",value:"LocalWidgetType"},directives:[],values:[{kind:"EnumValueDefinition",name:{kind:"Name",value:"ASSIGNEES"},directives:[]}]},{kind:"InterfaceTypeDefinition",name:{kind:"Name",value:"LocalWorkItemWidget"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"type"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalWidgetType"}}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"LocalWorkItemAssignees"},interfaces:[{kind:"NamedType",name:{kind:"Name",value:"LocalWorkItemWidget"}}],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"type"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalWidgetType"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"nodes"},arguments:[],type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"UserCore"}}},directives:[]}]},{kind:"ObjectTypeExtension",name:{kind:"Name",value:"WorkItem"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"mockWidgets"},arguments:[],type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalWorkItemWidget"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalUserInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"name"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"username"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"webUrl"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"avatarUrl"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalLabelInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"color"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"description"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"textColor"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"title"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalIterationCadence"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"title"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalIterationInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"description"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"iid"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"title"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"startDate"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"dueDate"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"webUrl"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"updatedAt"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"iterationCadence"},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalIterationCadence"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalMilestoneInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"expired"},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"title"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"state"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"dueDate"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"webUrl"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"webPath"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalCrmContactsInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"firstName"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"lastName"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"organizationName"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalUpdateWorkItemInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"WorkItemID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"assignees"},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalUserInput"}}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalRolledUpDatesInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"isFixed"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"rollUp"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"dueDate"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"startDate"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"LocalWorkItemPayload"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"workItem"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"WorkItem"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"errors"},arguments:[],type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalCustomFieldSelectOptionInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"value"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalCustomFieldInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"type"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"numberValue"},type:{kind:"NamedType",name:{kind:"Name",value:"Float"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"textValue"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"selectedOptions"},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalCustomFieldSelectOptionInput"}}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalStatusInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"name"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"iconName"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"color"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"position"},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]}]},{kind:"InputObjectTypeDefinition",name:{kind:"Name",value:"LocalUpdateNewWorkItemInput"},directives:[],fields:[{kind:"InputValueDefinition",name:{kind:"Name",value:"fullPath"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"workItemType"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"healthStatus"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"assignees"},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalUserInput"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"color"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"title"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"description"},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"confidential"},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"labels"},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalLabelInput"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"iteration"},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalIterationInput"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"milestone"},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalMilestoneInput"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"rolledUpDates"},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalRolledUpDatesInput"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"crmContacts"},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalCrmContactsInput"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"weight"},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"customField"},type:{kind:"NamedType",name:{kind:"Name",value:"LocalCustomFieldInput"}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"status"},type:{kind:"NamedType",name:{kind:"Name",value:"LocalStatusInput"}},directives:[]}]},{kind:"ObjectTypeExtension",name:{kind:"Name",value:"Mutation"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"updateNewWorkItem"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"input"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalUpdateNewWorkItemInput"}}},directives:[]}],type:{kind:"NamedType",name:{kind:"Name",value:"LocalWorkItemPayload"}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"localUpdateWorkItem"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"input"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LocalUpdateWorkItemInput"}}},directives:[]}],type:{kind:"NamedType",name:{kind:"Name",value:"LocalWorkItemPayload"}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"updateActiveDesignDiscussion"},arguments:[{kind:"InputValueDefinition",name:{kind:"Name",value:"id"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"InputValueDefinition",name:{kind:"Name",value:"source"},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"ActiveDesignDiscussion"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"id"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"source"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}]},{kind:"ObjectTypeExtension",name:{kind:"Name",value:"Query"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"activeDesignDiscussion"},arguments:[],type:{kind:"NamedType",name:{kind:"Name",value:"ActiveDesignDiscussion"}},directives:[]}]},{kind:"ObjectTypeDefinition",name:{kind:"Name",value:"LocalWorkItemChildIsExpanded"},interfaces:[],directives:[],fields:[{kind:"FieldDefinition",name:{kind:"Name",value:"id"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"WorkItemID"}}},directives:[]},{kind:"FieldDefinition",name:{kind:"Name",value:"isExpanded"},arguments:[],type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}]}],loc:{start:0,end:2545}};n.loc.source={body:"enum LocalWidgetType {\n ASSIGNEES\n}\n\ninterface LocalWorkItemWidget {\n type: LocalWidgetType!\n}\n\ntype LocalWorkItemAssignees implements LocalWorkItemWidget {\n type: LocalWidgetType!\n nodes: [UserCore]\n}\n\nextend type WorkItem {\n mockWidgets: [LocalWorkItemWidget]\n}\n\ninput LocalUserInput {\n id: ID!\n name: String\n username: String\n webUrl: String\n avatarUrl: String\n}\n\ninput LocalLabelInput {\n color: String\n description: String\n id: ID!\n textColor: String\n title: String\n}\n\ninput LocalIterationCadence {\n id: ID!\n title: String\n}\n\ninput LocalIterationInput {\n description: String\n id: ID!\n iid: String\n title: String\n startDate: String\n dueDate: String\n webUrl: String\n updatedAt: String\n iterationCadence: [LocalIterationCadence]\n}\n\ninput LocalMilestoneInput {\n expired: Boolean\n id: ID!\n title: String\n state: String\n dueDate: String\n webUrl: String\n webPath: String\n}\n\ninput LocalCrmContactsInput {\n firstName: String\n lastName: String\n organizationName: String\n id: ID!\n}\n\ninput LocalUpdateWorkItemInput {\n id: WorkItemID!\n assignees: [LocalUserInput!]\n}\n\ninput LocalRolledUpDatesInput {\n isFixed: Boolean!\n rollUp: Boolean!\n dueDate: String\n startDate: String\n}\n\ntype LocalWorkItemPayload {\n workItem: WorkItem!\n errors: [String!]\n}\n\ninput LocalCustomFieldSelectOptionInput {\n id: ID!\n value: String\n}\n\ninput LocalCustomFieldInput {\n id: ID!\n type: String!\n numberValue: Float\n textValue: String\n selectedOptions: [LocalCustomFieldSelectOptionInput]\n}\n\ninput LocalStatusInput {\n id: ID!\n name: String!\n iconName: String\n color: String\n position: Int\n}\n\ninput LocalUpdateNewWorkItemInput {\n fullPath: String!\n workItemType: String!\n healthStatus: String\n assignees: [LocalUserInput]\n color: String\n title: String\n description: String\n confidential: Boolean\n labels: [LocalLabelInput]\n iteration: [LocalIterationInput]\n milestone: [LocalMilestoneInput]\n rolledUpDates: [LocalRolledUpDatesInput]\n crmContacts: [LocalCrmContactsInput]\n weight: Int\n customField: LocalCustomFieldInput\n status: LocalStatusInput\n}\n\nextend type Mutation {\n updateNewWorkItem(input: LocalUpdateNewWorkItemInput!): LocalWorkItemPayload\n localUpdateWorkItem(input: LocalUpdateWorkItemInput!): LocalWorkItemPayload\n updateActiveDesignDiscussion(id: ID!, source: String!): Boolean\n}\n\ntype ActiveDesignDiscussion {\n id: ID\n source: String\n}\n\nextend type Query {\n activeDesignDiscussion: ActiveDesignDiscussion\n}\n\ntype LocalWorkItemChildIsExpanded {\n id: WorkItemID!\n isExpanded: Boolean!\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};e.exports=n},"+gDy":function(e,t,n){"use strict";var i=n("S7Cj");t.a=function(){return i.a.Date.now()}},"+jIR":function(e,t){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"WorkItemPermissions"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"WorkItemPermissions"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adminParentLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminWorkItemLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createNote"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteWorkItem"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"markNoteAsInternal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"moveWorkItem"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reportSpam"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"setWorkItemMetadata"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"summarizeComments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updateWorkItem"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"blockedWorkItems"},arguments:[],directives:[]}]}}],loc:{start:0,end:251}};n.loc.source={body:"fragment WorkItemPermissions on WorkItemPermissions {\n adminParentLink\n adminWorkItemLink\n createNote\n deleteWorkItem\n markNoteAsInternal\n moveWorkItem\n reportSpam\n setWorkItemMetadata\n summarizeComments\n updateWorkItem\n blockedWorkItems\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"WorkItemPermissions")},"+rsL":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c}));var i=n("UNrv"),r=n("fEGC"),a=Object.prototype.hasOwnProperty;function o(){for(var e=[],t=0;t1)for(var i=new c,r=1;r0||i.removedNodes.length>0))&&(n=!0)}n&&t()}));return a.observe(e,{childList:!0,subtree:!0,...n}),a}},"+wZC":function(e,t,n){"use strict";var i=n("yzEV"),r=n("zNqO"),a=n("n64d"),o=n("pTIT"),s=n("EXdk"),l=n("/2q6"),c=n("eOJu"),u=n("Cn4y"),d=n("tslw"),f=n("slyf"),p=n("Ccns");const h=o.S+"active",m=Object(c.m)({...d.b,active:Object(u.a)(s.f,!1),buttonId:Object(u.a)(s.q),disabled:Object(u.a)(s.f,!1),lazy:Object(u.a)(s.f,!1),noBody:Object(u.a)(s.f,!1),tag:Object(u.a)(s.q,"div"),title:Object(u.a)(s.q),titleItemClass:Object(u.a)(s.d),titleLinkAttributes:Object(u.a)(s.m),titleLinkClass:Object(u.a)(s.d)}),g=Object(r.c)({name:a.A,mixins:[d.a,f.a],inject:{getBvTabs:{default:function(){return function(){return{}}}}},props:m,data(){return{localActive:this.active&&!this.disabled}},computed:{bvTabs(){return this.getBvTabs()},_isTab:()=>!0,tabClasses(){const{localActive:e,disabled:t}=this;return[{active:e,disabled:t,"card-body":this.bvTabs.card&&!this.noBody},e?this.bvTabs.activeTabClass:null]},controlledBy(){return this.buttonId||this.safeId("__BV_tab_button__")},computedNoFade(){return!this.bvTabs.fade},computedLazy(){return this.bvTabs.lazy||this.lazy}},watch:{active(e,t){e!==t&&(e?this.activate():this.deactivate()||this.$emit(h,this.localActive))},disabled(e,t){if(e!==t){const{firstTab:t}=this.bvTabs;e&&this.localActive&&t&&(this.localActive=!1,t())}},localActive(e){this.$emit(h,e)}},mounted(){this.registerTab()},updated(){const{updateButton:e}=this.bvTabs;e&&this.hasNormalizedSlot(l.y)&&e(this)},beforeDestroy(){this.unregisterTab()},methods:{registerTab(){const{registerTab:e}=this.bvTabs;e&&e(this)},unregisterTab(){const{unregisterTab:e}=this.bvTabs;e&&e(this)},activate(){const{activateTab:e}=this.bvTabs;return!(!e||this.disabled)&&e(this)},deactivate(){const{deactivateTab:e}=this.bvTabs;return!(!e||!this.localActive)&&e(this)}},render(e){const{localActive:t}=this,n=e(this.tag,{staticClass:"tab-pane",class:this.tabClasses,directives:[{name:"show",value:t}],attrs:{role:"tabpanel",id:this.safeId(),"aria-hidden":t?"false":"true","aria-labelledby":this.controlledBy||null},ref:"panel"},[t||!this.computedLazy?this.normalizeSlot():e()]);return e(p.a,{props:{mode:"out-in",noFade:this.computedNoFade}},[n])}});var v=n("9/Bc"),b=n("mpVB"),y=n("OJiF"),_={name:"GlTab",components:{BTab:g,GlBadge:v.a},inheritAttrs:!1,props:{titleLinkClass:{type:[String,Array,Object],required:!1,default:""},queryParamValue:{type:String,required:!1,default:null},tabCount:{type:Number,required:!1,default:null},tabCountSrText:{type:String,required:!1,default:null}},computed:{linkClass(){const{titleLinkClass:e}=this;return Array.isArray(e)?[...e,y.a]:Object(i.a)(e)?{...e,[y.a]:!0}:`${e} ${y.a}`.trim()},hasTabCount(){return null!=this.tabCount&&this.tabCount>=0}},created(){this.hasTabCount&&!this.tabCountSrText&&Object(b.i)('When using "tab-count", you should also provide "tab-count-sr-text" for screen reader accessibility. Example: :tab-count-sr-text="n__(\'%d item\', \'%d items\', count)"',{name:"GlTab"})}},k=n("tBpV"),w=Object(k.a)(_,(function(){var e=this,t=e._self._c;return t("b-tab",e._g(e._b({attrs:{title:e.hasTabCount?null:e.$attrs.title,"title-link-class":e.linkClass,"query-param-value":e.queryParamValue},scopedSlots:e._u([e.hasTabCount?{key:"title",fn:function(){return[e._t("title",(function(){return[e._v(e._s(e.$attrs.title))]})),e._v(" "),t("gl-badge",{staticClass:"gl-ml-2",attrs:{variant:"neutral","aria-hidden":"true","data-testid":"tab-counter-badge"}},[e._v("\n "+e._s(e.tabCount)+"\n ")]),e._v(" "),e.tabCountSrText?t("span",{staticClass:"gl-sr-only"},[e._v(e._s(e.tabCountSrText))]):e._e()]},proxy:!0}:null,e._l(Object.keys(e.$scopedSlots),(function(t){return{key:t,fn:function(){return[e._t(t)]},proxy:!0}}))],null,!0)},"b-tab",e.$attrs,!1),e.$listeners))}),[],!1,null,null,null);t.a=w.exports},"+xG8":function(e,t,n){"use strict";var i=n("Iwu2"),r=n("BWND"),a=n("6RY3"),o=n("7Sby"),s=n("1GJI"),l=o("iterator"),c=Object;e.exports=function(e){if(a(e))return!1;var t=c(e);return void 0!==t[l]||"@@iterator"in t||r(s,i(t))}},"+xUc":function(e,t,n){"use strict";var i={};i[n("7Sby")("toStringTag")]="z",e.exports="[object z]"===String(i)},"/23t":function(e,t,n){"use strict";var i=function(e,t,n,i){for(var r=-1,a=null==e?0:e.length;++r0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"getDuoWorkflowEvents")},"/w+w":function(e,t,n){"use strict";var i={props:{heading:{type:String,required:!1,default:null},inlineActions:{type:Boolean,required:!1,default:!1}}},r=n("tBpV"),a=Object(r.a)(i,(function(){var e=this,t=e._self._c;return t("header",{staticClass:"gl-my-5 gl-flex gl-flex-wrap gl-items-center gl-justify-between gl-gap-y-3"},[t("div",{staticClass:"gl-flex gl-w-full gl-flex-wrap gl-justify-between gl-gap-x-5 gl-gap-y-3 @md/panel:gl-flex-nowrap"},[t("h1",{staticClass:"gl-heading-1 !gl-m-0",attrs:{"data-testid":"page-heading"}},[e._t("heading"),e._v(" "),e.$scopedSlots.heading?e._e():[e._v(e._s(e.heading))]],2),e._v(" "),e.$scopedSlots.actions?t("div",{staticClass:"page-heading-actions gl-flex gl-shrink-0 gl-flex-wrap gl-items-center gl-gap-3 @md/panel:gl-mt-1 @lg/panel:gl-mt-2",class:{"gl-w-full @sm/panel:gl-w-auto":!e.inlineActions,"gl-w-auto":e.inlineActions},attrs:{"data-testid":"page-heading-actions"}},[e._t("actions")],2):e._e()]),e._v(" "),e.$scopedSlots.description?t("div",{staticClass:"gl-w-full gl-text-subtle",attrs:{"data-testid":"page-heading-description"}},[e._t("description")],2):e._e()])}),[],!1,null,null,null);t.a=a.exports},"/whJ":function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d}));n("3UXl"),n("iyoE");var i=n("zNqO"),r=n("EXdk"),a=n("WkQt"),o=n("S6lQ"),s=n("dJQL"),l=n("eOJu"),c=n("w1kk");const u={disabledField:{type:r.q,required:!1,default:"disabled"},htmlField:{type:r.q,required:!1,default:"html"},options:{type:[r.b,r.m],required:!1,default:function(){return[]}},textField:{type:r.q,required:!1,default:"text"},valueField:{type:r.q,required:!1,default:"value"}},d=Object(i.c)({props:u,computed:{formOptions(){return this.normalizeOptions(this.options)}},methods:{normalizeOption(e,t=null){if(Object(s.j)(e)){const n=Object(a.a)(e,this.valueField),i=Object(a.a)(e,this.textField);return{value:Object(s.n)(n)?t||i:n,text:Object(o.b)(String(Object(s.n)(i)?t:i)),html:Object(a.a)(e,this.htmlField),disabled:Boolean(Object(a.a)(e,this.disabledField))}}return{value:t||e,text:Object(o.b)(String(e)),disabled:!1}},normalizeOptions(e){var t=this;return Object(s.a)(e)?e.map((function(e){return t.normalizeOption(e)})):Object(s.j)(e)?(Object(c.a)('Setting prop "options" to an object is deprecated. Use the array format instead.',this.$options.name),Object(l.h)(e).map((function(n){return t.normalizeOption(e[n]||{},n)}))):[]}}})},"0/Qg":function(e,t,n){"use strict";var i=n("Vnt5"),r=n("9peN"),a=n("Boge"),o=n("XL66"),s=Object(r.a)((function(e){return Object(a.a)(Object(i.a)(e,1,o.a,!0))}));t.a=s},"02Yq":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAiSlashCommands"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"url"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aiSlashCommands"},arguments:[{kind:"Argument",name:{kind:"Name",value:"url"},value:{kind:"Variable",name:{kind:"Name",value:"url"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shouldSubmit"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:121}};n.loc.source={body:"query getAiSlashCommands($url: String!) {\n aiSlashCommands(url: $url) {\n description\n name\n shouldSubmit\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"getAiSlashCommands")},"08nS":function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n("v2fZ");var i=n("qVD8"),r=n("ftIw"),a=n("VmVg"),o=n("uwTf"),s=n("Wmwu");class l extends o.a{constructor(e){super(a.a),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;null!=t&&t.aliasResolveCache?n=t.aliasResolveCache:(n=[],Object(r.a)(e,{Node:function(e,t){(Object(a.i)(t)||Object(a.h)(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let i=void 0;for(const e of n){if(e===this)break;e.anchor===this.source&&(i=e)}return i}toJSON(e,t){var n;if(!t)return{source:this.source};const{anchors:i,doc:r,maxAliasCount:o}=t,l=this.resolve(r,t);if(!l){const e="Unresolved alias (the anchor must be set before the alias): "+this.source;throw new ReferenceError(e)}let c=i.get(l);if(c||(Object(s.a)(l,null,t),c=i.get(l)),void 0===(null===(n=c)||void 0===n?void 0:n.res)){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(o>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=function e(t,n,i){if(Object(a.i)(n)){const e=n.resolve(t),r=i&&e&&i.get(e);return r?r.count*r.aliasCount:0}if(Object(a.j)(n)){let r=0;for(const a of n.items){const n=e(t,a,i);n>r&&(r=n)}return r}if(Object(a.n)(n)){const r=e(t,n.key,i),a=e(t,n.value,i);return Math.max(r,a)}return 1}(r,l,i)),c.count*c.aliasCount>o)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return c.res}toString(e,t,n){const r="*"+this.source;if(e){if(Object(i.a)(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e="Unresolved alias (the anchor must be set before the alias): "+this.source;throw new Error(e)}if(e.implicitKey)return r+" "}return r}}},"0AwG":function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"q",(function(){return f})),n.d(t,"r",(function(){return p})),n.d(t,"m",(function(){return h})),n.d(t,"y",(function(){return m})),n.d(t,"z",(function(){return g})),n.d(t,"E",(function(){return v})),n.d(t,"I",(function(){return y})),n.d(t,"H",(function(){return _})),n.d(t,"F",(function(){return k})),n.d(t,"f",(function(){return w})),n.d(t,"C",(function(){return S})),n.d(t,"h",(function(){return O})),n.d(t,"j",(function(){return C})),n.d(t,"i",(function(){return D})),n.d(t,"k",(function(){return j})),n.d(t,"l",(function(){return x})),n.d(t,"A",(function(){return E})),n.d(t,"G",(function(){return I})),n.d(t,"p",(function(){return A})),n.d(t,"t",(function(){return N})),n.d(t,"v",(function(){return F})),n.d(t,"B",(function(){return P})),n.d(t,"n",(function(){return R})),n.d(t,"u",(function(){return M})),n.d(t,"e",(function(){return B})),n.d(t,"o",(function(){return $})),n.d(t,"s",(function(){return V})),n.d(t,"D",(function(){return U})),n.d(t,"g",(function(){return G})),n.d(t,"w",(function(){return W})),n.d(t,"x",(function(){return z}));n("UezY"),n("z6RN"),n("hG7+"),n("RFHG"),n("xuo1"),n("3UXl"),n("iyoE"),n("ZzK0"),n("BzOf"),n("v2fZ"),n("I7zw"),n("Za0o"),n("ilaN"),n("YQvl"),n("AIWn"),n("sL2E"),n("j8dx"),n("pWsu"),n("xQ6m"),n("cDvR");var i=n("RTFG"),r=n("v1ID"),a=n("/lV4"),o=n("fQCf"),s=n("GuZl");const l=":",c="-",u="\n",d=function(e){return e?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):e},f=function(e){return e>99?"99+":e},p=function(e,t="_"){const n=new RegExp(t,"g");return e.charAt(0).toUpperCase()+e.replace(n," ").slice(1)},h=function(e){return e.replace(/[_\s]+/g,"-")},m=function(e,t="-"){const n=e.trim().toLowerCase().replace(/[^a-zA-Z0-9_.-]+/g,t).split(t).filter(Boolean).join(t);return n===t?"":n},g=function(e){return m(e,"_")},v=function(e,t){return e.length-1>t?e.substr(0,t-1)+"…":e},b=Object(i.a)((function(e={}){const{fontSize:t=12,fontFamily:n="sans-serif",chars:i=" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"}=e,r=document.createElement("div");r.style.fontFamily=n,r.style.fontSize=t+"px",r.style.position="absolute",r.style.left=-1e3,r.style.top=-1e3,r.innerHTML=i,document.body.appendChild(r);const a=r.clientWidth;return document.body.removeChild(r),a/i.length/t})),y=function(e,t={}){const{maxWidth:n=s.q,fontSize:i=s.p}=t,{truncateIndex:r}=e.split("").reduce((function(e,t,r){let a=r;return e.width>n&&(a=e.truncateIndex),{width:e.width+b()*i,truncateIndex:a}}),{width:0,truncateIndex:0});return v(e,r)},_=function(e){return e.substring(0,8)},k=function(e,t=7){if(!e)return e;const n=e.trim(),i=n.split(/\s+/).slice(0,t).join(" ");return i.length]*>/g,t):e},O=function(e){return e.replace(/([a-z0-9])_([a-z0-9])/gi,(function(e,t,n){return`${t}${n.toUpperCase()}`}))},C=function(e){return g((e.match(/([a-zA-Z][^A-Z]*)/g)||[e]).join(" "))},D=function(e){return e.split(" ").map((function(e,t){return t>0?e.toLowerCase():e})).join(" ")},j=function(e){return e.replace(/\b[a-z]/g,(function(e){return e.toUpperCase()}))},T=[[/[ÀÁÂÃÅĀĂĄ]/g,"A"],[/[Æ]/g,"AE"],[/[ÇĆĈĊČ]/g,"C"],[/[ÈÉÊËĒĔĖĘĚ]/g,"E"],[/[ÌÍÎÏĨĪĬĮİ]/g,"I"],[/[Ððĥħ]/g,"h"],[/[ÑŃŅŇʼn]/g,"N"],[/[ÒÓÔÕØŌŎŐ]/g,"O"],[/[ÙÚÛŨŪŬŮŰŲ]/g,"U"],[/[ÝŶŸ]/g,"Y"],[/[Þñþńņň]/g,"n"],[/[ߌŜŞŠ]/g,"S"],[/[àáâãåāăąĸ]/g,"a"],[/[æ]/g,"ae"],[/[çćĉċč]/g,"c"],[/[èéêëēĕėęě]/g,"e"],[/[ìíîïĩīĭį]/g,"i"],[/[òóôõøōŏő]/g,"o"],[/[ùúûũūŭůűų]/g,"u"],[/[ýÿŷ]/g,"y"],[/[ĎĐ]/g,"D"],[/[ďđ]/g,"d"],[/[ĜĞĠĢ]/g,"G"],[/[ĝğġģŊŋſ]/g,"g"],[/[ĤĦ]/g,"H"],[/[ıśŝşš]/g,"s"],[/[IJ]/g,"IJ"],[/[ij]/g,"ij"],[/[Ĵ]/g,"J"],[/[ĵ]/g,"j"],[/[Ķ]/g,"K"],[/[ķ]/g,"k"],[/[ĹĻĽĿŁ]/g,"L"],[/[ĺļľŀł]/g,"l"],[/[Œ]/g,"OE"],[/[œ]/g,"oe"],[/[ŔŖŘ]/g,"R"],[/[ŕŗř]/g,"r"],[/[ŢŤŦ]/g,"T"],[/[ţťŧ]/g,"t"],[/[Ŵ]/g,"W"],[/[ŵ]/g,"w"],[/[ŹŻŽ]/g,"Z"],[/[źżž]/g,"z"],[/ö/g,"oe"],[/ü/g,"ue"],[/ä/g,"ae"],[/Ö/g,"Oe"],[/Ü/g,"Ue"],[/Ä/g,"Ae"]],x=function(e){let t=e;return T.forEach((function([e,n]){t=t.replace(e,n)})),t},E=function(e){return e.replace(/([A-Z]+)([A-Z][a-z])/g," $1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").trim()},I=function(e=""){if(null===e||!Object(r.default)(e))return"";const t=e.split(" / ");if(1===t.length)return e;t.splice(-1,1);let n=t.join(" / ");return t.length>2&&(n=`${t[0]} / ... / ${t.pop()}`),n},A=function(e){return Object(r.default)(e)&&""!==e.trim()},N=function(e){return/^[0-9a-f]{5,40}$/.test(e)};const F={ALLOWED_TAGS:["a","abbr","b","blockquote","br","code","dd","del","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","ol","p","pre","q","rp","rt","ruby","s","samp","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"],ALLOWED_ATTR:["class","style","href","src","dir"],ALLOW_DATA_ATTR:!1},P={...F,ALLOWED_TAGS:F.ALLOWED_TAGS.filter((function(e){return"img"!==e}))},L=/'/g,R=function(e){return`'${e.replace(L,(function(){return"'\\''"}))}'`},M=function(e){return e>1e3?"1,000+":e};function B(e){return new TextDecoder("utf8").decode(Object(o.b)(e))}const q=[" ","~","^",":","?","*","[","..","@{","\\","//"],$=function(e){const t=[];return q.forEach((function(n){e.indexOf(n)>-1&&t.push(n)})),t},V=function(e=[]){const t=e.filter((function(e){return q.includes(e)}));return t.length&&!t.includes(" ")?Object(a.j)(Object(a.a)("Can't contain %{chars}"),{chars:t.join(", ")}):t.includes(" ")&&t.length<=1?Object(a.a)("Can't contain spaces"):t.includes(" ")&&t.length>1?Object(a.j)(Object(a.a)("Can't contain spaces, %{chars}"),{chars:t.filter((function(e){return" "!==e})).join(", ")}):""},U=function(e){return e.replace(/^('|")(.*)('|")$/,"$2")},G=function(e){return e.toLowerCase().split(" ").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join(" ")},W=async function(e){const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")},z=function(e){let t=0;for(let n=0;n>>0).toString(16).padStart(8,"0")}},"0DeP":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));n("ZzK0"),n("z6RN"),n("BzOf"),n("v2fZ"),n("UezY"),n("hG7+");var i=n("TK7X"),r=n("QJEF");function a(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";class s{constructor(e={}){var t=this;a(this,"startIntersectionObserver",(function(){t.throttledElementsInView=Object(i.a)((function(){return t.checkElementsInView()}),300),t.intersectionObserver=new IntersectionObserver(t.onIntersection,{rootMargin:"500px 0px",thresholds:.1})})),a(this,"onIntersection",(function(e){e.forEach((function(e){e.intersectionRatio>0&&(t.intersectionObserver.unobserve(e.target),t.lazyImages.push(e.target))})),t.throttledElementsInView()})),this.intersectionObserver=null,this.lazyImages=[],this.observerNode=e.observerNode||"#content-body";(e.scrollContainer||window).addEventListener("load",(function(){return t.register()}))}static supportsNativeLazyLoading(){return"loading"in HTMLImageElement.prototype}static supportsIntersectionObserver(){return Boolean(window.IntersectionObserver)}searchLazyImages(){var e=this;window.requestIdleCallback((function(){const t=[].slice.call(document.querySelectorAll(".lazy"));s.supportsNativeLazyLoading()?t.forEach((function(e){return s.loadImage(e)})):s.supportsIntersectionObserver()?e.intersectionObserver&&t.forEach((function(t){return e.intersectionObserver.observe(t)})):t.length&&(e.lazyImages=t,e.checkElementsInView())}),{timeout:500})}startContentObserver(){var e=this;const t=document.querySelector(this.observerNode)||document.querySelector("body");t&&!this.mutationObserver&&(this.mutationObserver=new MutationObserver((function(){return e.searchLazyImages()})),this.mutationObserver.observe(t,{childList:!0,subtree:!0}))}stopContentObserver(){this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)}unregister(){this.stopContentObserver(),this.intersectionObserver&&(this.intersectionObserver.takeRecords(),this.intersectionObserver.disconnect(),this.intersectionObserver=null),this.throttledScrollCheck&&window.removeEventListener("scroll",this.throttledScrollCheck),this.debouncedElementsInView&&window.removeEventListener("resize",this.debouncedElementsInView)}register(){s.supportsNativeLazyLoading()||(s.supportsIntersectionObserver()?this.startIntersectionObserver():this.startLegacyObserver()),this.startContentObserver(),this.searchLazyImages()}startLegacyObserver(){var e=this;this.throttledScrollCheck=Object(i.a)((function(){return e.scrollCheck()}),300),this.debouncedElementsInView=Object(r.a)((function(){return e.checkElementsInView()}),300),window.addEventListener("scroll",this.throttledScrollCheck),window.addEventListener("resize",this.debouncedElementsInView)}scrollCheck(){var e=this;window.requestAnimationFrame((function(){return e.checkElementsInView()}))}checkElementsInView(){var e=this;const t=window.pageYOffset,n=t+window.innerHeight+500;this.lazyImages=this.lazyImages.filter((function(i){if(i.dataset.src){const r=i.getBoundingClientRect(),a=t+r.top,o=a+r.height;return t<=o&&n>=a?(window.requestAnimationFrame((function(){s.loadImage(i)})),!1):!s.supportsIntersectionObserver()||(e.intersectionObserver&&e.intersectionObserver.observe(i),!1)}return!1}))}static loadImage(e){if(e.dataset.src){e.setAttribute("loading","lazy");let t=e.dataset.src;if(t.indexOf("/avatar/")>-1&&-1===t.indexOf("?")){t+="?width="+(e.getAttribute("width")||e.width)}e.setAttribute("src",t),delete e.dataset.src,e.classList.remove("lazy"),e.classList.add("js-lazy-loaded"),e.dataset.testid="js-lazy-loaded-content"}}}},"0Hoz":function(e,t,n){"use strict";var i=n("CBWQ"),r=n("KEpU");const a=Object.assign(i.a,{mixin:(e={})=>({computed:{trackingCategory(){return("tracking"in this?this.tracking.category:null)||e.category},trackingOptions(){const t="tracking"in this?this.tracking:{};return Object(r.b)({...e,...t})}},methods:{track(e,t={}){const n=t.category||this.trackingCategory,i={...this.trackingOptions,...t};a.event(n,e,i)}}})});t.a=a},"0J3d":function(e,t,n){"use strict";var i=n("ZfjD"),r=n("H81m"),a=n("oaN/"),o=n("70tN"),s=n("re4r"),l=n("T3ZR"),c=n("Fh9u"),u=n("vLke"),d=n("QmHw"),f=TypeError,p=d((function(){[].keys().reduce((function(){}),void 0)})),h=!p&&c("reduce",f);i({target:"Iterator",proto:!0,real:!0,forced:p||h},{reduce:function(e){o(this);try{a(e)}catch(e){l(this,"throw",e)}var t=arguments.length<2,n=t?void 0:arguments[1];if(h)return u(h,this,t?[e]:[e,n]);var i=s(this),c=0;if(r(i,(function(i){t?(t=!1,n=i):n=e(n,i,c),c++}),{IS_RECORD:!0}),t)throw new f("Reduce of empty iterator with no initial value");return n}})},"0KyK":function(e,t,n){"use strict";var i=n("/lV4");t.a=function(e){e.mixin({methods:{__:i.a,n__:i.h,s__:i.i,sprintf:i.j}})}},"0Pa5":function(e,t,n){"use strict";var i=n("WmU+"),r=n("yg9e");e.exports=function(e){if("Function"===i(e))return r(e)}},"0V/h":function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var i=n("mgeq"),r=n("z61M");function a(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];e&&e.length&&e.forEach((function(e){if("skip"===(n=e.name.value)||"include"===n){var n,r=e.arguments,a=e.name.value;__DEV__?Object(i.c)(r&&1===r.length,"Incorrect number of arguments for the @".concat(a," directive.")):Object(i.c)(r&&1===r.length,38);var o=r[0];__DEV__?Object(i.c)(o.name&&"if"===o.name.value,"Invalid argument for the @".concat(a," directive.")):Object(i.c)(o.name&&"if"===o.name.value,39);var s=o.value;__DEV__?Object(i.c)(s&&("Variable"===s.kind||"BooleanValue"===s.kind),"Argument for the @".concat(a," directive must be a variable or a boolean value.")):Object(i.c)(s&&("Variable"===s.kind||"BooleanValue"===s.kind),40),t.push({directive:e,ifArgument:o})}}));return t}(n).every((function(e){var n=e.directive,r=e.ifArgument,a=!1;return"Variable"===r.value.kind?(a=t&&t[r.value.name.value],__DEV__?Object(i.c)(void 0!==a,"Invalid variable referenced in @".concat(n.name.value," directive.")):Object(i.c)(void 0!==a,37)):a=r.value.value,"skip"===n.name.value?!a:a}))}function o(e,t){return function(e){var t=[];return Object(r.d)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function s(e){return e&&o(["client"],e)&&o(["export"],e)}},"0Xr8":function(e,t,n){"use strict";function i(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,"a",(function(){return i}))},"0aXu":function(e,t,n){"use strict";var i=n("ho4C"),r=n("MlQp"),a=n("y3Ab"),o=n("+S2o"),s=n("7I1/"),l=n("/whJ"),c=n("HW6q"),u=n("LZPs");const d=["aria-describedby","aria-labelledby"];var f={name:"GlFormCheckboxGroup",components:{GlFormCheckbox:u.a},directives:{SafeHtml:c.a},mixins:[l.a],provide(){var e=this;return{getCheckboxGroup:function(){return e}}},inheritAttrs:!1,model:{prop:"checked",event:"input"},props:{id:{type:String,required:!1,default:void 0},checked:{type:Array,required:!1,default:function(){return[]}},options:{type:Array,required:!1,default:function(){return[]}},disabled:{type:Boolean,required:!1,default:!1},name:{type:String,required:!1,default:void 0},required:{type:Boolean,required:!1,default:!1},state:{type:Boolean,required:!1,default:null},ariaInvalid:{type:[Boolean,String],required:!1,default:!1}},data(){return{internalId:this.id?this.id:Object(i.a)("gitlab_ui_checkbox_group_"),localChecked:this.checked}},computed:{computedState(){return Object(r.default)(this.state)?this.state:null},computedAriaInvalid(){const{ariaInvalid:e}=this;return!0===e||"true"===e||""===e||!1===this.computedState?"true":e},computedAttrs(){return{...Object(a.a)(this.$attrs,d),id:this.internalId,"aria-invalid":this.computedAriaInvalid,"aria-required":this.required||null}},passDownAttrs(){return Object(o.a)(this.$attrs,d)},groupName(){return this.name||this.internalId}},watch:{checked(e){Object(s.a)(e,this.localChecked)||(this.localChecked=e)},localChecked(e,t){Object(s.a)(e,t)||this.$emit("input",e)}}},p=n("tBpV"),h=Object(p.a)(f,(function(){var e=this,t=e._self._c;return t("div",e._b({staticClass:"gl-form-checkbox-group gl-outline-none",attrs:{role:"group",tabindex:"-1"}},"div",e.computedAttrs,!1),[e._t("first"),e._v(" "),e._l(e.formOptions,(function(n,i){return t("gl-form-checkbox",e._b({key:i,attrs:{value:n.value,disabled:n.disabled}},"gl-form-checkbox",e.passDownAttrs,!1),[n.html?t("span",{directives:[{name:"safe-html",rawName:"v-safe-html",value:n.html,expression:"option.html"}]}):t("span",[e._v(e._s(n.text))])])})),e._v(" "),e._t("default")],2)}),[],!1,null,null,null);t.a=h.exports},"0adK":function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));n("3UXl"),n("iyoE");var i=n("DC3q"),r=n("c8MV"),a=n("+S2o"),o=n("FoG6");function s(){const e=Object(i.a)(window,["gl","experiments"],{});return Object(r.a)({...e},(function(e){return Object(a.a)(e,["experiment","key","variant","migration_keys"])}))}function l(e){return{schema:o.c,data:e}}function c(e){return s()[e]}function u(){return Object.values(s()).map(l)}},"0ehE":function(e,t,n){"use strict";var i=n("yg9e"),r=Set.prototype;e.exports={Set:Set,add:i(r.add),has:i(r.has),remove:i(r.delete),proto:r}},"0kDw":function(e,t,n){"use strict";var i=n("zYHN").navigator,r=i&&i.userAgent;e.exports=r?String(r):""},"0qM9":function(e,t,n){"use strict";var i=n("8EOZ"),r=n("XMal");t.a=function(e,t,n,a){var o=!n;n||(n={});for(var s=-1,l=t.length;++s0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"MilestoneFragment")},"13Le":function(e,t,n){"use strict";var i=n("qPgm"),r=n("2ibD"),a=n("Y0p+"),o=n("7JcE");t.a={...i.b,geoSitePath:"/api/:version/geo_sites/:id",geoSitesPath:"/api/:version/geo_sites",geoSitesStatusPath:"/api/:version/geo_sites/status",ldapGroupsPath:"/api/:version/ldap/:provider/groups.json",subscriptionPath:"/api/:version/namespaces/:id/gitlab_subscription",childEpicPath:"/api/:version/groups/:id/epics",codeReviewAnalyticsPath:"/api/:version/analytics/code_review",groupActivityIssuesPath:"/api/:version/analytics/group_activity/issues_count",groupActivityMergeRequestsPath:"/api/:version/analytics/group_activity/merge_requests_count",groupActivityNewMembersPath:"/api/:version/analytics/group_activity/new_members_count",countriesPath:"/-/countries",countryStatesPath:"/-/country_states",paymentFormPath:"/-/subscriptions/payment_form",filePath:"/api/:version/projects/:id/repository/files/:file_path",validatePaymentMethodPath:"/-/subscriptions/validate_payment_method",vulnerabilityPath:"/api/:version/vulnerabilities/:id",vulnerabilityActionPath:"/api/:version/vulnerabilities/:id/:action",vulnerabilityIssueLinksPath:"/api/:version/vulnerabilities/:id/issue_links",duoWorkflowsPath:"/api/:version/ai/duo_workflows/workflows",duoWorkflowsWsPath:"/api/:version/ai/duo_workflows/ws",descendantGroupsPath:"/api/:version/groups/:group_id/descendant_groups",projectDeploymentFrequencyAnalyticsPath:"/api/:version/projects/:id/analytics/deployment_frequency",projectGroupsPath:"/api/:version/projects/:id/groups.json",issueMetricImagesPath:"/api/:version/projects/:id/issues/:issue_iid/metric_images",issueMetricSingleImagePath:"/api/:version/projects/:id/issues/:issue_iid/metric_images/:image_id",environmentApprovalPath:"/api/:version/projects/:id/deployments/:deployment_id/approval",protectedEnvironmentsPath:"/api/:version/:entity_type/:id/protected_environments/",mrStatusCheckRetryPath:"/api/:version/projects/:id/merge_requests/:merge_request_iid/status_checks/:external_status_check_id/retry",compliancePolicySettings:"/api/:version/admin/security/compliance_policy_settings",protectedEnvironmentPath:"/api/:version/:entity_type/:id/protected_environments/:name",aiCompletionsPath:"/api/:version/ai/experimentation/openai/completions",aiEmbeddingsPath:"/api/:version/ai/experimentation/openai/embeddings",aiChatPath:"/api/:version/ai/experimentation/openai/chat/completions",tanukiBotAskPath:"/-/llm/tanuki_bot/ask",userPreferencesPath:"/api/:version/user/preferences",updateUserPreferences(e){const t=i.b.buildUrl(this.userPreferencesPath);return r.a.put(t,{policy_advanced_editor:e})},userSubscription(e){const t=i.b.buildUrl(this.subscriptionPath).replace(":id",encodeURIComponent(e));return r.a.get(t)},ldapGroups(e,t){const n=i.b.buildUrl(this.ldapGroupsPath).replace(":provider",t);return r.a.get(n,{params:{search:e,per_page:i.a,active:!0}})},createChildEpic({confidential:e,groupId:t,parentEpicId:n,title:a}){const o=i.b.buildUrl(this.childEpicPath).replace(":id",encodeURIComponent(t));return r.a.post(o,{parent_id:n,confidential:e,title:a})},descendantGroups({groupId:e,search:t}){const n=i.b.buildUrl(this.descendantGroupsPath).replace(":group_id",e);return r.a.get(n,{params:{search:t}})},codeReviewAnalytics(e={}){const t=i.b.buildUrl(this.codeReviewAnalyticsPath);return r.a.get(t,{params:e})},groupActivityMergeRequestsCount(e){const t=i.b.buildUrl(this.groupActivityMergeRequestsPath);return r.a.get(t,{params:{group_path:e}})},groupActivityIssuesCount(e){const t=i.b.buildUrl(this.groupActivityIssuesPath);return r.a.get(t,{params:{group_path:e}})},groupActivityNewMembersCount(e){const t=i.b.buildUrl(this.groupActivityNewMembersPath);return r.a.get(t,{params:{group_path:e}})},fetchCountries(){const e=i.b.buildUrl(this.countriesPath);return r.a.get(e)},fetchStates(e){const t=i.b.buildUrl(this.countryStatesPath);return r.a.get(t,{params:{country:e}})},fetchPaymentFormParams(e){const t=i.b.buildUrl(this.paymentFormPath);return r.a.get(t,{params:{id:e}})},getFile(e,t,n={}){const a=i.b.buildUrl(this.filePath).replace(":id",encodeURIComponent(e)).replace(":file_path",encodeURIComponent(t));return r.a.get(a,{params:n})},validatePaymentMethod(e,t){const n=i.b.buildUrl(this.validatePaymentMethodPath);return r.a.post(n,{id:e,gitlab_user_id:t})},changeVulnerabilityState(e,t){const n=i.b.buildUrl(this.vulnerabilityActionPath).replace(":id",e).replace(":action",t);return r.a.post(n)},triggerVulnerabilityResolution(e,t,n){const a=i.b.buildUrl(this.duoWorkflowsPath);return r.a.post(a,{project_id:t,goal:e.toString(),ai_catalog_item_consumer_id:n,start_workflow:!0,workflow_definition:"resolve_sast_vulnerability/v1",agent_privileges:o.b,environment:"web"})},triggerFalsePositiveDetection(e,t,n){const a=i.b.buildUrl(this.duoWorkflowsPath);return r.a.post(a,{project_id:t,goal:e.toString(),ai_catalog_item_consumer_id:n,start_workflow:!0,workflow_definition:"sast_fp_detection/v1",agent_privileges:[1,2,3,4,5],environment:"web"})},triggerSecretDetectionFalsePositiveDetection(e,t,n){const a=i.b.buildUrl(this.duoWorkflowsPath);return r.a.post(a,{project_id:t,goal:e.toString(),ai_catalog_item_consumer_id:n,start_workflow:!0,workflow_definition:"secrets_fp_detection/v1",agent_privileges:[1,2,3,4,5],environment:"web"})},getGeoSites(){const e=i.b.buildUrl(this.geoSitesPath);return r.a.get(e)},getGeoSitesStatus(){const e=i.b.buildUrl(this.geoSitesStatusPath);return r.a.get(e)},createGeoSite(e){const t=i.b.buildUrl(this.geoSitesPath);return r.a.post(t,e)},updateGeoSite(e){const t=i.b.buildUrl(this.geoSitesPath);return r.a.put(`${t}/${e.id}`,e)},removeGeoSite(e){const t=i.b.buildUrl(this.geoSitePath).replace(":id",encodeURIComponent(e));return r.a.delete(t)},deploymentFrequencies(e,t={}){const n=i.b.buildUrl(this.projectDeploymentFrequencyAnalyticsPath).replace(":id",encodeURIComponent(e));return r.a.get(n,{params:t})},fetchIssueMetricImages({issueIid:e,id:t}){const n=i.b.buildUrl(this.issueMetricImagesPath).replace(":id",encodeURIComponent(t)).replace(":issue_iid",encodeURIComponent(e));return r.a.get(n)},uploadIssueMetricImage({issueIid:e,id:t,file:n,url:o=null,urlText:s=null}){const l={headers:{...a.a}},c=i.b.buildUrl(this.issueMetricImagesPath).replace(":id",encodeURIComponent(t)).replace(":issue_iid",encodeURIComponent(e)),u=new FormData;return u.append("file",n),o&&u.append("url",o),s&&u.append("url_text",s),r.a.post(c,u,l)},updateIssueMetricImage({issueIid:e,id:t,imageId:n,url:a=null,urlText:o=null}){const s=i.b.buildUrl(this.issueMetricSingleImagePath).replace(":id",encodeURIComponent(t)).replace(":issue_iid",encodeURIComponent(e)).replace(":image_id",encodeURIComponent(n)),l=new FormData;return null!=a&&l.append("url",a),null!=o&&l.append("url_text",o),r.a.put(s,l)},deleteMetricImage({issueIid:e,id:t,imageId:n}){const a=i.b.buildUrl(this.issueMetricSingleImagePath).replace(":id",encodeURIComponent(t)).replace(":issue_iid",encodeURIComponent(e)).replace(":image_id",encodeURIComponent(n));return r.a.delete(a)},projectGroups(e,t){const n=i.b.buildUrl(this.projectGroupsPath).replace(":id",encodeURIComponent(e));return r.a.get(n,{params:{...t}}).then((function({data:e}){return e}))},deploymentApproval({id:e,deploymentId:t,representedAs:n,approve:a,comment:o}){const s=i.b.buildUrl(this.environmentApprovalPath).replace(":id",encodeURIComponent(e)).replace(":deployment_id",encodeURIComponent(t));return r.a.post(s,{status:a?"approved":"rejected",represented_as:n,comment:o})},approveDeployment({id:e,deploymentId:t,representedAs:n,comment:i}){return this.deploymentApproval({id:e,deploymentId:t,representedAs:n,approve:!0,comment:i})},rejectDeployment({id:e,deploymentId:t,representedAs:n,comment:i}){return this.deploymentApproval({id:e,deploymentId:t,approve:!1,representedAs:n,comment:i})},updateCompliancePolicySettings(e){const t=i.b.buildUrl(this.compliancePolicySettings);return r.a.put(t,e)},protectedEnvironments(e,t,n={}){const a=i.b.buildUrl(this.protectedEnvironmentsPath).replace(":entity_type",encodeURIComponent(t)).replace(":id",encodeURIComponent(e));return r.a.get(a,{params:n})},createProtectedEnvironment(e,t,n){const a=i.b.buildUrl(this.protectedEnvironmentsPath).replace(":entity_type",encodeURIComponent(t)).replace(":id",encodeURIComponent(e));return r.a.post(a,n)},updateProtectedEnvironment(e,t,n){const a=i.b.buildUrl(this.protectedEnvironmentPath).replace(":entity_type",encodeURIComponent(t)).replace(":id",encodeURIComponent(e)).replace(":name",encodeURIComponent(n.name));return r.a.put(a,n)},deleteProtectedEnvironment(e,t,{name:n}){const a=i.b.buildUrl(this.protectedEnvironmentPath).replace(":entity_type",encodeURIComponent(t)).replace(":id",encodeURIComponent(e)).replace(":name",encodeURIComponent(n));return r.a.delete(a)},requestAICompletions({model:e,prompt:t,...n}){const a=i.b.buildUrl(this.aiCompletionsPath);return r.a.post(a,{model:e,prompt:t,rest:n})},requestAIEmbeddings({model:e,input:t,...n}){const a=i.b.buildUrl(this.aiEmbeddingsPath);return r.a.post(a,{model:e,input:t,rest:n})},requestAIChat({model:e,messages:t,...n}){const a=i.b.buildUrl(this.aiChatPath);return r.a.post(a,{model:e,messages:t,rest:n})},requestTanukiBotResponse(e){const t=i.b.buildUrl(this.tanukiBotAskPath);return r.a.post(t,{q:e})}}},"16xn":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var i=n("Wdg3");function r(e){return a(e.source,Object(i.a)(e.source,e.start))}function a(e,t){const n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,a=e.locationOffset.line-1,s=t.line+a,l=1===t.line?n:0,c=t.column+l,u=`${e.name}:${s}:${c}\n`,d=i.split(/\r\n|[\n\r]/g),f=d[r];if(f.length>120){const e=Math.floor(c/80),t=c%80,n=[];for(let e=0;e["|",e]),["|","^".padStart(t)],["|",n[e+1]]])}return u+o([[s-1+" |",d[r-1]],[s+" |",f],["|","^".padStart(c)],[s+1+" |",d[r+1]]])}function o(e){const t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}},"1BgQ":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var i=n("UNrv"),r=(n("mgeq"),n("Qqq+"));function a(e){return e.hasOwnProperty("graphQLErrors")}var o=function(e){function t(n){var i=n.graphQLErrors,a=n.clientErrors,o=n.networkError,s=n.errorMessage,l=n.extraInfo,c=e.call(this,s)||this;return c.graphQLErrors=i||[],c.clientErrors=a||[],c.networkError=o||null,c.message=s||function(e){var t="";(Object(r.a)(e.graphQLErrors)||Object(r.a)(e.clientErrors))&&(e.graphQLErrors||[]).concat(e.clientErrors||[]).forEach((function(e){var n=e?e.message:"Error message not found.";t+="".concat(n,"\n")}));return e.networkError&&(t+="".concat(e.networkError.message,"\n")),t=t.replace(/\n$/,"")}(c),c.extraInfo=l,c.__proto__=t.prototype,c}return Object(i.__extends)(t,e),t}(Error)},"1GJI":function(e,t,n){"use strict";e.exports={}},"1I5c":function(e,t,n){"use strict";var i=n("7e18"),r=n("hvGG"),a=n("d85j"),o=n("NnjE"),s=n("4qOP"),l={name:"GlSearchBoxByType",components:{GlClearIconButton:i.a,GlIcon:a.a,GlFormInput:r.a,GlLoadingIcon:o.a},inheritAttrs:!1,model:{prop:"value",event:"input"},props:{value:{type:String,required:!1,default:""},borderless:{type:Boolean,required:!1,default:!1},clearButtonTitle:{type:String,required:!1,default:function(){return Object(s.b)("GlSearchBoxByType.clearButtonTitle","Clear")}},disabled:{type:Boolean,required:!1,default:!1},isLoading:{type:Boolean,required:!1,default:!1},tooltipContainer:{required:!1,default:!1,validator:function(e){return!1===e||"string"==typeof e||e instanceof HTMLElement}}},computed:{inputAttributes(){const e={type:"search",placeholder:Object(s.b)("GlSearchBoxByType.input.placeholder","Search"),...this.$attrs};return e["aria-label"]||(e["aria-label"]=e.placeholder),e},hasValue(){return Boolean(this.value.length)},inputListeners(){return{...this.$listeners,input:this.onInput,focusin:this.onFocusin,focusout:this.onFocusout}},showClearButton(){return this.hasValue&&!this.disabled}},methods:{isInputOrClearButton(e){var t,n;return e===(null===(t=this.$refs.input)||void 0===t?void 0:t.$el)||e===(null===(n=this.$refs.clearButton)||void 0===n?void 0:n.$el)},clearInput(){this.onInput(""),this.focusInput()},focusInput(){this.$refs.input.$el.focus()},onInput(e){this.$emit("input",e)},onFocusout(e){const{relatedTarget:t}=e;this.isInputOrClearButton(t)||this.$emit("focusout",e)},onFocusin(e){const{relatedTarget:t}=e;this.isInputOrClearButton(t)||this.$emit("focusin",e)}}},c=n("tBpV"),u=Object(c.a)(l,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"gl-search-box-by-type"},[t("gl-icon",{staticClass:"gl-search-box-by-type-search-icon",attrs:{name:"search",variant:"subtle"}}),e._v(" "),t("gl-form-input",e._g(e._b({ref:"input",class:{"gl-search-box-by-type-input":!e.borderless,"gl-search-box-by-type-input-borderless":e.borderless},attrs:{value:e.value,disabled:e.disabled}},"gl-form-input",e.inputAttributes,!1),e.inputListeners)),e._v(" "),e.isLoading||e.showClearButton?t("div",{staticClass:"gl-search-box-by-type-right-icons"},[e.isLoading?t("gl-loading-icon",{staticClass:"gl-search-box-by-type-loading-icon"}):e._e(),e._v(" "),e.showClearButton?t("gl-clear-icon-button",{ref:"clearButton",staticClass:"gl-search-box-by-type-clear gl-clear-icon-button",attrs:{title:e.clearButtonTitle,"tooltip-container":e.tooltipContainer},on:{click:function(t){return t.stopPropagation(),e.clearInput.apply(null,arguments)},focusin:e.onFocusin,focusout:e.onFocusout}}):e._e()],1):e._e()],1)}),[],!1,null,null,null);t.a=u.exports},"1Ia5":function(e,t,n){gon&&gon.webpack_public_path&&void 0!==n.p&&(n.p=gon.webpack_public_path)},"1M6e":function(e,t,n){"use strict";var i=n("oy6v"),r=n("oaN/"),a=n("70tN"),o=n("Q0Js"),s=n("jSuq"),l=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(r(n))return a(i(n,e));throw new l(o(e)+" is not iterable")}},"1NAq":function(e,t,n){"use strict";n.d(t,"g",(function(){return I})),n.d(t,"l",(function(){return A})),n.d(t,"i",(function(){return N})),n.d(t,"e",(function(){return F})),n.d(t,"k",(function(){return P})),n.d(t,"a",(function(){return V})),n.d(t,"h",(function(){return U})),n.d(t,"j",(function(){return H})),n.d(t,"m",(function(){return K})),n.d(t,"b",(function(){return X})),n.d(t,"d",(function(){return ee})),n.d(t,"c",(function(){return te})),n.d(t,"f",(function(){return ne})),n.d(t,"n",(function(){return ie})),n.d(t,"s",(function(){return ae})),n.d(t,"p",(function(){return se})),n.d(t,"q",(function(){return le})),n.d(t,"r",(function(){return ce})),n.d(t,"o",(function(){return ue}));n("B++/"),n("z6RN"),n("47t/"),n("v2fZ"),n("UezY"),n("hG7+"),n("YSE1"),n("b+iX"),n("ZzK0"),n("BzOf"),n("3UXl"),n("iyoE"),n("lFMf"),n("gOHk"),n("c9hT"),n("aFm2"),n("R9qC"),n("RFHG"),n("xuo1"),n("Tznw"),n("IYH6"),n("6yen"),n("OeRx"),n("l/dT"),n("RqS2"),n("Zy7a"),n("cjZU"),n("OAhk"),n("X42P"),n("mHhP"),n("fn0I"),n("UB/6"),n("imhG");var i=n("b9Gi"),r=n("vyQ9"),a=n("Zq5U"),o=n("4wgn"),s=n("FxFN"),l=n("SNRI"),c=n("3twG"),u=n("/lV4"),d=n("W4cT"),f=n("LxhL"),p=n("JtyA"),h=(n("5yoc"),n("7Aw+")),m=n("AxUD"),g=n("oDVS"),v=n("QOGb"),b=n.n(v),y=n("sQQY"),_=n.n(y),k=n("xkic"),w=n.n(k),S=n("QRQ+"),O=n.n(S),C=n("UK2o"),D=n.n(C),j=n("CkoT"),T=n.n(j),x=n("nIPG"),E=n.n(x);const I=function(){return[p.ic,p.hc,p.lc,p.nc]},A=function(){return[{icon:"work-item-issue",title:Object(u.i)("WorkItem|Issue"),value:"issue"},{icon:"work-item-incident",title:Object(u.i)("WorkItem|Incident"),value:"incident"},{icon:"work-item-task",title:Object(u.i)("WorkItem|Task"),value:"task"}]},N=function(e,t=(null!=e?e:f.a),n,i,r){return{firstPageSize:n?void 0:t,lastPageSize:n,afterCursor:i,beforeCursor:r}},F=function({sort:e,sortMap:t,state:n=m.k}){const i=n===m.f?g.U:g.i,r=function(e,t=g.cb){return Object.keys(t).find((function(n){return t[n]===e}))}(e,t),a=function(e,t=g.cb){return Object.keys(t).includes(e)}(null==e?void 0:e.toUpperCase(),t)&&e.toUpperCase();return r||a||i},P=function({hasBlockedIssuesFeature:e,hasIssuableHealthStatusFeature:t,hasIssueWeightsFeature:n,hasStatusFeature:i,hasPriority:r=!0,hasMilestoneDueDate:a=!0,hasDueDate:o=!0,hasLabelPriority:s=!0,hasManualSort:l=!0,hasStartDate:c=!1,hasMergedDate:d=!1,hasWeight:f=!0}={}){const p=[r&&{id:1,title:Object(u.a)("Priority"),sortDirection:{ascending:g.H,descending:g.I}},{id:2,title:Object(u.a)("Created date"),sortDirection:{ascending:g.h,descending:g.i}},{id:3,title:Object(u.a)("Updated date"),sortDirection:{ascending:g.T,descending:g.U}},{id:4,title:Object(u.a)("Closed date"),sortDirection:{ascending:g.f,descending:g.g}},a&&{id:5,title:Object(u.a)("Milestone due date"),sortDirection:{ascending:g.u,descending:g.v}},o&&{id:6,title:Object(u.a)("Due date"),sortDirection:{ascending:g.j,descending:g.k}},{id:7,title:Object(u.a)("Popularity"),sortDirection:{ascending:g.F,descending:g.G}},s&&{id:8,title:Object(u.a)("Label priority"),sortDirection:{ascending:g.p,descending:g.q}},l&&{id:9,title:Object(u.a)("Manual"),sortDirection:{ascending:g.J,descending:g.J}},{id:10,title:Object(u.a)("Title"),sortDirection:{ascending:g.R,descending:g.S}},c&&{id:11,title:Object(u.a)("Start date"),sortDirection:{ascending:g.N,descending:g.O}}];return d&&p.push({id:p.length+1,title:Object(u.i)("SortOptions|Merged date"),sortDirection:{ascending:g.s,descending:g.t}}),t&&p.push({id:p.length+1,title:Object(u.a)("Health"),sortDirection:{ascending:g.l,descending:g.m}}),i&&p.push({id:p.length+1,title:Object(u.a)("Status"),sortDirection:{ascending:g.P,descending:g.Q}}),n&&f&&p.push({id:p.length+1,title:Object(u.a)("Weight"),sortDirection:{ascending:g.W,descending:g.X}}),e&&p.push({id:p.length+1,title:Object(u.a)("Blocking"),sortDirection:{ascending:g.c,descending:g.d}}),p.filter((function(e){return e}))},L=Object.keys(g.Z),R=function(e){return Object.values(g.Z[e][g.V]).flatMap((function(e){return Object.values(e)}))},M=function(e){return Object.values(g.Z[e][g.b]).flatMap((function(e){return e}))},B=L.flatMap(R),q=L.flatMap(M),$=function(e){return L.find((function(t){return M(t).includes(e)}))},V=function(e){const t=[];return e.forEach((function(e,n){e.type===d.jc&&e.value.operator===d.y&&t.push(n)})),t.length<=1?e:e.map((function(e,n){return t.includes(n)?{...e,value:{...e.value,operator:d.B}}:e}))},U=function(e,t={}){const n=Array.from(new URLSearchParams(e).entries()).filter((function([e]){return B.includes(e)&&(t.includeStateToken||e!==d.fc)})).map((function([e,t]){const n=(i=e,L.find((function(e){return R(e).includes(i)})));var i;return{type:n,value:{data:t,operator:function(e,t){return Object.entries(g.Z[e][g.V]).find((function([,e]){return Object.values(e).includes(t)}))[0]}(n,e)}}}));if(t.convertTypeTokens){if(n.some((function(e){return e.type===d.jc})))return V(n)}return n},G=[d.xb,d.Jb,d.Mb,d.Nb,d.Wb,d.bc,d.cc,d.mc,d.Zb],W=function(e,t){return G.includes(e)&&g.db.includes(t)},z=function(e,t){switch(e){case d.Ab:return t?"yes":"no";case d.hc:case d.jc:return t.toUpperCase();case d.Mb:return W(e,Object(r.a)(t))?t.toUpperCase():Object(a.a)(t);case d.gc:return t.name;default:return W(e,Object(r.a)(t))?Object(r.a)(t):t}},H=function(e,t={}){const n=Object.entries(e).filter((function([e]){return(q.includes(e)||["not","or","in",g.n].includes(e))&&(t.includeStateToken||e!==d.fc)})).reduce((function(e,[t,n]){if("search"===t&&null!=n&&n.includes(g.K)){const{operator:i,type:r}=g.bb[t];return n.split(g.K).forEach((function(t){e.push({type:r,data:t,operator:i})})),e}if("in"===t){const{operator:i,type:r}=g.bb[t],a=Array.isArray(n)?n[0]:n;return e.push({type:r,data:null==a?void 0:a.toUpperCase(),operator:i}),e}if("not"===t)return Object.entries(n).forEach((function([t,n]){var i;const r=$(t);if(!r)return;const a=r===d.Zb?null===(i=Object(s.f)(null==n?void 0:n[0]))||void 0===i?void 0:i.toString():n;e.push({type:r,data:a,operator:d.A})})),e;if("or"===t)return Object.entries(n).forEach((function([t,n]){const i=$(t);i&&e.push({type:i,data:n,operator:d.B})})),e;if(t===g.n){const t=g.Z[d.Zb][g.b][g.x],a=g.Z[d.Zb][g.b][g.Y],o=n[t]||n[a];if(W(d.Zb,Object(r.a)(o)))e.push({type:d.Zb,data:o,operator:d.y});else if(null!=o&&o.length){var i;e.push({type:d.Zb,data:null===(i=Object(s.f)(o[0]))||void 0===i?void 0:i.toString(),operator:d.y})}return e}const{operator:a,type:o}=g.bb[t];return a===d.y&&Array.isArray(n)?e.push(...n.map((function(e){return{type:o,data:e,operator:a}}))):e.push({type:o,data:n,operator:a}),e}),[]).map((function({type:e,data:t,operator:n}){return Array.isArray(t)?n===d.A&&e===d.Mb?{type:e,value:{data:z(e,t[0]),operator:n}}:{type:e,value:{data:t.map((function(t){return z(e,t)})),operator:n}}:{type:e,value:{data:z(e,t),operator:n}}}));if(t.convertTypeTokens){if(n.some((function(e){return e.type===d.jc})))return V(n)}return n};function K(e,t){const n=[],i=t.filter((function(e){return e.multiSelect})).map((function(e){return e.type}));return e.forEach((function(e){if(!(d.u.includes(e.value.operator)&&i.includes(e.type)))return void n.push(e);const t=n.find((function(t){return t.type===e.type&&t.value.operator===e.value.operator}));t?t.value.data.includes(e.value.data)||t.value.data.push(e.value.data):n.push({...e,value:{...e.value,data:[e.value.data]}})})),n}const Q=function(e){return!(e.type===d.d&&!e.value.data)},Y=function(e,t){return e===d.Nb&&(null==t?void 0:t.includes("&"))},J=function({type:e,value:{data:t,operator:n}}){const i=e===d.yb&&n===d.B,r=e===d.Rb&&n===d.B,a=n===d.v;return i||r||function(e,t){return e===d.xb&&Object(l.f)(t)&&Object(c.p)(g.y)===t}(e,t)||Y(e,t)||a?g.a:g.db.includes(t)?g.Y:g.x},Z=function(e){const{data:t}=e.value;return Array.isArray(t)?t.map((function(t){return Z({...e,value:{...e.value,data:t}})})):W(e.type,t)?t.toUpperCase():[d.Ab,d.Gb].includes(e.type)?"yes"===t:e.type===d.jc?t.toUpperCase():e.type===d.Mb?Object(a.a)(t):t};const X=function(e){const t=new Map,n=new Map,i=new Map;return e.map((function(e){return e.type===d.jc&&e.value.operator===d.B?{...e,value:{...e.value,operator:d.y}}:e})).filter(Q).forEach((function(e){const a=J(e),l=g.Z[e.type][g.b][a];let c;c=e.value.operator===d.A?n:e.value.operator===d.B?i:t;const u=Z(e);if(Y(e.type,e.value.data)){const[t,n]=u.split("&"),i=(f=n)?Object(s.c)(o.D,Object(s.f)(f)):null,r=t.toUpperCase();c.set(l,c.has(l)?[c.get(l),i].flat():i);const a=g.Z[e.type][g.b][g.Y];c.set(a,c.has(a)?[c.get(a),r].flat():r)}else e.type===d.Zb?e.value.operator===d.A?c.set(l,[Object(s.c)(o.V,u)]):c.set(g.n,{[l]:g.db.includes(Object(r.a)(u))?u.toUpperCase():[Object(s.c)(o.V,u)],includeDescendantWorkItems:!0}):c.set(l,c.has(l)?[c.get(l),u].flat():u);var f})),n.size&&t.set("not",Object.fromEntries(n)),i.size&&t.set("or",Object.fromEntries(i)),Object.fromEntries(t)},ee=function(e){const t=e.filter(Q).reduce((function(e,t){var n;const i=J(t),r=null===(n=g.Z[t.type][g.V][t.value.operator])||void 0===n?void 0:n[i];return e.set(r,e.has(r)?[e.get(r),t.value.data].flat():t.value.data)}),new Map);return Object.fromEntries(t)},te=function(e){return e.filter((function(e){return e.type===d.d&&e.value.data})).map((function(e){return e.value.data})).join(" ")||void 0};function ne(e,t){var n;return null==t||null===(n=t.widgets)||void 0===n?void 0:n.find((function(t){return t.type===e}))}function ie({list:e,workItem:t,isBoard:n=!1,namespace:r=h.e.project,type:a}){const o=a+"s";return Object(i.a)(e,(function(e){var i;const l=(n?e[r].board.lists.nodes[0][o].nodes:e[r][o].nodes).find((function(e){return a===m.p?e.iid===t.iid:Object(s.f)(e.id)===Object(s.f)(t.id)}));Object.keys(p.dc).forEach((function(e){const n=ne(e,t);if(!n)return;const i=p.dc[e];var r;i!==p.dc[p.ib]&&i!==p.dc[p.wb]?i===p.dc[p.zb]&&n[i]?l[i]={__persist:!0,...n[i]}:i!==p.dc[p.Gb]?l[i]=n[i]:l[i]=null===(r=n.humanReadableAttributes)||void 0===r?void 0:r.timeEstimate:l[i]={...n[i],nodes:n[i].nodes.map((function(e){return{__persist:!0,...e}}))}})),l.title=t.title,l.confidential=t.confidential,l.type=null==t||null===(i=t.workItemType)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.toUpperCase()}))}const re=function({cache:e,responseData:t,mutationKey:n,namespacePath:r,action:a="create",subscribedOnly:o}){const s=o?g.M:g.L,l={query:O.a,variables:{fullPath:r,subscribedOnly:o,sort:s}},c=e.readQuery(l);if(!c)return;const u=Object(i.a)(c,(function(e){const{savedView:i}=t[n],r=e.namespace.savedViews.nodes;"remove"===a?function(e,t){const n=e.findIndex((function({id:e}){return e===t.id}));-1!==n&&e.splice(n,1)}(r,i):"update"===a?function(e,t){const n=e.findIndex((function({id:e}){return e===t.id}));-1!==n&&(e[n]=t)}(r,i):"create"===a&&r.push(i),s===g.L&&r.sort((function(e,t){return e.name.localeCompare(t.name,void 0,{sensitivity:"base"})}))}));e.writeQuery({...l,data:u})},ae=function({cache:e,view:t,action:n,fullPath:r}){[!0,!1].forEach((function(a){const o={query:O.a,variables:{fullPath:r,subscribedOnly:a,sort:a?g.M:g.L}},s=e.readQuery(o);if(!s)return;const l=Object(i.a)(s,(function(e){const i=e.namespace.savedViews.nodes;if(a||!a&&"delete"===n){const e=i.findIndex((function(e){return e.id===t.id}));-1!==e&&i.splice(e,1)}else if(!a&&"unsubscribe"===n){const e=i.find((function(e){return e.id===t.id}));e&&(e.subscribed=!1)}}));e.writeQuery({...o,data:l})}))},oe=async function({subscribedSavedViewLimit:e,apolloClient:t,namespacePath:n,creating:i}){const{data:r}=await t.query({query:O.a,variables:{fullPath:n,subscribedOnly:!0,sort:g.M},fetchPolicy:"cache-only"});if(!r)return;const a=r.namespace.savedViews.nodes;if(i?a.length>e:a.length>=e){const e=a[i?a.length-2:a.length-1];await t.mutate({mutation:T.a,variables:{input:{id:e.id}},optimisticResponse:{workItemSavedViewUnsubscribe:{__typename:"WorkItemSavedViewUnsubscribePayload",savedView:{__typename:"WorkItemSavedViewType",id:e.id}}},update:function(t){ae({cache:t,view:e,action:"unsubscribe",fullPath:n})}})}},se=async function({isEdit:e=!1,isForm:t=!1,id:n="",namespacePath:r="",name:a="",description:o="",isPrivate:s=!0,filters:l={},sort:c=null,displaySettings:u={},userPermissions:d,subscribed:f,mutationKey:p,apolloClient:h,enforceSubscriptionLimit:m=!0,subscribedSavedViewLimit:v}){var y;const k=e?_.a:b.a,w={...l};l.search&&(w.search=Array.isArray(l.search)?l.search.join(g.K):l.search);const S=e&&t?{name:a,description:o,isPrivate:s}:{name:a,description:o,isPrivate:s,filters:w,displaySettings:u,sort:c},O=e?{id:n,...S}:{namespacePath:r,...S},C={name:a,description:o,isPrivate:s,filters:w,displaySettings:u,sort:c,__typename:"WorkItemSavedViewType"},j={[p]:{__typename:e?"WorkItemSavedViewUpdatePayload":"WorkItemSavedViewCreatePayload",errors:[],savedView:e?{id:n,...C,userPermissions:d,subscribed:f}:{id:g.w,...C,subscribed:!0,userPermissions:{updateSavedView:!0,deleteSavedView:!0,updateSavedViewVisibility:!0,__typename:"SavedViewPermissions"}}}},T=await h.mutate({mutation:k,variables:{input:O},optimisticResponse:j,update:function(t,{data:a}){var o;!a||null!==(o=a[p].errors)&&void 0!==o&&o.length||(function({cache:e,responseData:t,mutationKey:n,namespacePath:i,isEdit:r}){const a=r?"update":"create";re({cache:e,responseData:t,mutationKey:n,namespacePath:i,action:a,subscribedOnly:!0}),re({cache:e,responseData:t,mutationKey:n,namespacePath:i,action:a,subscribedOnly:!1})}({cache:t,responseData:a,mutationKey:p,namespacePath:r,isEdit:e}),e&&function({cache:e,savedView:t,fullPath:n,id:r=""}){const a={query:D.a,variables:{fullPath:n,id:r}},o=e.readQuery(a);if(!o)return;const s=Object(i.a)(o,(function(e){var n;(null===(n=e.namespace)||void 0===n||null===(n=n.savedViews)||void 0===n?void 0:n.nodes)[0]=t}));e.writeQuery({...a,data:s})}({cache:t,savedView:a[p].savedView,fullPath:r,id:n}))}});return!e&&m&&null!==(y=T.data)&&void 0!==y&&null!==(y=y[p])&&void 0!==y&&y.savedView&&await oe({subscribedSavedViewLimit:v,apolloClient:h,namespacePath:r,creating:!0}),T},le=async function({view:e,cache:t,fullPath:n}){return await t.mutate({mutation:w.a,variables:{input:{id:e.id}},optimisticResponse:{workItemSavedViewSubscribe:{__typename:"WorkItemSavedViewSubscribePayload",errors:[],savedView:{__typename:"WorkItemSavedViewType",id:e.id}}},update:function(t){return function(e,t,n){[!0,!1].forEach((function(r){const a={query:O.a,variables:{fullPath:n,subscribedOnly:r,sort:r?g.M:g.L}},o=e.readQuery(a);if(!o)return;const s=Object(i.a)(o,(function(e){const n=e.namespace.savedViews.nodes;if(r)n.push(t);else{const e=n.find((function(e){return e.id===t.id}));e&&(e.subscribed=!0)}}));e.writeQuery({...a,data:s})}))}(t,e,n)}})},ce=async function({view:e,apolloClient:t,namespacePath:n,subscribedSavedViewLimit:i}){return await oe({apolloClient:t,namespacePath:n,subscribedSavedViewLimit:i}),le({view:e,cache:t,fullPath:n})},ue=async function({apolloClient:e,movedView:t,referenceView:n,position:r,fullPath:a}){const o={id:t.id};"before"===r?o.moveBeforeId=n.id:o.moveAfterId=n.id,await e.mutate({mutation:E.a,variables:{input:o},update:function(e){return function({cache:e,movedView:t,referenceView:n,position:r,fullPath:a}){[!0,!1].forEach((function(o){const s={query:O.a,variables:{fullPath:a,subscribedOnly:o,sort:o?g.M:g.L}},l=e.readQuery(s);if(!l)return;const c=Object(i.a)(l,(function(e){const i=e.namespace.savedViews.nodes,a=i.findIndex((function(e){return e.id===t.id}));if(-1===a)return;const[o]=i.splice(a,1),s=i.findIndex((function(e){return e.id===n.id}));if(-1===s)return void i.push(o);const l="before"===r?s:s+1;i.splice(l,0,o)}));e.writeQuery({...s,data:c})}))}({cache:e,movedView:t,referenceView:n,position:r,fullPath:a})}})}},"1NmE":function(e,t){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"WorkItemStatusFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"WorkItemStatus"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"iconName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}}],loc:{start:0,end:178}};n.loc.source={body:"# This fragment should only be used on the widgets field\nfragment WorkItemStatusFragment on WorkItemStatus {\n id\n category\n color\n description\n iconName\n name\n position\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"WorkItemStatusFragment")},"1OWu":function(e,t,n){"use strict";n.d(t,"f",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"m",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return h})),n.d(t,"l",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"k",(function(){return v})),n.d(t,"o",(function(){return b})),n.d(t,"i",(function(){return y})),n.d(t,"n",(function(){return _}));n("3UXl"),n("iyoE"),n("RFHG"),n("z6RN"),n("xuo1"),n("ZzK0"),n("BzOf");var i=n("28LK"),r=n("/lV4"),a=n("NmEs");const o=function(e){return Boolean(e&&e.scrollWidth>e.offsetWidth)},s=function(e,t){e&&e.classList.add(t)},l=function(){return Object(a.w)()||Object(a.u)()||Object(a.x)()},c=function({scrollTop:e},t=0){return e>t},u=function({scrollTop:e,offsetHeight:t,scrollHeight:n},i=0){return e+t({})},subLabelLink:{type:String,required:!1,default:""},inlineLabels:{type:Boolean,required:!1,default:!1},entityId:{type:Number,required:!1,default:0},entityName:{type:String,required:!1,default:""},src:{type:String,required:!1,default:""},fallbackOnError:{type:Boolean,required:!1,default:!1},size:{type:[Number,Object],required:!1,default:a.i[1],validator:o.a},shape:{type:String,required:!1,default:a.h.circle}},computed:{hasLabelLink(){return Boolean(this.labelLink)},hasSubLabelLink(){return Boolean(this.subLabelLink)},avatarListeners(){return this.hasLabelLink?{...this.$listeners,click:this.onAvatarClick}:this.$listeners},avatarCssClasses(){return{"gl-cursor-pointer":this.hasLabelLink}},avatarRowLayoutClass(){return{"inline-labels":this.inlineLabels}},avatarPropsAndAttrs(){return{...this.$attrs,entityId:this.entityId,entityName:this.entityName,src:this.src,fallbackOnError:this.fallbackOnError,size:this.size,shape:this.shape}}},methods:{onAvatarClick(){this.$refs.labelLink.$el.click()}}},l=n("tBpV"),c=Object(l.a)(s,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"gl-avatar-labeled"},[t("gl-avatar",e._g(e._b({class:e.avatarCssClasses,attrs:{alt:""}},"gl-avatar",e.avatarPropsAndAttrs,!1),e.avatarListeners)),e._v(" "),t("div",{staticClass:"gl-avatar-labeled-labels !gl-text-left",class:e.avatarRowLayoutClass},[t("div",{staticClass:"-gl-mx-1 -gl-my-1 gl-flex gl-flex-wrap gl-items-center !gl-text-left"},[e.hasLabelLink?t("gl-link",e._b({ref:"labelLink",staticClass:"gl-avatar-link",attrs:{href:e.labelLink,variant:"meta"},on:{click:function(t){return e.$emit("label-link-click",t)}}},"gl-link",e.labelLinkAttrs,!1),[t("span",{staticClass:"gl-avatar-labeled-label"},[e._v(e._s(e.label))])]):t("span",{staticClass:"gl-avatar-labeled-label"},[e._v(e._s(e.label))]),e._v(" "),e._t("meta")],2),e._v(" "),e.hasSubLabelLink?t("gl-link",{staticClass:"gl-avatar-link",attrs:{href:e.subLabelLink,variant:"meta"}},[t("span",{staticClass:"gl-avatar-labeled-sublabel"},[e._v(e._s(e.subLabel))])]):t("span",{staticClass:"gl-avatar-labeled-sublabel"},[e._v(e._s(e.subLabel))]),e._v(" "),e._t("default")],2)],1)}),[],!1,null,null,null);t.a=c.exports},"1Sua":function(e,t,n){"use strict";var i=n("TCfp"),r=n("td4g");t.a=function(e,t){for(var n=0,a=(t=Object(i.a)(t,e)).length;null!=e&&n0&&{extra:l}};i.b.trackInternalEvent(e,t),r.a.event(n,e,{context:{schema:a.o,data:{event_name:e,data_source:"redis_hll"}},...c})},mixin:()=>({methods:{trackEvent(e,t={},n){c.trackEvent(e,t,n)}}}),bindInternalEventDocument(e=document){var t=this;if(!o.a.enabled()||l.has(e))return null;l.set(e,!0);const n=function(e){return Object(s.a)(e,t.trackEvent.bind(t))};e.addEventListener("click",n);return function(){l.delete(e),e.removeEventListener("click",n)}},trackInternalLoadEvents(e=document){var t=this;if(!o.a.enabled())return[];const n=e.querySelectorAll(a.k);return n.forEach((function(e){const{event:n,additionalProperties:i={}}=Object(s.e)(e);n&&t.trackEvent(n,i)})),n}};t.a=c},"1cOc":function(e,t){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SavedView"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"WorkItemSavedViewType"}},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:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subscribed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrivate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displaySettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filters"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sort"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userPermissions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSavedView"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteSavedView"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updateSavedViewVisibility"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:271}};n.loc.source={body:"# @feature_category: portfolio_management\n\nfragment SavedView on WorkItemSavedViewType {\n id\n name\n description\n subscribed\n isPrivate\n displaySettings\n filters\n sort\n userPermissions {\n updateSavedView\n deleteSavedView\n updateSavedViewVisibility\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"SavedView")},"1gXe":function(e,t,n){"use strict";var i=n("oy6v"),r=n("SIP5"),a=n("70tN"),o=n("re4r"),s=n("jSuq"),l=n("F9PD"),c=n("7Sby"),u=n("gy7W"),d=c("asyncIterator");e.exports=function(e){var t,n=a(e),c=!0,f=l(n,d);return r(f)||(f=s(n),c=!1),void 0!==f?t=i(f,n):(t=n,c=!0),a(t),o(c?t:new u(o(t)))}},"1i3Z":function(e,t,n){"use strict";var i=n("eMLf"),r=n("FeKR");function a(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}a.prototype=Object(i.a)(r.a.prototype),a.prototype.constructor=a,t.a=a},"1kX3":function(e,t,n){"use strict";var i=n("Kvqm"),r=n("d4wX"),a=n("Kp+0"),o=n("1s/W"),s=n("DAdG"),l=n("QgRH");var c=function(e){return Object(l.a)(e)&&"[object RegExp]"==Object(s.a)(e)},u=n("4H6Q"),d=n("HMX8"),f=d.a&&d.a.isRegExp,p=f?Object(u.a)(f):c,h=n("cLrX"),m=n("u0qm"),g=n("CzCp"),v=n("WQmb"),b=/\w*$/;t.a=function(e,t){var n=30,s="...";if(Object(o.default)(t)){var l="separator"in t?t.separator:l;n="length"in t?Object(g.a)(t.length):n,s="omission"in t?Object(i.a)(t.omission):s}var c=(e=Object(v.a)(e)).length;if(Object(a.a)(e)){var u=Object(m.a)(e);c=u.length}if(n>=c)return e;var d=n-Object(h.a)(s);if(d<1)return s;var f=u?Object(r.a)(u,0,d).join(""):e.slice(0,d);if(void 0===l)return f+s;if(u&&(d+=f.length-d),p(l)){if(e.slice(d).search(l)){var y,_=f;for(l.global||(l=RegExp(l.source,Object(v.a)(b.exec(l))+"g")),l.lastIndex=0;y=l.exec(_);)var k=y.index;f=f.slice(0,void 0===k?d:k)}}else if(e.indexOf(Object(i.a)(l),d)!=d){var w=f.lastIndexOf(l);w>-1&&(f=f.slice(0,w))}return f+s}},"1nO5":function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return u}));const i="undefined"!=typeof window,r="undefined"!=typeof document,a="undefined"!=typeof navigator,o="undefined"!=typeof MutationObserver||"undefined"!=typeof WebKitMutationObserver||"undefined"!=typeof MozMutationObserver,s=i&&r&&a,l=i?window:{},c=r?document:{},u=(((a?navigator:{}).userAgent||"").toLowerCase().indexOf("jsdom"),function(){let e=!1;if(s)try{const t={get passive(){e=!0}};l.addEventListener("test",t,t),l.removeEventListener("test",t,t)}catch{e=!1}return e}())},"1s/W":function(e,t,n){"use strict";n.r(t),t.default=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"1uQW":function(e,t,n){"use strict";var i=n("QmHw");e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"1wfG":function(e,t,n){"use strict";var i=n("kOP/"),r=n("Jx7q"),a=n("d85j"),o=n("yN/U"),s=n("dIEn"),l=n("CbCZ"),c=n("5lKJ"),u=n("ho4C"),d=n("/lV4"),f=n("/w+w"),p=n("Oxu3"),h=n("1I5c"),m=n("B3M1"),g=n("F/pm"),v=(n("UezY"),n("z6RN"),n("hG7+"),n("W4cT")),b=n("O2Vd"),y=n.n(b),_=(n("3UXl"),n("iyoE"),n("nuJP")),k=n("AxB5"),w=n("l3DV"),S=n("I4EJ"),O=n("GPA+"),C=n("cW6y");var D={name:"DashboardItemsList",i18n:{OVERLAY_GOTO:S.r},components:{GlDisclosureDropdownGroup:_.a,GlDisclosureDropdownItem:k.a,FrequentItem:O.a,FrequentItemSkeleton:C.a},props:{loading:{type:Boolean,required:!1,default:!1},emptyStateText:{type:String,required:!0},groupName:{type:String,required:!0},items:{type:Array,required:!1,default:function(){return[]}},isGroup:{type:Boolean,required:!1,default:!1},dashboardName:{type:String,required:!0},bordered:{type:Boolean,required:!1,default:!1}},computed:{formattedItems(){var e=this;return this.items.map((function(t){const n=Object(w.g)({namespacePath:t.fullPath,isGroup:e.isGroup,dashboardSlug:e.dashboardName});return{forDropdown:{id:t.id,text:t.name,href:n,extraAttrs:{"data-track-action":"click_dashboard_item","data-track-label":e.isGroup?"group":"project","data-track-property":e.dashboardName}},forRenderer:{id:t.id,title:t.name,subtitle:t.namespace,avatar:t.avatarUrl}}}))},showEmptyState(){return!this.loading&&0===this.formattedItems.length}}},j=n("tBpV"),T=Object(j.a)(D,(function(){var e=this,t=e._self._c;return t("gl-disclosure-dropdown-group",{attrs:{bordered:e.bordered},scopedSlots:e._u([{key:"group-label",fn:function(){return[e._v(e._s(e.groupName))]},proxy:!0}])},[e._v(" "),e.loading?t("gl-disclosure-dropdown-item",[t("frequent-item-skeleton")],1):e._l(e.formattedItems,(function(n){return t("gl-disclosure-dropdown-item",{key:n.forDropdown.id,staticClass:"show-on-focus-or-hover--context show-focus-layover",attrs:{item:n.forDropdown},scopedSlots:e._u([{key:"list-item",fn:function(){return[t("frequent-item",{attrs:{item:n.forRenderer}})]},proxy:!0}],null,!0)})})),e._v(" "),e.showEmptyState?t("gl-disclosure-dropdown-item",{staticClass:"gl-cursor-text"},[t("span",{staticClass:"gl-mx-3 gl-my-3 gl-text-sm gl-text-subtle"},[e._v(e._s(e.emptyStateText))])]):e._e()],2)}),[],!1,null,null,null).exports;n("B++/"),n("47t/");const x=function(e,t){var n;return Boolean(null===(n=e.customizableDashboards)||void 0===n||null===(n=n.nodes)||void 0===n?void 0:n.find((function(e){return e.slug===t})))};var E={name:"DashboardFrequentProjects",components:{DashboardItemsList:T},props:{dashboardName:{type:String,required:!0}},apollo:{frecentProjects:{query:y.a,debounce:v.a}},computed:{items(){var e,t=this;return(null===(e=this.frecentProjects)||void 0===e?void 0:e.filter((function(e){return x(e,t.dashboardName)})))||[]}}},I=Object(j.a)(E,(function(){return(0,this._self._c)("dashboard-items-list",{attrs:{loading:this.$apollo.queries.frecentProjects.loading,"empty-state-text":this.s__("Dashboards|Projects you visit often will appear here."),"group-name":this.s__("Dashboards|Frequently visited projects"),items:this.items,"is-group":!1,"dashboard-name":this.dashboardName}})}),[],!1,null,null,null).exports,A=n("lnCS"),N={name:"DashboardFrequentGroups",components:{DashboardItemsList:T},props:{dashboardName:{type:String,required:!0}},apollo:{frecentGroups:{query:n.n(A).a,debounce:v.a}},computed:{items(){var e,t=this;return(null===(e=this.frecentGroups)||void 0===e?void 0:e.filter((function(e){return x(e,t.dashboardName)})))||[]}}},F=Object(j.a)(N,(function(){return(0,this._self._c)("dashboard-items-list",{attrs:{loading:this.$apollo.queries.frecentGroups.loading,"empty-state-text":this.s__("Dashboards|Groups you visit often will appear here."),"group-name":this.s__("Dashboards|Frequently visited groups"),items:this.items,"is-group":"","dashboard-name":this.dashboardName}})}),[],!1,null,null,null).exports,P=n("NnjE"),L=n("VBgf"),R=n.n(L),M=n("T2Cy"),B=n.n(M),q={name:"DashboardSearchResults",components:{GlLoadingIcon:P.a,DashboardItemsList:T},props:{searchTerm:{type:String,required:!0},dashboardName:{type:String,required:!0}},apollo:{projects:{debounce:v.a,query:R.a,variables(){return{search:this.searchTerm}},skip(){return!this.searchTerm||this.notEnoughCharacters},update(e){var t,n=this;return(null==e||null===(t=e.projects)||void 0===t||null===(t=t.nodes)||void 0===t?void 0:t.filter((function(e){return x(e,n.dashboardName)})))||[]}},groups:{debounce:v.a,query:B.a,variables(){return{search:this.searchTerm}},skip(){return!this.searchTerm||this.notEnoughCharacters},update(e){var t,n=this;return(null==e||null===(t=e.currentUser)||void 0===t||null===(t=t.groups)||void 0===t||null===(t=t.nodes)||void 0===t?void 0:t.filter((function(e){return x(e,n.dashboardName)})))||[]}}},data:()=>({projects:[],groups:[]}),computed:{notEnoughCharacters(){return this.searchTerm.length<2},loading(){return this.$apollo.queries.projects.loading||this.$apollo.queries.groups.loading},formattedProjects(){return this.projects.map((function(e){return{id:e.id,name:e.name,namespace:e.nameWithNamespace,avatarUrl:e.avatarUrl,fullPath:e.fullPath}}))},formattedGroups(){return this.groups.map((function(e){return{id:e.id,name:e.name,namespace:e.fullName,avatarUrl:e.avatarUrl,fullPath:e.fullPath}}))},hasResults(){return this.projects.length>0||this.groups.length>0},showNoResults(){return!this.loading&&!this.hasResults&&this.searchTerm.length>=2},searchStatus(){return this.loading?Object(d.i)("Dashboards|Searching for groups and projects"):this.notEnoughCharacters?this.$options.i18n.minCharacters:this.showNoResults?this.$options.i18n.noResults:this.formattedProjects.length||this.formattedGroups.length?Object(d.j)(Object(d.i)("Dashboards|Search found %{groups} groups and %{projects} projects"),{groups:this.formattedGroups.length,projects:this.formattedProjects.length}):""}},i18n:{noResults:Object(d.i)("Dashboards|No projects or groups found"),minCharacters:Object(d.i)("Dashboards|Type at least 2 characters to search")}},$=Object(j.a)(q,(function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"gl-sr-only",attrs:{role:"status","aria-atomic":"true"}},[e._v("\n "+e._s(e.searchStatus)+"\n ")]),e._v(" "),e.loading?t("gl-loading-icon",{staticClass:"gl-my-6",attrs:{size:"lg"}}):e.notEnoughCharacters?t("div",{staticClass:"gl-p-4 gl-text-center gl-text-subtle"},[e._v("\n "+e._s(e.$options.i18n.minCharacters)+"\n ")]):e.showNoResults?t("div",{staticClass:"gl-p-4 gl-text-center gl-text-subtle"},[e._v("\n "+e._s(e.$options.i18n.noResults)+"\n ")]):t("ul",{staticClass:"gl-m-0 gl-list-none gl-p-0 gl-pt-2"},[e.formattedProjects.length>0?t("dashboard-items-list",{attrs:{"empty-state-text":e.s__("Dashboards|No projects found"),"group-name":e.s__("Dashboards|Projects I'm a member of"),items:e.formattedProjects,"is-group":!1,"dashboard-name":e.dashboardName}}):e._e(),e._v(" "),e.formattedGroups.length>0?t("dashboard-items-list",{staticClass:"gl-mt-3",attrs:{"empty-state-text":e.s__("Dashboards|No groups found"),"group-name":e.s__("Dashboards|Groups I'm a member of"),items:e.formattedGroups,"is-group":"","dashboard-name":e.dashboardName,bordered:""}}):e._e()],1)],1)}),[],!1,null,null,null).exports;var V={name:"LinkToDashboardModal",components:{GlModal:p.a,GlSearchBoxByType:h.a,ScrollScrim:m.a,DashboardFrequentProjects:I,DashboardFrequentGroups:F,DashboardSearchResults:$},props:{dashboardName:{type:String,required:!0}},data:()=>({searchText:""}),computed:{showDefaultItems(){return!this.searchText}},methods:{onModalHidden(){this.searchText=""}},LINK_TO_DASHBOARD_MODAL_ID:"link-to-dashboard-modal",GLOBAL_SEARCH_MODAL_CLASS:g.b,i18n:{title:Object(d.i)("Dashboards|Select a group or project for this analytics dashboard"),placeholder:Object(d.i)("Dashboards|Search for a project or group...")}},U=n("LPAU"),G=n.n(U),W=n("AgeT"),z=n.n(W),H={insert:"head",singleton:!1},K=(G()(z.a,H),z.a.locals,Object(j.a)(V,(function(){var e=this,t=e._self._c;return t("gl-modal",{attrs:{"modal-id":e.$options.LINK_TO_DASHBOARD_MODAL_ID,title:e.s__("Dashboards|Select a group or project for this analytics dashboard"),"hide-footer":"",scrollable:"",centered:!1,"body-class":"!gl-p-0","modal-class":e.$options.GLOBAL_SEARCH_MODAL_CLASS,"content-class":"gl-mt-2"},on:{hidden:e.onModalHidden}},[t("div",{staticClass:"gl-relative gl-w-full"},[t("div",{staticClass:"input-box-wrapper gl-border-b -gl-mb-1 gl-border-b-section gl-bg-section gl-p-2"},[t("gl-search-box-by-type",{attrs:{autocomplete:"off",placeholder:e.s__("Dashboards|Search for a project or group..."),borderless:""},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}})],1),e._v(" "),t("div",{staticClass:"gl-flex gl-w-full gl-grow gl-flex-col gl-overflow-hidden"},[t("scroll-scrim",{staticClass:"gl-grow !gl-overflow-x-hidden"},[t("div",{staticClass:"gl-pb-3"},[e.showDefaultItems?t("ul",{staticClass:"gl-m-0 gl-list-none gl-p-0 gl-pt-2"},[t("dashboard-frequent-projects",{attrs:{"dashboard-name":e.dashboardName}}),e._v(" "),t("dashboard-frequent-groups",{staticClass:"gl-mt-3",attrs:{bordered:"","dashboard-name":e.dashboardName}})],1):t("dashboard-search-results",{attrs:{"search-term":e.searchText,"dashboard-name":e.dashboardName}})],1)])],1)])])}),[],!1,null,"2a92a04b",null).exports),Q=n("8TXY"),Y=n("xPX6"),J=(n("v2fZ"),n("+wZC")),Z=n("hxHM"),X=n("QUS0"),ee=n("sHIo"),te=n("ClKL"),ne={name:"AiCatalogNavTabs",components:{GlTab:J.a,GlTabs:Z.a},mixins:[Object(X.a)(),Object(ee.a)()],computed:{tabs(){var e;return[{text:Object(d.i)("AICatalog|Agents"),route:te.d,active:this.$route.name===te.d},...(null!==(e=this.glAbilities.readAiCatalogFlow)&&void 0!==e?e:this.glFeatures.aiCatalogFlows)?[{text:Object(d.i)("AICatalog|Flows"),route:te.i,active:this.$route.name===te.i}]:[],...this.glAbilities.readAiCatalogMcpServer?[{text:Object(d.i)("AICatalog|MCP"),route:te.n,active:this.$route.name===te.n}]:[]]}},methods:{navigateTo(e){this.$route.name!==e&&this.$router.push({name:e,query:this.$route.query})}}},ie=Object(j.a)(ne,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"gl-flex gl-grow @lg/panel:gl-items-center"},[t("gl-tabs",{attrs:{"content-class":"gl-py-0"}},e._l(e.tabs,(function(n){return t("gl-tab",{key:n.text,attrs:{title:n.text,active:n.active},on:{click:function(t){return e.navigateTo(n.route)}}})})),1)],1)}),[],!1,null,null,null).exports,re=n("NmEs"),ae={name:"AiCatalogNavActions",components:{GlButton:l.a},mixins:[Object(X.a)()],props:{canAdmin:{type:Boolean,required:!1,default:!1},newButtonVariant:{type:String,required:!1,default:"confirm"}},computed:{showNewButton(){return Object(re.z)()&&this.canAdmin&&this.newButtonProps.route},newButtonProps(){switch(this.$route.name){case te.k:case te.d:return{route:te.c,label:Object(d.i)("AICatalog|New agent")};case te.i:return{route:te.h,label:Object(d.i)("AICatalog|New flow")};case te.n:return this.glAbilities.createAiCatalogMcpServer?{route:te.m,label:Object(d.i)("AICatalog|New MCP server")}:{route:null,label:""};default:return{route:null,label:""}}}}},oe=Object(j.a)(ae,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"gl-flex gl-items-center gl-gap-3"},[e.showNewButton?t("gl-button",{attrs:{to:{name:e.newButtonProps.route},variant:e.newButtonVariant}},[e._v("\n "+e._s(e.newButtonProps.label)+"\n ")]):e._e(),e._v(" "),e._t("default")],2)}),[],!1,null,null,null).exports,se={name:"AiCatalogListHeader",components:{GlExperimentBadge:i.a,GlLink:r.a,GlIcon:a.a,AiCatalogNavTabs:ie,AiCatalogNavActions:oe,PageHeading:f.a,LinkToDashboardModal:K,GlPopover:o.a,GlSprintf:s.a,GlButton:l.a},directives:{GlModal:c.a},inject:{isGlobalNamespace:{},aiImpactDashboardEnabled:{default:!1},aiImpactDashboardPath:{default:null},showLegalDisclaimer:{default:!1}},props:{heading:{type:String,required:!1,default:void 0},canAdmin:{type:Boolean,required:!1,default:!1},newButtonVariant:{type:String,required:!1,default:void 0},isExperiment:{type:Boolean,required:!1,default:!1}},computed:{title(){return this.heading||Object(d.i)("AICatalog|AI Catalog")},aiImpactDashboardDocsLink:()=>Y.b+"/user/analytics/duo_and_sdlc_trends/",aiImpactDashboardLinkAttrs(){return{"data-testid":"ai-impact-dashboard-link","data-track-action":this.$options.TRACKING_ACTION_CLICK_DASHBOARD_LINK,"data-track-label":this.$options.TRACKING_LABEL_AI_CATALOG_HEADER}},badgeType(){return this.isExperiment?"experiment":""},shouldShowLinkToDashboardsModal(){return this.aiImpactDashboardEnabled&&!this.aiImpactDashboardPath},hasDashboardLinkWithActions(){return!this.isGlobalNamespace&&this.canAdmin&&this.aiImpactDashboardEnabled}},LINK_TO_DASHBOARD_MODAL_ID:"link-to-dashboard-modal",TRACKING_ACTION_CLICK_DASHBOARD_LINK:"click_dashboard_link",TRACKING_LABEL_AI_CATALOG_HEADER:"ai_catalog_header",AI_IMPACT_DASHBOARD:Q.a,AI_IMPACT_DASHBOARD_POPOVER_TARGET_ID:Object(u.a)("dashboard-link"),i18n:{legalDisclaimer:Object(d.i)("AICatalog|This catalog contains third-party content that may be subject to additional terms. GitLab does not control or assume liability for third-party content."),aiImpactDashboardCTA:Object(d.i)("AICatalog|Explore your GitLab Duo and SDLC trends")}},le=Object(j.a)(se,(function(){var e=this,t=e._self._c;return t("div",[t("page-heading",{scopedSlots:e._u([{key:"heading",fn:function(){return[t("span",{staticClass:"gl-flex"},[t("span",[e._v(e._s(e.title))]),e._v(" "),e.badgeType?t("gl-experiment-badge",{staticClass:"gl-self-center",attrs:{type:e.badgeType}}):e._e()],1)]},proxy:!0},e.$scopedSlots.description?{key:"description",fn:function(){return[e._t("description")]},proxy:!0}:null,{key:"actions",fn:function(){return[t("div",{staticClass:"gl-flex gl-flex-wrap gl-items-center",class:{"gl-gap-5":e.hasDashboardLinkWithActions},attrs:{"data-testid":"ai-catalog-list-header-actions"}},[e.aiImpactDashboardEnabled?[t("div",{staticClass:"gl-flex gl-items-center gl-gap-3"},[e.shouldShowLinkToDashboardsModal?t("gl-button",e._b({directives:[{name:"gl-modal",rawName:"v-gl-modal",value:e.$options.LINK_TO_DASHBOARD_MODAL_ID,expression:"$options.LINK_TO_DASHBOARD_MODAL_ID"}],attrs:{variant:"link"}},"gl-button",e.aiImpactDashboardLinkAttrs,!1),[e._v("\n "+e._s(e.$options.i18n.aiImpactDashboardCTA)+"\n ")]):t("gl-link",e._b({attrs:{href:e.aiImpactDashboardPath}},"gl-link",e.aiImpactDashboardLinkAttrs,!1),[e._v(e._s(e.$options.i18n.aiImpactDashboardCTA))]),e._v(" "),t("gl-icon",{attrs:{id:e.$options.AI_IMPACT_DASHBOARD_POPOVER_TARGET_ID,name:"information-o"}}),e._v(" "),t("gl-popover",{attrs:{target:e.$options.AI_IMPACT_DASHBOARD_POPOVER_TARGET_ID}},[t("gl-sprintf",{attrs:{message:e.s__("AICatalog|This key dashboard provides visibility into SDLC metrics in the context of AI adoption for projects and groups. %{linkStart}Learn more%{linkEnd}")},scopedSlots:e._u([{key:"link",fn:function({content:n}){return[t("gl-link",{staticClass:"!gl-text-sm",attrs:{href:e.aiImpactDashboardDocsLink,target:"_blank"}},[e._v("\n "+e._s(n))])]}}],null,!1,4144093865)})],1)],1)]:e._e(),e._v(" "),e.isGlobalNamespace?e._e():t("ai-catalog-nav-actions",{attrs:{"can-admin":e.canAdmin,"new-button-variant":e.newButtonVariant}},[e._t("nav-actions")],2)],2)]},proxy:!0}],null,!0)}),e._v(" "),e.showLegalDisclaimer?t("p",{staticClass:"gl-text-sm gl-text-subtle",attrs:{"data-testid":"legal-disclaimer"}},[e._v("\n "+e._s(e.$options.i18n.legalDisclaimer)+"\n ")]):e._e(),e._v(" "),e.isGlobalNamespace?t("div",{staticClass:"gl-border-b gl-flex"},[t("ai-catalog-nav-tabs"),e._v(" "),t("ai-catalog-nav-actions",{attrs:{"can-admin":""}})],1):e._e(),e._v(" "),e.shouldShowLinkToDashboardsModal?t("link-to-dashboard-modal",{attrs:{"dashboard-name":e.$options.AI_IMPACT_DASHBOARD}}):e._e()],1)}),[],!1,null,null,null);t.a=le.exports},"28LK":function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty;var r=function(e,t){return null!=e&&i.call(e,t)},a=n("SvRe");t.a=function(e,t){return null!=e&&Object(a.a)(e,t,r)}},"2G1L":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n("v2fZ");var i=n("zNqO");const r=function(e,t){Object(i.d)(e)?e.$.scope.cleanups.push(t):e.$once("hook:destroyed",t)}},"2NY6":function(e,t,n){"use strict";var i=n("PpKG"),r=n("zYHN"),a=n("Yy1j"),o=e.exports=r["__core-js_shared__"]||a("__core-js_shared__",{});(o.versions||(o.versions=[])).push({version:"3.45.1",mode:i?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"2QGj":function(e,t,n){"use strict";t.a=function(e,t,n,i){for(var r=e.length,a=n+(i?1:-1);i?a--:++a({disclosureId:Object(i.a)("disclosure-"),nextFocusedItemIndex:null}),computed:{disclosureTag(){var e;return null!==(e=this.items)&&void 0!==e&&e.length||Object(f.b)(this.$scopedSlots.default||this.$slots.default)?"ul":"div"},hasCustomToggle(){return Boolean(this.$scopedSlots.toggle)},siblingsHaveIcons(){return Object(f.a)(this.items)}},mounted(){this.toggleAriaLabel&&this.toggleAriaLabelledBy&&Object(a.i)("Do not provide both `toggleAriaLabel` and `toggleAriaLabelledBy`. When both are present, `toggleAriaLabelledBy` takes precedence and `toggleAriaLabel` is ignored. See https://design.gitlab.com/components/dropdown-disclosure/#accessibility",{name:"GlDisclosureDropdown"}),this.startOpened&&this.open()},methods:{doSomeItemsHaveIcon:f.a,open(){this.$refs.baseDropdown.open()},close(){this.$refs.baseDropdown.close()},onShow(){this.$emit(o.i)},onBeforeClose(e){this.$emit(o.e,e)},onHide(){this.$emit(o.h),this.nextFocusedItemIndex=null},onKeydown(e){const{code:t}=e,n=this.getFocusableListItemElements();if(n.length<1)return;let i=!0;t===o.j?this.focusItem(0,n):t===o.c?this.focusItem(n.length-1,n):t===o.b?this.focusNextItem(e,n,-1):t===o.a?this.focusNextItem(e,n,1):t===o.d||t===o.n?this.handleAutoClose(e):i=!1,i&&Object(a.k)(e)},getFocusableListItemElements(){var e;const t=null===(e=this.$refs.content)||void 0===e?void 0:e.querySelectorAll(p);return Object(a.c)(Array.from(t||[]))},focusNextItem(e,t,n){const{target:i}=e,a=t.indexOf(i),o=Object(r.a)(a+n,0,t.length-1);this.focusItem(o,t)},focusItem(e,t){var n;this.nextFocusedItemIndex=e,null===(n=t[e])||void 0===n||n.focus()},closeAndFocus(){this.$refs.baseDropdown.closeAndFocus()},handleAction(e){var t=this;window.requestAnimationFrame((function(){t.$emit("action",e)}))},handleAutoClose(e){var t,n;this.autoClose&&e.target.closest(p)&&null!==(t=(n=this.$refs.baseDropdown).containsElement)&&void 0!==t&&t.call(n,e.target)&&this.closeAndFocus()},uniqueItemId:()=>Object(i.a)("disclosure-item-"),isItem:f.d},GL_DROPDOWN_CONTENTS_CLASS:o.f},m=n("tBpV"),g=Object(m.a)(h,(function(){var e=this,t=e._self._c;return t("gl-base-dropdown",{ref:"baseDropdown",staticClass:"gl-disclosure-dropdown",attrs:{"aria-labelledby":e.toggleAriaLabelledBy,"aria-label":e.toggleAriaLabelledBy?void 0:e.toggleAriaLabel,"arrow-element":e.$refs.disclosureArrow,"toggle-id":e.toggleId,"toggle-text":e.toggleText,"toggle-class":e.toggleClass,"text-sr-only":e.textSrOnly,category:e.category,variant:e.variant,size:e.size,icon:e.icon,disabled:e.disabled,loading:e.loading,"no-caret":e.noCaret,placement:e.placement,block:e.block,offset:e.dropdownOffset,"fluid-width":e.fluidWidth,"positioning-strategy":e.positioningStrategy,"is-disclosure":""},on:e._d({},[e.$options.events.GL_DROPDOWN_SHOWN,e.onShow,e.$options.events.GL_DROPDOWN_HIDDEN,e.onHide,e.$options.events.GL_DROPDOWN_BEFORE_CLOSE,e.onBeforeClose,e.$options.events.GL_DROPDOWN_FOCUS_CONTENT,e.onKeydown]),scopedSlots:e._u([e.hasCustomToggle?{key:"toggle",fn:function(t){return[e._t("toggle",null,null,t)]}}:null],null,!0)},[e._v(" "),e._t("header"),e._v(" "),t(e.disclosureTag,{ref:"content",tag:"component",class:e.$options.GL_DROPDOWN_CONTENTS_CLASS,attrs:{id:e.disclosureId,"aria-labelledby":e.listAriaLabelledBy||e.toggleId,"data-testid":"disclosure-content",tabindex:"-1"},on:{keydown:e.onKeydown,click:e.handleAutoClose}},[e._t("default",(function(){return[e._l(e.items,(function(n,i){return[e.isItem(n)?[t("gl-disclosure-dropdown-item",{key:e.uniqueItemId(),attrs:{"siblings-have-icons":e.siblingsHaveIcons,item:n},on:{action:e.handleAction},scopedSlots:e._u(["list-item"in e.$scopedSlots?{key:"list-item",fn:function(){return[e._t("list-item",null,{item:n})]},proxy:!0}:null],null,!0)})]:[t("gl-disclosure-dropdown-group",{key:n.name,attrs:{bordered:0!==i,group:n},on:{action:e.handleAction},scopedSlots:e._u([e.$scopedSlots["group-label"]?{key:"group-label",fn:function(){return[e._t("group-label",null,{group:n})]},proxy:!0}:null,e.$scopedSlots["list-item"]?{key:"default",fn:function(){return e._l(n.items,(function(i){return t("gl-disclosure-dropdown-item",{key:e.uniqueItemId(),attrs:{"siblings-have-icons":e.doSomeItemsHaveIcon(n.items),item:i},on:{action:e.handleAction},scopedSlots:e._u([{key:"list-item",fn:function(){return[e._t("list-item",null,{item:i})]},proxy:!0}],null,!0)})}))},proxy:!0}:null],null,!0)})]]}))]}))],2),e._v(" "),e._t("footer")],2)}),[],!1,null,null,null);t.a=g.exports},"2ibD":function(e,t,n){"use strict";var i=n("YsOi"),r=n.n(i);n("byxs");const a=["patch","post","put"];n("ZzK0"),n("z6RN"),n("BzOf"),n("Tznw"),n("IYH6"),n("6yen"),n("OeRx"),n("l/dT"),n("RqS2"),n("Zy7a"),n("cjZU"),n("OAhk"),n("X42P"),n("mHhP"),n("fn0I"),n("UB/6"),n("imhG");var o=n("5WIS"),s=n("3twG");const l=function(e){const t=function(e){return e.replace(gon.gitlab_url,"")}(e.url);return Object(s.A)(e.params||{},t,{sort:!0})};var c,u,d=function(e){const{startup_calls:t}=window.gl||{};if(!t||Object(o.a)(t))return;const n=new Map(Object.entries(t)),i=e.interceptors.request.use((async function(t){const r=l(t),a=n.get(r);if(null==a||!a.fetchCall)return t;try{await async function({fetchCall:e},t){const n=await e;if(!n.ok)throw new Error(n.statusText);const i={};n.headers.forEach((function(e,t){i[t]=e}));const r=await n.clone().json();Object.assign(t,{adapter:function(){return Promise.resolve({data:r,status:n.status,statusText:n.statusText,headers:i,config:t,request:t})}})}(a,t)}catch(e){console.warn(`[gitlab] Something went wrong with the startup call for "${r}"`,e)}return n.delete(r),0===n.size&&e.interceptors.request.eject(i),t}))},f=n("Qhxq"),p=n("dQ20");r.a.defaults.headers.common[f.a.headerKey]=f.a.token,r.a.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",null!==(c=gon.current_organization)&&void 0!==c&&c.id&&(r.a.defaults.headers.common["X-GitLab-Organization-ID"]=gon.current_organization.id),r.a.interceptors.request.use((function(e){return window.pendingRequests=window.pendingRequests||0,window.pendingRequests+=1,e})),d(r.a),r.a.interceptors.response.use((function(e){return window.pendingRequests-=1,e}),(function(e){return window.pendingRequests-=1,Promise.reject(e)})),r.a.interceptors.response.use((function(e){return e}),(function(e){return function(e,t){return t&&"ECONNABORTED"===e.code?new Promise((function(){})):Promise.reject(e)}(e,Object(p.a)())})),(u=r.a).interceptors.response.use((function(e){return e}),(function(e){return function(e){var t,n;return a.includes(null==e||null===(t=e.config)||void 0===t?void 0:t.method)&&(null==e||null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.needs_captcha_response)}(e)?async function(e,t,i){const{waitForCaptchaToBeSolved:r}=await Promise.all([n.e("5bc462ce"),n.e("28d36ba3"),n.e("a0ae78ea")]).then(n.bind(null,"aG+H")),a=await r(t.captcha_site_key),o=JSON.parse(i.data),s=i.headers;return e({method:i.method,url:i.url,headers:{...s,"X-GitLab-Captcha-Response":a,"X-GitLab-Spam-Log-Id":t.spam_log_id},data:o})}(u,e.response.data,e.config):Promise.reject(e)}));t.a=r.a},"2nHD":function(e,t,n){"use strict";var i=n("hMZ/"),r=n("0ehE"),a=n("Qenc"),o=n("UuMg"),s=n("cdtr"),l=n("czXD"),c=r.Set,u=r.add,d=r.has;e.exports=function(e){var t=i(this),n=o(e),r=new c;return a(t)>n.size?l(n.getIterator(),(function(e){d(t,e)&&u(r,e)})):s(t,(function(e){n.includes(e)&&u(r,e)})),r}},"2rQv":function(e,t,n){"use strict";var i=n("jl4x"),r=n("x5C5"),a=n("/EoU"),o=n("ejl/"),s=n("WRcO");i&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=a(this),t=o(e);return 0===t?0:t-1}}),r("lastIndex"))},"2ylk":function(e,t,n){"use strict";var i=n("yg9e"),r=n("BWND"),a=n("kEo8"),o=n("lErv").indexOf,s=n("SIxH"),l=i([].push);e.exports=function(e,t){var n,i=a(e),c=0,u=[];for(n in i)!r(s,n)&&r(i,n)&&l(u,n);for(;t.length>c;)r(i,n=t[c++])&&(~o(u,n)||l(u,n));return u}},"3+zt":function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return m}));n("ZzK0"),n("z6RN"),n("BzOf");var i=n("H03G"),r=n("ewH8"),a=(n("RFHG"),n("xuo1"),n("v2fZ"),n("aFm2"),n("R9qC"),n("yN/U")),o=n("Mp8J");var s={components:{GlPopover:a.a},directives:{SafeHtml:o.a},expose:["addPopovers","dispose"],data:()=>({popovers:[]}),created(){var e=this;this.observer=new MutationObserver((function(t){t.forEach((function(t){t.removedNodes.forEach(e.dispose)}))}))},beforeDestroy(){this.observer.disconnect()},methods:{addPopovers(e){var t=this;const n=e.reduce((function(e,n){if(t.popoverExists(n))return e;const i=function(e){const{content:t,html:n,placement:i,title:r,triggers:a="focus"}=e.dataset;return{target:e,content:t,html:n,placement:i,title:r,triggers:a}}(n);return t.observe(i),[...e,i]}),[]);this.popovers.push(...n)},observe(e){this.observer.observe(e.target.parentElement,{childList:!0})},dispose(e){if(e){const t=this.popovers.findIndex((function(t){return t.target===e}));t>-1&&this.popovers.splice(t,1)}else this.popovers=[]},popoverExists(e){return this.popovers.some((function(t){return t.target===e}))}},safeHtmlConfig:{ADD_TAGS:["use"]}},l=n("tBpV"),c=Object(l.a)(s,(function(){var e=this,t=e._self._c;return t("div",e._l(e.popovers,(function(n,i){return t("gl-popover",e._b({key:i,scopedSlots:e._u([n.title?{key:"title",fn:function(){return[n.html?t("span",{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfig]",value:n.title,expression:"popover.title",arg:e.$options.safeHtmlConfig}]}):t("span",[e._v(e._s(n.title))])]},proxy:!0}:null],null,!0)},"gl-popover",n,!1),[e._v(" "),n.html?t("span",{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfig]",value:n.content,expression:"popover.content",arg:e.$options.safeHtmlConfig}]}):t("span",[e._v(e._s(n.content))])])})),1)}),[],!1,null,null,null).exports;let u,d=!1;const f=function(){if(!u){const e=document.createElement("div");e.setAttribute("id","gl-popovers-app"),document.body.appendChild(e);const t=r.default.extend(c);u=new t({name:"PopoversRoot"}),u.$mount("#gl-popovers-app")}return u},p=function(e,t){return e.matches&&e.matches(t)},h=function(){return d||(["mouseenter","focus","click"].forEach((function(e){document.addEventListener(e,(function(e){return function(e,t,n){for(let{target:i}=t;i&&i!==e;i=i.parentNode)if(p(i,n)){f().addPopovers([i]);break}}(document,e,'[data-toggle="popover"]')}),!0)})),d=!0),f()},m=function(e){return Object(i.a)(e).forEach(f().dispose)}},"30z/":function(e,t){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"Label"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Label"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"textColor"},arguments:[],directives:[]}]}}],loc:{start:0,end:75}};n.loc.source={body:"fragment Label on Label {\n id\n title\n description\n color\n textColor\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"Label")},"33Wo":function(e,t,n){"use strict";var i,r,a,o=n("QmHw"),s=n("SIP5"),l=n("wZF9"),c=n("TEho"),u=n("QDZz"),d=n("h4DK"),f=n("7Sby"),p=n("PpKG"),h=f("iterator"),m=!1;[].keys&&("next"in(a=[].keys())?(r=u(u(a)))!==Object.prototype&&(i=r):m=!0),!l(i)||o((function(){var e={};return i[h].call(e)!==e}))?i={}:p&&(i=c(i)),s(i[h])||d(i,h,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:m}},"34ae":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));n("ZzK0"),n("z6RN"),n("BzOf");var i=n("/lV4"),r=n("0AwG");function a(e){e.forEach((function(e){var t,n;if(!e||e.hasAttribute("aria-label"))return;const a=e.closest("li");if(!a)return;const o=a.cloneNode(!0);null===(t=o.querySelector("ul, ol"))||void 0===t||t.remove();const s=null==o||null===(n=o.textContent)||void 0===n?void 0:n.trim();null!=s&&s.length&&e.setAttribute("aria-label",Object(i.j)(Object(i.a)("Check option: %{option}"),{option:Object(r.E)(s,100)}))}))}},"35gi":function(e,t,n){"use strict";n("3UXl"),n("iyoE"),n("UezY"),n("z6RN"),n("hG7+"),n("B++/"),n("47t/");var i=n("9MU8"),r=n("dLPT"),a=n("yxLa"),o=n("mpVB"),s=n("47Nv"),l=n("6IH5");const c=[{value:"=",description:"is",default:!0},{value:"!=",description:"is not"}];var u={name:"GlFilteredSearchToken",__v_skip:!0,components:{GlToken:a.a,GlFilteredSearchTokenSegment:s.a},inheritAttrs:!1,props:{availableTokens:{type:Array,required:!1,default:function(){return[]}},config:{type:Object,required:!1,default:function(){return{}}},active:{type:Boolean,required:!1,default:!1},multiSelectValues:{type:Array,required:!1,default:function(){return[]}},value:{type:Object,required:!1,default:function(){return{operator:"",data:""}}},showFriendlyText:{type:Boolean,required:!1,default:!1},cursorPosition:{type:String,required:!1,default:"end",validator:function(e){return["start","end"].includes(e)}},viewOnly:{type:Boolean,required:!1,default:!1},dataSegmentInputAttributes:{type:Object,required:!1,default:function(){return{}}}},data(){return{activeSegment:null,tokenValue:Object(i.a)(this.value),intendedCursorPosition:this.cursorPosition}},computed:{operators(){return this.config.operators||c},tokenEmpty(){var e;return 0===(null===(e=this.tokenValue.data)||void 0===e?void 0:e.length)},hasDataOrDataSegmentIsCurrentlyActive(){return!this.tokenEmpty||this.isSegmentActive("DATA")},availableTokensWithSelf(){var e=this;return[this.config,...this.availableTokens.filter((function(t){return t!==e.config}))].map(l.o)},operatorDescription(){var e=this;const t=this.operators.find((function(t){return t.value===e.tokenValue.operator}));return this.showFriendlyText?null==t?void 0:t.description:null==t?void 0:t.value},eventListeners(){return this.viewOnly?{}:{mousedown:this.stopMousedownOnCloseButton,close:this.destroyByClose}}},segments:{SEGMENT_TITLE:"TYPE",SEGMENT_DATA:"DATA",SEGMENT_OPERATOR:"OPERATOR"},watch:{tokenValue:{deep:!0,handler(e){this.$emit("input",e)}},value:{handler(e,t){Object(r.default)(null==e?void 0:e.data,null==t?void 0:t.data)&&(null==e?void 0:e.operator)===(null==t?void 0:t.operator)||(this.tokenValue=Object(i.a)(e))}},active:{immediate:!0,handler(e){e?(this.intendedCursorPosition=this.cursorPosition,this.activeSegment||this.activateSegment(this.tokenEmpty?"OPERATOR":"DATA")):(this.activeSegment=null,this.config.multiSelect&&this.$emit("input",{...this.tokenValue,data:this.multiSelectValues||""}),this.tokenEmpty&&0===this.multiSelectValues.length&&this.$emit("destroy"))}}},created(){if(!("operator"in this.tokenValue))if(1===this.operators.length){const e=this.operators[0].value;this.$emit("input",{...this.tokenValue,operator:e}),this.activeSegment="DATA"}else this.$emit("input",{...this.tokenValue,operator:""})},methods:{activateSegment(e){this.viewOnly||(this.activeSegment=e,this.active||this.$emit("activate"))},getAdditionalSegmentClasses(e){return this.viewOnly?"gl-cursor-text":{"gl-cursor-pointer":!this.isSegmentActive(e)}},isSegmentActive(e){return this.active&&this.activeSegment===e},replaceWithTermIfEmpty(){""===this.tokenValue.operator&&this.tokenEmpty&&this.$emit("replace",Object(l.e)(this.config.title))},replaceToken(e){var t=this;const n=this.availableTokens.find((function({type:t}){return t===e}));if(n!==this.config){if(n){const e=this.config.dataType&&this.config.dataType===n.dataType;this.$emit("replace",{type:n.type,value:e?this.tokenValue:{data:""}})}}else this.$nextTick((function(){t.$emit("deactivate")}))},handleOperatorKeydown(e,{inputValue:t,suggestedValue:n,applySuggestion:i}){const{key:r}=e;if(" "===r||"Spacebar"===r)return void i(n);const a=`${t}${r}`;1!==r.length||this.operators.find((function({value:e}){return e.startsWith(a)}))||(this.tokenEmpty?i(n):e.preventDefault())},activateDataSegment(){this.config.multiSelect&&this.$emit("input",{...this.tokenValue,data:""}),this.activateSegment(this.$options.segments.SEGMENT_DATA)},activatePreviousOperatorSegment(){this.activateSegment(this.$options.segments.SEGMENT_OPERATOR),this.intendedCursorPosition="end"},activatePreviousTitleSegment(){this.activateSegment(this.$options.segments.SEGMENT_TITLE),this.intendedCursorPosition="end"},activateNextDataSegment(){this.activateDataSegment(),this.intendedCursorPosition="start"},activateNextOperatorSegment(){this.activateSegment(this.$options.segments.SEGMENT_OPERATOR),this.intendedCursorPosition="start"},handleComplete(e){this.$emit("complete",e)},stopMousedownOnCloseButton(e){e.target.closest(l.d)&&Object(o.k)(e)},destroyByClose(){this.$emit("destroy")}}},d=n("tBpV"),f=Object(d.a)(u,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"gl-filtered-search-token",class:{"gl-filtered-search-token-active":e.active,"gl-filtered-search-token-hover":!e.viewOnly,"gl-cursor-default":e.viewOnly},attrs:{"data-testid":"filtered-search-token"}},[t("gl-filtered-search-token-segment",{key:"title-segment",attrs:{value:e.config.segmentTitle||e.config.title,active:e.isSegmentActive(e.$options.segments.SEGMENT_TITLE),"cursor-position":e.intendedCursorPosition,options:e.availableTokensWithSelf,"view-only":e.viewOnly},on:{activate:function(t){return e.activateSegment(e.$options.segments.SEGMENT_TITLE)},deactivate:function(t){return e.$emit("deactivate")},complete:e.replaceToken,backspace:function(t){return e.$emit("destroy")},submit:function(t){return e.$emit("submit")},previous:function(t){return e.$emit("previous")},next:e.activateNextOperatorSegment},scopedSlots:e._u([{key:"view",fn:function({inputValue:n}){return[t("gl-token",{staticClass:"gl-filtered-search-token-type",class:e.getAdditionalSegmentClasses(e.$options.segments.SEGMENT_TITLE),attrs:{"view-only":""}},[e._v("\n "+e._s(n)+"\n ")])]}}])}),e._v(" "),t("gl-filtered-search-token-segment",{key:"operator-segment",attrs:{active:e.isSegmentActive(e.$options.segments.SEGMENT_OPERATOR),"cursor-position":e.intendedCursorPosition,options:e.operators,"option-text-field":"value","custom-input-keydown-handler":e.handleOperatorKeydown,"view-only":e.viewOnly},on:{activate:function(t){return e.activateSegment(e.$options.segments.SEGMENT_OPERATOR)},backspace:e.replaceWithTermIfEmpty,complete:function(t){return e.activateSegment(e.$options.segments.SEGMENT_DATA)},deactivate:function(t){return e.$emit("deactivate")},previous:e.activatePreviousTitleSegment,next:e.activateNextDataSegment},scopedSlots:e._u([{key:"view",fn:function(){return[t("gl-token",{staticClass:"gl-filtered-search-token-operator",class:e.getAdditionalSegmentClasses(e.$options.segments.SEGMENT_OPERATOR),attrs:{variant:"search-value","view-only":""}},[e._v("\n "+e._s(e.operatorDescription)+"\n ")])]},proxy:!0},{key:"option",fn:function({option:n}){return[t("div",{staticClass:"gl-flex"},[e._v("\n "+e._s(e.showFriendlyText?n.description:n.value)+"\n "),n.description?t("span",{staticClass:"gl-filtered-search-token-operator-description"},[e._v("\n "+e._s(e.showFriendlyText?n.value:n.description)+"\n ")]):e._e()])]}}]),model:{value:e.tokenValue.operator,callback:function(t){e.$set(e.tokenValue,"operator",t)},expression:"tokenValue.operator"}}),e._v(" "),e.hasDataOrDataSegmentIsCurrentlyActive?t("gl-filtered-search-token-segment",{key:"data-segment",attrs:{active:e.isSegmentActive(e.$options.segments.SEGMENT_DATA),"cursor-position":e.intendedCursorPosition,"multi-select":e.config.multiSelect,options:e.config.options,"view-only":e.viewOnly,"search-input-attributes":e.dataSegmentInputAttributes},on:{activate:e.activateDataSegment,backspace:function(t){return e.activateSegment(e.$options.segments.SEGMENT_OPERATOR)},complete:e.handleComplete,select:function(t){return e.$emit("select",t)},submit:function(t){return e.$emit("submit")},deactivate:function(t){return e.$emit("deactivate")},split:function(t){return e.$emit("split",t)},previous:e.activatePreviousOperatorSegment,next:function(t){return e.$emit("next")}},scopedSlots:e._u([{key:"before-input",fn:function(t){return[e._t("before-data-segment-input",null,null,t)]}},{key:"input",fn:function(t){return[e._t("data-segment-input",null,null,t)]}},{key:"suggestions",fn:function(){return[e._t("suggestions")]},proxy:!0},{key:"view",fn:function({inputValue:n}){return[e._t("view-token",(function(){return[t("gl-token",e._g({staticClass:"gl-filtered-search-token-data",class:e.getAdditionalSegmentClasses(e.$options.segments.SEGMENT_DATA),attrs:{variant:"search-value","view-only":e.viewOnly}},e.eventListeners),[t("span",{staticClass:"gl-filtered-search-token-data-content"},[e._t("view",(function(){return[e._v(e._s(n))]}),null,{inputValue:n})],2)])]}),null,{inputValue:n,listeners:e.eventListeners,cssClasses:{"gl-filtered-search-token-data":!0,...e.getAdditionalSegmentClasses(e.$options.segments.SEGMENT_DATA)}})]}}],null,!0),model:{value:e.tokenValue.data,callback:function(t){e.$set(e.tokenValue,"data",t)},expression:"tokenValue.data"}}):e._e()],1)}),[],!1,null,null,null);t.a=f.exports},"3E4U":function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));n("ZzK0"),n("z6RN"),n("BzOf");var i=n("EmJ/"),r=n.n(i),a=n("D+x4"),o=n("NmEs");class s{constructor(){const e="undefined"!=typeof navigator&&navigator.userAgent||"";/\b(iPad|iPhone|iPod)(?=;)/.test(e)||(r()(document).on("copy",".md, .duo-chat-message",(function(e){s.copyAsGFM(e,s.transformGFMSelection)})),r()(document).on("copy","pre.code.highlight, table.code td.line_content, .code pre",(function(e){s.copyAsGFM(e,s.transformCodeSelection)})),r()(document).on("paste",".js-gfm-input",s.pasteGFM))}static copyAsGFM(e,t){const{clipboardData:n}=e.originalEvent;if(!n)return;const i=Object(o.m)();if(!i)return;const r=t(i.cloneNode(!0),e.currentTarget);if(!r)return;e.preventDefault(),e.stopPropagation();const a=document.createElement("div");a.appendChild(r.cloneNode(!0));const l=a.innerHTML;n.setData("text/plain",r.textContent),n.setData("text/html",l),n.setData("text/x-gfm-html",l),s.nodeToGFM(r).then((function(e){n.setData("text/x-gfm",e)})).catch((function(){}))}static pasteGFM(e){const{clipboardData:t}=e.originalEvent;if(!t)return;const n=t.getData("text/plain"),i=t.getData("text/x-gfm"),r=t.getData("text/x-gfm-html");if(i||r)if(e.preventDefault(),e.stopImmediatePropagation(),i)s.insertPastedText(e.target,n,i);else{const t=document.createElement("div");t.innerHTML=Object(a.b)(r),s.nodeToGFM(t).then((function(t){s.insertPastedText(e.target,n,t)})).catch((function(){}))}}static insertPastedText(e,t,n){Object(o.q)(e,(function(e){const i=e.match(/`/g);return i&&i.length%2==1?t:n}))}static transformGFMSelection(e){const t=e.querySelectorAll(".md");switch(t.length){case 0:return e;case 1:return t[0];default:{const e=document.createElement("div");for(let n=0;n1){r=document.createElement("pre"),r.className="code highlight";const[e]=i,t=e.getAttribute("lang")||e.dataset.lang;t&&r.setAttribute("lang",t)}else r=document.createElement("code");if(i.length>0)for(let e=0;e "+e.split("\n").join("\n> ")}static isGfmFragment(e){let t=Boolean(e.querySelector(".md"));return e.originalNodes&&e.originalNodes.forEach((function(e){let n=e;do{n.matches&&n.matches(".md")&&(t=!0),n=n.parentNode}while(n&&!t)})),t}static selectionToGfm(e=document.querySelector("#content-body")){const t=Object(o.m)(e);if(!t||!s.isGfmFragment(t))return Promise.resolve("");const n=s.transformGFMSelection(t.cloneNode(!0)),i=document.createElement("blockquote");return i.appendChild(n),s.nodeToGFM(i)}}function l(){return new s}},"3JQl":function(e,t,n){"use strict";var i={name:"SearchResultFocusLayover",components:{GlSprintf:n("dIEn").a},props:{textMessage:{type:String,required:!0}}},r=n("tBpV"),a=Object(r.a)(i,(function(){var e=this,t=e._self._c;return t("span",{staticClass:"gl-flex gl-min-w-0 gl-items-center gl-justify-between gl-gap-3"},[t("span",{staticClass:"gl-flex gl-min-w-0 gl-grow gl-gap-3"},[e._t("default")],2),e._v(" "),t("span",{staticClass:"show-focus-layover-hint gl-hidden gl-items-center gl-justify-end gl-opacity-0 sm:gl-flex"},[t("span",{staticClass:"gl-whitespace-nowrap gl-text-subtle",attrs:{"data-testid":"overlay-message"}},[t("gl-sprintf",{attrs:{message:e.textMessage},scopedSlots:e._u([{key:"kbd",fn:function({content:n}){return[t("kbd",{staticClass:"-gl-mb-2 -gl-mt-3 gl-pb-3 gl-align-middle gl-text-base"},[e._v("\n "+e._s(n)+"\n ")])]}}])})],1)])])}),[],!1,null,null,null);t.a=a.exports},"3Rfi":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getUserWorkflows"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"type"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"duoWorkflowWorkflows"},arguments:[{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"Variable",name:{kind:"Name",value:"type"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"lastUpdatedAt"},name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"title"},name:{kind:"Name",value:"goal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"aiCatalogItemVersionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"agentName"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"gl_introduced"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"StringValue",value:"18.9.0",block:!1}}]}]}]}}]}}]}}]}}],loc:{start:0,end:298}};n.loc.source={body:'query getUserWorkflows($type: String, $first: Int) {\n duoWorkflowWorkflows(type: $type, first: $first) {\n edges {\n node {\n id\n lastUpdatedAt: updatedAt\n title: goal\n aiCatalogItemVersionId\n agentName @gl_introduced(version: "18.9.0")\n }\n }\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"getUserWorkflows")},"3T15":function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var i=n("zNqO"),r=n("n64d"),a=n("pTIT"),o=n("EXdk"),s=n("dJQL"),l=n("Cn4y"),c=n("LZh3"),u=n("Z4o9"),d=n("2G1L"),f=n("p+x1"),p=n("bBHQ"),h=n("MGi3"),m=n("W1rz"),g=n("Ccns");const v={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOPLEFT:"top",TOPRIGHT:"top",RIGHTTOP:"right",RIGHTBOTTOM:"right",BOTTOMLEFT:"bottom",BOTTOMRIGHT:"bottom",LEFTTOP:"left",LEFTBOTTOM:"left"},b={AUTO:0,TOPLEFT:-1,TOP:0,TOPRIGHT:1,RIGHTTOP:-1,RIGHT:0,RIGHTBOTTOM:1,BOTTOMLEFT:-1,BOTTOM:0,BOTTOMRIGHT:1,LEFTTOP:-1,LEFT:0,LEFTBOTTOM:1},y={arrowPadding:Object(l.a)(o.l,6),boundary:Object(l.a)([f.c,o.q],"scrollParent"),boundaryPadding:Object(l.a)(o.l,5),fallbackPlacement:Object(l.a)(o.e,"flip"),offset:Object(l.a)(o.l,0),placement:Object(l.a)(o.q,"top"),target:Object(l.a)([f.c,f.d])},_=Object(i.c)({name:r.z,mixins:[p.a],props:y,data(){return{noFade:!1,localShow:!0,attachment:this.getAttachment(this.placement)}},computed:{templateType:()=>"unknown",popperConfig(){var e=this;const{placement:t}=this;return{placement:this.getAttachment(t),modifiers:{offset:{offset:this.getOffset(t)},flip:{behavior:this.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{padding:this.boundaryPadding,boundariesElement:this.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e.popperPlacementChange(t)},onUpdate:function(t){e.popperPlacementChange(t)}}}},created(){var e=this;this.$_popper=null,this.localShow=!0,this.$_handleDestroy=function(){e.$nextTick((function(){Object(h.z)((function(){e.$destroy()}))}))},Object(d.a)(this.bvParent,this.$_handleDestroy)},beforeMount(){this.attachment=this.getAttachment(this.placement)},updated(){this.updatePopper()},beforeDestroy(){this.destroyPopper()},destroyed(){const e=this.$el;e&&e.parentNode&&e.parentNode.removeChild(e)},methods:{hide(){this.localShow=!1},getAttachment:e=>v[String(e).toUpperCase()]||"auto",getOffset(e){if(!this.offset){const t=this.$refs.arrow||Object(h.A)(".arrow",this.$el),n=Object(m.a)(Object(h.k)(t).width,0)+Object(m.a)(this.arrowPadding,0);switch(b[String(e).toUpperCase()]||0){case 1:return`+50%p - ${n}px`;case-1:return`-50%p + ${n}px`;default:return 0}}return this.offset},popperCreate(e){this.destroyPopper(),this.$_popper=new u.a(this.target,e,this.popperConfig)},destroyPopper(){this.$_popper&&this.$_popper.destroy(),this.$_popper=null},updatePopper(){this.$_popper&&this.$_popper.scheduleUpdate()},popperPlacementChange(e){this.attachment=this.getAttachment(e.placement)},renderTemplate:e=>e("div")},render(e){var t=this;const{noFade:n}=this;return e(g.a,{props:{appear:!0,noFade:n},on:{beforeEnter:function(e){t.popperCreate(e),t.$emit(a.L,e)},afterEnter:function(e){return t.$emit(a.M,e)},beforeLeave:function(e){return t.$emit(a.t,e)},afterLeave:function(e){t.$emit(a.s,e),t.$_handleDestroy()}}},[this.localShow?this.renderTemplate(e):e()])}}),k={html:Object(l.a)(o.f,!1),id:Object(l.a)(o.q)},w=Object(i.c)({name:r.P,extends:_,mixins:[c.a],props:k,data:()=>({title:"",content:"",variant:null,customClass:null,interactive:!0}),computed:{templateType:()=>"tooltip",templateClasses(){const{variant:e,attachment:t,templateType:n}=this;return[{noninteractive:!this.interactive,[`b-${n}-${e}`]:e,[`bs-${n}-${t}`]:t},this.customClass]},templateAttributes(){const{id:e}=this;return{...this.bvParent.bvParent.$attrs,id:e,role:"tooltip",tabindex:"-1",...this.scopedStyleAttrs}},templateListeners(){var e=this;return{mouseenter:function(t){e.$emit(a.w,t)},mouseleave:function(t){e.$emit(a.x,t)},focusin:function(t){e.$emit(a.p,t)},focusout:function(t){e.$emit(a.q,t)}}}},methods:{renderTemplate(e){const{title:t}=this,n=Object(s.e)(t)?t({}):t,i=this.html&&!Object(s.e)(t)?{innerHTML:t}:{};return e("div",{staticClass:"tooltip b-tooltip",class:this.templateClasses,attrs:this.templateAttributes,on:this.templateListeners},[e("div",{staticClass:"arrow",ref:"arrow"}),e("div",{staticClass:"tooltip-inner",domProps:i},[n])])}}})},"3UXl":function(e,t,n){"use strict";n("ZfjD")({target:"AsyncIterator",proto:!0,real:!0,forced:!0},{map:n("eI3+")})},"3cHC":function(e,t,n){"use strict";n.d(t,"p",(function(){return i})),n.d(t,"i",(function(){return r})),n.d(t,"j",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"r",(function(){return s})),n.d(t,"s",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"l",(function(){return d})),n.d(t,"t",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"o",(function(){return h})),n.d(t,"n",(function(){return m})),n.d(t,"m",(function(){return g})),n.d(t,"e",(function(){return v})),n.d(t,"k",(function(){return b})),n.d(t,"g",(function(){return y})),n.d(t,"f",(function(){return _})),n.d(t,"q",(function(){return k})),n.d(t,"d",(function(){return w}));const i="sidebar-portal-mount",r="js-super-sidebar-toggle-collapse",a="js-super-sidebar-toggle-expand",o={CLASSIC:"classic",AGENTIC:"agentic"},s="item_without_id",l="nav_panel_unknown",c="click_menu_item",u="click_pinned_menu_item",d=["group","project","organization"],f={"data-track-property":"nav_user_menu","data-track-action":"click_link"},p={"data-track-property":"nav_help_menu","data-track-action":"click_link"},h="sidebar_pinned_section_expanded",m=3650,g="super-sidebar-pinned-nav-item-clicked",v=4,b="super-sidebar-nav-item-current",y={MAX_COUNT:20,ELIGIBLE_FREQUENCY:3},_=9e5,k={projects:"frequent-projects",groups:"frequent-groups"},w="groups"},"3dB+":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"activeBoardItemEE"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIssue"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!0},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"activeBoardItem"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Issue"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isIssue"}}}]}]},{kind:"FragmentSpread",name:{kind:"Name",value:"EpicDetailed"},directives:[{kind:"Directive",name:{kind:"Name",value:"skip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isIssue"}}}]}]},{kind:"Field",name:{kind:"Name",value:"listId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:277}};i.loc.source={body:'#import "ee_else_ce/boards/graphql/issue.fragment.graphql"\n#import "../epic_detailed.fragment.graphql"\n\nquery activeBoardItemEE($isIssue: Boolean = true) {\n activeBoardItem @client {\n ...Issue @include(if: $isIssue)\n ...EpicDetailed @skip(if: $isIssue)\n listId\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function a(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!r[t]&&(r[t]=!0,!0)}))}i.definitions=i.definitions.concat(a(n("tK5E").definitions)),i.definitions=i.definitions.concat(a(n("XLbx").definitions));var o={};function s(e,t){for(var n=0;n0;){var l=a;a=new Set,l.forEach((function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach((function(e){a.add(e)})))}))}return r.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(i,"activeBoardItemEE")},"3f9Y":function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return i})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(i||(i={}))},"3fnk":function(e,t,n){"use strict";var i=n("2ylk"),r=n("xC9C").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},"3gWQ":function(e,t,n){"use strict";var i=n("LTx3"),r=Object(i.a)((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));t.a=r},"3kcC":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteDuoWorkflowsWorkflow"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteDuoWorkflowsWorkflowInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteDuoWorkflowsWorkflow"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clientMutationId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:176}};n.loc.source={body:"mutation deleteDuoWorkflowsWorkflow($input: DeleteDuoWorkflowsWorkflowInput!) {\n deleteDuoWorkflowsWorkflow(input: $input) {\n clientMutationId\n errors\n success\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"deleteDuoWorkflowsWorkflow")},"3lQS":function(e,t,n){"use strict";var i=n("HTBS"),r=n("FxFN"),a=n("5c3i"),o={components:{GlAvatar:i.a},props:{projectId:{type:[Number,String],default:0,required:!1,validator:e=>"string"!=typeof e||Object(r.i)(e)},projectName:{type:String,required:!0},projectAvatarUrl:{type:String,required:!1,default:""},size:{type:Number,default:32,required:!1},alt:{type:String,required:!1,default:void 0}},computed:{avatarAlt(){var e;return null!==(e=this.alt)&&void 0!==e?e:this.projectName},entityId(){return Object(r.i)(this.projectId)?Object(r.f)(this.projectId):this.projectId}},AVATAR_SHAPE_OPTION_RECT:a.b},s=n("tBpV"),l=Object(s.a)(o,(function(){return(0,this._self._c)("gl-avatar",{attrs:{shape:this.$options.AVATAR_SHAPE_OPTION_RECT,"entity-id":this.entityId,"entity-name":this.projectName,src:this.projectAvatarUrl,alt:this.avatarAlt,size:this.size,"fallback-on-error":!0,itemprop:"image"}})}),[],!1,null,null,null);t.a=l.exports},"3nFn":function(e,t,n){"use strict";var i=n("S7Cj").a.Uint8Array;t.a=i},"3o5V":function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"d",(function(){return g})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return b}));var i=n("UNrv"),r=n("mgeq"),a=n("z61M"),o=n("DT2d");function s(e,t,n){var i=0;return e.forEach((function(n,r){t.call(this,n,r,e)&&(e[i++]=n)}),n),e.length=i,e}var l=n("Xh/e"),c=n("xfGr"),u={kind:"Field",name:{kind:"Name",value:"__typename"}};function d(e){return function e(t,n){return t.selectionSet.selections.every((function(t){return"FragmentSpread"===t.kind&&e(n[t.name.value],n)}))}(Object(o.f)(e)||Object(o.c)(e),Object(c.a)(Object(o.d)(e)))?null:e}function f(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function p(e,t){var n=Object.create(null),r=[],o=Object.create(null),c=[],u=d(Object(a.d)(t,{Variable:{enter:function(e,t,i){"VariableDefinition"!==i.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&(e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(f(e))))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),t.selectionSet&&function e(t){var n=[];return t.selections.forEach((function(t){(Object(l.e)(t)||Object(l.f)(t))&&t.selectionSet?e(t.selectionSet).forEach((function(e){return n.push(e)})):"FragmentSpread"===t.kind&&n.push(t)})),n}(t.selectionSet).forEach((function(e){c.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){o[e.name.value]=!0}},Directive:{enter:function(t){if(f(e)(t))return null}}}));return u&&s(r,(function(e){return!!e.name&&!n[e.name]})).length&&(u=function(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return d(Object(a.d)(t,{OperationDefinition:{enter:function(t){return Object(i.__assign)(Object(i.__assign)({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var i=0;if(t.arguments&&t.arguments.forEach((function(e){n(e)&&(i+=1)})),1===i)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}(r,u)),u&&s(c,(function(e){return!!e.name&&!o[e.name]})).length&&(u=function(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return d(Object(a.d)(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(c,u)),u}var h=Object.assign((function(e){return Object(a.d)(Object(o.a)(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r)if(!r.some((function(e){return Object(l.e)(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var a=n;if(!(Object(l.e)(a)&&a.directives&&a.directives.some((function(e){return"export"===e.name.value}))))return Object(i.__assign)(Object(i.__assign)({},e),{selections:Object(i.__spreadArray)(Object(i.__spreadArray)([],r,!0),[u],!1)})}}}}})}),{added:function(e){return e===u}}),m={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&r.c.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function g(e){return p([m],Object(o.a)(e))}function v(e){return"query"===Object(o.e)(e).operation?e:Object(a.d)(e,{OperationDefinition:{enter:function(e){return Object(i.__assign)(Object(i.__assign)({},e),{operation:"query"})}}})}function b(e){Object(o.a)(e);var t=p([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=Object(a.d)(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return Object(l.e)(e)&&"__typename"===e.name.value})))return null}}})),t}},"3twG":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"C",(function(){return u})),n.d(t,"K",(function(){return f})),n.d(t,"i",(function(){return p})),n.d(t,"f",(function(){return h})),n.d(t,"e",(function(){return m})),n.d(t,"z",(function(){return g})),n.d(t,"q",(function(){return v})),n.d(t,"A",(function(){return b})),n.d(t,"I",(function(){return y})),n.d(t,"Q",(function(){return _})),n.d(t,"n",(function(){return k})),n.d(t,"L",(function(){return w})),n.d(t,"h",(function(){return S})),n.d(t,"R",(function(){return O})),n.d(t,"r",(function(){return C})),n.d(t,"M",(function(){return D})),n.d(t,"j",(function(){return j})),n.d(t,"V",(function(){return T})),n.d(t,"k",(function(){return x})),n.d(t,"t",(function(){return E})),n.d(t,"w",(function(){return I})),n.d(t,"D",(function(){return A})),n.d(t,"u",(function(){return N})),n.d(t,"G",(function(){return F})),n.d(t,"y",(function(){return P})),n.d(t,"o",(function(){return L})),n.d(t,"s",(function(){return R})),n.d(t,"E",(function(){return M})),n.d(t,"p",(function(){return B})),n.d(t,"B",(function(){return q})),n.d(t,"N",(function(){return $})),n.d(t,"S",(function(){return V})),n.d(t,"l",(function(){return U})),n.d(t,"O",(function(){return G})),n.d(t,"x",(function(){return W})),n.d(t,"g",(function(){return z})),n.d(t,"J",(function(){return H})),n.d(t,"H",(function(){return K})),n.d(t,"T",(function(){return Q})),n.d(t,"U",(function(){return Y})),n.d(t,"F",(function(){return J})),n.d(t,"d",(function(){return Z})),n.d(t,"P",(function(){return X})),n.d(t,"m",(function(){return te})),n.d(t,"c",(function(){return ne})),n.d(t,"v",(function(){return ie}));n("2rQv"),n("lFMf"),n("gOHk"),n("c9hT"),n("RFHG"),n("z6RN"),n("xuo1"),n("v2fZ"),n("3UXl"),n("iyoE"),n("UezY"),n("hG7+"),n("LdIe"),n("PTOk"),n("dHQd"),n("yoDG"),n("KeS/"),n("tWNI"),n("8d6S"),n("VwWG"),n("IYHS"),n("rIA9"),n("MViX"),n("zglm"),n("GDOA"),n("hlbI"),n("a0mT"),n("u3H1"),n("ta8/"),n("IKCR"),n("nmTw"),n("W2kU"),n("58fc"),n("7dtT"),n("Rhav"),n("uhEP"),n("eppl"),n("ZzK0"),n("BzOf");var i=n("hpRO");const r="-",a="/",o=new RegExp(`^${a}+`),s=new RegExp(a+"+$"),l=/[\da-f]{40}/gi;function c(e){return e.lastIndex=0,e}const u=function(e){const{pathname:t}=new URL(e,document.location.href);return t};function d(e){return decodeURIComponent(e.replace(/\+/g,"%20"))}function f(e){try{return decodeURIComponent(e)}catch{return e}}function p(e){let t=encodeURIComponent(e);return["%2F"].forEach((function(e){t=t.replace(new RegExp(e,"g"),decodeURIComponent(e))})),["#","!","~","\\*","'","\\(","\\)"].forEach((function(e){const n=e.codePointAt(e.length-1).toString(16).toUpperCase();t=t.replace(new RegExp(e,"g"),"%"+n)})),t}function h(e){return e.replace(o,"")}function m(e){return e.replace(s,"")}function g(...e){return e.reduce((function(e,t){return t?e?[m(e),a,h(t)].join(""):t:e}),"")}function v(e,t=window.location,n={}){var i,r;const a=null!==(i=null==n||null===(r=n.preservePlusForParams)||void 0===r?void 0:r.includes(e))&&void 0!==i?i:!0===(null==n?void 0:n.preservePlus);return decodeURIComponent(new URL(t).search.substring(1)).split("&").reduce((function(t,n){const i=n.split("=");if(i[0]===e){var r;const e=null!==(r=i[1])&&void 0!==r?r:"",n=a?e:e.replace(/\+/g," ");t.push(n)}return t}),[])}function b(e,t,n={}){const{spreadArrays:i=!1,sort:r=!1}=n;let a={};const[,o,s,l]=t.match(/^([^?#]*)(\?[^#]*)?(.*)/);s&&(a=s.substr(1).split("&").reduce((function(e,t){if(t.length){const n=t.split("=");let r=d(n[0]);const a=d(n.slice(1).join("="));return i&&r.endsWith("[]")?(r=r.slice(0,-2),Array.isArray(e[r])?(e[r].push(a),e):{...e,[r]:[a]}):{...e,[r]:a}}return e}),{})),Object.assign(a,e);const c=(r?Object.keys(a).sort():Object.keys(a)).filter((function(e){return null!==a[e]&&void 0!==a[e]})).map((function(e){let t=a[e];const n=encodeURIComponent(e);return i&&Array.isArray(t)?(t=a[e].map((function(e){return encodeURIComponent(e)})).join(`&${n}[]=`),`${n}[]=${t}`):`${n}=${encodeURIComponent(t)}`})).join("&");return c?`${o}?${c}${l}`:`${o}${l}`}function y(e,t=window.location.href,n=!1){const[i,r]=t.split("#"),[a,o]=i.split("?");if(!o)return t;const s=n?e:e.map((function(e){return encodeURIComponent(e)})),l=o.split("&").filter((function(e){const[t]=e.split("=");return s.indexOf(t)<0})).join("&");return`${a}${l.length>0?"?"+l:""}${r?"#"+r:""}`}function _({state:e={},title:t="",url:n,replace:i=!1,win:r=window}={}){r.history&&(i?r.history.replaceState(e,t,n):r.history.pushState(e,t,n))}const k=function(){var e;return null===(e=window.location.hash)||void 0===e?void 0:e.split("#")[1]},w=function(e){void 0===e?_({title:document.title,url:window.location.pathname+window.location.search,replace:!0}):window.location.hash=e};function S(e){const t=k();return t&&t.includes(e)}function O({url:e=String(window.location)}={}){return c(l).test(e)}function C({url:e=String(window.location)}={}){let t=null;return O({url:e})&&([t]=e.match(c(l))),t}const D=function(e,t){const[n]=e.split("#");return`${n}#${encodeURIComponent(t.replace(/^#/,""))}`},j=function(e){return encodeURIComponent(e).replace(/%2F/g,"/")};function T(e){let t=(gon.relative_url_root||"")+"/-/ide/";return e&&(t+="project"+e.replace(new RegExp(`^${gon.relative_url_root||""}/`),"/")),j(t)}function x(){const{protocol:e,host:t}=window.location;return`${e}//${t}`}function E(e){return/^https?:\/\//.test(e)}function I(e){return/^\/(?!\/)/.test(e)}function A(e){return(e.pathname.endsWith(a)?e.pathname.slice(0,-1):e.pathname).split(a).slice(1)}function N(e){const t=new URL(gon.gitlab_url),n=new URL(e,window.location.href);if(t.origin!==n.origin)return!0;const i=A(t),r=A(n);return!i.every((function(e,t){return e===r[t]}))}function F(e,t){const n=E(t),i=new URL(e,n?t:"file:///"+t);return i.pathname=i.pathname.replace(/\/\/+/g,"/"),n?i.href:decodeURIComponent(i.pathname)}function P(e){if(!function(e){return E(e)||I(e)}(e))return!1;try{const t=new URL(e,x());return["http:","https:"].includes(t.protocol)}catch(e){return!1}}const L=function(e,t){const n=t||x();try{return new URL(e,n).href}catch(e){return""}};const R=function(){return function(e=""){return function(e=""){return e.replace(/^\?/,"").split("&")}(e).filter((function(e){return e.length>0})).map((function(e){const t=e.split("=");return[decodeURI(t[0]),t[1]].join("=")}))}(window.location.search)};function M(e,{gatherArrays:t=!1,specialOperators:n=!1,legacySpacesDecode:i=!1,preservePlusForKeys:r=[]}={}){const a=(null==r?void 0:r.length)>0?new Set(r):null;return(String(e).startsWith("?")?e.slice(1):e).split("&").reduce((function(e,r){if(!r)return e;const[o,s]=r.split("=");if(void 0===s)return e;const l=i?decodeURIComponent(o):d(o),c=i||(null==a?void 0:a.has(l))?decodeURIComponent(s):d(s),u=l.endsWith("[]");if(n&&l.includes("["))u&&e[l]?e[l].push(c):e[l]=u?[c]:c;else if(t&&l.endsWith("[]")){const t=l.slice(0,-2);Array.isArray(e[t])||(e[t]=[]),e[t].push(c)}else e[l]=c;return e}),{})}const B=function(e,t=window.location.search,{gatherArrays:n=!1,preservePlus:i=!1}={}){var r;const a="string"==typeof t?t:window.location.search,o={gatherArrays:n};i&&(o.preservePlusForKeys=[e]);return null!==(r=M(a,o)[e])&&void 0!==r?r:null};function q(e={}){return Object.keys(e).map((function(t){return`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`})).join("&")}const $=function(e={},{url:t=window.location.href,clearParams:n=!1,railsArraySyntax:i=!1,decodeParams:r=!1}={}){const a=new URL(t),o=a.search,s=n?new URLSearchParams(""):new URLSearchParams(o);return Object.keys(e).forEach((function(t){if(null===e[t]||void 0===e[t])s.delete(t);else if(Array.isArray(e[t])){const n=i?t+"[]":t;0===e[t].length?s.delete(n):e[t].forEach((function(e,t){0===t?s.set(n,e):s.append(n,e)}))}else s.set(t,e[t])})),a.search=r?decodeURIComponent(s.toString()):s.toString(),a.toString()};function V(e,t=String(window.location)){return e!==t}function U(e){if(!e)return window.location.protocol.slice(0,-1);const t=e.split(":");return t.length>1?t[0]:void 0}function G(e=""){return e.replace(/[^/]+$/,"")}function W(e){if("string"!=typeof e)return!1;const{origin:t}=window.location;try{return new URL(e,t).origin===t}catch{return!1}}function z({sourceProjectFullPath:e,targetProjectFullPath:t="",iid:n}={}){var i;return n&&e?b({merge_request_id:n,target_project:e!==t?t:""},T("/"+e)):null===(i=window.gl)||void 0===i?void 0:i.webIDEPath}const H=function(e){return e.replace(/^\w+:\/?\/?/,"")},K=function(e){return e.replace(/\/$/,"").replace(/\/(\?|#){1}([^/]*)$/,"$1$2")};function Q(e,t=!1){let n=e;if(e.startsWith("?")){const t=new URL(window.location.href);t.search=e,n=t.toString()}if(!P(n))throw new RangeError("Only http and https protocols are allowed: "+n);if(N(n)){const e=t?"_blank":"_self";window.open(n,e,"noreferrer")}else t?window.open(n):window.location.assign(n)}function Y(e,t){Object(i.f)([...Object(i.d)(),...t]),Q(e)}function J(){window.location.reload()}function Z({base:e=window.location.origin,path:t,refType:n=null}){const i=new URL("",e);return i.pathname=t,n?i.searchParams.set("ref_type",n.toLowerCase()):i.searchParams.delete("ref_type"),i.pathname+i.search}function X(e){const t=g(window.gon.relative_url_root,"/");return"/"!==t&&e.startsWith(t)?g("/",e.substring(t.length)):e}const ee=/^#L(\d+)(?:-(\d+))?$/,te=function(e=window.location.hash){const t=e.match(ee);if(!t||!t[1])return null;const n=parseInt(t[1],10);return{beginning:n,end:t[2]?parseInt(t[2],10):n}};function ne(e,t=window.location.hash){return ee.test(t)?e+t:e}function ie(e){if(!e||"string"!=typeof e)return!1;if(/\s/.test(e))return!1;return/^(https?|git):\/\/[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+/.test(e)}},"3zXT":function(e,t,n){"use strict";t.a=function(e,t){return e.has(t)}},"3zvA":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createAiDuoWorkflow"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"projectId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ProjectID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"namespaceId"}},type:{kind:"NamedType",name:{kind:"Name",value:"NamespaceID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"goal"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"workflowDefinition"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"agentPrivileges"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"preApprovedAgentPrivileges"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"allowAgentToRequestUser"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"aiCatalogItemVersionId"}},type:{kind:"NamedType",name:{kind:"Name",value:"AiCatalogItemVersionID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aiDuoWorkflowCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"projectId"},value:{kind:"Variable",name:{kind:"Name",value:"projectId"}}},{kind:"ObjectField",name:{kind:"Name",value:"namespaceId"},value:{kind:"Variable",name:{kind:"Name",value:"namespaceId"}}},{kind:"ObjectField",name:{kind:"Name",value:"environment"},value:{kind:"EnumValue",value:"WEB"}},{kind:"ObjectField",name:{kind:"Name",value:"goal"},value:{kind:"Variable",name:{kind:"Name",value:"goal"}}},{kind:"ObjectField",name:{kind:"Name",value:"workflowDefinition"},value:{kind:"Variable",name:{kind:"Name",value:"workflowDefinition"}}},{kind:"ObjectField",name:{kind:"Name",value:"agentPrivileges"},value:{kind:"Variable",name:{kind:"Name",value:"agentPrivileges"}}},{kind:"ObjectField",name:{kind:"Name",value:"preApprovedAgentPrivileges"},value:{kind:"Variable",name:{kind:"Name",value:"preApprovedAgentPrivileges"}}},{kind:"ObjectField",name:{kind:"Name",value:"allowAgentToRequestUser"},value:{kind:"Variable",name:{kind:"Name",value:"allowAgentToRequestUser"}}},{kind:"ObjectField",name:{kind:"Name",value:"aiCatalogItemVersionId"},value:{kind:"Variable",name:{kind:"Name",value:"aiCatalogItemVersionId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"workflow"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:739}};n.loc.source={body:"mutation createAiDuoWorkflow(\n $projectId: ProjectID\n $namespaceId: NamespaceID\n $goal: String!\n $workflowDefinition: String!\n $agentPrivileges: [Int!]\n $preApprovedAgentPrivileges: [Int!]\n $allowAgentToRequestUser: Boolean\n $aiCatalogItemVersionId: AiCatalogItemVersionID\n) {\n aiDuoWorkflowCreate(\n input: {\n projectId: $projectId\n namespaceId: $namespaceId\n environment: WEB\n goal: $goal\n workflowDefinition: $workflowDefinition\n agentPrivileges: $agentPrivileges\n preApprovedAgentPrivileges: $preApprovedAgentPrivileges\n allowAgentToRequestUser: $allowAgentToRequestUser\n aiCatalogItemVersionId: $aiCatalogItemVersionId\n }\n ) {\n workflow {\n id\n }\n errors\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"createAiDuoWorkflow")},"4/10":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateIssue"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateIssueInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"createIssuable"},name:{kind:"Name",value:"createIssue"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"issuable"},name:{kind:"Name",value:"issue"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Issue"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:217}};i.loc.source={body:'#import "ee_else_ce/boards/graphql/issue.fragment.graphql"\n\nmutation CreateIssue($input: CreateIssueInput!) {\n createIssuable: createIssue(input: $input) {\n issuable: issue {\n ...Issue\n }\n errors\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};i.definitions=i.definitions.concat(n("tK5E").definitions.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!r[t]&&(r[t]=!0,!0)})));var a={};function o(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){r.has(e)||(r.add(e),(a[e]||new Set).forEach((function(e){s.add(e)})))}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(i,"CreateIssue")},"40X6":function(e,t){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"FlowFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DuoWorkflow"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"humanStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"workflowDefinition"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"latestCheckpoint"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"duoMessages"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"messageType"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"userPermissions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDuoWorkflow"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"project"},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:"webUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"namespace"},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:"webUrl"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:348}};n.loc.source={body:"fragment FlowFragment on DuoWorkflow {\n id\n status\n humanStatus\n createdAt\n updatedAt\n workflowDefinition\n userId\n latestCheckpoint {\n duoMessages {\n content\n messageType\n }\n }\n userPermissions {\n updateDuoWorkflow\n }\n project {\n id\n name\n webUrl\n namespace {\n id\n name\n webUrl\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"FlowFragment")},"45Bl":function(e,t,n){"use strict";var i=n("lCTV"),r=n("dIEn"),a=n("Jx7q"),o=n("/lV4"),s=n("qLpH"),l={name:"NoCreditsBanner",components:{GlAlert:i.a,GlSprintf:r.a,GlLink:a.a},computed:{bannerMessage:()=>Object(o.i)("DuoAgentPlatform|No GitLab Credits remain for this billing period. %{linkStart}Learn more.%{linkEnd}"),creditsPath:()=>Object(s.a)("subscriptions/gitlab_credits")}},c=n("tBpV"),u=Object(c.a)(l,(function(){var e=this,t=e._self._c;return t("gl-alert",{staticClass:"gl-rounded-none",attrs:{variant:"info",dismissible:!1}},[t("gl-sprintf",{attrs:{message:e.bannerMessage},scopedSlots:e._u([{key:"link",fn:function({content:n}){return[t("gl-link",{staticClass:"!gl-no-underline hover:!gl-underline focus:!gl-underline active:!gl-underline",attrs:{href:e.creditsPath,target:"_blank"}},[e._v("\n "+e._s(n)+"\n ")])]}}])})],1)}),[],!1,null,null,null);t.a=u.exports},"45cw":function(e,t,n){"use strict";var i=n("ejl/"),r=n("TxUY"),a=RangeError;e.exports=function(e,t,n,o){var s=i(e),l=r(n),c=l<0?s+l:l;if(c>=s||c<0)throw new a("Incorrect index");for(var u=new t(s),d=0;d1&&this.searchInputAttributes}},watch:{active:{immediate:!0,handler(e){e?this.activate():this.deactivate()}},inputValue(e){if(this.termsAsTokens())return;if(this.multiSelect)return;if("string"!=typeof e)return;const t=e.split('"').length%2==0;if(-1===e.indexOf(" ")||t)return;const[n,...i]=Object(l.l)(e).filter((function(e,t,n){return Boolean(e)||t===n.length-1}));this.$emit("input",n),i.length&&this.$emit("split",i)}},methods:{emitIfInactive(e){e.button!==a.c||this.active||(this.$emit("activate"),e.preventDefault())},getMatchingOptionForInputValue(e,{loose:t}={loose:!1}){var n,i=this;return null===(n=this.options)||void 0===n?void 0:n.find((function(n){return t?Object(l.i)(n[i.optionTextField],e):n[i.optionTextField]===e}))},activate(){var e=this;this.fallbackValue=this.value,this.$nextTick((function(){const{input:t}=e.$refs;t&&(t.focus(),t.scrollIntoView({block:"nearest",inline:"end"}),e.alignSuggestions(t),"start"===e.cursorPosition&&(null==t||t.setSelectionRange(0,0)))}))},deactivate(){var e;this.options&&!this.isTerm&&(null===(e=this.matchingOption)||void 0===e?void 0:e.value)!==this.value&&this.$emit("input",this.fallbackValue)},applySuggestion(e){const t=this.termsAsTokens()?e:Object(l.p)(e);this.$emit("select",t),this.multiSelect||(this.$emit("input",t===l.c?this.inputValue:t),this.$emit("complete",t))},showHeader(e){var t;return null===(t=e.value)||void 0===t?void 0:t.toString().startsWith("gl-filtered-search-suggestion-group-")},handleInputKeydown(e){var t=this;const{key:n}=e,{suggestions:i,input:r}=this.$refs,a=null==i?void 0:i.getValue(),o={ArrowLeft:function(){0===r.selectionStart&&(e.preventDefault(),t.$emit("previous"))},ArrowRight:function(){r.selectionEnd===t.inputValue.length&&(e.preventDefault(),t.$emit("next"))},Backspace:function(){""===t.inputValue&&(e.preventDefault(),t.$emit("backspace"))},Enter:function(){e.preventDefault(),null!=a?t.applySuggestion(a):t.$emit("submit")},":":function(){null!=a&&(e.preventDefault(),t.applySuggestion(a))},Escape:function(){e.preventDefault(),t.$emit("complete")}},s={ArrowDown:function(){return i.nextItem()},Down:function(){return i.nextItem()},ArrowUp:function(){return i.prevItem()},Up:function(){return i.prevItem()}};this.hasOptionsOrSuggestions&&Object.assign(o,s),Object.keys(o).includes(n)?o[n]():this.customInputKeydownHandler(e,{suggestedValue:a,inputValue:this.inputValue,applySuggestion:function(e){return t.applySuggestion(e)}})},handleBlur(e){var t,n;null!==(t=e.relatedTarget)&&void 0!==t&&t.classList.contains(l.a)?null===(n=this.$refs.input)||void 0===n||n.focus():this.multiSelect?this.$emit("complete"):this.active&&this.$emit("deactivate")}}},d=n("tBpV"),f=Object(d.a)(u,(function(){var e=this,t=e._self._c;return t("div",e._g(e._b({staticClass:"gl-filtered-search-token-segment",class:{"gl-filtered-search-token-segment-active":e.active,"!gl-cursor-text":e.viewOnly},attrs:{"data-testid":"filtered-search-token-segment"}},"div",e.containerAttributes,!1),e.viewOnly?{}:{mousedown:e.emitIfInactive}),[e.active?[e._t("before-input",null,null,{submitValue:e.applySuggestion}),e._v(" "),e._t("input",(function(){return["checkbox"===e.searchInputAttributes.type?t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.inputValue,expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",class:{"gl-filtered-search-token-segment-input-disabled":e.viewOnly},attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":e.label,disabled:e.viewOnly,type:"checkbox"},domProps:{checked:Array.isArray(e.inputValue)?e._i(e.inputValue,null)>-1:e.inputValue},on:{keydown:e.handleInputKeydown,blur:e.handleBlur,change:function(t){var n=e.inputValue,i=t.target,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.inputValue=n.concat([null])):a>-1&&(e.inputValue=n.slice(0,a).concat(n.slice(a+1)))}else e.inputValue=r}}},"input",e.searchInputAttributes,!1)):"radio"===e.searchInputAttributes.type?t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.inputValue,expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",class:{"gl-filtered-search-token-segment-input-disabled":e.viewOnly},attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":e.label,disabled:e.viewOnly,type:"radio"},domProps:{checked:e._q(e.inputValue,null)},on:{keydown:e.handleInputKeydown,blur:e.handleBlur,change:function(t){e.inputValue=null}}},"input",e.searchInputAttributes,!1)):t("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.inputValue,expression:"inputValue"}],ref:"input",staticClass:"gl-filtered-search-token-segment-input",class:{"gl-filtered-search-token-segment-input-disabled":e.viewOnly},attrs:{"data-testid":"filtered-search-token-segment-input","aria-label":e.label,disabled:e.viewOnly,type:e.searchInputAttributes.type},domProps:{value:e.inputValue},on:{keydown:e.handleInputKeydown,blur:e.handleBlur,input:function(t){t.target.composing||(e.inputValue=t.target.value)}}},"input",e.searchInputAttributes,!1))]}),null,{submitValue:e.applySuggestion}),e._v(" "),t("portal",{key:"operator-"+e._uid,attrs:{to:e.portalName}},[e.hasOptionsOrSuggestions?t("gl-filtered-search-suggestion-list",{key:"operator-"+e._uid,ref:"suggestions",attrs:{role:"list",tabindex:"0","initial-value":e.defaultSuggestedValue},on:{suggestion:e.applySuggestion}},[e.options?[e._l(e.options,(function(n,i){return[e.showHeader(n)?[i>0?t("li",{key:"separator-"+i},[t("hr",{staticClass:"gl-border-t -gl-mx-2 gl-my-2"})]):e._e(),e._v(" "),t("li",{key:"header-"+i,staticClass:"gl-mx-0 gl-pb-2 gl-pl-5 gl-pt-3 gl-text-sm gl-font-bold gl-text-strong",attrs:{role:"presentation","data-testid":"filtered-search-section-header"}},[e._v("\n "+e._s(n.title)+"\n ")])]:t("gl-filtered-search-suggestion",{key:`${n.value}-${i}`,attrs:{value:n.value,"icon-name":n.icon}},[e._t("option",(function(){return[n.component?[t(n.component,{tag:"component",attrs:{option:n}})]:[e._v("\n "+e._s(n[e.optionTextField])+"\n ")]]}),null,{option:n})],2)]}))]:e._t("suggestions")],2):e._e()],1)]:e._t("view",(function(){return[e._v(e._s(e.inputValue))]}),null,{label:e.label,inputValue:e.inputValue})],2)}),[],!1,null,null,null);t.a=f.exports},"47t/":function(e,t,n){"use strict";n("VvRr")},"4Ctn":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));n("RFHG"),n("z6RN"),n("xuo1");var i=n("Z48/");const r=function(e){return"\\"+e},a=function(e){const t=(e=Object(i.e)(e)).length,n=e.charCodeAt(0);return e.split("").reduce((function(i,a,o){const s=e.charCodeAt(o);return 0===s?i+"�":127===s||s>=1&&s<=31||0===o&&s>=48&&s<=57||1===o&&s>=48&&s<=57&&45===n?i+r(s.toString(16)+" "):0===o&&45===s&&1===t?i+r(a):s>=128||45===s||95===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?i+a:i+r(a)}),"")}},"4Eox":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAiCatalogAgent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AiCatalogItemID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"forceHardDelete"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"aiCatalogAgentDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"forceHardDelete"},value:{kind:"Variable",name:{kind:"Name",value:"forceHardDelete"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:237}};n.loc.source={body:"# @feature_category: workflow_catalog\nmutation deleteAiCatalogAgent($id: AiCatalogItemID!, $forceHardDelete: Boolean = false) {\n aiCatalogAgentDelete(input: { id: $id, forceHardDelete: $forceHardDelete }) {\n errors\n success\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function r(e,t){for(var n=0;n0;){var l=s;s=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){s.add(e)})))}))}return o.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(n,"deleteAiCatalogAgent")},"4FKI":function(e,t,n){"use strict";var i=n("/iFl"),r=n("fjNL"),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.a=function(e,t){if(Object(i.a)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Object(r.a)(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},"4Fqu":function(e,t,n){"use strict";var i={name:"GlButtonGroup",props:{vertical:{type:Boolean,required:!1,default:!1}}},r=n("tBpV"),a=Object(r.a)(i,(function(){return(0,this._self._c)("div",this._g({class:this.vertical?"gl-button-group-vertical btn-group-vertical":"gl-button-group btn-group",attrs:{role:"group"}},this.$listeners),[this._t("default")],2)}),[],!1,null,null,null);t.a=a.exports},"4GAo":function(e,t,n){"use strict";t.a=function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++ie>0&&e<=6},headerClass:{type:[String,Object,Array],required:!1,default:""}},data(){return{accordionItemId:Object(i.a)("accordion-item-"),localVisible:this.visible}},computed:{headerComponent(){return"h"+(this.headerLevel||this.defaultHeaderLevel)},buttonTitle(){return this.localVisible&&this.titleVisible?this.titleVisible:this.title}},watch:{visible:{handler(e){this.localVisible=e,this.checkAndCollapseSiblingAccordionItems(e)}}},created(){this.$emit("input",this.localVisible)},mounted(){this.$parent.$el.addEventListener(s.a,this.onParentCollapse)},beforeDestroy(){this.$parent.$el.removeEventListener(s.a,this.onParentCollapse)},methods:{onParentCollapse({detail:e}){e!==this.accordionItemId&&(this.$emit("input",!1),this.localVisible=!1)},onButtonClick(){const e=!this.localVisible;this.$emit("input",e),this.localVisible=e,this.checkAndCollapseSiblingAccordionItems(e)},checkAndCollapseSiblingAccordionItems(e){this.autoCollapse&&e&&this.$parent.$el.dispatchEvent(new CustomEvent(s.a,{detail:this.accordionItemId}))}}},c=n("tBpV"),u=Object(c.a)(l,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"gl-accordion-item"},[t(e.headerComponent,{tag:"component",staticClass:"gl-accordion-item-header",class:e.headerClass},[t("gl-button",{attrs:{variant:"link","button-text-classes":"gl-flex","aria-expanded":e.localVisible?"true":"false","aria-controls":e.accordionItemId},on:{click:e.onButtonClick}},[t("gl-animated-chevron-right-down-icon",{attrs:{"is-on":e.localVisible}}),e._v("\n "+e._s(e.buttonTitle)+"\n ")],1)],1),e._v(" "),t("gl-collapse",{attrs:{id:e.accordionItemId,"data-testid":"accordion-item-collapse-"+e.accordionItemId},model:{value:e.localVisible,callback:function(t){e.localVisible=t},expression:"localVisible"}},[t("div",{staticClass:"gl-mt-3 gl-text-base"},[e._t("default")],2)])],1)}),[],!1,null,null,null);t.a=u.exports},"4H6Q":function(e,t,n){"use strict";t.a=function(e){return function(t){return e(t)}}},"4J9t":function(e,t,n){"use strict";n("RFHG"),n("z6RN"),n("xuo1"),n("ZzK0"),n("BzOf");var i=n("NmEs"),r=n("2ibD"),a=n("i79D"),o=n("7F3p");const s=function(){const e=[...document.querySelectorAll("[data-broadcast-banner]")].reduce((function(e,t){return e+t.getBoundingClientRect().height}),0);document.documentElement.style.setProperty("--broadcast-message-height",e+"px")},l=function({currentTarget:e}){e.removeEventListener("click",l);const{dataset:{id:t,expireDate:n,dismissalPath:c,cookieKey:u}}=e;Object(i.O)(u,!0,{expires:new Date(n)}),c&&function(e,t,n){var i;return n!==(null===(i=window)||void 0===i||null===(i=i.gon)||void 0===i?void 0:i.broadcast_message_dismissal_path)?Promise.reject(new Error("Dismissal path mismatch for broadcast message")):r.a.post(Object(a.a)(n),{broadcast_message_id:e,expires_at:t})}(t,n,c).catch((function(e){return o.b(e)}));const d=document.querySelector(".js-broadcast-notification-"+t);d.parentNode.removeChild(d),s()};t.a=function(){document.querySelectorAll(".js-dismiss-current-broadcast-notification").forEach((function(e){return e.addEventListener("click",l)})),s()}},"4JUS":function(e,t,n){"use strict";t.a=function(e,t,n,i){var r=-1,a=null==e?0:e.length;for(i&&a&&(n=e[++r]);++r1?arguments[1]:void 0);return!0===o(t,(function(e){if(n(e,e,t))return!0}),!0)}})},"59b1":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n("3UXl"),n("iyoE"),n("UezY"),n("z6RN"),n("hG7+"),n("56A2"),n("PB99"),n("eP6E"),n("B++/"),n("47t/"),n("ZzK0"),n("BzOf");var i=n("EmJ/"),r=n.n(i),a=n("WelT"),o=n("D+x4"),s=n("/lV4");class l{constructor({input:e,formErrors:t}){this.inputElement=r()(e),this.inputDomElement=this.inputElement.get(0),this.form=t,this.errorMessage=this.inputElement.attr("title")||Object(s.a)("This field is required."),this.errorMessageId=Object(a.a)()[0],this.fieldErrorElement=r()(`