"use strict";varplugin=(()=>{varse=Object.create;varet=Object.defineProperty;varne=Object.getOwnPropertyDescriptor;varre=Object.getOwnPropertyNames;varoe=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;varx=(i=>typeofrequire<"u"?require:typeofProxy<"u"?newProxy(i,{get:(t,e)=>(typeofrequire<"u"?require:t)[e]}):i)(function(i){if(typeofrequire<"u")returnrequire.apply(this,arguments);thrownewError('Dynamic require of "'+i+'" is not supported')});varX=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),it=(i,t)=>{for(vareint)et(i,e,{get:t[e],enumerable:!0})},At=(i,t,e,s)=>{if(t&&typeoft=="object"||typeoft=="function")for(letnofre(t))!ae.call(i,n)&&n!==e&&et(i,n,{get:()=>t[n],enumerable:!(s=ne(t,n))||s.enumerable});returni};varle=(i,t,e)=>(e=i!=null?se(oe(i)):{},At(t||!i||!i.__esModule?et(e,"default",{value:i,enumerable:!0}):e,i)),ce=i=>At(et({},"__esModule",{value:!0}),i);varFt=(i,t,e)=>{if(!t.has(i))throwTypeError("Cannot "+e)};varE=(i,t,e)=>(Ft(i,t,"read from private field"),e?e.call(i):t.get(i)),st=(i,t,e)=>{if(t.has(i))throwTypeError("Cannot add the same private member more than once");tinstanceofWeakSet?t.add(i):t.set(i,e)};varP=(i,t,e)=>(Ft(i,t,"access private method"),e);varIt=X((Ne,Et)=>{varQ=typeofperformance=="object"&&performance&&typeofperformance.now=="function"?performance:Date,he=typeofAbortController=="function",nt=he?AbortController:class{constructor(){this.signal=new_t}abort(t=newError("This operation was aborted")){this.signal.reason=this.signal.reason||t,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},de=typeofAbortSignal=="function",fe=typeofnt.AbortSignal=="function",_t=de?AbortSignal:fe?nt.AbortController:class{constructor(){this.reason=void0,this.aborted=!1,this._listeners=[]}dispatchEvent(t){t.type==="abort"&&(this.aborted=!0,this.onabort(t),this._listeners.forEach(e=>e(t),this))}onabort(){}addEventListener(t,e){t==="abort"&&this._listeners.push(e)}removeEventListener(t,e){t==="abort"&&(this._listeners=this._listeners.filter(s=>s!==e))}},gt=newSet,pt=(i,t)=>{lete=`LRU_CACHE_OPTION_${i}`;rt(e)&&yt(e,`${i} option`,`options.${t}`,_)},ut=(i,t)=>{lete=`LRU_CACHE_METHOD_${i}`;if(rt(e)){let{prototype:s}=_,{get:n}=Object.getOwnPropertyDescriptor(s,i);yt(e,`${i} method`,`cache.${t}()`,n)}},pe=(i,t)=>{lete=`LRU_CACHE_PROPERTY_${i}`;if(rt(e)){let{prototype:s}=_,{get:n}=Object.getOwnPropertyDescriptor(s,i);yt(e,`${i} property`,`cache.${t}`,n)}},zt=(...i)=>{typeofprocess=="object"&&process&&typeofprocess.emitWarning=="function"?process.emitWarning(...i):console.error(...i)},rt=i=>!gt.has(i),yt=(i,t,e,s)=>{gt.add(i);letn=`The ${t} is deprecated. Please use ${e} instead.`;zt(n,"DeprecationWarning",i,s)},I=i=>i&&i===Math.floor(i)&&i>0&&isFinite(i),Ot=i=>I(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?H:null:null,H=classextendsArray{constructor(t){super(t),this.fill(0)}},mt=class{constructor(t){if(t===0)return[];lete=Ot(t);this.heap=newe(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){returnthis.heap[--this.length]}},_=class{constructor(t={}){let{max:e=0,ttl:s,ttlResolution:n=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:u,dispose:h,disposeAfter:l,noDisposeOnSet:g,noUpdateTTL:c,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:d,fetchMethod:p,fetchContext:k,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:$,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:D,ignoreFetchAbort:z}=t,{length:O,maxAge:j,stale:K}=tinstanceof_?{}:t;if(e!==0&&!I(e))thrownewTypeError("max option must be a nonnegative integer");letdt=e?Ot(e):Array;if(!dt)thrownewError("invalid max value: "+e);if(this.max=e,this.maxSize=f,this.maxEntrySize=y||this.maxSize,this.sizeCalculation=d||O,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)thrownewTypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeofthis.sizeCalculation!="function")thrownewTypeError("sizeCalculation set to non-function")}if(this.fetchMet
`}return a};var q=class extends W.Command{constructor(){super(...arguments);this.recursive=W.Option.Boolean("-R,--recursive",!1,{description:"Include transitive dependencies (dependencies of direct dependencies)"});this.production=W.Option.Boolean("--production",!1,{description:"Exclude development dependencies"});this.json=W.Option.Boolean("--json",!1,{description:"Format output as JSON"});this.excludeMetadata=W.Option.Boolean("--exclude-metadata",!1,{description:"Exclude dependency metadata from output"})}async execute(){let e=await Y.Configuration.find(this.context.cwd,this.context.plugins),{project:s,workspace:n}=await Y.Project.find(e,this.context.cwd);if(!n)throw new ee.WorkspaceRequiredError(s.cwd,this.context.cwd);await s.restoreInstallState();let r=await Kt(s,this.json,this.recursive,this.production,this.excludeMetadata);Y.treeUtils.emitTree(r,{configuration:e,stdout:this.context.stdout,json:this.json,separators:1})}};q.paths=[["licenses","list"]],q.usage=W.Command.Usage({description:"display the licenses for all packages in the project",details:`
`,examples:[["List all licenses of direct dependencies","$0 licenses list"],["List all licenses of direct and transitive dependencies","$0 licenses list --recursive"],["List all licenses of production dependencies only","$0 licenses list --production"]]});var ie=x("@yarnpkg/cli"),ht=x("@yarnpkg/core"),J=x("clipanion");var G=class extends J.Command{constructor(){super(...arguments);this.recursive=J.Option.Boolean("-R,--recursive",!1,{description:"Include transitive dependencies (dependencies of direct dependencies)"});this.production=J.Option.Boolean("--production",!1,{description:"Exclude development dependencies"})}async execute(){let e=await ht.Configuration.find(this.context.cwd,this.context.plugins),{project:s,workspace:n}=await ht.Project.find(e,this.context.cwd);if(!n)throw new ie.WorkspaceRequiredError(s.cwd,this.context.cwd);await s.restoreInstallState();let r=await te(s,this.recursive,this.production);this.context.stdout.write(r)}};G.paths=[["licenses","generate-disclaimer"]],G.usage=J.Command.Usage({description:"display the license disclaimer including all packages in the project",details:`
`,examples:[["Include licenses of direct dependencies","$0 licenses generate-disclaimer"],["Include licenses of direct and transitive dependencies","$0 licenses generate-disclaimer --recursive"],["Include licenses of production dependencies only","$0 licenses list --production"]]});var Ce={commands:[q,G]},Me=Ce;return ce(Ue);})();