"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 o=r(73846),n=r(4857),a=r(75291),i=r(72245),s=r.n(i);const l="availableProviders";function c(e){const{schema:t}=e,r=t.title,o=t.description,n=e.formContext.settings,a=n.get(l).user,c={...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"},o),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={...m,[e]:parseInt(t.target.value)};n.set(l,r).catch(console.error),u(r)})(e,t)}}))))))))}const m="@jupyterlab/completer-extension:tracker",u={id:"@jupyterlab/completer-extension:base-service",requires:[o.ICompletionProviderManager],autoStart:!0,activate:(e,t)=>{t.registerProvider(new o.ContextCompleterProvider),t.registerProvider(new o.KernelCompleterProvider)}},d=[{id:m,requires:[n.ISettingRegistry],optional:[a.IFormComponentRegistry],provides:o.ICompletionProviderManager,autoStart:!0,activate:(e,t,r)=>{const n=new o.CompletionProviderManager,a=(e,t)=>{var r;const o=e.get("availableProviders"),a=e.get("providerTimeout"),i=e.get("showDocumentationPanel"),s=e.get("autoCompletion");n.setTimeout(a.composite),n.setShowDocumentFlag(i.composite),n.setContinuousHinting(s.composite);const l=null!==(r=o.user)&&void 0!==r?r:o.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]));n.activateProvider(c)};return e.restored.then((()=>{const e=[...n.getProviders().keys()];t.transform(m,{fetch:t=>{const r=t.schema.properties,o={};return e.forEach(((e,t)=>{o[e]=100*(t+1)})),r.availableProviders.default=o,t}}),t.load(m).then((t=>{a(t,e),t.changed.connect((t=>{a(t,e)}))})).catch(console.error)})).catch(console.error),r&&r.addRenderer("availableProviders",(e=>c(e))),n}},u]}}]);