"use strict";(self.webpackChunkgraphiql_app_for_wp=self.webpackChunkgraphiql_app_for_wp||[]).push([[1011],{3392(e,n,t){t.r(n),t.d(n,{clearPlatformLanguageAssociations:()=>w,getLanguageIds:()=>g,registerPlatformLanguageAssociation:()=>p});var i=t(3489),o=t(6531),r=t(4405),a=t(6744),s=t(6474),f=t(6637),l=t(6696);let c=[],m=[],u=[];function p(e){!function(e,n,t){const o=function(e,n){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:n,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,i.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(a.SA.sep)>=0}}(e,n);c.push(o),o.userConfigured?u.push(o):m.push(o);t&&!o.userConfigured&&c.forEach(e=>{e.mime===o.mime||e.userConfigured||(o.extension&&e.extension===o.extension&&console.warn("Overwriting extension <<".concat(o.extension,">> to now point to mime <<").concat(o.mime,">>")),o.filename&&e.filename===o.filename&&console.warn("Overwriting filename <<".concat(o.filename,">> to now point to mime <<").concat(o.mime,">>")),o.filepattern&&e.filepattern===o.filepattern&&console.warn("Overwriting filepattern <<".concat(o.filepattern,">> to now point to mime <<").concat(o.mime,">>")),o.firstline&&e.firstline===o.firstline&&console.warn("Overwriting firstline <<".concat(o.firstline,">> to now point to mime <<").concat(o.mime,">>")))})}(e,!1,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}function w(){c=c.filter(e=>e.userConfigured),m=[]}function g(e,n){return function(e,n){let t;if(e)switch(e.scheme){case r.ny.file:t=e.fsPath;break;case r.ny.data:t=s.B6.parseMetaData(e).get(s.B6.META_DATA_LABEL);break;case r.ny.vscodeNotebookCell:t=void 0;break;default:t=e.path}if(!t)return[{id:"unknown",mime:o.K.unknown}];t=t.toLowerCase();const i=(0,a.P8)(t),p=d(t,i,u);if(p)return[p,{id:l.vH,mime:o.K.text}];const w=d(t,i,m);if(w)return[w,{id:l.vH,mime:o.K.text}];if(n){const e=function(e){(0,f.LU)(e)&&(e=e.substr(1));if(e.length>0)for(let n=c.length-1;n>=0;n--){const t=c[n];if(!t.firstline)continue;const i=e.match(t.firstline);if(i&&i.length>0)return t}return}(n);if(e)return[e,{id:l.vH,mime:o.K.text}]}return[{id:"unknown",mime:o.K.unknown}]}(e,n).map(e=>e.id)}function d(e,n,t){let i,o,r;for(let s=t.length-1;s>=0;s--){const f=t[s];if(n===f.filenameLowercase){i=f;break}if(f.filepattern&&(!o||f.filepattern.length>o.filepattern.length)){var a;const t=f.filepatternOnPath?e:n;null!==(a=f.filepatternLowercase)&&void 0!==a&&a.call(f,t)&&(o=f)}f.extension&&(!r||f.extension.length>r.extension.length)&&n.endsWith(f.extensionLowercase)&&(r=f)}return i||(o||(r||void 0))}}}]);
//# sourceMappingURL=1011.762c6b40.chunk.js.map