UNPKG

ruru

Version:

Grafast-flavoured GraphiQL distribution

2 lines 18.4 kB
export const __webpack_esm_id__=1613;export const __webpack_esm_ids__=[1613];export const __webpack_esm_modules__={80041(e,t,r){r.r(t),r.d(t,{getRoot:()=>c,hasDriveLetter:()=>h,isEqualOrParent:()=>g,isPathSeparator:()=>o,isWindowsDriveLetter:()=>l,toPosixPath:()=>u,toSlashes:()=>s});var i=r(60942),n=r(69958),a=r(60891);function o(e){return 47===e||92===e}function s(e){return e.replace(/[\\/]/g,i.posix.sep)}function u(e){return-1===e.indexOf("/")&&(e=s(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function c(e,t=i.posix.sep){if(!e)return"";const r=e.length,n=e.charCodeAt(0);if(o(n)){if(o(e.charCodeAt(1))&&!o(e.charCodeAt(2))){let i=3;const n=i;for(;i<r&&!o(e.charCodeAt(i));i++);if(n!==i&&!o(e.charCodeAt(i+1)))for(i+=1;i<r;i++)if(o(e.charCodeAt(i)))return e.slice(0,i+1).replace(/[\\/]/g,t)}return t}if(l(n)&&58===e.charCodeAt(1))return o(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);let a=e.indexOf("://");if(-1!==a)for(a+=3;a<r;a++)if(o(e.charCodeAt(a)))return e.slice(0,a+1);return""}function g(e,t,r,n=i.sep){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(r){if(!(0,a.startsWithIgnoreCase)(e,t))return!1;if(t.length===e.length)return!0;let r=t.length;return t.charAt(t.length-1)===n&&r--,e.charAt(r)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function l(e){return e>=65&&e<=90||e>=97&&e<=122}function h(e,t=n.isWindows){return!!t&&l(e.charCodeAt(0))&&58===e.charCodeAt(1)}},58409(e,t,r){r.r(t),r.d(t,{Mimes:()=>i});const i=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})},1268(e,t,r){r.r(t),r.d(t,{DataUri:()=>I,ExtUri:()=>g,addTrailingPathSeparator:()=>w,basename:()=>C,basenameOrAuthority:()=>v,dirname:()=>y,extUri:()=>l,extUriBiasedIgnorePathCase:()=>h,extUriIgnorePathCase:()=>d,extname:()=>P,getComparisonKey:()=>m,hasTrailingPathSeparator:()=>A,isAbsolutePath:()=>E,isEqual:()=>p,isEqualAuthority:()=>_,isEqualOrParent:()=>f,joinPath:()=>S,normalizePath:()=>b,originalFSPath:()=>c,relativePath:()=>D,removeTrailingPathSeparator:()=>x,resolvePath:()=>O});var i=r(80041),n=r(54835),a=r(60942),o=r(69958),s=r(60891),u=r(5839);function c(e){return(0,u.uriToFsPath)(e,!0)}class g{constructor(e){this._ignorePathCasing=e}compare(e,t,r=!1){return e===t?0:(0,s.compare)(this.getComparisonKey(e,r),this.getComparisonKey(t,r))}isEqual(e,t,r=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,r)===this.getComparisonKey(t,r)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,r=!1){if(e.scheme===t.scheme){if(e.scheme===n.Schemas.file)return i.isEqualOrParent(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(r||e.fragment===t.fragment);if(_(e.authority,t.authority))return i.isEqualOrParent(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(r||e.fragment===t.fragment)}return!1}joinPath(e,...t){return u.URI.joinPath(e,...t)}basenameOrAuthority(e){return C(e)||e.authority}basename(e){return a.posix.basename(e.path)}extname(e){return a.posix.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===n.Schemas.file?t=u.URI.file(a.dirname(c(e))).path:(t=a.posix.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===n.Schemas.file?u.URI.file(a.normalize(c(e))).path:a.posix.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!_(e.authority,t.authority))return;if(e.scheme===n.Schemas.file){const r=a.relative(c(e),c(t));return o.isWindows?i.toSlashes(r):r}let r=e.path||"/";const s=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(r.length,s.length);e<t&&(r.charCodeAt(e)===s.charCodeAt(e)||r.charAt(e).toLowerCase()===s.charAt(e).toLowerCase());e++);r=s.substr(0,e)+r.substr(e)}return a.posix.relative(r,s)}resolvePath(e,t){if(e.scheme===n.Schemas.file){const r=u.URI.file(a.resolve(c(e),t));return e.with({authority:r.authority,path:r.path})}return t=i.toPosixPath(t),e.with({path:a.posix.resolve(e.path,t)})}isAbsolutePath(e){return!!e.path&&"/"===e.path[0]}isEqualAuthority(e,t){return e===t||void 0!==e&&void 0!==t&&(0,s.equalsIgnoreCase)(e,t)}hasTrailingPathSeparator(e,t=a.sep){if(e.scheme===n.Schemas.file){const r=c(e);return r.length>i.getRoot(r).length&&r[r.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=a.sep){return A(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=a.sep){let r=!1;if(e.scheme===n.Schemas.file){const n=c(e);r=void 0!==n&&n.length===i.getRoot(n).length&&n[n.length-1]===t}else{t="/";const i=e.path;r=1===i.length&&47===i.charCodeAt(i.length-1)}return r||A(e,t)?e:e.with({path:e.path+"/"})}}const l=new g(()=>!1),h=new g(e=>e.scheme!==n.Schemas.file||!o.isLinux),d=new g(e=>!0),p=l.isEqual.bind(l),f=l.isEqualOrParent.bind(l),m=l.getComparisonKey.bind(l),v=l.basenameOrAuthority.bind(l),C=l.basename.bind(l),P=l.extname.bind(l),y=l.dirname.bind(l),S=l.joinPath.bind(l),b=l.normalizePath.bind(l),D=l.relativePath.bind(l),O=l.resolvePath.bind(l),E=l.isAbsolutePath.bind(l),_=l.isEqualAuthority.bind(l),A=l.hasTrailingPathSeparator.bind(l),x=l.removeTrailingPathSeparator.bind(l),w=l.addTrailingPathSeparator.bind(l);var I;!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const r=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(e=>{const[t,i]=e.split(":");t&&i&&r.set(t,i)});const i=t.path.substring(0,t.path.indexOf(";"));return i&&r.set(e.META_DATA_MIME,i),r}}(I||(I={}))},85838(e,t,r){r.r(t),r.d(t,{EditorModesRegistry:()=>c,Extensions:()=>u,ModesRegistry:()=>g,PLAINTEXT_EXTENSION:()=>h,PLAINTEXT_LANGUAGE_ID:()=>l});var i=r(12003),n=r(22573),a=r(28976),o=r(58409),s=r(6477);const u={ModesRegistry:"editor.modesRegistry"};class c{constructor(){this._onDidChangeLanguages=new n.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,r=this._languages.length;t<r;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return this._languages}}const g=new c;a.Registry.add(u.ModesRegistry,g);const l="plaintext",h=".txt";g.registerLanguage({id:l,extensions:[h],aliases:[i.localize("plainText.alias","Plain Text"),"text"],mimetypes:[o.Mimes.text]}),a.Registry.as(s.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])},64602(e,t,r){r.r(t),r.d(t,{IConfigurationService:()=>i,addToValueTree:()=>a,getConfigurationValue:()=>u,getLanguageTagSettingPlainKey:()=>c,removeFromValueTree:()=>o,toValuesTree:()=>n});const i=(0,r(35184).createDecorator)("configurationService");function n(e,t){const r=Object.create(null);for(const i in e)a(r,i,e[i],t);return r}function a(e,t,r,i){const n=t.split("."),a=n.pop();let o=e;for(let e=0;e<n.length;e++){const r=n[e];let a=o[r];switch(typeof a){case"undefined":a=o[r]=Object.create(null);break;case"object":if(null===a)return void i(`Ignoring ${t} as ${n.slice(0,e+1).join(".")} is null`);break;default:return void i(`Ignoring ${t} as ${n.slice(0,e+1).join(".")} is ${JSON.stringify(a)}`)}o=a}if("object"==typeof o&&null!==o)try{o[a]=r}catch(e){i(`Ignoring ${t} as ${n.join(".")} is ${JSON.stringify(o)}`)}else i(`Ignoring ${t} as ${n.join(".")} is ${JSON.stringify(o)}`)}function o(e,t){s(e,t.split("."))}function s(e,t){const r=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(r)){const i=e[r];"object"!=typeof i||Array.isArray(i)||(s(i,t),0===Object.keys(i).length&&delete e[r])}}else delete e[r]}function u(e,t,r){const i=function(e,t){let r=e;for(const e of t){if("object"!=typeof r||null===r)return;r=r[e]}return r}(e,t.split("."));return void 0===i?r:i}function c(e){return e.replace(/[\[\]]/g,"")}},6477(e,t,r){r.r(t),r.d(t,{Extensions:()=>g,OVERRIDE_PROPERTY_PATTERN:()=>S,OVERRIDE_PROPERTY_REGEX:()=>b,allSettings:()=>l,applicationSettings:()=>h,getDefaultValue:()=>O,machineOverridableSettings:()=>p,machineSettings:()=>d,overrideIdentifiersFromKey:()=>D,resourceLanguageSettingsSchemaId:()=>v,resourceSettings:()=>m,validateProperty:()=>_,windowSettings:()=>f});var i=r(6995),n=r(22573),a=r(69708),o=r(12003),s=r(64602),u=r(3361),c=r(28976);const g={Configuration:"base.contributions.configuration"},l={properties:{},patternProperties:{}},h={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},v="vscode://schemas/settings/resourceLanguage",C=c.Registry.as(u.Extensions.JSONContribution),P="\\[([^\\]]+)\\]",y=new RegExp(P,"g"),S=`^(${P})+$`,b=new RegExp(S);function D(e){const t=[];if(b.test(e)){let r=y.exec(e);for(;r?.length;){const i=r[1].trim();i&&t.push(i),r=y.exec(e)}}return(0,i.distinct)(t)}function O(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const E=new class{constructor(){this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=new n.Emitter,this._onDidUpdateConfiguration=new n.Emitter,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:o.localize("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},C.registerSchema(v,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const r=new Set;this.doRegisterConfigurations(e,t,r),C.registerSchema(v,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:r})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);const r=[];for(const{overrides:i,source:n}of e)for(const e in i){t.add(e);const a=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),o=i[e];if(a.configurationDefaultOverrides.push({value:o,source:n}),b.test(e)){const t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,o,n,a.configurationDefaultOverrideValue);if(!t)continue;a.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,n),r.push(...D(e))}else{const t=this.mergeDefaultConfigurationsForConfigurationProperty(e,o,n,a.configurationDefaultOverrideValue);if(!t)continue;a.configurationDefaultOverrideValue=t;const r=this.configurationProperties[e];r&&(this.updatePropertyDefaultValue(e,r),this.updateSchema(e,r))}}this.doRegisterOverrideIdentifiers(r)}updateDefaultOverrideProperty(e,t,r){const i={type:"object",default:t.value,description:o.localize("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",(0,s.getLanguageTagSettingPlainKey)(e)),$ref:v,defaultDefaultValue:t.value,source:r,defaultValueSource:r};this.configurationProperties[e]=i,this.defaultLanguageConfigurationOverridesNode.properties[e]=i}mergeDefaultConfigurationsForOverrideIdentifier(e,t,r,i){const n=i?.value||{},o=i?.source??new Map;if(o instanceof Map){for(const e of Object.keys(t)){const i=t[e];if(a.isObject(i)&&(a.isUndefined(n[e])||a.isObject(n[e]))){if(n[e]={...n[e]??{},...i},r)for(const t in i)o.set(`${e}.${t}`,r)}else n[e]=i,r?o.set(e,r):o.delete(e)}return{value:n,source:o}}console.error("objectConfigurationSources is not a Map")}mergeDefaultConfigurationsForConfigurationProperty(e,t,r,i){const n=this.configurationProperties[e],o=i?.value??n?.defaultDefaultValue;let s=r;if(a.isObject(t)&&(void 0!==n&&"object"===n.type||void 0===n&&(a.isUndefined(o)||a.isObject(o)))){if(s=i?.source??new Map,!(s instanceof Map))return void console.error("defaultValueSource is not a Map");for(const i in t)r&&s.set(`${e}.${i}`,r);t={...a.isObject(o)?o:{},...t}}return{value:t,source:s}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,r){e.forEach(e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,r),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})}validateAndRegisterProperties(e,t=!0,r,i,n=3,o){n=a.isUndefinedOrNull(e.scope)?n:e.scope;const s=e.properties;if(s)for(const e in s){const u=s[e];t&&_(e,u)?delete s[e]:(u.source=r,u.defaultDefaultValue=s[e].default,this.updatePropertyDefaultValue(e,u),b.test(e)?u.scope=void 0:(u.scope=a.isUndefinedOrNull(u.scope)?n:u.scope,u.restricted=a.isUndefinedOrNull(u.restricted)?!!i?.includes(e):u.restricted),!s[e].hasOwnProperty("included")||s[e].included?(this.configurationProperties[e]=s[e],s[e].policy?.name&&this.policyConfigurations.set(s[e].policy.name,e),!s[e].deprecationMessage&&s[e].markdownDeprecationMessage&&(s[e].deprecationMessage=s[e].markdownDeprecationMessage),o.add(e)):(this.excludedConfigurationProperties[e]=s[e],delete s[e]))}const u=e.allOf;if(u)for(const e of u)this.validateAndRegisterProperties(e,t,r,i,n,o)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const r=e.properties;if(r)for(const e in r)this.updateSchema(e,r[e]);const i=e.allOf;i?.forEach(t)};t(e)}updateSchema(e,t){switch(l.properties[e]=t,t.scope){case 1:h.properties[e]=t;break;case 2:d.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:f.properties[e]=t;break;case 4:m.properties[e]=t;break;case 5:m.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,r={type:"object",description:o.localize("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.localize("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:v};this.updatePropertyDefaultValue(t,r),l.properties[t]=r,h.properties[t]=r,d.properties[t]=r,p.properties[t]=r,f.properties[t]=r,m.properties[t]=r}}registerOverridePropertyPatternKey(){const e={type:"object",description:o.localize("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o.localize("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:v};l.patternProperties[S]=e,h.patternProperties[S]=e,d.patternProperties[S]=e,p.patternProperties[S]=e,f.patternProperties[S]=e,m.patternProperties[S]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const r=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let i,n;!r||t.disallowConfigurationDefault&&r.source||(i=r.value,n=r.source),a.isUndefined(i)&&(i=t.defaultDefaultValue,n=void 0),a.isUndefined(i)&&(i=O(t.type)),t.default=i,t.defaultValueSource=n}};function _(e,t){return e.trim()?b.test(e)?o.localize("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==E.getConfigurationProperties()[e]?o.localize("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==E.getPolicyConfigurations().get(t.policy?.name)?o.localize("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,E.getPolicyConfigurations().get(t.policy?.name)):null:o.localize("config.property.empty","Cannot register an empty property")}c.Registry.add(g.Configuration,E)},35184(e,t,r){var i;r.r(t),r.d(t,{IInstantiationService:()=>n,_util:()=>i,createDecorator:()=>a}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i||(i={}));const n=a("instantiationService");function a(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,r,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,r){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:r}):(t[i.DI_DEPENDENCIES]=[{id:e,index:r}],t[i.DI_TARGET]=t)}(t,e,n)};return t.toString=()=>e,i.serviceIds.set(e,t),t}},3361(e,t,r){r.r(t),r.d(t,{Extensions:()=>a});var i=r(22573),n=r(28976);const a={JSONContribution:"base.contributions.json"},o=new class{constructor(){this._onDidChangeSchema=new i.Emitter,this.schemasById={}}registerSchema(e,t){var r;this.schemasById[(r=e,r.length>0&&"#"===r.charAt(r.length-1)?r.substring(0,r.length-1):r)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};n.Registry.add(a.JSONContribution,o)},28976(e,t,r){r.r(t),r.d(t,{Registry:()=>a});var i=r(72667),n=r(69708);const a=new class{constructor(){this.data=new Map}add(e,t){i.ok(n.isString(e)),i.ok(n.isObject(t)),i.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}}}; //# sourceMappingURL=1613.js.map