intelephense
Version:
A PHP language server
2 lines • 8.19 MB
JavaScript
#!/usr/bin/env node
(()=>{var __webpack_modules__={37724:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RestError:()=>$e,bearerTokenAuthenticationPolicy:()=>Ot,bearerTokenAuthenticationPolicyName:()=>Mt,createDefaultHttpClient:()=>mt,createEmptyPipeline:()=>o,createHttpHeaders:()=>ut,createPipelineFromOptions:()=>it,createPipelineRequest:()=>Qt,decompressResponsePolicy:()=>Z,decompressResponsePolicyName:()=>X,defaultRetryPolicy:()=>ye,exponentialRetryPolicy:()=>kt,exponentialRetryPolicyName:()=>Dt,formDataPolicy:()=>ve,formDataPolicyName:()=>Ee,getDefaultProxySettings:()=>Me,isRestError:()=>et,logPolicy:()=>O,logPolicyName:()=>L,ndJsonPolicy:()=>Gt,ndJsonPolicyName:()=>Ut,proxyPolicy:()=>Oe,proxyPolicyName:()=>Te,redirectPolicy:()=>H,redirectPolicyName:()=>U,retryPolicy:()=>me,setClientRequestIdPolicy:()=>Ge,setClientRequestIdPolicyName:()=>Ue,systemErrorRetryPolicy:()=>Tt,systemErrorRetryPolicyName:()=>xt,throttlingRetryPolicy:()=>Ft,throttlingRetryPolicyName:()=>Nt,tlsPolicy:()=>je,tlsPolicyName:()=>He,tracingPolicy:()=>nt,tracingPolicyName:()=>tt,userAgentPolicy:()=>W,userAgentPolicyName:()=>z});const i=new Set(["Deserialize","Serialize","Retry","Sign"]);class r{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!i.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!i.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new r(this._policies)}static create(){return new r}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const i=n("Serialize"),r=n("None"),o=n("Deserialize"),s=n("Retry"),a=n("Sign"),c=[i,r,o,s,a];function l(e){return"Retry"===e?s:"Serialize"===e?i:"Deserialize"===e?o:"Sign"===e?a:r}for(const e of this._policies){const n=e.policy,i=e.options,r=n.name;if(t.has(r))throw new Error("Duplicate policy names not allowed in pipeline");const o={policy:n,dependsOn:new Set,dependants:new Set};i.afterPhase&&(o.afterPhase=l(i.afterPhase),o.afterPhase.hasAfterPolicies=!0),t.set(r,o);l(i.phase).policies.add(o)}for(const e of this._policies){const{policy:n,options:i}=e,r=n.name,o=t.get(r);if(!o)throw new Error(`Missing node for policy ${r}`);if(i.afterPolicies)for(const e of i.afterPolicies){const n=t.get(e);n&&(o.dependsOn.add(n),n.dependants.add(o))}if(i.beforePolicies)for(const e of i.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(o),o.dependants.add(n))}}function u(n){n.hasRun=!0;for(const i of n.policies)if((!i.afterPhase||i.afterPhase.hasRun&&!i.afterPhase.policies.size)&&0===i.dependsOn.size){e.push(i.policy);for(const e of i.dependants)e.dependsOn.delete(i);t.delete(i.policy.name),n.policies.delete(i)}}function A(){for(const e of c){if(u(e),e.policies.size>0&&e!==r)return void(r.hasRun||u(r));e.hasAfterPolicies&&u(r)}}let d=0;for(;t.size>0;){d++;const t=e.length;if(A(),e.length<=t&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}function o(){return r.create()}const s=require("node:os");var a=n(57975);const c=require("node:process");const l="undefined"!=typeof process&&process.env&&process.env.DEBUG||void 0;let u,A=[],d=[];const p=[];l&&g(l);const f=Object.assign((e=>m(e)),{enable:g,enabled:h,disable:function(){const e=u||"";return g(""),e},log:function(e,...t){c.stderr.write(`${a.format(e,...t)}${s.EOL}`)}});function g(e){u=e,A=[],d=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?d.push(new RegExp(`^${e.substr(1)}$`)):A.push(new RegExp(`^${e}$`));for(const e of p)e.enabled=h(e.namespace)}function h(e){if(e.endsWith("*"))return!0;for(const t of d)if(t.test(e))return!1;for(const t of A)if(t.test(e))return!0;return!1}function m(e){const t=Object.assign((function(...n){if(!t.enabled)return;n.length>0&&(n[0]=`${e} ${n[0]}`);t.log(...n)}),{enabled:h(e),destroy:_,log:f.log,namespace:e,extend:y});return p.push(t),t}function _(){const e=p.indexOf(this);return e>=0&&(p.splice(e,1),!0)}function y(e){const t=m(`${this.namespace}:${e}`);return t.log=this.log,t}const C=f,I=new Set,E="undefined"!=typeof process&&process.env&&process.env.AZURE_LOG_LEVEL||void 0;let v;const b=C("azure");b.log=(...e)=>{C.log(...e)};const B=["verbose","info","warning","error"];E&&(x(E)?function(e){if(e&&!x(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${B.join(",")}`);v=e;const t=[];for(const e of I)k(e)&&t.push(e.namespace);C.enable(t.join(","))}(E):console.error(`AZURE_LOG_LEVEL set to unknown log level '${E}'; logging is not enabled. Acceptable values: ${B.join(", ")}.`));const w={verbose:400,info:300,warning:200,error:100};function S(e){const t=b.extend(e);return Q(b,t),{error:D(t,"error"),warning:D(t,"warning"),info:D(t,"info"),verbose:D(t,"verbose")}}function Q(e,t){t.log=(...t)=>{e.log(...t)}}function D(e,t){const n=Object.assign(e.extend(t),{level:t});if(Q(e,n),k(n)){const e=C.disable();C.enable(e+","+n.namespace)}return I.add(n),n}function k(e){return Boolean(v&&w[e.level]<=w[v])}function x(e){return B.includes(e)}const T=S("core-rest-pipeline");function N(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}const F="REDACTED",R=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],P=["api-version"];class M{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=R.concat(e),t=P.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||N(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=F;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=F;return t}sanitizeUrl(e){if("string"!=typeof e||null===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,F);return t.toString()}}const L="logPolicy";function O(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:T.info,i=new M({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:L,async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${i.sanitize(e)}`);const r=await t(e);return n(`Response status code: ${r.status}`),n(`Headers: ${i.sanitize(r.headers)}`),r}}}const U="redirectPolicy",G=["GET","HEAD"];function H(e={}){const{maxRetries:t=20}=e;return{name:U,async sendRequest(e,n){const i=await n(e);return j(n,i,t)}}}async function j(e,t,n,i=0){const{request:r,status:o,headers:s}=t,a=s.get("location");if(a&&(300===o||301===o&&G.includes(r.method)||302===o&&G.includes(r.method)||303===o&&"POST"===r.method||307===o)&&i<n){const t=new URL(a,r.url);r.url=t.toString(),303===o&&(r.method="GET",r.headers.delete("Content-Length"),delete r.body),r.headers.delete("Authorization");const s=await e(r);return j(e,s,n,i+1)}return t}var J=n(70857);const K="1.10.1",q=3;function Y(e){const t=new Map;var n;t.set("core-rest-pipeline",K),(n=t).set("Node",process.version),n.set("OS",`(${J.arch()}-${J.type()}-${J.release()})`);const i=function(e){const t=[];for(const[n,i]of e){const e=i?`${n}/${i}`:n;t.push(e)}return t.join(" ")}(t);return e?`${e} ${i}`:i}const V="User-Agent",z="userAgentPolicy";function W(e={}){const t=Y(e.userAgentPrefix);return{name:z,sendRequest:async(e,n)=>(e.headers.has(V)||e.headers.set(V,t),n(e))}}const X="decompressResponsePolicy";function Z(){return{name:X,sendRequest:async(e,t)=>("HEAD"!==e.method&&e.headers.set("Accept-Encoding","gzip,deflate"),t(e))}}const $=new WeakMap,ee=new WeakMap;class te{constructor(){this.onabort=null,$.set(this,[]),ee.set(this,!1)}get aborted(){if(!ee.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return ee.get(this)}static get none(){return new te}addEventListener(e,t){if(!$.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");$.get(this).push(t)}removeEventListener(e,t){if(!$.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");const n=$.get(this),i=n.indexOf(t);i>-1&&n.splice(i,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function ne(e){if(e.aborted)return;e.onabort&&e.onabort.call(e);const t=$.get(e);t&&t.slice().forEach((t=>{t.call(e,{type:"abort"})})),ee.set(e,!0)}class ie extends Error{constructor(e){super(e),this.name="AbortError"}}class re{constructor(e){if(this._signal=new te,e){Array.isArray(e)||(e=arguments);for(const t of e)t.aborted?this.abort():t.addEventListener("abort",(()=>{this.abort()}))}}get signal(){return this._signal}abort(){ne(this._signal)}static timeout(e){const t=new te,n=setTimeout(ne,e,t);return"function"==typeof n.unref&&n.unref(),t}}const oe="The operation was aborted.";function se(e,t,n){return new Promise(((i,r)=>{let o,s;const a=()=>r(new ie((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:oe)),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(o&&clearTimeout(o),c(),a()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return a();o=setTimeout((()=>{c(),i(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function ae(e,t){const n=e.headers.get(t);if(!n)return;const i=Number(n);return Number.isNaN(i)?void 0:i}const ce="Retry-After",le=["retry-after-ms","x-ms-retry-after-ms",ce];function ue(e){if(e&&[429,503].includes(e.status))try{for(const t of le){const n=ae(e,t);if(0===n||n){return n*(t===ce?1e3:1)}}const t=e.headers.get(ce);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function Ae(){return{name:"throttlingRetryStrategy",retry({response:e}){const t=ue(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}}}const de=1e3,pe=64e3;function fe(e={}){var t,n;const i=null!==(t=e.retryDelayInMs)&&void 0!==t?t:de,r=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:pe;let o=i;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:i}){const s=function(e){if(!e)return!1;return"ETIMEDOUT"===e.code||"ESOCKETTIMEDOUT"===e.code||"ECONNREFUSED"===e.code||"ECONNRESET"===e.code||"ENOENT"===e.code}(i),a=s&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),l=c&&e.ignoreHttpStatusCodes,u=n&&(function(e){return Number.isFinite(ue(e))}(n)||!c);if(u||l||a)return{skipStrategy:!0};if(i&&!s&&!c)return{errorToThrow:i};const A=o*Math.pow(2,t),d=Math.min(r,A);var p,f;return o=d/2+(p=0,f=d/2,p=Math.ceil(p),f=Math.floor(f),Math.floor(Math.random()*(f-p+1))+p),{retryAfterInMs:o}}}}const ge=S("core-rest-pipeline retryPolicy"),he="retryPolicy";function me(e,t={maxRetries:q}){const n=t.logger||ge;return{name:he,async sendRequest(i,r){var o,s;let a,c,l=-1;e:for(;;){l+=1,a=void 0,c=void 0;try{n.info(`Retry ${l}: Attempting to send request`,i.requestId),a=await r(i),n.info(`Retry ${l}: Received a response from request`,i.requestId)}catch(e){if(n.error(`Retry ${l}: Received an error from request`,i.requestId),c=e,!e||"RestError"!==c.name)throw e;a=c.response}if(null===(o=i.abortSignal)||void 0===o?void 0:o.aborted){n.error(`Retry ${l}: Request aborted.`);throw new ie}if(l>=(null!==(s=t.maxRetries)&&void 0!==s?s:q)){if(n.info(`Retry ${l}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(a)return a;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${l}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||ge;e.info(`Retry ${l}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:l,response:a,responseError:c});if(n.skipStrategy){e.info(`Retry ${l}: Skipped.`);continue t}const{errorToThrow:r,retryAfterInMs:o,redirectTo:s}=n;if(r)throw e.error(`Retry ${l}: Retry strategy ${t.name} throws error:`,r),r;if(o||0===o){e.info(`Retry ${l}: Retry strategy ${t.name} retries after ${o}`),await se(o,void 0,{abortSignal:i.abortSignal});continue e}if(s){e.info(`Retry ${l}: Retry strategy ${t.name} redirects to ${s}`),i.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(a)return n.info("None of the retry strategies could work with the received response. Returning it."),a}}}}const _e="defaultRetryPolicy";function ye(e={}){var t;return{name:_e,sendRequest:me([Ae(),fe(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:q}).sendRequest}}var Ce=n(80196),Ie=n.n(Ce);const Ee="formDataPolicy";function ve(){return{name:Ee,async sendRequest(e,t){if(e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?(e.body=function(e){const t=new URLSearchParams;for(const[n,i]of Object.entries(e))if(Array.isArray(i))for(const e of i)t.append(n,e.toString());else t.append(n,i.toString());return t.toString()}(e.formData),e.formData=void 0):await async function(e,t){const n=new(Ie());for(const t of Object.keys(e)){const i=e[t];if(Array.isArray(i))for(const e of i)n.append(t,e);else n.append(t,i)}t.body=n,t.formData=void 0;const i=t.headers.get("Content-Type");i&&-1!==i.indexOf("multipart/form-data")&&t.headers.set("Content-Type",`multipart/form-data; boundary=${n.getBoundary()}`);try{const e=await new Promise(((e,t)=>{n.getLength(((n,i)=>{n?t(n):e(i)}))}));t.headers.set("Content-Length",e)}catch(e){}}(e.formData,e)}return t(e)}}}var be;const Be="undefined"!=typeof process&&Boolean(process.version)&&Boolean(null===(be=process.versions)||void 0===be?void 0:be.node);var we=n(62288),Se=n(6645);const Qe="HTTPS_PROXY",De="HTTP_PROXY",ke="ALL_PROXY",xe="NO_PROXY",Te="proxyPolicy",Ne=[];let Fe=!1;const Re=new Map;function Pe(e){return process.env[e]?process.env[e]:process.env[e.toLowerCase()]?process.env[e.toLowerCase()]:void 0}function Me(e){if(!e&&!(e=function(){if(!process)return;const e=Pe(Qe),t=Pe(ke),n=Pe(De);return e||t||n}()))return;const t=new URL(e);return{host:(t.protocol?t.protocol+"//":"")+t.hostname,port:Number.parseInt(t.port||"80"),username:t.username,password:t.password}}function Le(e,{headers:t,tlsSettings:n}){let i;try{i=new URL(e.host)}catch(t){throw new Error(`Expecting a valid host string in proxy settings, but found "${e.host}".`)}n&&T.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");const r={hostname:i.hostname,port:e.port,protocol:i.protocol,headers:t.toJSON()};return e.username&&e.password?r.auth=`${e.username}:${e.password}`:e.username&&(r.auth=`${e.username}`),r}function Oe(e=Me(),t){Fe||Ne.push(...function(){const e=Pe(xe);return Fe=!0,e?e.split(",").map((e=>e.trim())).filter((e=>e.length)):[]}());const n={};return{name:Te,async sendRequest(i,r){var o;return i.proxySettings||function(e,t,n){if(0===t.length)return!1;const i=new URL(e).hostname;if(null==n?void 0:n.has(i))return n.get(i);let r=!1;for(const e of t)"."===e[0]?(i.endsWith(e)||i.length===e.length-1&&i===e.slice(1))&&(r=!0):i===e&&(r=!0);return null==n||n.set(i,r),r}(i.url,null!==(o=null==t?void 0:t.customNoProxyList)&&void 0!==o?o:Ne,(null==t?void 0:t.customNoProxyList)?void 0:Re)||(i.proxySettings=e),i.proxySettings&&function(e,t){if(e.agent)return;const n="https:"!==new URL(e.url).protocol,i=e.proxySettings;if(i)if(n){if(!t.httpProxyAgent){const n=Le(i,e);t.httpProxyAgent=new Se.HttpProxyAgent(n)}e.agent=t.httpProxyAgent}else{if(!t.httpsProxyAgent){const n=Le(i,e);t.httpsProxyAgent=new we.HttpsProxyAgent(n)}e.agent=t.httpsProxyAgent}}(i,n),r(i)}}}const Ue="setClientRequestIdPolicy";function Ge(e="x-ms-client-request-id"){return{name:Ue,sendRequest:async(t,n)=>(t.headers.has(e)||t.headers.set(e,t.requestId),n(t))}}const He="tlsPolicy";function je(e){return{name:He,sendRequest:async(t,n)=>(t.tlsSettings||(t.tlsSettings=e),n(t))}}const Je={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Ke(e={}){let t=new qe(e.parentContext);return e.span&&(t=t.setValue(Je.span,e.span)),e.namespace&&(t=t.setValue(Je.namespace,e.namespace)),t}class qe{constructor(e){this._contextMap=e instanceof qe?new Map(e._contextMap):new Map}setValue(e,t){const n=new qe(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new qe(this);return t._contextMap.delete(e),t}}const Ye=n(12583).w;function Ve(){return Ye.instrumenterImplementation||(Ye.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}},tracingContext:Ke({parentContext:t.tracingContext})}),withContext:(e,t,...n)=>t(...n)}),Ye.instrumenterImplementation}function ze(e){if(N(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function We(e){if(ze(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}const Xe=n(39023).inspect.custom,Ze=new M;class $e extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,this.request=t.request,this.response=t.response,Object.setPrototypeOf(this,$e.prototype)}[Xe](){return`RestError: ${this.message} \n ${Ze.sanitize(this)}`}}function et(e){return e instanceof $e||ze(e)&&"RestError"===e.name}$e.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",$e.PARSE_ERROR="PARSE_ERROR";const tt="tracingPolicy";function nt(e={}){const t=Y(e.userAgentPrefix),n=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:i}=e;function r(e,r,o){var s;const a=Ve().startSpan(e,Object.assign(Object.assign({},o),{packageName:n,packageVersion:i,tracingContext:null===(s=null==r?void 0:r.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=a.tracingContext;const l=a.span;return c.getValue(Je.namespace)||(c=c.setValue(Je.namespace,t)),l.setAttribute("az.namespace",c.getValue(Je.namespace)),{span:l,updatedOptions:Object.assign({},r,{tracingOptions:Object.assign(Object.assign({},null==r?void 0:r.tracingOptions),{tracingContext:c})})}}function o(e,t,...n){return Ve().withContext(e,t,...n)}return{startSpan:r,withSpan:async function(e,t,n,i){const{span:s,updatedOptions:a}=r(e,t,i);try{const e=await o(a.tracingOptions.tracingContext,(()=>Promise.resolve(n(a,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:o,parseTraceparentHeader:function(e){return Ve().parseTraceparentHeader(e)},createRequestHeaders:function(e){return Ve().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:K})}catch(e){return void T.warning(`Error when creating the TracingClient: ${We(e)}`)}}();return{name:tt,async sendRequest(e,i){var r,o;if(!n||!(null===(r=e.tracingOptions)||void 0===r?void 0:r.tracingContext))return i(e);const{span:s,tracingContext:a}=null!==(o=function(e,t,n){try{const{span:i,updatedOptions:r}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:{"http.method":t.method,"http.url":t.url,requestId:t.requestId}});if(!i.isRecording())return void i.end();n&&i.setAttribute("http.user_agent",n);const o=e.createRequestHeaders(r.tracingOptions.tracingContext);for(const[e,n]of Object.entries(o))t.headers.set(e,n);return{span:i,tracingContext:r.tracingOptions.tracingContext}}catch(e){return void T.warning(`Skipping creating a tracing span due to an error: ${We(e)}`)}}(n,e,t))&&void 0!==o?o:{};if(!s||!a)return i(e);try{const t=await n.withContext(a,i,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),e.setStatus({status:"success"}),e.end()}catch(e){T.warning(`Skipping tracing span processing due to an error: ${We(e)}`)}}(s,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:ze(t)?t:void 0}),et(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){T.warning(`Skipping tracing span processing due to an error: ${We(e)}`)}}(s,e),e}}}}function it(e){const t=o();return Be&&(e.tlsOptions&&t.addPolicy(je(e.tlsOptions)),t.addPolicy(Oe(e.proxyOptions)),t.addPolicy(Z())),t.addPolicy(ve()),t.addPolicy(W(e.userAgentOptions)),t.addPolicy(Ge()),t.addPolicy(ye(e.retryOptions),{phase:"Retry"}),t.addPolicy(nt(e.userAgentOptions),{afterPhase:"Retry"}),Be&&t.addPolicy(H(e.redirectOptions),{afterPhase:"Retry"}),t.addPolicy(O(e.loggingOptions),{afterPhase:"Sign"}),t}var rt=n(58611),ot=n(65692),st=n(43106),at=n(2203);function ct(e){return e.toLowerCase()}class lt{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(ct(e),{name:e,value:String(t)})}get(e){var t;return null===(t=this._headersMap.get(ct(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(ct(e))}delete(e){this._headersMap.delete(ct(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function ut(e){return new lt(e)}const At={};function dt(e){return e&&"function"==typeof e.pipe}function pt(e){return new Promise((t=>{e.on("close",t),e.on("end",t),e.on("error",t)}))}function ft(e){return e&&"number"==typeof e.byteLength}class gt extends at.Transform{constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}_transform(e,t,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(e){n(e)}}}class ht{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var t,n,i;const r=new re;let o;if(e.abortSignal){if(e.abortSignal.aborted)throw new ie("The operation was aborted.");o=e=>{"abort"===e.type&&r.abort()},e.abortSignal.addEventListener("abort",o)}e.timeout>0&&setTimeout((()=>{r.abort()}),e.timeout);const s=e.headers.get("Accept-Encoding"),a=(null==s?void 0:s.includes("gzip"))||(null==s?void 0:s.includes("deflate"));let c,l="function"==typeof e.body?e.body():e.body;if(l&&!e.headers.has("Content-Length")){const t=function(e){return e?Buffer.isBuffer(e)?e.length:dt(e)?null:ft(e)?e.byteLength:"string"==typeof e?Buffer.from(e).length:null:0}(l);null!==t&&e.headers.set("Content-Length",t)}try{if(l&&e.onUploadProgress){const t=e.onUploadProgress,n=new gt(t);n.on("error",(e=>{T.error("Error in upload progress",e)})),dt(l)?l.pipe(n):n.end(l),l=n}const o=await this.makeRequest(e,r,l),s=function(e){const t=ut();for(const n of Object.keys(e.headers)){const i=e.headers[n];Array.isArray(i)?i.length>0&&t.set(n,i[0]):i&&t.set(n,i)}return t}(o),A={status:null!==(t=o.statusCode)&&void 0!==t?t:0,headers:s,request:e};if("HEAD"===e.method)return o.resume(),A;c=a?function(e,t){const n=t.get("Content-Encoding");if("gzip"===n){const t=st.createGunzip();return e.pipe(t),t}if("deflate"===n){const t=st.createInflate();return e.pipe(t),t}return e}(o,s):o;const d=e.onDownloadProgress;if(d){const e=new gt(d);e.on("error",(e=>{T.error("Error in download progress",e)})),c.pipe(e),c=e}return(null===(n=e.streamResponseStatusCodes)||void 0===n?void 0:n.has(Number.POSITIVE_INFINITY))||(null===(i=e.streamResponseStatusCodes)||void 0===i?void 0:i.has(A.status))?A.readableStreamBody=c:A.bodyAsText=await(u=c,new Promise(((e,t)=>{const n=[];u.on("data",(e=>{Buffer.isBuffer(e)?n.push(e):n.push(Buffer.from(e))})),u.on("end",(()=>{e(Buffer.concat(n).toString("utf8"))})),u.on("error",(e=>{e&&"AbortError"===(null==e?void 0:e.name)?t(e):t(new $e(`Error reading response as text: ${e.message}`,{code:$e.PARSE_ERROR}))}))}))),A}finally{if(e.abortSignal&&o){let t=Promise.resolve();dt(l)&&(t=pt(l));let n=Promise.resolve();dt(c)&&(n=pt(c)),Promise.all([t,n]).then((()=>{var t;o&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",o))})).catch((e=>{T.warning("Error when cleaning up abortListener on httpRequest",e)}))}}var u}makeRequest(e,t,n){var i;const r=new URL(e.url),o="https:"!==r.protocol;if(o&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);const s={agent:null!==(i=e.agent)&&void 0!==i?i:this.getOrCreateAgent(e,o),hostname:r.hostname,path:`${r.pathname}${r.search}`,port:r.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})};return new Promise(((i,r)=>{const a=o?rt.request(s,i):ot.request(s,i);a.once("error",(t=>{var n;r(new $e(t.message,{code:null!==(n=t.code)&&void 0!==n?n:$e.REQUEST_SEND_ERROR,request:e}))})),t.signal.addEventListener("abort",(()=>{const e=new ie("The operation was aborted.");a.destroy(e),r(e)})),n&&dt(n)?n.pipe(a):n?"string"==typeof n||Buffer.isBuffer(n)?a.end(n):ft(n)?a.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(T.error("Unrecognized body type",n),r(new $e("Unrecognized body type"))):a.end()}))}getOrCreateAgent(e,t){var n;const i=e.disableKeepAlive;if(t)return i?rt.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new rt.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(i&&!e.tlsSettings)return ot.globalAgent;const t=null!==(n=e.tlsSettings)&&void 0!==n?n:At;let r=this.cachedHttpsAgents.get(t);return r&&r.options.keepAlive===!i||(T.info("No cached TLS Agent exist, creating a new Agent"),r=new ot.Agent(Object.assign({keepAlive:!i},t)),this.cachedHttpsAgents.set(t,r)),r}}}function mt(){return new ht}var _t,yt=new Uint8Array(16);function Ct(){if(!_t&&!(_t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _t(yt)}const It=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Et=function(e){return"string"==typeof e&&It.test(e)};for(var vt=[],bt=0;bt<256;++bt)vt.push((bt+256).toString(16).substr(1));const Bt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(vt[e[t+0]]+vt[e[t+1]]+vt[e[t+2]]+vt[e[t+3]]+"-"+vt[e[t+4]]+vt[e[t+5]]+"-"+vt[e[t+6]]+vt[e[t+7]]+"-"+vt[e[t+8]]+vt[e[t+9]]+"-"+vt[e[t+10]]+vt[e[t+11]]+vt[e[t+12]]+vt[e[t+13]]+vt[e[t+14]]+vt[e[t+15]]).toLowerCase();if(!Et(n))throw TypeError("Stringified UUID is invalid");return n};const wt=function(e,t,n){var i=(e=e||{}).random||(e.rng||Ct)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return Bt(i)};class St{constructor(e){var t,n,i,r,o,s,a;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:ut(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(i=e.timeout)&&void 0!==i?i:0,this.formData=e.formData,this.disableKeepAlive=null!==(r=e.disableKeepAlive)&&void 0!==r&&r,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(o=e.withCredentials)&&void 0!==o&&o,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||wt(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(a=e.enableBrowserStreams)&&void 0!==a&&a}}function Qt(e){return new St(e)}const Dt="exponentialRetryPolicy";function kt(e={}){var t;return me([fe(Object.assign(Object.assign({},e),{ignoreSystemErrors:!0}))],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:q})}const xt="systemErrorRetryPolicy";function Tt(e={}){var t;return{name:xt,sendRequest:me([fe(Object.assign(Object.assign({},e),{ignoreHttpStatusCodes:!0}))],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:q}).sendRequest}}const Nt="throttlingRetryPolicy";function Ft(e={}){var t;return{name:Nt,sendRequest:me([Ae()],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:q}).sendRequest}}const Rt={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};function Pt(e,t){let n,i=null,r=null;const o=Object.assign(Object.assign({},Rt),t),s={get isRefreshing(){return null!==i},get shouldRefresh(){var e;return!s.isRefreshing&&(null!==(e=null==r?void 0:r.expiresOnTimestamp)&&void 0!==e?e:0)-o.refreshWindowInMs<Date.now()},get mustRefresh(){return null===r||r.expiresOnTimestamp-o.forcedRefreshWindowInMs<Date.now()}};function a(t,a){var c;if(!s.isRefreshing){i=async function(e,t,n){async function i(){if(!(Date.now()<n)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let r=await i();for(;null===r;)await se(t),r=await i();return r}((()=>e.getToken(t,a)),o.retryIntervalInMs,null!==(c=null==r?void 0:r.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(i=null,r=e,n=a.tenantId,r))).catch((e=>{throw i=null,r=null,n=void 0,e}))}return i}return async(e,t)=>n!==t.tenantId||Boolean(t.claims)||s.mustRefresh?a(e,t):(s.shouldRefresh&&a(e,t),r)}const Mt="bearerTokenAuthenticationPolicy";async function Lt(e){const{scopes:t,getAccessToken:n,request:i}=e,r={abortSignal:i.abortSignal,tracingOptions:i.tracingOptions},o=await n(t,r);o&&e.request.headers.set("Authorization",`Bearer ${o.token}`)}function Ot(e){var t;const{credential:n,scopes:i,challengeCallbacks:r}=e,o=e.logger||T,s=Object.assign({authorizeRequest:null!==(t=null==r?void 0:r.authorizeRequest)&&void 0!==t?t:Lt,authorizeRequestOnChallenge:null==r?void 0:r.authorizeRequestOnChallenge},r),a=n?Pt(n):()=>Promise.resolve(null);return{name:Mt,async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,r;await s.authorizeRequest({scopes:Array.isArray(i)?i:[i],request:e,getAccessToken:a,logger:o});try{n=await t(e)}catch(e){r=e,n=e.response}if(s.authorizeRequestOnChallenge&&401===(null==n?void 0:n.status)&&function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(n)){if(await s.authorizeRequestOnChallenge({scopes:Array.isArray(i)?i:[i],request:e,response:n,getAccessToken:a,logger:o}))return t(e)}if(r)throw r;return n}}}const Ut="ndJsonPolicy";function Gt(){return{name:Ut,async sendRequest(e,t){if("string"==typeof e.body&&e.body.startsWith("[")){const t=JSON.parse(e.body);Array.isArray(t)&&(e.body=t.map((e=>JSON.stringify(e)+"\n")).join(""))}return t(e)}}}},80196:(e,t,n)=>{var i=n(80801),r=n(39023),o=n(16928),s=n(58611),a=n(65692),c=n(87016).parse,l=n(79896),u=n(2203).Stream,A=n(86049),d=n(21873),p=n(20281);function f(e){if(!(this instanceof f))return new f(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],i.call(this),e=e||{})this[t]=e[t]}e.exports=f,r.inherits(f,i),f.LINE_BREAK="\r\n",f.DEFAULT_CONTENT_TYPE="application/octet-stream",f.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var o=i.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),r.isArray(t))this._error(new Error("Arrays are not supported."));else{var s=this._multiPartHeader(e,t,n),a=this._multiPartFooter();o(s),o(t),o(a),this._trackLength(s,t,n)}},f.prototype._trackLength=function(e,t,n){var i=0;null!=n.knownLength?i+=+n.knownLength:Buffer.isBuffer(t)?i=t.length:"string"==typeof t&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+f.LINE_BREAK.length,t&&(t.path||t.readable&&t.hasOwnProperty("httpVersion")||t instanceof u)&&(n.knownLength||this._valuesToMeasure.push(t))},f.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):l.stat(e.path,(function(n,i){var r;n?t(n):(r=i.size-(e.start?e.start:0),t(null,r))})):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},f.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var i,r=this._getContentDisposition(t,n),o=this._getContentType(t,n),s="",a={"Content-Disposition":["form-data",'name="'+e+'"'].concat(r||[]),"Content-Type":[].concat(o||[])};for(var c in"object"==typeof n.header&&p(a,n.header),a)a.hasOwnProperty(c)&&null!=(i=a[c])&&(Array.isArray(i)||(i=[i]),i.length&&(s+=c+": "+i.join("; ")+f.LINE_BREAK));return"--"+this.getBoundary()+f.LINE_BREAK+s+f.LINE_BREAK},f.prototype._getContentDisposition=function(e,t){var n,i;return"string"==typeof t.filepath?n=o.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=o.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(n=o.basename(e.client._httpMessage.path||"")),n&&(i='filename="'+n+'"'),i},f.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=A.lookup(e.name)),!n&&e.path&&(n=A.lookup(e.path)),!n&&e.readable&&e.hasOwnProperty("httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=A.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=f.DEFAULT_CONTENT_TYPE),n},f.prototype._multiPartFooter=function(){return function(e){var t=f.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},f.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+f.LINE_BREAK},f.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(n[t.toLowerCase()]=e[t]);return n},f.prototype.setBoundary=function(e){this._boundary=e},f.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},f.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,i=this._streams.length;n<i;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(f.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},f.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},f.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},f.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},f.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?d.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,i){n?e(n):(i.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},f.prototype.submit=function(e,t){var n,i,r={method:"post"};return"string"==typeof e?(e=c(e),i=p({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(i=p(e,r)).port||(i.port="https:"==i.protocol?443:80),i.headers=this.getHeaders(e.headers),n="https:"==i.protocol?a.request(i):s.request(i),this.getLength(function(e,i){if(e&&"Unknown stream"!==e)this._error(e);else if(i&&n.setHeader("Content-Length",i),this.pipe(n),t){var r,o=function(e,i){return n.removeListener("error",o),n.removeListener("response",r),t.call(this,e,i)};r=o.bind(this,null),n.on("error",o),n.on("response",r)}}.bind(this)),n},f.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},f.prototype.toString=function(){return"[object FormData]"}},20281:e=>{e.exports=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e}},46399:(e,t,n)=>{"use strict";var i,r,o,s,a,c;e=n.nmd(e),i=e,(c=n(90678)).js_beautify=c.js,c.css_beautify=c.css,c.html_beautify=c.html,i.exports=(o=c,s=c,(a=function(e,t){return r.js_beautify(e,t)}).js=(r=c).js_beautify,a.css=o.css_beautify,a.html=s.html_beautify,a.js_beautify=r.js_beautify,a.css_beautify=o.css_beautify,a.html_beautify=s.html_beautify,a)},38452:e=>{"use strict";function t(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/\s*@formatter:off\s*/.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\s*@formatter:on\s*/.source+t,"g")}t.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={ignore:"start"};return t},t.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.D=t},69380:e=>{"use strict";var t=RegExp.prototype.hasOwnProperty("sticky");function n(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},n.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},n.prototype.__match=function(e,n){e.lastIndex=n;var i=e.exec(this.__input);return!i||t&&e.sticky||i.index!==n&&(i=null),i},n.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},n.prototype.testChar=function(e,t){var n=this.peek(t);return e.lastIndex=0,null!==n&&e.test(n)},n.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},n.prototype.read=function(e,t,n){var i,r="";return e&&(i=this.match(e))&&(r+=i[0]),!t||!i&&e||(r+=this.readUntil(t,n)),r},n.prototype.readUntil=function(e,t){var n,i=this.__position;e.lastIndex=this.__position;var r=e.exec(this.__input);return r?(i=r.index,t&&(i+=r[0].length)):i=this.__input_length,n=this.__input.substring(this.__position,i),this.__position=i,n},n.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},n.prototype.get_regexp=function(e,n){var i=null,r="g";return n&&t&&(r="y"),"string"==typeof e&&""!==e?i=new RegExp(e,r):e&&(i=new RegExp(e.source,r)),i},n.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(e){var t=this.__position,n=this.readUntilAfter(e);return this.__position=t,n},n.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},e.exports.z=n},26186:e=>{"use strict";function t(e,t){this.raw_options=n(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function n(e,t){var n,r={};for(n in e=i(e))n!==t&&(r[n]=e[n]);if(t&&e[t])for(n in e[t])r[n]=e[t][n];return r}function i(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}t.prototype._get_array=function(e,t){var n=this.raw_options[e],i=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},t.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},t.prototype._get_characters=function(e,t){var n=this.raw_options[e],i=t||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},t.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var i=parseInt(n,10);return isNaN(i)&&(i=t),i},t.prototype._get_selection=function(e,t,n){var i=this._get_selection_list(e,t,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i[0]},t.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var i=this._get_array(e,n);if(!this._is_valid_selection(i,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i},t.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some((function(e){return-1===t.indexOf(e)}))},e.exports.JY=t},91791:e=>{"use strict";function t(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function i(e,i){this.__indent_cache=new n(e,i),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}t.prototype.clone_empty=function(){var e=new t(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},t.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},t.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},t.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return 0===this.__items.length},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},t.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},n.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},n.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},n.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},i.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.s