"use strict";(self.webpackChunkfeno_web=self.webpackChunkfeno_web||[]).push([["4322"],{29881(e,n,t){t.r(n),t.d(n,{clearPlatformLanguageAssociations:()=>w,getLanguageIds:()=>g,registerPlatformLanguageAssociation:()=>c});var i=t(91487),r=t(30597),o=t(90391),a=t(55418),f=t(85792),l=t(13919),s=t(11202);let m=[],u=[],p=[];function c(e,n=!1){var t,r,o,f,l;let s;t=e,r=!1,o=n,s=(f=t,l=r,{id:f.id,mime:f.mime,filename:f.filename,extension:f.extension,filepattern:f.filepattern,firstline:f.firstline,userConfigured:l,filenameLowercase:f.filename?f.filename.toLowerCase():void 0,extensionLowercase:f.extension?f.extension.toLowerCase():void 0,filepatternLowercase:f.filepattern?(0,i.qg)(f.filepattern.toLowerCase()):void 0,filepatternOnPath:!!f.filepattern&&f.filepattern.indexOf(a.SA.sep)>=0}),m.push(s),s.userConfigured?p.push(s):u.push(s),o&&!s.userConfigured&&m.forEach(e=>{e.mime!==s.mime&&!e.userConfigured&&(s.extension&&e.extension===s.extension&&console.warn(`Overwriting extension <<${s.extension}>> to now point to mime <<${s.mime}>>`),s.filename&&e.filename===s.filename&&console.warn(`Overwriting filename <<${s.filename}>> to now point to mime <<${s.mime}>>`),s.filepattern&&e.filepattern===s.filepattern&&console.warn(`Overwriting filepattern <<${s.filepattern}>> to now point to mime <<${s.mime}>>`),s.firstline&&e.firstline===s.firstline&&console.warn(`Overwriting firstline <<${s.firstline}>> to now point to mime <<${s.mime}>>`))})}function w(){m=m.filter(e=>e.userConfigured),u=[]}function g(e,n){return(function(e,n){let t;if(e)switch(e.scheme){case o.ny.file:t=e.fsPath;break;case o.ny.data:t=f.B6.parseMetaData(e).get(f.B6.META_DATA_LABEL);break;case o.ny.vscodeNotebookCell:t=void 0;break;default:t=e.path}if(!t)return[{id:"unknown",mime:r.K.unknown}];t=t.toLowerCase();let i=(0,a.P8)(t),c=d(t,i,p);if(c)return[c,{id:s.vH,mime:r.K.text}];let w=d(t,i,u);if(w)return[w,{id:s.vH,mime:r.K.text}];if(n){let e=function(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let n=m.length-1;n>=0;n--){let t=m[n];if(!t.firstline)continue;let i=e.match(t.firstline);if(i&&i.length>0)return t}}(n);if(e)return[e,{id:s.vH,mime:r.K.text}]}return[{id:"unknown",mime:r.K.unknown}]})(e,n).map(e=>e.id)}function d(e,n,t){let i,r,o;for(let a=t.length-1;a>=0;a--){let f=t[a];if(n===f.filenameLowercase){i=f;break}if(f.filepattern&&(!r||f.filepattern.length>r.filepattern.length)){let t=f.filepatternOnPath?e:n;f.filepatternLowercase?.(t)&&(r=f)}f.extension&&(!o||f.extension.length>o.extension.length)&&n.endsWith(f.extensionLowercase)&&(o=f)}return i||r||o||void 0}}}]);