Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terminal-cv/node_modules/prettier/esm/parser-babel.mjs

23 lines
368 KiB

var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e){var t={exports:{}};return e(t,t.exports),t.exports}var r,i,a=function(e){return e&&e.Math==Math&&e},n=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},u=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,p={f:c&&!h.call({1:2},1)?function(e){var t=c(this,e);return!!t&&t.enumerable}:h},l=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},d={}.toString,D=function(e){return d.call(e).slice(8,-1)},m="".split,f=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==D(e)?m.call(e,""):Object(e)}:Object,y=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},A=function(e){return f(y(e))},E=function(e){return"object"==typeof e?null!==e:"function"==typeof e},C=function(e){return"function"==typeof e?e:void 0},x=function(e,t){return arguments.length<2?C(n[e]):n[e]&&n[e][t]},F=x("navigator","userAgent")||"",g=n.process,b=n.Deno,P=g&&g.versions||b&&b.version,T=P&&P.v8;T?i=(r=T.split("."))[0]<4?1:r[0]+r[1]:F&&(!(r=F.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=F.match(/Chrome\/(\d+)/))&&(i=r[1]);var w=i&&+i,S=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&w&&w<41})),B=S&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,N=B?function(e){return"symbol"==typeof e}:function(e){var t=x("Symbol");return"function"==typeof t&&Object(e)instanceof t},I=function(e,t){try{Object.defineProperty(n,e,{value:t,configurable:!0,writable:!0})}catch(s){n[e]=t}return t},v=n["__core-js_shared__"]||I("__core-js_shared__",{}),k=s((function(e){(e.exports=function(e,t){return v[e]||(v[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),L=function(e){return Object(y(e))},O={}.hasOwnProperty,M=Object.hasOwn||function(e,t){return O.call(L(e),t)},R=0,j=Math.random(),_=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++R+j).toString(36)},U=k("wks"),q=n.Symbol,$=B?q:q&&q.withoutSetter||_,H=function(e){return M(U,e)&&(S||"string"==typeof U[e])||(S&&M(q,e)?U[e]=q[e]:U[e]=$("Symbol."+e)),U[e]},V=H("toPrimitive"),z=function(e,t){if(!E(e)||N(e))return e;var s,r=e[V];if(void 0!==r){if(void 0===t&&(t="default"),s=r.call(e,t),!E(s)||N(s))return s;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var s,r;if("string"===t&&"function"==typeof(s=e.toString)&&!E(r=s.call(e)))return r;if("function"==typeof(s=e.valueOf)&&!E(r=s.call(e)))return r;if("string"!==t&&"function"==typeof(s=e.toString)&&!E(r=s.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(e,t)},W=function(e){var t=z(e,"string");return N(t)?t:String(t)},G=n.document,K=E(G)&&E(G.createElement),X=!u&&!o((function(){return 7!=Object.defineProperty((e="div",K?G.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),J=Object.getOwnPropertyDescriptor,Y={f:u?J:function(e,t){if(e=A(e),t=W(t),X)try{return J(e,t)}catch(e){}if(M(e,t))return l(!p.f.call(e,t),e[t])}},Q=function(e){if(!E(e))throw TypeError(String(e)+" is not an object");return e},Z=Object.defineProperty,ee={f:u?Z:function(e,t,s){if(Q(e),t=W(t),Q(s),X)try{return Z(e,t,s)}catch(e){}if("get"in s||"set"in s)throw TypeError("Accessors not supported");return"value"in s&&(e[t]=s.value),e}},te=u?function(e,t,s){return ee.f(e,t,l(1,s))}:function(e,t,s){return e[t]=s,e},se=Function.toString;"function"!=typeof v.inspectSource&&(v.inspectSource=function(e){return se.call(e)});var re,ie,ae,ne,oe=v.inspectSource,ue=n.WeakMap,h
Print (to stderr) where a cursor at the given position would move to after formatting.
This option cannot be used with --range-start and --range-end.
`,cliCategory:"Editor"},endOfLine:{since:"1.15.0",category:"Global",type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:Bs`
Maintain existing
(mixed values within one file are normalised by looking at what's used after the first line)
`}]},filepath:{since:"1.4.0",category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{since:"0.0.10",category:"Global",type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:"Config"},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:"Global",description:Bs`
Custom directory that contains prettier plugins in node_modules subdirectory.
Overrides default behavior when plugins are searched relatively to the location of Prettier.
Multiple values are accepted.
`,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:"Config"},printWidth:{since:"0.0.0",category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:"Special",type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Bs`
Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.
This option cannot be used with --cursor-offset.
`,cliCategory:"Editor"},rangeStart:{since:"1.4.0",category:"Special",type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Bs`
Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.
This option cannot be used with --cursor-offset.
`,cliCategory:"Editor"},requirePragma:{since:"1.7.0",category:"Special",type:"boolean",default:!1,description:Bs`
Require either '@prettier' or '@format' to be present in the file's first docblock comment
in order for it to be formatted.
`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:"Global",type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};const Is=["cliName","cliCategory","cliDescription"],vs={compare:Ps,lt:Ts,gte:ws},ks="2.4.1",Ls={CATEGORY_CONFIG:"Config",CATEGORY_EDITOR:"Editor",CATEGORY_FORMAT:"Format",CATEGORY_OTHER:"Other",CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:"Global",CATEGORY_SPECIAL:"Special",options:Ns}.options;var Os={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:s=!1,showInternal:r=!1}={}){const i=ks.split("-",1)[0],a=e.flatMap((e=>e.languages||[])).filter(h),n=(o=Object.assign({},...e.map((({options:e})=>e)),Ls),u="name",Object.entries(o).map((([e,t])=>Object.assign({[u]:e},t)))).filter((e=>h(e)&&c(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(r)return e;return nt(e,Is)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(h).sort(((e,t)=>vs.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>h(e)&&c(e))),"parser"===t.name&&function(e,t,s){const r=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!r.has(t)){r.add(t);const a=s.find((e=>e.parsers&&e.parsers[t]));let n=i.name;a&&a.name&&(n+=` (plugin: ${a.name})`),e.choices.push({value:t,description:n})}}(t,a,e));const s=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:s})}));var o,u;return{languages:a,options:n};function h(e){return t||!("since"in e)||e.since&&vs.gte(i,e.since)}function c(e){return s||!("deprecated"in e)||e.deprecated&&vs.lt(i,e.deprecated)}}};const{getSupportInfo:Ms}=Os,Rs=/[^\x20-\x7F]/;function js(e){return(t,s,r)=>{const i=r&&r.backwards;if(!1===s)return!1;const{length:a}=t;let n=s;for(;n>=0&&n<a;){const s=t.charAt(n);if(e instanceof RegExp){if(!e.test(s))return n}else if(!e.includes(s))return n;i?n--:n++}return(-1===n||n===a)&&n}}const _s=js(/\s/),Us=js(" \t"),qs=js(",; \t"),$s=js(/[^\n\r]/);function Hs(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let s=t+2;s<e.length;++s)if("*"===e.charAt(s)&&"/"===e.charAt(s+1))return s+2;return t}function Vs(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?$s(e,t):t)}function zs(e,t,s){const r=s&&s.backwards;if(!1===t)return!1;const i=e.charAt(t);if(r){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function Ws(e,t,s={}){const r=Us(e,s.backwards?t-1:t,s);return r!==zs(e,r,s)}function Gs(e,t){let s=null,r=t;for(;r!==s;)s=r,r=qs(e,r),r=Hs(e,r),r=Us(e,r);return r=Vs(e,r),r=zs(e,r),!1!==r&&Ws(e,r)}function Ks(e,t){let s=null,r=t;for(;r!==s;)s=r,r=Us(e,r),r=Hs(e,r),r=Vs(e,r),r=zs(e,r);return r}function Xs(e,t,s){return Ks(e,s(t))}function Js(e,t,s=0){let r=0;for(let i=s;i<e.length;++i)"\t"===e[i]?r=r+t-r%t:r++;return r}function Ys(e,t){const s=e.slice(1,-1),r={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},a="'"===t?i:r,n=a===i?r:i;let o=a.quote;if(s.includes(a.quote)||s.includes(n.quote)){o=(s.match(a.regex)||[]).length>(s.match(n.regex)||[]).length?n.quote:a.quote}return o}function Qs(e,t,s){const r='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,a)=>i===r?i:a===t?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/