(()=>{vare,n={32693:(e,n,r)=>{"use strict";varo=r(85471),i=r(65043),a=r(32073),s=r(88837),l=r(67607),c=r(18740),u=r(80910),d=r(432),p=r.n(d);constf={name:"DragVerticalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};varh=r(14486);constg=(0,h.A)(f,(function(){vart=this,e=t._self._c;returne("span",t._b({staticClass:"material-design-icon drag-vertical-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){returnt.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M9,3H11V5H9V3M13,3H15V5H13V3M9,7H11V9H9V7M13,7H15V9H13V7M9,11H11V13H9V11M13,11H15V13H13V11M9,15H11V17H9V15M13,15H15V17H13V15M9,19H11V21H9V19M13,19H15V21H13V19Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;varv=r(10620),m=r(41645),b=r(32981),y=r(63814);constx={name:"AdminAI",components:{NcCheckboxRadioSwitch:a.A,NcSettingsSection:s.A,NcSelect:l.A,draggable:p(),DragVerticalIcon:g,ArrowDownIcon:v.A,ArrowUpIcon:m.A,NcButton:c.A,NcNoteCard:u.A},data:()=>({loading:!1,dirty:!1,groups:[],loadingGroups:!1,sttProviders:(0,b.C)("settings","ai-stt-providers"),translationProviders:(0,b.C)("settings","ai-translation-providers"),textProcessingProviders:(0,b.C)("settings","ai-text-processing-providers"),textProcessingTaskTypes:(0,b.C)("settings","ai-text-processing-task-types"),text2imageProviders:(0,b.C)("settings","ai-text2image-providers"),taskProcessingProviders:(0,b.C)("settings","ai-task-processing-providers"),taskProcessingTaskTypes:(0,b.C)("settings","ai-task-processing-task-types"),settings:(0,b.C)("settings","ai-settings")}),computed:{hasTextProcessing(){returnObject.keys(this.settings["ai.textprocessing_provider_preferences"]).length>0&&Array.isArray(this.textProcessingTaskTypes)},tpTaskTypes(){constt=["OCP\\TextProcessing\\FreePromptTaskType","OCP\\TextProcessing\\HeadlineTaskType","OCP\\TextProcessing\\SummaryTaskType","OCP\\TextProcessing\\TopicsTaskType"];returnObject.keys(this.settings["ai.textprocessing_provider_preferences"]).filter((t=>!!this.getTextProcessingTaskType(t))).filter((e=>!t.includes(e)))},hasText2ImageProviders(){returnthis.text2imageProviders.length>0},hasTaskProcessing(){returnObject.keys(this.settings["ai.taskprocessing_provider_preferences"]).length>0&&Array.isArray(this.taskProcessingTaskTypes)}},methods:{moveUp(t){this.settings["ai.translation_provider_preferences"].splice(Math.min(t-1,0),0,...this.settings["ai.translation_provider_preferences"].splice(t,1)),this.saveChanges()},moveDown(t){this.settings["ai.translation_provider_preferences"].splice(t+1,0,...this.settings["ai.translation_provider_preferences"].splice(t,1)),this.saveChanges()},asyncsaveChanges(){this.loading=!0;constt={settings:this.settings};try{awaiti.Ay.put((0,y.Jv)("/settings/api/admin/ai"),t)}catch(t){console.error("could not save changes",t)}this.loading=!1},getTextProcessingTaskType(t){returnArray.isArray(this.textProcessingTaskTypes)?this.textProcessingTaskTypes.find((e=>e.class===t)):null}}};var_=r(85072),w=r.n(_),S=r(97825),T=r.n(S),C=r(77659),A=r.n(C),E=r(55056),k=r.n(E),D=r(10540),O=r.n(D),P=r(41113),N=r.n(P),M=r(77137),I={};I.styleTagTransform=N(),I.setAttributes=k(),I.insert=A().bind(null,"head"),I.domAPI=T(),I.insertStyleElement=O(),w()(M.A,I),M.A&&M.A.locals&&M.A.locals;constj=(0,h.A)(x,(function(){vart=this,e=t._self._c;returne("div",{staticClass:"ai-settings"},[e("NcSettingsSection",{attrs:{name:t.t("settings","Unified task processing"),description:t.t("settings","AI tasks can be implemented by different apps. Here you can set which app should be used for which task.")}},[t._l(t.taskProcessingTaskTypes,(function(n){return[e("div",{key:n},[e("h3",[t._v(t._s(t.t("settings","Task:"))+" "+t._s(n.name))]),t._v(" "),e("p",[t._v(t._s(n.description))]),t._v(" "),e("p",[t._v("")]),t._v(" "),e("NcSelect",{staticClass:"provider-select",attrs:{clearable: