"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3340],{33340:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var n=r(97521),o=r(2361),a=r(25167),i=r(72245),s=r.n(i);const l="availableProviders";function c(e){const{schema:t}=e,r=t.title,n=t.description,o=e.formContext.settings,a=o.get(l).user,c=Object.assign({},t.default);if(a)for(const e of Object.keys(c))c[e]=e in a?a[e]:-1;const[m,u]=(0,i.useState)(c);return s().createElement("div",null,s().createElement("fieldset",null,s().createElement("legend",null,r),s().createElement("p",{className:"field-description"},n),Object.keys(c).map((e=>s().createElement("div",{key:e,className:"form-group small-field"},s().createElement("div",null,s().createElement("h3",null," ",e),s().createElement("div",{className:"inputFieldWrapper"},s().createElement("input",{className:"form-control",type:"number",value:m[e],onChange:t=>{((e,t)=>{const r=Object.assign(Object.assign({},m),{[e]:parseInt(t.target.value)});o.set(l,r),u(r)})(e,t)}}))))))))}const m="@jupyterlab/completer-extension:tracker",u={id:"@jupyterlab/completer-extension:base-service",requires:[n.ICompletionProviderManager],autoStart:!0,activate:(e,t)=>{t.registerProvider(new n.ContextCompleterProvider),t.registerProvider(new n.KernelCompleterProvider)}},d=[{id:m,requires:[o.ISettingRegistry],optional:[a.IFormComponentRegistry],provides:n.ICompletionProviderManager,autoStart:!0,activate:(e,t,r)=>{const o=new n.CompletionProviderManager,a=(e,t)=>{var r;const n=e.get("availableProviders"),a=e.get("providerTimeout"),i=e.get("showDocumentationPanel"),s=e.get("autoCompletion");o.setTimeout(a.composite),o.setShowDocumentFlag(i.composite),o.setContinuousHinting(s.composite);const l=null!==(r=n.user)&&void 0!==r?r:n.composite,c=Object.entries(null!=l?l:{}).filter((e=>e[1]>=0&&t.includes(e[0]))).sort((([,e],[,t])=>t-e)).map((e=>e[0]));o.activateProvider(c)};return e.restored.then((()=>{const e=[...o.getProviders().keys()];t.transform(m,{fetch:t=>{const r=t.schema.properties,n={};return e.forEach(((e,t)=>{n[e]=100*(t+1)})),r.availableProviders.default=n,t}}),t.load(m).then((t=>{a(t,e),t.changed.connect((t=>{a(t,e)}))}))})),r&&r.addRenderer("availableProviders",(e=>c(e))),o}},u]}}]);