@kitelev/exocortex-cli 16.234.0 → 16.234.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +51 -51
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // @kitelev/exocortex-cli v16.234.0
2
+ // @kitelev/exocortex-cli v16.234.1
3
3
  // CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
4
4
  // License: MIT
5
5
 
@@ -28,18 +28,18 @@ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
28
28
  `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in bt.default.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,bt.default.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Tg(this.options),t=a(n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n)),"hasCustomOptionValue");this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=a(o=>{let c=o.attributeName(),l=this.getOptionValue(c),u=this.options.find(d=>d.negate&&c===d.attributeName()),f=this.options.find(d=>!d.negate&&c===d.attributeName());return u&&(u.presetArg===void 0&&l===!1||u.presetArg!==void 0&&l===u.presetArg)?u:f||o},"findBestOptionFromValue"),i=a(o=>{let c=n(o),l=c.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${c.envVar}'`:`option '${c.flags}'`},"getErrorMessage"),s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(c=>c.long).map(c=>c.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=dE(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",i=e.length,s=this.parent?` for '${this.name()}'`:"",o=e.join(", "),c=`error: too many arguments${s}. Expected ${t} argument${n} but got ${i}: ${o}.`;this.error(c,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=dE(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
29
29
  `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>Eg(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Zs.default.basename(e,Zs.default.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=t.formatHelp(this,t);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let t=!!e.error,n,i,s;return t?(n=a(c=>this._outputConfiguration.writeErr(c),"baseWrite"),i=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=a(c=>this._outputConfiguration.writeOut(c),"baseWrite"),i=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a(c=>(i||(c=this._outputConfiguration.stripColor(c)),n(c)),"write"),hasColors:i,helpWidth:s}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let s=this.helpInformation({error:n.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(bt.default.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
30
30
  Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
31
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};a(DP,"incrementNodeInspectorPort");a(LP,"useColor")});var N0e,ct=je(()=>{vg();MP();lp();uE();fE();N0e=new fe});var Zc=v(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.AssetClass=void 0;var jP;(function(r){r.AREA="ems__Area",r.TASK="ems__Task",r.PROJECT="ems__Project",r.ACTION="ems__Action",r.MEETING="ems__Meeting",r.INITIATIVE="ems__Initiative",r.TASK_PROTOTYPE="ems__TaskPrototype",r.MEETING_PROTOTYPE="ems__MeetingPrototype",r.EVENT_PROTOTYPE="exo__EventPrototype",r.PROJECT_PROTOTYPE="ems__ProjectPrototype",r.EVENT="exo__Event",r.DAILY_NOTE="pn__DailyNote",r.CONCEPT="ims__Concept",r.SESSION_START_EVENT="ems__SessionStartEvent",r.SESSION_END_EVENT="ems__SessionEndEvent",r.PROTOTYPE="exo__Prototype",r.CLASS="exo__Class",r.FLEETING_NOTE="ztlk__FleetingNote",r.WORKFLOW="ems__Workflow",r.WORKFLOW_STATE="ems__WorkflowState",r.WORKFLOW_TRANSITION="ems__WorkflowTransition",r.COMMAND="exocmd__Command",r.PRECONDITION="exocmd__Precondition",r.GROUNDING="exocmd__Grounding",r.COMMAND_BINDING="exocmd__CommandBinding"})(jP||(Ig.AssetClass=jP={}))});var el=v(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});Rg.EffortStatus=void 0;var $P;(function(r){r.DRAFT="ems__EffortStatusDraft",r.BACKLOG="ems__EffortStatusBacklog",r.DOING="ems__EffortStatusDoing",r.WAITING="ems__EffortStatusWaiting",r.DONE="ems__EffortStatusDone",r.TRASHED="ems__EffortStatusTrashed"})($P||(Rg.EffortStatus=$P={}))});var Au=v(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.EFFORT_STATUS_BY_UID=Uo.EFFORT_STATUS_UID=void 0;Uo.normalizeEffortStatus=o8;var Tu=el();Uo.EFFORT_STATUS_UID={[Tu.EffortStatus.DRAFT]:"c42245d0-01de-4c35-bfcf-d910445ea28e",[Tu.EffortStatus.BACKLOG]:"753a44d5-846c-4b82-9196-4fd9a4d48777",[Tu.EffortStatus.DOING]:"027e78f4-6e16-4b36-b8fb-5510507d5745",[Tu.EffortStatus.WAITING]:"0610947c-6a62-41c8-9d44-7863d3ba3a8e",[Tu.EffortStatus.DONE]:"7b9b3116-7c3c-438c-9618-94fe301320a6",[Tu.EffortStatus.TRASHED]:"5d14f18d-db2b-4847-9ac1-144cb93b2541"};Uo.EFFORT_STATUS_BY_UID=Object.freeze(Object.fromEntries(Object.entries(Uo.EFFORT_STATUS_UID).map(([r,e])=>[e,r])));var pE=/^ems__EffortStatus[A-Za-z]+$/,i8=/\s+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,s8=/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;function o8(r){let e=r;if(e==null)return null;if(Array.isArray(e)){if(e.length!==1)return null;e=e[0]}let t=String(e).trim().replace(/^["']/,"").replace(/["']$/,"").replace(/^\[\[/,"").replace(/\]\]$/,"").trim();if(!t)return null;if(pE.test(t))return t;let n=t.indexOf("|"),i=n===-1?t:t.slice(0,n).trim();if(n!==-1){let c=t.slice(n+1).trim();if(pE.test(c))return c}let s=i.replace(i8,"").trim();if(pE.test(s))return s;let o=i.match(s8);return o?Uo.EFFORT_STATUS_BY_UID[o[1].toLowerCase()]??null:null}a(o8,"normalizeEffortStatus")});var hE=v(Cg=>{"use strict";Object.defineProperty(Cg,"__esModule",{value:!0});Cg.EFFORT_STATUS_OPTIONS=void 0;var a8=Au();Cg.EFFORT_STATUS_OPTIONS=Object.freeze(Object.keys(a8.EFFORT_STATUS_UID).map(r=>Object.freeze({value:`[[${r}]]`,label:r.replace(/^ems__EffortStatus/,"")})))});var qa=v(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.GroundingType=void 0;var UP;(function(r){r.SPARQL_UPDATE="sparql_update",r.PROPERTY_DELETE="property_delete",r.PROPERTY_SET="property_set",r.COMPOSITE="composite",r.SERVICE_CALL="service_call",r.CREATE_INSTANCE="create_instance",r.PROPERTY_APPEND="property_append",r.PROPERTY_INCREMENT="property_increment",r.PROPERTY_SHIFT="property_shift",r.WORKFLOW_TRANSITION="workflow_transition",r.BODY_TEMPLATE="body_template"})(UP||(xg.GroundingType=UP={}))});var pp=v(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.GROUNDING_TYPE_IRI_TO_ENUM=di.GROUNDING_TYPE_UID_TO_ENUM=di.GROUNDING_TYPE_UIDS=void 0;di.resolveGroundingTypeFromIRI=l8;di.resolveGroundingTypeFromWikilinkLiteral=u8;var cr=qa();di.GROUNDING_TYPE_UIDS={[cr.GroundingType.PROPERTY_SET]:"cf3bb923-f1f1-40be-b728-782844402426",[cr.GroundingType.PROPERTY_DELETE]:"4bdf1d0b-e9da-4d96-bafe-c5aaef8c2bd5",[cr.GroundingType.COMPOSITE]:"8f9a57db-3865-4886-92fb-c5ab7f3c3fa3",[cr.GroundingType.SERVICE_CALL]:"9bf9fc99-ac37-4e51-b9f5-bd920099947c",[cr.GroundingType.CREATE_INSTANCE]:"4367e2d6-6c92-450a-becb-abce1fb07682",[cr.GroundingType.PROPERTY_APPEND]:"572f7e69-a8a1-42f6-8113-5aa65cc4b552",[cr.GroundingType.PROPERTY_INCREMENT]:"afc29f90-45eb-4f94-9fe2-2ce738759161",[cr.GroundingType.PROPERTY_SHIFT]:"f4e5266f-f3cc-49fd-a5a5-ce1e8b7847a4",[cr.GroundingType.SPARQL_UPDATE]:"79c3e709-8d1d-4694-bcc6-b9ff07d59b86",[cr.GroundingType.WORKFLOW_TRANSITION]:"5c1a2552-d576-496d-8823-563573dd1e2f",[cr.GroundingType.BODY_TEMPLATE]:"6093bfcb-cf9b-4565-86c3-ff74d8bc11c0"};di.GROUNDING_TYPE_UID_TO_ENUM=Object.freeze(Object.fromEntries(Object.entries(di.GROUNDING_TYPE_UIDS).map(([r,e])=>[e,r])));var cs="https://exocortex.my/ontology/exocmd#";di.GROUNDING_TYPE_IRI_TO_ENUM=Object.freeze({[`${cs}GroundingTypePropertySet`]:cr.GroundingType.PROPERTY_SET,[`${cs}GroundingTypePropertyDelete`]:cr.GroundingType.PROPERTY_DELETE,[`${cs}GroundingTypeComposite`]:cr.GroundingType.COMPOSITE,[`${cs}GroundingTypeServiceCall`]:cr.GroundingType.SERVICE_CALL,[`${cs}GroundingTypeCreateInstance`]:cr.GroundingType.CREATE_INSTANCE,[`${cs}GroundingTypePropertyAppend`]:cr.GroundingType.PROPERTY_APPEND,[`${cs}GroundingTypePropertyIncrement`]:cr.GroundingType.PROPERTY_INCREMENT,[`${cs}GroundingTypePropertyShift`]:cr.GroundingType.PROPERTY_SHIFT,[`${cs}GroundingTypeSparqlUpdate`]:cr.GroundingType.SPARQL_UPDATE,[`${cs}GroundingTypeWorkflowTransition`]:cr.GroundingType.WORKFLOW_TRANSITION,[`${cs}GroundingTypeBodyTemplate`]:cr.GroundingType.BODY_TEMPLATE});var c8=/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;function l8(r){let e=di.GROUNDING_TYPE_IRI_TO_ENUM[r];if(e!==void 0)return e;let t=r.match(c8);return t?di.GROUNDING_TYPE_UID_TO_ENUM[t[1].toLowerCase()]??null:null}a(l8,"resolveGroundingTypeFromIRI");function u8(r){let e=r.match(/^\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\|[^\]]*)?\]\]$/i);return e?di.GROUNDING_TYPE_UID_TO_ENUM[e[1].toLowerCase()]??null:null}a(u8,"resolveGroundingTypeFromWikilinkLiteral")});var mE=v(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.CommandBindingStyleProperty=zi.CommandBindingProperty=zi.GroundingProperty=zi.PreconditionProperty=zi.CommandProperty=void 0;zi.CommandProperty={ICON:"exocmd__Command_icon",PRECONDITION:"exocmd__Command_precondition",GROUNDING:"exocmd__Command_grounding",CONFIRM_MESSAGE:"exocmd__Command_confirmMessage",SUCCESS_MESSAGE:"exocmd__Command_successMessage",CATEGORY:"exocmd__Command_category",OPEN_IN_SAME_TAB:"exocmd__Command_openInSameTab"};zi.PreconditionProperty={SPARQL_ASK:"exocmd__Precondition_sparqlAsk",QUERY:"exocmd__Precondition_query"};zi.GroundingProperty={TYPE:"exocmd__Grounding_type",SPARQL_UPDATE:"exocmd__Grounding_sparqlUpdate",TARGET_PROPERTY:"exocmd__Grounding_targetProperty",STEPS:"exocmd__Grounding_steps",IS_DEFINED_BY:"exocmd__Grounding_isDefinedBy",LABEL_TEMPLATE:"exocmd__Grounding_labelTemplate"};zi.CommandBindingProperty={COMMAND:"exocmd__CommandBinding_command",TARGET_CLASS:"exocmd__CommandBinding_targetClass",TARGET_PROTOTYPE:"exocmd__CommandBinding_targetPrototype",TARGET_ASSET:"exocmd__CommandBinding_targetAsset",POSITION:"exocmd__CommandBinding_position",ORDER:"exocmd__CommandBinding_order",PRECONDITION:"exocmd__CommandBinding_precondition",STYLE:"exocmd__CommandBinding_style",VARIANT:"exocmd__CommandBinding_variant"};zi.CommandBindingStyleProperty={VARIANT:"exocmd__CommandBindingStyle_variant",SHOW_ICON:"exocmd__CommandBindingStyle_showIcon",LABEL_CLASS:"exocmd__CommandBindingStyle_labelClass",ARIA_LABEL:"exocmd__CommandBindingStyle_ariaLabel",TOOLTIP:"exocmd__CommandBindingStyle_tooltip",KEYBOARD_SHORTCUT:"exocmd__CommandBindingStyle_keyboardShortcut",SOURCE:"exocmd__CommandBindingStyle_source"}});var gE=v(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.STYLE_SOURCE_VALUES=pi.LABEL_CLASS_VALUES=pi.COMMAND_VARIANT_VALUES=void 0;pi.isCommandVariant=f8;pi.isLabelClass=d8;pi.isStyleSource=p8;pi.COMMAND_VARIANT_VALUES=Object.freeze(["primary","secondary","success","warning","danger","muted"]);pi.LABEL_CLASS_VALUES=Object.freeze(["muted","bold","uppercase","compact"]);pi.STYLE_SOURCE_VALUES=Object.freeze(["vendor","user"]);function f8(r){return typeof r=="string"&&pi.COMMAND_VARIANT_VALUES.includes(r)}a(f8,"isCommandVariant");function d8(r){return typeof r=="string"&&pi.LABEL_CLASS_VALUES.includes(r)}a(d8,"isLabelClass");function p8(r){return typeof r=="string"&&pi.STYLE_SOURCE_VALUES.includes(r)}a(p8,"isStyleSource")});var BP=v(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.isCommandFrontmatter=h8;Iu.isPreconditionFrontmatter=m8;Iu.isGroundingFrontmatter=g8;Iu.isCommandBindingFrontmatter=y8;function h8(r){return Og(r,"exocmd__Command")}a(h8,"isCommandFrontmatter");function m8(r){return Og(r,"exocmd__Precondition")}a(m8,"isPreconditionFrontmatter");function g8(r){return Og(r,"exocmd__Grounding")}a(g8,"isGroundingFrontmatter");function y8(r){return Og(r,"exocmd__CommandBinding")}a(y8,"isCommandBindingFrontmatter");function Og(r,e){let t=r.exo__Instance_class;if(t==null)return!1;let n=Array.isArray(t)?t:[t];for(let i of n){if(typeof i!="string")continue;let s=i.match(/\[\[([^|\]]+)/);if((s?s[1]:i)===e)return!0}return!1}a(Og,"hasInstanceClass")});var VP=v(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.parseGroundingDefinitionFromFrontmatter=b8;var _8=pp();function Pg(r){if(typeof r!="string")return"";let e=r.replace(/["'[\]]/g,"").trim(),t=e.indexOf("|");return t>=0?e.slice(0,t).trim():e}a(Pg,"normalizeGroundingRef");function b8(r,e,t){let n=e.exocmd__Grounding_type,i=(()=>{if(typeof n!="string")return n;let S=(0,_8.resolveGroundingTypeFromWikilinkLiteral)(n);if(S!==null)return S;throw new Error(`[exocmd-grounding-type-literal-form] legacy literal-string '${n}' for exocmd__Grounding_type in fixture ${r}. Migrate to wikilink form per RFC 9d20c91f Phase 3.`)})(),s=i==="service_call"?e.exocmd__Grounding_serviceId??e.exocmd__Grounding_targetProperty:e.exocmd__Grounding_targetProperty,o;if(i==="composite"){let S=e.exocmd__Grounding_steps;Array.isArray(S)&&(o=S.map(R=>t(Pg(R))))}let c=e.exocmd__Grounding_incrementBy,l;if(c!=null&&c!==""){let S=Number.parseInt(String(c),10);Number.isFinite(S)&&(l=S)}let u=e.exocmd__Grounding_targetValueRef,f=u?Pg(u):void 0,d=e.exocmd__Grounding_templateRef,p=d?Pg(d):void 0,h=e.exocmd__Grounding_cloneTargetBody,m=h===!0||h==="true",y=e.exocmd__Grounding_targetsCreatedInstance,_=y===!0||y==="true",b=e.exocmd__Grounding_omitLabel,T=b===!0||b==="true",I=e.exocmd__Grounding_targetQuery,E=I?Pg(I):void 0;return{id:r,label:e.exo__Asset_label??"",type:i,targetProperty:s,targetValueRef:f,targetValueLiteral:e.exocmd__Grounding_targetValueLiteral,targetValueSubstitution:e.exocmd__Grounding_targetValueSubstitution,serviceCallPayload:e.exocmd__Grounding_serviceCallPayload,appendExpression:e.exocmd__Grounding_appendExpression,targetClass:e.exocmd__Grounding_targetClass,targetPrototype:e.exocmd__Grounding_targetPrototype,targetFolder:e.exocmd__Grounding_targetFolder,shiftDelta:e.exocmd__Grounding_shiftDelta,incrementBy:l,linkBackProperty:e.exocmd__Grounding_linkBackProperty,bodyTemplate:e.exocmd__Grounding_bodyTemplate,templateRef:p,cloneTargetBody:m,targetsCreatedInstance:_,omitLabel:T,targetQuery:E,steps:o}}a(b8,"parseGroundingDefinitionFromFrontmatter")});var GP=v(Fg=>{"use strict";Object.defineProperty(Fg,"__esModule",{value:!0});Fg.hasPosition=S8;Fg.isFixed=w8;function S8(r){return typeof r.x=="number"&&typeof r.y=="number"}a(S8,"hasPosition");function w8(r){return r.fx!==null&&r.fx!==void 0&&r.fy!==null&&r.fy!==void 0}a(w8,"isFixed")});var qP=v(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});Dg.createEmptyGraphData=E8;Dg.mergeGraphData=v8;function E8(){return{nodes:[],edges:[],lastUpdated:Date.now(),version:0}}a(E8,"createEmptyGraphData");function v8(r,e){let t=new Map,n=new Set,i=[];for(let s of r.nodes)t.set(s.id,s);for(let s of e.nodes)t.set(s.id,s);for(let s of r.edges){let o=`${s.source}->${s.target}:${s.type}`;n.has(o)||(n.add(o),i.push(s))}for(let s of e.edges){let o=`${s.source}->${s.target}:${s.type}`;n.has(o)||(n.add(o),i.push(s))}return{nodes:Array.from(t.values()),edges:i,lastUpdated:Date.now(),version:Math.max(r.version??0,e.version??0)+1}}a(v8,"mergeGraphData")});var _E=v(Lg=>{"use strict";Object.defineProperty(Lg,"__esModule",{value:!0});Lg.createEdgeId=T8;Lg.edgesEqual=A8;function T8(r,e,t,n){let i=n?`|${n}`:"";return`${r}->${e}:${t}${i}`}a(T8,"createEdgeId");function A8(r,e){return r.source===e.source&&r.target===e.target&&r.type===e.type&&r.predicate===e.predicate}a(A8,"edgesEqual")});var bE=v(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.BUILT_IN_EDGE_STYLES=lr.BUILT_IN_NODE_STYLES=lr.DEFAULT_EDGE_STYLE=lr.DEFAULT_NODE_STYLE=lr.RDF_TYPE_PREDICATES=void 0;lr.mergeNodeStyles=I8;lr.mergeEdgeStyles=R8;lr.extractLocalName=C8;lr.isClassType=x8;lr.isTypePredicate=O8;lr.isSubClassPredicate=P8;lr.RDF_TYPE_PREDICATES={RDF_TYPE:"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",RDFS_CLASS:"http://www.w3.org/2000/01/rdf-schema#Class",OWL_CLASS:"http://www.w3.org/2002/07/owl#Class",RDFS_SUBCLASS_OF:"http://www.w3.org/2000/01/rdf-schema#subClassOf",OWL_EQUIVALENT_CLASS:"http://www.w3.org/2002/07/owl#equivalentClass",RDFS_LABEL:"http://www.w3.org/2000/01/rdf-schema#label",RDFS_COMMENT:"http://www.w3.org/2000/01/rdf-schema#comment"};lr.DEFAULT_NODE_STYLE={color:"#6366f1",borderColor:"#4f46e5",borderWidth:2,size:30,shape:"circle",icon:"",opacity:1,shadow:!1,animation:"none"};lr.DEFAULT_EDGE_STYLE={color:"#9ca3af",width:1,lineStyle:"solid",arrow:"standard",curvature:0,opacity:.6,showLabel:!1,labelPosition:.5};lr.BUILT_IN_NODE_STYLES={"http://www.w3.org/2000/01/rdf-schema#Class":{color:"#f59e0b",shape:"diamond",size:40},"http://www.w3.org/2002/07/owl#Class":{color:"#f59e0b",shape:"diamond",size:40},ems__Task:{color:"#22c55e",shape:"circle"},ems__Project:{color:"#3b82f6",shape:"square"},ems__Area:{color:"#8b5cf6",shape:"hexagon",size:40},ems__Meeting:{color:"#ec4899",shape:"circle"},exo__Class:{color:"#f59e0b",shape:"diamond"},person__Person:{color:"#06b6d4",shape:"circle"},ims__Person:{color:"#06b6d4",shape:"circle"}};lr.BUILT_IN_EDGE_STYLES={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":{color:"#f59e0b",lineStyle:"dashed",arrow:"standard"},"http://www.w3.org/2000/01/rdf-schema#subClassOf":{color:"#8b5cf6",width:2,arrow:"triangle"},"https://exocortex.my/ontology/ems#Effort_parent":{color:"#6366f1",width:2,arrow:"standard"},"https://exocortex.my/ontology/exo#Asset_prototype":{color:"#f59e0b",lineStyle:"dashed",arrow:"circle"},"https://exocortex.my/ontology/exo#references":{color:"#22c55e",opacity:.4,arrow:"standard"}};function I8(r,e){return{...r,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}}a(I8,"mergeNodeStyles");function R8(r,e){return{...r,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}}a(R8,"mergeEdgeStyles");function C8(r){let e=r.lastIndexOf("#"),t=r.lastIndexOf("/"),n=Math.max(e,t);return n>=0?r.substring(n+1):r}a(C8,"extractLocalName");function x8(r){return r===lr.RDF_TYPE_PREDICATES.RDFS_CLASS||r===lr.RDF_TYPE_PREDICATES.OWL_CLASS}a(x8,"isClassType");function O8(r){return r===lr.RDF_TYPE_PREDICATES.RDF_TYPE}a(O8,"isTypePredicate");function P8(r){return r===lr.RDF_TYPE_PREDICATES.RDFS_SUBCLASS_OF}a(P8,"isSubClassPredicate")});var HP=v(WP=>{"use strict";Object.defineProperty(WP,"__esModule",{value:!0})});var Le=v(Ng=>{"use strict";Object.defineProperty(Ng,"__esModule",{value:!0});Ng.IRI=void 0;var SE=class r{static{a(this,"IRI")}constructor(e){let t=e.trim();if(t.length===0)throw new Error("IRI cannot be empty");if(!r.isValidIRI(t))throw new Error("Invalid IRI format");this._value=t}get value(){return this._value}equals(e){return this._value===e._value}toString(){return this._value}static isValidIRI(e){if(!e||e.trim().length===0||/\s/.test(e)||!/^[a-z][a-z0-9+.-]*:/i.test(e))return!1;let n=["http","https","ftp","ftps","file","mailto","tel","data","ws","wss","urn","obsidian"],i=e.match(/^([a-z][a-z0-9+.-]*?):/i);if(i){let s=i[1].toLowerCase();if(!n.includes(s))return!1}try{return new URL(e),!0}catch{return/^urn:[a-z0-9][a-z0-9-]{0,31}:[^\s]+$/i.test(e)}}};Ng.IRI=SE});var Ye=v(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.Literal=void 0;tl.parseLanguageTag=zP;tl.createDirectionalLiteral=D8;tl.createLiteralFromLanguageTag=L8;var F8="http://www.w3.org/2001/XMLSchema#string",hp=class{static{a(this,"Literal")}constructor(e,t,n,i){if(e.length===0)throw new Error("Literal value cannot be empty");if(t&&n)throw new Error("Literal cannot have both datatype and language tag");if(i&&!n)throw new Error("Literal cannot have direction without language tag");if(i&&i!=="ltr"&&i!=="rtl")throw new Error('Direction must be "ltr" or "rtl"');this._value=e,this._datatype=t,this._language=n?n.toLowerCase():void 0,this._direction=i}get value(){return this._value}get datatype(){return this._datatype}get language(){return this._language}get direction(){return this._direction}hasDirection(){return this._direction!==void 0}equals(e){if(this._value!==e._value||this._language!==e._language||this._direction!==e._direction)return!1;let t=this.normalizedDatatype(),n=e.normalizedDatatype();return t===n}normalizedDatatype(){return!this._datatype||this._datatype.value===F8?null:this._datatype.value}toString(){let e=`"${this._value}"`;return this._datatype?e+=`^^<${this._datatype.value}>`:this._language&&(e+=`@${this._language}`,this._direction&&(e+=`--${this._direction}`)),e}};tl.Literal=hp;function zP(r){let t=r.lastIndexOf("--");if(t===-1)return{language:r.toLowerCase()};let n=r.substring(t+2),i=r.substring(0,t);return n==="ltr"||n==="rtl"?{language:i.toLowerCase(),direction:n}:{language:r.toLowerCase()}}a(zP,"parseLanguageTag");function D8(r,e,t){return new hp(r,void 0,e,t)}a(D8,"createDirectionalLiteral");function L8(r,e){let{language:t,direction:n}=zP(e);return new hp(r,void 0,t,n)}a(L8,"createLiteralFromLanguageTag")});var rr=v(Mg=>{"use strict";Object.defineProperty(Mg,"__esModule",{value:!0});Mg.BlankNode=void 0;var kg=class r{static{a(this,"BlankNode")}constructor(e){let t=e.trim();if(t.length===0)throw new Error("BlankNode id cannot be empty");this._id=t}get id(){return this._id}equals(e){return this._id===e._id}toString(){return`_:${this._id}`}static generateId(){return`b${++r.counter}`}static create(){return new r(r.generateId())}};Mg.BlankNode=kg;kg.counter=0});var Yt=v(jg=>{"use strict";Object.defineProperty(jg,"__esModule",{value:!0});jg.Namespace=void 0;var KP=Le(),He=class r{static{a(this,"Namespace")}constructor(e,t){if(e.trim().length===0)throw new Error("Namespace prefix cannot be empty");this._prefix=e,this._iri=new KP.IRI(t)}get prefix(){return this._prefix}get iri(){return this._iri}term(e){return new KP.IRI(`${this._iri.value}${e}`)}expand(e){let t=e.split(":");if(t.length!==2)return null;let[n,i]=t;return n!==this._prefix?null:this.term(i)}static forPrefix(e){if(!/^[a-z][a-zA-Z0-9]*$/.test(e))return null;let t=r.KNOWN_NAMESPACES.find(n=>n.prefix===e);return t||new r(e,`${r.EXOCORTEX_ONTOLOGY_BASE}${e}#`)}static fromPropertyKey(e){let t=/^([a-z][a-zA-Z0-9]*)__(.+)$/.exec(e);if(!t)return null;let n=r.forPrefix(t[1]);return n?{namespace:n,localName:t[2]}:null}static fromTermIRI(e){if(typeof e!="string"||e.length===0)return null;let t=a(l=>l.length>0&&!l.includes("#")&&!l.includes("/")?l:null,"cleanLocal");for(let l of r.KNOWN_NAMESPACES){let u=l.iri.value;if(e.startsWith(u)){let f=t(e.slice(u.length));return f===null?null:{namespace:l,localName:f}}}if(!e.startsWith(r.EXOCORTEX_ONTOLOGY_BASE))return null;let n=e.slice(r.EXOCORTEX_ONTOLOGY_BASE.length),i=n.indexOf("#");if(i<=0)return null;let s=n.slice(0,i);if(!/^[a-z][a-zA-Z0-9]*$/.test(s))return null;let o=t(n.slice(i+1));if(o===null)return null;let c=r.forPrefix(s);return c?{namespace:c,localName:o}:null}static knownNamespaces(){return r.KNOWN_NAMESPACES}};jg.Namespace=He;He.RDF=new He("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");He.RDFS=new He("rdfs","http://www.w3.org/2000/01/rdf-schema#");He.OWL=new He("owl","http://www.w3.org/2002/07/owl#");He.XSD=new He("xsd","http://www.w3.org/2001/XMLSchema#");He.SHACL=new He("sh","http://www.w3.org/ns/shacl#");He.EXO=new He("exo","https://exocortex.my/ontology/exo#");He.EMS=new He("ems","https://exocortex.my/ontology/ems#");He.EXOCMD=new He("exocmd","https://exocortex.my/ontology/exocmd#");He.IMS=new He("ims","https://exocortex.my/ontology/ims#");He.ZTLK=new He("ztlk","https://exocortex.my/ontology/ztlk#");He.PTMS=new He("ptms","https://exocortex.my/ontology/ptms#");He.LIT=new He("lit","https://exocortex.my/ontology/lit#");He.INBOX=new He("inbox","https://exocortex.my/ontology/inbox#");He.PMBOK=new He("pmbok","https://exocortex.my/ontology/pmbok#");He.EXOCORTEX_ONTOLOGY_BASE="https://exocortex.my/ontology/";He.KNOWN_NAMESPACES=[He.EXO,He.EMS,He.EXOCMD,He.IMS,He.ZTLK,He.PTMS,He.LIT,He.INBOX,He.PMBOK,He.RDF,He.RDFS,He.OWL,He.XSD,He.SHACL]});var hi=v($g=>{"use strict";Object.defineProperty($g,"__esModule",{value:!0});$g.Triple=void 0;var wE=Le(),EE=Ye(),vE=rr(),TE=class{static{a(this,"Triple")}constructor(e,t,n){this._subject=e,this._predicate=t,this._object=n}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}equals(e){return!(!this.equalsNode(this._subject,e._subject)||!this._predicate.equals(e._predicate)||!this.equalsNode(this._object,e._object))}equalsNode(e,t){return e instanceof wE.IRI&&t instanceof wE.IRI||e instanceof vE.BlankNode&&t instanceof vE.BlankNode||e instanceof EE.Literal&&t instanceof EE.Literal||this.isQuotedTriple(e)&&this.isQuotedTriple(t)?e.equals(t):!1}isQuotedTriple(e){return typeof e=="object"&&e!==null&&"termType"in e&&e.termType==="QuotedTriple"}toString(){let e=this.nodeToString(this._subject),t=`<${this._predicate.value}>`,n=this.nodeToString(this._object);return`${e} ${t} ${n} .`}nodeToString(e){return e instanceof wE.IRI?`<${e.value}>`:e instanceof vE.BlankNode||e instanceof EE.Literal||this.isQuotedTriple(e)?e.toString():""}};$g.Triple=TE});var mp=v(Ug=>{"use strict";Object.defineProperty(Ug,"__esModule",{value:!0});Ug.QuotedTriple=void 0;var AE=Le(),IE=Ye(),RE=rr(),CE=class r{static{a(this,"QuotedTriple")}constructor(e,t,n){this._subject=e,this._predicate=t,this._object=n}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}equals(e){return!(!this.equalsNode(this._subject,e._subject)||!this._predicate.equals(e._predicate)||!this.equalsNode(this._object,e._object))}equalsNode(e,t){return e instanceof AE.IRI&&t instanceof AE.IRI||e instanceof RE.BlankNode&&t instanceof RE.BlankNode||e instanceof IE.Literal&&t instanceof IE.Literal||e instanceof r&&t instanceof r?e.equals(t):!1}get termType(){return"QuotedTriple"}toString(){let e=this.nodeToString(this._subject),t=`<${this._predicate.value}>`,n=this.nodeToString(this._object);return`<< ${e} ${t} ${n} >>`}nodeToString(e){return e instanceof AE.IRI?`<${e.value}>`:e instanceof RE.BlankNode||e instanceof IE.Literal||e instanceof r?e.toString():""}};Ug.QuotedTriple=CE});var YP=v(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.QuotedTriple=Ir.Triple=Ir.Namespace=Ir.BlankNode=Ir.createLiteralFromLanguageTag=Ir.createDirectionalLiteral=Ir.parseLanguageTag=Ir.Literal=Ir.IRI=void 0;var N8=Le();Object.defineProperty(Ir,"IRI",{enumerable:!0,get:a(function(){return N8.IRI},"get")});var Bg=Ye();Object.defineProperty(Ir,"Literal",{enumerable:!0,get:a(function(){return Bg.Literal},"get")});Object.defineProperty(Ir,"parseLanguageTag",{enumerable:!0,get:a(function(){return Bg.parseLanguageTag},"get")});Object.defineProperty(Ir,"createDirectionalLiteral",{enumerable:!0,get:a(function(){return Bg.createDirectionalLiteral},"get")});Object.defineProperty(Ir,"createLiteralFromLanguageTag",{enumerable:!0,get:a(function(){return Bg.createLiteralFromLanguageTag},"get")});var k8=rr();Object.defineProperty(Ir,"BlankNode",{enumerable:!0,get:a(function(){return k8.BlankNode},"get")});var M8=Yt();Object.defineProperty(Ir,"Namespace",{enumerable:!0,get:a(function(){return M8.Namespace},"get")});var j8=hi();Object.defineProperty(Ir,"Triple",{enumerable:!0,get:a(function(){return j8.Triple},"get")});var $8=mp();Object.defineProperty(Ir,"QuotedTriple",{enumerable:!0,get:a(function(){return $8.QuotedTriple},"get")})});var Vg=v(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.UUID_URL_NAMESPACE=Yi.DEFAULT_LANGUAGE_TAG=Yi.REQUIRED_PROPERTIES=Yi.ALLOWED_PROPERTIES=Yi.Exo003MetadataType=void 0;var Ki;(function(r){r.Namespace="namespace",r.Anchor="anchor",r.BlankNode="blank_node",r.Statement="statement",r.Body="body"})(Ki||(Yi.Exo003MetadataType=Ki={}));Yi.ALLOWED_PROPERTIES={[Ki.Namespace]:["metadata","uri","aliases"],[Ki.Anchor]:["metadata","uri","aliases"],[Ki.BlankNode]:["metadata","uri","aliases"],[Ki.Statement]:["metadata","subject","predicate","object","aliases"],[Ki.Body]:["metadata","subject","predicate","aliases"]};Yi.REQUIRED_PROPERTIES={[Ki.Namespace]:["metadata","uri"],[Ki.Anchor]:["metadata","uri"],[Ki.BlankNode]:["metadata","uri"],[Ki.Statement]:["metadata","subject","predicate","object"],[Ki.Body]:["metadata","subject","predicate"]};Yi.DEFAULT_LANGUAGE_TAG="ru";Yi.UUID_URL_NAMESPACE="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});var QP=v(xE=>{"use strict";Object.defineProperty(xE,"__esModule",{value:!0});xE.default="ffffffff-ffff-ffff-ffff-ffffffffffff"});var XP=v(OE=>{"use strict";Object.defineProperty(OE,"__esModule",{value:!0});OE.default="00000000-0000-0000-0000-000000000000"});var JP=v(PE=>{"use strict";Object.defineProperty(PE,"__esModule",{value:!0});PE.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});var gp=v(FE=>{"use strict";Object.defineProperty(FE,"__esModule",{value:!0});var U8=JP();function B8(r){return typeof r=="string"&&U8.default.test(r)}a(B8,"validate");FE.default=B8});var yp=v(DE=>{"use strict";Object.defineProperty(DE,"__esModule",{value:!0});var V8=gp();function G8(r){if(!(0,V8.default)(r))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(r.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(r.slice(9,13),16))>>>8,e&255,(e=parseInt(r.slice(14,18),16))>>>8,e&255,(e=parseInt(r.slice(19,23),16))>>>8,e&255,(e=parseInt(r.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}a(G8,"parse");DE.default=G8});var Bo=v(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.unsafeStringify=void 0;var q8=gp(),fn=[];for(let r=0;r<256;++r)fn.push((r+256).toString(16).slice(1));function ZP(r,e=0){return(fn[r[e+0]]+fn[r[e+1]]+fn[r[e+2]]+fn[r[e+3]]+"-"+fn[r[e+4]]+fn[r[e+5]]+"-"+fn[r[e+6]]+fn[r[e+7]]+"-"+fn[r[e+8]]+fn[r[e+9]]+"-"+fn[r[e+10]]+fn[r[e+11]]+fn[r[e+12]]+fn[r[e+13]]+fn[r[e+14]]+fn[r[e+15]]).toLowerCase()}a(ZP,"unsafeStringify");_p.unsafeStringify=ZP;function W8(r,e=0){let t=ZP(r,e);if(!(0,q8.default)(t))throw TypeError("Stringified UUID is invalid");return t}a(W8,"stringify");_p.default=W8});var Wg=v(LE=>{"use strict";Object.defineProperty(LE,"__esModule",{value:!0});var H8=require("crypto"),qg=new Uint8Array(256),Gg=qg.length;function z8(){return Gg>qg.length-16&&((0,H8.randomFillSync)(qg),Gg=0),qg.slice(Gg,Gg+=16)}a(z8,"rng");LE.default=z8});var NE=v(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.updateV1State=void 0;var e3=Wg(),K8=Bo(),bp={};function Y8(r,e,t){let n,i=r?._v6??!1;if(r){let s=Object.keys(r);s.length===1&&s[0]==="_v6"&&(r=void 0)}if(r)n=t3(r.random??r.rng?.()??(0,e3.default)(),r.msecs,r.nsecs,r.clockseq,r.node,e,t);else{let s=Date.now(),o=(0,e3.default)();r3(bp,s,o),n=t3(o,bp.msecs,bp.nsecs,i?void 0:bp.clockseq,i?void 0:bp.node,e,t)}return e??(0,K8.unsafeStringify)(n)}a(Y8,"v1");function r3(r,e,t){return r.msecs??=-1/0,r.nsecs??=0,e===r.msecs?(r.nsecs++,r.nsecs>=1e4&&(r.node=void 0,r.nsecs=0)):e>r.msecs?r.nsecs=0:e<r.msecs&&(r.node=void 0),r.node||(r.node=t.slice(10,16),r.node[0]|=1,r.clockseq=(t[8]<<8|t[9])&16383),r.msecs=e,r}a(r3,"updateV1State");Sp.updateV1State=r3;function t3(r,e,t,n,i,s,o=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),o=0;else if(o<0||o+16>s.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);e??=Date.now(),t??=0,n??=(r[8]<<8|r[9])&16383,i??=r.slice(10,16),e+=122192928e5;let c=((e&268435455)*1e4+t)%4294967296;s[o++]=c>>>24&255,s[o++]=c>>>16&255,s[o++]=c>>>8&255,s[o++]=c&255;let l=e/4294967296*1e4&268435455;s[o++]=l>>>8&255,s[o++]=l&255,s[o++]=l>>>24&15|16,s[o++]=l>>>16&255,s[o++]=n>>>8|128,s[o++]=n&255;for(let u=0;u<6;++u)s[o++]=i[u];return s}a(t3,"v1Bytes");Sp.default=Y8});var ME=v(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});var Q8=yp(),X8=Bo();function J8(r){let e=typeof r=="string"?(0,Q8.default)(r):r,t=Z8(e);return typeof r=="string"?(0,X8.unsafeStringify)(t):t}a(J8,"v1ToV6");kE.default=J8;function Z8(r){return Uint8Array.of((r[6]&15)<<4|r[7]>>4&15,(r[7]&15)<<4|(r[4]&240)>>4,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,(r[1]&15)<<4|(r[2]&240)>>4,96|r[2]&15,r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}a(Z8,"_v1ToV6")});var n3=v(jE=>{"use strict";Object.defineProperty(jE,"__esModule",{value:!0});var eV=require("crypto");function tV(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),(0,eV.createHash)("md5").update(r).digest()}a(tV,"md5");jE.default=tV});var wp=v(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.URL=Vo.DNS=Vo.stringToBytes=void 0;var i3=yp(),rV=Bo();function s3(r){r=unescape(encodeURIComponent(r));let e=new Uint8Array(r.length);for(let t=0;t<r.length;++t)e[t]=r.charCodeAt(t);return e}a(s3,"stringToBytes");Vo.stringToBytes=s3;Vo.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Vo.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function nV(r,e,t,n,i,s){let o=typeof t=="string"?s3(t):t,c=typeof n=="string"?(0,i3.default)(n):n;if(typeof n=="string"&&(n=(0,i3.default)(n)),n?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+o.length);if(l.set(c),l.set(o,c.length),l=e(l),l[6]=l[6]&15|r,l[8]=l[8]&63|128,i){if(s=s||0,s<0||s+16>i.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let u=0;u<16;++u)i[s+u]=l[u];return i}return(0,rV.unsafeStringify)(l)}a(nV,"v35");Vo.default=nV});var a3=v(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.URL=rl.DNS=void 0;var iV=n3(),$E=wp(),o3=wp();Object.defineProperty(rl,"DNS",{enumerable:!0,get:a(function(){return o3.DNS},"get")});Object.defineProperty(rl,"URL",{enumerable:!0,get:a(function(){return o3.URL},"get")});function UE(r,e,t,n){return(0,$E.default)(48,iV.default,r,e,t,n)}a(UE,"v3");UE.DNS=$E.DNS;UE.URL=$E.URL;rl.default=UE});var c3=v(BE=>{"use strict";Object.defineProperty(BE,"__esModule",{value:!0});var sV=require("crypto");BE.default={randomUUID:sV.randomUUID}});var u3=v(VE=>{"use strict";Object.defineProperty(VE,"__esModule",{value:!0});var l3=c3(),oV=Wg(),aV=Bo();function cV(r,e,t){if(l3.default.randomUUID&&!e&&!r)return l3.default.randomUUID();r=r||{};let n=r.random??r.rng?.()??(0,oV.default)();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[t+i]=n[i];return e}return(0,aV.unsafeStringify)(n)}a(cV,"v4");VE.default=cV});var f3=v(GE=>{"use strict";Object.defineProperty(GE,"__esModule",{value:!0});var lV=require("crypto");function uV(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),(0,lV.createHash)("sha1").update(r).digest()}a(uV,"sha1");GE.default=uV});var p3=v(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.URL=nl.DNS=void 0;var fV=f3(),qE=wp(),d3=wp();Object.defineProperty(nl,"DNS",{enumerable:!0,get:a(function(){return d3.DNS},"get")});Object.defineProperty(nl,"URL",{enumerable:!0,get:a(function(){return d3.URL},"get")});function WE(r,e,t,n){return(0,qE.default)(80,fV.default,r,e,t,n)}a(WE,"v5");WE.DNS=qE.DNS;WE.URL=qE.URL;nl.default=WE});var h3=v(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:!0});var dV=Bo(),pV=NE(),hV=ME();function mV(r,e,t){r??={},t??=0;let n=(0,pV.default)({...r,_v6:!0},new Uint8Array(16));if(n=(0,hV.default)(n),e){if(t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let i=0;i<16;i++)e[t+i]=n[i];return e}return(0,dV.unsafeStringify)(n)}a(mV,"v6");HE.default=mV});var m3=v(zE=>{"use strict";Object.defineProperty(zE,"__esModule",{value:!0});var gV=yp(),yV=Bo();function _V(r){let e=typeof r=="string"?(0,gV.default)(r):r,t=bV(e);return typeof r=="string"?(0,yV.unsafeStringify)(t):t}a(_V,"v6ToV1");zE.default=_V;function bV(r){return Uint8Array.of((r[3]&15)<<4|r[4]>>4&15,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|r[6]&15,r[7],(r[1]&15)<<4|(r[2]&240)>>4,(r[2]&15)<<4|(r[3]&240)>>4,16|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}a(bV,"_v6ToV1")});var b3=v(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.updateV7State=void 0;var g3=Wg(),SV=Bo(),KE={};function wV(r,e,t){let n;if(r)n=y3(r.random??r.rng?.()??(0,g3.default)(),r.msecs,r.seq,e,t);else{let i=Date.now(),s=(0,g3.default)();_3(KE,i,s),n=y3(s,KE.msecs,KE.seq,e,t)}return e??(0,SV.unsafeStringify)(n)}a(wV,"v7");function _3(r,e,t){return r.msecs??=-1/0,r.seq??=0,e>r.msecs?(r.seq=t[6]<<23|t[7]<<16|t[8]<<8|t[9],r.msecs=e):(r.seq=r.seq+1|0,r.seq===0&&r.msecs++),r}a(_3,"updateV7State");Ep.updateV7State=_3;function y3(r,e,t,n,i=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return e??=Date.now(),t??=r[6]*127<<24|r[7]<<16|r[8]<<8|r[9],n[i++]=e/1099511627776&255,n[i++]=e/4294967296&255,n[i++]=e/16777216&255,n[i++]=e/65536&255,n[i++]=e/256&255,n[i++]=e&255,n[i++]=112|t>>>28&15,n[i++]=t>>>20&255,n[i++]=128|t>>>14&63,n[i++]=t>>>6&255,n[i++]=t<<2&255|r[10]&3,n[i++]=r[11],n[i++]=r[12],n[i++]=r[13],n[i++]=r[14],n[i++]=r[15],n}a(y3,"v7Bytes");Ep.default=wV});var S3=v(YE=>{"use strict";Object.defineProperty(YE,"__esModule",{value:!0});var EV=gp();function vV(r){if(!(0,EV.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}a(vV,"version");YE.default=vV});var il=v(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.version=Rt.validate=Rt.v7=Rt.v6ToV1=Rt.v6=Rt.v5=Rt.v4=Rt.v3=Rt.v1ToV6=Rt.v1=Rt.stringify=Rt.parse=Rt.NIL=Rt.MAX=void 0;var TV=QP();Object.defineProperty(Rt,"MAX",{enumerable:!0,get:a(function(){return TV.default},"get")});var AV=XP();Object.defineProperty(Rt,"NIL",{enumerable:!0,get:a(function(){return AV.default},"get")});var IV=yp();Object.defineProperty(Rt,"parse",{enumerable:!0,get:a(function(){return IV.default},"get")});var RV=Bo();Object.defineProperty(Rt,"stringify",{enumerable:!0,get:a(function(){return RV.default},"get")});var CV=NE();Object.defineProperty(Rt,"v1",{enumerable:!0,get:a(function(){return CV.default},"get")});var xV=ME();Object.defineProperty(Rt,"v1ToV6",{enumerable:!0,get:a(function(){return xV.default},"get")});var OV=a3();Object.defineProperty(Rt,"v3",{enumerable:!0,get:a(function(){return OV.default},"get")});var PV=u3();Object.defineProperty(Rt,"v4",{enumerable:!0,get:a(function(){return PV.default},"get")});var FV=p3();Object.defineProperty(Rt,"v5",{enumerable:!0,get:a(function(){return FV.default},"get")});var DV=h3();Object.defineProperty(Rt,"v6",{enumerable:!0,get:a(function(){return DV.default},"get")});var LV=m3();Object.defineProperty(Rt,"v6ToV1",{enumerable:!0,get:a(function(){return LV.default},"get")});var NV=b3();Object.defineProperty(Rt,"v7",{enumerable:!0,get:a(function(){return NV.default},"get")});var kV=gp();Object.defineProperty(Rt,"validate",{enumerable:!0,get:a(function(){return kV.default},"get")});var MV=S3();Object.defineProperty(Rt,"version",{enumerable:!0,get:a(function(){return MV.default},"get")})});var JE=v(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});Hg.Exo003UUIDGenerator=void 0;var QE=il(),w3=Vg(),XE=class{static{a(this,"Exo003UUIDGenerator")}static generateNamespaceUUID(e){if(!e||e.trim().length===0)throw new Error("Namespace URI cannot be empty");return(0,QE.v5)(e,w3.UUID_URL_NAMESPACE)}static generateAssetUUID(e,t){if(!t||t.trim().length===0)throw new Error("Local identifier cannot be empty");let n=this.generateNamespaceUUID(e);return(0,QE.v5)(t,n)}static generateFromIRI(e){if(!e||e.trim().length===0)throw new Error("IRI cannot be empty");let{namespace:t,localName:n}=this.splitIRI(e);return n?this.generateAssetUUID(t,n):(0,QE.v5)(e,w3.UUID_URL_NAMESPACE)}static generateBlankNodeUUID(e,t){if(!e||e.trim().length===0)throw new Error("Blank node ID cannot be empty");let n="urn:exocortex:blank-node:",i=t?`${t}#${e}`:e;return this.generateAssetUUID(n,i)}static generateStatementUUID(e,t,n){if(!e||!t||!n)throw new Error("Subject, predicate, and object cannot be empty");let i="urn:exocortex:statement:",s=`${e} ${t} ${n}`;return this.generateAssetUUID(i,s)}static generateBodyUUID(e,t){let n="urn:exocortex:body:",i=e;return t?.datatype?i+=`^^${t.datatype}`:t?.language&&(i+=`@${t.language}`,t.direction&&(i+=`--${t.direction}`)),this.generateAssetUUID(n,i)}static splitIRI(e){let t=e.lastIndexOf("#");if(t!==-1&&t<e.length-1)return{namespace:e.substring(0,t+1),localName:e.substring(t+1)};let n=e.lastIndexOf("/"),i=e.indexOf("://");return n!==-1&&n>i+2&&n<e.length-1?{namespace:e.substring(0,n+1),localName:e.substring(n+1)}:{namespace:e,localName:""}}static isValidUUID(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}};Hg.Exo003UUIDGenerator=XE});var v3=v(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});Kg.Exo003Parser=void 0;var Nt=Vg(),vp=JE(),Wa=Le(),zg=Ye(),E3=rr(),jV=hi(),ZE=class{static{a(this,"Exo003Parser")}static parse(e,t){let n=this.validate(e);if(!n.valid)return{success:!1,errors:n.errors};let i=e.metadata;try{return{success:!0,metadata:this.parseByType(e,i),bodyContent:i===Nt.Exo003MetadataType.Body?t:void 0}}catch(s){return{success:!1,errors:[s instanceof Error?s.message:String(s)]}}}static validate(e){let t=[],n=[];if(!e.metadata)return t.push("Missing required property: metadata"),{valid:!1,errors:t,warnings:n};let i=e.metadata;if(!Object.values(Nt.Exo003MetadataType).includes(i))return t.push(`Invalid metadata: ${i}. Valid types: ${Object.values(Nt.Exo003MetadataType).join(", ")}`),{valid:!1,errors:t,warnings:n};let s=i,o=Nt.ALLOWED_PROPERTIES[s],c=Nt.REQUIRED_PROPERTIES[s];for(let l of c)(e[l]===void 0||e[l]===null)&&t.push(`Missing required property: ${l}`);for(let l of Object.keys(e))o.includes(l)||t.push(`Forbidden property for ${s}: ${l}`);switch(s){case Nt.Exo003MetadataType.Namespace:this.validateNamespaceMetadata(e,t);break;case Nt.Exo003MetadataType.Anchor:this.validateAnchorMetadata(e,t);break;case Nt.Exo003MetadataType.BlankNode:this.validateBlankNodeMetadata(e,t);break;case Nt.Exo003MetadataType.Statement:this.validateStatementMetadata(e,t);break;case Nt.Exo003MetadataType.Body:this.validateBodyMetadata(e,t,n);break}return{valid:t.length===0,errors:t,warnings:n}}static parseByType(e,t){let n={metadata:t,aliases:e.aliases};switch(t){case Nt.Exo003MetadataType.Namespace:return{...n,metadata:Nt.Exo003MetadataType.Namespace,uri:e.uri};case Nt.Exo003MetadataType.Anchor:return{...n,metadata:Nt.Exo003MetadataType.Anchor,uri:e.uri};case Nt.Exo003MetadataType.BlankNode:return{...n,metadata:Nt.Exo003MetadataType.BlankNode,uri:e.uri};case Nt.Exo003MetadataType.Statement:return{...n,metadata:Nt.Exo003MetadataType.Statement,subject:e.subject,predicate:e.predicate,object:e.object};case Nt.Exo003MetadataType.Body:return{...n,metadata:Nt.Exo003MetadataType.Body,subject:e.subject,predicate:e.predicate}}}static validateNamespaceMetadata(e,t){let n=e.uri;if(n&&typeof n!="string")t.push("uri must be a string");else if(n)try{new Wa.IRI(n)}catch{t.push(`uri is not a valid IRI: ${String(n)}`)}}static validateAnchorMetadata(e,t){let n=e.uri;if(n&&typeof n!="string")t.push("uri must be a string");else if(n)try{new Wa.IRI(n)}catch{t.push(`uri is not a valid IRI: ${String(n)}`)}}static validateBlankNodeMetadata(e,t){let n=e.uri;if(n&&typeof n!="string")t.push("uri must be a string");else if(n){let i=n;if(!i.startsWith("_:"))try{new Wa.IRI(i)}catch{t.push(`uri is not a valid IRI or blank node identifier: ${String(n)}`)}}}static validateStatementMetadata(e,t){let n=e.subject,i=e.predicate,s=e.object,o=[["subject",n],["predicate",i],["object",s]];for(let[c,l]of o)l&&typeof l!="string"&&t.push(`${c} must be a string`)}static validateBodyMetadata(e,t,n){let i=e.subject,s=e.predicate;i&&typeof i!="string"&&t.push("subject must be a string"),s&&typeof s!="string"&&t.push("predicate must be a string")}static toTriple(e,t,n){let i=t(e.subject),s;if(i.type==="iri")s=new Wa.IRI(i.value);else if(i.type==="blank")s=new E3.BlankNode(i.value);else throw new Error("Statement subject cannot be a literal");let o=t(e.predicate);if(o.type!=="iri")throw new Error("Statement predicate must be an IRI");let c=new Wa.IRI(o.value),l=t(e.object),u;if(l.type==="iri")u=new Wa.IRI(l.value);else if(l.type==="blank")u=new E3.BlankNode(l.value);else{let f=n||l.value;if(l.datatype)u=new zg.Literal(f,new Wa.IRI(l.datatype));else{let d=l.language||Nt.DEFAULT_LANGUAGE_TAG;u=(0,zg.createDirectionalLiteral)(f,d,l.direction)}}return new jV.Triple(s,c,u)}static toLiteral(e,t,n){if(n?.datatype)return new zg.Literal(t,new Wa.IRI(n.datatype));let i=n?.language||Nt.DEFAULT_LANGUAGE_TAG;return(0,zg.createDirectionalLiteral)(t,i,n?.direction)}static isExo003Format(e){let t=e.metadata;return typeof t=="string"&&Object.values(Nt.Exo003MetadataType).includes(t)}static generateUUID(e,t){switch(e.metadata){case Nt.Exo003MetadataType.Namespace:return vp.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case Nt.Exo003MetadataType.Anchor:return vp.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case Nt.Exo003MetadataType.BlankNode:return vp.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case Nt.Exo003MetadataType.Statement:{let n=e;return vp.Exo003UUIDGenerator.generateStatementUUID(n.subject,n.predicate,n.object)}case Nt.Exo003MetadataType.Body:{let n=e;return vp.Exo003UUIDGenerator.generateBodyUUID(n.subject+"|"+n.predicate)}}}};Kg.Exo003Parser=ZE});var ev=v(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.Exo003Parser=An.Exo003UUIDGenerator=An.UUID_URL_NAMESPACE=An.DEFAULT_LANGUAGE_TAG=An.REQUIRED_PROPERTIES=An.ALLOWED_PROPERTIES=An.Exo003MetadataType=void 0;var Tp=Vg();Object.defineProperty(An,"Exo003MetadataType",{enumerable:!0,get:a(function(){return Tp.Exo003MetadataType},"get")});Object.defineProperty(An,"ALLOWED_PROPERTIES",{enumerable:!0,get:a(function(){return Tp.ALLOWED_PROPERTIES},"get")});Object.defineProperty(An,"REQUIRED_PROPERTIES",{enumerable:!0,get:a(function(){return Tp.REQUIRED_PROPERTIES},"get")});Object.defineProperty(An,"DEFAULT_LANGUAGE_TAG",{enumerable:!0,get:a(function(){return Tp.DEFAULT_LANGUAGE_TAG},"get")});Object.defineProperty(An,"UUID_URL_NAMESPACE",{enumerable:!0,get:a(function(){return Tp.UUID_URL_NAMESPACE},"get")});var $V=JE();Object.defineProperty(An,"Exo003UUIDGenerator",{enumerable:!0,get:a(function(){return $V.Exo003UUIDGenerator},"get")});var UV=v3();Object.defineProperty(An,"Exo003Parser",{enumerable:!0,get:a(function(){return UV.Exo003Parser},"get")})});var eo=v(Yg=>{"use strict";Object.defineProperty(Yg,"__esModule",{value:!0});Yg.WikiLinkHelpers=void 0;var Ap=class{static{a(this,"WikiLinkHelpers")}static normalize(e){if(!e)return"";let t=e.replace(this.WIKI_LINK_PATTERN,"").trim();if(!t)return"";let n=t.indexOf("|");if(n===-1)return t;let i=t.substring(0,n).trim(),s=t.substring(n+1).trim();return this.UUID_PATTERN.test(i)&&s||i}static normalizeArray(e){return e?(Array.isArray(e)?e:[e]).map(n=>this.normalize(n)).filter(n=>n.length>0):[]}static equals(e,t){return this.normalize(e)===this.normalize(t)}static includes(e,t){let n=this.normalizeArray(e),i=this.normalize(t);return n.includes(i)}static resolveSymbolic(e,t){let n=this.normalize(e);if(!n)return"";if(this.UUID_PATTERN.test(n)){let i=t(n);return i&&i.length>0?i:n}return n}static resolveSymbolicArray(e,t){return e?(Array.isArray(e)?e:[e]).map(i=>this.resolveSymbolic(i,t)).filter(i=>i.length>0):[]}};Yg.WikiLinkHelpers=Ap;Ap.WIKI_LINK_PATTERN=/\[\[|\]\]/g;Ap.UUID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i});var Rp=v(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.CommandBindingProperty=lt.GroundingProperty=lt.PreconditionProperty=lt.CommandProperty=lt.resolveGroundingTypeFromWikilinkLiteral=lt.resolveGroundingTypeFromIRI=lt.GROUNDING_TYPE_IRI_TO_ENUM=lt.GROUNDING_TYPE_UID_TO_ENUM=lt.GROUNDING_TYPE_UIDS=lt.GroundingType=lt.EFFORT_STATUS_OPTIONS=lt.normalizeEffortStatus=lt.EFFORT_STATUS_BY_UID=lt.EFFORT_STATUS_UID=lt.EffortStatus=lt.AssetClass=void 0;var BV=Zc();Object.defineProperty(lt,"AssetClass",{enumerable:!0,get:a(function(){return BV.AssetClass},"get")});var VV=el();Object.defineProperty(lt,"EffortStatus",{enumerable:!0,get:a(function(){return VV.EffortStatus},"get")});var tv=Au();Object.defineProperty(lt,"EFFORT_STATUS_UID",{enumerable:!0,get:a(function(){return tv.EFFORT_STATUS_UID},"get")});Object.defineProperty(lt,"EFFORT_STATUS_BY_UID",{enumerable:!0,get:a(function(){return tv.EFFORT_STATUS_BY_UID},"get")});Object.defineProperty(lt,"normalizeEffortStatus",{enumerable:!0,get:a(function(){return tv.normalizeEffortStatus},"get")});var GV=hE();Object.defineProperty(lt,"EFFORT_STATUS_OPTIONS",{enumerable:!0,get:a(function(){return GV.EFFORT_STATUS_OPTIONS},"get")});var qV=qa();Object.defineProperty(lt,"GroundingType",{enumerable:!0,get:a(function(){return qV.GroundingType},"get")});var Ip=pp();Object.defineProperty(lt,"GROUNDING_TYPE_UIDS",{enumerable:!0,get:a(function(){return Ip.GROUNDING_TYPE_UIDS},"get")});Object.defineProperty(lt,"GROUNDING_TYPE_UID_TO_ENUM",{enumerable:!0,get:a(function(){return Ip.GROUNDING_TYPE_UID_TO_ENUM},"get")});Object.defineProperty(lt,"GROUNDING_TYPE_IRI_TO_ENUM",{enumerable:!0,get:a(function(){return Ip.GROUNDING_TYPE_IRI_TO_ENUM},"get")});Object.defineProperty(lt,"resolveGroundingTypeFromIRI",{enumerable:!0,get:a(function(){return Ip.resolveGroundingTypeFromIRI},"get")});Object.defineProperty(lt,"resolveGroundingTypeFromWikilinkLiteral",{enumerable:!0,get:a(function(){return Ip.resolveGroundingTypeFromWikilinkLiteral},"get")});var Qg=mE();Object.defineProperty(lt,"CommandProperty",{enumerable:!0,get:a(function(){return Qg.CommandProperty},"get")});Object.defineProperty(lt,"PreconditionProperty",{enumerable:!0,get:a(function(){return Qg.PreconditionProperty},"get")});Object.defineProperty(lt,"GroundingProperty",{enumerable:!0,get:a(function(){return Qg.GroundingProperty},"get")});Object.defineProperty(lt,"CommandBindingProperty",{enumerable:!0,get:a(function(){return Qg.CommandBindingProperty},"get")})});var R3=v(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.hasClass=ol;In.isAreaOrProject=WV;In.isEffort=HV;In.hasStatus=zV;In.isAssetArchived=KV;In.hasEmptyProperties=YV;In.needsFolderRepair=QV;In.getTodayDateString=rv;In.isPlannedForToday=XV;In.hasPlannedStartTimestamp=JV;In.extractDailyNoteDate=ZV;In.isCurrentDateGteDay=eG;In.inheritsFromPrototype=I3;In.isPrototypeClass=rG;var A3=eo(),sl=Rp();function ol(r,e){return r?(Array.isArray(r)?r:[r]).some(n=>A3.WikiLinkHelpers.normalize(n)===e):!1}a(ol,"hasClass");function WV(r){return ol(r,sl.AssetClass.AREA)||ol(r,sl.AssetClass.PROJECT)}a(WV,"isAreaOrProject");function HV(r){return ol(r,sl.AssetClass.TASK)||ol(r,sl.AssetClass.PROJECT)||ol(r,sl.AssetClass.MEETING)}a(HV,"isEffort");function zV(r,e){if(!r)return!1;let t=Array.isArray(r)?r[0]:r;return t?A3.WikiLinkHelpers.normalize(t)===e:!1}a(zV,"hasStatus");function KV(r){if(r===!0||r===1)return!0;if(typeof r=="string"){let e=r.toLowerCase();return e==="true"||e==="yes"}return!1}a(KV,"isAssetArchived");function YV(r){if(!r||Object.keys(r).length===0)return!1;let e=a(t=>t==null||t==="","isEmptyArrayItem");return Object.values(r).some(t=>t==null?!0:typeof t=="string"?t==="":Array.isArray(t)?t.length===0||t.every(e):typeof t=="object"&&Object.keys(t).length===0)}a(YV,"hasEmptyProperties");function QV(r,e){if(!e)return!1;let t=r.replace(/\/$/,""),n=e.replace(/\/$/,"");return t!==n}a(QV,"needsFolderRepair");function rv(){let r=new Date,e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`}a(rv,"getTodayDateString");function XV(r){let e=r.ems__Effort_plannedStartTimestamp;if(!e)return!1;let t=rv();return typeof e=="string"?e.split("T")[0]===t:Array.isArray(e)&&e.length>0?String(e[0]).split("T")[0]===t:!1}a(XV,"isPlannedForToday");function JV(r){let e=r.ems__Effort_plannedStartTimestamp;return e?typeof e=="string"?e.trim().length>0:Array.isArray(e)&&e.length>0?String(e[0]).trim().length>0:!1:!1}a(JV,"hasPlannedStartTimestamp");function ZV(r){let e=r.pn__DailyNote_day;if(!e)return null;if(typeof e=="string"){let t=e.match(/\[\[([^\[\]]+)\]\]/);return t?t[1]:e}if(Array.isArray(e)&&e.length>0){let t=String(e[0]),n=t.match(/\[\[([^\[\]]+)\]\]/);return n?n[1]:t}return null}a(ZV,"extractDailyNoteDate");function eG(r){return rv()>=r}a(eG,"isCurrentDateGteDay");function T3(r){return r?r.replace(/^["']|["']$/g,"").replace(/\[\[|\]\]/g,"").trim():""}a(T3,"normalizeWithQuotes");var tG=10;function I3(r,e=tG){let t=r.exo__Class_superClass;if(!t)return!1;let n=new Set,i=[],s=Array.isArray(t)?t:[t];for(let o of s){let c=T3(o);c&&i.push({className:c,depth:0})}for(;i.length>0;){let o=i.shift();if(!o)continue;let{className:c,depth:l}=o;if(l>e)continue;if(c===sl.AssetClass.PROTOTYPE)return!0;if(n.has(c))continue;n.add(c);let u=`${c}__exo__Class_superClass`,f=r[u];if(f){let d=Array.isArray(f)?f:[f];for(let p of d){let h=T3(p);h&&!n.has(h)&&i.push({className:h,depth:l+1})}}}return!1}a(I3,"inheritsFromPrototype");function rG(r,e){return ol(r,sl.AssetClass.CLASS)?I3(e):!1}a(rG,"isPrototypeClass")});var C3=v(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.isPrototypeClass=Ct.inheritsFromPrototype=Ct.isCurrentDateGteDay=Ct.extractDailyNoteDate=Ct.hasPlannedStartTimestamp=Ct.isPlannedForToday=Ct.getTodayDateString=Ct.needsFolderRepair=Ct.hasEmptyProperties=Ct.isAssetArchived=Ct.hasStatus=Ct.isEffort=Ct.isAreaOrProject=Ct.hasClass=void 0;var mi=R3();Object.defineProperty(Ct,"hasClass",{enumerable:!0,get:a(function(){return mi.hasClass},"get")});Object.defineProperty(Ct,"isAreaOrProject",{enumerable:!0,get:a(function(){return mi.isAreaOrProject},"get")});Object.defineProperty(Ct,"isEffort",{enumerable:!0,get:a(function(){return mi.isEffort},"get")});Object.defineProperty(Ct,"hasStatus",{enumerable:!0,get:a(function(){return mi.hasStatus},"get")});Object.defineProperty(Ct,"isAssetArchived",{enumerable:!0,get:a(function(){return mi.isAssetArchived},"get")});Object.defineProperty(Ct,"hasEmptyProperties",{enumerable:!0,get:a(function(){return mi.hasEmptyProperties},"get")});Object.defineProperty(Ct,"needsFolderRepair",{enumerable:!0,get:a(function(){return mi.needsFolderRepair},"get")});Object.defineProperty(Ct,"getTodayDateString",{enumerable:!0,get:a(function(){return mi.getTodayDateString},"get")});Object.defineProperty(Ct,"isPlannedForToday",{enumerable:!0,get:a(function(){return mi.isPlannedForToday},"get")});Object.defineProperty(Ct,"hasPlannedStartTimestamp",{enumerable:!0,get:a(function(){return mi.hasPlannedStartTimestamp},"get")});Object.defineProperty(Ct,"extractDailyNoteDate",{enumerable:!0,get:a(function(){return mi.extractDailyNoteDate},"get")});Object.defineProperty(Ct,"isCurrentDateGteDay",{enumerable:!0,get:a(function(){return mi.isCurrentDateGteDay},"get")});Object.defineProperty(Ct,"inheritsFromPrototype",{enumerable:!0,get:a(function(){return mi.inheritsFromPrototype},"get")});Object.defineProperty(Ct,"isPrototypeClass",{enumerable:!0,get:a(function(){return mi.isPrototypeClass},"get")})});var x3=v(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.TsFloorViolationError=xt.CATALOG_KEEP_NAMESPACES=xt.PLUGIN_UI_FLOOR=xt.SDK_FLOOR=xt.PLUGIN_UI_FLOOR_ASSETSPACE_UIDS=xt.SDK_FLOOR_ASSETSPACE_UIDS=xt.TS_FLOOR_AS_UID_SHARED_IDENTITIES=xt.TS_FLOOR_AS_UID_EXOCMD=xt.TS_FLOOR_AS_UID_EXO=void 0;xt.assertTsFloor=nG;xt.assertTsFloorReconciled=iG;xt.isTsFloorAssetSpace=sG;xt.isTsFloorMountPath=oG;xt.TS_FLOOR_AS_UID_EXO="49fd2e56-4656-4ca7-a789-f472b16ea260";xt.TS_FLOOR_AS_UID_EXOCMD="c9c65b0f-1e01-47c1-a1f9-1bf70b11df6a";xt.TS_FLOOR_AS_UID_SHARED_IDENTITIES="0cde1557-6320-4bd0-a7c4-8b72afc38720";xt.SDK_FLOOR_ASSETSPACE_UIDS=new Set([xt.TS_FLOOR_AS_UID_EXO]);xt.PLUGIN_UI_FLOOR_ASSETSPACE_UIDS=new Set([xt.TS_FLOOR_AS_UID_EXO]);xt.SDK_FLOOR=[{uid:xt.TS_FLOOR_AS_UID_EXO,namespace:"exo"}];xt.PLUGIN_UI_FLOOR=xt.SDK_FLOOR;xt.CATALOG_KEEP_NAMESPACES=new Set(["registry","profiles"]);var Cp=class extends Error{static{a(this,"TsFloorViolationError")}constructor(e){super(e),this.name="TsFloorViolationError"}};xt.TsFloorViolationError=Cp;function nG(r,e){let t=[];for(let n of e)r.has(n)||t.push(n);if(t.length>0)throw new Cp(`Target profile's declared set excludes TS-floor AssetSpace UID(s): ${t.join(", ")}. Profile switch aborted to prevent runtime self-brick (R24).`)}a(nG,"assertTsFloor");function iG(r,e,t){let n=[];for(let i of t)r.has(i.uid)||e.has(i.namespace)||n.push(`${i.namespace} (${i.uid})`);if(n.length>0)throw new Cp(`Target profile's declared set excludes TS-floor AssetSpace(s): ${n.join(", ")}. Profile switch aborted to prevent runtime self-brick (R24).`)}a(iG,"assertTsFloorReconciled");function sG(r,e,t=xt.SDK_FLOOR){return t.some(n=>r.length>0&&n.uid===r||e.length>0&&n.namespace===e)}a(sG,"isTsFloorAssetSpace");function oG(r,e=xt.SDK_FLOOR){let t=r.replace(/\/+$/,""),n=t.slice(t.lastIndexOf("/")+1),i=n.startsWith("exoas-")?n.slice(6):n;return i.length===0?!1:e.some(s=>s.namespace===i)}a(oG,"isTsFloorMountPath")});var O3=v(nv=>{"use strict";Object.defineProperty(nv,"__esModule",{value:!0});nv.transitiveDependsOnClosure=aG;function aG(r,e){let t=new Set,n=[];for(let i of r)t.has(i)||(t.add(i),n.push(i));for(;n.length>0;){let i=n.shift();if(i===void 0)break;let s=e.get(i);if(s!==void 0)for(let o of s)t.has(o)||(t.add(o),n.push(o))}return t}a(aG,"transitiveDependsOnClosure")});var iv=v(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.PARKED_ROOT=gi.DEPENDENCY_KIND_REFERENCE_UID=gi.DEPENDENCY_KIND_TBOX_UID=void 0;gi.resolveDependencyKind=F3;gi.parkedPathFor=lG;gi.classifyMountTransition=uG;gi.DEPENDENCY_KIND_TBOX_UID="e1d7fb5c-d334-448d-935b-953b7b033e78";gi.DEPENDENCY_KIND_REFERENCE_UID="fe529085-5370-4ac0-bbe4-1c7351242dee";var cG="dependencykindreference";function F3(r){let e=Array.isArray(r)?r[0]:r;if(typeof e!="string")return"tbox";let t=e.toLowerCase();return t.includes(gi.DEPENDENCY_KIND_TBOX_UID)?"tbox":t.includes(gi.DEPENDENCY_KIND_REFERENCE_UID)||t.includes(cG)?"reference":"tbox"}a(F3,"resolveDependencyKind");gi.PARKED_ROOT=".exocortex/parked";var P3="assetspaces/";function lG(r){let e=r.split("/");if(r.length===0||!r.startsWith(P3)||e.some(t=>t.length===0||t==="."||t===".."))throw new Error(`parkedPathFor: refusing unsafe mount folder "${r}"`);return`${gi.PARKED_ROOT}/${r.slice(P3.length)}`}a(lG,"parkedPathFor");function uG(r){let{state:e,inEffectiveSet:t,dependsOnKind:n,canPark:i=!0}=r;switch(e){case"active":return t?"none":i&&F3(n)==="reference"?"park":"destroy";case"parked":return t?"unpark":"none";case"absent":return t?"materialize":"none"}}a(uG,"classifyMountTransition")});var N3=v(Xg=>{"use strict";Object.defineProperty(Xg,"__esModule",{value:!0});Xg.ParkedAssetIndex=void 0;var D3=iv();function fG(r){let t=r.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim().split("#")[0].trim();return(t.split("/").pop()??t).replace(/\.md$/i,"")}a(fG,"normalizeLinkTarget");function L3(r){let e=r.match(/^---\r?\n([\s\S]*?)\r?\n---/);return e===null?null:e[1]}a(L3,"frontmatterOf");function dG(r){let e=L3(r);if(e===null)return!1;let t=e.match(/^exo__Asset_uid:[ \t]*(.+)$/m);return t!==null&&t[1].trim().length>0}a(dG,"hasAssetUid");function pG(r){let e=L3(r);if(e===null)return null;let t=e.match(/^exo__Asset_label:[ \t]*(.+)$/m);if(t===null)return null;let n=t[1].trim();return n.length<1?null:n.length>=2&&n.startsWith('"')&&n.endsWith('"')?sv(n.slice(1,-1).replace(/\\(["\\ntr])/g,(i,s)=>s==="n"?`
31
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};a(DP,"incrementNodeInspectorPort");a(LP,"useColor")});var k0e,ct=je(()=>{vg();MP();lp();uE();fE();k0e=new fe});var Zc=v(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.AssetClass=void 0;var jP;(function(r){r.AREA="ems__Area",r.TASK="ems__Task",r.PROJECT="ems__Project",r.ACTION="ems__Action",r.MEETING="ems__Meeting",r.INITIATIVE="ems__Initiative",r.TASK_PROTOTYPE="ems__TaskPrototype",r.MEETING_PROTOTYPE="ems__MeetingPrototype",r.EVENT_PROTOTYPE="exo__EventPrototype",r.PROJECT_PROTOTYPE="ems__ProjectPrototype",r.EVENT="exo__Event",r.DAILY_NOTE="pn__DailyNote",r.CONCEPT="ims__Concept",r.SESSION_START_EVENT="ems__SessionStartEvent",r.SESSION_END_EVENT="ems__SessionEndEvent",r.PROTOTYPE="exo__Prototype",r.CLASS="exo__Class",r.FLEETING_NOTE="ztlk__FleetingNote",r.WORKFLOW="ems__Workflow",r.WORKFLOW_STATE="ems__WorkflowState",r.WORKFLOW_TRANSITION="ems__WorkflowTransition",r.COMMAND="exocmd__Command",r.PRECONDITION="exocmd__Precondition",r.GROUNDING="exocmd__Grounding",r.COMMAND_BINDING="exocmd__CommandBinding"})(jP||(Ig.AssetClass=jP={}))});var el=v(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});Rg.EffortStatus=void 0;var $P;(function(r){r.DRAFT="ems__EffortStatusDraft",r.BACKLOG="ems__EffortStatusBacklog",r.DOING="ems__EffortStatusDoing",r.WAITING="ems__EffortStatusWaiting",r.DONE="ems__EffortStatusDone",r.TRASHED="ems__EffortStatusTrashed"})($P||(Rg.EffortStatus=$P={}))});var Au=v(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.EFFORT_STATUS_BY_UID=Uo.EFFORT_STATUS_UID=void 0;Uo.normalizeEffortStatus=o8;var Tu=el();Uo.EFFORT_STATUS_UID={[Tu.EffortStatus.DRAFT]:"c42245d0-01de-4c35-bfcf-d910445ea28e",[Tu.EffortStatus.BACKLOG]:"753a44d5-846c-4b82-9196-4fd9a4d48777",[Tu.EffortStatus.DOING]:"027e78f4-6e16-4b36-b8fb-5510507d5745",[Tu.EffortStatus.WAITING]:"0610947c-6a62-41c8-9d44-7863d3ba3a8e",[Tu.EffortStatus.DONE]:"7b9b3116-7c3c-438c-9618-94fe301320a6",[Tu.EffortStatus.TRASHED]:"5d14f18d-db2b-4847-9ac1-144cb93b2541"};Uo.EFFORT_STATUS_BY_UID=Object.freeze(Object.fromEntries(Object.entries(Uo.EFFORT_STATUS_UID).map(([r,e])=>[e,r])));var pE=/^ems__EffortStatus[A-Za-z]+$/,i8=/\s+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,s8=/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;function o8(r){let e=r;if(e==null)return null;if(Array.isArray(e)){if(e.length!==1)return null;e=e[0]}let t=String(e).trim().replace(/^["']/,"").replace(/["']$/,"").replace(/^\[\[/,"").replace(/\]\]$/,"").trim();if(!t)return null;if(pE.test(t))return t;let n=t.indexOf("|"),i=n===-1?t:t.slice(0,n).trim();if(n!==-1){let c=t.slice(n+1).trim();if(pE.test(c))return c}let s=i.replace(i8,"").trim();if(pE.test(s))return s;let o=i.match(s8);return o?Uo.EFFORT_STATUS_BY_UID[o[1].toLowerCase()]??null:null}a(o8,"normalizeEffortStatus")});var hE=v(Cg=>{"use strict";Object.defineProperty(Cg,"__esModule",{value:!0});Cg.EFFORT_STATUS_OPTIONS=void 0;var a8=Au();Cg.EFFORT_STATUS_OPTIONS=Object.freeze(Object.keys(a8.EFFORT_STATUS_UID).map(r=>Object.freeze({value:`[[${r}]]`,label:r.replace(/^ems__EffortStatus/,"")})))});var qa=v(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.GroundingType=void 0;var UP;(function(r){r.SPARQL_UPDATE="sparql_update",r.PROPERTY_DELETE="property_delete",r.PROPERTY_SET="property_set",r.COMPOSITE="composite",r.SERVICE_CALL="service_call",r.CREATE_INSTANCE="create_instance",r.PROPERTY_APPEND="property_append",r.PROPERTY_INCREMENT="property_increment",r.PROPERTY_SHIFT="property_shift",r.WORKFLOW_TRANSITION="workflow_transition",r.BODY_TEMPLATE="body_template"})(UP||(xg.GroundingType=UP={}))});var pp=v(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.GROUNDING_TYPE_IRI_TO_ENUM=di.GROUNDING_TYPE_UID_TO_ENUM=di.GROUNDING_TYPE_UIDS=void 0;di.resolveGroundingTypeFromIRI=l8;di.resolveGroundingTypeFromWikilinkLiteral=u8;var cr=qa();di.GROUNDING_TYPE_UIDS={[cr.GroundingType.PROPERTY_SET]:"cf3bb923-f1f1-40be-b728-782844402426",[cr.GroundingType.PROPERTY_DELETE]:"4bdf1d0b-e9da-4d96-bafe-c5aaef8c2bd5",[cr.GroundingType.COMPOSITE]:"8f9a57db-3865-4886-92fb-c5ab7f3c3fa3",[cr.GroundingType.SERVICE_CALL]:"9bf9fc99-ac37-4e51-b9f5-bd920099947c",[cr.GroundingType.CREATE_INSTANCE]:"4367e2d6-6c92-450a-becb-abce1fb07682",[cr.GroundingType.PROPERTY_APPEND]:"572f7e69-a8a1-42f6-8113-5aa65cc4b552",[cr.GroundingType.PROPERTY_INCREMENT]:"afc29f90-45eb-4f94-9fe2-2ce738759161",[cr.GroundingType.PROPERTY_SHIFT]:"f4e5266f-f3cc-49fd-a5a5-ce1e8b7847a4",[cr.GroundingType.SPARQL_UPDATE]:"79c3e709-8d1d-4694-bcc6-b9ff07d59b86",[cr.GroundingType.WORKFLOW_TRANSITION]:"5c1a2552-d576-496d-8823-563573dd1e2f",[cr.GroundingType.BODY_TEMPLATE]:"6093bfcb-cf9b-4565-86c3-ff74d8bc11c0"};di.GROUNDING_TYPE_UID_TO_ENUM=Object.freeze(Object.fromEntries(Object.entries(di.GROUNDING_TYPE_UIDS).map(([r,e])=>[e,r])));var cs="https://exocortex.my/ontology/exocmd#";di.GROUNDING_TYPE_IRI_TO_ENUM=Object.freeze({[`${cs}GroundingTypePropertySet`]:cr.GroundingType.PROPERTY_SET,[`${cs}GroundingTypePropertyDelete`]:cr.GroundingType.PROPERTY_DELETE,[`${cs}GroundingTypeComposite`]:cr.GroundingType.COMPOSITE,[`${cs}GroundingTypeServiceCall`]:cr.GroundingType.SERVICE_CALL,[`${cs}GroundingTypeCreateInstance`]:cr.GroundingType.CREATE_INSTANCE,[`${cs}GroundingTypePropertyAppend`]:cr.GroundingType.PROPERTY_APPEND,[`${cs}GroundingTypePropertyIncrement`]:cr.GroundingType.PROPERTY_INCREMENT,[`${cs}GroundingTypePropertyShift`]:cr.GroundingType.PROPERTY_SHIFT,[`${cs}GroundingTypeSparqlUpdate`]:cr.GroundingType.SPARQL_UPDATE,[`${cs}GroundingTypeWorkflowTransition`]:cr.GroundingType.WORKFLOW_TRANSITION,[`${cs}GroundingTypeBodyTemplate`]:cr.GroundingType.BODY_TEMPLATE});var c8=/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;function l8(r){let e=di.GROUNDING_TYPE_IRI_TO_ENUM[r];if(e!==void 0)return e;let t=r.match(c8);return t?di.GROUNDING_TYPE_UID_TO_ENUM[t[1].toLowerCase()]??null:null}a(l8,"resolveGroundingTypeFromIRI");function u8(r){let e=r.match(/^\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\|[^\]]*)?\]\]$/i);return e?di.GROUNDING_TYPE_UID_TO_ENUM[e[1].toLowerCase()]??null:null}a(u8,"resolveGroundingTypeFromWikilinkLiteral")});var mE=v(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.CommandBindingStyleProperty=zi.CommandBindingProperty=zi.GroundingProperty=zi.PreconditionProperty=zi.CommandProperty=void 0;zi.CommandProperty={ICON:"exocmd__Command_icon",PRECONDITION:"exocmd__Command_precondition",GROUNDING:"exocmd__Command_grounding",CONFIRM_MESSAGE:"exocmd__Command_confirmMessage",SUCCESS_MESSAGE:"exocmd__Command_successMessage",CATEGORY:"exocmd__Command_category",OPEN_IN_SAME_TAB:"exocmd__Command_openInSameTab"};zi.PreconditionProperty={SPARQL_ASK:"exocmd__Precondition_sparqlAsk",QUERY:"exocmd__Precondition_query"};zi.GroundingProperty={TYPE:"exocmd__Grounding_type",SPARQL_UPDATE:"exocmd__Grounding_sparqlUpdate",TARGET_PROPERTY:"exocmd__Grounding_targetProperty",STEPS:"exocmd__Grounding_steps",IS_DEFINED_BY:"exocmd__Grounding_isDefinedBy",LABEL_TEMPLATE:"exocmd__Grounding_labelTemplate"};zi.CommandBindingProperty={COMMAND:"exocmd__CommandBinding_command",TARGET_CLASS:"exocmd__CommandBinding_targetClass",TARGET_PROTOTYPE:"exocmd__CommandBinding_targetPrototype",TARGET_ASSET:"exocmd__CommandBinding_targetAsset",POSITION:"exocmd__CommandBinding_position",ORDER:"exocmd__CommandBinding_order",PRECONDITION:"exocmd__CommandBinding_precondition",STYLE:"exocmd__CommandBinding_style",VARIANT:"exocmd__CommandBinding_variant"};zi.CommandBindingStyleProperty={VARIANT:"exocmd__CommandBindingStyle_variant",SHOW_ICON:"exocmd__CommandBindingStyle_showIcon",LABEL_CLASS:"exocmd__CommandBindingStyle_labelClass",ARIA_LABEL:"exocmd__CommandBindingStyle_ariaLabel",TOOLTIP:"exocmd__CommandBindingStyle_tooltip",KEYBOARD_SHORTCUT:"exocmd__CommandBindingStyle_keyboardShortcut",SOURCE:"exocmd__CommandBindingStyle_source"}});var gE=v(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.STYLE_SOURCE_VALUES=pi.LABEL_CLASS_VALUES=pi.COMMAND_VARIANT_VALUES=void 0;pi.isCommandVariant=f8;pi.isLabelClass=d8;pi.isStyleSource=p8;pi.COMMAND_VARIANT_VALUES=Object.freeze(["primary","secondary","success","warning","danger","muted"]);pi.LABEL_CLASS_VALUES=Object.freeze(["muted","bold","uppercase","compact"]);pi.STYLE_SOURCE_VALUES=Object.freeze(["vendor","user"]);function f8(r){return typeof r=="string"&&pi.COMMAND_VARIANT_VALUES.includes(r)}a(f8,"isCommandVariant");function d8(r){return typeof r=="string"&&pi.LABEL_CLASS_VALUES.includes(r)}a(d8,"isLabelClass");function p8(r){return typeof r=="string"&&pi.STYLE_SOURCE_VALUES.includes(r)}a(p8,"isStyleSource")});var BP=v(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.isCommandFrontmatter=h8;Iu.isPreconditionFrontmatter=m8;Iu.isGroundingFrontmatter=g8;Iu.isCommandBindingFrontmatter=y8;function h8(r){return Og(r,"exocmd__Command")}a(h8,"isCommandFrontmatter");function m8(r){return Og(r,"exocmd__Precondition")}a(m8,"isPreconditionFrontmatter");function g8(r){return Og(r,"exocmd__Grounding")}a(g8,"isGroundingFrontmatter");function y8(r){return Og(r,"exocmd__CommandBinding")}a(y8,"isCommandBindingFrontmatter");function Og(r,e){let t=r.exo__Instance_class;if(t==null)return!1;let n=Array.isArray(t)?t:[t];for(let i of n){if(typeof i!="string")continue;let s=i.match(/\[\[([^|\]]+)/);if((s?s[1]:i)===e)return!0}return!1}a(Og,"hasInstanceClass")});var VP=v(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.parseGroundingDefinitionFromFrontmatter=b8;var _8=pp();function Pg(r){if(typeof r!="string")return"";let e=r.replace(/["'[\]]/g,"").trim(),t=e.indexOf("|");return t>=0?e.slice(0,t).trim():e}a(Pg,"normalizeGroundingRef");function b8(r,e,t){let n=e.exocmd__Grounding_type,i=(()=>{if(typeof n!="string")return n;let S=(0,_8.resolveGroundingTypeFromWikilinkLiteral)(n);if(S!==null)return S;throw new Error(`[exocmd-grounding-type-literal-form] legacy literal-string '${n}' for exocmd__Grounding_type in fixture ${r}. Migrate to wikilink form per RFC 9d20c91f Phase 3.`)})(),s=i==="service_call"?e.exocmd__Grounding_serviceId??e.exocmd__Grounding_targetProperty:e.exocmd__Grounding_targetProperty,o;if(i==="composite"){let S=e.exocmd__Grounding_steps;Array.isArray(S)&&(o=S.map(R=>t(Pg(R))))}let c=e.exocmd__Grounding_incrementBy,l;if(c!=null&&c!==""){let S=Number.parseInt(String(c),10);Number.isFinite(S)&&(l=S)}let u=e.exocmd__Grounding_targetValueRef,f=u?Pg(u):void 0,d=e.exocmd__Grounding_templateRef,p=d?Pg(d):void 0,h=e.exocmd__Grounding_cloneTargetBody,m=h===!0||h==="true",y=e.exocmd__Grounding_targetsCreatedInstance,_=y===!0||y==="true",b=e.exocmd__Grounding_omitLabel,T=b===!0||b==="true",I=e.exocmd__Grounding_targetQuery,E=I?Pg(I):void 0;return{id:r,label:e.exo__Asset_label??"",type:i,targetProperty:s,targetValueRef:f,targetValueLiteral:e.exocmd__Grounding_targetValueLiteral,targetValueSubstitution:e.exocmd__Grounding_targetValueSubstitution,serviceCallPayload:e.exocmd__Grounding_serviceCallPayload,appendExpression:e.exocmd__Grounding_appendExpression,targetClass:e.exocmd__Grounding_targetClass,targetPrototype:e.exocmd__Grounding_targetPrototype,targetFolder:e.exocmd__Grounding_targetFolder,shiftDelta:e.exocmd__Grounding_shiftDelta,incrementBy:l,linkBackProperty:e.exocmd__Grounding_linkBackProperty,bodyTemplate:e.exocmd__Grounding_bodyTemplate,templateRef:p,cloneTargetBody:m,targetsCreatedInstance:_,omitLabel:T,targetQuery:E,steps:o}}a(b8,"parseGroundingDefinitionFromFrontmatter")});var GP=v(Fg=>{"use strict";Object.defineProperty(Fg,"__esModule",{value:!0});Fg.hasPosition=S8;Fg.isFixed=w8;function S8(r){return typeof r.x=="number"&&typeof r.y=="number"}a(S8,"hasPosition");function w8(r){return r.fx!==null&&r.fx!==void 0&&r.fy!==null&&r.fy!==void 0}a(w8,"isFixed")});var qP=v(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});Dg.createEmptyGraphData=E8;Dg.mergeGraphData=v8;function E8(){return{nodes:[],edges:[],lastUpdated:Date.now(),version:0}}a(E8,"createEmptyGraphData");function v8(r,e){let t=new Map,n=new Set,i=[];for(let s of r.nodes)t.set(s.id,s);for(let s of e.nodes)t.set(s.id,s);for(let s of r.edges){let o=`${s.source}->${s.target}:${s.type}`;n.has(o)||(n.add(o),i.push(s))}for(let s of e.edges){let o=`${s.source}->${s.target}:${s.type}`;n.has(o)||(n.add(o),i.push(s))}return{nodes:Array.from(t.values()),edges:i,lastUpdated:Date.now(),version:Math.max(r.version??0,e.version??0)+1}}a(v8,"mergeGraphData")});var _E=v(Lg=>{"use strict";Object.defineProperty(Lg,"__esModule",{value:!0});Lg.createEdgeId=T8;Lg.edgesEqual=A8;function T8(r,e,t,n){let i=n?`|${n}`:"";return`${r}->${e}:${t}${i}`}a(T8,"createEdgeId");function A8(r,e){return r.source===e.source&&r.target===e.target&&r.type===e.type&&r.predicate===e.predicate}a(A8,"edgesEqual")});var bE=v(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.BUILT_IN_EDGE_STYLES=lr.BUILT_IN_NODE_STYLES=lr.DEFAULT_EDGE_STYLE=lr.DEFAULT_NODE_STYLE=lr.RDF_TYPE_PREDICATES=void 0;lr.mergeNodeStyles=I8;lr.mergeEdgeStyles=R8;lr.extractLocalName=C8;lr.isClassType=x8;lr.isTypePredicate=O8;lr.isSubClassPredicate=P8;lr.RDF_TYPE_PREDICATES={RDF_TYPE:"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",RDFS_CLASS:"http://www.w3.org/2000/01/rdf-schema#Class",OWL_CLASS:"http://www.w3.org/2002/07/owl#Class",RDFS_SUBCLASS_OF:"http://www.w3.org/2000/01/rdf-schema#subClassOf",OWL_EQUIVALENT_CLASS:"http://www.w3.org/2002/07/owl#equivalentClass",RDFS_LABEL:"http://www.w3.org/2000/01/rdf-schema#label",RDFS_COMMENT:"http://www.w3.org/2000/01/rdf-schema#comment"};lr.DEFAULT_NODE_STYLE={color:"#6366f1",borderColor:"#4f46e5",borderWidth:2,size:30,shape:"circle",icon:"",opacity:1,shadow:!1,animation:"none"};lr.DEFAULT_EDGE_STYLE={color:"#9ca3af",width:1,lineStyle:"solid",arrow:"standard",curvature:0,opacity:.6,showLabel:!1,labelPosition:.5};lr.BUILT_IN_NODE_STYLES={"http://www.w3.org/2000/01/rdf-schema#Class":{color:"#f59e0b",shape:"diamond",size:40},"http://www.w3.org/2002/07/owl#Class":{color:"#f59e0b",shape:"diamond",size:40},ems__Task:{color:"#22c55e",shape:"circle"},ems__Project:{color:"#3b82f6",shape:"square"},ems__Area:{color:"#8b5cf6",shape:"hexagon",size:40},ems__Meeting:{color:"#ec4899",shape:"circle"},exo__Class:{color:"#f59e0b",shape:"diamond"},person__Person:{color:"#06b6d4",shape:"circle"},ims__Person:{color:"#06b6d4",shape:"circle"}};lr.BUILT_IN_EDGE_STYLES={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":{color:"#f59e0b",lineStyle:"dashed",arrow:"standard"},"http://www.w3.org/2000/01/rdf-schema#subClassOf":{color:"#8b5cf6",width:2,arrow:"triangle"},"https://exocortex.my/ontology/ems#Effort_parent":{color:"#6366f1",width:2,arrow:"standard"},"https://exocortex.my/ontology/exo#Asset_prototype":{color:"#f59e0b",lineStyle:"dashed",arrow:"circle"},"https://exocortex.my/ontology/exo#references":{color:"#22c55e",opacity:.4,arrow:"standard"}};function I8(r,e){return{...r,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}}a(I8,"mergeNodeStyles");function R8(r,e){return{...r,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}}a(R8,"mergeEdgeStyles");function C8(r){let e=r.lastIndexOf("#"),t=r.lastIndexOf("/"),n=Math.max(e,t);return n>=0?r.substring(n+1):r}a(C8,"extractLocalName");function x8(r){return r===lr.RDF_TYPE_PREDICATES.RDFS_CLASS||r===lr.RDF_TYPE_PREDICATES.OWL_CLASS}a(x8,"isClassType");function O8(r){return r===lr.RDF_TYPE_PREDICATES.RDF_TYPE}a(O8,"isTypePredicate");function P8(r){return r===lr.RDF_TYPE_PREDICATES.RDFS_SUBCLASS_OF}a(P8,"isSubClassPredicate")});var HP=v(WP=>{"use strict";Object.defineProperty(WP,"__esModule",{value:!0})});var Le=v(Ng=>{"use strict";Object.defineProperty(Ng,"__esModule",{value:!0});Ng.IRI=void 0;var SE=class r{static{a(this,"IRI")}constructor(e){let t=e.trim();if(t.length===0)throw new Error("IRI cannot be empty");if(!r.isValidIRI(t))throw new Error("Invalid IRI format");this._value=t}get value(){return this._value}equals(e){return this._value===e._value}toString(){return this._value}static isValidIRI(e){if(!e||e.trim().length===0||/\s/.test(e)||!/^[a-z][a-z0-9+.-]*:/i.test(e))return!1;let n=["http","https","ftp","ftps","file","mailto","tel","data","ws","wss","urn","obsidian"],i=e.match(/^([a-z][a-z0-9+.-]*?):/i);if(i){let s=i[1].toLowerCase();if(!n.includes(s))return!1}try{return new URL(e),!0}catch{return/^urn:[a-z0-9][a-z0-9-]{0,31}:[^\s]+$/i.test(e)}}};Ng.IRI=SE});var Ye=v(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.Literal=void 0;tl.parseLanguageTag=zP;tl.createDirectionalLiteral=D8;tl.createLiteralFromLanguageTag=L8;var F8="http://www.w3.org/2001/XMLSchema#string",hp=class{static{a(this,"Literal")}constructor(e,t,n,i){if(e.length===0)throw new Error("Literal value cannot be empty");if(t&&n)throw new Error("Literal cannot have both datatype and language tag");if(i&&!n)throw new Error("Literal cannot have direction without language tag");if(i&&i!=="ltr"&&i!=="rtl")throw new Error('Direction must be "ltr" or "rtl"');this._value=e,this._datatype=t,this._language=n?n.toLowerCase():void 0,this._direction=i}get value(){return this._value}get datatype(){return this._datatype}get language(){return this._language}get direction(){return this._direction}hasDirection(){return this._direction!==void 0}equals(e){if(this._value!==e._value||this._language!==e._language||this._direction!==e._direction)return!1;let t=this.normalizedDatatype(),n=e.normalizedDatatype();return t===n}normalizedDatatype(){return!this._datatype||this._datatype.value===F8?null:this._datatype.value}toString(){let e=`"${this._value}"`;return this._datatype?e+=`^^<${this._datatype.value}>`:this._language&&(e+=`@${this._language}`,this._direction&&(e+=`--${this._direction}`)),e}};tl.Literal=hp;function zP(r){let t=r.lastIndexOf("--");if(t===-1)return{language:r.toLowerCase()};let n=r.substring(t+2),i=r.substring(0,t);return n==="ltr"||n==="rtl"?{language:i.toLowerCase(),direction:n}:{language:r.toLowerCase()}}a(zP,"parseLanguageTag");function D8(r,e,t){return new hp(r,void 0,e,t)}a(D8,"createDirectionalLiteral");function L8(r,e){let{language:t,direction:n}=zP(e);return new hp(r,void 0,t,n)}a(L8,"createLiteralFromLanguageTag")});var rr=v(Mg=>{"use strict";Object.defineProperty(Mg,"__esModule",{value:!0});Mg.BlankNode=void 0;var kg=class r{static{a(this,"BlankNode")}constructor(e){let t=e.trim();if(t.length===0)throw new Error("BlankNode id cannot be empty");this._id=t}get id(){return this._id}equals(e){return this._id===e._id}toString(){return`_:${this._id}`}static generateId(){return`b${++r.counter}`}static create(){return new r(r.generateId())}};Mg.BlankNode=kg;kg.counter=0});var Yt=v(jg=>{"use strict";Object.defineProperty(jg,"__esModule",{value:!0});jg.Namespace=void 0;var KP=Le(),He=class r{static{a(this,"Namespace")}constructor(e,t){if(e.trim().length===0)throw new Error("Namespace prefix cannot be empty");this._prefix=e,this._iri=new KP.IRI(t)}get prefix(){return this._prefix}get iri(){return this._iri}term(e){return new KP.IRI(`${this._iri.value}${e}`)}expand(e){let t=e.split(":");if(t.length!==2)return null;let[n,i]=t;return n!==this._prefix?null:this.term(i)}static forPrefix(e){if(!/^[a-z][a-zA-Z0-9]*$/.test(e))return null;let t=r.KNOWN_NAMESPACES.find(n=>n.prefix===e);return t||new r(e,`${r.EXOCORTEX_ONTOLOGY_BASE}${e}#`)}static fromPropertyKey(e){let t=/^([a-z][a-zA-Z0-9]*)__(.+)$/.exec(e);if(!t)return null;let n=r.forPrefix(t[1]);return n?{namespace:n,localName:t[2]}:null}static fromTermIRI(e){if(typeof e!="string"||e.length===0)return null;let t=a(l=>l.length>0&&!l.includes("#")&&!l.includes("/")?l:null,"cleanLocal");for(let l of r.KNOWN_NAMESPACES){let u=l.iri.value;if(e.startsWith(u)){let f=t(e.slice(u.length));return f===null?null:{namespace:l,localName:f}}}if(!e.startsWith(r.EXOCORTEX_ONTOLOGY_BASE))return null;let n=e.slice(r.EXOCORTEX_ONTOLOGY_BASE.length),i=n.indexOf("#");if(i<=0)return null;let s=n.slice(0,i);if(!/^[a-z][a-zA-Z0-9]*$/.test(s))return null;let o=t(n.slice(i+1));if(o===null)return null;let c=r.forPrefix(s);return c?{namespace:c,localName:o}:null}static knownNamespaces(){return r.KNOWN_NAMESPACES}};jg.Namespace=He;He.RDF=new He("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");He.RDFS=new He("rdfs","http://www.w3.org/2000/01/rdf-schema#");He.OWL=new He("owl","http://www.w3.org/2002/07/owl#");He.XSD=new He("xsd","http://www.w3.org/2001/XMLSchema#");He.SHACL=new He("sh","http://www.w3.org/ns/shacl#");He.EXO=new He("exo","https://exocortex.my/ontology/exo#");He.EMS=new He("ems","https://exocortex.my/ontology/ems#");He.EXOCMD=new He("exocmd","https://exocortex.my/ontology/exocmd#");He.IMS=new He("ims","https://exocortex.my/ontology/ims#");He.ZTLK=new He("ztlk","https://exocortex.my/ontology/ztlk#");He.PTMS=new He("ptms","https://exocortex.my/ontology/ptms#");He.LIT=new He("lit","https://exocortex.my/ontology/lit#");He.INBOX=new He("inbox","https://exocortex.my/ontology/inbox#");He.PMBOK=new He("pmbok","https://exocortex.my/ontology/pmbok#");He.EXOCORTEX_ONTOLOGY_BASE="https://exocortex.my/ontology/";He.KNOWN_NAMESPACES=[He.EXO,He.EMS,He.EXOCMD,He.IMS,He.ZTLK,He.PTMS,He.LIT,He.INBOX,He.PMBOK,He.RDF,He.RDFS,He.OWL,He.XSD,He.SHACL]});var hi=v($g=>{"use strict";Object.defineProperty($g,"__esModule",{value:!0});$g.Triple=void 0;var wE=Le(),EE=Ye(),vE=rr(),TE=class{static{a(this,"Triple")}constructor(e,t,n){this._subject=e,this._predicate=t,this._object=n}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}equals(e){return!(!this.equalsNode(this._subject,e._subject)||!this._predicate.equals(e._predicate)||!this.equalsNode(this._object,e._object))}equalsNode(e,t){return e instanceof wE.IRI&&t instanceof wE.IRI||e instanceof vE.BlankNode&&t instanceof vE.BlankNode||e instanceof EE.Literal&&t instanceof EE.Literal||this.isQuotedTriple(e)&&this.isQuotedTriple(t)?e.equals(t):!1}isQuotedTriple(e){return typeof e=="object"&&e!==null&&"termType"in e&&e.termType==="QuotedTriple"}toString(){let e=this.nodeToString(this._subject),t=`<${this._predicate.value}>`,n=this.nodeToString(this._object);return`${e} ${t} ${n} .`}nodeToString(e){return e instanceof wE.IRI?`<${e.value}>`:e instanceof vE.BlankNode||e instanceof EE.Literal||this.isQuotedTriple(e)?e.toString():""}};$g.Triple=TE});var mp=v(Ug=>{"use strict";Object.defineProperty(Ug,"__esModule",{value:!0});Ug.QuotedTriple=void 0;var AE=Le(),IE=Ye(),RE=rr(),CE=class r{static{a(this,"QuotedTriple")}constructor(e,t,n){this._subject=e,this._predicate=t,this._object=n}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}equals(e){return!(!this.equalsNode(this._subject,e._subject)||!this._predicate.equals(e._predicate)||!this.equalsNode(this._object,e._object))}equalsNode(e,t){return e instanceof AE.IRI&&t instanceof AE.IRI||e instanceof RE.BlankNode&&t instanceof RE.BlankNode||e instanceof IE.Literal&&t instanceof IE.Literal||e instanceof r&&t instanceof r?e.equals(t):!1}get termType(){return"QuotedTriple"}toString(){let e=this.nodeToString(this._subject),t=`<${this._predicate.value}>`,n=this.nodeToString(this._object);return`<< ${e} ${t} ${n} >>`}nodeToString(e){return e instanceof AE.IRI?`<${e.value}>`:e instanceof RE.BlankNode||e instanceof IE.Literal||e instanceof r?e.toString():""}};Ug.QuotedTriple=CE});var YP=v(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.QuotedTriple=Ir.Triple=Ir.Namespace=Ir.BlankNode=Ir.createLiteralFromLanguageTag=Ir.createDirectionalLiteral=Ir.parseLanguageTag=Ir.Literal=Ir.IRI=void 0;var N8=Le();Object.defineProperty(Ir,"IRI",{enumerable:!0,get:a(function(){return N8.IRI},"get")});var Bg=Ye();Object.defineProperty(Ir,"Literal",{enumerable:!0,get:a(function(){return Bg.Literal},"get")});Object.defineProperty(Ir,"parseLanguageTag",{enumerable:!0,get:a(function(){return Bg.parseLanguageTag},"get")});Object.defineProperty(Ir,"createDirectionalLiteral",{enumerable:!0,get:a(function(){return Bg.createDirectionalLiteral},"get")});Object.defineProperty(Ir,"createLiteralFromLanguageTag",{enumerable:!0,get:a(function(){return Bg.createLiteralFromLanguageTag},"get")});var k8=rr();Object.defineProperty(Ir,"BlankNode",{enumerable:!0,get:a(function(){return k8.BlankNode},"get")});var M8=Yt();Object.defineProperty(Ir,"Namespace",{enumerable:!0,get:a(function(){return M8.Namespace},"get")});var j8=hi();Object.defineProperty(Ir,"Triple",{enumerable:!0,get:a(function(){return j8.Triple},"get")});var $8=mp();Object.defineProperty(Ir,"QuotedTriple",{enumerable:!0,get:a(function(){return $8.QuotedTriple},"get")})});var Vg=v(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.UUID_URL_NAMESPACE=Yi.DEFAULT_LANGUAGE_TAG=Yi.REQUIRED_PROPERTIES=Yi.ALLOWED_PROPERTIES=Yi.Exo003MetadataType=void 0;var Ki;(function(r){r.Namespace="namespace",r.Anchor="anchor",r.BlankNode="blank_node",r.Statement="statement",r.Body="body"})(Ki||(Yi.Exo003MetadataType=Ki={}));Yi.ALLOWED_PROPERTIES={[Ki.Namespace]:["metadata","uri","aliases"],[Ki.Anchor]:["metadata","uri","aliases"],[Ki.BlankNode]:["metadata","uri","aliases"],[Ki.Statement]:["metadata","subject","predicate","object","aliases"],[Ki.Body]:["metadata","subject","predicate","aliases"]};Yi.REQUIRED_PROPERTIES={[Ki.Namespace]:["metadata","uri"],[Ki.Anchor]:["metadata","uri"],[Ki.BlankNode]:["metadata","uri"],[Ki.Statement]:["metadata","subject","predicate","object"],[Ki.Body]:["metadata","subject","predicate"]};Yi.DEFAULT_LANGUAGE_TAG="ru";Yi.UUID_URL_NAMESPACE="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});var QP=v(xE=>{"use strict";Object.defineProperty(xE,"__esModule",{value:!0});xE.default="ffffffff-ffff-ffff-ffff-ffffffffffff"});var XP=v(OE=>{"use strict";Object.defineProperty(OE,"__esModule",{value:!0});OE.default="00000000-0000-0000-0000-000000000000"});var JP=v(PE=>{"use strict";Object.defineProperty(PE,"__esModule",{value:!0});PE.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});var gp=v(FE=>{"use strict";Object.defineProperty(FE,"__esModule",{value:!0});var U8=JP();function B8(r){return typeof r=="string"&&U8.default.test(r)}a(B8,"validate");FE.default=B8});var yp=v(DE=>{"use strict";Object.defineProperty(DE,"__esModule",{value:!0});var V8=gp();function G8(r){if(!(0,V8.default)(r))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(r.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(r.slice(9,13),16))>>>8,e&255,(e=parseInt(r.slice(14,18),16))>>>8,e&255,(e=parseInt(r.slice(19,23),16))>>>8,e&255,(e=parseInt(r.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}a(G8,"parse");DE.default=G8});var Bo=v(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.unsafeStringify=void 0;var q8=gp(),fn=[];for(let r=0;r<256;++r)fn.push((r+256).toString(16).slice(1));function ZP(r,e=0){return(fn[r[e+0]]+fn[r[e+1]]+fn[r[e+2]]+fn[r[e+3]]+"-"+fn[r[e+4]]+fn[r[e+5]]+"-"+fn[r[e+6]]+fn[r[e+7]]+"-"+fn[r[e+8]]+fn[r[e+9]]+"-"+fn[r[e+10]]+fn[r[e+11]]+fn[r[e+12]]+fn[r[e+13]]+fn[r[e+14]]+fn[r[e+15]]).toLowerCase()}a(ZP,"unsafeStringify");_p.unsafeStringify=ZP;function W8(r,e=0){let t=ZP(r,e);if(!(0,q8.default)(t))throw TypeError("Stringified UUID is invalid");return t}a(W8,"stringify");_p.default=W8});var Wg=v(LE=>{"use strict";Object.defineProperty(LE,"__esModule",{value:!0});var H8=require("crypto"),qg=new Uint8Array(256),Gg=qg.length;function z8(){return Gg>qg.length-16&&((0,H8.randomFillSync)(qg),Gg=0),qg.slice(Gg,Gg+=16)}a(z8,"rng");LE.default=z8});var NE=v(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.updateV1State=void 0;var e3=Wg(),K8=Bo(),bp={};function Y8(r,e,t){let n,i=r?._v6??!1;if(r){let s=Object.keys(r);s.length===1&&s[0]==="_v6"&&(r=void 0)}if(r)n=t3(r.random??r.rng?.()??(0,e3.default)(),r.msecs,r.nsecs,r.clockseq,r.node,e,t);else{let s=Date.now(),o=(0,e3.default)();r3(bp,s,o),n=t3(o,bp.msecs,bp.nsecs,i?void 0:bp.clockseq,i?void 0:bp.node,e,t)}return e??(0,K8.unsafeStringify)(n)}a(Y8,"v1");function r3(r,e,t){return r.msecs??=-1/0,r.nsecs??=0,e===r.msecs?(r.nsecs++,r.nsecs>=1e4&&(r.node=void 0,r.nsecs=0)):e>r.msecs?r.nsecs=0:e<r.msecs&&(r.node=void 0),r.node||(r.node=t.slice(10,16),r.node[0]|=1,r.clockseq=(t[8]<<8|t[9])&16383),r.msecs=e,r}a(r3,"updateV1State");Sp.updateV1State=r3;function t3(r,e,t,n,i,s,o=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),o=0;else if(o<0||o+16>s.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);e??=Date.now(),t??=0,n??=(r[8]<<8|r[9])&16383,i??=r.slice(10,16),e+=122192928e5;let c=((e&268435455)*1e4+t)%4294967296;s[o++]=c>>>24&255,s[o++]=c>>>16&255,s[o++]=c>>>8&255,s[o++]=c&255;let l=e/4294967296*1e4&268435455;s[o++]=l>>>8&255,s[o++]=l&255,s[o++]=l>>>24&15|16,s[o++]=l>>>16&255,s[o++]=n>>>8|128,s[o++]=n&255;for(let u=0;u<6;++u)s[o++]=i[u];return s}a(t3,"v1Bytes");Sp.default=Y8});var ME=v(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});var Q8=yp(),X8=Bo();function J8(r){let e=typeof r=="string"?(0,Q8.default)(r):r,t=Z8(e);return typeof r=="string"?(0,X8.unsafeStringify)(t):t}a(J8,"v1ToV6");kE.default=J8;function Z8(r){return Uint8Array.of((r[6]&15)<<4|r[7]>>4&15,(r[7]&15)<<4|(r[4]&240)>>4,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,(r[1]&15)<<4|(r[2]&240)>>4,96|r[2]&15,r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}a(Z8,"_v1ToV6")});var n3=v(jE=>{"use strict";Object.defineProperty(jE,"__esModule",{value:!0});var eV=require("crypto");function tV(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),(0,eV.createHash)("md5").update(r).digest()}a(tV,"md5");jE.default=tV});var wp=v(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.URL=Vo.DNS=Vo.stringToBytes=void 0;var i3=yp(),rV=Bo();function s3(r){r=unescape(encodeURIComponent(r));let e=new Uint8Array(r.length);for(let t=0;t<r.length;++t)e[t]=r.charCodeAt(t);return e}a(s3,"stringToBytes");Vo.stringToBytes=s3;Vo.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Vo.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function nV(r,e,t,n,i,s){let o=typeof t=="string"?s3(t):t,c=typeof n=="string"?(0,i3.default)(n):n;if(typeof n=="string"&&(n=(0,i3.default)(n)),n?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+o.length);if(l.set(c),l.set(o,c.length),l=e(l),l[6]=l[6]&15|r,l[8]=l[8]&63|128,i){if(s=s||0,s<0||s+16>i.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let u=0;u<16;++u)i[s+u]=l[u];return i}return(0,rV.unsafeStringify)(l)}a(nV,"v35");Vo.default=nV});var a3=v(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.URL=rl.DNS=void 0;var iV=n3(),$E=wp(),o3=wp();Object.defineProperty(rl,"DNS",{enumerable:!0,get:a(function(){return o3.DNS},"get")});Object.defineProperty(rl,"URL",{enumerable:!0,get:a(function(){return o3.URL},"get")});function UE(r,e,t,n){return(0,$E.default)(48,iV.default,r,e,t,n)}a(UE,"v3");UE.DNS=$E.DNS;UE.URL=$E.URL;rl.default=UE});var c3=v(BE=>{"use strict";Object.defineProperty(BE,"__esModule",{value:!0});var sV=require("crypto");BE.default={randomUUID:sV.randomUUID}});var u3=v(VE=>{"use strict";Object.defineProperty(VE,"__esModule",{value:!0});var l3=c3(),oV=Wg(),aV=Bo();function cV(r,e,t){if(l3.default.randomUUID&&!e&&!r)return l3.default.randomUUID();r=r||{};let n=r.random??r.rng?.()??(0,oV.default)();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[t+i]=n[i];return e}return(0,aV.unsafeStringify)(n)}a(cV,"v4");VE.default=cV});var f3=v(GE=>{"use strict";Object.defineProperty(GE,"__esModule",{value:!0});var lV=require("crypto");function uV(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),(0,lV.createHash)("sha1").update(r).digest()}a(uV,"sha1");GE.default=uV});var p3=v(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.URL=nl.DNS=void 0;var fV=f3(),qE=wp(),d3=wp();Object.defineProperty(nl,"DNS",{enumerable:!0,get:a(function(){return d3.DNS},"get")});Object.defineProperty(nl,"URL",{enumerable:!0,get:a(function(){return d3.URL},"get")});function WE(r,e,t,n){return(0,qE.default)(80,fV.default,r,e,t,n)}a(WE,"v5");WE.DNS=qE.DNS;WE.URL=qE.URL;nl.default=WE});var h3=v(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:!0});var dV=Bo(),pV=NE(),hV=ME();function mV(r,e,t){r??={},t??=0;let n=(0,pV.default)({...r,_v6:!0},new Uint8Array(16));if(n=(0,hV.default)(n),e){if(t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let i=0;i<16;i++)e[t+i]=n[i];return e}return(0,dV.unsafeStringify)(n)}a(mV,"v6");HE.default=mV});var m3=v(zE=>{"use strict";Object.defineProperty(zE,"__esModule",{value:!0});var gV=yp(),yV=Bo();function _V(r){let e=typeof r=="string"?(0,gV.default)(r):r,t=bV(e);return typeof r=="string"?(0,yV.unsafeStringify)(t):t}a(_V,"v6ToV1");zE.default=_V;function bV(r){return Uint8Array.of((r[3]&15)<<4|r[4]>>4&15,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|r[6]&15,r[7],(r[1]&15)<<4|(r[2]&240)>>4,(r[2]&15)<<4|(r[3]&240)>>4,16|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}a(bV,"_v6ToV1")});var b3=v(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.updateV7State=void 0;var g3=Wg(),SV=Bo(),KE={};function wV(r,e,t){let n;if(r)n=y3(r.random??r.rng?.()??(0,g3.default)(),r.msecs,r.seq,e,t);else{let i=Date.now(),s=(0,g3.default)();_3(KE,i,s),n=y3(s,KE.msecs,KE.seq,e,t)}return e??(0,SV.unsafeStringify)(n)}a(wV,"v7");function _3(r,e,t){return r.msecs??=-1/0,r.seq??=0,e>r.msecs?(r.seq=t[6]<<23|t[7]<<16|t[8]<<8|t[9],r.msecs=e):(r.seq=r.seq+1|0,r.seq===0&&r.msecs++),r}a(_3,"updateV7State");Ep.updateV7State=_3;function y3(r,e,t,n,i=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!n)n=new Uint8Array(16),i=0;else if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return e??=Date.now(),t??=r[6]*127<<24|r[7]<<16|r[8]<<8|r[9],n[i++]=e/1099511627776&255,n[i++]=e/4294967296&255,n[i++]=e/16777216&255,n[i++]=e/65536&255,n[i++]=e/256&255,n[i++]=e&255,n[i++]=112|t>>>28&15,n[i++]=t>>>20&255,n[i++]=128|t>>>14&63,n[i++]=t>>>6&255,n[i++]=t<<2&255|r[10]&3,n[i++]=r[11],n[i++]=r[12],n[i++]=r[13],n[i++]=r[14],n[i++]=r[15],n}a(y3,"v7Bytes");Ep.default=wV});var S3=v(YE=>{"use strict";Object.defineProperty(YE,"__esModule",{value:!0});var EV=gp();function vV(r){if(!(0,EV.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}a(vV,"version");YE.default=vV});var il=v(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.version=Rt.validate=Rt.v7=Rt.v6ToV1=Rt.v6=Rt.v5=Rt.v4=Rt.v3=Rt.v1ToV6=Rt.v1=Rt.stringify=Rt.parse=Rt.NIL=Rt.MAX=void 0;var TV=QP();Object.defineProperty(Rt,"MAX",{enumerable:!0,get:a(function(){return TV.default},"get")});var AV=XP();Object.defineProperty(Rt,"NIL",{enumerable:!0,get:a(function(){return AV.default},"get")});var IV=yp();Object.defineProperty(Rt,"parse",{enumerable:!0,get:a(function(){return IV.default},"get")});var RV=Bo();Object.defineProperty(Rt,"stringify",{enumerable:!0,get:a(function(){return RV.default},"get")});var CV=NE();Object.defineProperty(Rt,"v1",{enumerable:!0,get:a(function(){return CV.default},"get")});var xV=ME();Object.defineProperty(Rt,"v1ToV6",{enumerable:!0,get:a(function(){return xV.default},"get")});var OV=a3();Object.defineProperty(Rt,"v3",{enumerable:!0,get:a(function(){return OV.default},"get")});var PV=u3();Object.defineProperty(Rt,"v4",{enumerable:!0,get:a(function(){return PV.default},"get")});var FV=p3();Object.defineProperty(Rt,"v5",{enumerable:!0,get:a(function(){return FV.default},"get")});var DV=h3();Object.defineProperty(Rt,"v6",{enumerable:!0,get:a(function(){return DV.default},"get")});var LV=m3();Object.defineProperty(Rt,"v6ToV1",{enumerable:!0,get:a(function(){return LV.default},"get")});var NV=b3();Object.defineProperty(Rt,"v7",{enumerable:!0,get:a(function(){return NV.default},"get")});var kV=gp();Object.defineProperty(Rt,"validate",{enumerable:!0,get:a(function(){return kV.default},"get")});var MV=S3();Object.defineProperty(Rt,"version",{enumerable:!0,get:a(function(){return MV.default},"get")})});var JE=v(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});Hg.Exo003UUIDGenerator=void 0;var QE=il(),w3=Vg(),XE=class{static{a(this,"Exo003UUIDGenerator")}static generateNamespaceUUID(e){if(!e||e.trim().length===0)throw new Error("Namespace URI cannot be empty");return(0,QE.v5)(e,w3.UUID_URL_NAMESPACE)}static generateAssetUUID(e,t){if(!t||t.trim().length===0)throw new Error("Local identifier cannot be empty");let n=this.generateNamespaceUUID(e);return(0,QE.v5)(t,n)}static generateFromIRI(e){if(!e||e.trim().length===0)throw new Error("IRI cannot be empty");let{namespace:t,localName:n}=this.splitIRI(e);return n?this.generateAssetUUID(t,n):(0,QE.v5)(e,w3.UUID_URL_NAMESPACE)}static generateBlankNodeUUID(e,t){if(!e||e.trim().length===0)throw new Error("Blank node ID cannot be empty");let n="urn:exocortex:blank-node:",i=t?`${t}#${e}`:e;return this.generateAssetUUID(n,i)}static generateStatementUUID(e,t,n){if(!e||!t||!n)throw new Error("Subject, predicate, and object cannot be empty");let i="urn:exocortex:statement:",s=`${e} ${t} ${n}`;return this.generateAssetUUID(i,s)}static generateBodyUUID(e,t){let n="urn:exocortex:body:",i=e;return t?.datatype?i+=`^^${t.datatype}`:t?.language&&(i+=`@${t.language}`,t.direction&&(i+=`--${t.direction}`)),this.generateAssetUUID(n,i)}static splitIRI(e){let t=e.lastIndexOf("#");if(t!==-1&&t<e.length-1)return{namespace:e.substring(0,t+1),localName:e.substring(t+1)};let n=e.lastIndexOf("/"),i=e.indexOf("://");return n!==-1&&n>i+2&&n<e.length-1?{namespace:e.substring(0,n+1),localName:e.substring(n+1)}:{namespace:e,localName:""}}static isValidUUID(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}};Hg.Exo003UUIDGenerator=XE});var v3=v(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});Kg.Exo003Parser=void 0;var Nt=Vg(),vp=JE(),Wa=Le(),zg=Ye(),E3=rr(),jV=hi(),ZE=class{static{a(this,"Exo003Parser")}static parse(e,t){let n=this.validate(e);if(!n.valid)return{success:!1,errors:n.errors};let i=e.metadata;try{return{success:!0,metadata:this.parseByType(e,i),bodyContent:i===Nt.Exo003MetadataType.Body?t:void 0}}catch(s){return{success:!1,errors:[s instanceof Error?s.message:String(s)]}}}static validate(e){let t=[],n=[];if(!e.metadata)return t.push("Missing required property: metadata"),{valid:!1,errors:t,warnings:n};let i=e.metadata;if(!Object.values(Nt.Exo003MetadataType).includes(i))return t.push(`Invalid metadata: ${i}. Valid types: ${Object.values(Nt.Exo003MetadataType).join(", ")}`),{valid:!1,errors:t,warnings:n};let s=i,o=Nt.ALLOWED_PROPERTIES[s],c=Nt.REQUIRED_PROPERTIES[s];for(let l of c)(e[l]===void 0||e[l]===null)&&t.push(`Missing required property: ${l}`);for(let l of Object.keys(e))o.includes(l)||t.push(`Forbidden property for ${s}: ${l}`);switch(s){case Nt.Exo003MetadataType.Namespace:this.validateNamespaceMetadata(e,t);break;case Nt.Exo003MetadataType.Anchor:this.validateAnchorMetadata(e,t);break;case Nt.Exo003MetadataType.BlankNode:this.validateBlankNodeMetadata(e,t);break;case Nt.Exo003MetadataType.Statement:this.validateStatementMetadata(e,t);break;case Nt.Exo003MetadataType.Body:this.validateBodyMetadata(e,t,n);break}return{valid:t.length===0,errors:t,warnings:n}}static parseByType(e,t){let n={metadata:t,aliases:e.aliases};switch(t){case Nt.Exo003MetadataType.Namespace:return{...n,metadata:Nt.Exo003MetadataType.Namespace,uri:e.uri};case Nt.Exo003MetadataType.Anchor:return{...n,metadata:Nt.Exo003MetadataType.Anchor,uri:e.uri};case Nt.Exo003MetadataType.BlankNode:return{...n,metadata:Nt.Exo003MetadataType.BlankNode,uri:e.uri};case Nt.Exo003MetadataType.Statement:return{...n,metadata:Nt.Exo003MetadataType.Statement,subject:e.subject,predicate:e.predicate,object:e.object};case Nt.Exo003MetadataType.Body:return{...n,metadata:Nt.Exo003MetadataType.Body,subject:e.subject,predicate:e.predicate}}}static validateNamespaceMetadata(e,t){let n=e.uri;if(n&&typeof n!="string")t.push("uri must be a string");else if(n)try{new Wa.IRI(n)}catch{t.push(`uri is not a valid IRI: ${String(n)}`)}}static validateAnchorMetadata(e,t){let n=e.uri;if(n&&typeof n!="string")t.push("uri must be a string");else if(n)try{new Wa.IRI(n)}catch{t.push(`uri is not a valid IRI: ${String(n)}`)}}static validateBlankNodeMetadata(e,t){let n=e.uri;if(n&&typeof n!="string")t.push("uri must be a string");else if(n){let i=n;if(!i.startsWith("_:"))try{new Wa.IRI(i)}catch{t.push(`uri is not a valid IRI or blank node identifier: ${String(n)}`)}}}static validateStatementMetadata(e,t){let n=e.subject,i=e.predicate,s=e.object,o=[["subject",n],["predicate",i],["object",s]];for(let[c,l]of o)l&&typeof l!="string"&&t.push(`${c} must be a string`)}static validateBodyMetadata(e,t,n){let i=e.subject,s=e.predicate;i&&typeof i!="string"&&t.push("subject must be a string"),s&&typeof s!="string"&&t.push("predicate must be a string")}static toTriple(e,t,n){let i=t(e.subject),s;if(i.type==="iri")s=new Wa.IRI(i.value);else if(i.type==="blank")s=new E3.BlankNode(i.value);else throw new Error("Statement subject cannot be a literal");let o=t(e.predicate);if(o.type!=="iri")throw new Error("Statement predicate must be an IRI");let c=new Wa.IRI(o.value),l=t(e.object),u;if(l.type==="iri")u=new Wa.IRI(l.value);else if(l.type==="blank")u=new E3.BlankNode(l.value);else{let f=n||l.value;if(l.datatype)u=new zg.Literal(f,new Wa.IRI(l.datatype));else{let d=l.language||Nt.DEFAULT_LANGUAGE_TAG;u=(0,zg.createDirectionalLiteral)(f,d,l.direction)}}return new jV.Triple(s,c,u)}static toLiteral(e,t,n){if(n?.datatype)return new zg.Literal(t,new Wa.IRI(n.datatype));let i=n?.language||Nt.DEFAULT_LANGUAGE_TAG;return(0,zg.createDirectionalLiteral)(t,i,n?.direction)}static isExo003Format(e){let t=e.metadata;return typeof t=="string"&&Object.values(Nt.Exo003MetadataType).includes(t)}static generateUUID(e,t){switch(e.metadata){case Nt.Exo003MetadataType.Namespace:return vp.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case Nt.Exo003MetadataType.Anchor:return vp.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case Nt.Exo003MetadataType.BlankNode:return vp.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case Nt.Exo003MetadataType.Statement:{let n=e;return vp.Exo003UUIDGenerator.generateStatementUUID(n.subject,n.predicate,n.object)}case Nt.Exo003MetadataType.Body:{let n=e;return vp.Exo003UUIDGenerator.generateBodyUUID(n.subject+"|"+n.predicate)}}}};Kg.Exo003Parser=ZE});var ev=v(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.Exo003Parser=An.Exo003UUIDGenerator=An.UUID_URL_NAMESPACE=An.DEFAULT_LANGUAGE_TAG=An.REQUIRED_PROPERTIES=An.ALLOWED_PROPERTIES=An.Exo003MetadataType=void 0;var Tp=Vg();Object.defineProperty(An,"Exo003MetadataType",{enumerable:!0,get:a(function(){return Tp.Exo003MetadataType},"get")});Object.defineProperty(An,"ALLOWED_PROPERTIES",{enumerable:!0,get:a(function(){return Tp.ALLOWED_PROPERTIES},"get")});Object.defineProperty(An,"REQUIRED_PROPERTIES",{enumerable:!0,get:a(function(){return Tp.REQUIRED_PROPERTIES},"get")});Object.defineProperty(An,"DEFAULT_LANGUAGE_TAG",{enumerable:!0,get:a(function(){return Tp.DEFAULT_LANGUAGE_TAG},"get")});Object.defineProperty(An,"UUID_URL_NAMESPACE",{enumerable:!0,get:a(function(){return Tp.UUID_URL_NAMESPACE},"get")});var $V=JE();Object.defineProperty(An,"Exo003UUIDGenerator",{enumerable:!0,get:a(function(){return $V.Exo003UUIDGenerator},"get")});var UV=v3();Object.defineProperty(An,"Exo003Parser",{enumerable:!0,get:a(function(){return UV.Exo003Parser},"get")})});var eo=v(Yg=>{"use strict";Object.defineProperty(Yg,"__esModule",{value:!0});Yg.WikiLinkHelpers=void 0;var Ap=class{static{a(this,"WikiLinkHelpers")}static normalize(e){if(!e)return"";let t=e.replace(this.WIKI_LINK_PATTERN,"").trim();if(!t)return"";let n=t.indexOf("|");if(n===-1)return t;let i=t.substring(0,n).trim(),s=t.substring(n+1).trim();return this.UUID_PATTERN.test(i)&&s||i}static normalizeArray(e){return e?(Array.isArray(e)?e:[e]).map(n=>this.normalize(n)).filter(n=>n.length>0):[]}static equals(e,t){return this.normalize(e)===this.normalize(t)}static includes(e,t){let n=this.normalizeArray(e),i=this.normalize(t);return n.includes(i)}static resolveSymbolic(e,t){let n=this.normalize(e);if(!n)return"";if(this.UUID_PATTERN.test(n)){let i=t(n);return i&&i.length>0?i:n}return n}static resolveSymbolicArray(e,t){return e?(Array.isArray(e)?e:[e]).map(i=>this.resolveSymbolic(i,t)).filter(i=>i.length>0):[]}};Yg.WikiLinkHelpers=Ap;Ap.WIKI_LINK_PATTERN=/\[\[|\]\]/g;Ap.UUID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i});var Rp=v(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.CommandBindingProperty=lt.GroundingProperty=lt.PreconditionProperty=lt.CommandProperty=lt.resolveGroundingTypeFromWikilinkLiteral=lt.resolveGroundingTypeFromIRI=lt.GROUNDING_TYPE_IRI_TO_ENUM=lt.GROUNDING_TYPE_UID_TO_ENUM=lt.GROUNDING_TYPE_UIDS=lt.GroundingType=lt.EFFORT_STATUS_OPTIONS=lt.normalizeEffortStatus=lt.EFFORT_STATUS_BY_UID=lt.EFFORT_STATUS_UID=lt.EffortStatus=lt.AssetClass=void 0;var BV=Zc();Object.defineProperty(lt,"AssetClass",{enumerable:!0,get:a(function(){return BV.AssetClass},"get")});var VV=el();Object.defineProperty(lt,"EffortStatus",{enumerable:!0,get:a(function(){return VV.EffortStatus},"get")});var tv=Au();Object.defineProperty(lt,"EFFORT_STATUS_UID",{enumerable:!0,get:a(function(){return tv.EFFORT_STATUS_UID},"get")});Object.defineProperty(lt,"EFFORT_STATUS_BY_UID",{enumerable:!0,get:a(function(){return tv.EFFORT_STATUS_BY_UID},"get")});Object.defineProperty(lt,"normalizeEffortStatus",{enumerable:!0,get:a(function(){return tv.normalizeEffortStatus},"get")});var GV=hE();Object.defineProperty(lt,"EFFORT_STATUS_OPTIONS",{enumerable:!0,get:a(function(){return GV.EFFORT_STATUS_OPTIONS},"get")});var qV=qa();Object.defineProperty(lt,"GroundingType",{enumerable:!0,get:a(function(){return qV.GroundingType},"get")});var Ip=pp();Object.defineProperty(lt,"GROUNDING_TYPE_UIDS",{enumerable:!0,get:a(function(){return Ip.GROUNDING_TYPE_UIDS},"get")});Object.defineProperty(lt,"GROUNDING_TYPE_UID_TO_ENUM",{enumerable:!0,get:a(function(){return Ip.GROUNDING_TYPE_UID_TO_ENUM},"get")});Object.defineProperty(lt,"GROUNDING_TYPE_IRI_TO_ENUM",{enumerable:!0,get:a(function(){return Ip.GROUNDING_TYPE_IRI_TO_ENUM},"get")});Object.defineProperty(lt,"resolveGroundingTypeFromIRI",{enumerable:!0,get:a(function(){return Ip.resolveGroundingTypeFromIRI},"get")});Object.defineProperty(lt,"resolveGroundingTypeFromWikilinkLiteral",{enumerable:!0,get:a(function(){return Ip.resolveGroundingTypeFromWikilinkLiteral},"get")});var Qg=mE();Object.defineProperty(lt,"CommandProperty",{enumerable:!0,get:a(function(){return Qg.CommandProperty},"get")});Object.defineProperty(lt,"PreconditionProperty",{enumerable:!0,get:a(function(){return Qg.PreconditionProperty},"get")});Object.defineProperty(lt,"GroundingProperty",{enumerable:!0,get:a(function(){return Qg.GroundingProperty},"get")});Object.defineProperty(lt,"CommandBindingProperty",{enumerable:!0,get:a(function(){return Qg.CommandBindingProperty},"get")})});var R3=v(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.hasClass=ol;In.isAreaOrProject=WV;In.isEffort=HV;In.hasStatus=zV;In.isAssetArchived=KV;In.hasEmptyProperties=YV;In.needsFolderRepair=QV;In.getTodayDateString=rv;In.isPlannedForToday=XV;In.hasPlannedStartTimestamp=JV;In.extractDailyNoteDate=ZV;In.isCurrentDateGteDay=eG;In.inheritsFromPrototype=I3;In.isPrototypeClass=rG;var A3=eo(),sl=Rp();function ol(r,e){return r?(Array.isArray(r)?r:[r]).some(n=>A3.WikiLinkHelpers.normalize(n)===e):!1}a(ol,"hasClass");function WV(r){return ol(r,sl.AssetClass.AREA)||ol(r,sl.AssetClass.PROJECT)}a(WV,"isAreaOrProject");function HV(r){return ol(r,sl.AssetClass.TASK)||ol(r,sl.AssetClass.PROJECT)||ol(r,sl.AssetClass.MEETING)}a(HV,"isEffort");function zV(r,e){if(!r)return!1;let t=Array.isArray(r)?r[0]:r;return t?A3.WikiLinkHelpers.normalize(t)===e:!1}a(zV,"hasStatus");function KV(r){if(r===!0||r===1)return!0;if(typeof r=="string"){let e=r.toLowerCase();return e==="true"||e==="yes"}return!1}a(KV,"isAssetArchived");function YV(r){if(!r||Object.keys(r).length===0)return!1;let e=a(t=>t==null||t==="","isEmptyArrayItem");return Object.values(r).some(t=>t==null?!0:typeof t=="string"?t==="":Array.isArray(t)?t.length===0||t.every(e):typeof t=="object"&&Object.keys(t).length===0)}a(YV,"hasEmptyProperties");function QV(r,e){if(!e)return!1;let t=r.replace(/\/$/,""),n=e.replace(/\/$/,"");return t!==n}a(QV,"needsFolderRepair");function rv(){let r=new Date,e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`}a(rv,"getTodayDateString");function XV(r){let e=r.ems__Effort_plannedStartTimestamp;if(!e)return!1;let t=rv();return typeof e=="string"?e.split("T")[0]===t:Array.isArray(e)&&e.length>0?String(e[0]).split("T")[0]===t:!1}a(XV,"isPlannedForToday");function JV(r){let e=r.ems__Effort_plannedStartTimestamp;return e?typeof e=="string"?e.trim().length>0:Array.isArray(e)&&e.length>0?String(e[0]).trim().length>0:!1:!1}a(JV,"hasPlannedStartTimestamp");function ZV(r){let e=r.pn__DailyNote_day;if(!e)return null;if(typeof e=="string"){let t=e.match(/\[\[([^\[\]]+)\]\]/);return t?t[1]:e}if(Array.isArray(e)&&e.length>0){let t=String(e[0]),n=t.match(/\[\[([^\[\]]+)\]\]/);return n?n[1]:t}return null}a(ZV,"extractDailyNoteDate");function eG(r){return rv()>=r}a(eG,"isCurrentDateGteDay");function T3(r){return r?r.replace(/^["']|["']$/g,"").replace(/\[\[|\]\]/g,"").trim():""}a(T3,"normalizeWithQuotes");var tG=10;function I3(r,e=tG){let t=r.exo__Class_superClass;if(!t)return!1;let n=new Set,i=[],s=Array.isArray(t)?t:[t];for(let o of s){let c=T3(o);c&&i.push({className:c,depth:0})}for(;i.length>0;){let o=i.shift();if(!o)continue;let{className:c,depth:l}=o;if(l>e)continue;if(c===sl.AssetClass.PROTOTYPE)return!0;if(n.has(c))continue;n.add(c);let u=`${c}__exo__Class_superClass`,f=r[u];if(f){let d=Array.isArray(f)?f:[f];for(let p of d){let h=T3(p);h&&!n.has(h)&&i.push({className:h,depth:l+1})}}}return!1}a(I3,"inheritsFromPrototype");function rG(r,e){return ol(r,sl.AssetClass.CLASS)?I3(e):!1}a(rG,"isPrototypeClass")});var C3=v(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.isPrototypeClass=Ct.inheritsFromPrototype=Ct.isCurrentDateGteDay=Ct.extractDailyNoteDate=Ct.hasPlannedStartTimestamp=Ct.isPlannedForToday=Ct.getTodayDateString=Ct.needsFolderRepair=Ct.hasEmptyProperties=Ct.isAssetArchived=Ct.hasStatus=Ct.isEffort=Ct.isAreaOrProject=Ct.hasClass=void 0;var mi=R3();Object.defineProperty(Ct,"hasClass",{enumerable:!0,get:a(function(){return mi.hasClass},"get")});Object.defineProperty(Ct,"isAreaOrProject",{enumerable:!0,get:a(function(){return mi.isAreaOrProject},"get")});Object.defineProperty(Ct,"isEffort",{enumerable:!0,get:a(function(){return mi.isEffort},"get")});Object.defineProperty(Ct,"hasStatus",{enumerable:!0,get:a(function(){return mi.hasStatus},"get")});Object.defineProperty(Ct,"isAssetArchived",{enumerable:!0,get:a(function(){return mi.isAssetArchived},"get")});Object.defineProperty(Ct,"hasEmptyProperties",{enumerable:!0,get:a(function(){return mi.hasEmptyProperties},"get")});Object.defineProperty(Ct,"needsFolderRepair",{enumerable:!0,get:a(function(){return mi.needsFolderRepair},"get")});Object.defineProperty(Ct,"getTodayDateString",{enumerable:!0,get:a(function(){return mi.getTodayDateString},"get")});Object.defineProperty(Ct,"isPlannedForToday",{enumerable:!0,get:a(function(){return mi.isPlannedForToday},"get")});Object.defineProperty(Ct,"hasPlannedStartTimestamp",{enumerable:!0,get:a(function(){return mi.hasPlannedStartTimestamp},"get")});Object.defineProperty(Ct,"extractDailyNoteDate",{enumerable:!0,get:a(function(){return mi.extractDailyNoteDate},"get")});Object.defineProperty(Ct,"isCurrentDateGteDay",{enumerable:!0,get:a(function(){return mi.isCurrentDateGteDay},"get")});Object.defineProperty(Ct,"inheritsFromPrototype",{enumerable:!0,get:a(function(){return mi.inheritsFromPrototype},"get")});Object.defineProperty(Ct,"isPrototypeClass",{enumerable:!0,get:a(function(){return mi.isPrototypeClass},"get")})});var x3=v(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.TsFloorViolationError=xt.CATALOG_KEEP_NAMESPACES=xt.PLUGIN_UI_FLOOR=xt.SDK_FLOOR=xt.PLUGIN_UI_FLOOR_ASSETSPACE_UIDS=xt.SDK_FLOOR_ASSETSPACE_UIDS=xt.TS_FLOOR_AS_UID_SHARED_IDENTITIES=xt.TS_FLOOR_AS_UID_EXOCMD=xt.TS_FLOOR_AS_UID_EXO=void 0;xt.assertTsFloor=nG;xt.assertTsFloorReconciled=iG;xt.isTsFloorAssetSpace=sG;xt.isTsFloorMountPath=oG;xt.TS_FLOOR_AS_UID_EXO="49fd2e56-4656-4ca7-a789-f472b16ea260";xt.TS_FLOOR_AS_UID_EXOCMD="c9c65b0f-1e01-47c1-a1f9-1bf70b11df6a";xt.TS_FLOOR_AS_UID_SHARED_IDENTITIES="0cde1557-6320-4bd0-a7c4-8b72afc38720";xt.SDK_FLOOR_ASSETSPACE_UIDS=new Set([xt.TS_FLOOR_AS_UID_EXO]);xt.PLUGIN_UI_FLOOR_ASSETSPACE_UIDS=new Set([xt.TS_FLOOR_AS_UID_EXO]);xt.SDK_FLOOR=[{uid:xt.TS_FLOOR_AS_UID_EXO,namespace:"exo"}];xt.PLUGIN_UI_FLOOR=xt.SDK_FLOOR;xt.CATALOG_KEEP_NAMESPACES=new Set(["registry","profiles"]);var Cp=class extends Error{static{a(this,"TsFloorViolationError")}constructor(e){super(e),this.name="TsFloorViolationError"}};xt.TsFloorViolationError=Cp;function nG(r,e){let t=[];for(let n of e)r.has(n)||t.push(n);if(t.length>0)throw new Cp(`Target profile's declared set excludes TS-floor AssetSpace UID(s): ${t.join(", ")}. Profile switch aborted to prevent runtime self-brick (R24).`)}a(nG,"assertTsFloor");function iG(r,e,t){let n=[];for(let i of t)r.has(i.uid)||e.has(i.namespace)||n.push(`${i.namespace} (${i.uid})`);if(n.length>0)throw new Cp(`Target profile's declared set excludes TS-floor AssetSpace(s): ${n.join(", ")}. Profile switch aborted to prevent runtime self-brick (R24).`)}a(iG,"assertTsFloorReconciled");function sG(r,e,t=xt.SDK_FLOOR){return t.some(n=>r.length>0&&n.uid===r||e.length>0&&n.namespace===e)}a(sG,"isTsFloorAssetSpace");function oG(r,e=xt.SDK_FLOOR){let t=r.replace(/\/+$/,""),n=t.slice(t.lastIndexOf("/")+1),i=n.startsWith("exoas-")?n.slice(6):n;return i.length===0?!1:e.some(s=>s.namespace===i)}a(oG,"isTsFloorMountPath")});var O3=v(nv=>{"use strict";Object.defineProperty(nv,"__esModule",{value:!0});nv.transitiveDependsOnClosure=aG;function aG(r,e){let t=new Set,n=[];for(let i of r)t.has(i)||(t.add(i),n.push(i));for(;n.length>0;){let i=n.shift();if(i===void 0)break;let s=e.get(i);if(s!==void 0)for(let o of s)t.has(o)||(t.add(o),n.push(o))}return t}a(aG,"transitiveDependsOnClosure")});var iv=v(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.PARKED_ROOT=gi.DEPENDENCY_KIND_REFERENCE_UID=gi.DEPENDENCY_KIND_TBOX_UID=void 0;gi.resolveDependencyKind=F3;gi.parkedPathFor=lG;gi.classifyMountTransition=uG;gi.DEPENDENCY_KIND_TBOX_UID="e1d7fb5c-d334-448d-935b-953b7b033e78";gi.DEPENDENCY_KIND_REFERENCE_UID="fe529085-5370-4ac0-bbe4-1c7351242dee";var cG="dependencykindreference";function F3(r){let e=Array.isArray(r)?r[0]:r;if(typeof e!="string")return"tbox";let t=e.toLowerCase();return t.includes(gi.DEPENDENCY_KIND_TBOX_UID)?"tbox":t.includes(gi.DEPENDENCY_KIND_REFERENCE_UID)||t.includes(cG)?"reference":"tbox"}a(F3,"resolveDependencyKind");gi.PARKED_ROOT=".exocortex/parked";var P3="assetspaces/";function lG(r){let e=r.split("/");if(r.length===0||!r.startsWith(P3)||e.some(t=>t.length===0||t==="."||t===".."))throw new Error(`parkedPathFor: refusing unsafe mount folder "${r}"`);return`${gi.PARKED_ROOT}/${r.slice(P3.length)}`}a(lG,"parkedPathFor");function uG(r){let{state:e,inEffectiveSet:t,dependsOnKind:n,canPark:i=!0}=r;switch(e){case"active":return t?"none":i&&F3(n)==="reference"?"park":"destroy";case"parked":return t?"unpark":"none";case"absent":return t?"materialize":"none"}}a(uG,"classifyMountTransition")});var N3=v(Xg=>{"use strict";Object.defineProperty(Xg,"__esModule",{value:!0});Xg.ParkedAssetIndex=void 0;var D3=iv();function fG(r){let t=r.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim().split("#")[0].trim();return(t.split("/").pop()??t).replace(/\.md$/i,"")}a(fG,"normalizeLinkTarget");function L3(r){let e=r.match(/^---\r?\n([\s\S]*?)\r?\n---/);return e===null?null:e[1]}a(L3,"frontmatterOf");function dG(r){let e=L3(r);if(e===null)return!1;let t=e.match(/^exo__Asset_uid:[ \t]*(.+)$/m);return t!==null&&t[1].trim().length>0}a(dG,"hasAssetUid");function pG(r){let e=L3(r);if(e===null)return null;let t=e.match(/^exo__Asset_label:[ \t]*(.+)$/m);if(t===null)return null;let n=t[1].trim();return n.length<1?null:n.length>=2&&n.startsWith('"')&&n.endsWith('"')?sv(n.slice(1,-1).replace(/\\(["\\ntr])/g,(i,s)=>s==="n"?`
32
32
  `:s==="t"?" ":s==="r"?"\r":s)):n.length>=2&&n.startsWith("'")&&n.endsWith("'")?sv(n.slice(1,-1).replace(/''/g,"'")):sv(n)}a(pG,"extractLabel");function sv(r){return r.length===0?null:r}a(sv,"orNull");var ov=class{static{a(this,"ParkedAssetIndex")}constructor(e){this.index=null,this.building=null,this.generation=0,this.reader=e}invalidate(){this.index=null,this.building=null,this.generation+=1}async lookup(e){let t=fG(e);if(t.length===0)return null;let i=(await this.ensureIndex()).get(t);if(i===void 0)return null;let s=hG(i);if(s===null)return null;let o;try{o=await this.reader.read(i)}catch{return null}return dG(o)?{path:i,assetSpace:s,label:pG(o)}:null}async ensureIndex(){if(this.index!==null)return this.index;let e=this.generation;this.building===null&&(this.building=this.buildIndex());let t=this.building,n=await t;return e!==this.generation?(this.building===t&&(this.building=null),this.ensureIndex()):(this.index=n,this.building===t&&(this.building=null),n)}async buildIndex(){let e=new Map;return await this.walk(D3.PARKED_ROOT,e),e}async walk(e,t){let n;try{if(!await this.reader.exists(e))return;n=await this.reader.list(e)}catch{return}for(let i of n.files){if(!i.toLowerCase().endsWith(".md"))continue;let s=(i.split("/").pop()??i).replace(/\.md$/i,"");s.length===0||t.has(s)||t.set(s,i)}for(let i of n.folders)(i.split("/").pop()??i).startsWith(".")||await this.walk(i,t)}};Xg.ParkedAssetIndex=ov;function hG(r){let e=`${D3.PARKED_ROOT}/`;if(!r.startsWith(e))return null;let t=r.slice(e.length).split("/");if(t.length<3)return null;let[n,i]=t;return n.length===0||i.length===0?null:`${n}/${i}`}a(hG,"assetSpaceOf")});var Jg=v(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.PropertyFieldType=void 0;xp.rangeToFieldType=yG;var dn;(function(r){r.Text="text",r.Number="number",r.Date="date",r.DateTime="datetime",r.Boolean="boolean",r.Reference="reference",r.Enum="enum",r.StatusSelect="status-select",r.SizeSelect="size-select",r.Wikilink="wikilink",r.Timestamp="timestamp",r.Unknown="unknown"})(dn||(xp.PropertyFieldType=dn={}));var k3="http://www.w3.org/2001/XMLSchema#",mG="https://exocortex.my/ontology/exo#",gG="https://exocortex.my/ontology/ems#";function yG(r){if(!r)return dn.Unknown;let e=r.trim();if(!e)return dn.Unknown;if(e.startsWith(k3)){let t=e.substring(k3.length);return av(t)}if(e.startsWith("xsd:")){let t=e.substring(4);return av(t)}if(e.includes("XMLSchema#")){let t=e.indexOf("XMLSchema#"),n=e.substring(t+10);return av(n)}return e.startsWith(gG)||e.startsWith("ems:")?_G(e):e.startsWith(mG)||e.startsWith("exo:")||bG(e)?dn.Reference:dn.Text}a(yG,"rangeToFieldType");function av(r){switch(r.toLowerCase()){case"string":case"normalizedstring":case"token":case"language":case"nmtoken":case"name":case"ncname":case"anyuri":return dn.Text;case"integer":case"int":case"long":case"short":case"byte":case"nonnegativeinteger":case"positiveinteger":case"nonpositiveinteger":case"negativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"decimal":case"float":case"double":return dn.Number;case"date":return dn.Date;case"datetime":case"datetimestamp":return dn.DateTime;case"boolean":return dn.Boolean;case"time":return dn.Timestamp;default:return dn.Text}}a(av,"xsdTypeToFieldType");function _G(r){let e=r.toLowerCase();return e.includes("effortstatus")?dn.StatusSelect:e.includes("tasksize")?dn.SizeSelect:dn.Reference}a(_G,"emsTypeToFieldType");function bG(r){let e=r.toLowerCase();return e.includes("exocortex.my/ontology")?!0:["asset","task","project","area","effort","class","property","concept"].some(n=>e.includes(n))}a(bG,"isClassReference")});var cv=v(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});Op.propertyNameToUri=SG;Op.uriToPropertyName=M3;Op.extractPropertyLabel=wG;function SG(r){return r.replace(/^([a-z]+)__/,"$1:")}a(SG,"propertyNameToUri");function M3(r){if(r.startsWith("http://")||r.startsWith("https://")){let e=r.match(/\/([a-z]+)#([A-Za-z0-9_]+)$/);if(e)return`${e[1]}__${e[2]}`;let t=r.lastIndexOf("#"),n=r.lastIndexOf("/"),i=Math.max(t,n);return i>=0?r.substring(i+1):r}return r.replace(/^([a-z]+):/,"$1__")}a(M3,"uriToPropertyName");function wG(r){let n=(r.includes(":")?M3(r):r).replace(/^[a-z]+__/,"").split("_");return(n.length>1?n.slice(1).join(" "):n[0]).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,s=>s.toUpperCase())}a(wG,"extractPropertyLabel")});var Zg={};Sg(Zg,{__assign:()=>uv,__asyncDelegator:()=>LG,__asyncGenerator:()=>DG,__asyncValues:()=>NG,__await:()=>Pp,__awaiter:()=>RG,__classPrivateFieldGet:()=>$G,__classPrivateFieldSet:()=>UG,__createBinding:()=>xG,__decorate:()=>TG,__exportStar:()=>OG,__extends:()=>EG,__generator:()=>CG,__importDefault:()=>jG,__importStar:()=>MG,__makeTemplateObject:()=>kG,__metadata:()=>IG,__param:()=>AG,__read:()=>j3,__rest:()=>vG,__spread:()=>PG,__spreadArrays:()=>FG,__values:()=>fv});function EG(r,e){lv(r,e);function t(){this.constructor=r}a(t,"__"),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function vG(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t}function TG(r,e,t,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,n);else for(var c=r.length-1;c>=0;c--)(o=r[c])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s}function AG(r,e){return function(t,n){e(t,n,r)}}function IG(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function RG(r,e,t,n){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return a(i,"adopt"),new(t||(t=Promise))(function(s,o){function c(f){try{u(n.next(f))}catch(d){o(d)}}a(c,"fulfilled");function l(f){try{u(n.throw(f))}catch(d){o(d)}}a(l,"rejected");function u(f){f.done?s(f.value):i(f.value).then(c,l)}a(u,"step"),u((n=n.apply(r,e||[])).next())})}function CG(r,e){var t={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},n,i,s,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(u){return function(f){return l([u,f])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){t.label=u[1];break}if(u[0]===6&&t.label<s[1]){t.label=s[1],s=u;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(u);break}s[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(r,t)}catch(f){u=[6,f],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function xG(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}function OG(r,e){for(var t in r)t!=="default"&&!e.hasOwnProperty(t)&&(e[t]=r[t])}function fv(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:a(function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function j3(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s}function PG(){for(var r=[],e=0;e<arguments.length;e++)r=r.concat(j3(arguments[e]));return r}function FG(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),i=0,e=0;e<t;e++)for(var s=arguments[e],o=0,c=s.length;o<c;o++,i++)n[i]=s[o];return n}function Pp(r){return this instanceof Pp?(this.v=r,this):new Pp(r)}function DG(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(p){n[p]&&(i[p]=function(h){return new Promise(function(m,y){s.push([p,h,m,y])>1||c(p,h)})})}function c(p,h){try{l(n[p](h))}catch(m){d(s[0][3],m)}}function l(p){p.value instanceof Pp?Promise.resolve(p.value.v).then(u,f):d(s[0][2],p)}function u(p){c("next",p)}function f(p){c("throw",p)}function d(p,h){p(h),s.shift(),s.length&&c(s[0][0],s[0][1])}}function LG(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=r[i]?function(o){return(t=!t)?{value:Pp(r[i](o)),done:i==="return"}:s?s(o):o}:s}}function NG(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof fv=="function"?fv(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(o){return new Promise(function(c,l){o=r[s](o),i(c,l,o.done,o.value)})}}function i(s,o,c,l){Promise.resolve(l).then(function(u){s({value:u,done:c})},o)}}function kG(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function MG(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}function jG(r){return r&&r.__esModule?r:{default:r}}function $G(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)}function UG(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}var lv,uv,ey=je(()=>{lv=a(function(r,e){return lv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])},lv(r,e)},"extendStatics");a(EG,"__extends");uv=a(function(){return uv=Object.assign||a(function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},"__assign"),uv.apply(this,arguments)},"__assign");a(vG,"__rest");a(TG,"__decorate");a(AG,"__param");a(IG,"__metadata");a(RG,"__awaiter");a(CG,"__generator");a(xG,"__createBinding");a(OG,"__exportStar");a(fv,"__values");a(j3,"__read");a(PG,"__spread");a(FG,"__spreadArrays");a(Pp,"__await");a(DG,"__asyncGenerator");a(LG,"__asyncDelegator");a(NG,"__asyncValues");a(kG,"__makeTemplateObject");a(MG,"__importStar");a(jG,"__importDefault");a($G,"__classPrivateFieldGet");a(UG,"__classPrivateFieldSet")});var hv=v(pv=>{"use strict";Object.defineProperty(pv,"__esModule",{value:!0});var dv;(function(r){r[r.Transient=0]="Transient",r[r.Singleton=1]="Singleton",r[r.ResolutionScoped=2]="ResolutionScoped",r[r.ContainerScoped=3]="ContainerScoped"})(dv||(dv={}));pv.default=dv});var $3=v(mv=>{"use strict";Object.defineProperty(mv,"__esModule",{value:!0});var BG=hv();Object.defineProperty(mv,"Lifecycle",{enumerable:!0,get:a(function(){return BG.default},"get")})});var al=v(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.defineInjectionTokenMetadata=ls.getParamInfo=ls.INJECTION_TOKEN_METADATA_KEY=void 0;ls.INJECTION_TOKEN_METADATA_KEY="injectionTokens";function VG(r){let e=Reflect.getMetadata("design:paramtypes",r)||[],t=Reflect.getOwnMetadata(ls.INJECTION_TOKEN_METADATA_KEY,r)||{};return Object.keys(t).forEach(n=>{e[+n]=t[n]}),e}a(VG,"getParamInfo");ls.getParamInfo=VG;function GG(r,e){return function(t,n,i){let s=Reflect.getOwnMetadata(ls.INJECTION_TOKEN_METADATA_KEY,t)||{};s[i]=e?{token:r,transform:e.transformToken,transformArgs:e.args||[]}:r,Reflect.defineMetadata(ls.INJECTION_TOKEN_METADATA_KEY,s,t)}}a(GG,"defineInjectionTokenMetadata");ls.defineInjectionTokenMetadata=GG});var gv=v(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.isClassProvider=void 0;function qG(r){return!!r.useClass}a(qG,"isClassProvider");ty.isClassProvider=qG});var yv=v(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.isFactoryProvider=void 0;function WG(r){return!!r.useFactory}a(WG,"isFactoryProvider");ry.isFactoryProvider=WG});var iy=v(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.delay=Ru.DelayedConstructor=void 0;var ny=class{static{a(this,"DelayedConstructor")}constructor(e){this.wrap=e,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}createProxy(e){let t={},n=!1,i,s=a(()=>(n||(i=e(this.wrap()),n=!0),i),"delayedObject");return new Proxy(t,this.createHandler(s))}createHandler(e){let t={},n=a(i=>{t[i]=(...s)=>{s[0]=e();let o=Reflect[i];return o(...s)}},"install");return this.reflectMethods.forEach(n),t}};Ru.DelayedConstructor=ny;function HG(r){if(typeof r>"u")throw new Error("Attempt to `delay` undefined. Constructor must be wrapped in a callback");return new ny(r)}a(HG,"delay");Ru.delay=HG});var sy=v(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.isConstructorToken=to.isTransformDescriptor=to.isTokenDescriptor=to.isNormalToken=void 0;var zG=iy();function KG(r){return typeof r=="string"||typeof r=="symbol"}a(KG,"isNormalToken");to.isNormalToken=KG;function YG(r){return typeof r=="object"&&"token"in r&&"multiple"in r}a(YG,"isTokenDescriptor");to.isTokenDescriptor=YG;function QG(r){return typeof r=="object"&&"token"in r&&"transform"in r}a(QG,"isTransformDescriptor");to.isTransformDescriptor=QG;function XG(r){return typeof r=="function"||r instanceof zG.DelayedConstructor}a(XG,"isConstructorToken");to.isConstructorToken=XG});var _v=v(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});oy.isTokenProvider=void 0;function JG(r){return!!r.useToken}a(JG,"isTokenProvider");oy.isTokenProvider=JG});var bv=v(ay=>{"use strict";Object.defineProperty(ay,"__esModule",{value:!0});ay.isValueProvider=void 0;function ZG(r){return r.useValue!=null}a(ZG,"isValueProvider");ay.isValueProvider=ZG});var Sv=v(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var eq=gv();Object.defineProperty(cl,"isClassProvider",{enumerable:!0,get:a(function(){return eq.isClassProvider},"get")});var tq=yv();Object.defineProperty(cl,"isFactoryProvider",{enumerable:!0,get:a(function(){return tq.isFactoryProvider},"get")});var rq=sy();Object.defineProperty(cl,"isNormalToken",{enumerable:!0,get:a(function(){return rq.isNormalToken},"get")});var nq=_v();Object.defineProperty(cl,"isTokenProvider",{enumerable:!0,get:a(function(){return nq.isTokenProvider},"get")});var iq=bv();Object.defineProperty(cl,"isValueProvider",{enumerable:!0,get:a(function(){return iq.isValueProvider},"get")})});var U3=v(cy=>{"use strict";Object.defineProperty(cy,"__esModule",{value:!0});cy.isProvider=void 0;var sq=gv(),oq=bv(),aq=_v(),cq=yv();function lq(r){return sq.isClassProvider(r)||oq.isValueProvider(r)||aq.isTokenProvider(r)||cq.isFactoryProvider(r)}a(lq,"isProvider");cy.isProvider=lq});var vv=v(Ev=>{"use strict";Object.defineProperty(Ev,"__esModule",{value:!0});var wv=class{static{a(this,"RegistryBase")}constructor(){this._registryMap=new Map}entries(){return this._registryMap.entries()}getAll(e){return this.ensure(e),this._registryMap.get(e)}get(e){this.ensure(e);let t=this._registryMap.get(e);return t[t.length-1]||null}set(e,t){this.ensure(e),this._registryMap.get(e).push(t)}setAll(e,t){this._registryMap.set(e,t)}has(e){return this.ensure(e),this._registryMap.get(e).length>0}clear(){this._registryMap.clear()}ensure(e){this._registryMap.has(e)||this._registryMap.set(e,[])}};Ev.default=wv});var B3=v(Av=>{"use strict";Object.defineProperty(Av,"__esModule",{value:!0});var uq=vv(),Tv=class extends uq.default{static{a(this,"Registry")}};Av.default=Tv});var V3=v(Rv=>{"use strict";Object.defineProperty(Rv,"__esModule",{value:!0});var Iv=class{static{a(this,"ResolutionContext")}constructor(){this.scopedResolutions=new Map}};Rv.default=Iv});var Cv=v(ly=>{"use strict";Object.defineProperty(ly,"__esModule",{value:!0});ly.formatErrorCtor=void 0;function fq(r,e){return r===null?`at position #${e}`:`"${r.split(",")[e].trim()}" at position #${e}`}a(fq,"formatDependency");function dq(r,e,t=" "){return[r,...e.message.split(`
33
33
  `).map(n=>t+n)].join(`
34
34
  `)}a(dq,"composeErrorMessage");function pq(r,e,t){let[,n=null]=r.toString().match(/constructor\(([\w, ]+)\)/)||[],i=fq(n,e);return dq(`Cannot inject the dependency ${i} of "${r.name}" constructor. Reason:`,t)}a(pq,"formatErrorCtor");ly.formatErrorCtor=pq});var G3=v(uy=>{"use strict";Object.defineProperty(uy,"__esModule",{value:!0});uy.isDisposable=void 0;function hq(r){return!(typeof r.dispose!="function"||r.dispose.length>0)}a(hq,"isDisposable");uy.isDisposable=hq});var W3=v(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.PostResolutionInterceptors=ll.PreResolutionInterceptors=void 0;var q3=vv(),fy=class extends q3.default{static{a(this,"PreResolutionInterceptors")}};ll.PreResolutionInterceptors=fy;var dy=class extends q3.default{static{a(this,"PostResolutionInterceptors")}};ll.PostResolutionInterceptors=dy;var xv=class{static{a(this,"Interceptors")}constructor(){this.preResolution=new fy,this.postResolution=new dy}};ll.default=xv});var Ha=v(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.instance=Go.typeInfo=void 0;var mq=(ey(),wg(Zg)),zn=Sv(),gq=U3(),py=sy(),yq=B3(),yi=hv(),hy=V3(),_q=Cv(),bq=iy(),Sq=G3(),wq=W3();Go.typeInfo=new Map;var Ov=class r{static{a(this,"InternalDependencyContainer")}constructor(e){this.parent=e,this._registry=new yq.default,this.interceptors=new wq.default,this.disposed=!1,this.disposables=new Set}register(e,t,n={lifecycle:yi.default.Transient}){this.ensureNotDisposed();let i;if(gq.isProvider(t)?i=t:i={useClass:t},zn.isTokenProvider(i)){let s=[e],o=i;for(;o!=null;){let c=o.useToken;if(s.includes(c))throw new Error(`Token registration cycle detected! ${[...s,c].join(" -> ")}`);s.push(c);let l=this._registry.get(c);l&&zn.isTokenProvider(l.provider)?o=l.provider:o=null}}if((n.lifecycle===yi.default.Singleton||n.lifecycle==yi.default.ContainerScoped||n.lifecycle==yi.default.ResolutionScoped)&&(zn.isValueProvider(i)||zn.isFactoryProvider(i)))throw new Error(`Cannot use lifecycle "${yi.default[n.lifecycle]}" with ValueProviders or FactoryProviders`);return this._registry.set(e,{provider:i,options:n}),this}registerType(e,t){return this.ensureNotDisposed(),zn.isNormalToken(t)?this.register(e,{useToken:t}):this.register(e,{useClass:t})}registerInstance(e,t){return this.ensureNotDisposed(),this.register(e,{useValue:t})}registerSingleton(e,t){if(this.ensureNotDisposed(),zn.isNormalToken(e)){if(zn.isNormalToken(t))return this.register(e,{useToken:t},{lifecycle:yi.default.Singleton});if(t)return this.register(e,{useClass:t},{lifecycle:yi.default.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}let n=e;return t&&!zn.isNormalToken(t)&&(n=t),this.register(e,{useClass:n},{lifecycle:yi.default.Singleton})}resolve(e,t=new hy.default,n=!1){this.ensureNotDisposed();let i=this.getRegistration(e);if(!i&&zn.isNormalToken(e)){if(n)return;throw new Error(`Attempted to resolve unregistered dependency token: "${e.toString()}"`)}if(this.executePreResolutionInterceptor(e,"Single"),i){let s=this.resolveRegistration(i,t);return this.executePostResolutionInterceptor(e,s,"Single"),s}if(py.isConstructorToken(e)){let s=this.construct(e,t);return this.executePostResolutionInterceptor(e,s,"Single"),s}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")}executePreResolutionInterceptor(e,t){if(this.interceptors.preResolution.has(e)){let n=[];for(let i of this.interceptors.preResolution.getAll(e))i.options.frequency!="Once"&&n.push(i),i.callback(e,t);this.interceptors.preResolution.setAll(e,n)}}executePostResolutionInterceptor(e,t,n){if(this.interceptors.postResolution.has(e)){let i=[];for(let s of this.interceptors.postResolution.getAll(e))s.options.frequency!="Once"&&i.push(s),s.callback(e,t,n);this.interceptors.postResolution.setAll(e,i)}}resolveRegistration(e,t){if(this.ensureNotDisposed(),e.options.lifecycle===yi.default.ResolutionScoped&&t.scopedResolutions.has(e))return t.scopedResolutions.get(e);let n=e.options.lifecycle===yi.default.Singleton,i=e.options.lifecycle===yi.default.ContainerScoped,s=n||i,o;return zn.isValueProvider(e.provider)?o=e.provider.useValue:zn.isTokenProvider(e.provider)?o=s?e.instance||(e.instance=this.resolve(e.provider.useToken,t)):this.resolve(e.provider.useToken,t):zn.isClassProvider(e.provider)?o=s?e.instance||(e.instance=this.construct(e.provider.useClass,t)):this.construct(e.provider.useClass,t):zn.isFactoryProvider(e.provider)?o=e.provider.useFactory(this):o=this.construct(e.provider,t),e.options.lifecycle===yi.default.ResolutionScoped&&t.scopedResolutions.set(e,o),o}resolveAll(e,t=new hy.default,n=!1){this.ensureNotDisposed();let i=this.getAllRegistrations(e);if(!i&&zn.isNormalToken(e)){if(n)return[];throw new Error(`Attempted to resolve unregistered dependency token: "${e.toString()}"`)}if(this.executePreResolutionInterceptor(e,"All"),i){let o=i.map(c=>this.resolveRegistration(c,t));return this.executePostResolutionInterceptor(e,o,"All"),o}let s=[this.construct(e,t)];return this.executePostResolutionInterceptor(e,s,"All"),s}isRegistered(e,t=!1){return this.ensureNotDisposed(),this._registry.has(e)||t&&(this.parent||!1)&&this.parent.isRegistered(e,!0)}reset(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()}clearInstances(){this.ensureNotDisposed();for(let[e,t]of this._registry.entries())this._registry.setAll(e,t.filter(n=>!zn.isValueProvider(n.provider)).map(n=>(n.instance=void 0,n)))}createChildContainer(){this.ensureNotDisposed();let e=new r(this);for(let[t,n]of this._registry.entries())n.some(({options:i})=>i.lifecycle===yi.default.ContainerScoped)&&e._registry.setAll(t,n.map(i=>i.options.lifecycle===yi.default.ContainerScoped?{provider:i.provider,options:i.options}:i));return e}beforeResolution(e,t,n={frequency:"Always"}){this.interceptors.preResolution.set(e,{callback:t,options:n})}afterResolution(e,t,n={frequency:"Always"}){this.interceptors.postResolution.set(e,{callback:t,options:n})}dispose(){return mq.__awaiter(this,void 0,void 0,function*(){this.disposed=!0;let e=[];this.disposables.forEach(t=>{let n=t.dispose();n&&e.push(n)}),yield Promise.all(e)})}getRegistration(e){return this.isRegistered(e)?this._registry.get(e):this.parent?this.parent.getRegistration(e):null}getAllRegistrations(e){return this.isRegistered(e)?this._registry.getAll(e):this.parent?this.parent.getAllRegistrations(e):null}construct(e,t){if(e instanceof bq.DelayedConstructor)return e.createProxy(i=>this.resolve(i,t));let n=(()=>{let i=Go.typeInfo.get(e);if(!i||i.length===0){if(e.length===0)return new e;throw new Error(`TypeInfo not known for "${e.name}"`)}let s=i.map(this.resolveParams(t,e));return new e(...s)})();return Sq.isDisposable(n)&&this.disposables.add(n),n}resolveParams(e,t){return(n,i)=>{try{return py.isTokenDescriptor(n)?py.isTransformDescriptor(n)?n.multiple?this.resolve(n.transform).transform(this.resolveAll(n.token,new hy.default,n.isOptional),...n.transformArgs):this.resolve(n.transform).transform(this.resolve(n.token,e,n.isOptional),...n.transformArgs):n.multiple?this.resolveAll(n.token,new hy.default,n.isOptional):this.resolve(n.token,e,n.isOptional):py.isTransformDescriptor(n)?this.resolve(n.transform,e).transform(this.resolve(n.token,e),...n.transformArgs):this.resolve(n,e)}catch(s){throw new Error(_q.formatErrorCtor(t,i,s))}}}ensureNotDisposed(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")}};Go.instance=new Ov;Go.default=Go.instance});var H3=v(Fv=>{"use strict";Object.defineProperty(Fv,"__esModule",{value:!0});var Eq=al(),qo=Ha(),Pv=sy(),vq=Cv();function Tq(){return function(r){let e=Eq.getParamInfo(r);return class extends r{constructor(...t){super(...t.concat(e.slice(t.length).map((n,i)=>{try{return Pv.isTokenDescriptor(n)?Pv.isTransformDescriptor(n)?n.multiple?qo.instance.resolve(n.transform).transform(qo.instance.resolveAll(n.token),...n.transformArgs):qo.instance.resolve(n.transform).transform(qo.instance.resolve(n.token),...n.transformArgs):n.multiple?qo.instance.resolveAll(n.token):qo.instance.resolve(n.token):Pv.isTransformDescriptor(n)?qo.instance.resolve(n.transform).transform(qo.instance.resolve(n.token),...n.transformArgs):qo.instance.resolve(n)}catch(s){let o=i+t.length;throw new Error(vq.formatErrorCtor(r,o,s))}})))}}}}a(Tq,"autoInjectable");Fv.default=Tq});var z3=v(Dv=>{"use strict";Object.defineProperty(Dv,"__esModule",{value:!0});var Aq=al();function Iq(r,e){let t={token:r,multiple:!1,isOptional:e&&e.isOptional};return Aq.defineInjectionTokenMetadata(t)}a(Iq,"inject");Dv.default=Iq});var my=v(Lv=>{"use strict";Object.defineProperty(Lv,"__esModule",{value:!0});var Rq=al(),Cq=Ha(),K3=Ha();function xq(r){return function(e){Cq.typeInfo.set(e,Rq.getParamInfo(e)),r&&r.token&&(Array.isArray(r.token)?r.token.forEach(t=>{K3.instance.register(t,e)}):K3.instance.register(r.token,e))}}a(xq,"injectable");Lv.default=xq});var Y3=v(Nv=>{"use strict";Object.defineProperty(Nv,"__esModule",{value:!0});var Oq=(ey(),wg(Zg)),Pq=Ha();function Fq(r=[]){return function(e){return r.forEach(t=>{var{token:n,options:i}=t,s=Oq.__rest(t,["token","options"]);return Pq.instance.register(n,s,i)}),e}}a(Fq,"registry");Nv.default=Fq});var Q3=v(kv=>{"use strict";Object.defineProperty(kv,"__esModule",{value:!0});var Dq=my(),Lq=Ha();function Nq(){return function(r){Dq.default()(r),Lq.instance.registerSingleton(r)}}a(Nq,"singleton");kv.default=Nq});var X3=v(Mv=>{"use strict";Object.defineProperty(Mv,"__esModule",{value:!0});var kq=al();function Mq(r,e){let t={token:r,multiple:!0,isOptional:e&&e.isOptional};return kq.defineInjectionTokenMetadata(t)}a(Mq,"injectAll");Mv.default=Mq});var J3=v(jv=>{"use strict";Object.defineProperty(jv,"__esModule",{value:!0});var jq=al();function $q(r,e,...t){let n={token:r,multiple:!0,transform:e,transformArgs:t};return jq.defineInjectionTokenMetadata(n)}a($q,"injectAllWithTransform");jv.default=$q});var Z3=v($v=>{"use strict";Object.defineProperty($v,"__esModule",{value:!0});var Uq=al();function Bq(r,e,...t){return Uq.defineInjectionTokenMetadata(r,{transformToken:e,args:t})}a(Bq,"injectWithTransform");$v.default=Bq});var eF=v(Uv=>{"use strict";Object.defineProperty(Uv,"__esModule",{value:!0});var Vq=my(),Gq=Ha();function qq(r,e){return function(t){Vq.default()(t),Gq.instance.register(e||t,t,{lifecycle:r})}}a(qq,"scoped");Uv.default=qq});var tF=v(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var Wq=H3();Object.defineProperty(us,"autoInjectable",{enumerable:!0,get:a(function(){return Wq.default},"get")});var Hq=z3();Object.defineProperty(us,"inject",{enumerable:!0,get:a(function(){return Hq.default},"get")});var zq=my();Object.defineProperty(us,"injectable",{enumerable:!0,get:a(function(){return zq.default},"get")});var Kq=Y3();Object.defineProperty(us,"registry",{enumerable:!0,get:a(function(){return Kq.default},"get")});var Yq=Q3();Object.defineProperty(us,"singleton",{enumerable:!0,get:a(function(){return Yq.default},"get")});var Qq=X3();Object.defineProperty(us,"injectAll",{enumerable:!0,get:a(function(){return Qq.default},"get")});var Xq=J3();Object.defineProperty(us,"injectAllWithTransform",{enumerable:!0,get:a(function(){return Xq.default},"get")});var Jq=Z3();Object.defineProperty(us,"injectWithTransform",{enumerable:!0,get:a(function(){return Jq.default},"get")});var Zq=eF();Object.defineProperty(us,"scoped",{enumerable:!0,get:a(function(){return Zq.default},"get")})});var rF=v(Bv=>{"use strict";Object.defineProperty(Bv,"__esModule",{value:!0});function eW(r){let e;return t=>(e==null&&(e=r(t)),e)}a(eW,"instanceCachingFactory");Bv.default=eW});var nF=v(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});function tW(r){let e=new WeakMap;return t=>{let n=e.get(t);return n==null&&(n=r(t),e.set(t,n)),n}}a(tW,"instancePerContainerCachingFactory");Vv.default=tW});var iF=v(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});function rW(r,e,t,n=!0){let i,s;return o=>{let c=r(o);return(!n||s!==c)&&((s=c)?i=o.resolve(e):i=o.resolve(t)),i}}a(rW,"predicateAwareClassFactory");Gv.default=rW});var sF=v(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var nW=rF();Object.defineProperty(Fp,"instanceCachingFactory",{enumerable:!0,get:a(function(){return nW.default},"get")});var iW=nF();Object.defineProperty(Fp,"instancePerContainerCachingFactory",{enumerable:!0,get:a(function(){return iW.default},"get")});var sW=iF();Object.defineProperty(Fp,"predicateAwareClassFactory",{enumerable:!0,get:a(function(){return sW.default},"get")})});var at=v(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var qv=(ey(),wg(Zg));if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var oW=$3();Object.defineProperty(za,"Lifecycle",{enumerable:!0,get:a(function(){return oW.Lifecycle},"get")});qv.__exportStar(tF(),za);qv.__exportStar(sF(),za);qv.__exportStar(Sv(),za);var aW=iy();Object.defineProperty(za,"delay",{enumerable:!0,get:a(function(){return aW.delay},"get")});var cW=Ha();Object.defineProperty(za,"container",{enumerable:!0,get:a(function(){return cW.instance},"get")})});var Dp=v(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});gy.NullLogger=void 0;gy.NullLogger={debug(){},info(){},warn(){},error(){}}});var Cu=v(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.STRING_SCALAR_PROPERTIES=void 0;ul.needsYamlQuoting=oF;ul.quoteYamlString=aF;ul.serializeYamlScalar=_W;var lW=/^[-!&*?|>%@`"'#,[\]{}]/,uW=/[\u0000-\u001f\u007f]/,fW=/^(?:true|True|TRUE|false|False|FALSE)$/,dW=/^(?:null|Null|NULL|~)$/,pW=/^[-+]?(?:0b[01_]+|0o[0-7_]+|0x[0-9a-fA-F_]+|[0-9][0-9_]*)$/,hW=/^(?:[-+]?[0-9][0-9_]*(?:\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\.(?:inf|Inf|INF)|\.(?:nan|NaN|NAN))$/,mW=/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;ul.STRING_SCALAR_PROPERTIES=new Set(["exo__Asset_label","aliases"]);function gW(r){if(r.length<2||!r.startsWith('"')||!r.endsWith('"'))return!1;let e=r.slice(1,-1);for(let t=0;t<e.length;t++){if(e[t]==="\\"){if(t+1>=e.length)return!1;t++;continue}if(e[t]==='"')return!1}return!0}a(gW,"isCompleteDoubleQuotedScalar");function yW(r){return fW.test(r)||dW.test(r)||pW.test(r)||hW.test(r)||mW.test(r)}a(yW,"looksLikeNonStringScalar");function oF(r,e=!1){return r===""?!0:gW(r)?!1:!!(r!==r.trim()||/:(\s|$)/.test(r)||/\s#/.test(r)||lW.test(r)||uW.test(r)||e&&yW(r))}a(oF,"needsYamlQuoting");function aF(r){let e="";for(let t=0;t<r.length;t++){let n=r[t],i=r.charCodeAt(t);n==="\\"?e+="\\\\":n==='"'?e+='\\"':n===`
35
- `?e+="\\n":n==="\r"?e+="\\r":n===" "?e+="\\t":i<32||i===127?e+="\\x"+i.toString(16).toUpperCase().padStart(2,"0"):e+=n}return`"${e}"`}a(aF,"quoteYamlString");function _W(r,e=!1){return typeof r!="string"?String(r):oF(r,e)?aF(r):r}a(_W,"serializeYamlScalar")});var Ou=v(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.bytesToBase64=lF;xu.base64ToBytes=uF;xu.base64ToUtf8=bW;xu.utf8ToBase64=SW;var cF=32768;function lF(r){let e="";for(let t=0;t<r.length;t+=cF)e+=String.fromCharCode(...r.subarray(t,t+cF));return btoa(e)}a(lF,"bytesToBase64");function uF(r){let e=r.replace(/\s/g,""),t=e.length%4,n=t===2||t===3?e+"=".repeat(4-t):e,i=atob(n),s=new Uint8Array(i.length);for(let o=0;o<i.length;o++)s[o]=i.charCodeAt(o);return s}a(uF,"base64ToBytes");function bW(r){return new TextDecoder("utf-8",{ignoreBOM:!0}).decode(uF(r))}a(bW,"base64ToUtf8");function SW(r){return lF(new TextEncoder().encode(r))}a(SW,"utf8ToBase64")});var Lp=v(Wv=>{"use strict";Object.defineProperty(Wv,"__esModule",{value:!0});Wv.iriToObsidianName=EW;var wW=Yt();function EW(r){let e=wW.Namespace.fromTermIRI(r);if(e)return`${e.namespace.prefix}__${e.localName}`;let t=r.match(/\/([^/]+)\.md$/);return t?t[1]:null}a(EW,"iriToObsidianName")});var fF=v(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});yy.mergePropertyDefaults=vW;yy.mergeInheritanceRules=TW;function vW(r,e){let t=new Map;for(let s of e)t.set(s.propertyName,s);let n=[],i=new Set;for(let s of r){let o=t.get(s.propertyName);o?(n.push(o),i.add(o.propertyName)):n.push(s)}for(let s of e)i.has(s.propertyName)||n.push(s);return n}a(vW,"mergePropertyDefaults");function TW(r,e){let t=new Map;for(let s of e)t.set(s.targetPropertyName,s);let n=[],i=new Set;for(let s of r){let o=t.get(s.targetPropertyName);o?(n.push(o),i.add(o.targetPropertyName)):n.push(s)}for(let s of e)i.has(s.targetPropertyName)||n.push(s);return n}a(TW,"mergeInheritanceRules")});var Hv=v((twe,dF)=>{var Pu=class{static{a(this,"Wildcard")}constructor(){return AW||this}equals(e){return e&&this.termType===e.termType}};Object.defineProperty(Pu.prototype,"value",{enumerable:!0,value:"*"});Object.defineProperty(Pu.prototype,"termType",{enumerable:!0,value:"Wildcard"});var AW=new Pu;dF.exports.Wildcard=Pu});var hF=v((nwe,pF)=>{var IW=(function(){var r=a(function(j,N,$,z){for($=$||{},z=j.length;z--;$[j[z]]=N);return $},"o"),e=[6,12,13,15,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],t=[2,247],n=[100,110,113,115,116,123,126,131,329,330,331,332,333],i=[2,409],s=[1,18],o=[1,27],c=[13,16,45,197,224,229,308],l=[28,29,53],u=[28,53],f=[1,42],d=[1,45],p=[1,41],h=[1,44],m=[123,126],y=[1,67],_=[39,45,87],b=[13,16,45,197,224,308],T=[1,87],I=[2,281],E=[1,86],S=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],R=[6,28,29,53,63,70,73,81,83,85],D=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],P=[6,13,16,28,29,45,53,63,70,73,81,82,83,85,87,89,197,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314],M=[6,13,16,28,29,31,39,45,47,48,53,63,70,73,81,82,83,85,87,89,109,112,121,123,126,128,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,337,338,340,341,342,343,344,345,346],O=[13,16,308],L=[112,132,327,334],te=[13,16,112,132,308],re=[1,111],V=[1,117],K=[112,132,327,328,334],Se=[13,16,112,132,308,328],ce=[28,29,45,53,87],q=[1,138],W=[1,151],ne=[1,128],xe=[1,127],X=[1,129],ee=[1,140],Z=[1,141],H=[1,142],ie=[1,143],$e=[1,144],k=[1,145],oe=[1,147],de=[1,148],Ae=[2,457],we=[1,158],ve=[1,159],Te=[1,160],ge=[1,152],G=[1,153],ae=[1,156],he=[1,171],Ee=[1,172],Oe=[1,173],Ce=[1,174],Ue=[1,175],Be=[1,176],Ve=[1,167],Ge=[1,168],Pe=[1,169],qe=[1,170],_t=[1,157],st=[1,166],nt=[1,161],C=[1,162],x=[1,163],F=[1,164],U=[1,165],be=[6,13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],Ut=[1,195],zt=[6,31,73,81,83,85],Ze=[2,285],le=[1,199],ue=[1,201],pe=[6,31,70,73,81,83,85],ye=[2,283],Qe=[1,207],Et=[1,218],vt=[1,223],cn=[1,219],ui=[1,225],Fi=[1,226],Gn=[1,224],UO=[6,63,70,73,81,83,85],BO=[1,236],VO=[2,334],GO=[1,243],qO=[1,241],ln=[6,193],Jm=[2,349],WO=[2,339],Ua=[28,128],HO=[47,48,193,272],Zm=[47,48,193,242,272],du=[47,48,193,242,246,272],pu=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],Hr=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],zO=[1,271],KO=[1,270],Tr=[6,13,16,29,31,39,45,47,48,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,338,341,342,343,344,345,346,347,348,349,350,351],YO=[1,281],QO=[1,280],qn=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],Jd=[45,89],eg=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],tg=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rg=[31,89],ng=[48,87],Vc=[6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338],zs=[6,13,16,39,45,48,82,87,89,231,263,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338,340],XO=[1,313],hu=[6,85],Vw=[6,31,81,83,85],JO=[2,361],Fo=[2,353],Gc=[1,343],Zd=[31,112,335],Do=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Gw=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335],ZO=[6,109,193],qc=[31,112],Ar=[13,16,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],qw=[1,390],Ww=[1,391],Ba=[13,16,87,197,308,314],eP=[13,16,39,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],ig=[1,417],sg=[1,418],tP=[13,16,48,197,229,308],Va=[6,31,85],rP=[6,13,16,31,45,73,81,83,85,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Hw=[6,13,16,29,31,45,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,231,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,346,347,348,349,350,351],Wc=[29,31,85,112,159,160,161,163,164],og=[1,443],ag=[1,444],nP=[1,449],Hc=[31,112,193,232,318,335],cg=[13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],iP=[13,16,31,45,48,82,87,89,112,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],zw=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],ep=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],tp=[31,45],sP=[1,507],oP=[1,508],aP=[6,13,16,29,31,39,45,47,48,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,336,338,341,342,343,344,345,346,347,348,349,350,351],lg=[29,31,85,112,159,160,161,163,164,335],zc=[6,13,16,31,45,70,73,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],cP=[13,16,31,45,48,82,87,89,112,193,197,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],lP=[2,352],Kw=[13,16,197,308,314],uP=[1,565],mu=[6,13,16,31,45,76,78,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],fP=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Lo=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],dP=[13,16,87,308],No=[2,364],gu=[29,31,85,112,159,160,161,163,164,193,232,318,335],ug=[31,112,193,232,272,318,335],ko=[2,359],pP=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],fg=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],hP=[13,16,31,45,82,87,89,112,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],mP=[2,347],Yw={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Query:7,Qry:8,Query_option0:9,Prologue_repetition0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectClauseWildcard:17,Qry_repetition0:18,WhereClause:19,SolutionModifierNoGroup:20,SelectClauseVars:21,Qry_repetition1:22,SolutionModifier:23,CONSTRUCT:24,ConstructTemplate:25,Qry_repetition2:26,Qry_repetition3:27,WHERE:28,"{":29,Qry_option0:30,"}":31,DESCRIBE:32,Qry_group0:33,Qry_repetition4:34,Qry_option1:35,ASK:36,Qry_repetition5:37,SelectClauseBase:38,"*":39,SelectClauseVars_repetition_plus0:40,SELECT:41,SelectClauseBase_option0:42,SelectClauseItem:43,Var:44,"(":45,Expression:46,AS:47,")":48,SubSelect:49,SubSelect_option0:50,SubSelect_option1:51,DatasetClause:52,FROM:53,DatasetClause_option0:54,iri:55,WhereClause_option0:56,GroupGraphPattern:57,SolutionModifier_option0:58,SolutionModifierNoGroup_option0:59,SolutionModifierNoGroup_option1:60,SolutionModifierNoGroup_option2:61,GroupClause:62,GROUP:63,BY:64,GroupClause_repetition_plus0:65,GroupCondition:66,BuiltInCall:67,FunctionCall:68,HavingClause:69,HAVING:70,HavingClause_repetition_plus0:71,OrderClause:72,ORDER:73,OrderClause_repetition_plus0:74,OrderCondition:75,ASC:76,BrackettedExpression:77,DESC:78,Constraint:79,LimitOffsetClauses:80,LIMIT:81,INTEGER:82,OFFSET:83,ValuesClause:84,VALUES:85,InlineData:86,VAR:87,InlineData_repetition0:88,NIL:89,InlineData_repetition1:90,InlineData_repetition_plus2:91,InlineData_repetition3:92,DataBlock:93,DataBlockValueList:94,DataBlockValueList_repetition_plus0:95,Update:96,Update_repetition0:97,Update1:98,Update_option0:99,LOAD:100,Update1_option0:101,Update1_option1:102,Update1_group0:103,Update1_option2:104,GraphRefAll:105,Update1_group1:106,Update1_option3:107,GraphOrDefault:108,TO:109,CREATE:110,Update1_option4:111,GRAPH:112,INSERTDATA:113,QuadPattern:114,DELETEDATA:115,DELETEWHERE:116,Update1_option5:117,InsertDeleteClause:118,Update1_repetition0:119,IntoGraphClause:120,INTO:121,GraphRef:122,DELETE:123,InsertDeleteClause_option0:124,InsertClause:125,INSERT:126,UsingClause:127,USING:128,UsingClause_option0:129,WithClause:130,WITH:131,DEFAULT:132,GraphOrDefault_option0:133,GraphRefAll_group0:134,Quads:135,Quads_option0:136,Quads_repetition0:137,QuadsNotTriples:138,VarOrIri:139,QuadsNotTriples_option0:140,QuadsNotTriples_option1:141,QuadsNotTriples_option2:142,TriplesTemplate:143,TriplesTemplate_repetition0:144,TriplesSameSubject:145,TriplesTemplate_option0:146,GroupGraphPatternSub:147,GroupGraphPatternSub_option0:148,GroupGraphPatternSub_repetition0:149,GroupGraphPatternSubTail:150,GraphPatternNotTriples:151,GroupGraphPatternSubTail_option0:152,GroupGraphPatternSubTail_option1:153,TriplesBlock:154,TriplesBlock_repetition0:155,TriplesSameSubjectPath:156,TriplesBlock_option0:157,GroupOrUnionGraphPattern:158,OPTIONAL:159,MINUS:160,SERVICE:161,GraphPatternNotTriples_option0:162,FILTER:163,BIND:164,InlineDataOneVar:165,InlineDataFull:166,InlineDataOneVar_repetition0:167,InlineDataFull_repetition0:168,InlineDataFull_repetition_plus1:169,InlineDataFull_repetition2:170,DataBlockValue:171,Literal:172,QuotedTriple:173,UNDEF:174,GroupOrUnionGraphPattern_repetition0:175,ArgList:176,ArgList_option0:177,ArgList_repetition0:178,ExpressionList:179,ExpressionList_repetition0:180,ConstructTemplate_option0:181,ConstructTriples:182,ConstructTriples_repetition0:183,ConstructTriples_option0:184,VarOrTermOrQuotedTP:185,PropertyListNotEmpty:186,TriplesNode:187,PropertyList:188,PropertyList_option0:189,VerbObjectList:190,PropertyListNotEmpty_repetition0:191,SemiOptionalVerbObjectList:192,";":193,SemiOptionalVerbObjectList_option0:194,Verb:195,ObjectList:196,a:197,ObjectList_repetition0:198,Object:199,GraphNode:200,Object_option0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,O:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmptyTail:207,O_group0:208,ObjectListPath:209,ObjectListPath_repetition0:210,ObjectPath:211,GraphNodePath:212,ObjectPath_option0:213,Path:214,Path_repetition0:215,PathSequence:216,PathSequence_repetition0:217,PathEltOrInverse:218,PathElt:219,PathPrimary:220,PathElt_option0:221,PathEltOrInverse_option0:222,IriOrA:223,"!":224,PathNegatedPropertySet:225,PathOneInPropertySet:226,PathNegatedPropertySet_repetition0:227,PathNegatedPropertySet_option0:228,"^":229,TriplesNode_repetition_plus0:230,"[":231,"]":232,TriplesNodePath_repetition_plus0:233,VarOrTermOrQuotedTPExpr:234,VarOrTerm:235,GraphTerm:236,BlankNode:237,ConditionalOrExpression:238,ConditionalAndExpression:239,ConditionalOrExpression_repetition0:240,ConditionalOrExpressionTail:241,"||":242,RelationalExpression:243,ConditionalAndExpression_repetition0:244,ConditionalAndExpressionTail:245,"&&":246,NumericExpression:247,RelationalExpression_group0:248,RelationalExpression_option0:249,IN:250,MultiplicativeExpression:251,NumericExpression_repetition0:252,AdditiveExpressionTail:253,AdditiveExpressionTail_group0:254,NumericLiteralPositive:255,AdditiveExpressionTail_repetition0:256,NumericLiteralNegative:257,AdditiveExpressionTail_repetition1:258,UnaryExpression:259,MultiplicativeExpression_repetition0:260,MultiplicativeExpressionTail:261,MultiplicativeExpressionTail_group0:262,"+":263,PrimaryExpression:264,"-":265,ExprQuotedTP:266,Aggregate:267,FUNC_ARITY0:268,FUNC_ARITY1:269,FUNC_ARITY1_SPARQL_STAR:270,FUNC_ARITY2:271,",":272,FUNC_ARITY3:273,FUNC_ARITY3_SPARQL_STAR:274,BuiltInCall_group0:275,BOUND:276,BNODE:277,BuiltInCall_option0:278,EXISTS:279,COUNT:280,Aggregate_option0:281,Aggregate_group0:282,FUNC_AGGREGATE:283,Aggregate_option1:284,GROUP_CONCAT:285,Aggregate_option2:286,Aggregate_option3:287,GroupConcatSeparator:288,SEPARATOR:289,"=":290,String:291,LANGTAG:292,"^^":293,DECIMAL:294,DOUBLE:295,BOOLEAN:296,INTEGER_POSITIVE:297,DECIMAL_POSITIVE:298,DOUBLE_POSITIVE:299,INTEGER_NEGATIVE:300,DECIMAL_NEGATIVE:301,DOUBLE_NEGATIVE:302,STRING_LITERAL1:303,STRING_LITERAL2:304,STRING_LITERAL_LONG1:305,STRING_LITERAL_LONG2:306,PrefixedName:307,PNAME_LN:308,BLANK_NODE_LABEL:309,ANON:310,QuotedTP:311,"<<":312,qtSubjectOrObject:313,">>":314,DataValueTerm:315,AnnotationPattern:316,"{|":317,"|}":318,AnnotationPatternPath:319,ExprVarOrTerm:320,QueryOrUpdate_group0_option0:321,Prologue_repetition0_group0:322,Qry_group0_repetition_plus0:323,SelectClauseBase_option0_group0:324,DISTINCT:325,REDUCED:326,NAMED:327,SILENT:328,CLEAR:329,DROP:330,ADD:331,MOVE:332,COPY:333,ALL:334,".":335,UNION:336,"|":337,"/":338,PathElt_option0_group0:339,"?":340,"!=":341,"<":342,">":343,"<=":344,">=":345,NOT:346,CONCAT:347,COALESCE:348,SUBSTR:349,REGEX:350,REPLACE:351,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",24:"CONSTRUCT",28:"WHERE",29:"{",31:"}",32:"DESCRIBE",36:"ASK",39:"*",41:"SELECT",45:"(",47:"AS",48:")",53:"FROM",63:"GROUP",64:"BY",70:"HAVING",73:"ORDER",76:"ASC",78:"DESC",81:"LIMIT",82:"INTEGER",83:"OFFSET",85:"VALUES",87:"VAR",89:"NIL",100:"LOAD",109:"TO",110:"CREATE",112:"GRAPH",113:"INSERTDATA",115:"DELETEDATA",116:"DELETEWHERE",121:"INTO",123:"DELETE",126:"INSERT",128:"USING",131:"WITH",132:"DEFAULT",159:"OPTIONAL",160:"MINUS",161:"SERVICE",163:"FILTER",164:"BIND",174:"UNDEF",193:";",197:"a",224:"!",229:"^",231:"[",232:"]",242:"||",246:"&&",250:"IN",263:"+",265:"-",268:"FUNC_ARITY0",269:"FUNC_ARITY1",270:"FUNC_ARITY1_SPARQL_STAR",271:"FUNC_ARITY2",272:",",273:"FUNC_ARITY3",274:"FUNC_ARITY3_SPARQL_STAR",276:"BOUND",277:"BNODE",279:"EXISTS",280:"COUNT",283:"FUNC_AGGREGATE",285:"GROUP_CONCAT",289:"SEPARATOR",290:"=",292:"LANGTAG",293:"^^",294:"DECIMAL",295:"DOUBLE",296:"BOOLEAN",297:"INTEGER_POSITIVE",298:"DECIMAL_POSITIVE",299:"DOUBLE_POSITIVE",300:"INTEGER_NEGATIVE",301:"DECIMAL_NEGATIVE",302:"DOUBLE_NEGATIVE",303:"STRING_LITERAL1",304:"STRING_LITERAL2",305:"STRING_LITERAL_LONG1",306:"STRING_LITERAL_LONG2",308:"PNAME_LN",309:"BLANK_NODE_LABEL",310:"ANON",312:"<<",314:">>",317:"{|",318:"|}",325:"DISTINCT",326:"REDUCED",327:"NAMED",328:"SILENT",329:"CLEAR",330:"DROP",331:"ADD",332:"MOVE",333:"COPY",334:"ALL",335:".",336:"UNION",337:"|",338:"/",340:"?",341:"!=",342:"<",343:">",344:"<=",345:">=",346:"NOT",347:"CONCAT",348:"COALESCE",349:"SUBSTR",350:"REGEX",351:"REPLACE"},productions_:[0,[3,3],[7,2],[4,1],[11,2],[14,3],[8,4],[8,4],[8,5],[8,7],[8,5],[8,4],[17,2],[21,2],[38,2],[43,1],[43,5],[49,4],[49,4],[52,3],[19,2],[23,2],[20,3],[62,3],[66,1],[66,1],[66,3],[66,5],[66,1],[69,2],[72,3],[75,2],[75,2],[75,1],[75,1],[80,2],[80,2],[80,4],[80,4],[84,2],[86,4],[86,4],[86,6],[86,2],[94,3],[96,3],[98,4],[98,3],[98,5],[98,4],[98,2],[98,2],[98,2],[98,5],[120,2],[118,3],[118,1],[125,2],[127,3],[130,2],[108,1],[108,2],[122,2],[105,1],[105,1],[114,3],[135,2],[138,7],[143,3],[57,3],[57,3],[147,2],[150,3],[154,3],[151,1],[151,2],[151,2],[151,3],[151,4],[151,2],[151,6],[151,1],[93,1],[93,1],[165,4],[166,4],[166,6],[171,1],[171,1],[171,1],[171,1],[158,2],[79,1],[79,1],[79,1],[68,2],[176,1],[176,5],[179,1],[179,4],[25,3],[182,3],[145,2],[145,2],[188,1],[186,2],[192,2],[190,2],[195,1],[195,1],[196,2],[199,2],[156,2],[156,2],[202,2],[207,1],[207,2],[205,2],[209,2],[211,2],[214,2],[216,2],[219,2],[218,2],[220,1],[220,2],[220,3],[225,1],[225,1],[225,4],[226,1],[226,2],[187,3],[187,3],[203,3],[203,3],[200,1],[200,1],[212,1],[212,1],[234,1],[235,1],[235,1],[139,1],[139,1],[44,1],[236,1],[236,1],[236,1],[236,1],[46,1],[238,2],[241,2],[239,2],[245,2],[243,1],[243,3],[243,4],[247,2],[253,2],[253,2],[253,2],[251,2],[261,2],[259,2],[259,2],[259,2],[259,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[77,3],[67,1],[67,2],[67,4],[67,4],[67,6],[67,8],[67,8],[67,2],[67,4],[67,2],[67,4],[67,3],[267,5],[267,5],[267,6],[288,4],[172,1],[172,2],[172,3],[172,1],[172,1],[172,1],[172,1],[172,1],[172,1],[255,1],[255,1],[255,1],[257,1],[257,1],[257,1],[291,1],[291,1],[291,1],[291,1],[55,1],[55,1],[307,1],[307,1],[237,1],[237,1],[311,5],[173,5],[313,1],[313,1],[313,1],[313,1],[313,1],[315,1],[315,1],[315,1],[185,1],[185,1],[185,1],[316,3],[319,3],[266,5],[320,1],[320,1],[320,1],[223,1],[223,1],[321,0],[321,1],[5,1],[5,1],[5,1],[9,0],[9,1],[322,1],[322,1],[10,0],[10,2],[18,0],[18,2],[22,0],[22,2],[26,0],[26,2],[27,0],[27,2],[30,0],[30,1],[323,1],[323,2],[33,1],[33,1],[34,0],[34,2],[35,0],[35,1],[37,0],[37,2],[40,1],[40,2],[324,1],[324,1],[42,0],[42,1],[50,0],[50,1],[51,0],[51,1],[54,0],[54,1],[56,0],[56,1],[58,0],[58,1],[59,0],[59,1],[60,0],[60,1],[61,0],[61,1],[65,1],[65,2],[71,1],[71,2],[74,1],[74,2],[88,0],[88,2],[90,0],[90,2],[91,1],[91,2],[92,0],[92,2],[95,1],[95,2],[97,0],[97,4],[99,0],[99,2],[101,0],[101,1],[102,0],[102,1],[103,1],[103,1],[104,0],[104,1],[106,1],[106,1],[106,1],[107,0],[107,1],[111,0],[111,1],[117,0],[117,1],[119,0],[119,2],[124,0],[124,1],[129,0],[129,1],[133,0],[133,1],[134,1],[134,1],[134,1],[136,0],[136,1],[137,0],[137,2],[140,0],[140,1],[141,0],[141,1],[142,0],[142,1],[144,0],[144,3],[146,0],[146,1],[148,0],[148,1],[149,0],[149,2],[152,0],[152,1],[153,0],[153,1],[155,0],[155,3],[157,0],[157,1],[162,0],[162,1],[167,0],[167,2],[168,0],[168,2],[169,1],[169,2],[170,0],[170,2],[175,0],[175,3],[177,0],[177,1],[178,0],[178,3],[180,0],[180,3],[181,0],[181,1],[183,0],[183,3],[184,0],[184,1],[189,0],[189,1],[191,0],[191,2],[194,0],[194,1],[198,0],[198,3],[201,0],[201,1],[204,0],[204,1],[206,0],[206,2],[208,1],[208,1],[210,0],[210,3],[213,0],[213,1],[215,0],[215,3],[217,0],[217,3],[339,1],[339,1],[339,1],[221,0],[221,1],[222,0],[222,1],[227,0],[227,3],[228,0],[228,1],[230,1],[230,2],[233,1],[233,2],[240,0],[240,2],[244,0],[244,2],[248,1],[248,1],[248,1],[248,1],[248,1],[248,1],[249,0],[249,1],[252,0],[252,2],[254,1],[254,1],[256,0],[256,2],[258,0],[258,2],[260,0],[260,2],[262,1],[262,1],[275,1],[275,1],[275,1],[275,1],[275,1],[278,0],[278,1],[281,0],[281,1],[282,1],[282,1],[284,0],[284,1],[286,0],[286,1],[287,0],[287,1]],performAction:a(function(N,$,z,Ie,Je,w,Hn){var A=w.length-1;switch(Je){case 1:if(w[A-1]=w[A-1]||{},tt.base&&(w[A-1].base=tt.base),tt.base="",w[A-1].prefixes=tt.prefixes,tt.prefixes=null,tt.pathOnly){if(w[A-1].type==="path"||"termType"in w[A-1])return w[A-1];throw new Error("Received full SPARQL query in path only mode")}else if(w[A-1].type==="path"||"termType"in w[A-1])throw new Error("Received only path in full SPARQL mode");if(w[A-1].type==="update"){let Bt={};for(let tr of w[A-1].updates)if(tr.updateType==="insert"){let Tt={};for(let Ft of tr.insert)if(Ft.type==="bgp"||Ft.type==="graph")for(let fi of Ft.triples)fi.subject.termType==="BlankNode"&&(Tt[fi.subject.value]=!0),fi.predicate.termType==="BlankNode"&&(Tt[fi.predicate.value]=!0),fi.object.termType==="BlankNode"&&(Tt[fi.object.value]=!0);for(let Ft of Object.keys(Tt)){if(Bt[Ft])throw new Error("Detected reuse blank node across different INSERT DATA clauses");Bt[Ft]=!0}}}return w[A-1];case 2:this.$={...w[A-1],...w[A],type:"query"};break;case 4:tt.base=rp(w[A]);break;case 5:tt.prefixes||(tt.prefixes={}),w[A-1]=w[A-1].substr(0,w[A-1].length-1),w[A]=rp(w[A]),tt.prefixes[w[A-1]]=w[A];break;case 6:this.$={...w[A-3],...Qc(w[A-2]),...w[A-1],...w[A]};break;case 7:if(!tt.skipValidation&&(nE(w[A-3].variables.map(tr=>rE(tr.expression))).some(tr=>tr.aggregation==="count"&&!(tr.expression instanceof dg))||w[A].group)){for(let tr of w[A-3].variables)if(tr.termType==="Variable"){if(!w[A].group||!w[A].group.map(Tt=>Su(Tt)).includes(Su(tr)))throw Error("Projection of ungrouped variable (?"+Su(tr)+")")}else if(rE(tr.expression).length===0){let Tt=K7(tr.expression);for(let Ft of Tt)if(!w[A].group||!w[A].group.map||!w[A].group.map(fi=>Su(fi)).includes(Su(Ft)))throw Error("Use of ungrouped variable in projection of operation (?"+Su(Ft)+")")}}let Xs=w[A-1].where.filter(Bt=>Bt.type==="query");if(Xs.length>0){let Bt=w[A-3].variables.filter(Tt=>Tt.variable&&Tt.variable.value).map(Tt=>Tt.variable.value),tr=nE(Xs.map(Tt=>Tt.variables)).map(Tt=>Tt.value||Tt.variable.value);for(let Tt of Bt)if(tr.indexOf(Tt)>=0)throw Error("Target id of 'AS' (?"+Tt+") already used in subquery")}this.$=gr(w[A-3],Qc(w[A-2]),w[A-1],w[A]);break;case 8:this.$=gr({queryType:"CONSTRUCT",template:w[A-3]},Qc(w[A-2]),w[A-1],w[A]);break;case 9:this.$=gr({queryType:"CONSTRUCT",template:w[A-2]=w[A-2]?w[A-2].triples:[]},Qc(w[A-5]),{where:[{type:"bgp",triples:Yc([],w[A-2])}]},w[A]);break;case 10:this.$=gr({queryType:"DESCRIBE",variables:w[A-3]==="*"?[new dg]:w[A-3]},Qc(w[A-2]),w[A-1],w[A]);break;case 11:this.$=gr({queryType:"ASK"},Qc(w[A-2]),w[A-1],w[A]);break;case 12:this.$=gr(w[A-1],{variables:[new dg]});break;case 13:let ap=w[A].map(Bt=>Bt.value||Bt.variable.value),wu=Y7(ap);if(wu.length>0)throw Error("Two or more of the resulting columns have the same name (?"+wu[0]+")");this.$=gr(w[A-1],{variables:w[A]});break;case 14:this.$=gr({queryType:"SELECT"},w[A]&&(w[A-1]=Wn(w[A]),w[A]={},w[A][w[A-1]]=!0,w[A]));break;case 16:case 27:this.$=yu(w[A-3],{variable:w[A-1]});break;case 17:case 18:this.$=gr(w[A-3],w[A-2],w[A-1],w[A],{type:"query"});break;case 19:case 58:this.$={iri:w[A],named:!!w[A-1]};break;case 20:this.$={where:w[A].patterns};break;case 21:this.$=gr(w[A-1],w[A]);break;case 22:this.$=gr(w[A-2],w[A-1],w[A]);break;case 23:this.$={group:w[A]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=yu(w[A]);break;case 26:this.$=yu(w[A-1]);break;case 29:this.$={having:w[A]};break;case 30:this.$={order:w[A]};break;case 32:this.$=yu(w[A],{descending:!0});break;case 35:this.$={limit:bu(w[A])};break;case 36:this.$={offset:bu(w[A])};break;case 37:this.$={limit:bu(w[A-2]),offset:bu(w[A])};break;case 38:this.$={limit:bu(w[A]),offset:bu(w[A-2])};break;case 39:case 43:this.$={type:"values",values:w[A]};break;case 40:case 84:this.$=w[A-1].map(Bt=>({[w[A-3]]:Bt}));break;case 41:case 85:this.$=w[A-1].map(()=>({}));break;case 42:case 86:var Qs=w[A-4].length;w[A-4]=w[A-4].map(Qw),this.$=w[A-1].map(function(Bt){if(Bt.length!==Qs)throw Error("Inconsistent VALUES length");for(var tr={},Tt=0;Tt<Qs;Tt++)tr["?"+w[A-4][Tt].value]=Bt[Tt];return tr});break;case 44:case 65:case 100:case 126:case 175:this.$=w[A-1];break;case 45:this.$={type:"update",updates:Mo(w[A-2],w[A-1])};break;case 46:this.$=gr({type:"load",silent:!!w[A-2],source:w[A-1]},w[A]&&{destination:w[A]});break;case 47:this.$={type:Wn(w[A-2]),silent:!!w[A-1],graph:w[A]};break;case 48:this.$={type:Wn(w[A-4]),silent:!!w[A-3],source:w[A-2],destination:w[A]};break;case 49:this.$={type:"create",silent:!!w[A-2],graph:{type:"graph",name:w[A]}};break;case 50:this.$={updateType:"insert",insert:IP(w[A])};break;case 51:this.$={updateType:"delete",delete:oE(IP(w[A]))};break;case 52:this.$={updateType:"deletewhere",delete:oE(w[A])};break;case 53:this.$={updateType:"insertdelete",...w[A-4],...w[A-3],...Qc(w[A-2],"using"),where:w[A].patterns};break;case 54:case 57:case 62:case 167:case 191:case 236:this.$=w[A];break;case 55:this.$={delete:oE(w[A-1]),insert:w[A]||[]};break;case 56:this.$={delete:[],insert:w[A]};break;case 59:this.$={graph:w[A]};break;case 60:this.$={type:"graph",default:!0};break;case 61:case 63:this.$={type:"graph",name:w[A]};break;case 64:this.$={[Wn(w[A])]:!0};break;case 66:this.$=w[A-1]?Ks(w[A],[w[A-1]]):Ks(w[A]);break;case 67:var sp=gr(w[A-3]||{triples:[]},{type:"graph",name:w[A-5]});this.$=w[A]?[sp,w[A]]:[sp];break;case 68:case 73:this.$={type:"bgp",triples:Ks(w[A-2],[w[A-1]])};break;case 69:this.$={type:"group",patterns:[w[A-1]]};break;case 70:for(let Bt of w[A-1].filter(tr=>tr.type==="bind")){let tr=w[A-1].indexOf(Bt),Tt=new Set;for(let Ft of w[A-1].slice(0,tr))(Ft.type==="group"||Ft.type==="bgp")&&TP(Ft).forEach(fi=>Tt.add(fi));if(Tt.has(Bt.variable.value))throw Error("Variable used to bind is already bound (?"+Bt.variable.value+")")}this.$={type:"group",patterns:w[A-1]};break;case 71:this.$=w[A-1]?Ks([w[A-1]],w[A]):Ks(w[A]);break;case 72:this.$=w[A]?[w[A-2],w[A]]:w[A-2];break;case 75:this.$=gr(w[A],{type:"optional"});break;case 76:this.$=gr(w[A],{type:"minus"});break;case 77:this.$=gr(w[A],{type:"graph",name:w[A-1]});break;case 78:this.$=gr(w[A],{type:"service",name:w[A-1],silent:!!w[A-2]});break;case 79:this.$={type:"filter",expression:w[A]};break;case 80:this.$={type:"bind",variable:w[A-1],expression:w[A-3]};break;case 89:this.$=ip(w[A]);break;case 90:this.$=void 0;break;case 91:this.$=w[A-1].length?{type:"union",patterns:Ks(w[A-1].map(Jw),[Jw(w[A])])}:w[A];break;case 95:this.$={...w[A],function:w[A-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:Mo(w[A-2],w[A-1]),distinct:!!w[A-3]};break;case 98:case 115:case 128:case 247:case 249:case 251:case 253:case 255:case 263:case 267:case 297:case 299:case 303:case 307:case 328:case 341:case 349:case 355:case 361:case 367:case 369:case 373:case 375:case 379:case 381:case 385:case 391:case 395:case 401:case 405:case 409:case 411:case 420:case 428:case 430:case 440:case 444:case 446:case 448:this.$=[];break;case 99:this.$=Mo(w[A-2],w[A-1]);break;case 101:this.$=Ks(w[A-2],[w[A-1]]);break;case 102:case 112:this.$=sE(w[A].map(Bt=>gr(jo(w[A-1]),Bt)));break;case 103:this.$=sE(Yc(w[A].map(Bt=>gr(jo(w[A-1].entity),Bt)),w[A-1].triples));break;case 105:this.$=Ks([w[A-1]],w[A]);break;case 106:this.$=Ks(w[A]);break;case 107:this.$=tE(w[A-1],w[A]);break;case 109:case 237:this.$=tt.factory.namedNode(j7);break;case 110:case 118:this.$=Mo(w[A-1],w[A]);break;case 111:this.$=w[A]?{annotation:w[A],object:w[A-1]}:w[A-1];break;case 113:this.$=w[A]?sE(Yc(w[A].map(Bt=>gr(jo(w[A-1].entity),Bt)),w[A-1].triples)):w[A-1].triples;break;case 114:this.$=tE(...w[A-1],w[A]);break;case 116:this.$=tE(...w[A]);break;case 117:case 159:case 163:this.$=[w[A-1],w[A]];break;case 119:this.$=w[A]?{object:w[A-1],annotation:w[A]}:w[A-1];break;case 120:this.$=w[A-1].length?_u("|",Mo(w[A-1],w[A])):w[A];break;case 121:this.$=w[A-1].length?_u("/",Mo(w[A-1],w[A])):w[A];break;case 122:this.$=w[A]?_u(w[A],[w[A-1]]):w[A-1];break;case 123:this.$=w[A-1]?_u(w[A-1],[w[A]]):w[A];break;case 125:case 131:this.$=_u(w[A-1],[w[A]]);break;case 129:this.$=_u("|",Mo(w[A-2],w[A-1]));break;case 132:case 134:this.$=H7(w[A-1]);break;case 133:case 135:this.$=z7(w[A-1]);break;case 140:this.$={entity:w[A],triples:[]};break;case 145:this.$=Qw(w[A]);break;case 149:this.$=tt.factory.namedNode(gP);break;case 151:case 153:case 158:case 162:this.$=Xw(w[A-1],w[A]);break;case 152:this.$=["||",w[A]];break;case 154:this.$=["&&",w[A]];break;case 156:this.$=un(w[A-1],[w[A-2],w[A]]);break;case 157:this.$=un(w[A-2]?"notin":"in",[w[A-3],w[A]]);break;case 160:this.$=["+",Xw(w[A-1],w[A])];break;case 161:var mg=Ys(w[A-1].value.replace("-",""),w[A-1].datatype);this.$=["-",Xw(mg,w[A])];break;case 164:this.$=un("UPLUS",[w[A]]);break;case 165:this.$=un(w[A-1],[w[A]]);break;case 166:this.$=un("UMINUS",[w[A]]);break;case 177:this.$=un(Wn(w[A-1]));break;case 178:this.$=un(Wn(w[A-3]),[w[A-1]]);break;case 179:this.$=ip(un(Wn(w[A-3]),[w[A-1]]));break;case 180:this.$=un(Wn(w[A-5]),[w[A-3],w[A-1]]);break;case 181:this.$=un(Wn(w[A-7]),[w[A-5],w[A-3],w[A-1]]);break;case 182:this.$=ip(un(Wn(w[A-7]),[w[A-5],w[A-3],w[A-1]]));break;case 183:this.$=un(Wn(w[A-1]),w[A]);break;case 184:this.$=un("bound",[Qw(w[A-1])]);break;case 185:this.$=un(w[A-1],[]);break;case 186:this.$=un(w[A-3],[w[A-1]]);break;case 187:this.$=un(w[A-2]?"notexists":"exists",[Jw(w[A])]);break;case 188:case 189:this.$=yu(w[A-1],{type:"aggregate",aggregation:Wn(w[A-4]),distinct:!!w[A-2]});break;case 190:this.$=yu(w[A-2],{type:"aggregate",aggregation:Wn(w[A-5]),distinct:!!w[A-3],separator:typeof w[A-1]=="string"?w[A-1]:" "});break;case 192:this.$=Ys(w[A]);break;case 193:this.$=V7(w[A-1],Wn(w[A].substr(1)));break;case 194:this.$=Ys(w[A-2],w[A]);break;case 195:case 204:this.$=Ys(w[A],yP);break;case 196:case 205:this.$=Ys(w[A],_P);break;case 197:case 206:this.$=Ys(Wn(w[A]),bP);break;case 200:this.$=Ys(w[A].toLowerCase(),B7);break;case 201:this.$=Ys(w[A].substr(1),yP);break;case 202:this.$=Ys(w[A].substr(1),_P);break;case 203:this.$=Ys(w[A].substr(1).toLowerCase(),bP);break;case 207:case 208:this.$=vP(w[A],1);break;case 209:case 210:this.$=vP(w[A],3);break;case 211:this.$=tt.factory.namedNode(rp(w[A]));break;case 213:var gg=w[A].indexOf(":"),op=w[A].substr(0,gg),yg=tt.prefixes[op];if(!yg)throw new Error("Unknown prefix: "+op);var ar=rp(yg+w[A].substr(gg+1));this.$=tt.factory.namedNode(ar);break;case 214:if(w[A]=w[A].substr(0,w[A].length-1),!(w[A]in tt.prefixes))throw new Error("Unknown prefix: "+w[A]);var ar=rp(tt.prefixes[w[A]]);this.$=tt.factory.namedNode(ar);break;case 215:this.$=np(w[A].replace(/^(_:)/,""));break;case 216:this.$=np();break;case 217:case 218:case 232:this.$=ip(Zw(w[A-3],w[A-2],w[A-1]));break;case 230:case 231:this.$=ip(w[A-1]);break;case 248:case 250:case 252:case 254:case 256:case 260:case 264:case 268:case 270:case 292:case 294:case 296:case 298:case 300:case 302:case 304:case 306:case 329:case 342:case 356:case 368:case 370:case 372:case 374:case 392:case 402:case 425:case 427:case 429:case 431:case 441:case 445:case 447:case 449:w[A-1].push(w[A]);break;case 259:case 269:case 291:case 293:case 295:case 301:case 305:case 371:case 424:case 426:this.$=[w[A]];break;case 308:w[A-3].push(w[A-2]);break;case 350:case 362:case 376:case 380:case 382:case 386:case 396:case 406:case 410:case 412:case 421:w[A-2].push(w[A-1]);break}},"anonymous"),table:[r(e,t,{3:1,4:2,10:3}),{1:[3]},r(n,[2,307],{5:4,7:5,321:6,214:7,8:8,96:9,215:10,17:11,21:12,97:16,38:17,6:[2,238],13:i,16:i,45:i,197:i,224:i,229:i,308:i,24:[1,13],32:[1,14],36:[1,15],41:s}),r([6,13,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],[2,3],{322:19,11:20,14:21,12:[1,22],15:[1,23]}),{6:[1,24]},{6:[2,240]},{6:[2,241]},{6:[2,242]},{6:[2,243],9:25,84:26,85:o},{6:[2,239]},r(c,[2,411],{216:28,217:29}),r(l,[2,249],{18:30}),r(l,[2,251],{22:31}),r(u,[2,255],{25:32,27:33,29:[1,34]}),{13:f,16:d,33:35,39:[1,37],44:39,55:40,87:p,139:38,307:43,308:h,323:36},r(l,[2,267],{37:46}),r(m,[2,326],{98:47,103:49,106:50,117:55,130:61,100:[1,48],110:[1,51],113:[1,52],115:[1,53],116:[1,54],131:[1,62],329:[1,56],330:[1,57],331:[1,58],332:[1,59],333:[1,60]}),{39:[1,63],40:64,43:65,44:66,45:y,87:p},r(_,[2,273],{42:68,324:69,325:[1,70],326:[1,71]}),r(e,[2,248]),r(e,[2,245]),r(e,[2,246]),{13:[1,72]},{16:[1,73]},{1:[2,1]},{6:[2,2]},{6:[2,244]},{45:[1,77],85:[1,78],86:74,87:[1,75],89:[1,76]},r([6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],[2,120],{337:[1,79]}),r(b,[2,418],{218:80,222:81,229:[1,82]}),{19:83,28:T,29:I,52:84,53:E,56:85},{19:88,28:T,29:I,52:89,53:E,56:85},r(l,[2,253],{26:90}),{28:[1,91],52:92,53:E},r(S,[2,385],{181:93,182:94,183:95,31:[2,383]}),r(R,[2,263],{34:96}),r(R,[2,261],{44:39,55:40,307:43,139:97,13:f,16:d,87:p,308:h}),r(R,[2,262]),r(D,[2,259]),r(P,[2,143]),r(P,[2,144]),r([6,13,16,28,29,31,39,45,47,48,53,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346,347,348,349,350,351],[2,145]),r(M,[2,211]),r(M,[2,212]),r(M,[2,213]),r(M,[2,214]),{19:98,28:T,29:I,52:99,53:E,56:85},{6:[2,309],99:100,193:[1,101]},r(O,[2,311],{101:102,328:[1,103]}),r(L,[2,317],{104:104,328:[1,105]}),r(te,[2,322],{107:106,328:[1,107]}),{111:108,112:[2,324],328:[1,109]},{29:re,114:110},{29:re,114:112},{29:re,114:113},{118:114,123:[1,115],125:116,126:V},r(K,[2,315]),r(K,[2,316]),r(Se,[2,319]),r(Se,[2,320]),r(Se,[2,321]),r(m,[2,327]),{13:f,16:d,55:118,307:43,308:h},r(l,[2,12]),r(l,[2,13],{44:66,43:119,45:y,87:p}),r(ce,[2,269]),r(ce,[2,15]),{13:f,16:d,44:136,45:q,46:120,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(_,[2,14]),r(_,[2,274]),r(_,[2,271]),r(_,[2,272]),r(e,[2,4]),{13:[1,177]},r(be,[2,39]),{29:[1,178]},{29:[1,179]},{87:[1,181],91:180},{45:[1,187],87:[1,185],89:[1,186],93:182,165:183,166:184},r(c,[2,410]),r([6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337],[2,121],{338:[1,188]}),{13:f,16:d,45:[1,193],55:194,197:Ut,219:189,220:190,223:191,224:[1,192],307:43,308:h},r(b,[2,419]),r(zt,Ze,{20:196,59:197,69:198,70:le}),r(l,[2,250]),{29:ue,57:200},r(O,[2,279],{54:202,327:[1,203]}),{29:[2,282]},r(pe,ye,{23:204,58:205,62:206,63:Qe}),r(l,[2,252]),{19:208,28:T,29:I,52:209,53:E,56:85},{29:[1,210]},r(u,[2,256]),{31:[1,211]},{31:[2,384]},{13:f,16:d,44:215,45:Et,55:220,82:W,87:p,89:vt,145:212,172:221,185:213,187:214,231:cn,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(UO,[2,265],{56:85,35:227,52:228,19:229,28:T,29:I,53:E}),r(D,[2,260]),r(pe,ye,{58:205,62:206,23:230,63:Qe}),r(l,[2,268]),{6:[2,45]},r(e,t,{10:3,4:231}),{13:f,16:d,55:232,307:43,308:h},r(O,[2,312]),{105:233,112:BO,122:234,132:[1,237],134:235,327:[1,238],334:[1,239]},r(L,[2,318]),r(O,VO,{108:240,133:242,112:GO,132:qO}),r(te,[2,323]),{112:[1,244]},{112:[2,325]},r(ln,[2,50]),r(S,Jm,{135:245,136:246,143:247,144:248,31:WO,112:WO}),r(ln,[2,51]),r(ln,[2,52]),r(Ua,[2,328],{119:249}),{29:re,114:250},r(Ua,[2,56]),{29:re,114:251},r(m,[2,59]),r(ce,[2,270]),{47:[1,252]},r(HO,[2,150]),r(Zm,[2,428],{240:253}),r(du,[2,430],{244:254}),r(du,[2,155],{248:255,249:256,250:[2,438],290:[1,257],341:[1,258],342:[1,259],343:[1,260],344:[1,261],345:[1,262],346:[1,263]}),r(pu,[2,440],{252:264}),r(Hr,[2,448],{260:265}),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,255:154,257:155,264:266,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,255:154,257:155,264:267,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,255:154,257:155,264:268,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Hr,[2,167]),r(Hr,[2,168]),r(Hr,[2,169]),r(Hr,[2,170],{176:269,45:zO,89:KO}),r(Hr,[2,171]),r(Hr,[2,172]),r(Hr,[2,173]),r(Hr,[2,174]),{13:f,16:d,44:136,45:q,46:272,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Tr,[2,176]),{89:[1,273]},{45:[1,274]},{45:[1,275]},{45:[1,276]},{45:[1,277]},{45:[1,278]},{45:YO,89:QO,179:279},{45:[1,282]},{45:[1,284],89:[1,283]},{279:[1,285]},r(qn,[2,192],{292:[1,286],293:[1,287]}),r(qn,[2,195]),r(qn,[2,196]),r(qn,[2,197]),r(qn,[2,198]),r(qn,[2,199]),r(qn,[2,200]),{13:f,16:d,44:39,55:40,82:W,87:p,139:289,172:291,255:154,257:155,266:290,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,320:288},{45:[1,292]},{45:[1,293]},{45:[1,294]},r(Jd,[2,452]),r(Jd,[2,453]),r(Jd,[2,454]),r(Jd,[2,455]),r(Jd,[2,456]),{279:[2,458]},r(eg,[2,207]),r(eg,[2,208]),r(eg,[2,209]),r(eg,[2,210]),r(qn,[2,201]),r(qn,[2,202]),r(qn,[2,203]),r(qn,[2,204]),r(qn,[2,205]),r(qn,[2,206]),r(e,[2,5]),r(tg,[2,297],{88:295}),r(rg,[2,299],{90:296}),{48:[1,297],87:[1,298]},r(ng,[2,301]),r(be,[2,43]),r(be,[2,82]),r(be,[2,83]),{29:[1,299]},{29:[1,300]},{87:[1,302],169:301},r(c,[2,412]),r(Vc,[2,123]),r(Vc,[2,416],{221:303,339:304,39:[1,306],263:[1,307],340:[1,305]}),r(zs,[2,124]),{13:f,16:d,45:[1,311],55:194,89:[1,310],197:Ut,223:312,225:308,226:309,229:XO,307:43,308:h},r(c,i,{215:10,214:314}),r(zs,[2,236]),r(zs,[2,237]),r(hu,[2,6]),r(Vw,[2,287],{60:315,72:316,73:[1,317]}),r(zt,[2,286]),{13:f,16:d,45:q,55:323,67:321,68:322,71:318,77:320,79:319,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,307:43,308:h,346:st,347:nt,348:C,349:x,350:F,351:U},r([6,31,63,70,73,81,83,85],[2,20]),r(S,JO,{38:17,49:324,147:325,17:326,21:327,148:328,154:329,155:330,29:Fo,31:Fo,85:Fo,112:Fo,159:Fo,160:Fo,161:Fo,163:Fo,164:Fo,41:s}),{13:f,16:d,55:331,307:43,308:h},r(O,[2,280]),r(hu,[2,7]),r(zt,Ze,{59:197,69:198,20:332,70:le}),r(pe,[2,284]),{64:[1,333]},r(pe,ye,{58:205,62:206,23:334,63:Qe}),r(l,[2,254]),r(S,Jm,{144:248,30:335,143:336,31:[2,257]}),r(l,[2,100]),{31:[2,387],184:337,335:[1,338]},{13:f,16:d,44:39,55:40,87:p,139:342,186:339,190:340,195:341,197:Gc,307:43,308:h},r(Zd,[2,389],{44:39,55:40,307:43,190:340,195:341,139:342,188:344,189:345,186:346,13:f,16:d,87:p,197:Gc,308:h}),r(Do,[2,227]),r(Do,[2,228]),r(Do,[2,229]),{13:f,16:d,44:215,45:Et,55:220,82:W,87:p,89:vt,172:221,185:351,187:350,200:348,230:347,231:cn,234:349,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},{13:f,16:d,44:39,55:40,87:p,139:342,186:352,190:340,195:341,197:Gc,307:43,308:h},r(Do,[2,146]),r(Do,[2,147]),r(Do,[2,148]),r(Do,[2,149]),{13:f,16:d,44:354,55:355,82:W,87:p,172:357,237:356,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:358,312:Gn,313:353},r(Gw,[2,215]),r(Gw,[2,216]),r(pe,ye,{58:205,62:206,23:359,63:Qe}),r(R,[2,264]),r(UO,[2,266]),r(hu,[2,11]),r(n,[2,308],{6:[2,310]}),r(ln,[2,313],{102:360,120:361,121:[1,362]}),r(ln,[2,47]),r(ln,[2,63]),r(ln,[2,64]),{13:f,16:d,55:363,307:43,308:h},r(ln,[2,336]),r(ln,[2,337]),r(ln,[2,338]),{109:[1,364]},r(ZO,[2,60]),{13:f,16:d,55:365,307:43,308:h},r(O,[2,335]),{13:f,16:d,55:366,307:43,308:h},{31:[1,367]},r(qc,[2,341],{137:368}),r(qc,[2,340]),{13:f,16:d,44:215,45:Et,55:220,82:W,87:p,89:vt,145:369,172:221,185:213,187:214,231:cn,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},{28:[1,370],127:371,128:[1,372]},r(Ua,[2,330],{124:373,125:374,126:V}),r(Ua,[2,57]),{44:375,87:p},r(HO,[2,151],{241:376,242:[1,377]}),r(Zm,[2,153],{245:378,246:[1,379]}),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,247:380,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{250:[1,381]},r(Ar,[2,432]),r(Ar,[2,433]),r(Ar,[2,434]),r(Ar,[2,435]),r(Ar,[2,436]),r(Ar,[2,437]),{250:[2,439]},r([47,48,193,242,246,250,272,290,341,342,343,344,345,346],[2,158],{253:382,254:383,255:384,257:385,263:[1,386],265:[1,387],297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be}),r(pu,[2,162],{261:388,262:389,39:qw,338:Ww}),r(Hr,[2,164]),r(Hr,[2,165]),r(Hr,[2,166]),r(Tr,[2,95]),r(Tr,[2,96]),r(Ar,[2,377],{177:392,325:[1,393]}),{48:[1,394]},r(Tr,[2,177]),{13:f,16:d,44:136,45:q,46:395,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:396,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:397,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:398,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:399,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Tr,[2,183]),r(Tr,[2,98]),r(Ar,[2,381],{180:400}),{87:[1,401]},r(Tr,[2,185]),{13:f,16:d,44:136,45:q,46:402,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{29:ue,57:403},r(qn,[2,193]),{13:f,16:d,55:404,307:43,308:h},{13:f,16:d,44:39,55:40,87:p,139:342,195:405,197:Gc,307:43,308:h},r(Ba,[2,233]),r(Ba,[2,234]),r(Ba,[2,235]),r(eP,[2,459],{281:406,325:[1,407]}),r(Ar,[2,463],{284:408,325:[1,409]}),r(Ar,[2,465],{286:410,325:[1,411]}),{13:f,16:d,31:[1,412],55:414,82:W,171:413,172:415,173:416,174:ig,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:sg},{31:[1,419],89:[1,420]},{29:[1,421]},r(ng,[2,302]),r(tg,[2,367],{167:422}),r(rg,[2,369],{168:423}),{48:[1,424],87:[1,425]},r(ng,[2,371]),r(Vc,[2,122]),r(Vc,[2,417]),r(Vc,[2,413]),r(Vc,[2,414]),r(Vc,[2,415]),r(zs,[2,125]),r(zs,[2,127]),r(zs,[2,128]),r(tP,[2,420],{227:426}),r(zs,[2,130]),{13:f,16:d,55:194,197:Ut,223:427,307:43,308:h},{48:[1,428]},r(Va,[2,289],{61:429,80:430,81:[1,431],83:[1,432]}),r(Vw,[2,288]),{64:[1,433]},r(zt,[2,29],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:434,13:f,16:d,45:q,268:ee,269:Z,270:H,271:ie,273:$e,274:k,276:oe,277:de,279:Ae,280:we,283:ve,285:Te,308:h,346:st,347:nt,348:C,349:x,350:F,351:U}),r(rP,[2,293]),r(Hw,[2,92]),r(Hw,[2,93]),r(Hw,[2,94]),{45:zO,89:KO,176:269},{31:[1,435]},{31:[1,436]},{19:437,28:T,29:I,56:85},{19:438,28:T,29:I,56:85},r(Wc,[2,355],{149:439}),r(Wc,[2,354]),{13:f,16:d,44:215,45:og,55:220,82:W,87:p,89:vt,156:440,172:221,185:441,203:442,231:ag,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(R,[2,19]),r(Va,[2,21]),{13:f,16:d,44:450,45:nP,55:323,65:445,66:446,67:447,68:448,87:p,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,307:43,308:h,346:st,347:nt,348:C,349:x,350:F,351:U},r(hu,[2,8]),{31:[1,451]},{31:[2,258]},{31:[2,101]},r(S,[2,386],{31:[2,388]}),r(Zd,[2,102]),r(Hc,[2,391],{191:452}),r(S,[2,395],{196:453,198:454}),r(S,[2,108]),r(S,[2,109]),r(Zd,[2,103]),r(Zd,[2,104]),r(Zd,[2,390]),{13:f,16:d,44:215,45:Et,48:[1,455],55:220,82:W,87:p,89:vt,172:221,185:351,187:350,200:456,231:cn,234:349,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(cg,[2,424]),r(iP,[2,136]),r(iP,[2,137]),r(zw,[2,140]),{232:[1,457]},{13:f,16:d,44:39,55:40,87:p,139:342,195:458,197:Gc,307:43,308:h},r(Ba,[2,219]),r(Ba,[2,220]),r(Ba,[2,221]),r(Ba,[2,222]),r(Ba,[2,223]),r(hu,[2,10]),r(ln,[2,46]),r(ln,[2,314]),{112:BO,122:459},r(ln,[2,62]),r(O,VO,{133:242,108:460,112:GO,132:qO}),r(ZO,[2,61]),r(ln,[2,49]),r([6,28,126,128,193],[2,65]),{31:[2,66],112:[1,462],138:461},r(qc,[2,351],{146:463,335:[1,464]}),{29:ue,57:465},r(Ua,[2,329]),r(O,[2,332],{129:466,327:[1,467]}),r(Ua,[2,55]),r(Ua,[2,331]),{48:[1,468]},r(Zm,[2,429]),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,239:469,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(du,[2,431]),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,243:470,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(du,[2,156]),{45:YO,89:QO,179:471},r(pu,[2,441]),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,251:472,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Hr,[2,444],{256:473}),r(Hr,[2,446],{258:474}),r(Ar,[2,442]),r(Ar,[2,443]),r(Hr,[2,449]),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,255:154,257:155,259:475,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Ar,[2,450]),r(Ar,[2,451]),r(Ar,[2,379],{178:476}),r(Ar,[2,378]),r([6,13,16,29,31,39,45,47,48,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,338,341,342,343,344,345,346,347,348,349,350,351],[2,175]),{48:[1,477]},{48:[1,478]},{272:[1,479]},{272:[1,480]},{272:[1,481]},{13:f,16:d,44:136,45:q,46:482,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{48:[1,483]},{48:[1,484]},r(Tr,[2,187]),r(qn,[2,194]),{13:f,16:d,44:39,55:40,82:W,87:p,139:289,172:291,255:154,257:155,266:290,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,320:485},{13:f,16:d,39:[1,487],44:136,45:q,46:488,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,282:486,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(eP,[2,460]),{13:f,16:d,44:136,45:q,46:489,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Ar,[2,464]),{13:f,16:d,44:136,45:q,46:490,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Ar,[2,466]),r(be,[2,40]),r(tg,[2,298]),r(ep,[2,87]),r(ep,[2,88]),r(ep,[2,89]),r(ep,[2,90]),{13:f,16:d,55:492,82:W,172:493,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,311:494,312:Gn,315:491},r(be,[2,41]),r(rg,[2,300]),r(tp,[2,303],{92:495}),{13:f,16:d,31:[1,496],55:414,82:W,171:497,172:415,173:416,174:ig,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:sg},{31:[1,498],89:[1,499]},{29:[1,500]},r(ng,[2,372]),{13:f,16:d,48:[2,422],55:194,197:Ut,223:312,226:502,228:501,229:XO,307:43,308:h},r(zs,[2,131]),r(zs,[2,126]),r(Va,[2,22]),r(Va,[2,290]),{82:[1,503]},{82:[1,504]},{13:f,16:d,44:510,45:q,55:323,67:321,68:322,74:505,75:506,76:sP,77:320,78:oP,79:509,87:p,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,307:43,308:h,346:st,347:nt,348:C,349:x,350:F,351:U},r(rP,[2,294]),r(aP,[2,69]),r(aP,[2,70]),r(zt,Ze,{59:197,69:198,20:511,70:le}),r(pe,ye,{58:205,62:206,23:512,63:Qe}),{29:[2,375],31:[2,71],84:522,85:o,112:[1,518],150:513,151:514,158:515,159:[1,516],160:[1,517],161:[1,519],163:[1,520],164:[1,521],175:523},r(Wc,[2,363],{157:524,335:[1,525]}),r(c,i,{215:10,202:526,205:527,208:528,214:529,44:530,87:p}),r(lg,[2,399],{215:10,205:527,208:528,214:529,44:530,204:531,202:532,13:i,16:i,45:i,197:i,224:i,229:i,308:i,87:p}),{13:f,16:d,44:215,45:og,55:220,82:W,87:p,89:vt,172:221,185:351,203:536,212:534,231:ag,233:533,234:535,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(c,i,{215:10,205:527,208:528,214:529,44:530,202:537,87:p}),r(pe,[2,23],{307:43,267:139,275:146,278:149,55:323,67:447,68:448,44:450,66:538,13:f,16:d,45:nP,87:p,268:ee,269:Z,270:H,271:ie,273:$e,274:k,276:oe,277:de,279:Ae,280:we,283:ve,285:Te,308:h,346:st,347:nt,348:C,349:x,350:F,351:U}),r(zc,[2,291]),r(zc,[2,24]),r(zc,[2,25]),{13:f,16:d,44:136,45:q,46:539,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(zc,[2,28]),r(pe,ye,{58:205,62:206,23:540,63:Qe}),r([31,112,232,318,335],[2,105],{192:541,193:[1,542]}),r(Hc,[2,107]),{13:f,16:d,44:215,45:Et,55:220,82:W,87:p,89:vt,172:221,185:351,187:350,199:543,200:544,231:cn,234:349,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(cP,[2,132]),r(cg,[2,425]),r(cP,[2,133]),{13:f,16:d,44:354,55:355,82:W,87:p,172:357,237:356,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:358,312:Gn,313:545},r(ln,[2,54]),r(ln,[2,48]),r(qc,[2,342]),{13:f,16:d,44:39,55:40,87:p,139:546,307:43,308:h},r(qc,[2,68]),r(S,[2,350],{31:lP,112:lP}),r(ln,[2,53]),{13:f,16:d,55:547,307:43,308:h},r(O,[2,333]),r(ce,[2,16]),r(Zm,[2,152]),r(du,[2,154]),r(du,[2,157]),r(pu,[2,159]),r(pu,[2,160],{262:389,261:548,39:qw,338:Ww}),r(pu,[2,161],{262:389,261:549,39:qw,338:Ww}),r(Hr,[2,163]),{13:f,16:d,44:136,45:q,46:550,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Tr,[2,178]),r(Tr,[2,179]),{13:f,16:d,44:136,45:q,46:551,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:552,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:553,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{48:[1,554],272:[1,555]},r(Tr,[2,184]),r(Tr,[2,186]),{314:[1,556]},{48:[1,557]},{48:[2,461]},{48:[2,462]},{48:[1,558]},{48:[2,467],193:[1,561],287:559,288:560},{13:f,16:d,55:194,197:Ut,223:562,307:43,308:h},r(Kw,[2,224]),r(Kw,[2,225]),r(Kw,[2,226]),{31:[1,563],45:uP,94:564},r(be,[2,84]),r(tg,[2,368]),r(be,[2,85]),r(rg,[2,370]),r(tp,[2,373],{170:566}),{48:[1,567]},{48:[2,423],337:[1,568]},r(Va,[2,35],{83:[1,569]}),r(Va,[2,36],{81:[1,570]}),r(Vw,[2,30],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:509,44:510,75:571,13:f,16:d,45:q,76:sP,78:oP,87:p,268:ee,269:Z,270:H,271:ie,273:$e,274:k,276:oe,277:de,279:Ae,280:we,283:ve,285:Te,308:h,346:st,347:nt,348:C,349:x,350:F,351:U}),r(mu,[2,295]),{45:q,77:572},{45:q,77:573},r(mu,[2,33]),r(mu,[2,34]),{31:[2,275],50:574,84:575,85:o},{31:[2,277],51:576,84:577,85:o},r(Wc,[2,356]),r(fP,[2,357],{152:578,335:[1,579]}),r(Lo,[2,74]),{29:ue,57:580},{29:ue,57:581},{13:f,16:d,44:39,55:40,87:p,139:582,307:43,308:h},r(dP,[2,365],{162:583,328:[1,584]}),{13:f,16:d,45:q,55:323,67:321,68:322,77:320,79:585,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,307:43,308:h,346:st,347:nt,348:C,349:x,350:F,351:U},{45:[1,586]},r(Lo,[2,81]),{29:ue,57:587},r(Wc,[2,73]),r(S,[2,362],{29:No,31:No,85:No,112:No,159:No,160:No,161:No,163:No,164:No}),r(lg,[2,112]),r(gu,[2,401],{206:588}),r(S,[2,405],{209:589,210:590}),r(S,[2,403]),r(S,[2,404]),r(lg,[2,113]),r(lg,[2,400]),{13:f,16:d,44:215,45:og,48:[1,591],55:220,82:W,87:p,89:vt,172:221,185:351,203:536,212:592,231:ag,234:535,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(cg,[2,426]),r(zw,[2,138]),r(zw,[2,139]),{232:[1,593]},r(zc,[2,292]),{47:[1,595],48:[1,594]},r(hu,[2,9]),r(Hc,[2,392]),r(Hc,[2,393],{44:39,55:40,307:43,195:341,139:342,194:596,190:597,13:f,16:d,87:p,197:Gc,308:h}),r(Hc,[2,110],{272:[1,598]}),r(ug,[2,397],{201:599,316:600,317:[1,601]}),{314:[1,602]},{29:[1,603]},r(Ua,[2,58]),r(Hr,[2,445]),r(Hr,[2,447]),{48:[1,604],272:[1,605]},{48:[1,606]},{272:[1,607]},{272:[1,608]},r(Tr,[2,99]),r(Ar,[2,382]),r([13,16,39,47,48,87,193,197,242,246,250,263,265,272,290,297,298,299,300,301,302,308,314,338,341,342,343,344,345,346],[2,232]),r(Tr,[2,188]),r(Tr,[2,189]),{48:[1,609]},{48:[2,468]},{289:[1,610]},{13:f,16:d,55:492,82:W,172:493,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,311:494,312:Gn,315:611},r(be,[2,42]),r(tp,[2,304]),{13:f,16:d,55:414,82:W,95:612,171:613,172:415,173:416,174:ig,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:sg},{31:[1,614],45:uP,94:615},r(zs,[2,129]),r(tP,[2,421]),{82:[1,616]},{82:[1,617]},r(mu,[2,296]),r(mu,[2,31]),r(mu,[2,32]),{31:[2,17]},{31:[2,276]},{31:[2,18]},{31:[2,278]},r(S,JO,{155:330,153:618,154:619,29:ko,31:ko,85:ko,112:ko,159:ko,160:ko,161:ko,163:ko,164:ko}),r(fP,[2,358]),r(Lo,[2,75]),r(Lo,[2,76]),{29:ue,57:620},{13:f,16:d,44:39,55:40,87:p,139:621,307:43,308:h},r(dP,[2,366]),r(Lo,[2,79]),{13:f,16:d,44:136,45:q,46:622,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Lo,[2,91],{336:[1,623]}),r([29,31,85,112,159,160,161,163,164,232,318,335],[2,114],{207:624,193:[1,625]}),r(gu,[2,117]),{13:f,16:d,44:215,45:og,55:220,82:W,87:p,89:vt,172:221,185:351,203:536,211:626,212:627,231:ag,234:535,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(Do,[2,134]),r(cg,[2,427]),r(Do,[2,135]),r(zc,[2,26]),{44:628,87:p},r(Hc,[2,106]),r(Hc,[2,394]),r(S,[2,396]),r(ug,[2,111]),r(ug,[2,398]),{13:f,16:d,44:39,55:40,87:p,139:342,186:629,190:340,195:341,197:Gc,307:43,308:h},r(Gw,[2,217]),r(S,Jm,{144:248,140:630,143:631,31:[2,343]}),r(Tr,[2,97]),r(Ar,[2,380]),r(Tr,[2,180]),{13:f,16:d,44:136,45:q,46:632,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:633,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Tr,[2,190]),{290:[1,634]},{314:[1,635]},{13:f,16:d,48:[1,636],55:414,82:W,171:637,172:415,173:416,174:ig,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:sg},r(pP,[2,305]),r(be,[2,86]),r(tp,[2,374]),r(Va,[2,37]),r(Va,[2,38]),r(Wc,[2,72]),r(Wc,[2,360]),r(Lo,[2,77]),{29:ue,57:638},{47:[1,639]},{29:[2,376]},r(gu,[2,402]),r(gu,[2,115],{215:10,208:528,214:529,44:530,205:640,13:i,16:i,45:i,197:i,224:i,229:i,308:i,87:p}),r(gu,[2,118],{272:[1,641]}),r(fg,[2,407],{213:642,319:643,317:[1,644]}),{48:[1,645]},{318:[1,646]},{31:[1,647]},{31:[2,344]},{48:[1,648]},{48:[1,649]},{291:650,303:Ve,304:Ge,305:Pe,306:qe},r(ep,[2,218]),r(tp,[2,44]),r(pP,[2,306]),r(Lo,[2,78]),{44:651,87:p},r(gu,[2,116]),r(S,[2,406]),r(fg,[2,119]),r(fg,[2,408]),r(c,i,{215:10,205:527,208:528,214:529,44:530,202:652,87:p}),r(zc,[2,27]),r(ug,[2,230]),r(hP,[2,345],{141:653,335:[1,654]}),r(Tr,[2,181]),r(Tr,[2,182]),{48:[2,191]},{48:[1,655]},{318:[1,656]},r(S,Jm,{144:248,142:657,143:658,31:mP,112:mP}),r(hP,[2,346]),r(Lo,[2,80]),r(fg,[2,231]),r(qc,[2,67]),r(qc,[2,348])],defaultActions:{5:[2,240],6:[2,241],7:[2,242],9:[2,239],24:[2,1],25:[2,2],26:[2,244],87:[2,282],94:[2,384],100:[2,45],109:[2,325],166:[2,458],263:[2,439],336:[2,258],337:[2,101],487:[2,461],488:[2,462],560:[2,468],574:[2,17],575:[2,276],576:[2,18],577:[2,278],623:[2,376],631:[2,344],650:[2,191]},parseError:a(function(N,$){if($.recoverable)this.trace(N);else{var z=new Error(N);throw z.hash=$,z}},"parseError"),parse:a(function(N){var $=this,z=[0],Ie=[],Je=[null],w=[],Hn=this.table,A="",Qs=0,sp=0,mg=0,gg=2,op=1,yg=w.slice.call(arguments,1),ar=Object.create(this.lexer),Xs={yy:{}};for(var ap in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ap)&&(Xs.yy[ap]=this.yy[ap]);ar.setInput(N,Xs.yy),Xs.yy.lexer=ar,Xs.yy.parser=this,typeof ar.yylloc>"u"&&(ar.yylloc={});var wu=ar.yylloc;w.push(wu);var Bt=ar.options&&ar.options.ranges;typeof Xs.yy.parseError=="function"?this.parseError=Xs.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(Js){z.length=z.length-2*Js,Je.length=Je.length-Js,w.length=w.length-Js}a(tr,"popStack");for(var Tt=a(function(){var Js;return Js=ar.lex()||op,typeof Js!="number"&&(Js=$.symbols_[Js]||Js),Js},"lex"),Ft,fi,Xc,Hi,s0e,aE,Eu={},_g,$o,RP,bg;;){if(Xc=z[z.length-1],this.defaultActions[Xc]?Hi=this.defaultActions[Xc]:((Ft===null||typeof Ft>"u")&&(Ft=Tt()),Hi=Hn[Xc]&&Hn[Xc][Ft]),typeof Hi>"u"||!Hi.length||!Hi[0]){var cE="";bg=[];for(_g in Hn[Xc])this.terminals_[_g]&&_g>gg&&bg.push("'"+this.terminals_[_g]+"'");ar.showPosition?cE="Parse error on line "+(Qs+1)+`:
35
+ `?e+="\\n":n==="\r"?e+="\\r":n===" "?e+="\\t":i<32||i===127?e+="\\x"+i.toString(16).toUpperCase().padStart(2,"0"):e+=n}return`"${e}"`}a(aF,"quoteYamlString");function _W(r,e=!1){return typeof r!="string"?String(r):oF(r,e)?aF(r):r}a(_W,"serializeYamlScalar")});var Ou=v(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.bytesToBase64=lF;xu.base64ToBytes=uF;xu.base64ToUtf8=bW;xu.utf8ToBase64=SW;var cF=32768;function lF(r){let e="";for(let t=0;t<r.length;t+=cF)e+=String.fromCharCode(...r.subarray(t,t+cF));return btoa(e)}a(lF,"bytesToBase64");function uF(r){let e=r.replace(/\s/g,""),t=e.length%4,n=t===2||t===3?e+"=".repeat(4-t):e,i=atob(n),s=new Uint8Array(i.length);for(let o=0;o<i.length;o++)s[o]=i.charCodeAt(o);return s}a(uF,"base64ToBytes");function bW(r){return new TextDecoder("utf-8",{ignoreBOM:!0}).decode(uF(r))}a(bW,"base64ToUtf8");function SW(r){return lF(new TextEncoder().encode(r))}a(SW,"utf8ToBase64")});var Lp=v(Wv=>{"use strict";Object.defineProperty(Wv,"__esModule",{value:!0});Wv.iriToObsidianName=EW;var wW=Yt();function EW(r){let e=wW.Namespace.fromTermIRI(r);if(e)return`${e.namespace.prefix}__${e.localName}`;let t=r.match(/\/([^/]+)\.md$/);return t?t[1]:null}a(EW,"iriToObsidianName")});var fF=v(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});yy.mergePropertyDefaults=vW;yy.mergeInheritanceRules=TW;function vW(r,e){let t=new Map;for(let s of e)t.set(s.propertyName,s);let n=[],i=new Set;for(let s of r){let o=t.get(s.propertyName);o?(n.push(o),i.add(o.propertyName)):n.push(s)}for(let s of e)i.has(s.propertyName)||n.push(s);return n}a(vW,"mergePropertyDefaults");function TW(r,e){let t=new Map;for(let s of e)t.set(s.targetPropertyName,s);let n=[],i=new Set;for(let s of r){let o=t.get(s.targetPropertyName);o?(n.push(o),i.add(o.targetPropertyName)):n.push(s)}for(let s of e)i.has(s.targetPropertyName)||n.push(s);return n}a(TW,"mergeInheritanceRules")});var Hv=v((rwe,dF)=>{var Pu=class{static{a(this,"Wildcard")}constructor(){return AW||this}equals(e){return e&&this.termType===e.termType}};Object.defineProperty(Pu.prototype,"value",{enumerable:!0,value:"*"});Object.defineProperty(Pu.prototype,"termType",{enumerable:!0,value:"Wildcard"});var AW=new Pu;dF.exports.Wildcard=Pu});var hF=v((iwe,pF)=>{var IW=(function(){var r=a(function(j,N,$,z){for($=$||{},z=j.length;z--;$[j[z]]=N);return $},"o"),e=[6,12,13,15,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],t=[2,247],n=[100,110,113,115,116,123,126,131,329,330,331,332,333],i=[2,409],s=[1,18],o=[1,27],c=[13,16,45,197,224,229,308],l=[28,29,53],u=[28,53],f=[1,42],d=[1,45],p=[1,41],h=[1,44],m=[123,126],y=[1,67],_=[39,45,87],b=[13,16,45,197,224,308],T=[1,87],I=[2,281],E=[1,86],S=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],R=[6,28,29,53,63,70,73,81,83,85],D=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],P=[6,13,16,28,29,45,53,63,70,73,81,82,83,85,87,89,197,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314],M=[6,13,16,28,29,31,39,45,47,48,53,63,70,73,81,82,83,85,87,89,109,112,121,123,126,128,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,337,338,340,341,342,343,344,345,346],O=[13,16,308],L=[112,132,327,334],te=[13,16,112,132,308],re=[1,111],V=[1,117],K=[112,132,327,328,334],Se=[13,16,112,132,308,328],ce=[28,29,45,53,87],q=[1,138],W=[1,151],ne=[1,128],xe=[1,127],X=[1,129],ee=[1,140],Z=[1,141],H=[1,142],ie=[1,143],$e=[1,144],k=[1,145],oe=[1,147],de=[1,148],Ae=[2,457],we=[1,158],ve=[1,159],Te=[1,160],ge=[1,152],G=[1,153],ae=[1,156],he=[1,171],Ee=[1,172],Oe=[1,173],Ce=[1,174],Ue=[1,175],Be=[1,176],Ve=[1,167],Ge=[1,168],Pe=[1,169],qe=[1,170],_t=[1,157],st=[1,166],nt=[1,161],C=[1,162],x=[1,163],F=[1,164],U=[1,165],be=[6,13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],Ut=[1,195],zt=[6,31,73,81,83,85],Ze=[2,285],le=[1,199],ue=[1,201],pe=[6,31,70,73,81,83,85],ye=[2,283],Qe=[1,207],Et=[1,218],vt=[1,223],cn=[1,219],ui=[1,225],Fi=[1,226],Gn=[1,224],UO=[6,63,70,73,81,83,85],BO=[1,236],VO=[2,334],GO=[1,243],qO=[1,241],ln=[6,193],Jm=[2,349],WO=[2,339],Ua=[28,128],HO=[47,48,193,272],Zm=[47,48,193,242,272],du=[47,48,193,242,246,272],pu=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],Hr=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],zO=[1,271],KO=[1,270],Tr=[6,13,16,29,31,39,45,47,48,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,338,341,342,343,344,345,346,347,348,349,350,351],YO=[1,281],QO=[1,280],qn=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],Jd=[45,89],eg=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],tg=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rg=[31,89],ng=[48,87],Vc=[6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338],zs=[6,13,16,39,45,48,82,87,89,231,263,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338,340],XO=[1,313],hu=[6,85],Vw=[6,31,81,83,85],JO=[2,361],Fo=[2,353],Gc=[1,343],Zd=[31,112,335],Do=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Gw=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335],ZO=[6,109,193],qc=[31,112],Ar=[13,16,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],qw=[1,390],Ww=[1,391],Ba=[13,16,87,197,308,314],eP=[13,16,39,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],ig=[1,417],sg=[1,418],tP=[13,16,48,197,229,308],Va=[6,31,85],rP=[6,13,16,31,45,73,81,83,85,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Hw=[6,13,16,29,31,45,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,231,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,346,347,348,349,350,351],Wc=[29,31,85,112,159,160,161,163,164],og=[1,443],ag=[1,444],nP=[1,449],Hc=[31,112,193,232,318,335],cg=[13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],iP=[13,16,31,45,48,82,87,89,112,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],zw=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],ep=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],tp=[31,45],sP=[1,507],oP=[1,508],aP=[6,13,16,29,31,39,45,47,48,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,336,338,341,342,343,344,345,346,347,348,349,350,351],lg=[29,31,85,112,159,160,161,163,164,335],zc=[6,13,16,31,45,70,73,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],cP=[13,16,31,45,48,82,87,89,112,193,197,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],lP=[2,352],Kw=[13,16,197,308,314],uP=[1,565],mu=[6,13,16,31,45,76,78,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],fP=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Lo=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],dP=[13,16,87,308],No=[2,364],gu=[29,31,85,112,159,160,161,163,164,193,232,318,335],ug=[31,112,193,232,272,318,335],ko=[2,359],pP=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],fg=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],hP=[13,16,31,45,82,87,89,112,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],mP=[2,347],Yw={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Query:7,Qry:8,Query_option0:9,Prologue_repetition0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectClauseWildcard:17,Qry_repetition0:18,WhereClause:19,SolutionModifierNoGroup:20,SelectClauseVars:21,Qry_repetition1:22,SolutionModifier:23,CONSTRUCT:24,ConstructTemplate:25,Qry_repetition2:26,Qry_repetition3:27,WHERE:28,"{":29,Qry_option0:30,"}":31,DESCRIBE:32,Qry_group0:33,Qry_repetition4:34,Qry_option1:35,ASK:36,Qry_repetition5:37,SelectClauseBase:38,"*":39,SelectClauseVars_repetition_plus0:40,SELECT:41,SelectClauseBase_option0:42,SelectClauseItem:43,Var:44,"(":45,Expression:46,AS:47,")":48,SubSelect:49,SubSelect_option0:50,SubSelect_option1:51,DatasetClause:52,FROM:53,DatasetClause_option0:54,iri:55,WhereClause_option0:56,GroupGraphPattern:57,SolutionModifier_option0:58,SolutionModifierNoGroup_option0:59,SolutionModifierNoGroup_option1:60,SolutionModifierNoGroup_option2:61,GroupClause:62,GROUP:63,BY:64,GroupClause_repetition_plus0:65,GroupCondition:66,BuiltInCall:67,FunctionCall:68,HavingClause:69,HAVING:70,HavingClause_repetition_plus0:71,OrderClause:72,ORDER:73,OrderClause_repetition_plus0:74,OrderCondition:75,ASC:76,BrackettedExpression:77,DESC:78,Constraint:79,LimitOffsetClauses:80,LIMIT:81,INTEGER:82,OFFSET:83,ValuesClause:84,VALUES:85,InlineData:86,VAR:87,InlineData_repetition0:88,NIL:89,InlineData_repetition1:90,InlineData_repetition_plus2:91,InlineData_repetition3:92,DataBlock:93,DataBlockValueList:94,DataBlockValueList_repetition_plus0:95,Update:96,Update_repetition0:97,Update1:98,Update_option0:99,LOAD:100,Update1_option0:101,Update1_option1:102,Update1_group0:103,Update1_option2:104,GraphRefAll:105,Update1_group1:106,Update1_option3:107,GraphOrDefault:108,TO:109,CREATE:110,Update1_option4:111,GRAPH:112,INSERTDATA:113,QuadPattern:114,DELETEDATA:115,DELETEWHERE:116,Update1_option5:117,InsertDeleteClause:118,Update1_repetition0:119,IntoGraphClause:120,INTO:121,GraphRef:122,DELETE:123,InsertDeleteClause_option0:124,InsertClause:125,INSERT:126,UsingClause:127,USING:128,UsingClause_option0:129,WithClause:130,WITH:131,DEFAULT:132,GraphOrDefault_option0:133,GraphRefAll_group0:134,Quads:135,Quads_option0:136,Quads_repetition0:137,QuadsNotTriples:138,VarOrIri:139,QuadsNotTriples_option0:140,QuadsNotTriples_option1:141,QuadsNotTriples_option2:142,TriplesTemplate:143,TriplesTemplate_repetition0:144,TriplesSameSubject:145,TriplesTemplate_option0:146,GroupGraphPatternSub:147,GroupGraphPatternSub_option0:148,GroupGraphPatternSub_repetition0:149,GroupGraphPatternSubTail:150,GraphPatternNotTriples:151,GroupGraphPatternSubTail_option0:152,GroupGraphPatternSubTail_option1:153,TriplesBlock:154,TriplesBlock_repetition0:155,TriplesSameSubjectPath:156,TriplesBlock_option0:157,GroupOrUnionGraphPattern:158,OPTIONAL:159,MINUS:160,SERVICE:161,GraphPatternNotTriples_option0:162,FILTER:163,BIND:164,InlineDataOneVar:165,InlineDataFull:166,InlineDataOneVar_repetition0:167,InlineDataFull_repetition0:168,InlineDataFull_repetition_plus1:169,InlineDataFull_repetition2:170,DataBlockValue:171,Literal:172,QuotedTriple:173,UNDEF:174,GroupOrUnionGraphPattern_repetition0:175,ArgList:176,ArgList_option0:177,ArgList_repetition0:178,ExpressionList:179,ExpressionList_repetition0:180,ConstructTemplate_option0:181,ConstructTriples:182,ConstructTriples_repetition0:183,ConstructTriples_option0:184,VarOrTermOrQuotedTP:185,PropertyListNotEmpty:186,TriplesNode:187,PropertyList:188,PropertyList_option0:189,VerbObjectList:190,PropertyListNotEmpty_repetition0:191,SemiOptionalVerbObjectList:192,";":193,SemiOptionalVerbObjectList_option0:194,Verb:195,ObjectList:196,a:197,ObjectList_repetition0:198,Object:199,GraphNode:200,Object_option0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,O:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmptyTail:207,O_group0:208,ObjectListPath:209,ObjectListPath_repetition0:210,ObjectPath:211,GraphNodePath:212,ObjectPath_option0:213,Path:214,Path_repetition0:215,PathSequence:216,PathSequence_repetition0:217,PathEltOrInverse:218,PathElt:219,PathPrimary:220,PathElt_option0:221,PathEltOrInverse_option0:222,IriOrA:223,"!":224,PathNegatedPropertySet:225,PathOneInPropertySet:226,PathNegatedPropertySet_repetition0:227,PathNegatedPropertySet_option0:228,"^":229,TriplesNode_repetition_plus0:230,"[":231,"]":232,TriplesNodePath_repetition_plus0:233,VarOrTermOrQuotedTPExpr:234,VarOrTerm:235,GraphTerm:236,BlankNode:237,ConditionalOrExpression:238,ConditionalAndExpression:239,ConditionalOrExpression_repetition0:240,ConditionalOrExpressionTail:241,"||":242,RelationalExpression:243,ConditionalAndExpression_repetition0:244,ConditionalAndExpressionTail:245,"&&":246,NumericExpression:247,RelationalExpression_group0:248,RelationalExpression_option0:249,IN:250,MultiplicativeExpression:251,NumericExpression_repetition0:252,AdditiveExpressionTail:253,AdditiveExpressionTail_group0:254,NumericLiteralPositive:255,AdditiveExpressionTail_repetition0:256,NumericLiteralNegative:257,AdditiveExpressionTail_repetition1:258,UnaryExpression:259,MultiplicativeExpression_repetition0:260,MultiplicativeExpressionTail:261,MultiplicativeExpressionTail_group0:262,"+":263,PrimaryExpression:264,"-":265,ExprQuotedTP:266,Aggregate:267,FUNC_ARITY0:268,FUNC_ARITY1:269,FUNC_ARITY1_SPARQL_STAR:270,FUNC_ARITY2:271,",":272,FUNC_ARITY3:273,FUNC_ARITY3_SPARQL_STAR:274,BuiltInCall_group0:275,BOUND:276,BNODE:277,BuiltInCall_option0:278,EXISTS:279,COUNT:280,Aggregate_option0:281,Aggregate_group0:282,FUNC_AGGREGATE:283,Aggregate_option1:284,GROUP_CONCAT:285,Aggregate_option2:286,Aggregate_option3:287,GroupConcatSeparator:288,SEPARATOR:289,"=":290,String:291,LANGTAG:292,"^^":293,DECIMAL:294,DOUBLE:295,BOOLEAN:296,INTEGER_POSITIVE:297,DECIMAL_POSITIVE:298,DOUBLE_POSITIVE:299,INTEGER_NEGATIVE:300,DECIMAL_NEGATIVE:301,DOUBLE_NEGATIVE:302,STRING_LITERAL1:303,STRING_LITERAL2:304,STRING_LITERAL_LONG1:305,STRING_LITERAL_LONG2:306,PrefixedName:307,PNAME_LN:308,BLANK_NODE_LABEL:309,ANON:310,QuotedTP:311,"<<":312,qtSubjectOrObject:313,">>":314,DataValueTerm:315,AnnotationPattern:316,"{|":317,"|}":318,AnnotationPatternPath:319,ExprVarOrTerm:320,QueryOrUpdate_group0_option0:321,Prologue_repetition0_group0:322,Qry_group0_repetition_plus0:323,SelectClauseBase_option0_group0:324,DISTINCT:325,REDUCED:326,NAMED:327,SILENT:328,CLEAR:329,DROP:330,ADD:331,MOVE:332,COPY:333,ALL:334,".":335,UNION:336,"|":337,"/":338,PathElt_option0_group0:339,"?":340,"!=":341,"<":342,">":343,"<=":344,">=":345,NOT:346,CONCAT:347,COALESCE:348,SUBSTR:349,REGEX:350,REPLACE:351,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",24:"CONSTRUCT",28:"WHERE",29:"{",31:"}",32:"DESCRIBE",36:"ASK",39:"*",41:"SELECT",45:"(",47:"AS",48:")",53:"FROM",63:"GROUP",64:"BY",70:"HAVING",73:"ORDER",76:"ASC",78:"DESC",81:"LIMIT",82:"INTEGER",83:"OFFSET",85:"VALUES",87:"VAR",89:"NIL",100:"LOAD",109:"TO",110:"CREATE",112:"GRAPH",113:"INSERTDATA",115:"DELETEDATA",116:"DELETEWHERE",121:"INTO",123:"DELETE",126:"INSERT",128:"USING",131:"WITH",132:"DEFAULT",159:"OPTIONAL",160:"MINUS",161:"SERVICE",163:"FILTER",164:"BIND",174:"UNDEF",193:";",197:"a",224:"!",229:"^",231:"[",232:"]",242:"||",246:"&&",250:"IN",263:"+",265:"-",268:"FUNC_ARITY0",269:"FUNC_ARITY1",270:"FUNC_ARITY1_SPARQL_STAR",271:"FUNC_ARITY2",272:",",273:"FUNC_ARITY3",274:"FUNC_ARITY3_SPARQL_STAR",276:"BOUND",277:"BNODE",279:"EXISTS",280:"COUNT",283:"FUNC_AGGREGATE",285:"GROUP_CONCAT",289:"SEPARATOR",290:"=",292:"LANGTAG",293:"^^",294:"DECIMAL",295:"DOUBLE",296:"BOOLEAN",297:"INTEGER_POSITIVE",298:"DECIMAL_POSITIVE",299:"DOUBLE_POSITIVE",300:"INTEGER_NEGATIVE",301:"DECIMAL_NEGATIVE",302:"DOUBLE_NEGATIVE",303:"STRING_LITERAL1",304:"STRING_LITERAL2",305:"STRING_LITERAL_LONG1",306:"STRING_LITERAL_LONG2",308:"PNAME_LN",309:"BLANK_NODE_LABEL",310:"ANON",312:"<<",314:">>",317:"{|",318:"|}",325:"DISTINCT",326:"REDUCED",327:"NAMED",328:"SILENT",329:"CLEAR",330:"DROP",331:"ADD",332:"MOVE",333:"COPY",334:"ALL",335:".",336:"UNION",337:"|",338:"/",340:"?",341:"!=",342:"<",343:">",344:"<=",345:">=",346:"NOT",347:"CONCAT",348:"COALESCE",349:"SUBSTR",350:"REGEX",351:"REPLACE"},productions_:[0,[3,3],[7,2],[4,1],[11,2],[14,3],[8,4],[8,4],[8,5],[8,7],[8,5],[8,4],[17,2],[21,2],[38,2],[43,1],[43,5],[49,4],[49,4],[52,3],[19,2],[23,2],[20,3],[62,3],[66,1],[66,1],[66,3],[66,5],[66,1],[69,2],[72,3],[75,2],[75,2],[75,1],[75,1],[80,2],[80,2],[80,4],[80,4],[84,2],[86,4],[86,4],[86,6],[86,2],[94,3],[96,3],[98,4],[98,3],[98,5],[98,4],[98,2],[98,2],[98,2],[98,5],[120,2],[118,3],[118,1],[125,2],[127,3],[130,2],[108,1],[108,2],[122,2],[105,1],[105,1],[114,3],[135,2],[138,7],[143,3],[57,3],[57,3],[147,2],[150,3],[154,3],[151,1],[151,2],[151,2],[151,3],[151,4],[151,2],[151,6],[151,1],[93,1],[93,1],[165,4],[166,4],[166,6],[171,1],[171,1],[171,1],[171,1],[158,2],[79,1],[79,1],[79,1],[68,2],[176,1],[176,5],[179,1],[179,4],[25,3],[182,3],[145,2],[145,2],[188,1],[186,2],[192,2],[190,2],[195,1],[195,1],[196,2],[199,2],[156,2],[156,2],[202,2],[207,1],[207,2],[205,2],[209,2],[211,2],[214,2],[216,2],[219,2],[218,2],[220,1],[220,2],[220,3],[225,1],[225,1],[225,4],[226,1],[226,2],[187,3],[187,3],[203,3],[203,3],[200,1],[200,1],[212,1],[212,1],[234,1],[235,1],[235,1],[139,1],[139,1],[44,1],[236,1],[236,1],[236,1],[236,1],[46,1],[238,2],[241,2],[239,2],[245,2],[243,1],[243,3],[243,4],[247,2],[253,2],[253,2],[253,2],[251,2],[261,2],[259,2],[259,2],[259,2],[259,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[77,3],[67,1],[67,2],[67,4],[67,4],[67,6],[67,8],[67,8],[67,2],[67,4],[67,2],[67,4],[67,3],[267,5],[267,5],[267,6],[288,4],[172,1],[172,2],[172,3],[172,1],[172,1],[172,1],[172,1],[172,1],[172,1],[255,1],[255,1],[255,1],[257,1],[257,1],[257,1],[291,1],[291,1],[291,1],[291,1],[55,1],[55,1],[307,1],[307,1],[237,1],[237,1],[311,5],[173,5],[313,1],[313,1],[313,1],[313,1],[313,1],[315,1],[315,1],[315,1],[185,1],[185,1],[185,1],[316,3],[319,3],[266,5],[320,1],[320,1],[320,1],[223,1],[223,1],[321,0],[321,1],[5,1],[5,1],[5,1],[9,0],[9,1],[322,1],[322,1],[10,0],[10,2],[18,0],[18,2],[22,0],[22,2],[26,0],[26,2],[27,0],[27,2],[30,0],[30,1],[323,1],[323,2],[33,1],[33,1],[34,0],[34,2],[35,0],[35,1],[37,0],[37,2],[40,1],[40,2],[324,1],[324,1],[42,0],[42,1],[50,0],[50,1],[51,0],[51,1],[54,0],[54,1],[56,0],[56,1],[58,0],[58,1],[59,0],[59,1],[60,0],[60,1],[61,0],[61,1],[65,1],[65,2],[71,1],[71,2],[74,1],[74,2],[88,0],[88,2],[90,0],[90,2],[91,1],[91,2],[92,0],[92,2],[95,1],[95,2],[97,0],[97,4],[99,0],[99,2],[101,0],[101,1],[102,0],[102,1],[103,1],[103,1],[104,0],[104,1],[106,1],[106,1],[106,1],[107,0],[107,1],[111,0],[111,1],[117,0],[117,1],[119,0],[119,2],[124,0],[124,1],[129,0],[129,1],[133,0],[133,1],[134,1],[134,1],[134,1],[136,0],[136,1],[137,0],[137,2],[140,0],[140,1],[141,0],[141,1],[142,0],[142,1],[144,0],[144,3],[146,0],[146,1],[148,0],[148,1],[149,0],[149,2],[152,0],[152,1],[153,0],[153,1],[155,0],[155,3],[157,0],[157,1],[162,0],[162,1],[167,0],[167,2],[168,0],[168,2],[169,1],[169,2],[170,0],[170,2],[175,0],[175,3],[177,0],[177,1],[178,0],[178,3],[180,0],[180,3],[181,0],[181,1],[183,0],[183,3],[184,0],[184,1],[189,0],[189,1],[191,0],[191,2],[194,0],[194,1],[198,0],[198,3],[201,0],[201,1],[204,0],[204,1],[206,0],[206,2],[208,1],[208,1],[210,0],[210,3],[213,0],[213,1],[215,0],[215,3],[217,0],[217,3],[339,1],[339,1],[339,1],[221,0],[221,1],[222,0],[222,1],[227,0],[227,3],[228,0],[228,1],[230,1],[230,2],[233,1],[233,2],[240,0],[240,2],[244,0],[244,2],[248,1],[248,1],[248,1],[248,1],[248,1],[248,1],[249,0],[249,1],[252,0],[252,2],[254,1],[254,1],[256,0],[256,2],[258,0],[258,2],[260,0],[260,2],[262,1],[262,1],[275,1],[275,1],[275,1],[275,1],[275,1],[278,0],[278,1],[281,0],[281,1],[282,1],[282,1],[284,0],[284,1],[286,0],[286,1],[287,0],[287,1]],performAction:a(function(N,$,z,Ie,Je,w,Hn){var A=w.length-1;switch(Je){case 1:if(w[A-1]=w[A-1]||{},tt.base&&(w[A-1].base=tt.base),tt.base="",w[A-1].prefixes=tt.prefixes,tt.prefixes=null,tt.pathOnly){if(w[A-1].type==="path"||"termType"in w[A-1])return w[A-1];throw new Error("Received full SPARQL query in path only mode")}else if(w[A-1].type==="path"||"termType"in w[A-1])throw new Error("Received only path in full SPARQL mode");if(w[A-1].type==="update"){let Bt={};for(let tr of w[A-1].updates)if(tr.updateType==="insert"){let Tt={};for(let Ft of tr.insert)if(Ft.type==="bgp"||Ft.type==="graph")for(let fi of Ft.triples)fi.subject.termType==="BlankNode"&&(Tt[fi.subject.value]=!0),fi.predicate.termType==="BlankNode"&&(Tt[fi.predicate.value]=!0),fi.object.termType==="BlankNode"&&(Tt[fi.object.value]=!0);for(let Ft of Object.keys(Tt)){if(Bt[Ft])throw new Error("Detected reuse blank node across different INSERT DATA clauses");Bt[Ft]=!0}}}return w[A-1];case 2:this.$={...w[A-1],...w[A],type:"query"};break;case 4:tt.base=rp(w[A]);break;case 5:tt.prefixes||(tt.prefixes={}),w[A-1]=w[A-1].substr(0,w[A-1].length-1),w[A]=rp(w[A]),tt.prefixes[w[A-1]]=w[A];break;case 6:this.$={...w[A-3],...Qc(w[A-2]),...w[A-1],...w[A]};break;case 7:if(!tt.skipValidation&&(nE(w[A-3].variables.map(tr=>rE(tr.expression))).some(tr=>tr.aggregation==="count"&&!(tr.expression instanceof dg))||w[A].group)){for(let tr of w[A-3].variables)if(tr.termType==="Variable"){if(!w[A].group||!w[A].group.map(Tt=>Su(Tt)).includes(Su(tr)))throw Error("Projection of ungrouped variable (?"+Su(tr)+")")}else if(rE(tr.expression).length===0){let Tt=K7(tr.expression);for(let Ft of Tt)if(!w[A].group||!w[A].group.map||!w[A].group.map(fi=>Su(fi)).includes(Su(Ft)))throw Error("Use of ungrouped variable in projection of operation (?"+Su(Ft)+")")}}let Xs=w[A-1].where.filter(Bt=>Bt.type==="query");if(Xs.length>0){let Bt=w[A-3].variables.filter(Tt=>Tt.variable&&Tt.variable.value).map(Tt=>Tt.variable.value),tr=nE(Xs.map(Tt=>Tt.variables)).map(Tt=>Tt.value||Tt.variable.value);for(let Tt of Bt)if(tr.indexOf(Tt)>=0)throw Error("Target id of 'AS' (?"+Tt+") already used in subquery")}this.$=gr(w[A-3],Qc(w[A-2]),w[A-1],w[A]);break;case 8:this.$=gr({queryType:"CONSTRUCT",template:w[A-3]},Qc(w[A-2]),w[A-1],w[A]);break;case 9:this.$=gr({queryType:"CONSTRUCT",template:w[A-2]=w[A-2]?w[A-2].triples:[]},Qc(w[A-5]),{where:[{type:"bgp",triples:Yc([],w[A-2])}]},w[A]);break;case 10:this.$=gr({queryType:"DESCRIBE",variables:w[A-3]==="*"?[new dg]:w[A-3]},Qc(w[A-2]),w[A-1],w[A]);break;case 11:this.$=gr({queryType:"ASK"},Qc(w[A-2]),w[A-1],w[A]);break;case 12:this.$=gr(w[A-1],{variables:[new dg]});break;case 13:let ap=w[A].map(Bt=>Bt.value||Bt.variable.value),wu=Y7(ap);if(wu.length>0)throw Error("Two or more of the resulting columns have the same name (?"+wu[0]+")");this.$=gr(w[A-1],{variables:w[A]});break;case 14:this.$=gr({queryType:"SELECT"},w[A]&&(w[A-1]=Wn(w[A]),w[A]={},w[A][w[A-1]]=!0,w[A]));break;case 16:case 27:this.$=yu(w[A-3],{variable:w[A-1]});break;case 17:case 18:this.$=gr(w[A-3],w[A-2],w[A-1],w[A],{type:"query"});break;case 19:case 58:this.$={iri:w[A],named:!!w[A-1]};break;case 20:this.$={where:w[A].patterns};break;case 21:this.$=gr(w[A-1],w[A]);break;case 22:this.$=gr(w[A-2],w[A-1],w[A]);break;case 23:this.$={group:w[A]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=yu(w[A]);break;case 26:this.$=yu(w[A-1]);break;case 29:this.$={having:w[A]};break;case 30:this.$={order:w[A]};break;case 32:this.$=yu(w[A],{descending:!0});break;case 35:this.$={limit:bu(w[A])};break;case 36:this.$={offset:bu(w[A])};break;case 37:this.$={limit:bu(w[A-2]),offset:bu(w[A])};break;case 38:this.$={limit:bu(w[A]),offset:bu(w[A-2])};break;case 39:case 43:this.$={type:"values",values:w[A]};break;case 40:case 84:this.$=w[A-1].map(Bt=>({[w[A-3]]:Bt}));break;case 41:case 85:this.$=w[A-1].map(()=>({}));break;case 42:case 86:var Qs=w[A-4].length;w[A-4]=w[A-4].map(Qw),this.$=w[A-1].map(function(Bt){if(Bt.length!==Qs)throw Error("Inconsistent VALUES length");for(var tr={},Tt=0;Tt<Qs;Tt++)tr["?"+w[A-4][Tt].value]=Bt[Tt];return tr});break;case 44:case 65:case 100:case 126:case 175:this.$=w[A-1];break;case 45:this.$={type:"update",updates:Mo(w[A-2],w[A-1])};break;case 46:this.$=gr({type:"load",silent:!!w[A-2],source:w[A-1]},w[A]&&{destination:w[A]});break;case 47:this.$={type:Wn(w[A-2]),silent:!!w[A-1],graph:w[A]};break;case 48:this.$={type:Wn(w[A-4]),silent:!!w[A-3],source:w[A-2],destination:w[A]};break;case 49:this.$={type:"create",silent:!!w[A-2],graph:{type:"graph",name:w[A]}};break;case 50:this.$={updateType:"insert",insert:IP(w[A])};break;case 51:this.$={updateType:"delete",delete:oE(IP(w[A]))};break;case 52:this.$={updateType:"deletewhere",delete:oE(w[A])};break;case 53:this.$={updateType:"insertdelete",...w[A-4],...w[A-3],...Qc(w[A-2],"using"),where:w[A].patterns};break;case 54:case 57:case 62:case 167:case 191:case 236:this.$=w[A];break;case 55:this.$={delete:oE(w[A-1]),insert:w[A]||[]};break;case 56:this.$={delete:[],insert:w[A]};break;case 59:this.$={graph:w[A]};break;case 60:this.$={type:"graph",default:!0};break;case 61:case 63:this.$={type:"graph",name:w[A]};break;case 64:this.$={[Wn(w[A])]:!0};break;case 66:this.$=w[A-1]?Ks(w[A],[w[A-1]]):Ks(w[A]);break;case 67:var sp=gr(w[A-3]||{triples:[]},{type:"graph",name:w[A-5]});this.$=w[A]?[sp,w[A]]:[sp];break;case 68:case 73:this.$={type:"bgp",triples:Ks(w[A-2],[w[A-1]])};break;case 69:this.$={type:"group",patterns:[w[A-1]]};break;case 70:for(let Bt of w[A-1].filter(tr=>tr.type==="bind")){let tr=w[A-1].indexOf(Bt),Tt=new Set;for(let Ft of w[A-1].slice(0,tr))(Ft.type==="group"||Ft.type==="bgp")&&TP(Ft).forEach(fi=>Tt.add(fi));if(Tt.has(Bt.variable.value))throw Error("Variable used to bind is already bound (?"+Bt.variable.value+")")}this.$={type:"group",patterns:w[A-1]};break;case 71:this.$=w[A-1]?Ks([w[A-1]],w[A]):Ks(w[A]);break;case 72:this.$=w[A]?[w[A-2],w[A]]:w[A-2];break;case 75:this.$=gr(w[A],{type:"optional"});break;case 76:this.$=gr(w[A],{type:"minus"});break;case 77:this.$=gr(w[A],{type:"graph",name:w[A-1]});break;case 78:this.$=gr(w[A],{type:"service",name:w[A-1],silent:!!w[A-2]});break;case 79:this.$={type:"filter",expression:w[A]};break;case 80:this.$={type:"bind",variable:w[A-1],expression:w[A-3]};break;case 89:this.$=ip(w[A]);break;case 90:this.$=void 0;break;case 91:this.$=w[A-1].length?{type:"union",patterns:Ks(w[A-1].map(Jw),[Jw(w[A])])}:w[A];break;case 95:this.$={...w[A],function:w[A-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:Mo(w[A-2],w[A-1]),distinct:!!w[A-3]};break;case 98:case 115:case 128:case 247:case 249:case 251:case 253:case 255:case 263:case 267:case 297:case 299:case 303:case 307:case 328:case 341:case 349:case 355:case 361:case 367:case 369:case 373:case 375:case 379:case 381:case 385:case 391:case 395:case 401:case 405:case 409:case 411:case 420:case 428:case 430:case 440:case 444:case 446:case 448:this.$=[];break;case 99:this.$=Mo(w[A-2],w[A-1]);break;case 101:this.$=Ks(w[A-2],[w[A-1]]);break;case 102:case 112:this.$=sE(w[A].map(Bt=>gr(jo(w[A-1]),Bt)));break;case 103:this.$=sE(Yc(w[A].map(Bt=>gr(jo(w[A-1].entity),Bt)),w[A-1].triples));break;case 105:this.$=Ks([w[A-1]],w[A]);break;case 106:this.$=Ks(w[A]);break;case 107:this.$=tE(w[A-1],w[A]);break;case 109:case 237:this.$=tt.factory.namedNode(j7);break;case 110:case 118:this.$=Mo(w[A-1],w[A]);break;case 111:this.$=w[A]?{annotation:w[A],object:w[A-1]}:w[A-1];break;case 113:this.$=w[A]?sE(Yc(w[A].map(Bt=>gr(jo(w[A-1].entity),Bt)),w[A-1].triples)):w[A-1].triples;break;case 114:this.$=tE(...w[A-1],w[A]);break;case 116:this.$=tE(...w[A]);break;case 117:case 159:case 163:this.$=[w[A-1],w[A]];break;case 119:this.$=w[A]?{object:w[A-1],annotation:w[A]}:w[A-1];break;case 120:this.$=w[A-1].length?_u("|",Mo(w[A-1],w[A])):w[A];break;case 121:this.$=w[A-1].length?_u("/",Mo(w[A-1],w[A])):w[A];break;case 122:this.$=w[A]?_u(w[A],[w[A-1]]):w[A-1];break;case 123:this.$=w[A-1]?_u(w[A-1],[w[A]]):w[A];break;case 125:case 131:this.$=_u(w[A-1],[w[A]]);break;case 129:this.$=_u("|",Mo(w[A-2],w[A-1]));break;case 132:case 134:this.$=H7(w[A-1]);break;case 133:case 135:this.$=z7(w[A-1]);break;case 140:this.$={entity:w[A],triples:[]};break;case 145:this.$=Qw(w[A]);break;case 149:this.$=tt.factory.namedNode(gP);break;case 151:case 153:case 158:case 162:this.$=Xw(w[A-1],w[A]);break;case 152:this.$=["||",w[A]];break;case 154:this.$=["&&",w[A]];break;case 156:this.$=un(w[A-1],[w[A-2],w[A]]);break;case 157:this.$=un(w[A-2]?"notin":"in",[w[A-3],w[A]]);break;case 160:this.$=["+",Xw(w[A-1],w[A])];break;case 161:var mg=Ys(w[A-1].value.replace("-",""),w[A-1].datatype);this.$=["-",Xw(mg,w[A])];break;case 164:this.$=un("UPLUS",[w[A]]);break;case 165:this.$=un(w[A-1],[w[A]]);break;case 166:this.$=un("UMINUS",[w[A]]);break;case 177:this.$=un(Wn(w[A-1]));break;case 178:this.$=un(Wn(w[A-3]),[w[A-1]]);break;case 179:this.$=ip(un(Wn(w[A-3]),[w[A-1]]));break;case 180:this.$=un(Wn(w[A-5]),[w[A-3],w[A-1]]);break;case 181:this.$=un(Wn(w[A-7]),[w[A-5],w[A-3],w[A-1]]);break;case 182:this.$=ip(un(Wn(w[A-7]),[w[A-5],w[A-3],w[A-1]]));break;case 183:this.$=un(Wn(w[A-1]),w[A]);break;case 184:this.$=un("bound",[Qw(w[A-1])]);break;case 185:this.$=un(w[A-1],[]);break;case 186:this.$=un(w[A-3],[w[A-1]]);break;case 187:this.$=un(w[A-2]?"notexists":"exists",[Jw(w[A])]);break;case 188:case 189:this.$=yu(w[A-1],{type:"aggregate",aggregation:Wn(w[A-4]),distinct:!!w[A-2]});break;case 190:this.$=yu(w[A-2],{type:"aggregate",aggregation:Wn(w[A-5]),distinct:!!w[A-3],separator:typeof w[A-1]=="string"?w[A-1]:" "});break;case 192:this.$=Ys(w[A]);break;case 193:this.$=V7(w[A-1],Wn(w[A].substr(1)));break;case 194:this.$=Ys(w[A-2],w[A]);break;case 195:case 204:this.$=Ys(w[A],yP);break;case 196:case 205:this.$=Ys(w[A],_P);break;case 197:case 206:this.$=Ys(Wn(w[A]),bP);break;case 200:this.$=Ys(w[A].toLowerCase(),B7);break;case 201:this.$=Ys(w[A].substr(1),yP);break;case 202:this.$=Ys(w[A].substr(1),_P);break;case 203:this.$=Ys(w[A].substr(1).toLowerCase(),bP);break;case 207:case 208:this.$=vP(w[A],1);break;case 209:case 210:this.$=vP(w[A],3);break;case 211:this.$=tt.factory.namedNode(rp(w[A]));break;case 213:var gg=w[A].indexOf(":"),op=w[A].substr(0,gg),yg=tt.prefixes[op];if(!yg)throw new Error("Unknown prefix: "+op);var ar=rp(yg+w[A].substr(gg+1));this.$=tt.factory.namedNode(ar);break;case 214:if(w[A]=w[A].substr(0,w[A].length-1),!(w[A]in tt.prefixes))throw new Error("Unknown prefix: "+w[A]);var ar=rp(tt.prefixes[w[A]]);this.$=tt.factory.namedNode(ar);break;case 215:this.$=np(w[A].replace(/^(_:)/,""));break;case 216:this.$=np();break;case 217:case 218:case 232:this.$=ip(Zw(w[A-3],w[A-2],w[A-1]));break;case 230:case 231:this.$=ip(w[A-1]);break;case 248:case 250:case 252:case 254:case 256:case 260:case 264:case 268:case 270:case 292:case 294:case 296:case 298:case 300:case 302:case 304:case 306:case 329:case 342:case 356:case 368:case 370:case 372:case 374:case 392:case 402:case 425:case 427:case 429:case 431:case 441:case 445:case 447:case 449:w[A-1].push(w[A]);break;case 259:case 269:case 291:case 293:case 295:case 301:case 305:case 371:case 424:case 426:this.$=[w[A]];break;case 308:w[A-3].push(w[A-2]);break;case 350:case 362:case 376:case 380:case 382:case 386:case 396:case 406:case 410:case 412:case 421:w[A-2].push(w[A-1]);break}},"anonymous"),table:[r(e,t,{3:1,4:2,10:3}),{1:[3]},r(n,[2,307],{5:4,7:5,321:6,214:7,8:8,96:9,215:10,17:11,21:12,97:16,38:17,6:[2,238],13:i,16:i,45:i,197:i,224:i,229:i,308:i,24:[1,13],32:[1,14],36:[1,15],41:s}),r([6,13,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],[2,3],{322:19,11:20,14:21,12:[1,22],15:[1,23]}),{6:[1,24]},{6:[2,240]},{6:[2,241]},{6:[2,242]},{6:[2,243],9:25,84:26,85:o},{6:[2,239]},r(c,[2,411],{216:28,217:29}),r(l,[2,249],{18:30}),r(l,[2,251],{22:31}),r(u,[2,255],{25:32,27:33,29:[1,34]}),{13:f,16:d,33:35,39:[1,37],44:39,55:40,87:p,139:38,307:43,308:h,323:36},r(l,[2,267],{37:46}),r(m,[2,326],{98:47,103:49,106:50,117:55,130:61,100:[1,48],110:[1,51],113:[1,52],115:[1,53],116:[1,54],131:[1,62],329:[1,56],330:[1,57],331:[1,58],332:[1,59],333:[1,60]}),{39:[1,63],40:64,43:65,44:66,45:y,87:p},r(_,[2,273],{42:68,324:69,325:[1,70],326:[1,71]}),r(e,[2,248]),r(e,[2,245]),r(e,[2,246]),{13:[1,72]},{16:[1,73]},{1:[2,1]},{6:[2,2]},{6:[2,244]},{45:[1,77],85:[1,78],86:74,87:[1,75],89:[1,76]},r([6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],[2,120],{337:[1,79]}),r(b,[2,418],{218:80,222:81,229:[1,82]}),{19:83,28:T,29:I,52:84,53:E,56:85},{19:88,28:T,29:I,52:89,53:E,56:85},r(l,[2,253],{26:90}),{28:[1,91],52:92,53:E},r(S,[2,385],{181:93,182:94,183:95,31:[2,383]}),r(R,[2,263],{34:96}),r(R,[2,261],{44:39,55:40,307:43,139:97,13:f,16:d,87:p,308:h}),r(R,[2,262]),r(D,[2,259]),r(P,[2,143]),r(P,[2,144]),r([6,13,16,28,29,31,39,45,47,48,53,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346,347,348,349,350,351],[2,145]),r(M,[2,211]),r(M,[2,212]),r(M,[2,213]),r(M,[2,214]),{19:98,28:T,29:I,52:99,53:E,56:85},{6:[2,309],99:100,193:[1,101]},r(O,[2,311],{101:102,328:[1,103]}),r(L,[2,317],{104:104,328:[1,105]}),r(te,[2,322],{107:106,328:[1,107]}),{111:108,112:[2,324],328:[1,109]},{29:re,114:110},{29:re,114:112},{29:re,114:113},{118:114,123:[1,115],125:116,126:V},r(K,[2,315]),r(K,[2,316]),r(Se,[2,319]),r(Se,[2,320]),r(Se,[2,321]),r(m,[2,327]),{13:f,16:d,55:118,307:43,308:h},r(l,[2,12]),r(l,[2,13],{44:66,43:119,45:y,87:p}),r(ce,[2,269]),r(ce,[2,15]),{13:f,16:d,44:136,45:q,46:120,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(_,[2,14]),r(_,[2,274]),r(_,[2,271]),r(_,[2,272]),r(e,[2,4]),{13:[1,177]},r(be,[2,39]),{29:[1,178]},{29:[1,179]},{87:[1,181],91:180},{45:[1,187],87:[1,185],89:[1,186],93:182,165:183,166:184},r(c,[2,410]),r([6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337],[2,121],{338:[1,188]}),{13:f,16:d,45:[1,193],55:194,197:Ut,219:189,220:190,223:191,224:[1,192],307:43,308:h},r(b,[2,419]),r(zt,Ze,{20:196,59:197,69:198,70:le}),r(l,[2,250]),{29:ue,57:200},r(O,[2,279],{54:202,327:[1,203]}),{29:[2,282]},r(pe,ye,{23:204,58:205,62:206,63:Qe}),r(l,[2,252]),{19:208,28:T,29:I,52:209,53:E,56:85},{29:[1,210]},r(u,[2,256]),{31:[1,211]},{31:[2,384]},{13:f,16:d,44:215,45:Et,55:220,82:W,87:p,89:vt,145:212,172:221,185:213,187:214,231:cn,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(UO,[2,265],{56:85,35:227,52:228,19:229,28:T,29:I,53:E}),r(D,[2,260]),r(pe,ye,{58:205,62:206,23:230,63:Qe}),r(l,[2,268]),{6:[2,45]},r(e,t,{10:3,4:231}),{13:f,16:d,55:232,307:43,308:h},r(O,[2,312]),{105:233,112:BO,122:234,132:[1,237],134:235,327:[1,238],334:[1,239]},r(L,[2,318]),r(O,VO,{108:240,133:242,112:GO,132:qO}),r(te,[2,323]),{112:[1,244]},{112:[2,325]},r(ln,[2,50]),r(S,Jm,{135:245,136:246,143:247,144:248,31:WO,112:WO}),r(ln,[2,51]),r(ln,[2,52]),r(Ua,[2,328],{119:249}),{29:re,114:250},r(Ua,[2,56]),{29:re,114:251},r(m,[2,59]),r(ce,[2,270]),{47:[1,252]},r(HO,[2,150]),r(Zm,[2,428],{240:253}),r(du,[2,430],{244:254}),r(du,[2,155],{248:255,249:256,250:[2,438],290:[1,257],341:[1,258],342:[1,259],343:[1,260],344:[1,261],345:[1,262],346:[1,263]}),r(pu,[2,440],{252:264}),r(Hr,[2,448],{260:265}),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,255:154,257:155,264:266,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,255:154,257:155,264:267,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,255:154,257:155,264:268,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Hr,[2,167]),r(Hr,[2,168]),r(Hr,[2,169]),r(Hr,[2,170],{176:269,45:zO,89:KO}),r(Hr,[2,171]),r(Hr,[2,172]),r(Hr,[2,173]),r(Hr,[2,174]),{13:f,16:d,44:136,45:q,46:272,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Tr,[2,176]),{89:[1,273]},{45:[1,274]},{45:[1,275]},{45:[1,276]},{45:[1,277]},{45:[1,278]},{45:YO,89:QO,179:279},{45:[1,282]},{45:[1,284],89:[1,283]},{279:[1,285]},r(qn,[2,192],{292:[1,286],293:[1,287]}),r(qn,[2,195]),r(qn,[2,196]),r(qn,[2,197]),r(qn,[2,198]),r(qn,[2,199]),r(qn,[2,200]),{13:f,16:d,44:39,55:40,82:W,87:p,139:289,172:291,255:154,257:155,266:290,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,320:288},{45:[1,292]},{45:[1,293]},{45:[1,294]},r(Jd,[2,452]),r(Jd,[2,453]),r(Jd,[2,454]),r(Jd,[2,455]),r(Jd,[2,456]),{279:[2,458]},r(eg,[2,207]),r(eg,[2,208]),r(eg,[2,209]),r(eg,[2,210]),r(qn,[2,201]),r(qn,[2,202]),r(qn,[2,203]),r(qn,[2,204]),r(qn,[2,205]),r(qn,[2,206]),r(e,[2,5]),r(tg,[2,297],{88:295}),r(rg,[2,299],{90:296}),{48:[1,297],87:[1,298]},r(ng,[2,301]),r(be,[2,43]),r(be,[2,82]),r(be,[2,83]),{29:[1,299]},{29:[1,300]},{87:[1,302],169:301},r(c,[2,412]),r(Vc,[2,123]),r(Vc,[2,416],{221:303,339:304,39:[1,306],263:[1,307],340:[1,305]}),r(zs,[2,124]),{13:f,16:d,45:[1,311],55:194,89:[1,310],197:Ut,223:312,225:308,226:309,229:XO,307:43,308:h},r(c,i,{215:10,214:314}),r(zs,[2,236]),r(zs,[2,237]),r(hu,[2,6]),r(Vw,[2,287],{60:315,72:316,73:[1,317]}),r(zt,[2,286]),{13:f,16:d,45:q,55:323,67:321,68:322,71:318,77:320,79:319,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,307:43,308:h,346:st,347:nt,348:C,349:x,350:F,351:U},r([6,31,63,70,73,81,83,85],[2,20]),r(S,JO,{38:17,49:324,147:325,17:326,21:327,148:328,154:329,155:330,29:Fo,31:Fo,85:Fo,112:Fo,159:Fo,160:Fo,161:Fo,163:Fo,164:Fo,41:s}),{13:f,16:d,55:331,307:43,308:h},r(O,[2,280]),r(hu,[2,7]),r(zt,Ze,{59:197,69:198,20:332,70:le}),r(pe,[2,284]),{64:[1,333]},r(pe,ye,{58:205,62:206,23:334,63:Qe}),r(l,[2,254]),r(S,Jm,{144:248,30:335,143:336,31:[2,257]}),r(l,[2,100]),{31:[2,387],184:337,335:[1,338]},{13:f,16:d,44:39,55:40,87:p,139:342,186:339,190:340,195:341,197:Gc,307:43,308:h},r(Zd,[2,389],{44:39,55:40,307:43,190:340,195:341,139:342,188:344,189:345,186:346,13:f,16:d,87:p,197:Gc,308:h}),r(Do,[2,227]),r(Do,[2,228]),r(Do,[2,229]),{13:f,16:d,44:215,45:Et,55:220,82:W,87:p,89:vt,172:221,185:351,187:350,200:348,230:347,231:cn,234:349,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},{13:f,16:d,44:39,55:40,87:p,139:342,186:352,190:340,195:341,197:Gc,307:43,308:h},r(Do,[2,146]),r(Do,[2,147]),r(Do,[2,148]),r(Do,[2,149]),{13:f,16:d,44:354,55:355,82:W,87:p,172:357,237:356,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:358,312:Gn,313:353},r(Gw,[2,215]),r(Gw,[2,216]),r(pe,ye,{58:205,62:206,23:359,63:Qe}),r(R,[2,264]),r(UO,[2,266]),r(hu,[2,11]),r(n,[2,308],{6:[2,310]}),r(ln,[2,313],{102:360,120:361,121:[1,362]}),r(ln,[2,47]),r(ln,[2,63]),r(ln,[2,64]),{13:f,16:d,55:363,307:43,308:h},r(ln,[2,336]),r(ln,[2,337]),r(ln,[2,338]),{109:[1,364]},r(ZO,[2,60]),{13:f,16:d,55:365,307:43,308:h},r(O,[2,335]),{13:f,16:d,55:366,307:43,308:h},{31:[1,367]},r(qc,[2,341],{137:368}),r(qc,[2,340]),{13:f,16:d,44:215,45:Et,55:220,82:W,87:p,89:vt,145:369,172:221,185:213,187:214,231:cn,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},{28:[1,370],127:371,128:[1,372]},r(Ua,[2,330],{124:373,125:374,126:V}),r(Ua,[2,57]),{44:375,87:p},r(HO,[2,151],{241:376,242:[1,377]}),r(Zm,[2,153],{245:378,246:[1,379]}),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,247:380,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{250:[1,381]},r(Ar,[2,432]),r(Ar,[2,433]),r(Ar,[2,434]),r(Ar,[2,435]),r(Ar,[2,436]),r(Ar,[2,437]),{250:[2,439]},r([47,48,193,242,246,250,272,290,341,342,343,344,345,346],[2,158],{253:382,254:383,255:384,257:385,263:[1,386],265:[1,387],297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be}),r(pu,[2,162],{261:388,262:389,39:qw,338:Ww}),r(Hr,[2,164]),r(Hr,[2,165]),r(Hr,[2,166]),r(Tr,[2,95]),r(Tr,[2,96]),r(Ar,[2,377],{177:392,325:[1,393]}),{48:[1,394]},r(Tr,[2,177]),{13:f,16:d,44:136,45:q,46:395,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:396,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:397,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:398,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:399,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Tr,[2,183]),r(Tr,[2,98]),r(Ar,[2,381],{180:400}),{87:[1,401]},r(Tr,[2,185]),{13:f,16:d,44:136,45:q,46:402,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{29:ue,57:403},r(qn,[2,193]),{13:f,16:d,55:404,307:43,308:h},{13:f,16:d,44:39,55:40,87:p,139:342,195:405,197:Gc,307:43,308:h},r(Ba,[2,233]),r(Ba,[2,234]),r(Ba,[2,235]),r(eP,[2,459],{281:406,325:[1,407]}),r(Ar,[2,463],{284:408,325:[1,409]}),r(Ar,[2,465],{286:410,325:[1,411]}),{13:f,16:d,31:[1,412],55:414,82:W,171:413,172:415,173:416,174:ig,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:sg},{31:[1,419],89:[1,420]},{29:[1,421]},r(ng,[2,302]),r(tg,[2,367],{167:422}),r(rg,[2,369],{168:423}),{48:[1,424],87:[1,425]},r(ng,[2,371]),r(Vc,[2,122]),r(Vc,[2,417]),r(Vc,[2,413]),r(Vc,[2,414]),r(Vc,[2,415]),r(zs,[2,125]),r(zs,[2,127]),r(zs,[2,128]),r(tP,[2,420],{227:426}),r(zs,[2,130]),{13:f,16:d,55:194,197:Ut,223:427,307:43,308:h},{48:[1,428]},r(Va,[2,289],{61:429,80:430,81:[1,431],83:[1,432]}),r(Vw,[2,288]),{64:[1,433]},r(zt,[2,29],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:434,13:f,16:d,45:q,268:ee,269:Z,270:H,271:ie,273:$e,274:k,276:oe,277:de,279:Ae,280:we,283:ve,285:Te,308:h,346:st,347:nt,348:C,349:x,350:F,351:U}),r(rP,[2,293]),r(Hw,[2,92]),r(Hw,[2,93]),r(Hw,[2,94]),{45:zO,89:KO,176:269},{31:[1,435]},{31:[1,436]},{19:437,28:T,29:I,56:85},{19:438,28:T,29:I,56:85},r(Wc,[2,355],{149:439}),r(Wc,[2,354]),{13:f,16:d,44:215,45:og,55:220,82:W,87:p,89:vt,156:440,172:221,185:441,203:442,231:ag,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(R,[2,19]),r(Va,[2,21]),{13:f,16:d,44:450,45:nP,55:323,65:445,66:446,67:447,68:448,87:p,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,307:43,308:h,346:st,347:nt,348:C,349:x,350:F,351:U},r(hu,[2,8]),{31:[1,451]},{31:[2,258]},{31:[2,101]},r(S,[2,386],{31:[2,388]}),r(Zd,[2,102]),r(Hc,[2,391],{191:452}),r(S,[2,395],{196:453,198:454}),r(S,[2,108]),r(S,[2,109]),r(Zd,[2,103]),r(Zd,[2,104]),r(Zd,[2,390]),{13:f,16:d,44:215,45:Et,48:[1,455],55:220,82:W,87:p,89:vt,172:221,185:351,187:350,200:456,231:cn,234:349,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(cg,[2,424]),r(iP,[2,136]),r(iP,[2,137]),r(zw,[2,140]),{232:[1,457]},{13:f,16:d,44:39,55:40,87:p,139:342,195:458,197:Gc,307:43,308:h},r(Ba,[2,219]),r(Ba,[2,220]),r(Ba,[2,221]),r(Ba,[2,222]),r(Ba,[2,223]),r(hu,[2,10]),r(ln,[2,46]),r(ln,[2,314]),{112:BO,122:459},r(ln,[2,62]),r(O,VO,{133:242,108:460,112:GO,132:qO}),r(ZO,[2,61]),r(ln,[2,49]),r([6,28,126,128,193],[2,65]),{31:[2,66],112:[1,462],138:461},r(qc,[2,351],{146:463,335:[1,464]}),{29:ue,57:465},r(Ua,[2,329]),r(O,[2,332],{129:466,327:[1,467]}),r(Ua,[2,55]),r(Ua,[2,331]),{48:[1,468]},r(Zm,[2,429]),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,239:469,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(du,[2,431]),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,243:470,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(du,[2,156]),{45:YO,89:QO,179:471},r(pu,[2,441]),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,251:472,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Hr,[2,444],{256:473}),r(Hr,[2,446],{258:474}),r(Ar,[2,442]),r(Ar,[2,443]),r(Hr,[2,449]),{13:f,16:d,44:136,45:q,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,255:154,257:155,259:475,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Ar,[2,450]),r(Ar,[2,451]),r(Ar,[2,379],{178:476}),r(Ar,[2,378]),r([6,13,16,29,31,39,45,47,48,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,338,341,342,343,344,345,346,347,348,349,350,351],[2,175]),{48:[1,477]},{48:[1,478]},{272:[1,479]},{272:[1,480]},{272:[1,481]},{13:f,16:d,44:136,45:q,46:482,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{48:[1,483]},{48:[1,484]},r(Tr,[2,187]),r(qn,[2,194]),{13:f,16:d,44:39,55:40,82:W,87:p,139:289,172:291,255:154,257:155,266:290,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,320:485},{13:f,16:d,39:[1,487],44:136,45:q,46:488,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,282:486,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(eP,[2,460]),{13:f,16:d,44:136,45:q,46:489,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Ar,[2,464]),{13:f,16:d,44:136,45:q,46:490,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Ar,[2,466]),r(be,[2,40]),r(tg,[2,298]),r(ep,[2,87]),r(ep,[2,88]),r(ep,[2,89]),r(ep,[2,90]),{13:f,16:d,55:492,82:W,172:493,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,311:494,312:Gn,315:491},r(be,[2,41]),r(rg,[2,300]),r(tp,[2,303],{92:495}),{13:f,16:d,31:[1,496],55:414,82:W,171:497,172:415,173:416,174:ig,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:sg},{31:[1,498],89:[1,499]},{29:[1,500]},r(ng,[2,372]),{13:f,16:d,48:[2,422],55:194,197:Ut,223:312,226:502,228:501,229:XO,307:43,308:h},r(zs,[2,131]),r(zs,[2,126]),r(Va,[2,22]),r(Va,[2,290]),{82:[1,503]},{82:[1,504]},{13:f,16:d,44:510,45:q,55:323,67:321,68:322,74:505,75:506,76:sP,77:320,78:oP,79:509,87:p,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,307:43,308:h,346:st,347:nt,348:C,349:x,350:F,351:U},r(rP,[2,294]),r(aP,[2,69]),r(aP,[2,70]),r(zt,Ze,{59:197,69:198,20:511,70:le}),r(pe,ye,{58:205,62:206,23:512,63:Qe}),{29:[2,375],31:[2,71],84:522,85:o,112:[1,518],150:513,151:514,158:515,159:[1,516],160:[1,517],161:[1,519],163:[1,520],164:[1,521],175:523},r(Wc,[2,363],{157:524,335:[1,525]}),r(c,i,{215:10,202:526,205:527,208:528,214:529,44:530,87:p}),r(lg,[2,399],{215:10,205:527,208:528,214:529,44:530,204:531,202:532,13:i,16:i,45:i,197:i,224:i,229:i,308:i,87:p}),{13:f,16:d,44:215,45:og,55:220,82:W,87:p,89:vt,172:221,185:351,203:536,212:534,231:ag,233:533,234:535,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(c,i,{215:10,205:527,208:528,214:529,44:530,202:537,87:p}),r(pe,[2,23],{307:43,267:139,275:146,278:149,55:323,67:447,68:448,44:450,66:538,13:f,16:d,45:nP,87:p,268:ee,269:Z,270:H,271:ie,273:$e,274:k,276:oe,277:de,279:Ae,280:we,283:ve,285:Te,308:h,346:st,347:nt,348:C,349:x,350:F,351:U}),r(zc,[2,291]),r(zc,[2,24]),r(zc,[2,25]),{13:f,16:d,44:136,45:q,46:539,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(zc,[2,28]),r(pe,ye,{58:205,62:206,23:540,63:Qe}),r([31,112,232,318,335],[2,105],{192:541,193:[1,542]}),r(Hc,[2,107]),{13:f,16:d,44:215,45:Et,55:220,82:W,87:p,89:vt,172:221,185:351,187:350,199:543,200:544,231:cn,234:349,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(cP,[2,132]),r(cg,[2,425]),r(cP,[2,133]),{13:f,16:d,44:354,55:355,82:W,87:p,172:357,237:356,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:358,312:Gn,313:545},r(ln,[2,54]),r(ln,[2,48]),r(qc,[2,342]),{13:f,16:d,44:39,55:40,87:p,139:546,307:43,308:h},r(qc,[2,68]),r(S,[2,350],{31:lP,112:lP}),r(ln,[2,53]),{13:f,16:d,55:547,307:43,308:h},r(O,[2,333]),r(ce,[2,16]),r(Zm,[2,152]),r(du,[2,154]),r(du,[2,157]),r(pu,[2,159]),r(pu,[2,160],{262:389,261:548,39:qw,338:Ww}),r(pu,[2,161],{262:389,261:549,39:qw,338:Ww}),r(Hr,[2,163]),{13:f,16:d,44:136,45:q,46:550,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Tr,[2,178]),r(Tr,[2,179]),{13:f,16:d,44:136,45:q,46:551,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:552,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:553,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{48:[1,554],272:[1,555]},r(Tr,[2,184]),r(Tr,[2,186]),{314:[1,556]},{48:[1,557]},{48:[2,461]},{48:[2,462]},{48:[1,558]},{48:[2,467],193:[1,561],287:559,288:560},{13:f,16:d,55:194,197:Ut,223:562,307:43,308:h},r(Kw,[2,224]),r(Kw,[2,225]),r(Kw,[2,226]),{31:[1,563],45:uP,94:564},r(be,[2,84]),r(tg,[2,368]),r(be,[2,85]),r(rg,[2,370]),r(tp,[2,373],{170:566}),{48:[1,567]},{48:[2,423],337:[1,568]},r(Va,[2,35],{83:[1,569]}),r(Va,[2,36],{81:[1,570]}),r(Vw,[2,30],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:509,44:510,75:571,13:f,16:d,45:q,76:sP,78:oP,87:p,268:ee,269:Z,270:H,271:ie,273:$e,274:k,276:oe,277:de,279:Ae,280:we,283:ve,285:Te,308:h,346:st,347:nt,348:C,349:x,350:F,351:U}),r(mu,[2,295]),{45:q,77:572},{45:q,77:573},r(mu,[2,33]),r(mu,[2,34]),{31:[2,275],50:574,84:575,85:o},{31:[2,277],51:576,84:577,85:o},r(Wc,[2,356]),r(fP,[2,357],{152:578,335:[1,579]}),r(Lo,[2,74]),{29:ue,57:580},{29:ue,57:581},{13:f,16:d,44:39,55:40,87:p,139:582,307:43,308:h},r(dP,[2,365],{162:583,328:[1,584]}),{13:f,16:d,45:q,55:323,67:321,68:322,77:320,79:585,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,307:43,308:h,346:st,347:nt,348:C,349:x,350:F,351:U},{45:[1,586]},r(Lo,[2,81]),{29:ue,57:587},r(Wc,[2,73]),r(S,[2,362],{29:No,31:No,85:No,112:No,159:No,160:No,161:No,163:No,164:No}),r(lg,[2,112]),r(gu,[2,401],{206:588}),r(S,[2,405],{209:589,210:590}),r(S,[2,403]),r(S,[2,404]),r(lg,[2,113]),r(lg,[2,400]),{13:f,16:d,44:215,45:og,48:[1,591],55:220,82:W,87:p,89:vt,172:221,185:351,203:536,212:592,231:ag,234:535,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(cg,[2,426]),r(zw,[2,138]),r(zw,[2,139]),{232:[1,593]},r(zc,[2,292]),{47:[1,595],48:[1,594]},r(hu,[2,9]),r(Hc,[2,392]),r(Hc,[2,393],{44:39,55:40,307:43,195:341,139:342,194:596,190:597,13:f,16:d,87:p,197:Gc,308:h}),r(Hc,[2,110],{272:[1,598]}),r(ug,[2,397],{201:599,316:600,317:[1,601]}),{314:[1,602]},{29:[1,603]},r(Ua,[2,58]),r(Hr,[2,445]),r(Hr,[2,447]),{48:[1,604],272:[1,605]},{48:[1,606]},{272:[1,607]},{272:[1,608]},r(Tr,[2,99]),r(Ar,[2,382]),r([13,16,39,47,48,87,193,197,242,246,250,263,265,272,290,297,298,299,300,301,302,308,314,338,341,342,343,344,345,346],[2,232]),r(Tr,[2,188]),r(Tr,[2,189]),{48:[1,609]},{48:[2,468]},{289:[1,610]},{13:f,16:d,55:492,82:W,172:493,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,311:494,312:Gn,315:611},r(be,[2,42]),r(tp,[2,304]),{13:f,16:d,55:414,82:W,95:612,171:613,172:415,173:416,174:ig,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:sg},{31:[1,614],45:uP,94:615},r(zs,[2,129]),r(tP,[2,421]),{82:[1,616]},{82:[1,617]},r(mu,[2,296]),r(mu,[2,31]),r(mu,[2,32]),{31:[2,17]},{31:[2,276]},{31:[2,18]},{31:[2,278]},r(S,JO,{155:330,153:618,154:619,29:ko,31:ko,85:ko,112:ko,159:ko,160:ko,161:ko,163:ko,164:ko}),r(fP,[2,358]),r(Lo,[2,75]),r(Lo,[2,76]),{29:ue,57:620},{13:f,16:d,44:39,55:40,87:p,139:621,307:43,308:h},r(dP,[2,366]),r(Lo,[2,79]),{13:f,16:d,44:136,45:q,46:622,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Lo,[2,91],{336:[1,623]}),r([29,31,85,112,159,160,161,163,164,232,318,335],[2,114],{207:624,193:[1,625]}),r(gu,[2,117]),{13:f,16:d,44:215,45:og,55:220,82:W,87:p,89:vt,172:221,185:351,203:536,211:626,212:627,231:ag,234:535,236:216,237:222,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,309:ui,310:Fi,311:217,312:Gn},r(Do,[2,134]),r(cg,[2,427]),r(Do,[2,135]),r(zc,[2,26]),{44:628,87:p},r(Hc,[2,106]),r(Hc,[2,394]),r(S,[2,396]),r(ug,[2,111]),r(ug,[2,398]),{13:f,16:d,44:39,55:40,87:p,139:342,186:629,190:340,195:341,197:Gc,307:43,308:h},r(Gw,[2,217]),r(S,Jm,{144:248,140:630,143:631,31:[2,343]}),r(Tr,[2,97]),r(Ar,[2,380]),r(Tr,[2,180]),{13:f,16:d,44:136,45:q,46:632,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},{13:f,16:d,44:136,45:q,46:633,55:133,67:132,68:134,77:131,82:W,87:p,172:135,224:ne,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:xe,264:130,265:X,266:137,267:139,268:ee,269:Z,270:H,271:ie,273:$e,274:k,275:146,276:oe,277:de,278:149,279:Ae,280:we,283:ve,285:Te,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:_t,346:st,347:nt,348:C,349:x,350:F,351:U},r(Tr,[2,190]),{290:[1,634]},{314:[1,635]},{13:f,16:d,48:[1,636],55:414,82:W,171:637,172:415,173:416,174:ig,255:154,257:155,291:150,294:ge,295:G,296:ae,297:he,298:Ee,299:Oe,300:Ce,301:Ue,302:Be,303:Ve,304:Ge,305:Pe,306:qe,307:43,308:h,312:sg},r(pP,[2,305]),r(be,[2,86]),r(tp,[2,374]),r(Va,[2,37]),r(Va,[2,38]),r(Wc,[2,72]),r(Wc,[2,360]),r(Lo,[2,77]),{29:ue,57:638},{47:[1,639]},{29:[2,376]},r(gu,[2,402]),r(gu,[2,115],{215:10,208:528,214:529,44:530,205:640,13:i,16:i,45:i,197:i,224:i,229:i,308:i,87:p}),r(gu,[2,118],{272:[1,641]}),r(fg,[2,407],{213:642,319:643,317:[1,644]}),{48:[1,645]},{318:[1,646]},{31:[1,647]},{31:[2,344]},{48:[1,648]},{48:[1,649]},{291:650,303:Ve,304:Ge,305:Pe,306:qe},r(ep,[2,218]),r(tp,[2,44]),r(pP,[2,306]),r(Lo,[2,78]),{44:651,87:p},r(gu,[2,116]),r(S,[2,406]),r(fg,[2,119]),r(fg,[2,408]),r(c,i,{215:10,205:527,208:528,214:529,44:530,202:652,87:p}),r(zc,[2,27]),r(ug,[2,230]),r(hP,[2,345],{141:653,335:[1,654]}),r(Tr,[2,181]),r(Tr,[2,182]),{48:[2,191]},{48:[1,655]},{318:[1,656]},r(S,Jm,{144:248,142:657,143:658,31:mP,112:mP}),r(hP,[2,346]),r(Lo,[2,80]),r(fg,[2,231]),r(qc,[2,67]),r(qc,[2,348])],defaultActions:{5:[2,240],6:[2,241],7:[2,242],9:[2,239],24:[2,1],25:[2,2],26:[2,244],87:[2,282],94:[2,384],100:[2,45],109:[2,325],166:[2,458],263:[2,439],336:[2,258],337:[2,101],487:[2,461],488:[2,462],560:[2,468],574:[2,17],575:[2,276],576:[2,18],577:[2,278],623:[2,376],631:[2,344],650:[2,191]},parseError:a(function(N,$){if($.recoverable)this.trace(N);else{var z=new Error(N);throw z.hash=$,z}},"parseError"),parse:a(function(N){var $=this,z=[0],Ie=[],Je=[null],w=[],Hn=this.table,A="",Qs=0,sp=0,mg=0,gg=2,op=1,yg=w.slice.call(arguments,1),ar=Object.create(this.lexer),Xs={yy:{}};for(var ap in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ap)&&(Xs.yy[ap]=this.yy[ap]);ar.setInput(N,Xs.yy),Xs.yy.lexer=ar,Xs.yy.parser=this,typeof ar.yylloc>"u"&&(ar.yylloc={});var wu=ar.yylloc;w.push(wu);var Bt=ar.options&&ar.options.ranges;typeof Xs.yy.parseError=="function"?this.parseError=Xs.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(Js){z.length=z.length-2*Js,Je.length=Je.length-Js,w.length=w.length-Js}a(tr,"popStack");for(var Tt=a(function(){var Js;return Js=ar.lex()||op,typeof Js!="number"&&(Js=$.symbols_[Js]||Js),Js},"lex"),Ft,fi,Xc,Hi,o0e,aE,Eu={},_g,$o,RP,bg;;){if(Xc=z[z.length-1],this.defaultActions[Xc]?Hi=this.defaultActions[Xc]:((Ft===null||typeof Ft>"u")&&(Ft=Tt()),Hi=Hn[Xc]&&Hn[Xc][Ft]),typeof Hi>"u"||!Hi.length||!Hi[0]){var cE="";bg=[];for(_g in Hn[Xc])this.terminals_[_g]&&_g>gg&&bg.push("'"+this.terminals_[_g]+"'");ar.showPosition?cE="Parse error on line "+(Qs+1)+`:
36
36
  `+ar.showPosition()+`
37
37
  Expecting `+bg.join(", ")+", got '"+(this.terminals_[Ft]||Ft)+"'":cE="Parse error on line "+(Qs+1)+": Unexpected "+(Ft==op?"end of input":"'"+(this.terminals_[Ft]||Ft)+"'"),this.parseError(cE,{text:ar.match,token:this.terminals_[Ft]||Ft,line:ar.yylineno,loc:wu,expected:bg})}if(Hi[0]instanceof Array&&Hi.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xc+", token: "+Ft);switch(Hi[0]){case 1:z.push(Ft),Je.push(ar.yytext),w.push(ar.yylloc),z.push(Hi[1]),Ft=null,fi?(Ft=fi,fi=null):(sp=ar.yyleng,A=ar.yytext,Qs=ar.yylineno,wu=ar.yylloc,mg>0&&mg--);break;case 2:if($o=this.productions_[Hi[1]][1],Eu.$=Je[Je.length-$o],Eu._$={first_line:w[w.length-($o||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-($o||1)].first_column,last_column:w[w.length-1].last_column},Bt&&(Eu._$.range=[w[w.length-($o||1)].range[0],w[w.length-1].range[1]]),aE=this.performAction.apply(Eu,[A,sp,Qs,Xs.yy,Hi[1],Je,w].concat(yg)),typeof aE<"u")return aE;$o&&(z=z.slice(0,-1*$o*2),Je=Je.slice(0,-1*$o),w=w.slice(0,-1*$o)),z.push(this.productions_[Hi[1]][0]),Je.push(Eu.$),w.push(Eu._$),RP=Hn[z[z.length-2]][z[z.length-1]],z.push(RP);break;case 3:return!0}}return!0},"parse")},dg=Hv().Wildcard,pg="http://www.w3.org/1999/02/22-rdf-syntax-ns#",j7=pg+"type",$7=pg+"first",U7=pg+"rest",gP=pg+"nil",hg="http://www.w3.org/2001/XMLSchema#",yP=hg+"integer",_P=hg+"decimal",bP=hg+"double",B7=hg+"boolean",Kc="",SP="",wP="";function Wn(j){return j.toLowerCase()}a(Wn,"lowercase");function Mo(j,N){return j.push(N),j}a(Mo,"appendTo");function Yc(j,N){return j.push.apply(j,N),j}a(Yc,"appendAllTo");function gr(j){j||(j={});for(var N=1,$=arguments.length,z;N<$&&(z=arguments[N]||{});N++)for(var Ie in z)j[Ie]=z[Ie];return j}a(gr,"extend");function Ks(){for(var j=[],N=0,$=arguments.length;N<$;N++)j=j.concat.apply(j,arguments[N]);return j}a(Ks,"unionAll");function rp(j){if(j[0]==="<"&&(j=j.substring(1,j.length-1)),/^[a-z][a-z0-9.+-]*:/i.test(j))return j;if(!tt.base)throw new Error("Cannot resolve relative IRI "+j+" because no base IRI was set.");switch(Kc!==tt.base&&(Kc=tt.base,SP=Kc.replace(/[^\/:]*$/,""),wP=Kc.match(/^(?:[a-z]+:\/*)?[^\/]*/)[0]),j[0]){case void 0:return Kc;case"#":return Kc+j;case"?":return Kc.replace(/(?:\?.*)?$/,j);case"/":return wP+j;default:return SP+j}}a(rp,"resolveIRI");function Qw(j){if(j){var N=j[0];if(N==="?"||N==="$")return tt.factory.variable(j.substr(1))}return j}a(Qw,"toVar");function un(j,N){return{type:"operation",operator:j,args:N||[]}}a(un,"operation");function yu(j,N){var $={expression:j==="*"?new dg:j};if(N)for(var z in N)$[z]=N[z];return $}a(yu,"expression");function _u(j,N){return{type:"path",pathType:j,items:N}}a(_u,"path");function Xw(j,N){for(var $=0,z=N.length,Ie;$<z&&(Ie=N[$]);$++)j=un(Ie[0],[j,Ie[1]]);return j}a(Xw,"createOperationTree");function Qc(j,N){var $=[],z=[],Ie=j.length,Je,w={};if(!Ie)return null;for(var Hn=0;Hn<Ie&&(Je=j[Hn]);Hn++)(Je.named?z:$).push(Je.iri);return w[N||"from"]={default:$,named:z},w}a(Qc,"groupDatasets");function bu(j){return parseInt(j,10)}a(bu,"toInt");function Jw(j){return j.type==="group"&&j.patterns.length===1?j.patterns[0]:j}a(Jw,"degroupSingle");function Ys(j,N){return N&&N.termType!=="NamedNode"&&(N=tt.factory.namedNode(N)),tt.factory.literal(j,N)}a(Ys,"createTypedLiteral");function V7(j,N){return tt.factory.literal(j,N)}a(V7,"createLangLiteral");function Zw(j,N,$){if(!("termType"in N))throw new Error("Nested triples cannot contain paths");return tt.factory.quad(j,N,$)}a(Zw,"nestedTriple");function jo(j,N,$,z){var Ie={};return j!=null&&(Ie.subject=j),N!=null&&(Ie.predicate=N),$!=null&&(Ie.object=$),z!=null&&(Ie.annotations=z),Ie}a(jo,"triple");function np(j){return typeof j=="string"?j.startsWith("e_")?tt.factory.blankNode(j):tt.factory.blankNode("e_"+j):tt.factory.blankNode("g_"+EP++)}a(np,"blank");var EP=0;tt._resetBlanks=function(){EP=0};var G7=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\(.)/g,q7={"\\":"\\","'":"'",'"':'"',t:" ",b:"\b",n:`
38
- `,r:"\r",f:"\f"},W7=/[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/,eE=String.fromCharCode;function vP(j,N){j=j.substring(N,j.length-N);try{j=j.replace(G7,function($,z,Ie,Je){var w;if(z){if(w=parseInt(z,16),isNaN(w))throw new Error;return eE(w)}else if(Ie){if(w=parseInt(Ie,16),isNaN(w))throw new Error;return w<65535?eE(w):eE(55296+((w-=65536)>>10),56320+(w&1023))}else{var Hn=q7[Je];if(!Hn)throw new Error;return Hn}})}catch{return""}if(W7.exec(j))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+j);return j}a(vP,"unescapeString");function H7(j){var N=np(),$=N,z=[],Ie,Je=[];j.forEach(function(Qs){z.push(Qs.entity),Yc(Je,Qs.triples)});for(var w=0,Hn=0,A=z.length,Ie=Array(A*2);w<A;)Ie[Hn++]=jo($,tt.factory.namedNode($7),z[w]),Ie[Hn++]=jo($,tt.factory.namedNode(U7),$=++w<A?np():tt.factory.namedNode(gP));return{entity:N,triples:Yc(Ie,Je)}}a(H7,"createList");function z7(j){var N=np();return{entity:N,triples:j.map(function($){return gr(jo(N),$)})}}a(z7,"createAnonymousObject");function tE(j,N,$){var z=[],Ie=[];return N.forEach(function(Je){let w=null;Je.annotation&&(w=Je.annotation,Je=Je.object),z.push(jo(null,j,Je.entity,w)),Yc(Ie,Je.triples)}),Ks(z,$||[],Ie)}a(tE,"objectListToTriples");function n0e(j){for(var N=[],$,z=0,Ie;Ie=j[z];z++)Ie.type==="bgp"?Ie.triples.length&&($?Yc($.triples,Ie.triples):Mo(N,$=Ie)):(!Ie.patterns||Ie.patterns.length>0)&&(Mo(N,Ie),$=null);return N}a(n0e,"mergeAdjacentBGPs");function Su(j){return j.variable?j.variable.value:j.value||j.expression.value}a(Su,"getExpressionId");function rE(j){if(!j)return[];if(j.type==="aggregate")return[j];if(j.type==="operation"){let N=[];for(let $ of j.args)N.push(...rE($));return N}return[]}a(rE,"getAggregatesOfExpression");function K7(j){let N=new Set,$=a(function(z){z&&(z.termType==="Variable"?N.add(z):z.type==="operation"&&z.args.forEach($))},"visitExpression");return $(j),N}a(K7,"getVariablesFromExpression");function nE(j,N=1,$=[]){for(let z of j)N>0&&z instanceof Array?nE(z,N-1,$):$.push(z);return $}a(nE,"flatten");function iE(j){return j.termType==="Variable"}a(iE,"isVariable");function TP(j){if(j.triples){let N=[];for(let $ of j.triples)iE($.subject)&&N.push($.subject.value),iE($.predicate)&&N.push($.predicate.value),iE($.object)&&N.push($.object.value);return N}else if(j.patterns){let N=[];for(let $ of j.patterns)N.push(...TP($));return N}return[]}a(TP,"getBoundVarsFromGroupGraphPattern");function Y7(j){let N=j.slice().sort(),$=[];for(let z=0;z<N.length-1;z++)N[z+1]==N[z]&&$.push(N[z]);return $}a(Y7,"getDuplicatesInArray");function ip(j){if(!tt.sparqlStar)throw new Error("SPARQL-star support is not enabled");return j}a(ip,"ensureSparqlStar");function AP(j,N,$){for(let z of N){let Ie=jo("subject"in z?z.subject:j,z.predicate,z.object);$.push(Ie),z.annotations&&AP(Zw(j,z.predicate,z.object),z.annotations,$)}}a(AP,"_applyAnnotations");function sE(j){if(tt.sparqlStar){let N=[];return j.forEach($=>{let z=jo($.subject,$.predicate,$.object);N.push(z),$.annotations&&AP(Zw($.subject,$.predicate,$.object),$.annotations,N)}),N}return j}a(sE,"applyAnnotations");function i0e(j){if(!tt.sparqlStarNestedQuads)throw new Error("Lenient SPARQL-star support with nested quads is not enabled");return j}a(i0e,"ensureSparqlStarNestedQuads");function IP(j){for(let N of j){if(N.type==="graph"&&N.name.termType==="Variable")throw new Error("Detected illegal variable in GRAPH");if(N.type==="bgp"||N.type==="graph"){for(let $ of N.triples)if($.subject.termType==="Variable"||$.predicate.termType==="Variable"||$.object.termType==="Variable")throw new Error("Detected illegal variable in BGP")}}return j}a(IP,"ensureNoVariables");function oE(j){for(let N of j)if(N.type==="bgp"){for(let $ of N.triples)if($.subject.termType==="BlankNode"||$.predicate.termType==="BlankNode"||$.object.termType==="BlankNode")throw new Error("Detected illegal blank node in BGP")}return j}a(oE,"ensureNoBnodes");var Q7=(function(){var j={EOF:1,parseError:a(function($,z){if(this.yy.parser)this.yy.parser.parseError($,z);else throw new Error($)},"parseError"),setInput:a(function(N,$){return this.yy=$||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var $=N.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:a(function(N){var $=N.length,z=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var Ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var Je=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===Ie.length?this.yylloc.first_column:0)+Ie[Ie.length-z.length].length-z[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[Je[0],Je[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
38
+ `,r:"\r",f:"\f"},W7=/[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/,eE=String.fromCharCode;function vP(j,N){j=j.substring(N,j.length-N);try{j=j.replace(G7,function($,z,Ie,Je){var w;if(z){if(w=parseInt(z,16),isNaN(w))throw new Error;return eE(w)}else if(Ie){if(w=parseInt(Ie,16),isNaN(w))throw new Error;return w<65535?eE(w):eE(55296+((w-=65536)>>10),56320+(w&1023))}else{var Hn=q7[Je];if(!Hn)throw new Error;return Hn}})}catch{return""}if(W7.exec(j))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+j);return j}a(vP,"unescapeString");function H7(j){var N=np(),$=N,z=[],Ie,Je=[];j.forEach(function(Qs){z.push(Qs.entity),Yc(Je,Qs.triples)});for(var w=0,Hn=0,A=z.length,Ie=Array(A*2);w<A;)Ie[Hn++]=jo($,tt.factory.namedNode($7),z[w]),Ie[Hn++]=jo($,tt.factory.namedNode(U7),$=++w<A?np():tt.factory.namedNode(gP));return{entity:N,triples:Yc(Ie,Je)}}a(H7,"createList");function z7(j){var N=np();return{entity:N,triples:j.map(function($){return gr(jo(N),$)})}}a(z7,"createAnonymousObject");function tE(j,N,$){var z=[],Ie=[];return N.forEach(function(Je){let w=null;Je.annotation&&(w=Je.annotation,Je=Je.object),z.push(jo(null,j,Je.entity,w)),Yc(Ie,Je.triples)}),Ks(z,$||[],Ie)}a(tE,"objectListToTriples");function i0e(j){for(var N=[],$,z=0,Ie;Ie=j[z];z++)Ie.type==="bgp"?Ie.triples.length&&($?Yc($.triples,Ie.triples):Mo(N,$=Ie)):(!Ie.patterns||Ie.patterns.length>0)&&(Mo(N,Ie),$=null);return N}a(i0e,"mergeAdjacentBGPs");function Su(j){return j.variable?j.variable.value:j.value||j.expression.value}a(Su,"getExpressionId");function rE(j){if(!j)return[];if(j.type==="aggregate")return[j];if(j.type==="operation"){let N=[];for(let $ of j.args)N.push(...rE($));return N}return[]}a(rE,"getAggregatesOfExpression");function K7(j){let N=new Set,$=a(function(z){z&&(z.termType==="Variable"?N.add(z):z.type==="operation"&&z.args.forEach($))},"visitExpression");return $(j),N}a(K7,"getVariablesFromExpression");function nE(j,N=1,$=[]){for(let z of j)N>0&&z instanceof Array?nE(z,N-1,$):$.push(z);return $}a(nE,"flatten");function iE(j){return j.termType==="Variable"}a(iE,"isVariable");function TP(j){if(j.triples){let N=[];for(let $ of j.triples)iE($.subject)&&N.push($.subject.value),iE($.predicate)&&N.push($.predicate.value),iE($.object)&&N.push($.object.value);return N}else if(j.patterns){let N=[];for(let $ of j.patterns)N.push(...TP($));return N}return[]}a(TP,"getBoundVarsFromGroupGraphPattern");function Y7(j){let N=j.slice().sort(),$=[];for(let z=0;z<N.length-1;z++)N[z+1]==N[z]&&$.push(N[z]);return $}a(Y7,"getDuplicatesInArray");function ip(j){if(!tt.sparqlStar)throw new Error("SPARQL-star support is not enabled");return j}a(ip,"ensureSparqlStar");function AP(j,N,$){for(let z of N){let Ie=jo("subject"in z?z.subject:j,z.predicate,z.object);$.push(Ie),z.annotations&&AP(Zw(j,z.predicate,z.object),z.annotations,$)}}a(AP,"_applyAnnotations");function sE(j){if(tt.sparqlStar){let N=[];return j.forEach($=>{let z=jo($.subject,$.predicate,$.object);N.push(z),$.annotations&&AP(Zw($.subject,$.predicate,$.object),$.annotations,N)}),N}return j}a(sE,"applyAnnotations");function s0e(j){if(!tt.sparqlStarNestedQuads)throw new Error("Lenient SPARQL-star support with nested quads is not enabled");return j}a(s0e,"ensureSparqlStarNestedQuads");function IP(j){for(let N of j){if(N.type==="graph"&&N.name.termType==="Variable")throw new Error("Detected illegal variable in GRAPH");if(N.type==="bgp"||N.type==="graph"){for(let $ of N.triples)if($.subject.termType==="Variable"||$.predicate.termType==="Variable"||$.object.termType==="Variable")throw new Error("Detected illegal variable in BGP")}}return j}a(IP,"ensureNoVariables");function oE(j){for(let N of j)if(N.type==="bgp"){for(let $ of N.triples)if($.subject.termType==="BlankNode"||$.predicate.termType==="BlankNode"||$.object.termType==="BlankNode")throw new Error("Detected illegal blank node in BGP")}return j}a(oE,"ensureNoBnodes");var Q7=(function(){var j={EOF:1,parseError:a(function($,z){if(this.yy.parser)this.yy.parser.parseError($,z);else throw new Error($)},"parseError"),setInput:a(function(N,$){return this.yy=$||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var $=N.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:a(function(N){var $=N.length,z=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var Ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var Je=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===Ie.length?this.yylloc.first_column:0)+Ie[Ie.length-z.length].length-z[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[Je[0],Je[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
39
39
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(N){this.unput(this.match.slice(N))},"less"),pastInput:a(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var N=this.pastInput(),$=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
40
40
  `+$+"^"},"showPosition"),test_match:a(function(N,$){var z,Ie,Je;if(this.options.backtrack_lexer&&(Je={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Je.yylloc.range=this.yylloc.range.slice(0))),Ie=N[0].match(/(?:\r\n?|\n).*/g),Ie&&(this.yylineno+=Ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ie?Ie[Ie.length-1].length-Ie[Ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],z=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var w in Je)this[w]=Je[w];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,$,z,Ie;this._more||(this.yytext="",this.match="");for(var Je=this._currentRules(),w=0;w<Je.length;w++)if(z=this._input.match(this.rules[Je[w]]),z&&(!$||z[0].length>$[0].length)){if($=z,Ie=w,this.options.backtrack_lexer){if(N=this.test_match(z,Je[w]),N!==!1)return N;if(this._backtrack){$=!1;continue}else return!1}else if(!this.options.flex)break}return $?(N=this.test_match($,Je[Ie]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
41
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var $=this.next();return $||this.lex()},"lex"),begin:a(function($){this.conditionStack.push($)},"begin"),popState:a(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},"topState"),pushState:a(function($){this.begin($)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{flex:!0,"case-insensitive":!0},performAction:a(function($,z,Ie,Je){var w=Je;switch(Ie){case 0:break;case 1:return 12;case 2:return 15;case 3:return 41;case 4:return 325;case 5:return 326;case 6:return 45;case 7:return 47;case 8:return 48;case 9:return 39;case 10:return 24;case 11:return 28;case 12:return 29;case 13:return 31;case 14:return 32;case 15:return 36;case 16:return 53;case 17:return 327;case 18:return 63;case 19:return 64;case 20:return 70;case 21:return 73;case 22:return 76;case 23:return 78;case 24:return 81;case 25:return 83;case 26:return 85;case 27:return 193;case 28:return 100;case 29:return 328;case 30:return 121;case 31:return 329;case 32:return 330;case 33:return 110;case 34:return 331;case 35:return 109;case 36:return 332;case 37:return 333;case 38:return 113;case 39:return 115;case 40:return 116;case 41:return 131;case 42:return 123;case 43:return 126;case 44:return 128;case 45:return 132;case 46:return 112;case 47:return 334;case 48:return 335;case 49:return 159;case 50:return 161;case 51:return 164;case 52:return 174;case 53:return 160;case 54:return 336;case 55:return 163;case 56:return 312;case 57:return 314;case 58:return 317;case 59:return 318;case 60:return 272;case 61:return 197;case 62:return 337;case 63:return 338;case 64:return 229;case 65:return 340;case 66:return 263;case 67:return 224;case 68:return 231;case 69:return 232;case 70:return 242;case 71:return 246;case 72:return 290;case 73:return 341;case 74:return 342;case 75:return 343;case 76:return 344;case 77:return 345;case 78:return 250;case 79:return 346;case 80:return 265;case 81:return 276;case 82:return 277;case 83:return 268;case 84:return 269;case 85:return 270;case 86:return 271;case 87:return 347;case 88:return 348;case 89:return 273;case 90:return 274;case 91:return 350;case 92:return 349;case 93:return 351;case 94:return 279;case 95:return 280;case 96:return 283;case 97:return 285;case 98:return 289;case 99:return 293;case 100:return 296;case 101:return 13;case 102:return 16;case 103:return 308;case 104:return 309;case 105:return 87;case 106:return 292;case 107:return 82;case 108:return 294;case 109:return 295;case 110:return 297;case 111:return 298;case 112:return 299;case 113:return 300;case 114:return 301;case 115:return 302;case 116:return"EXPONENT";case 117:return 303;case 118:return 304;case 119:return 305;case 120:return 306;case 121:return 89;case 122:return 310;case 123:return 6;case 124:return"INVALID";case 125:console.log(z.yytext);break}},"anonymous"),rules:[/^(?:\s+|(#[^\n\r]*))/i,/^(?:BASE)/i,/^(?:PREFIX)/i,/^(?:SELECT)/i,/^(?:DISTINCT)/i,/^(?:REDUCED)/i,/^(?:\()/i,/^(?:AS)/i,/^(?:\))/i,/^(?:\*)/i,/^(?:CONSTRUCT)/i,/^(?:WHERE)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:DESCRIBE)/i,/^(?:ASK)/i,/^(?:FROM)/i,/^(?:NAMED)/i,/^(?:GROUP)/i,/^(?:BY)/i,/^(?:HAVING)/i,/^(?:ORDER)/i,/^(?:ASC)/i,/^(?:DESC)/i,/^(?:LIMIT)/i,/^(?:OFFSET)/i,/^(?:VALUES)/i,/^(?:;)/i,/^(?:LOAD)/i,/^(?:SILENT)/i,/^(?:INTO)/i,/^(?:CLEAR)/i,/^(?:DROP)/i,/^(?:CREATE)/i,/^(?:ADD)/i,/^(?:TO)/i,/^(?:MOVE)/i,/^(?:COPY)/i,/^(?:INSERT((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)WHERE)/i,/^(?:WITH)/i,/^(?:DELETE)/i,/^(?:INSERT)/i,/^(?:USING)/i,/^(?:DEFAULT)/i,/^(?:GRAPH)/i,/^(?:ALL)/i,/^(?:\.)/i,/^(?:OPTIONAL)/i,/^(?:SERVICE)/i,/^(?:BIND)/i,/^(?:UNDEF)/i,/^(?:MINUS)/i,/^(?:UNION)/i,/^(?:FILTER)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:\{\|)/i,/^(?:\|\})/i,/^(?:,)/i,/^(?:a)/i,/^(?:\|)/i,/^(?:\/)/i,/^(?:\^)/i,/^(?:\?)/i,/^(?:\+)/i,/^(?:!)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\|\|)/i,/^(?:&&)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:<)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:>=)/i,/^(?:IN)/i,/^(?:NOT)/i,/^(?:-)/i,/^(?:BOUND)/i,/^(?:BNODE)/i,/^(?:(RAND|NOW|UUID|STRUUID))/i,/^(?:(LANG|DATATYPE|IRI|URI|ABS|CEIL|FLOOR|ROUND|STRLEN|STR|UCASE|LCASE|ENCODE_FOR_URI|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|MD5|SHA1|SHA256|SHA384|SHA512|isIRI|isURI|isBLANK|isLITERAL|isNUMERIC))/i,/^(?:(SUBJECT|PREDICATE|OBJECT|isTRIPLE))/i,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/i,/^(?:TRIPLE)/i,/^(?:REGEX)/i,/^(?:SUBSTR)/i,/^(?:REPLACE)/i,/^(?:EXISTS)/i,/^(?:COUNT)/i,/^(?:SUM|MIN|MAX|AVG|SAMPLE)/i,/^(?:GROUP_CONCAT)/i,/^(?:SEPARATOR)/i,/^(?:\^\^)/i,/^(?:true|false)/i,/^(?:(<(?:[^<>\"\{\}\|\^`\\\u0000-\u0020])*>))/i,/^(?:((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:)((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|:|[0-9]|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(_:(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?))/i,/^(?:([\?\$]((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])*)))/i,/^(?:(@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*))/i,/^(?:([0-9]+))/i,/^(?:([0-9]*\.[0-9]+))/i,/^(?:([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+)))/i,/^(?:(\+([0-9]+)))/i,/^(?:(\+([0-9]*\.[0-9]+)))/i,/^(?:(\+([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:(-([0-9]+)))/i,/^(?:(-([0-9]*\.[0-9]+)))/i,/^(?:(-([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*"""))/i,/^(?:(\((\u0020|\u0009|\u000D|\u000A)*\)))/i,/^(?:(\[(\u0020|\u0009|\u000D|\u000A)*\]))/i,/^(?:$)/i,/^(?:.)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],inclusive:!0}}};return j})();Yw.lexer=Q7;function tt(){this.yy={}}return a(tt,"Parser"),tt.prototype=Yw,Yw.Parser=tt,new tt})();pF.exports=IW});var _F=v((swe,yF)=>{var RW="http://www.w3.org/2001/XMLSchema#integer",CW="http://www.w3.org/2001/XMLSchema#string";function Kt(r){this._options=r=r||{};var e=r.prefixes||{};this._prefixByIri={};var t=[];for(var n in e){var i=e[n];Np(i)&&(this._prefixByIri[i]=n,t.push(i))}var s=t.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+s+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=r.sparqlStar,this._indent=Np(r.indent)?r.indent:" ",this._newline=Np(r.newline)?r.newline:`
42
- `,this._explicitDatatype=!!r.explicitDatatype}a(Kt,"Generator");Kt.prototype.toQuery=function(r){var e="";return r.queryType&&(e+=r.queryType.toUpperCase()+" "),r.reduced&&(e+="REDUCED "),r.distinct&&(e+="DISTINCT "),r.variables?e+=Di(r.variables,void 0,function(t){return/^[?$]/.test(t)?t:Ka(t)?this.toEntity(t):"("+this.toExpression(t.expression)+" AS "+_y(t.variable)+")"},this)+" ":r.template&&(e+=this.group(r.template,!0)+this._newline),r.from&&(e+=this.graphs("FROM ",r.from.default)+this.graphs("FROM NAMED ",r.from.named)),r.where&&(e+="WHERE "+this.group(r.where,!0)+this._newline),r.updates&&(e+=Di(r.updates,";"+this._newline,this.toUpdate,this)),r.group&&(e+="GROUP BY "+Di(r.group,void 0,function(t){var n=Ka(t.expression)?this.toEntity(t.expression):"("+this.toExpression(t.expression)+")";return t.variable?"("+n+" AS "+_y(t.variable)+")":n},this)+this._newline),r.having&&(e+="HAVING ("+Di(r.having,void 0,this.toExpression,this)+")"+this._newline),r.order&&(e+="ORDER BY "+Di(r.order,void 0,function(t){var n="("+this.toExpression(t.expression)+")";return t.descending?"DESC "+n:n},this)+this._newline),Number.isInteger(r.offset)&&(e+="OFFSET "+r.offset+this._newline),Number.isInteger(r.limit)&&(e+="LIMIT "+r.limit+this._newline),r.values&&(e+=this.values(r)),e=this.baseAndPrefixes(r)+e,e.trim()};Kt.prototype.baseAndPrefixes=function(r){var e=r.base?"BASE <"+r.base+">"+this._newline:"",t="";for(var n in r.prefixes)(this._options.allPrefixes||this._usedPrefixes[n])&&(t+="PREFIX "+n+": <"+r.prefixes[n]+">"+this._newline);return e+t};Kt.prototype.toPattern=function(r){var e=r.type||r instanceof Array&&"array"||(r.subject&&r.predicate&&r.object?"triple":"");if(!(e in this))throw new Error("Unknown entry type: "+e);return this[e](r)};Kt.prototype.triple=function(r){return this.toEntity(r.subject)+" "+this.toEntity(r.predicate)+" "+this.toEntity(r.object)+"."};Kt.prototype.array=function(r){return Di(r,this._newline,this.toPattern,this)};Kt.prototype.bgp=function(r){return this.encodeTriples(r.triples)};Kt.prototype.encodeTriples=function(r){if(!r.length)return"";for(var e=[],t=void 0,n=void 0,i=0;i<r.length;i++){var s=r[i];fl(s.subject,t)?fl(s.predicate,n)?e.push(","):(n=s.predicate,e.push(";"+this._newline,this._indent,this.toEntity(n))):(t&&e.push("."+this._newline),t=s.subject,n=s.predicate,e.push(this.toEntity(t)," ",this.toEntity(n))),e.push(" ",this.toEntity(s.object))}return e.push("."),e.join("")};Kt.prototype.graph=function(r){return"GRAPH "+this.toEntity(r.name)+" "+this.group(r)};Kt.prototype.graphs=function(r,e){return!e||e.length===0?"":Di(e,"",function(t){return r+this.toEntity(t)+this._newline},this)};Kt.prototype.group=function(r,e){return r=e!==!0?this.array(r.patterns||r.triples):this.toPattern(r.type!=="group"?r:r.patterns),r.indexOf(this._newline)===-1?"{ "+r+" }":"{"+this._newline+this.indent(r)+this._newline+"}"};Kt.prototype.query=function(r){return this.toQuery(r)};Kt.prototype.filter=function(r){return"FILTER("+this.toExpression(r.expression)+")"};Kt.prototype.bind=function(r){return"BIND("+this.toExpression(r.expression)+" AS "+_y(r.variable)+")"};Kt.prototype.optional=function(r){return"OPTIONAL "+this.group(r)};Kt.prototype.union=function(r){return Di(r.patterns,this._newline+"UNION"+this._newline,function(e){return this.group(e,!0)},this)};Kt.prototype.minus=function(r){return"MINUS "+this.group(r)};Kt.prototype.values=function(r){var e=Object.keys(r.values.reduce(function(i,s){for(var o in s)i[o]=!0;return i},{})),t,n;return e.length===1?t=n="":(t="(",n=")"),"VALUES "+t+e.join(" ")+n+" {"+this._newline+Di(r.values,this._newline,function(i){return" "+t+Di(e,void 0,function(s){return i[s]?this.toEntity(i[s]):"UNDEF"},this)+n},this)+this._newline+"}"};Kt.prototype.service=function(r){return"SERVICE "+(r.silent?"SILENT ":"")+this.toEntity(r.name)+" "+this.group(r)};Kt.prototype.toExpression=function(r){if(Ka(r))return this.toEntity(r);switch(r.type.toLowerCase()){case"aggregate":return r.aggregation.toUpperCase()+"("+(r.distinct?"DISTINCT ":"")+this.toExpression(r.expression)+(typeof r.separator=="string"?'; SEPARATOR = "'+r.separator.replace(mF,gF)+'"':"")+")";case"functioncall":return this.toEntity(r.function)+"("+Di(r.args,", ",this.toExpression,this)+")";case"operation":var e=r.operator.toUpperCase(),t=r.args||[];switch(r.operator.toLowerCase()){case"<":case">":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(Ka(t[0])?this.toEntity(t[0]):"("+this.toExpression(t[0])+")")+" "+e+" "+(Ka(t[1])?this.toEntity(t[1]):"("+this.toExpression(t[1])+")");case"!":return"!("+this.toExpression(t[0])+")";case"uplus":return"+("+this.toExpression(t[0])+")";case"uminus":return"-("+this.toExpression(t[0])+")";case"notin":e="NOT IN";case"in":return this.toExpression(t[0])+" "+e+"("+(Np(t[1])?t[1]:Di(t[1],", ",this.toExpression,this))+")";case"notexists":e="NOT EXISTS";case"exists":return e+" "+this.group(t[0],!0);default:return e+"("+Di(t,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+r.type)}};Kt.prototype.toEntity=function(r){if(Ka(r))switch(r.termType){case"Wildcard":return"*";case"Variable":return _y(r);case"BlankNode":return"_:"+r.value;case"Literal":var e=r.value||"",t=r.language||"",n=r.datatype;if(r='"'+e.replace(mF,gF)+'"',t)r+="@"+t;else if(n){if(!this._explicitDatatype)switch(n.value){case CW:return r;case RW:if(/^\d+$/.test(e))return e+" "}r+="^^"+this.encodeIRI(n.value)}return r;case"Quad":if(!this._sparqlStar)throw new Error("SPARQL* support is not enabled");return r.graph&&r.graph.termType!=="DefaultGraph"?"<< GRAPH "+this.toEntity(r.graph)+" { "+this.toEntity(r.subject)+" "+this.toEntity(r.predicate)+" "+this.toEntity(r.object)+" } >>":"<< "+this.toEntity(r.subject)+" "+this.toEntity(r.predicate)+" "+this.toEntity(r.object)+" >>";default:return this.encodeIRI(r.value)}else{var i=r.items.map(this.toEntity,this),s=r.pathType;switch(s){case"^":case"!":return s+i[0];case"*":case"+":case"?":return"("+i[0]+s+")";default:return"("+i.join(s)+")"}}};var mF=/["\\\t\n\r\b\f]/g,gF=a(function(r){return xW[r]},"escapeReplacer"),xW={"\\":"\\\\",'"':'\\"'," ":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};Kt.prototype.encodeIRI=function(r){var e=this._prefixRegex.exec(r);if(e){var t=this._prefixByIri[e[1]];return this._usedPrefixes[t]=!0,t+":"+e[2]}return"<"+r+">"};Kt.prototype.toUpdate=function(r){switch(r.type||r.updateType){case"load":return"LOAD"+(r.source?" "+this.toEntity(r.source):"")+(r.destination?" INTO GRAPH "+this.toEntity(r.destination):"");case"insert":return"INSERT DATA "+this.group(r.insert,!0);case"delete":return"DELETE DATA "+this.group(r.delete,!0);case"deletewhere":return"DELETE WHERE "+this.group(r.delete,!0);case"insertdelete":return(r.graph?"WITH "+this.toEntity(r.graph)+this._newline:"")+(r.delete.length?"DELETE "+this.group(r.delete,!0)+this._newline:"")+(r.insert.length?"INSERT "+this.group(r.insert,!0)+this._newline:"")+(r.using?this.graphs("USING ",r.using.default):"")+(r.using?this.graphs("USING NAMED ",r.using.named):"")+"WHERE "+this.group(r.where,!0);case"add":case"copy":case"move":return r.type.toUpperCase()+" "+(r.silent?"SILENT ":"")+(r.source.default?"DEFAULT":this.toEntity(r.source.name))+" TO "+this.toEntity(r.destination.name);case"create":case"clear":case"drop":return r.type.toUpperCase()+(r.silent?" SILENT ":" ")+(r.graph.default?"DEFAULT":r.graph.named?"NAMED":r.graph.all?"ALL":"GRAPH "+this.toEntity(r.graph.name));default:throw new Error("Unknown update query type: "+r.type)}};Kt.prototype.indent=function(r){return r.replace(/^/gm,this._indent)};function _y(r){return"?"+r.value}a(_y,"variableToString");function Np(r){return typeof r=="string"}a(Np,"isString");function Ka(r){return typeof r.termType=="string"}a(Ka,"isTerm");function fl(r,e){if(!r||!Ka(r)||!e||!Ka(e)||r.termType!==e.termType)return!1;switch(r.termType){case"Literal":return r.value===e.value&&r.language===e.language&&fl(r.datatype,e.datatype);case"Quad":return fl(r.subject,e.subject)&&fl(r.predicate,e.predicate)&&fl(r.object,e.object)&&fl(r.graph,e.graph);default:return r.value===e.value}}a(fl,"equalTerms");function Di(r,e,t,n){return r.map(t,n).join(Np(e)?e:" ")}a(Di,"mapJoin");function OW(r={}){return{stringify:a(function(e){var t=Object.create(r);return t.prefixes=e.prefixes,new Kt(t).toQuery(e)},"stringify"),createGenerator:a(function(){return new Kt(r)},"createGenerator")}}a(OW,"_Generator");yF.exports={Generator:OW}});var Kv=v(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.BlankNode=void 0;var zv=class{static{a(this,"BlankNode")}constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&e.termType==="BlankNode"&&e.value===this.value}};by.BlankNode=zv});var Yv=v(Sy=>{"use strict";Object.defineProperty(Sy,"__esModule",{value:!0});Sy.DefaultGraph=void 0;var kp=class{static{a(this,"DefaultGraph")}constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&e.termType==="DefaultGraph"}};Sy.DefaultGraph=kp;kp.INSTANCE=new kp});var Ey=v(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0});wy.NamedNode=void 0;var Qv=class{static{a(this,"NamedNode")}constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&e.termType==="NamedNode"&&e.value===this.value}};wy.NamedNode=Qv});var Xv=v(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});vy.Literal=void 0;var bF=Ey(),Mp=class r{static{a(this,"Literal")}constructor(e,t){this.termType="Literal",this.value=e,typeof t=="string"?(this.language=t,this.datatype=r.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=r.XSD_STRING)}equals(e){return!!e&&e.termType==="Literal"&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}};vy.Literal=Mp;Mp.RDF_LANGUAGE_STRING=new bF.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");Mp.XSD_STRING=new bF.NamedNode("http://www.w3.org/2001/XMLSchema#string")});var Zv=v(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});Ty.Quad=void 0;var Jv=class{static{a(this,"Quad")}constructor(e,t,n,i){this.termType="Quad",this.value="",this.subject=e,this.predicate=t,this.object=n,this.graph=i}equals(e){return!!e&&(e.termType==="Quad"||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}};Ty.Quad=Jv});var t1=v(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.Variable=void 0;var e1=class{static{a(this,"Variable")}constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&e.termType==="Variable"&&e.value===this.value}};Ay.Variable=e1});var wF=v(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});Iy.DataFactory=void 0;var PW=Kv(),FW=Yv(),SF=Xv(),DW=Ey(),LW=Zv(),NW=t1(),kW=0,r1=class{static{a(this,"DataFactory")}constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${kW++}_`}namedNode(e){return new DW.NamedNode(e)}blankNode(e){return new PW.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new SF.Literal(e,t)}variable(e){return new NW.Variable(e)}defaultGraph(){return FW.DefaultGraph.INSTANCE}quad(e,t,n,i){return new LW.Quad(e,t,n,i||this.defaultGraph())}fromTerm(e){switch(e.termType){case"NamedNode":return this.namedNode(e.value);case"BlankNode":return this.blankNode(e.value);case"Literal":return e.language?this.literal(e.value,e.language):e.datatype.equals(SF.Literal.XSD_STRING)?this.literal(e.value):this.literal(e.value,this.fromTerm(e.datatype));case"Variable":return this.variable(e.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(e.subject),this.fromTerm(e.predicate),this.fromTerm(e.object),this.fromTerm(e.graph))}}fromQuad(e){return this.fromTerm(e)}resetBlankNodeCounter(){this.blankNodeCounter=0}};Iy.DataFactory=r1});var EF=v(Li=>{"use strict";var MW=Li&&Li.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),dl=Li&&Li.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&MW(e,r,t)};Object.defineProperty(Li,"__esModule",{value:!0});dl(Kv(),Li);dl(wF(),Li);dl(Yv(),Li);dl(Xv(),Li);dl(Ey(),Li);dl(Zv(),Li);dl(t1(),Li)});var TF=v((vwe,vF)=>{var{Parser:Wo}=hF(),{Generator:jW}=_F(),{Wildcard:$W}=Hv(),{DataFactory:UW}=EF();function BW({prefixes:r,baseIRI:e,factory:t,pathOnly:n,sparqlStar:i,skipValidation:s,skipUngroupedVariableCheck:o}={}){let c={};for(let u in r??{})c[u]=r[u];let l=new Wo;return l.parse=function(){return Wo.base=e||"",Wo.prefixes=Object.create(c),Wo.factory=t||new UW,Wo.sparqlStar=!!i,Wo.pathOnly=!!n,Wo.skipValidation=!!s||!!o,Wo.prototype.parse.apply(l,arguments)},l._resetBlanks=Wo._resetBlanks,l}a(BW,"_Parser");vF.exports={Parser:BW,Generator:jW,Wildcard:$W}});var i1=v(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.CaseWhenTransformerError=Fu.CaseWhenTransformer=void 0;var n1=class{static{a(this,"CaseWhenTransformer")}transform(e){let t=this.stripLineComments(e),n,i=0,s=100;do if(n=t,t=this.transformSinglePass(t),i++,i>s)throw new Ho("Too many nested CASE expressions (max 100 iterations)");while(t!==n);return t}stripLineComments(e){let t="",n=0;for(;n<e.length;){let i=e[n];if(i==="'"||i==='"'){let s=i;for(t+=i,n++;n<e.length&&e[n]!==s;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}t+=e[n],n++}n<e.length&&(t+=e[n],n++);continue}if(i==="<"){let s=e.indexOf(">",n),o=e.indexOf(`
41
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var $=this.next();return $||this.lex()},"lex"),begin:a(function($){this.conditionStack.push($)},"begin"),popState:a(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},"topState"),pushState:a(function($){this.begin($)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{flex:!0,"case-insensitive":!0},performAction:a(function($,z,Ie,Je){var w=Je;switch(Ie){case 0:break;case 1:return 12;case 2:return 15;case 3:return 41;case 4:return 325;case 5:return 326;case 6:return 45;case 7:return 47;case 8:return 48;case 9:return 39;case 10:return 24;case 11:return 28;case 12:return 29;case 13:return 31;case 14:return 32;case 15:return 36;case 16:return 53;case 17:return 327;case 18:return 63;case 19:return 64;case 20:return 70;case 21:return 73;case 22:return 76;case 23:return 78;case 24:return 81;case 25:return 83;case 26:return 85;case 27:return 193;case 28:return 100;case 29:return 328;case 30:return 121;case 31:return 329;case 32:return 330;case 33:return 110;case 34:return 331;case 35:return 109;case 36:return 332;case 37:return 333;case 38:return 113;case 39:return 115;case 40:return 116;case 41:return 131;case 42:return 123;case 43:return 126;case 44:return 128;case 45:return 132;case 46:return 112;case 47:return 334;case 48:return 335;case 49:return 159;case 50:return 161;case 51:return 164;case 52:return 174;case 53:return 160;case 54:return 336;case 55:return 163;case 56:return 312;case 57:return 314;case 58:return 317;case 59:return 318;case 60:return 272;case 61:return 197;case 62:return 337;case 63:return 338;case 64:return 229;case 65:return 340;case 66:return 263;case 67:return 224;case 68:return 231;case 69:return 232;case 70:return 242;case 71:return 246;case 72:return 290;case 73:return 341;case 74:return 342;case 75:return 343;case 76:return 344;case 77:return 345;case 78:return 250;case 79:return 346;case 80:return 265;case 81:return 276;case 82:return 277;case 83:return 268;case 84:return 269;case 85:return 270;case 86:return 271;case 87:return 347;case 88:return 348;case 89:return 273;case 90:return 274;case 91:return 350;case 92:return 349;case 93:return 351;case 94:return 279;case 95:return 280;case 96:return 283;case 97:return 285;case 98:return 289;case 99:return 293;case 100:return 296;case 101:return 13;case 102:return 16;case 103:return 308;case 104:return 309;case 105:return 87;case 106:return 292;case 107:return 82;case 108:return 294;case 109:return 295;case 110:return 297;case 111:return 298;case 112:return 299;case 113:return 300;case 114:return 301;case 115:return 302;case 116:return"EXPONENT";case 117:return 303;case 118:return 304;case 119:return 305;case 120:return 306;case 121:return 89;case 122:return 310;case 123:return 6;case 124:return"INVALID";case 125:console.log(z.yytext);break}},"anonymous"),rules:[/^(?:\s+|(#[^\n\r]*))/i,/^(?:BASE)/i,/^(?:PREFIX)/i,/^(?:SELECT)/i,/^(?:DISTINCT)/i,/^(?:REDUCED)/i,/^(?:\()/i,/^(?:AS)/i,/^(?:\))/i,/^(?:\*)/i,/^(?:CONSTRUCT)/i,/^(?:WHERE)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:DESCRIBE)/i,/^(?:ASK)/i,/^(?:FROM)/i,/^(?:NAMED)/i,/^(?:GROUP)/i,/^(?:BY)/i,/^(?:HAVING)/i,/^(?:ORDER)/i,/^(?:ASC)/i,/^(?:DESC)/i,/^(?:LIMIT)/i,/^(?:OFFSET)/i,/^(?:VALUES)/i,/^(?:;)/i,/^(?:LOAD)/i,/^(?:SILENT)/i,/^(?:INTO)/i,/^(?:CLEAR)/i,/^(?:DROP)/i,/^(?:CREATE)/i,/^(?:ADD)/i,/^(?:TO)/i,/^(?:MOVE)/i,/^(?:COPY)/i,/^(?:INSERT((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)WHERE)/i,/^(?:WITH)/i,/^(?:DELETE)/i,/^(?:INSERT)/i,/^(?:USING)/i,/^(?:DEFAULT)/i,/^(?:GRAPH)/i,/^(?:ALL)/i,/^(?:\.)/i,/^(?:OPTIONAL)/i,/^(?:SERVICE)/i,/^(?:BIND)/i,/^(?:UNDEF)/i,/^(?:MINUS)/i,/^(?:UNION)/i,/^(?:FILTER)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:\{\|)/i,/^(?:\|\})/i,/^(?:,)/i,/^(?:a)/i,/^(?:\|)/i,/^(?:\/)/i,/^(?:\^)/i,/^(?:\?)/i,/^(?:\+)/i,/^(?:!)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\|\|)/i,/^(?:&&)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:<)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:>=)/i,/^(?:IN)/i,/^(?:NOT)/i,/^(?:-)/i,/^(?:BOUND)/i,/^(?:BNODE)/i,/^(?:(RAND|NOW|UUID|STRUUID))/i,/^(?:(LANG|DATATYPE|IRI|URI|ABS|CEIL|FLOOR|ROUND|STRLEN|STR|UCASE|LCASE|ENCODE_FOR_URI|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|MD5|SHA1|SHA256|SHA384|SHA512|isIRI|isURI|isBLANK|isLITERAL|isNUMERIC))/i,/^(?:(SUBJECT|PREDICATE|OBJECT|isTRIPLE))/i,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/i,/^(?:TRIPLE)/i,/^(?:REGEX)/i,/^(?:SUBSTR)/i,/^(?:REPLACE)/i,/^(?:EXISTS)/i,/^(?:COUNT)/i,/^(?:SUM|MIN|MAX|AVG|SAMPLE)/i,/^(?:GROUP_CONCAT)/i,/^(?:SEPARATOR)/i,/^(?:\^\^)/i,/^(?:true|false)/i,/^(?:(<(?:[^<>\"\{\}\|\^`\\\u0000-\u0020])*>))/i,/^(?:((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:)((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|:|[0-9]|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(_:(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?))/i,/^(?:([\?\$]((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])*)))/i,/^(?:(@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*))/i,/^(?:([0-9]+))/i,/^(?:([0-9]*\.[0-9]+))/i,/^(?:([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+)))/i,/^(?:(\+([0-9]+)))/i,/^(?:(\+([0-9]*\.[0-9]+)))/i,/^(?:(\+([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:(-([0-9]+)))/i,/^(?:(-([0-9]*\.[0-9]+)))/i,/^(?:(-([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*"""))/i,/^(?:(\((\u0020|\u0009|\u000D|\u000A)*\)))/i,/^(?:(\[(\u0020|\u0009|\u000D|\u000A)*\]))/i,/^(?:$)/i,/^(?:.)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],inclusive:!0}}};return j})();Yw.lexer=Q7;function tt(){this.yy={}}return a(tt,"Parser"),tt.prototype=Yw,Yw.Parser=tt,new tt})();pF.exports=IW});var _F=v((owe,yF)=>{var RW="http://www.w3.org/2001/XMLSchema#integer",CW="http://www.w3.org/2001/XMLSchema#string";function Kt(r){this._options=r=r||{};var e=r.prefixes||{};this._prefixByIri={};var t=[];for(var n in e){var i=e[n];Np(i)&&(this._prefixByIri[i]=n,t.push(i))}var s=t.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+s+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=r.sparqlStar,this._indent=Np(r.indent)?r.indent:" ",this._newline=Np(r.newline)?r.newline:`
42
+ `,this._explicitDatatype=!!r.explicitDatatype}a(Kt,"Generator");Kt.prototype.toQuery=function(r){var e="";return r.queryType&&(e+=r.queryType.toUpperCase()+" "),r.reduced&&(e+="REDUCED "),r.distinct&&(e+="DISTINCT "),r.variables?e+=Di(r.variables,void 0,function(t){return/^[?$]/.test(t)?t:Ka(t)?this.toEntity(t):"("+this.toExpression(t.expression)+" AS "+_y(t.variable)+")"},this)+" ":r.template&&(e+=this.group(r.template,!0)+this._newline),r.from&&(e+=this.graphs("FROM ",r.from.default)+this.graphs("FROM NAMED ",r.from.named)),r.where&&(e+="WHERE "+this.group(r.where,!0)+this._newline),r.updates&&(e+=Di(r.updates,";"+this._newline,this.toUpdate,this)),r.group&&(e+="GROUP BY "+Di(r.group,void 0,function(t){var n=Ka(t.expression)?this.toEntity(t.expression):"("+this.toExpression(t.expression)+")";return t.variable?"("+n+" AS "+_y(t.variable)+")":n},this)+this._newline),r.having&&(e+="HAVING ("+Di(r.having,void 0,this.toExpression,this)+")"+this._newline),r.order&&(e+="ORDER BY "+Di(r.order,void 0,function(t){var n="("+this.toExpression(t.expression)+")";return t.descending?"DESC "+n:n},this)+this._newline),Number.isInteger(r.offset)&&(e+="OFFSET "+r.offset+this._newline),Number.isInteger(r.limit)&&(e+="LIMIT "+r.limit+this._newline),r.values&&(e+=this.values(r)),e=this.baseAndPrefixes(r)+e,e.trim()};Kt.prototype.baseAndPrefixes=function(r){var e=r.base?"BASE <"+r.base+">"+this._newline:"",t="";for(var n in r.prefixes)(this._options.allPrefixes||this._usedPrefixes[n])&&(t+="PREFIX "+n+": <"+r.prefixes[n]+">"+this._newline);return e+t};Kt.prototype.toPattern=function(r){var e=r.type||r instanceof Array&&"array"||(r.subject&&r.predicate&&r.object?"triple":"");if(!(e in this))throw new Error("Unknown entry type: "+e);return this[e](r)};Kt.prototype.triple=function(r){return this.toEntity(r.subject)+" "+this.toEntity(r.predicate)+" "+this.toEntity(r.object)+"."};Kt.prototype.array=function(r){return Di(r,this._newline,this.toPattern,this)};Kt.prototype.bgp=function(r){return this.encodeTriples(r.triples)};Kt.prototype.encodeTriples=function(r){if(!r.length)return"";for(var e=[],t=void 0,n=void 0,i=0;i<r.length;i++){var s=r[i];fl(s.subject,t)?fl(s.predicate,n)?e.push(","):(n=s.predicate,e.push(";"+this._newline,this._indent,this.toEntity(n))):(t&&e.push("."+this._newline),t=s.subject,n=s.predicate,e.push(this.toEntity(t)," ",this.toEntity(n))),e.push(" ",this.toEntity(s.object))}return e.push("."),e.join("")};Kt.prototype.graph=function(r){return"GRAPH "+this.toEntity(r.name)+" "+this.group(r)};Kt.prototype.graphs=function(r,e){return!e||e.length===0?"":Di(e,"",function(t){return r+this.toEntity(t)+this._newline},this)};Kt.prototype.group=function(r,e){return r=e!==!0?this.array(r.patterns||r.triples):this.toPattern(r.type!=="group"?r:r.patterns),r.indexOf(this._newline)===-1?"{ "+r+" }":"{"+this._newline+this.indent(r)+this._newline+"}"};Kt.prototype.query=function(r){return this.toQuery(r)};Kt.prototype.filter=function(r){return"FILTER("+this.toExpression(r.expression)+")"};Kt.prototype.bind=function(r){return"BIND("+this.toExpression(r.expression)+" AS "+_y(r.variable)+")"};Kt.prototype.optional=function(r){return"OPTIONAL "+this.group(r)};Kt.prototype.union=function(r){return Di(r.patterns,this._newline+"UNION"+this._newline,function(e){return this.group(e,!0)},this)};Kt.prototype.minus=function(r){return"MINUS "+this.group(r)};Kt.prototype.values=function(r){var e=Object.keys(r.values.reduce(function(i,s){for(var o in s)i[o]=!0;return i},{})),t,n;return e.length===1?t=n="":(t="(",n=")"),"VALUES "+t+e.join(" ")+n+" {"+this._newline+Di(r.values,this._newline,function(i){return" "+t+Di(e,void 0,function(s){return i[s]?this.toEntity(i[s]):"UNDEF"},this)+n},this)+this._newline+"}"};Kt.prototype.service=function(r){return"SERVICE "+(r.silent?"SILENT ":"")+this.toEntity(r.name)+" "+this.group(r)};Kt.prototype.toExpression=function(r){if(Ka(r))return this.toEntity(r);switch(r.type.toLowerCase()){case"aggregate":return r.aggregation.toUpperCase()+"("+(r.distinct?"DISTINCT ":"")+this.toExpression(r.expression)+(typeof r.separator=="string"?'; SEPARATOR = "'+r.separator.replace(mF,gF)+'"':"")+")";case"functioncall":return this.toEntity(r.function)+"("+Di(r.args,", ",this.toExpression,this)+")";case"operation":var e=r.operator.toUpperCase(),t=r.args||[];switch(r.operator.toLowerCase()){case"<":case">":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(Ka(t[0])?this.toEntity(t[0]):"("+this.toExpression(t[0])+")")+" "+e+" "+(Ka(t[1])?this.toEntity(t[1]):"("+this.toExpression(t[1])+")");case"!":return"!("+this.toExpression(t[0])+")";case"uplus":return"+("+this.toExpression(t[0])+")";case"uminus":return"-("+this.toExpression(t[0])+")";case"notin":e="NOT IN";case"in":return this.toExpression(t[0])+" "+e+"("+(Np(t[1])?t[1]:Di(t[1],", ",this.toExpression,this))+")";case"notexists":e="NOT EXISTS";case"exists":return e+" "+this.group(t[0],!0);default:return e+"("+Di(t,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+r.type)}};Kt.prototype.toEntity=function(r){if(Ka(r))switch(r.termType){case"Wildcard":return"*";case"Variable":return _y(r);case"BlankNode":return"_:"+r.value;case"Literal":var e=r.value||"",t=r.language||"",n=r.datatype;if(r='"'+e.replace(mF,gF)+'"',t)r+="@"+t;else if(n){if(!this._explicitDatatype)switch(n.value){case CW:return r;case RW:if(/^\d+$/.test(e))return e+" "}r+="^^"+this.encodeIRI(n.value)}return r;case"Quad":if(!this._sparqlStar)throw new Error("SPARQL* support is not enabled");return r.graph&&r.graph.termType!=="DefaultGraph"?"<< GRAPH "+this.toEntity(r.graph)+" { "+this.toEntity(r.subject)+" "+this.toEntity(r.predicate)+" "+this.toEntity(r.object)+" } >>":"<< "+this.toEntity(r.subject)+" "+this.toEntity(r.predicate)+" "+this.toEntity(r.object)+" >>";default:return this.encodeIRI(r.value)}else{var i=r.items.map(this.toEntity,this),s=r.pathType;switch(s){case"^":case"!":return s+i[0];case"*":case"+":case"?":return"("+i[0]+s+")";default:return"("+i.join(s)+")"}}};var mF=/["\\\t\n\r\b\f]/g,gF=a(function(r){return xW[r]},"escapeReplacer"),xW={"\\":"\\\\",'"':'\\"'," ":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};Kt.prototype.encodeIRI=function(r){var e=this._prefixRegex.exec(r);if(e){var t=this._prefixByIri[e[1]];return this._usedPrefixes[t]=!0,t+":"+e[2]}return"<"+r+">"};Kt.prototype.toUpdate=function(r){switch(r.type||r.updateType){case"load":return"LOAD"+(r.source?" "+this.toEntity(r.source):"")+(r.destination?" INTO GRAPH "+this.toEntity(r.destination):"");case"insert":return"INSERT DATA "+this.group(r.insert,!0);case"delete":return"DELETE DATA "+this.group(r.delete,!0);case"deletewhere":return"DELETE WHERE "+this.group(r.delete,!0);case"insertdelete":return(r.graph?"WITH "+this.toEntity(r.graph)+this._newline:"")+(r.delete.length?"DELETE "+this.group(r.delete,!0)+this._newline:"")+(r.insert.length?"INSERT "+this.group(r.insert,!0)+this._newline:"")+(r.using?this.graphs("USING ",r.using.default):"")+(r.using?this.graphs("USING NAMED ",r.using.named):"")+"WHERE "+this.group(r.where,!0);case"add":case"copy":case"move":return r.type.toUpperCase()+" "+(r.silent?"SILENT ":"")+(r.source.default?"DEFAULT":this.toEntity(r.source.name))+" TO "+this.toEntity(r.destination.name);case"create":case"clear":case"drop":return r.type.toUpperCase()+(r.silent?" SILENT ":" ")+(r.graph.default?"DEFAULT":r.graph.named?"NAMED":r.graph.all?"ALL":"GRAPH "+this.toEntity(r.graph.name));default:throw new Error("Unknown update query type: "+r.type)}};Kt.prototype.indent=function(r){return r.replace(/^/gm,this._indent)};function _y(r){return"?"+r.value}a(_y,"variableToString");function Np(r){return typeof r=="string"}a(Np,"isString");function Ka(r){return typeof r.termType=="string"}a(Ka,"isTerm");function fl(r,e){if(!r||!Ka(r)||!e||!Ka(e)||r.termType!==e.termType)return!1;switch(r.termType){case"Literal":return r.value===e.value&&r.language===e.language&&fl(r.datatype,e.datatype);case"Quad":return fl(r.subject,e.subject)&&fl(r.predicate,e.predicate)&&fl(r.object,e.object)&&fl(r.graph,e.graph);default:return r.value===e.value}}a(fl,"equalTerms");function Di(r,e,t,n){return r.map(t,n).join(Np(e)?e:" ")}a(Di,"mapJoin");function OW(r={}){return{stringify:a(function(e){var t=Object.create(r);return t.prefixes=e.prefixes,new Kt(t).toQuery(e)},"stringify"),createGenerator:a(function(){return new Kt(r)},"createGenerator")}}a(OW,"_Generator");yF.exports={Generator:OW}});var Kv=v(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.BlankNode=void 0;var zv=class{static{a(this,"BlankNode")}constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&e.termType==="BlankNode"&&e.value===this.value}};by.BlankNode=zv});var Yv=v(Sy=>{"use strict";Object.defineProperty(Sy,"__esModule",{value:!0});Sy.DefaultGraph=void 0;var kp=class{static{a(this,"DefaultGraph")}constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&e.termType==="DefaultGraph"}};Sy.DefaultGraph=kp;kp.INSTANCE=new kp});var Ey=v(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0});wy.NamedNode=void 0;var Qv=class{static{a(this,"NamedNode")}constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&e.termType==="NamedNode"&&e.value===this.value}};wy.NamedNode=Qv});var Xv=v(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});vy.Literal=void 0;var bF=Ey(),Mp=class r{static{a(this,"Literal")}constructor(e,t){this.termType="Literal",this.value=e,typeof t=="string"?(this.language=t,this.datatype=r.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=r.XSD_STRING)}equals(e){return!!e&&e.termType==="Literal"&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}};vy.Literal=Mp;Mp.RDF_LANGUAGE_STRING=new bF.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");Mp.XSD_STRING=new bF.NamedNode("http://www.w3.org/2001/XMLSchema#string")});var Zv=v(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});Ty.Quad=void 0;var Jv=class{static{a(this,"Quad")}constructor(e,t,n,i){this.termType="Quad",this.value="",this.subject=e,this.predicate=t,this.object=n,this.graph=i}equals(e){return!!e&&(e.termType==="Quad"||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}};Ty.Quad=Jv});var t1=v(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.Variable=void 0;var e1=class{static{a(this,"Variable")}constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&e.termType==="Variable"&&e.value===this.value}};Ay.Variable=e1});var wF=v(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});Iy.DataFactory=void 0;var PW=Kv(),FW=Yv(),SF=Xv(),DW=Ey(),LW=Zv(),NW=t1(),kW=0,r1=class{static{a(this,"DataFactory")}constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${kW++}_`}namedNode(e){return new DW.NamedNode(e)}blankNode(e){return new PW.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new SF.Literal(e,t)}variable(e){return new NW.Variable(e)}defaultGraph(){return FW.DefaultGraph.INSTANCE}quad(e,t,n,i){return new LW.Quad(e,t,n,i||this.defaultGraph())}fromTerm(e){switch(e.termType){case"NamedNode":return this.namedNode(e.value);case"BlankNode":return this.blankNode(e.value);case"Literal":return e.language?this.literal(e.value,e.language):e.datatype.equals(SF.Literal.XSD_STRING)?this.literal(e.value):this.literal(e.value,this.fromTerm(e.datatype));case"Variable":return this.variable(e.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(e.subject),this.fromTerm(e.predicate),this.fromTerm(e.object),this.fromTerm(e.graph))}}fromQuad(e){return this.fromTerm(e)}resetBlankNodeCounter(){this.blankNodeCounter=0}};Iy.DataFactory=r1});var EF=v(Li=>{"use strict";var MW=Li&&Li.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),dl=Li&&Li.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&MW(e,r,t)};Object.defineProperty(Li,"__esModule",{value:!0});dl(Kv(),Li);dl(wF(),Li);dl(Yv(),Li);dl(Xv(),Li);dl(Ey(),Li);dl(Zv(),Li);dl(t1(),Li)});var TF=v((Twe,vF)=>{var{Parser:Wo}=hF(),{Generator:jW}=_F(),{Wildcard:$W}=Hv(),{DataFactory:UW}=EF();function BW({prefixes:r,baseIRI:e,factory:t,pathOnly:n,sparqlStar:i,skipValidation:s,skipUngroupedVariableCheck:o}={}){let c={};for(let u in r??{})c[u]=r[u];let l=new Wo;return l.parse=function(){return Wo.base=e||"",Wo.prefixes=Object.create(c),Wo.factory=t||new UW,Wo.sparqlStar=!!i,Wo.pathOnly=!!n,Wo.skipValidation=!!s||!!o,Wo.prototype.parse.apply(l,arguments)},l._resetBlanks=Wo._resetBlanks,l}a(BW,"_Parser");vF.exports={Parser:BW,Generator:jW,Wildcard:$W}});var i1=v(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.CaseWhenTransformerError=Fu.CaseWhenTransformer=void 0;var n1=class{static{a(this,"CaseWhenTransformer")}transform(e){let t=this.stripLineComments(e),n,i=0,s=100;do if(n=t,t=this.transformSinglePass(t),i++,i>s)throw new Ho("Too many nested CASE expressions (max 100 iterations)");while(t!==n);return t}stripLineComments(e){let t="",n=0;for(;n<e.length;){let i=e[n];if(i==="'"||i==='"'){let s=i;for(t+=i,n++;n<e.length&&e[n]!==s;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}t+=e[n],n++}n<e.length&&(t+=e[n],n++);continue}if(i==="<"){let s=e.indexOf(">",n),o=e.indexOf(`
43
43
  `,n);if(s!==-1&&(o===-1||s<o)){t+=e.substring(n,s+1),n=s+1;continue}}if(i==="#"){let s=e.indexOf(`
44
44
  `,n),o=s===-1?e.length:s;t+=" ".repeat(o-n),n=o;continue}t+=i,n++}return t}transformSinglePass(e){let t=this.findCasePositions(e);if(t.length===0)return e;let n=e;for(let i=t.length-1;i>=0;i--){let s=t[i],o=this.extractCaseExpression(n,s);if(o){let c=this.convertCaseToIf(o.content);n=n.substring(0,s)+c+n.substring(s+o.length)}}return n}findCasePositions(e){let t=[],n=e.toUpperCase(),i=0;for(;i<e.length;){if(e[i]==="'"||e[i]==='"'){let s=e[i];for(i++;i<e.length&&e[i]!==s;)e[i]==="\\"&&i++,i++;i++;continue}if(n.substring(i,i+4)==="CASE"&&this.isWordBoundary(e,i,4)){t.push(i),i+=4;continue}i++}return t}extractCaseExpression(e,t){let n=1,i=t+4,s=e.toUpperCase();for(;i<e.length&&n>0;){if(e[i]==="'"||e[i]==='"'){let o=e[i];for(i++;i<e.length&&e[i]!==o;)e[i]==="\\"&&i++,i++;i++;continue}if(s.substring(i,i+4)==="CASE"&&this.isWordBoundary(e,i,4)){n++,i+=4;continue}if(s.substring(i,i+3)==="END"&&this.isWordBoundary(e,i,3)){if(n--,n===0){let o=e.substring(t,i+3);return{content:o,length:o.length}}i+=3;continue}i++}if(n>0)throw new Ho(`Unclosed CASE expression at position ${t}`);return null}isWordBoundary(e,t,n){let i=t>0?e[t-1]:"",s=t===0||!/[a-zA-Z0-9_?$]/.test(i),o=t+n<e.length?e[t+n]:"",c=t+n>=e.length||!/[a-zA-Z0-9_]/.test(o);return s&&c}convertCaseToIf(e){let t=this.extractWhenClauses(e),n=this.extractElseClause(e);if(t.length===0)throw new Ho("CASE expression must have at least one WHEN clause");let i=n!==null?n:'""';for(let s=t.length-1;s>=0;s--){let{condition:o,result:c}=t[s];i=`IF(${o}, ${c}, ${i})`}return i}extractWhenClauses(e){let t=[],n=e.replace(/^\s*CASE\s+/i,"").replace(/\s*END\s*$/i,""),i=this.findKeywordPositions(n,"WHEN"),s=this.findKeywordPositions(n,"ELSE"),o=s.length>0?s[0]:n.length;for(let c=0;c<i.length;c++){let l=i[c]+4,u=c+1<i.length?i[c+1]:o,f=n.substring(l,u).trim(),d=this.parseWhenClause(f);d&&t.push(d)}return t}findKeywordPositions(e,t){let n=[],i=e.toUpperCase(),s=0,o=0;for(;s<e.length;){let c=e[s];if(c==="'"||c==='"'){let l=c;for(s++;s<e.length&&e[s]!==l;)e[s]==="\\"&&s++,s++;s++;continue}if(c==="("){o++,s++;continue}if(c===")"){o--,s++;continue}if(o===0&&i.substring(s,s+t.length)===t&&this.isWordBoundary(e,s,t.length)){n.push(s),s+=t.length;continue}s++}return n}parseWhenClause(e){let t=this.findKeywordPositions(e,"THEN");if(t.length===0)throw new Ho(`WHEN clause missing THEN keyword: ${e.substring(0,50)}...`);let n=t[0],i=e.substring(0,n).trim(),s=e.substring(n+4).trim();if(!i)throw new Ho("WHEN clause has empty condition");if(!s)throw new Ho("WHEN clause has empty result");return{condition:i,result:s}}extractElseClause(e){let t=e.replace(/^\s*CASE\s+/i,"").replace(/\s*END\s*$/i,""),n=this.findKeywordPositions(t,"ELSE");if(n.length>0){let i=n[0];return t.substring(i+4).trim()}return null}};Fu.CaseWhenTransformer=n1;var Ho=class extends Error{static{a(this,"CaseWhenTransformerError")}constructor(e){super(`CASE WHEN transformation error: ${e}`),this.name="CaseWhenTransformerError"}};Fu.CaseWhenTransformerError=Ho});var s1=v(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.LateralTransformerError=Du.LateralTransformer=void 0;var Ry=class r{static{a(this,"LateralTransformer")}transform(e){let t=e,n,i=0,s=100;do if(n=t,t=this.transformSinglePass(t),i++,i>s)throw new Ya("Too many nested LATERAL joins (max 100 iterations)");while(t!==n);return t}hasLateral(e){return this.findLateralPositions(e).length>0}static isLateralJoin(e){if(e.type==="group"&&e.patterns){for(let t of e.patterns)if(t.type==="query"&&t.queryType==="SELECT"&&t.variables&&Array.isArray(t.variables)){for(let n of t.variables)if(n.termType==="Variable"&&n.value===r.LATERAL_MARKER)return!0}}if(e.type==="query"&&e.queryType==="SELECT"&&e.variables&&Array.isArray(e.variables)){for(let t of e.variables)if(t.termType==="Variable"&&t.value===r.LATERAL_MARKER)return!0}return!1}transformSinglePass(e){let t=this.findLateralPositions(e);if(t.length===0)return e;let n=e;for(let i=t.length-1;i>=0;i--){let s=t[i],o=this.extractLateralExpression(n,s);if(o){let c=this.transformLateral(o.content);n=n.substring(0,s)+c+n.substring(s+o.length)}}return n}findLateralPositions(e){let t=[],n=e.toUpperCase(),i=0;for(;i<e.length;){if(e[i]==="'"||e[i]==='"'){let s=e[i];for(i++;i<e.length&&e[i]!==s;)e[i]==="\\"&&i++,i++;i++;continue}if(e[i]==="#"){for(;i<e.length&&e[i]!==`
45
45
  `;)i++;continue}if(n.substring(i,i+7)==="LATERAL"&&this.isWordBoundary(e,i,7)){t.push(i),i+=7;continue}i++}return t}extractLateralExpression(e,t){let n=t+7;for(;n<e.length&&/\s/.test(e[n]);)n++;if(e[n]!=="{")throw new Ya(`Expected '{' after LATERAL keyword at position ${t}`);let i=1;for(n++;n<e.length&&i>0;){if(e[n]==="'"||e[n]==='"'){let s=e[n];for(n++;n<e.length&&e[n]!==s;)e[n]==="\\"&&n++,n++;n++;continue}if(e[n]==="#"){for(;n<e.length&&e[n]!==`
@@ -324,7 +324,7 @@ To resolve:
324
324
  \u2022 Check service initialization parameters
325
325
  \u2022 Verify all required dependencies are available
326
326
  \u2022 Review service logs for detailed error information
327
- \u2022 Contact support if the issue persists`}};ib.ServiceError=mI});var gM=v(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.ServiceError=Pr.ResourceExhaustedError=Pr.NotFoundError=Pr.PermissionError=Pr.StateTransitionError=Pr.NetworkError=Pr.ValidationError=Pr.ApplicationError=Pr.ErrorCode=void 0;var lre=ho();Object.defineProperty(Pr,"ErrorCode",{enumerable:!0,get:a(function(){return lre.ErrorCode},"get")});var ure=mo();Object.defineProperty(Pr,"ApplicationError",{enumerable:!0,get:a(function(){return ure.ApplicationError},"get")});var fre=lM();Object.defineProperty(Pr,"ValidationError",{enumerable:!0,get:a(function(){return fre.ValidationError},"get")});var dre=uM();Object.defineProperty(Pr,"NetworkError",{enumerable:!0,get:a(function(){return dre.NetworkError},"get")});var pre=fM();Object.defineProperty(Pr,"StateTransitionError",{enumerable:!0,get:a(function(){return pre.StateTransitionError},"get")});var hre=dM();Object.defineProperty(Pr,"PermissionError",{enumerable:!0,get:a(function(){return hre.PermissionError},"get")});var mre=pM();Object.defineProperty(Pr,"NotFoundError",{enumerable:!0,get:a(function(){return mre.NotFoundError},"get")});var gre=hM();Object.defineProperty(Pr,"ResourceExhaustedError",{enumerable:!0,get:a(function(){return gre.ResourceExhaustedError},"get")});var yre=mM();Object.defineProperty(Pr,"ServiceError",{enumerable:!0,get:a(function(){return yre.ServiceError},"get")})});var yI=v(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});sb.ShapeRegistry=void 0;var gI=class{static{a(this,"ShapeRegistry")}constructor(){this.shapes=new Map}get(e){return this.shapes.get(e)}register(e){this.shapes.set(e.propertyIRI,e)}getAll(){return Array.from(this.shapes.values())}get size(){return this.shapes.size}};sb.ShapeRegistry=gI});var yM=v(go=>{"use strict";var _re=go&&go.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),bre=go&&go.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),_I=go&&go.__importStar||(function(){var r=a(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[n.length]=i);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),i=0;i<n.length;i++)n[i]!=="default"&&_re(t,e,n[i]);return bre(t,e),t}})();Object.defineProperty(go,"__esModule",{value:!0});go.ShapeLoader=void 0;var bI=yI(),uc=Le(),Vf=Ye(),Xr=Yt(),ob="http://www.w3.org/ns/shacl#",Sre="http://www.w3.org/2001/XMLSchema#",QAe=[["exo__",Xr.Namespace.EXO],["ems__",Xr.Namespace.EMS],["exocmd__",Xr.Namespace.EXOCMD],["ims__",Xr.Namespace.IMS],["ztlk__",Xr.Namespace.ZTLK],["ptms__",Xr.Namespace.PTMS],["lit__",Xr.Namespace.LIT],["inbox__",Xr.Namespace.INBOX],["pmbok__",Xr.Namespace.PMBOK]],Gf=class r{static{a(this,"ShapeLoader")}static async loadFromVaultFS(e){let{readdir:t,readFile:n}=await Promise.resolve().then(()=>_I(require("fs/promises"))),i=await Promise.resolve().then(()=>_I(require("path"))),s=new bI.ShapeRegistry;return await r.scanDir(e,s,{readdir:t,readFile:n,path:i}),s}static async loadFromRDFGraph(e){let t=new bI.ShapeRegistry,n=Xr.Namespace.EXO,i=Xr.Namespace.RDFS,s=Xr.Namespace.RDF,o=await r.buildUidClassIndex(e),[c,l]=await Promise.all([e.match(void 0,s.term("type"),n.term("ObjectProperty")),e.match(void 0,s.term("type"),n.term("Property"))]),u=new Set;for(let f of[...c,...l])f.subject instanceof uc.IRI&&u.add(f.subject.value);for(let f of u){let d;try{d=new uc.IRI(f)}catch{continue}let[p,h,m,y,_,b,T,I,E]=await Promise.all([e.match(d,i.term("domain"),void 0),e.match(d,n.term("Property_domain"),void 0),e.match(d,i.term("range"),void 0),e.match(d,n.term("Property_range"),void 0),e.match(d,n.term("Property_cardinality"),void 0),e.match(d,n.term("Property_severity"),void 0),e.match(d,n.term("Asset_label"),void 0),e.match(d,i.term("label"),void 0),e.match(d,n.term("Property_minCount"),void 0)]),S=[...T,...I],R=[...p,...h],D=[...m,...y];if(R.length===0)continue;let P=null;for(let q of S)if(q.object instanceof Vf.Literal&&(P=r.labelToIRI(q.object.value),P))break;if(!P)continue;let M=await Promise.all(R.map(async q=>q.object instanceof uc.IRI?await r.resolveClassIRI(q.object.value,e,o):null)),O=Array.from(new Set(M.filter(q=>q!==null))),L=await Promise.all(D.map(async q=>{if(q.object instanceof uc.IRI)return await r.resolveClassIRI(q.object.value,e,o);if(q.object instanceof Vf.Literal){let W=q.object.value;if(W.startsWith("http://")||W.startsWith("https://"))return W}return null})),te=Array.from(new Set(L.filter(q=>q!==null))),re=r.cardinalityFromIRI(_[0]?.object instanceof uc.IRI?_[0].object.value:void 0),V=r.severityFromValue(b[0]?.object instanceof Vf.Literal||b[0]?.object instanceof uc.IRI?b[0].object.value:void 0),K=E[0]?.object,Se=K instanceof Vf.Literal?parseInt(K.value,10):NaN,ce=isNaN(Se)?void 0:Se;t.register({propertyIRI:P,domain:O,range:te.length>0?te:void 0,cardinality:re,severity:V,minCount:ce})}return t}static async loadFromShapeJSON(e){let{readFile:t}=await Promise.resolve().then(()=>_I(require("fs/promises"))),n=await t(e,"utf-8"),i=JSON.parse(n),s=new bI.ShapeRegistry;for(let o of Object.values(i.shapes))s.register(o);return s}static extractUidFromFileIRI(e){let t=r.FILE_IRI_UID_RE.exec(e);return t?t[1].toLowerCase():null}static async buildUidClassIndex(e){let t=Xr.Namespace.RDFS,n=Xr.Namespace.EXO,[i,s]=await Promise.all([e.match(void 0,t.term("label"),void 0),e.match(void 0,n.term("Asset_label"),void 0)]),o=new Map;for(let c of[...i,...s]){if(!(c.subject instanceof uc.IRI)||!(c.object instanceof Vf.Literal))continue;let l=r.extractUidFromFileIRI(c.subject.value);if(!l||o.has(l))continue;let u=c.object.value.trim();if(/\s/.test(u))continue;let f=r.labelToIRI(u);f&&o.set(l,f)}return o}static async resolveClassIRI(e,t,n){if(e.startsWith("https://exocortex.my/ontology/")||e.startsWith("http://www.w3.org/"))return e;let i;try{i=new uc.IRI(e)}catch{return null}let s=Xr.Namespace.RDFS,o=Xr.Namespace.EXO,[c,l]=await Promise.all([t.match(i,s.term("label"),void 0),t.match(i,o.term("Asset_label"),void 0)]);for(let u of[...c,...l])if(u.object instanceof Vf.Literal){let f=r.labelToIRI(u.object.value);if(f)return f}if(n){let u=r.extractUidFromFileIRI(e);if(u){let f=n.get(u);if(f)return f}}return e}static async scanDir(e,t,n){let i;try{i=await n.readdir(e,{withFileTypes:!0})}catch{return}for(let s of i){let o=n.path.join(e,s.name);if(s.isDirectory())await r.scanDir(o,t,n);else if(s.isFile()&&s.name.endsWith(".md"))try{await r.processFile(o,t,n.readFile,n.path)}catch{}}}static async processFile(e,t,n,i){let s;try{s=await n(e,"utf-8")}catch{return}let o=r.parseFrontmatter(s);if(!o)return;let c="38277bfa-d7f9-4a75-b856-b23276ab0db3",l="9a1cf31c-9d41-4ef3-9023-584a8d087d16";if(!r.asArray(o.exo__Instance_class).some(M=>{let O=r.extractWikilinkRef(M);return O==="exo__Property"||O==="exo__ObjectProperty"||O===c||O===l||O?.includes("|exo__Property")||O?.includes("|exo__ObjectProperty")}))return;let d=null,p=o.exo__Asset_label;if(typeof p=="string"&&p.trim().length>0)d=p.trim();else if(i){let M=i.basename(e,".md");Xr.Namespace.fromPropertyKey(M)&&(d=M)}if(!d)return;let h=r.labelToIRI(d);if(!h)return;let m=o.exo__Property_domain,y=o.exo__Property_range,_=o.exo__Property_cardinality,b=o.exo__Property_severity,T=o.exo__Property_minCount,I=r.asArray(m).map(M=>r.wikilinkToIRI(M)).filter(M=>M!==null);if(I.length===0)return;let E=r.asArray(y).map(M=>r.wikilinkToIRI(M)).filter(M=>M!==null),S=r.cardinalityFromLabel(typeof _=="string"?_:void 0),R=r.severityFromValue(typeof b=="string"?b:void 0),D=typeof T=="string"?parseInt(T,10):void 0,P=D!==void 0&&!isNaN(D)?D:void 0;t.register({propertyIRI:h,domain:I,range:E.length>0?E:void 0,cardinality:S,severity:R,minCount:P})}static parseFrontmatter(e){let t=/^---\r?\n([\s\S]*?)\r?\n---/.exec(e);if(!t)return null;let n=t[1],i={},s=n.split(/\r?\n/),o=null,c=null;for(let l of s){let u=/^ {2}- (.*)$/.exec(l);if(u){o&&c&&c.push(u[1].trim());continue}o&&c&&(i[o]=c,o=null,c=null);let f=/^([^:]+):\s*(.*)$/.exec(l);if(!f)continue;let d=f[1].trim(),p=f[2].trim();p===""?(o=d,c=[]):i[d]=p}return o&&c&&(i[o]=c),i}static labelToIRI(e){let t=Xr.Namespace.fromPropertyKey(e);if(!t)return null;try{return t.namespace.term(t.localName).value}catch{return null}}static extractWikilinkRef(e){let t=e.replace(/^["']|["']$/g,""),n=/\[\[([^\]]+)\]\]/.exec(t);return n?n[1]:t}static wikilinkToIRI(e){let t=r.extractWikilinkRef(e);if(!t)return null;let n=t.split("|"),i=n.length>1?[n[1],n[0]]:[n[0]];for(let s of i){let o=r.labelToIRI(s.trim());if(o)return o}return t.startsWith("http")?t:t.startsWith("sh:")?ob+t.substring(3):t.startsWith("xsd:")?Sre+t.substring(4):null}static asArray(e){return Array.isArray(e)?e.map(String):typeof e=="string"?[e]:[]}static cardinalityFromIRI(e){if(e){if(e.endsWith("PropertyCardinalitySingle"))return"Single";if(e.endsWith("PropertyCardinalityMultiple"))return"Multiple";if(e.includes(r.CARDINALITY_SINGLE_UID))return"Single";if(e.includes(r.CARDINALITY_MULTIPLE_UID))return"Multiple"}}static cardinalityFromLabel(e){if(!e)return;let t=r.extractWikilinkRef(e)??e,n=t.split("|").pop()??t;if(n.includes("Single"))return"Single";if(n.includes("Multiple"))return"Multiple";if(t.includes(r.CARDINALITY_SINGLE_UID))return"Single";if(t.includes(r.CARDINALITY_MULTIPLE_UID))return"Multiple"}static severityFromValue(e){return!e||e.includes("Violation")||e===ob+"Violation"?"sh:Violation":e.includes("Warning")||e===ob+"Warning"?"sh:Warning":e.includes("Info")||e===ob+"Info"?"sh:Info":"sh:Violation"}};go.ShapeLoader=Gf;Gf.FILE_IRI_UID_RE=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i;Gf.CARDINALITY_SINGLE_UID="c93c4b2f-b43d-4cc9-8dd0-31514d608da2";Gf.CARDINALITY_MULTIPLE_UID="59a37aa7-ffbe-4e0d-ba60-06ae370d880f"});var EI=v(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.ShapeRegistry=void 0;qf.extractUidFromIRI=wI;qf.validate=Rre;var SI=class{static{a(this,"ShapeRegistry")}constructor(e=[],t="https://exocortex.my/ontology/exo#Instance_class"){this.shapeMap=new Map(e.map(n=>[n.propertyIRI,n])),this.typePredicateIRI=t}getShape(e){return this.shapeMap.get(e)}getAllShapes(){return Array.from(this.shapeMap.values())}hasShape(e){return this.shapeMap.has(e)}};qf.ShapeRegistry=SI;var wre="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",Ere=["http://www.w3.org/2001/XMLSchema#","http://www.w3.org/1999/02/22-rdf-syntax-ns#","http://www.w3.org/2000/01/rdf-schema#","http://www.w3.org/2002/07/owl#","http://www.w3.org/ns/shacl#","http://www.w3.org/2004/02/skos/core#","http://purl.org/dc/elements/1.1/","http://purl.org/dc/terms/","http://xmlns.com/foaf/0.1/","https://schema.org/","https://exocortex.my/ontology/xsd#","https://exocortex.my/ontology/rdf#","https://exocortex.my/ontology/rdfs#","https://exocortex.my/ontology/owl#","https://exocortex.my/ontology/skos#"];function vre(r){return Ere.some(e=>r.startsWith(e))}a(vre,"isExternalOntologyIRI");var Tre=["http://www.w3.org/2001/XMLSchema#","https://exocortex.my/ontology/xsd#"];function Are(r){return Tre.some(e=>r.startsWith(e))}a(Are,"isXSDDatatypeIRI");var Ire=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i;function wI(r){let e=Ire.exec(r);return e?e[1].toLowerCase():null}a(wI,"extractUidFromIRI");function Rre(r,e,t,n){let i=new Map,s=new Map;for(let l of r){let{subject:u,predicate:f,object:d}=l;if(u.type!=="iri"||f.type!=="iri"||d.type!=="iri"&&d.type!=="literal")continue;let p=u.value,h=f.value,m=d;if(h===e.typePredicateIRI||h===wre){if(m.type==="iri"){let _=i.get(p)??[];_.push(m.value),i.set(p,_);let b=wI(p);if(b){let T=`uid:${b}`,I=i.get(T)??[];I.push(m.value),i.set(T,I)}}}else{let _=s.get(p);_||(_=new Map,s.set(p,_));let b=_.get(h)??[];b.push(m),_.set(h,b)}}let o=[],c=new Set([...i.keys(),...s.keys()]);for(let l of c){if(l.startsWith("uid:"))continue;let u=i.get(l)??[],f=s.get(l)??new Map;for(let d of e.getAllShapes()){if(!(d.domain.length===0||d.domain.some(m=>u.some(y=>y===m||t.isSubClassOf(y,m)))))continue;let h=f.get(d.propertyIRI)??[];if(d.minCount!==void 0&&d.minCount>0&&h.length<d.minCount){o.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,constraint:"minCount",message:d.message??`sh:minCount violation: expected at least ${d.minCount} value(s) for <${d.propertyIRI}>`});continue}if(h.length!==0){if(d.cardinality==="Single"&&h.length>1){o.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,constraint:"maxCount",message:d.message??`sh:maxCount violation: expected at most 1 value for <${d.propertyIRI}>, got ${h.length}`});continue}if(d.range&&d.range.length>0){for(let m of h)if(m.type==="iri"){if(vre(m.value))continue;let y=i.get(m.value)??[];if(y.length===0){let b=wI(m.value);b&&(y=i.get(`uid:${b}`)??[])}if(!d.range.some(b=>y.some(T=>T===b||t.isSubClassOf(T,b)))){let b=y.length===0;o.push({focusNode:l,propertyPath:d.propertyIRI,severity:b?"sh:Warning":d.severity,constraint:"class",message:b?`sh:class unresolvable-ref: <${m.value}> has no resolvable type in this vault (cross-vault, symbolic, or external reference); not validated against ${d.range.join(" | ")}`:d.message??`sh:class violation: <${m.value}> does not conform to expected class ${d.range.join(" | ")}`,actualValue:m.value,expectedRange:d.range.join(" | ")})}}else if(m.type==="literal"){let y=d.range.filter(T=>Are(T));if(y.length===0)continue;let _=m.datatype??"http://www.w3.org/2001/XMLSchema#string";y.some(T=>T===_)||o.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,constraint:"datatype",message:d.message??`sh:datatype violation: literal "${m.value}" has datatype <${_}>, expected ${y.join(" | ")}`,actualValue:m.value,expectedRange:y.join(" | ")})}}}}}if(n?.closedWorldMode)for(let l of c){let u=s.get(l)??new Map;for(let f of u.keys())e.hasShape(f)||o.push({focusNode:l,propertyPath:f,severity:"sh:Warning",constraint:"unknown-property",message:`Unknown property: <${f}> has no registered shape`})}return o.sort((l,u)=>{let f=l.focusNode.localeCompare(u.focusNode);return f!==0?f:l.propertyPath.localeCompare(u.propertyPath)}),{conforms:!o.some(l=>l.severity==="sh:Violation"),violations:o}}a(Rre,"validate")});var _M=v(ab=>{"use strict";Object.defineProperty(ab,"__esModule",{value:!0});ab.ApplicationErrorHandler=void 0;var vI=mo(),Cre=ho(),xre=Al(),TI=class{static{a(this,"ApplicationErrorHandler")}constructor(e={},t,n){this.logger=t,this.notifier=n,this.telemetryHooks=new Set,this.retryConfig={maxRetries:e.maxRetries??3,initialDelayMs:e.initialDelayMs??1e3,backoffMultiplier:e.backoffMultiplier??2,maxDelayMs:e.maxDelayMs??1e4}}handle(e,t){let n=this.ensureApplicationError(e,t);return this.notifier&&this.notifier.error(n.message),this.callTelemetryHooks("onError",n,t),this.formatError(n)}async executeWithRetry(e,t){let n,i=0;for(;i<=this.retryConfig.maxRetries;)try{return await e()}catch(s){if(n=this.ensureApplicationError(s,t),!n.retriable||i>=this.retryConfig.maxRetries)throw this.callTelemetryHooks("onError",n,t),i>=this.retryConfig.maxRetries&&n.retriable&&this.callTelemetryHooks("onRetryExhausted",n,i+1),n;let o=this.calculateDelay(i);this.callTelemetryHooks("onRetry",n,i+1,o),this.logger?.debug(`Retrying after ${o}ms (attempt ${i+1}/${this.retryConfig.maxRetries})`),await this.sleep(o),i++}throw n}registerTelemetryHook(e){this.telemetryHooks.add(e)}unregisterTelemetryHook(e){this.telemetryHooks.delete(e)}ensureApplicationError(e,t){if(e instanceof vI.ApplicationError){if(t){let i=e,s={...e.context,...t};return new class extends vI.ApplicationError{constructor(){super(...arguments),this.code=i.code,this.retriable=i.retriable,this.guidance=i.guidance}}(e.message,s)}return e}return new class extends vI.ApplicationError{static{a(this,"UnknownError")}constructor(s,o){super(s,{originalError:o.name,...t}),this.code=Cre.ErrorCode.UNKNOWN_ERROR,this.retriable=!1,this.guidance="An unexpected error occurred"}}(e.message,e)}formatError(e){let t=[];return t.push(`\u274C ${e.name}: ${e.message}`),e.guidance&&t.push(`\u{1F4A1} ${e.guidance}`),e.context&&Object.keys(e.context).length>0&&t.push(`Context: ${JSON.stringify(e.context,null,2)}`),t.join(`
327
+ \u2022 Contact support if the issue persists`}};ib.ServiceError=mI});var gM=v(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.ServiceError=Pr.ResourceExhaustedError=Pr.NotFoundError=Pr.PermissionError=Pr.StateTransitionError=Pr.NetworkError=Pr.ValidationError=Pr.ApplicationError=Pr.ErrorCode=void 0;var lre=ho();Object.defineProperty(Pr,"ErrorCode",{enumerable:!0,get:a(function(){return lre.ErrorCode},"get")});var ure=mo();Object.defineProperty(Pr,"ApplicationError",{enumerable:!0,get:a(function(){return ure.ApplicationError},"get")});var fre=lM();Object.defineProperty(Pr,"ValidationError",{enumerable:!0,get:a(function(){return fre.ValidationError},"get")});var dre=uM();Object.defineProperty(Pr,"NetworkError",{enumerable:!0,get:a(function(){return dre.NetworkError},"get")});var pre=fM();Object.defineProperty(Pr,"StateTransitionError",{enumerable:!0,get:a(function(){return pre.StateTransitionError},"get")});var hre=dM();Object.defineProperty(Pr,"PermissionError",{enumerable:!0,get:a(function(){return hre.PermissionError},"get")});var mre=pM();Object.defineProperty(Pr,"NotFoundError",{enumerable:!0,get:a(function(){return mre.NotFoundError},"get")});var gre=hM();Object.defineProperty(Pr,"ResourceExhaustedError",{enumerable:!0,get:a(function(){return gre.ResourceExhaustedError},"get")});var yre=mM();Object.defineProperty(Pr,"ServiceError",{enumerable:!0,get:a(function(){return yre.ServiceError},"get")})});var yI=v(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});sb.ShapeRegistry=void 0;var gI=class{static{a(this,"ShapeRegistry")}constructor(){this.shapes=new Map}get(e){return this.shapes.get(e)}register(e){this.shapes.set(e.propertyIRI,e)}getAll(){return Array.from(this.shapes.values())}get size(){return this.shapes.size}};sb.ShapeRegistry=gI});var yM=v(go=>{"use strict";var _re=go&&go.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),bre=go&&go.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),_I=go&&go.__importStar||(function(){var r=a(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[n.length]=i);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),i=0;i<n.length;i++)n[i]!=="default"&&_re(t,e,n[i]);return bre(t,e),t}})();Object.defineProperty(go,"__esModule",{value:!0});go.ShapeLoader=void 0;var bI=yI(),uc=Le(),Vf=Ye(),Xr=Yt(),ob="http://www.w3.org/ns/shacl#",Sre="http://www.w3.org/2001/XMLSchema#",XAe=[["exo__",Xr.Namespace.EXO],["ems__",Xr.Namespace.EMS],["exocmd__",Xr.Namespace.EXOCMD],["ims__",Xr.Namespace.IMS],["ztlk__",Xr.Namespace.ZTLK],["ptms__",Xr.Namespace.PTMS],["lit__",Xr.Namespace.LIT],["inbox__",Xr.Namespace.INBOX],["pmbok__",Xr.Namespace.PMBOK]],Gf=class r{static{a(this,"ShapeLoader")}static async loadFromVaultFS(e){let{readdir:t,readFile:n}=await Promise.resolve().then(()=>_I(require("fs/promises"))),i=await Promise.resolve().then(()=>_I(require("path"))),s=new bI.ShapeRegistry;return await r.scanDir(e,s,{readdir:t,readFile:n,path:i}),s}static async loadFromRDFGraph(e){let t=new bI.ShapeRegistry,n=Xr.Namespace.EXO,i=Xr.Namespace.RDFS,s=Xr.Namespace.RDF,o=await r.buildUidClassIndex(e),[c,l]=await Promise.all([e.match(void 0,s.term("type"),n.term("ObjectProperty")),e.match(void 0,s.term("type"),n.term("Property"))]),u=new Set;for(let f of[...c,...l])f.subject instanceof uc.IRI&&u.add(f.subject.value);for(let f of u){let d;try{d=new uc.IRI(f)}catch{continue}let[p,h,m,y,_,b,T,I,E]=await Promise.all([e.match(d,i.term("domain"),void 0),e.match(d,n.term("Property_domain"),void 0),e.match(d,i.term("range"),void 0),e.match(d,n.term("Property_range"),void 0),e.match(d,n.term("Property_cardinality"),void 0),e.match(d,n.term("Property_severity"),void 0),e.match(d,n.term("Asset_label"),void 0),e.match(d,i.term("label"),void 0),e.match(d,n.term("Property_minCount"),void 0)]),S=[...T,...I],R=[...p,...h],D=[...m,...y];if(R.length===0)continue;let P=null;for(let q of S)if(q.object instanceof Vf.Literal&&(P=r.labelToIRI(q.object.value),P))break;if(!P)continue;let M=await Promise.all(R.map(async q=>q.object instanceof uc.IRI?await r.resolveClassIRI(q.object.value,e,o):null)),O=Array.from(new Set(M.filter(q=>q!==null))),L=await Promise.all(D.map(async q=>{if(q.object instanceof uc.IRI)return await r.resolveClassIRI(q.object.value,e,o);if(q.object instanceof Vf.Literal){let W=q.object.value;if(W.startsWith("http://")||W.startsWith("https://"))return W}return null})),te=Array.from(new Set(L.filter(q=>q!==null))),re=r.cardinalityFromIRI(_[0]?.object instanceof uc.IRI?_[0].object.value:void 0),V=r.severityFromValue(b[0]?.object instanceof Vf.Literal||b[0]?.object instanceof uc.IRI?b[0].object.value:void 0),K=E[0]?.object,Se=K instanceof Vf.Literal?parseInt(K.value,10):NaN,ce=isNaN(Se)?void 0:Se;t.register({propertyIRI:P,domain:O,range:te.length>0?te:void 0,cardinality:re,severity:V,minCount:ce})}return t}static async loadFromShapeJSON(e){let{readFile:t}=await Promise.resolve().then(()=>_I(require("fs/promises"))),n=await t(e,"utf-8"),i=JSON.parse(n),s=new bI.ShapeRegistry;for(let o of Object.values(i.shapes))s.register(o);return s}static extractUidFromFileIRI(e){let t=r.FILE_IRI_UID_RE.exec(e);return t?t[1].toLowerCase():null}static async buildUidClassIndex(e){let t=Xr.Namespace.RDFS,n=Xr.Namespace.EXO,[i,s]=await Promise.all([e.match(void 0,t.term("label"),void 0),e.match(void 0,n.term("Asset_label"),void 0)]),o=new Map;for(let c of[...i,...s]){if(!(c.subject instanceof uc.IRI)||!(c.object instanceof Vf.Literal))continue;let l=r.extractUidFromFileIRI(c.subject.value);if(!l||o.has(l))continue;let u=c.object.value.trim();if(/\s/.test(u))continue;let f=r.labelToIRI(u);f&&o.set(l,f)}return o}static async resolveClassIRI(e,t,n){if(e.startsWith("https://exocortex.my/ontology/")||e.startsWith("http://www.w3.org/"))return e;let i;try{i=new uc.IRI(e)}catch{return null}let s=Xr.Namespace.RDFS,o=Xr.Namespace.EXO,[c,l]=await Promise.all([t.match(i,s.term("label"),void 0),t.match(i,o.term("Asset_label"),void 0)]);for(let u of[...c,...l])if(u.object instanceof Vf.Literal){let f=r.labelToIRI(u.object.value);if(f)return f}if(n){let u=r.extractUidFromFileIRI(e);if(u){let f=n.get(u);if(f)return f}}return e}static async scanDir(e,t,n){let i;try{i=await n.readdir(e,{withFileTypes:!0})}catch{return}for(let s of i){let o=n.path.join(e,s.name);if(s.isDirectory())await r.scanDir(o,t,n);else if(s.isFile()&&s.name.endsWith(".md"))try{await r.processFile(o,t,n.readFile,n.path)}catch{}}}static async processFile(e,t,n,i){let s;try{s=await n(e,"utf-8")}catch{return}let o=r.parseFrontmatter(s);if(!o)return;let c="38277bfa-d7f9-4a75-b856-b23276ab0db3",l="9a1cf31c-9d41-4ef3-9023-584a8d087d16";if(!r.asArray(o.exo__Instance_class).some(M=>{let O=r.extractWikilinkRef(M);return O==="exo__Property"||O==="exo__ObjectProperty"||O===c||O===l||O?.includes("|exo__Property")||O?.includes("|exo__ObjectProperty")}))return;let d=null,p=o.exo__Asset_label;if(typeof p=="string"&&p.trim().length>0)d=p.trim();else if(i){let M=i.basename(e,".md");Xr.Namespace.fromPropertyKey(M)&&(d=M)}if(!d)return;let h=r.labelToIRI(d);if(!h)return;let m=o.exo__Property_domain,y=o.exo__Property_range,_=o.exo__Property_cardinality,b=o.exo__Property_severity,T=o.exo__Property_minCount,I=r.asArray(m).map(M=>r.wikilinkToIRI(M)).filter(M=>M!==null);if(I.length===0)return;let E=r.asArray(y).map(M=>r.wikilinkToIRI(M)).filter(M=>M!==null),S=r.cardinalityFromLabel(typeof _=="string"?_:void 0),R=r.severityFromValue(typeof b=="string"?b:void 0),D=typeof T=="string"?parseInt(T,10):void 0,P=D!==void 0&&!isNaN(D)?D:void 0;t.register({propertyIRI:h,domain:I,range:E.length>0?E:void 0,cardinality:S,severity:R,minCount:P})}static parseFrontmatter(e){let t=/^---\r?\n([\s\S]*?)\r?\n---/.exec(e);if(!t)return null;let n=t[1],i={},s=n.split(/\r?\n/),o=null,c=null;for(let l of s){let u=/^ {2}- (.*)$/.exec(l);if(u){o&&c&&c.push(u[1].trim());continue}o&&c&&(i[o]=c,o=null,c=null);let f=/^([^:]+):\s*(.*)$/.exec(l);if(!f)continue;let d=f[1].trim(),p=f[2].trim();p===""?(o=d,c=[]):i[d]=p}return o&&c&&(i[o]=c),i}static labelToIRI(e){let t=Xr.Namespace.fromPropertyKey(e);if(!t)return null;try{return t.namespace.term(t.localName).value}catch{return null}}static extractWikilinkRef(e){let t=e.replace(/^["']|["']$/g,""),n=/\[\[([^\]]+)\]\]/.exec(t);return n?n[1]:t}static wikilinkToIRI(e){let t=r.extractWikilinkRef(e);if(!t)return null;let n=t.split("|"),i=n.length>1?[n[1],n[0]]:[n[0]];for(let s of i){let o=r.labelToIRI(s.trim());if(o)return o}return t.startsWith("http")?t:t.startsWith("sh:")?ob+t.substring(3):t.startsWith("xsd:")?Sre+t.substring(4):null}static asArray(e){return Array.isArray(e)?e.map(String):typeof e=="string"?[e]:[]}static cardinalityFromIRI(e){if(e){if(e.endsWith("PropertyCardinalitySingle"))return"Single";if(e.endsWith("PropertyCardinalityMultiple"))return"Multiple";if(e.includes(r.CARDINALITY_SINGLE_UID))return"Single";if(e.includes(r.CARDINALITY_MULTIPLE_UID))return"Multiple"}}static cardinalityFromLabel(e){if(!e)return;let t=r.extractWikilinkRef(e)??e,n=t.split("|").pop()??t;if(n.includes("Single"))return"Single";if(n.includes("Multiple"))return"Multiple";if(t.includes(r.CARDINALITY_SINGLE_UID))return"Single";if(t.includes(r.CARDINALITY_MULTIPLE_UID))return"Multiple"}static severityFromValue(e){return!e||e.includes("Violation")||e===ob+"Violation"?"sh:Violation":e.includes("Warning")||e===ob+"Warning"?"sh:Warning":e.includes("Info")||e===ob+"Info"?"sh:Info":"sh:Violation"}};go.ShapeLoader=Gf;Gf.FILE_IRI_UID_RE=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i;Gf.CARDINALITY_SINGLE_UID="c93c4b2f-b43d-4cc9-8dd0-31514d608da2";Gf.CARDINALITY_MULTIPLE_UID="59a37aa7-ffbe-4e0d-ba60-06ae370d880f"});var EI=v(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.ShapeRegistry=void 0;qf.extractUidFromIRI=wI;qf.validate=Rre;var SI=class{static{a(this,"ShapeRegistry")}constructor(e=[],t="https://exocortex.my/ontology/exo#Instance_class"){this.shapeMap=new Map(e.map(n=>[n.propertyIRI,n])),this.typePredicateIRI=t}getShape(e){return this.shapeMap.get(e)}getAllShapes(){return Array.from(this.shapeMap.values())}hasShape(e){return this.shapeMap.has(e)}};qf.ShapeRegistry=SI;var wre="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",Ere=["http://www.w3.org/2001/XMLSchema#","http://www.w3.org/1999/02/22-rdf-syntax-ns#","http://www.w3.org/2000/01/rdf-schema#","http://www.w3.org/2002/07/owl#","http://www.w3.org/ns/shacl#","http://www.w3.org/2004/02/skos/core#","http://purl.org/dc/elements/1.1/","http://purl.org/dc/terms/","http://xmlns.com/foaf/0.1/","https://schema.org/","https://exocortex.my/ontology/xsd#","https://exocortex.my/ontology/rdf#","https://exocortex.my/ontology/rdfs#","https://exocortex.my/ontology/owl#","https://exocortex.my/ontology/skos#"];function vre(r){return Ere.some(e=>r.startsWith(e))}a(vre,"isExternalOntologyIRI");var Tre=["http://www.w3.org/2001/XMLSchema#","https://exocortex.my/ontology/xsd#"];function Are(r){return Tre.some(e=>r.startsWith(e))}a(Are,"isXSDDatatypeIRI");var Ire=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i;function wI(r){let e=Ire.exec(r);return e?e[1].toLowerCase():null}a(wI,"extractUidFromIRI");function Rre(r,e,t,n){let i=new Map,s=new Map;for(let l of r){let{subject:u,predicate:f,object:d}=l;if(u.type!=="iri"||f.type!=="iri"||d.type!=="iri"&&d.type!=="literal")continue;let p=u.value,h=f.value,m=d;if(h===e.typePredicateIRI||h===wre){if(m.type==="iri"){let _=i.get(p)??[];_.push(m.value),i.set(p,_);let b=wI(p);if(b){let T=`uid:${b}`,I=i.get(T)??[];I.push(m.value),i.set(T,I)}}}else{let _=s.get(p);_||(_=new Map,s.set(p,_));let b=_.get(h)??[];b.push(m),_.set(h,b)}}let o=[],c=new Set([...i.keys(),...s.keys()]);for(let l of c){if(l.startsWith("uid:"))continue;let u=i.get(l)??[],f=s.get(l)??new Map;for(let d of e.getAllShapes()){if(!(d.domain.length===0||d.domain.some(m=>u.some(y=>y===m||t.isSubClassOf(y,m)))))continue;let h=f.get(d.propertyIRI)??[];if(d.minCount!==void 0&&d.minCount>0&&h.length<d.minCount){o.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,constraint:"minCount",message:d.message??`sh:minCount violation: expected at least ${d.minCount} value(s) for <${d.propertyIRI}>`});continue}if(h.length!==0){if(d.cardinality==="Single"&&h.length>1){o.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,constraint:"maxCount",message:d.message??`sh:maxCount violation: expected at most 1 value for <${d.propertyIRI}>, got ${h.length}`});continue}if(d.range&&d.range.length>0){for(let m of h)if(m.type==="iri"){if(vre(m.value))continue;let y=i.get(m.value)??[];if(y.length===0){let b=wI(m.value);b&&(y=i.get(`uid:${b}`)??[])}if(!d.range.some(b=>y.some(T=>T===b||t.isSubClassOf(T,b)))){let b=y.length===0;o.push({focusNode:l,propertyPath:d.propertyIRI,severity:b?"sh:Warning":d.severity,constraint:"class",message:b?`sh:class unresolvable-ref: <${m.value}> has no resolvable type in this vault (cross-vault, symbolic, or external reference); not validated against ${d.range.join(" | ")}`:d.message??`sh:class violation: <${m.value}> does not conform to expected class ${d.range.join(" | ")}`,actualValue:m.value,expectedRange:d.range.join(" | ")})}}else if(m.type==="literal"){let y=d.range.filter(T=>Are(T));if(y.length===0)continue;let _=m.datatype??"http://www.w3.org/2001/XMLSchema#string";y.some(T=>T===_)||o.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,constraint:"datatype",message:d.message??`sh:datatype violation: literal "${m.value}" has datatype <${_}>, expected ${y.join(" | ")}`,actualValue:m.value,expectedRange:y.join(" | ")})}}}}}if(n?.closedWorldMode)for(let l of c){let u=s.get(l)??new Map;for(let f of u.keys())e.hasShape(f)||o.push({focusNode:l,propertyPath:f,severity:"sh:Warning",constraint:"unknown-property",message:`Unknown property: <${f}> has no registered shape`})}return o.sort((l,u)=>{let f=l.focusNode.localeCompare(u.focusNode);return f!==0?f:l.propertyPath.localeCompare(u.propertyPath)}),{conforms:!o.some(l=>l.severity==="sh:Violation"),violations:o}}a(Rre,"validate")});var _M=v(ab=>{"use strict";Object.defineProperty(ab,"__esModule",{value:!0});ab.ApplicationErrorHandler=void 0;var vI=mo(),Cre=ho(),xre=Al(),TI=class{static{a(this,"ApplicationErrorHandler")}constructor(e={},t,n){this.logger=t,this.notifier=n,this.telemetryHooks=new Set,this.retryConfig={maxRetries:e.maxRetries??3,initialDelayMs:e.initialDelayMs??1e3,backoffMultiplier:e.backoffMultiplier??2,maxDelayMs:e.maxDelayMs??1e4}}handle(e,t){let n=this.ensureApplicationError(e,t);return this.notifier&&this.notifier.error(n.message),this.callTelemetryHooks("onError",n,t),this.formatError(n)}async executeWithRetry(e,t){let n,i=0;for(;i<=this.retryConfig.maxRetries;)try{return await e()}catch(s){if(n=this.ensureApplicationError(s,t),!n.retriable||i>=this.retryConfig.maxRetries)throw this.callTelemetryHooks("onError",n,t),i>=this.retryConfig.maxRetries&&n.retriable&&this.callTelemetryHooks("onRetryExhausted",n,i+1),n;let o=this.calculateDelay(i);this.callTelemetryHooks("onRetry",n,i+1,o),this.logger?.debug(`Retrying after ${o}ms (attempt ${i+1}/${this.retryConfig.maxRetries})`),await this.sleep(o),i++}throw n}registerTelemetryHook(e){this.telemetryHooks.add(e)}unregisterTelemetryHook(e){this.telemetryHooks.delete(e)}ensureApplicationError(e,t){if(e instanceof vI.ApplicationError){if(t){let i=e,s={...e.context,...t};return new class extends vI.ApplicationError{constructor(){super(...arguments),this.code=i.code,this.retriable=i.retriable,this.guidance=i.guidance}}(e.message,s)}return e}return new class extends vI.ApplicationError{static{a(this,"UnknownError")}constructor(s,o){super(s,{originalError:o.name,...t}),this.code=Cre.ErrorCode.UNKNOWN_ERROR,this.retriable=!1,this.guidance="An unexpected error occurred"}}(e.message,e)}formatError(e){let t=[];return t.push(`\u274C ${e.name}: ${e.message}`),e.guidance&&t.push(`\u{1F4A1} ${e.guidance}`),e.context&&Object.keys(e.context).length>0&&t.push(`Context: ${JSON.stringify(e.context,null,2)}`),t.join(`
328
328
  `)}calculateDelay(e){let t=this.retryConfig.initialDelayMs*Math.pow(this.retryConfig.backoffMultiplier,e);return Math.min(t,this.retryConfig.maxDelayMs)}sleep(e){return new Promise(t=>setTimeout(t,e))}callTelemetryHooks(e,...t){for(let n of this.telemetryHooks)try{let i=n[e];i&&i.apply(n,t)}catch(i){xre.LoggingService.error("Error in telemetry hook",i instanceof Error?i:new Error(String(i)))}}};ab.ApplicationErrorHandler=TI});var bM=v(cb=>{"use strict";Object.defineProperty(cb,"__esModule",{value:!0});cb.ApplicationErrorHandler=void 0;var Ore=_M();Object.defineProperty(cb,"ApplicationErrorHandler",{enumerable:!0,get:a(function(){return Ore.ApplicationErrorHandler},"get")})});var SM=v(lb=>{"use strict";Object.defineProperty(lb,"__esModule",{value:!0});lb.ClassHierarchy=void 0;var Pre="http://www.w3.org/2000/01/rdf-schema#subClassOf",AI=class{static{a(this,"ClassHierarchy")}constructor(e){this.adjacency=new Map;for(let t of e){if(t.predicate.type!=="iri"||t.predicate.value!==Pre||t.subject.type!=="iri"||t.object.type!=="iri")continue;let n=t.subject.value,i=t.object.value,s=this.adjacency.get(n);s||(s=new Set,this.adjacency.set(n,s)),s.add(i)}}isSubClassOf(e,t){if(e===t)return!0;let n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(s===void 0)break;if(n.has(s))continue;n.add(s);let o=this.adjacency.get(s);if(o)for(let c of o){if(c===t)return!0;n.has(c)||i.push(c)}}return!1}getAncestors(e){let t=new Set,n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(s===void 0)break;if(n.has(s))continue;n.add(s);let o=this.adjacency.get(s);if(o)for(let c of o)t.add(c),n.has(c)||i.push(c)}return t}};lb.ClassHierarchy=AI});var II=v(ub=>{"use strict";Object.defineProperty(ub,"__esModule",{value:!0});ub.parseTarball=vM;ub.parseTarballGzip=Mre;var Fre={0:"file",1:"hardLink",2:"symbolicLink",3:"characterDevice",4:"blockDevice",5:"directory",6:"fifo",7:"contiguousFile",g:"globalExtendedHeader",x:"extendedHeader",D:"gnuDirectory",I:"gnuInodeMetadata",K:"gnuLongLinkName",L:"gnuLongFileName",N:"gnuOldLongFileName",M:"gnuMultiVolume",S:"gnuSparseFile",E:"gnuExtendedSparse"},Dre=new Set(["extendedHeader","globalExtendedHeader","gnuLongFileName","gnuOldLongFileName","gnuLongLinkName"]),wM;function EM(){return wM??(wM=new TextDecoder)}a(EM,"getDecoder");function Th(r,e,t){let n=r.subarray(e,e+t),i=n.indexOf(0);return EM().decode(i===-1?n:n.subarray(0,i))}a(Th,"readString");function Lre(r,e,t){let n="";for(let s=0;s<t;s++)n+=String.fromCodePoint(r[e+s]);let i=Number.parseInt(n,8);return Number.isNaN(i)?0:i}a(Lre,"readNumber");function Nre(r){let e=EM().decode(r),t={};for(let n of e.split(`
329
329
  `)){let i=n.indexOf("=");if(i===-1)continue;let s=n.slice(n.indexOf(" ")+1,i),o=n.slice(i+1);s&&(t[s]=o)}return t}a(Nre,"parseExtendedHeaders");function kre(r){let e=r.replace(/\\/g,"/");e=e.replace(/^[a-zA-Z]:\//,""),e=e.replace(/^\/+/,"");let t=e.startsWith("./"),n=e.split("/"),i=[];for(let o of n)o===".."?i.pop():o!=="."&&o!==""&&i.push(o);let s=i.join("/");return t&&!s.startsWith("./")&&(s="./"+s),r.endsWith("/")&&!s.endsWith("/")&&(s+="/"),s}a(kre,"sanitizePath");function vM(r){let e=r.byteOffset===0&&r.byteLength===r.buffer.byteLength?r:r.slice(),t=[],n=0,i,s;for(;n+512<=e.byteLength;){let o=Th(e,n,100);if(o.length===0)break;let c=!1;if(i){let h=i.path??i.linkpath;h&&(o=h,c=!0)}let l=Lre(e,n+124,12),u=512+512*Math.trunc(l/512)+(l%512?512:0),f=Th(e,n+156,1)||"0",d=Fre[f]??f;if(d==="extendedHeader"||d==="globalExtendedHeader"){let h=Nre(e.subarray(n+512,n+512+l));d==="extendedHeader"?i=h:(i=void 0,s={...s,...h}),n+=u;continue}if(Dre.has(d)){i={path:Th(e,n+512,l)},n+=u;continue}if(!c&&Th(e,n+257,6).startsWith("ustar")){let m=Th(e,n+345,155);m.length>0&&(o=`${m}/${o}`)}o=kre(o);let p=l===0?void 0:e.subarray(n+512,n+512+l);t.push({name:o,type:d,size:l,data:p}),i=void 0,n+=u}return t}a(vM,"parseTarball");async function Mre(r){let e=new Uint8Array(r instanceof Uint8Array?r:new Uint8Array(r)),t=new DecompressionStream("gzip"),n=t.writable.getWriter(),[,i]=await Promise.all([n.write(e).then(()=>n.close()),new Response(t.readable).arrayBuffer()]);return vM(new Uint8Array(i))}a(Mre,"parseTarballGzip")});var db=v(fb=>{"use strict";Object.defineProperty(fb,"__esModule",{value:!0});fb.isBinaryPayload=CI;fb.restCreateCommit=$re;function CI(r){return typeof r!="string"}a(CI,"isBinaryPayload");var jre="https://api.github.com";function TM(r){if(r!==null&&typeof r=="object"&&"object"in r){let e=r.object;if(e!==null&&typeof e=="object"&&"sha"in e){let t=e.sha;return typeof t=="string"?t:void 0}}}a(TM,"readObjectSha");function RI(r){if(r!==null&&typeof r=="object"&&"sha"in r){let e=r.sha;return typeof e=="string"?e:void 0}}a(RI,"readSha");async function $re(r,e){let{owner:t,repo:n,branch:i,files:s,message:o}=e,c=e.deletions??[],l=(e.baseURL??jre).replace(/\/$/,""),u=e.redact??(P=>P);if(typeof t!="string"||t.length===0)throw new Error("restCreateCommit: owner is required");if(typeof n!="string"||n.length===0)throw new Error("restCreateCommit: repo is required");if(typeof i!="string"||i.length===0)throw new Error("GitHub createCommit: branch is required");if(!(s instanceof Map)||s.size===0&&c.length===0)throw new Error("GitHub createCommit: files map must be non-empty (unless deletions are provided)");let f=new Set;for(let P of c){if(typeof P!="string"||P.length===0)throw new Error("GitHub createCommit: deletion path must be a non-empty string");if(s.has(P))throw new Error(u(`GitHub createCommit: path ${P} is both written and deleted \u2014 ambiguous`));f.add(P)}if(typeof o!="string"||o.length===0)throw new Error("GitHub createCommit: message is required");let d=encodeURIComponent(t),p=encodeURIComponent(n),h=encodeURIComponent(i),m=await r({method:"GET",url:`${l}/repos/${d}/${p}/git/refs/heads/${h}`}),y=TM(m?.json);if(typeof y!="string"||y.length===0)throw new Error(u(`GitHub createCommit: missing object.sha for ref heads/${i}`));if(e.expectedHeadSha!==void 0&&y!==e.expectedHeadSha)throw new Error(u(`GitHub createCommit: head heads/${i} moved since the caller's check (expected ${e.expectedHeadSha}, found ${y}) \u2014 refusing to avoid overwriting a concurrent change`));let _=new Map;for(let[P,M]of s){if(!CI(M))continue;let O=await r({method:"POST",url:`${l}/repos/${d}/${p}/git/blobs`,contentType:"application/json",body:JSON.stringify({content:M.base64,encoding:"base64"})}),L=RI(O?.json);if(typeof L!="string"||L.length===0)throw new Error(u(`GitHub createCommit: blob create returned no sha for ${P}`));_.set(P,L)}let b=Array.from(s.entries()).map(([P,M])=>CI(M)?{path:P,mode:"100644",type:"blob",sha:_.get(P)}:{path:P,mode:"100644",type:"blob",content:M});for(let P of f)b.push({path:P,mode:"100644",type:"blob",sha:null});let T=await r({method:"POST",url:`${l}/repos/${d}/${p}/git/trees`,contentType:"application/json",body:JSON.stringify({base_tree:y,tree:b})}),I=RI(T?.json);if(typeof I!="string"||I.length===0)throw new Error(u("GitHub createCommit: tree create returned no sha"));let E=await r({method:"POST",url:`${l}/repos/${d}/${p}/git/commits`,contentType:"application/json",body:JSON.stringify({message:o,tree:I,parents:[y]})}),S=RI(E?.json);if(typeof S!="string"||S.length===0)throw new Error(u("GitHub createCommit: commit create returned no sha"));let R=await r({method:"PATCH",url:`${l}/repos/${d}/${p}/git/refs/heads/${h}`,contentType:"application/json",body:JSON.stringify({sha:S,force:!1})}),D=TM(R?.json);if(D!==S)throw new Error(u(`GitHub createCommit: ref update mismatch (expected ${S}, got ${D})`));return S}a($re,"restCreateCommit")});var RM=v(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.MATERIALIZE_PROGRESS_MIN_FILES=Ti.MATERIALIZE_PROGRESS_INTERVAL=void 0;Ti.discoverWrapperDir=AM;Ti.extractShaFromWrapper=IM;Ti.mountAssetSpaceFiles=Vre;Ti.escapeGitmodulesRegex=OI;Ti.appendGitmodulesEntry=Gre;Ti.stripGitmodulesEntry=qre;var Ure=II(),xI=new Set(["globalExtendedHeader","extendedHeader"]);function pb(r){let e=r.replace(/\\/g,"/").replace(/\/+/g,"/");for(;e.startsWith("./");)e=e.slice(2);return e}a(pb,"normalizeEntryPath");function AM(r){let e=r.find(s=>!xI.has(s.type)&&pb(s.name).includes("/"));if(e===void 0)throw new Error("discoverWrapperDir: no wrapper-bearing entry in tarball");let t=pb(e.name),n=t.slice(0,t.indexOf("/"));if(n.length===0)throw new Error(`discoverWrapperDir: empty wrapper segment in entry "${e.name}"`);let i=n+"/";for(let s of r){if(xI.has(s.type))continue;let o=pb(s.name);if(!(o===n||o===i)&&!o.startsWith(i))throw new Error(`discoverWrapperDir: entry "${s.name}" not under wrapper "${n}"`)}return n}a(AM,"discoverWrapperDir");function IM(r){let e=r.match(/-([0-9a-fA-F]{7,40})$/);if(e===null)throw new Error(`extractShaFromWrapper: wrapper "${r}" does not match expected GitHub pattern <owner>-<repo>-<sha>`);return e[1].toLowerCase()}a(IM,"extractShaFromWrapper");function Bre(r,e){let t=e+"/",n=[];for(let i of r){if(i.type==="symbolicLink"||i.type==="hardLink")throw new Error(`${i.type} entry "${i.name}" rejected for security`);if(xI.has(i.type)||i.type==="directory")continue;let s=pb(i.name);if(s===e||s===t)continue;if(!s.startsWith(t))throw new Error(`entry "${i.name}" not under wrapper "${e}"`);let o=s.slice(t.length);if(o.length!==0){if(o.split("/").some(c=>c===".."))throw new Error(`path traversal detected for entry "${i.name}"`);i.data!==void 0&&n.push({relPath:o,content:i.data})}}return n}a(Bre,"buildMountFiles");Ti.MATERIALIZE_PROGRESS_INTERVAL=200;Ti.MATERIALIZE_PROGRESS_MIN_FILES=500;async function Vre(r){let{http:e,fs:t,owner:n,repo:i,ref:s,targetPath:o}=r,c=a((_,b)=>{if(r.onProgress!==void 0)try{r.onProgress(_,b)}catch{}},"emit");c("fetch");let l=await e.fetchTarball(n,i,s);c("extract");let u=await(0,Ure.parseTarballGzip)(l);if(u.length===0)throw new Error(`tarball empty for ${n}/${i}@${s}`);let f=AM(u),d=IM(f),p=Bre(u,f);c("materialize");let h=p.length,m=r.onProgress!==void 0&&h>Ti.MATERIALIZE_PROGRESS_MIN_FILES,y=await t.materialize(o,p,m?_=>{_%Ti.MATERIALIZE_PROGRESS_INTERVAL===0&&_<h&&c("materialize",{processed:_,total:h})}:void 0);return{sha:d,fileCount:y}}a(Vre,"mountAssetSpaceFiles");function OI(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(OI,"escapeGitmodulesRegex");function Gre(r,e,t){let n=new RegExp(`^\\s*\\[submodule\\s+"${OI(e)}"\\]`,"m");if(r.length>0&&n.test(r))return{content:r,added:!1};let i=r.length===0||r.endsWith(`
330
330
  `)?"":`
@@ -349,13 +349,13 @@ ${m.body}`,warnings:y}}splitDoc(e){let t=$ne.exec(e);if(!t)return{frontmatter:{}
349
349
  `).replace(/\s+$/,"")}a(S4,"normaliseBody");function nie(r,e,t){let n=b4(r),i=b4(e),s;if(n.fm===null&&i.fm===null)s=!0;else if(n.fm===null||i.fm===null)s=!1;else try{s=Rb(t.parse(n.fm))===Rb(t.parse(i.fm))}catch{s=!1}return{frontmatterEqual:s,bodyEqual:S4(n.body)===S4(i.body)}}a(nie,"compareAssetSemantics")});var T4=v(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});kh.ParityValidator=void 0;kh.summarizeParityRound=uie;var Nh=Hf(),w4=Wf(),iie=yb(),sie=bb(),Xf=Sb(),E4=hR(),oie=50,aie=200,v4=new Set(["pending-local-edit","pending-remote-add","pending-remote-edit","pending-remote-delete","deferred-local-delete","pending-conflict","unverified-divergence"]),cie=new Set(["quarantine-pinned","format-only-drift"]);function mc(r){return r instanceof Error?r.message:String(r)}a(mc,"errMsg");function lie(r){return/HTTP 404/.test(mc(r))}a(lie,"isNotFoundError");var mR=class{static{a(this,"ParityValidator")}constructor(e){this.deps=e,this.transport=(0,sie.withRateLimitBackoff)(e.transport,e.backoff)}async captureSnapshot(e){let t=new Map,n=[],i=this.deps.redact??(s=>s);for(let s of e)try{let o=await this.deps.watermarks.get(s.repoKey);if(o===null)continue;let c=new Map(o.files.map(f=>[f.path,f.blobSha])),l=await this.readLocalSnapshot(s,s.spaceKind==="file"),u=new Map;for(let[f,d]of l.shas)c.get(f)!==d&&u.set(f,d);u.size>0&&t.set(s.repoKey,u)}catch(o){n.push(`${s.repoKey}: conservation snapshot failed (${i(mc(o))}) \u2014 no coverage this round`)}return{dirtyByRepo:t,warnings:n}}async runRound(e,t){let n=this.deps.now??(()=>new Date().toISOString()),i=this.deps.maxSemanticFetchesPerRun??aie,s=[];for(let u of e){let f=await this.checkRepo(u,t,{take:a(d=>i<d?!1:(i-=d,!0),"take")});s.push(f)}t.previousRound!=null&&t.trigger==="post-sync"&&this.escalatePersistentDivergence(s,t.previousRound,t.syncResults);let o=s.filter(u=>u.status==="checked").length,c=s.reduce((u,f)=>u+f.m1Violations.length,0),l=s.reduce((u,f)=>u+(f.status==="checked"?f.m2SemanticDiffs:0),0);return{version:1,ts:n(),trigger:t.trigger,repos:s,checkedRepos:o,m1Total:c,m2Total:l,ok:c===0&&l===0&&o>0,vacuous:o===0}}async checkRepo(e,t,n){let i=[],s=this.deps.redact??(l=>l),o=a((l,u={})=>({repoKey:e.repoKey,status:l,filesChecked:0,inParity:0,discrepancies:[],m2SemanticDiffs:0,accountedCount:0,m1Violations:[],warnings:i,...u}),"report"),c=t.syncResults?.find(l=>l.repoKey===e.repoKey);if(c?.warnings.some(l=>l.startsWith("race-window")))return o("inconclusive",{detail:"sync hit its race window (watermark not advanced) \u2014 parity deferred to the next round"});if(c?.status==="skipped-not-materialized")return o("inconclusive",{detail:"repo not fully materialized (D19) \u2014 local absence is not divergence; parity deferred to the next round"});try{let l=e.spaceKind==="file",u=await(0,Nh.getHeadSha)(this.transport,e.owner,e.repo,e.branch,this.deps.baseURL),f=await(0,Nh.getCommitInfo)(this.transport,e.owner,e.repo,u,this.deps.baseURL),d=await(0,Nh.getTree)(this.transport,e.owner,e.repo,f.treeSha,this.deps.baseURL),p=this.deps.maxFileBytes??Xf.DEFAULT_MAX_FILE_BYTES,h=l?Xf.isFileSpaceSyncablePath:Xf.isSyncablePath,m=new Map;for(let L of d)if(h(L.path)){if(L.size!==void 0&&L.size>p){i.push(`remote ${L.path} exceeds the ${p}-byte cap \u2014 excluded symmetrically`);continue}m.set(L.path,L)}let y=await this.readLocalSnapshot(e,l);i.push(...y.warnings);let _=await this.deps.watermarks.get(e.repoKey);if(_===null){let L=0;for(let[re,V]of y.shas)m.get(re)?.blobSha===V&&L++;let te=new Set([...y.shas.keys(),...m.keys()]);return o("no-watermark",{filesChecked:te.size,inParity:L,headSha:u,detail:`repo has no sync watermark on this device (${te.size-L} raw diff(s)) \u2014 run a sync first; not counted toward M1/M2`})}let b=new Map(_.files.map(L=>[L.path,L.blobSha])),T=new Set(_.pinnedPaths??[]),{discrepancies:I,inParity:E,filesChecked:S}=await this.classifyAll(e,y,m,b,T,l,{warnings:i,runBudget:n}),R=await(0,Nh.getHeadSha)(this.transport,e.owner,e.repo,e.branch,this.deps.baseURL);if(R!==u)return o("inconclusive",{headSha:u,detail:`remote head moved during the check (${u.slice(0,7)} \u2192 ${R.slice(0,7)}) \u2014 parity deferred to the next round`});let D=this.checkConservation(e,t,y,m,T,c),P=I.filter(L=>!cie.has(L.cls)).length,M=I.length-P,O;if(l){let L=[...y.shas.values()].sort().join(`
350
350
  `),te=[...m.values()].map(re=>re.blobSha).sort().join(`
351
351
  `);O=L===te}return o("checked",{filesChecked:S,inParity:E,discrepancies:I,m2SemanticDiffs:P,accountedCount:M,m1Violations:D,headSha:u,...O!==void 0?{attachmentHashSetIdentical:O}:{}})}catch(l){return(0,iie.isAuthError)(l)?o("auth-required",{detail:s(`authentication failed: ${mc(l)} \u2014 the PAT is expired, revoked or under-scoped; update it (R8)`)}):lie(l)?(i.push("repo unreachable (HTTP 404): dead AssetSpace pointer, or the fine-grained PAT does not allowlist this repo \u2014 skipped"),o("error",{detail:s(mc(l))})):(i.push(`parity check failed: ${s(mc(l))}`),o("error",{detail:s(mc(l))}))}}async readLocalSnapshot(e,t){let n=this.deps.localFilesFor(e),i=t?Xf.isFileSpaceSyncablePath:Xf.isSyncablePath,s=this.deps.maxFileBytes??Xf.DEFAULT_MAX_FILE_BYTES,o=new Map,c=new Map,l=[];if(t&&n.readBinary===void 0)throw new Error("file-mode repo requires a LocalFilesPort with readBinary \u2014 refusing to hash through the text-only port (binary would corrupt)");let u=new TextEncoder;for(let f of await n.list())if(i(f))try{if(t){let d=await n.readBinary(f);if(d.byteLength>s){l.push(`local ${f} exceeds the ${s}-byte cap \u2014 excluded symmetrically`);continue}o.set(f,await(0,w4.gitBlobSha)(d,this.deps.sha1))}else{let d=await n.read(f);if(u.encode(d).byteLength>s){l.push(`local ${f} exceeds the ${s}-byte cap \u2014 excluded symmetrically`);continue}c.set(f,d),o.set(f,await(0,w4.gitBlobSha)(d,this.deps.sha1))}}catch(d){let p=this.deps.redact??(h=>h);l.push(`local ${f} unreadable (${p(mc(d))}) \u2014 skipped`)}return{shas:o,texts:c,warnings:l}}async classifyAll(e,t,n,i,s,o,c){let l=[],u=0,f=this.deps.maxSemanticFetchesPerRepo??oie,d=new Set([...t.shas.keys(),...n.keys()]);for(let p of[...d].sort()){let h=t.shas.get(p),y=n.get(p)?.blobSha,_=i.get(p);if(h!==void 0&&y!==void 0){if(h===y){u++;continue}l.push(await this.classifyContentDiff(e,p,h,y,_,s,o,t,{...c,takeRepoFetch:a(()=>f-- >0,"takeRepoFetch")}));continue}if(h!==void 0){let b;s.has(p)?b={path:p,presence:"local-only",cls:"quarantine-pinned",localSha:h}:_===void 0?b={path:p,presence:"local-only",cls:"pending-local-add",localSha:h}:_===h?b={path:p,presence:"local-only",cls:"pending-remote-delete",localSha:h,detail:"remote deleted it; the local copy is unchanged"}:b={path:p,presence:"local-only",cls:"pending-conflict",localSha:h,detail:"remote deleted it AND the local copy was edited"},l.push(b);continue}if(y!==void 0){let b;s.has(p)?b={path:p,presence:"remote-only",cls:"quarantine-pinned",remoteSha:y}:_===void 0?b={path:p,presence:"remote-only",cls:"pending-remote-add",remoteSha:y}:_===y?b={path:p,presence:"remote-only",cls:"deferred-local-delete",remoteSha:y,detail:"locally deleted; the delete propagates on the next sync (#3476) \u2014 escalates if it survives a converged round"}:b={path:p,presence:"remote-only",cls:"pending-conflict",remoteSha:y,detail:"locally deleted AND the remote copy was edited"},l.push(b)}}return{discrepancies:l,inParity:u,filesChecked:d.size}}async classifyContentDiff(e,t,n,i,s,o,c,l,u){let f={localSha:n,remoteSha:i};if(o.has(t))return{path:t,presence:"both",cls:"quarantine-pinned",...f};if(s!==void 0&&s===n)return{path:t,presence:"both",cls:"pending-remote-edit",...f};if(s!==void 0&&s===i)return{path:t,presence:"both",cls:"pending-local-edit",...f};if(c)return{path:t,presence:"both",cls:"pending-conflict",...f,detail:"binary content differs on both sides"};if(!u.takeRepoFetch()||!u.runBudget.take(1))return u.warnings.push(`semantic-fetch cap reached \u2014 ${t} left unverified (counted into M2)`),{path:t,presence:"both",cls:"unverified-divergence",...f};let d=l.texts.get(t),p;try{p=await(0,Nh.getBlobText)(this.transport,e.owner,e.repo,i,this.deps.baseURL)}catch(m){let y=this.deps.redact??(_=>_);return u.warnings.push(`blob fetch for ${t} failed (${y(mc(m))}) \u2014 left unverified`),{path:t,presence:"both",cls:"unverified-divergence",...f}}let h=(0,E4.compareAssetSemantics)(d??"",p,this.deps.yaml);return(0,E4.isFormatOnlyDrift)(h)?{path:t,presence:"both",cls:"format-only-drift",...f,frontmatterEqual:!0,bodyEqual:!0}:{path:t,presence:"both",cls:"pending-conflict",...f,frontmatterEqual:h.frontmatterEqual,bodyEqual:h.bodyEqual,detail:`semantic divergence (frontmatter ${h.frontmatterEqual?"equal":"differs"}, body ${h.bodyEqual?"equal":"differs"})`}}checkConservation(e,t,n,i,s,o){let c=t.snapshot?.dirtyByRepo.get(e.repoKey);if(c===void 0||c.size===0)return[];let l=new Set(o?.mergedPaths??[]),u=new Set(o?.quarantinedPaths??[]),f=[];for(let[d,p]of c)n.shas.get(d)!==p&&i.get(d)?.blobSha!==p&&(l.has(d)||u.has(d)||s.has(d)||f.push({repoKey:e.repoKey,path:d,kind:"conservation",detail:`pre-sync dirty content ${p.slice(0,7)} survived NOWHERE: disk now ${n.shas.get(d)?.slice(0,7)??"absent"}, not in head tree, not merged/quarantined/pinned \u2014 possible lost edit`}));return f}escalatePersistentDivergence(e,t,n){for(let i of e){if(i.status!=="checked")continue;let s=n?.find(u=>u.repoKey===i.repoKey);if(s!==void 0&&s.status!=="synced")continue;let o=new Set(s?.deferredDeletes??[]),c=t.repos.find(u=>u.repoKey===i.repoKey&&u.status==="checked");if(c===void 0)continue;let l=new Map(c.discrepancies.filter(u=>v4.has(u.cls)).map(u=>[u.path,u]));for(let u of i.discrepancies){if(!v4.has(u.cls)||u.cls==="deferred-local-delete"&&o.has(u.path))continue;let f=l.get(u.path);f!==void 0&&f.localSha===u.localSha&&f.remoteSha===u.remoteSha&&i.m1Violations.push({repoKey:i.repoKey,path:u.path,kind:"persistent-divergence",detail:`identical divergence (local ${u.localSha?.slice(0,7)??"absent"}, remote ${u.remoteSha?.slice(0,7)??"absent"}) survived a sync round unchanged (${f.cls} \u2192 ${u.cls}) \u2014 the engine failed to converge it`})}}}};kh.ParityValidator=mR;function uie(r){if(r.vacuous)return`ExoSync parity: VACUOUS \u2014 0 of ${r.repos.length} repo(s) checked (errors / never synced)`;let e=r.repos.length-r.checkedRepos,t=e>0?`, ${e} skipped`:"";return r.ok?`ExoSync parity: M1=0, M2=\u2205 (${r.checkedRepos} repo(s) checked${t})`:`ExoSync parity: M1=${r.m1Total}, M2=${r.m2Total} diff(s) (${r.checkedRepos} repo(s) checked${t}) \u2014 see log`}a(uie,"summarizeParityRound")});var I4=v(A4=>{"use strict";Object.defineProperty(A4,"__esModule",{value:!0})});var Mh=v(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.UID_UNIQUENESS_WHITELIST_CLASS_UIDS=Jr.KNOWN_CHECK_IDS=Jr.CHECK_ID_DAG_ONTOLOGY_IMPORTS=Jr.CHECK_ID_UID_UNIQUENESS=Jr.CHECK_ID_CO_LOCATION=Jr.CHECK_ID_SHACL=void 0;Jr.CHECK_ID_SHACL="f83ffedd-1f05-4ab5-839d-58873c69c4ba";Jr.CHECK_ID_CO_LOCATION="61f95c82-f6fc-4b20-b06d-19f3dc1b1f12";Jr.CHECK_ID_UID_UNIQUENESS="ac10db25-231c-4677-8cac-647d3cf15c64";Jr.CHECK_ID_DAG_ONTOLOGY_IMPORTS="a57f4a6b-a462-4c8d-b958-0dbee4674727";Jr.KNOWN_CHECK_IDS=new Set([Jr.CHECK_ID_SHACL,Jr.CHECK_ID_CO_LOCATION,Jr.CHECK_ID_UID_UNIQUENESS,Jr.CHECK_ID_DAG_ONTOLOGY_IMPORTS]);Jr.UID_UNIQUENESS_WHITELIST_CLASS_UIDS=new Set(["b04e7a3e-6b49-4984-9f8d-b74e9f36818b","2b754a16-cccf-49ee-af69-a18c6d1e3b63"])});var xb=v(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});jh.readUid=fie;jh.readIsDefinedByRef=die;jh.readInstanceClassRefs=pie;var R4=bf();function fie(r){let e=r.exo__Asset_uid;if(typeof e!="string")return null;let t=e.trim();return t.length>0?t:null}a(fie,"readUid");function die(r){return(0,R4.extractAssetReference)(r.exo__Asset_isDefinedBy)}a(die,"readIsDefinedByRef");function pie(r){let e=r.exo__Instance_class,t=Array.isArray(e)?e:e==null?[]:[e],n=[];for(let i of t){let s=(0,R4.extractAssetReference)(i);s&&n.push(s)}return n}a(pie,"readInstanceClassRefs")});var yR=v(gR=>{"use strict";Object.defineProperty(gR,"__esModule",{value:!0});gR.uidUniquenessCheck=mie;var C4=xb(),hie=Mh();function mie(r){let e=new Map;for(let n of r.assets){let i=(0,C4.readUid)(n.frontmatter);if(!i||(0,C4.readInstanceClassRefs)(n.frontmatter).some(c=>hie.UID_UNIQUENESS_WHITELIST_CLASS_UIDS.has(c)))continue;let o=e.get(i);o?o.push(n.path):e.set(i,[n.path])}let t=[];for(let[n,i]of e){if(i.length<2)continue;let s=[...i].sort();for(let o of s)t.push({path:o,message:`duplicate exo__Asset_uid "${n}" \u2014 also at ${s.filter(c=>c!==o).join(", ")}`})}return t}a(mie,"uidUniquenessCheck")});var bR=v(_R=>{"use strict";Object.defineProperty(_R,"__esModule",{value:!0});_R.coLocationCheck=bie;var x4=xb(),gie=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function O4(r){let e=r.lastIndexOf("/");return e<0?"":r.slice(0,e)}a(O4,"dirOf");function yie(r){let e=r.slice(r.lastIndexOf("/")+1);return e.endsWith(".md")?e.slice(0,-3):e}a(yie,"baseNameNoExt");function _ie(r){return r.split("/").some(e=>e.toLowerCase()==="templates")}a(_ie,"isTemplatesPath");function bie(r){let e=new Map,t=new Map;for(let s of r.assets){let o=(0,x4.readUid)(s.frontmatter);o&&!e.has(o)&&e.set(o,s.path);let c=yie(s.path);t.has(c)||t.set(c,s.path)}let n=a(s=>gie.test(s)?e.get(s)??t.get(s):t.get(s)??e.get(s),"resolve"),i=[];for(let s of r.assets){if(s.path.split("/").includes("node_modules")||_ie(s.path))continue;let o=(0,x4.readIsDefinedByRef)(s.frontmatter);if(!o||o.startsWith("!"))continue;let c=n(o);if(!c)continue;let l=O4(c),u=O4(s.path);l!==u&&i.push({path:s.path,message:`co-location: isDefinedBy=${o} expects folder "${l}/" but asset is in "${u}/"`})}return i}a(bie,"coLocationCheck")});var wR=v(SR=>{"use strict";Object.defineProperty(SR,"__esModule",{value:!0});SR.shaclCheck=Sie;async function Sie(r){if(!r.runShacl)throw new Error("SHACL check is enabled but this context provides no triple-store (runShacl). Wire a warm getTripleStore()/runShapesValidation reader, or disable the check.");return(await r.runShacl()).map(t=>({path:t.focusNode??t.path,message:`SHACL: ${t.message}${t.path?` (path ${t.path})`:""}`}))}a(Sie,"shaclCheck")});var vR=v(ER=>{"use strict";Object.defineProperty(ER,"__esModule",{value:!0});ER.dagOntologyImportsCheck=wie;async function wie(r){if(!r.runDag)throw new Error("DAG ontology-imports check is enabled but this context provides no graph derivation (runDag). Wire a reader that supplies it, or disable the check.");return[...await r.runDag()]}a(wie,"dagOntologyImportsCheck")});var TR=v($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.CheckRegistry=void 0;$h.createDefaultCheckRegistry=Iie;var Ob=Mh(),Eie=yR(),vie=bR(),Tie=wR(),Aie=vR(),Pb=class{static{a(this,"CheckRegistry")}constructor(){this.entries=new Map}register(e){return this.entries.set(e.id,e),this}get(e){return this.entries.get(e)}has(e){return this.entries.has(e)}ids(){return[...this.entries.keys()]}};$h.CheckRegistry=Pb;function Iie(){return new Pb().register({id:Ob.CHECK_ID_UID_UNIQUENESS,label:"uid-uniqueness",run:Eie.uidUniquenessCheck}).register({id:Ob.CHECK_ID_CO_LOCATION,label:"co-location",run:vie.coLocationCheck}).register({id:Ob.CHECK_ID_SHACL,label:"shacl",run:Tie.shaclCheck}).register({id:Ob.CHECK_ID_DAG_ONTOLOGY_IMPORTS,label:"dag-ontology-imports",run:Aie.dagOntologyImportsCheck})}a(Iie,"createDefaultCheckRegistry")});var P4=v(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:!0});Fb.VaultCheckRunner=void 0;var Rie=TR(),AR=class{static{a(this,"VaultCheckRunner")}constructor(e=new Rie.CheckRegistry){this.registry=e}async run(e,t){let n=await e.read();return this.runWithContext(n,t)}async runWithContext(e,t){let n=[];for(let i of t){let s=this.registry.get(i);if(!s){n.push({checkId:i,label:i,status:"error",findings:[],errorMessage:`fail-loud: enabled check-id "${i}" has no registered runner`});continue}try{let o=await s.run(e);n.push({checkId:i,label:s.label,status:o.length>0?"fail":"pass",findings:o})}catch(o){n.push({checkId:i,label:s.label,status:"error",findings:[],errorMessage:`fail-loud: check "${s.label}" threw \u2014 ${o instanceof Error?o.message:String(o)}`})}}return{totalAssets:e.assets.length,results:n,ok:n.every(i=>i.status==="pass")}}};Fb.VaultCheckRunner=AR});var F4=v(IR=>{"use strict";Object.defineProperty(IR,"__esModule",{value:!0});IR.readEnabledCheckIds=Oie;var Cie=Mh(),xie=bf();function Oie(r){let e=new Set;for(let t of r){let n=(0,xie.extractAssetReference)(t.frontmatter.setting__Setting_key);if(!n||!Cie.KNOWN_CHECK_IDS.has(n))continue;let i=t.frontmatter.setting__Setting_value;(i===!0||i==="true")&&e.add(n)}return[...e]}a(Oie,"readEnabledCheckIds")});var N4=v(Ot=>{"use strict";var Pie=Ot&&Ot.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),D4=Ot&&Ot.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Pie(e,r,t)};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.readInstanceClassRefs=Ot.readIsDefinedByRef=Ot.readUid=Ot.dagOntologyImportsCheck=Ot.shaclCheck=Ot.coLocationCheck=Ot.uidUniquenessCheck=Ot.readEnabledCheckIds=Ot.VaultCheckRunner=Ot.createDefaultCheckRegistry=Ot.CheckRegistry=void 0;D4(I4(),Ot);D4(Mh(),Ot);var L4=TR();Object.defineProperty(Ot,"CheckRegistry",{enumerable:!0,get:a(function(){return L4.CheckRegistry},"get")});Object.defineProperty(Ot,"createDefaultCheckRegistry",{enumerable:!0,get:a(function(){return L4.createDefaultCheckRegistry},"get")});var Fie=P4();Object.defineProperty(Ot,"VaultCheckRunner",{enumerable:!0,get:a(function(){return Fie.VaultCheckRunner},"get")});var Die=F4();Object.defineProperty(Ot,"readEnabledCheckIds",{enumerable:!0,get:a(function(){return Die.readEnabledCheckIds},"get")});var Lie=yR();Object.defineProperty(Ot,"uidUniquenessCheck",{enumerable:!0,get:a(function(){return Lie.uidUniquenessCheck},"get")});var Nie=bR();Object.defineProperty(Ot,"coLocationCheck",{enumerable:!0,get:a(function(){return Nie.coLocationCheck},"get")});var kie=wR();Object.defineProperty(Ot,"shaclCheck",{enumerable:!0,get:a(function(){return kie.shaclCheck},"get")});var Mie=vR();Object.defineProperty(Ot,"dagOntologyImportsCheck",{enumerable:!0,get:a(function(){return Mie.dagOntologyImportsCheck},"get")});var RR=xb();Object.defineProperty(Ot,"readUid",{enumerable:!0,get:a(function(){return RR.readUid},"get")});Object.defineProperty(Ot,"readIsDefinedByRef",{enumerable:!0,get:a(function(){return RR.readIsDefinedByRef},"get")});Object.defineProperty(Ot,"readInstanceClassRefs",{enumerable:!0,get:a(function(){return RR.readInstanceClassRefs},"get")})});var M4=v(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0})});var Db=v(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.LEGACY_SETTING_VALUE_PROPS=Jt.LEGACY_SETTING_KEY_PROPS=Jt.SETTING_VALUE_PROP=Jt.SETTING_KEY_PROP=void 0;Jt.coerceSettingValue=jie;Jt.extractKeyRef=$ie;Jt.readSettingValueRaw=Uie;Jt.renderSettingAssetMarkdown=Vie;var j4=bf();Jt.SETTING_KEY_PROP="setting__Setting_key";Jt.SETTING_VALUE_PROP="setting__Setting_value";Jt.LEGACY_SETTING_KEY_PROPS=["exo__Setting_key"];Jt.LEGACY_SETTING_VALUE_PROPS=["exo__Setting_value"];function jie(r,e){switch(r){case"boolean":{if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true")return!0;if(t==="false")return!1}return}case"string":return typeof e=="string"?e:typeof e=="number"?String(e):void 0;case"stringList":{if(Array.isArray(e)){let t=e.filter(n=>typeof n=="string");return t.length===e.length?t:void 0}return typeof e=="string"?[e]:void 0}}}a(jie,"coerceSettingValue");function $4(r){let e=r.indexOf("#");return e===-1?r:r.slice(0,e).trim()}a($4,"stripAnchor");function $ie(r){let e=(0,j4.extractAssetReference)(r[Jt.SETTING_KEY_PROP]);if(e)return $4(e);for(let t of Jt.LEGACY_SETTING_KEY_PROPS){let n=(0,j4.extractAssetReference)(r[t]);if(n)return $4(n)}return null}a($ie,"extractKeyRef");function Uie(r){if(Jt.SETTING_VALUE_PROP in r)return r[Jt.SETTING_VALUE_PROP];for(let e of Jt.LEGACY_SETTING_VALUE_PROPS)if(e in r)return r[e]}a(Uie,"readSettingValueRaw");function Bie(r,e){switch(r){case"boolean":return[`${Jt.SETTING_VALUE_PROP}: ${e===!0?"true":"false"}`];case"string":return[`${Jt.SETTING_VALUE_PROP}: ${JSON.stringify(String(e??""))}`];case"stringList":{let t=Array.isArray(e)?e:[];return t.length===0?[`${Jt.SETTING_VALUE_PROP}: []`]:[`${Jt.SETTING_VALUE_PROP}:`,...t.map(n=>` - ${JSON.stringify(n)}`)]}}}a(Bie,"renderValueYaml");function Vie(r,e,t,n,i){return["---",`exo__Asset_uid: ${r.settingUid}`,`exo__Asset_isDefinedBy: "[[${n}]]"`,`exo__Asset_createdAt: ${i}`,"exo__Instance_class:",` - "[[${t}]]"`,`exo__Asset_label: "Setting: ${r.field}"`,`${Jt.SETTING_KEY_PROP}: "[[${r.keyUid}]]"`,...Bie(r.datatype,e),"---","",`Distributable Exocortex setting \`${r.field}\` (${r.datatype}), exported by the Settings Distribution engine (RFC f402002b, M2). Edit \`setting__Setting_value\` here or re-export to overwrite.`,""].join(`
352
- `)}a(Vie,"renderSettingAssetMarkdown")});var U4=v(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:!0});Nb.exportSettings=Gie;Nb.importSettings=qie;var Lb=Db();function Gie(r,e){return r.declaredKeys().map(t=>({field:t.field,fileName:`${t.settingUid}.md`,content:(0,Lb.renderSettingAssetMarkdown)(t,r.readLiveValue(t),r.settingClassUid,e.ontologyUid,e.nowIso)}))}a(Gie,"exportSettings");async function qie(r,e){let t=new Map;for(let s of r.declaredKeys())t.set(s.keyUid,s),t.set(s.keyLabel,s);let n=[],i=[];for(let s of e){let o=(0,Lb.extractKeyRef)(s.frontmatter),c=o!==null?t.get(o):void 0;if(c===void 0){i.push({path:s.path,reason:"unknown-key",detail:o??"<no setting key>"});continue}let l=(0,Lb.coerceSettingValue)(c.datatype,(0,Lb.readSettingValueRaw)(s.frontmatter));if(l===void 0){i.push({path:s.path,reason:"uncoercible",detail:`expected ${c.datatype}`});continue}await r.writeLiveValue(c,l),n.push(c.field)}return{applied:n,skipped:i}}a(qie,"importSettings")});var B4=v(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID=void 0;Uh.resolveDistributionOntology=Wie;var CR=Db();Uh.EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID="ea44f996-64e5-46ce-8953-b13d21ee750d";function Wie(r,e){for(let t of r){if((0,CR.extractKeyRef)(t.frontmatter)!==e)continue;let n=(0,CR.coerceSettingValue)("string",(0,CR.readSettingValueRaw)(t.frontmatter));if(typeof n=="string"){let i=n.trim();if(i.length>0)return i}}return null}a(Wie,"resolveDistributionOntology")});var q4=v(It=>{"use strict";var Hie=It&&It.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),zie=It&&It.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Hie(e,r,t)};Object.defineProperty(It,"__esModule",{value:!0});It.resolveDistributionOntology=It.EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID=It.importSettings=It.exportSettings=It.renderSettingAssetMarkdown=It.readSettingValueRaw=It.extractKeyRef=It.coerceSettingValue=It.LEGACY_SETTING_VALUE_PROPS=It.LEGACY_SETTING_KEY_PROPS=It.SETTING_VALUE_PROP=It.SETTING_KEY_PROP=void 0;zie(M4(),It);var gc=Db();Object.defineProperty(It,"SETTING_KEY_PROP",{enumerable:!0,get:a(function(){return gc.SETTING_KEY_PROP},"get")});Object.defineProperty(It,"SETTING_VALUE_PROP",{enumerable:!0,get:a(function(){return gc.SETTING_VALUE_PROP},"get")});Object.defineProperty(It,"LEGACY_SETTING_KEY_PROPS",{enumerable:!0,get:a(function(){return gc.LEGACY_SETTING_KEY_PROPS},"get")});Object.defineProperty(It,"LEGACY_SETTING_VALUE_PROPS",{enumerable:!0,get:a(function(){return gc.LEGACY_SETTING_VALUE_PROPS},"get")});Object.defineProperty(It,"coerceSettingValue",{enumerable:!0,get:a(function(){return gc.coerceSettingValue},"get")});Object.defineProperty(It,"extractKeyRef",{enumerable:!0,get:a(function(){return gc.extractKeyRef},"get")});Object.defineProperty(It,"readSettingValueRaw",{enumerable:!0,get:a(function(){return gc.readSettingValueRaw},"get")});Object.defineProperty(It,"renderSettingAssetMarkdown",{enumerable:!0,get:a(function(){return gc.renderSettingAssetMarkdown},"get")});var V4=U4();Object.defineProperty(It,"exportSettings",{enumerable:!0,get:a(function(){return V4.exportSettings},"get")});Object.defineProperty(It,"importSettings",{enumerable:!0,get:a(function(){return V4.importSettings},"get")});var G4=B4();Object.defineProperty(It,"EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID",{enumerable:!0,get:a(function(){return G4.EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID},"get")});Object.defineProperty(It,"resolveDistributionOntology",{enumerable:!0,get:a(function(){return G4.resolveDistributionOntology},"get")})});var OR=v(xR=>{"use strict";Object.defineProperty(xR,"__esModule",{value:!0});xR.resolvePreferenceList=Kie;function Kie(r,e){if(Array.isArray(r)&&r.length>1){let t=r.map(n=>e(n)).filter(n=>n!==null&&n.length>0);return t.length>0?t.join("|"):null}return Array.isArray(r)?r.length===0?null:e(r[0]):e(r)}a(Kie,"resolvePreferenceList")});var FR=v(PR=>{"use strict";Object.defineProperty(PR,"__esModule",{value:!0});PR.unwrapLinkTarget=Yie;function Yie(r){let e=r.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();return e.includes("|")?e.split("|")[0]?.trim()??"":e}a(Yie,"unwrapLinkTarget")});var DR=v(kb=>{"use strict";Object.defineProperty(kb,"__esModule",{value:!0});kb.DEFAULT_DISPLAY_NAME_SETTINGS=void 0;kb.DEFAULT_DISPLAY_NAME_SETTINGS={defaultTemplate:"{{exo__Asset_label}}",classTemplates:{},projectTBoxNames:!0}});var Vh=v(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});Bh.isWikilink=LR;Bh.ownProperty=Mb;Bh.resolveKeyPath=Qie;function LR(r){return r.startsWith("[[")&&r.endsWith("]]")}a(LR,"isWikilink");function Mb(r,e){if(!(r===null||typeof r!="object"))return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0}a(Mb,"ownProperty");function Qie(r,e,t){let n=e.split("."),i=r;for(let s of n){if(i==null)return;if(Array.isArray(i)){let o=i[0];if(typeof o=="string"&&t&&LR(o)){let c=t(o);if(c){i=Mb(c,s);continue}return}}if(typeof i!="object"){if(typeof i=="string"&&t&&LR(i)){let o=t(i);if(o){i=Mb(o,s);continue}}return}i=Mb(i,s)}return i}a(Qie,"resolveKeyPath")});var H4=v(jb=>{"use strict";Object.defineProperty(jb,"__esModule",{value:!0});jb.PrintNameRuleService=void 0;var Xie=OR(),Jie=FR(),W4=Vh(),Zie="exo__DisplayNameSpec",ese="07eab746-0874-4676-9d98-dbaad1bc6fb8",tse="exo__PrintedProperty",rse="7d58de40-d941-4a66-88e2-13afc4fdc41d",nse="exo__PrintedLiteral",ise="4d5437c9-788e-4a6d-9be0-4af3a84554f4",sse=1e3,ose=300,NR=class{static{a(this,"PrintNameRuleService")}constructor(e,t={},n=void 0){this.vault=e,this.hostFunctions=t,this.host=n,this.rules=new Map,this.classHierarchy=new Map,this.initialized=!1,this.scanDebounceTimer=null}initialize(){this.scanVault(),this.initialized=!0}getTemplateForClass(e,t){if(!this.initialized)return null;let n=this.selectRule(this.rules.get(e),t);if(n)return{template:n.template,priority:n.priority};let i=this.getAncestorClasses(e);for(let s of i){let o=this.selectRule(this.rules.get(s),t);if(o)return{template:o.template,priority:o.priority}}return null}getParticipatingRules(e,t){if(!this.initialized)return[];let n=this.participatingOf(this.rules.get(e),t);if(n.length>0)return n;for(let i of this.getAncestorClasses(e)){let s=this.participatingOf(this.rules.get(i),t);if(s.length>0)return s}return[]}selectRule(e,t){if(!e||e.length===0)return null;for(let n of e)if(this.ruleParticipates(n,t))return n;return null}participatingOf(e,t){if(!e||e.length===0)return[];let n=[];for(let i of e)this.ruleParticipates(i,t)&&n.push({template:i.template,priority:i.priority,sourceFile:i.sourceFile,...i.separator?{separator:i.separator}:{}});return n}ruleParticipates(e,t){return e.matcher?t?this.matcherSatisfied(e.matcher,t):!1:!0}matcherSatisfied(e,t){if(e.kind==="hostFunction"){if(!Object.prototype.hasOwnProperty.call(this.hostFunctions,e.hostFunction))return!1;let s=this.hostFunctions[e.hostFunction];return typeof s!="function"?!1:s(this.host,t)}let n=e.matchKey.includes(".")?(0,W4.resolveKeyPath)(t,e.matchKey,this.createMetadataResolver()):(0,W4.ownProperty)(t,e.matchKey),i=this.extractClassKeys(n);return i.length===0?!1:i.some(s=>e.matchValues.includes(s))}resolveIdentityForms(e){let t=this.extractClassKeys(e);if(t.length===0)return[];let n=new Set(t);for(let i of t){let s=this.vault.resolveLinkpathFrontmatter(i);if(!s)continue;let o=s.exo__Asset_uid,c=s.exo__Asset_label;typeof o=="string"&&o.trim()&&n.add(o.trim()),typeof c=="string"&&c.trim()&&n.add(c.trim())}return[...n]}resolveMatchValues(e){return this.resolveIdentityForms(e)}resolveHostFunctionName(e){let t=e;if(Array.isArray(t)){if(t.length===0)return null;t=t[0]}return typeof t!="string"?null:t.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim()||null}createMetadataResolver(){return e=>{let t=(0,Jie.unwrapLinkTarget)(e);if(!t)return null;let n=this.vault.resolveLinkpathFrontmatter(t);return n?{...n}:null}}refresh(){this.scanVault()}scheduleRefresh(){this.scanDebounceTimer!==null&&clearTimeout(this.scanDebounceTimer),this.scanDebounceTimer=setTimeout(()=>{this.scanDebounceTimer=null,this.scanVault()},ose)}scanVault(){this.rules.clear(),this.classHierarchy.clear();let e=new Map,t=[];for(let n of this.vault.listFrontmatter()){let i=this.cleanClassValue(n.exo__Instance_class);i===Zie||i===ese?this.collectDisplayNameSpec(n,e):(i===tse||i===rse||i===nse||i===ise)&&this.collectDisplayNamePart(n,t);let s=this.cleanClassValue(n.exo__Class_superClass);if(s&&i){let o=this.cleanClassValue(n.exo__Asset_label)||i,c=this.classHierarchy.get(o);c?c.push(s):this.classHierarchy.set(o,[s])}}this.compileDisplayNameSpecs(e,t)}collectDisplayNameSpec(e,t){let n=typeof e.exo__Asset_uid=="string"?e.exo__Asset_uid.trim():"";if(!n)return;let i=this.resolveIdentityForms(e.exo__DisplayNameSpec_appliesToClass);if(i.length===0)return;let s=e.exo__DisplayNameSpec_priority,o=typeof s=="number"?s:typeof s=="string"&&s.trim()!==""?Number(s):0,c=this.resolvePropertyKey(e.exo__DisplayNameSpec_matchPath),l=this.resolveMatchValues(e.exo__DisplayNameSpec_matchValue),u=c!==null&&l.length>0,f=this.resolveHostFunctionName(e.exo__DisplayNameSpec_matchHostFunction),d=e.exo__DisplayNameSpec_separator,p=typeof d=="string"&&d!==""?d:void 0;t.set(n,{uid:n,classKeys:i,priority:Number.isFinite(o)?o:0,...u?{matchKey:c??void 0,matchValues:l}:{},...f?{hostFunction:f}:{},...p?{separator:p}:{}})}collectDisplayNamePart(e,t){let n=this.cleanClassValue(e.exo__DisplayNamePart_of);if(!n)return;let i=e.exo__DisplayNamePart_order,s=typeof i=="number"?i:typeof i=="string"&&i.trim()!==""?Number(i):NaN;if(!Number.isFinite(s))return;let o=this.resolvePropertyKeyList(e.exo__PrintedProperty_property),c=e.exo__PrintedLiteral_literal,l=typeof c=="string"?c:void 0,u=e.exo__PrintedProperty_format,f=typeof u=="string"&&u.trim()!==""?u.trim():void 0;o?t.push({specUid:n,order:s,propertyKey:o,...f?{format:f}:{}}):l!==void 0&&t.push({specUid:n,order:s,literal:l})}compileDisplayNameSpecs(e,t){let n=new Map;for(let i of t){let s=n.get(i.specUid);s?s.push(i):n.set(i.specUid,[i])}for(let i of e.values()){let s=(n.get(i.uid)??[]).slice().sort((u,f)=>u.order-f.order);if(s.length===0)continue;let o=s.map(u=>u.propertyKey?u.format?`{{${u.propertyKey}::${u.format}}}`:`{{${u.propertyKey}}}`:u.literal??"").join(i.separator??"");if(!o.trim())continue;let c=sse+i.priority,l;i.matchKey&&i.matchValues&&i.matchValues.length>0?l={kind:"value",matchKey:i.matchKey,matchValues:i.matchValues}:i.hostFunction&&(l={kind:"hostFunction",hostFunction:i.hostFunction});for(let u of i.classKeys){if(!u)continue;let f={className:u,template:o,priority:c,sourceFile:i.uid,...l?{matcher:l}:{},...i.separator?{separator:i.separator}:{}},d=this.rules.get(u);d?(d.push(f),d.sort((p,h)=>h.priority-p.priority)):this.rules.set(u,[f])}}}resolvePropertyKey(e){return Array.isArray(e)?e.length===0?null:this.resolveSinglePropertyKey(e[0]):this.resolveSinglePropertyKey(e)}resolvePropertyKeyList(e){return(0,Xie.resolvePreferenceList)(e,t=>this.resolveSinglePropertyKey(t))}resolveSinglePropertyKey(e){if(typeof e!="string")return null;let t=e.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();if(!t)return null;if(t.includes("|"))return t.split("|").pop()?.trim()||null;let n=t.replace(/\.md$/,"").trim();if(!n)return null;let i=this.vault.resolveLinkpathFrontmatter(n);if(i){let s=i.exo__Asset_label;if(typeof s=="string"&&s.trim())return s.trim()}return n}extractClassKeys(e){let t=e;if(Array.isArray(t)){if(t.length===0)return[];t=t[0]}if(typeof t!="string")return[];let n=t.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();if(!n)return[];if(n.includes("|")){let[i,s]=n.split("|");return[i.trim().replace(/\.md$/,""),s.trim()].filter(o=>!!o)}return[n.replace(/\.md$/,"")]}getAncestorClasses(e){let t=[],n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(!s||n.has(s))continue;n.add(s);let o=this.classHierarchy.get(s);if(o)for(let c of o)n.has(c)||(t.push(c),i.push(c))}return t}cleanClassValue(e){if(!e)return null;if(Array.isArray(e))return e.length===0?null:this.cleanClassValue(e[0]);if(typeof e!="string")return null;let t=e.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();return t.includes("|")&&(t=(t.split("|").pop()??t).trim()),t||null}getRulesCount(){let e=0;for(let t of this.rules.values())e+=t.length;return e}};jb.PrintNameRuleService=NR});var kR=v(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.DEFAULT_DISPLAY_NAME_TEMPLATE=Sa.DISPLAY_NAME_PRESETS=Sa.DisplayNameTemplateEngine=void 0;var ase=Vh(),Jf=class r{static{a(this,"DisplayNameTemplateEngine")}constructor(e,t={}){this.template=e,this.options=t}render(e,t,n,i){if(!this.template||this.template.trim()==="")return null;let s=this.options.separator;if(s)return this.renderWithSeparator(s,e,t,n,i);let o=this.renderSegment(this.template,e,t,n,i),c=this.cleanupResult(o);return c===""?null:c}renderSegment(e,t,n,i,s){return e.replace(r.PLACEHOLDER_PATTERN,(o,c)=>{let l=c.trim();return this.resolveValue(l,t,n,i,s)})}renderWithSeparator(e,t,n,i,s){let o=this.template.indexOf("{{"),c=this.template.lastIndexOf("}}");if(o===-1||c===-1||c<o){let y=this.cleanupResult(this.renderSegment(this.template,t,n,i,s));return y===""?null:y}let l=this.template.slice(0,o),u=this.template.slice(o,c+2),f=this.template.slice(c+2),d=[];for(let y of r.splitOutsidePlaceholders(u,e)){let _=this.cleanupResult(this.renderSegment(y,t,n,i,s));_!==""&&d.push(_)}if(d.length===0)return null;let p=this.renderSegment(l,t,n,i,s),h=this.renderSegment(f,t,n,i,s),m=`${p}${d.join(e)}${h}`.trim();return m===""?null:m}static splitOutsidePlaceholders(e,t){if(t.length===0)return[e];let n=[],i="",s=0;for(;s<e.length;){if(e.startsWith("{{",s)){let o=e.indexOf("}}",s+2);if(o!==-1){i+=e.slice(s,o+2),s=o+2;continue}}if(e.startsWith(t,s)){n.push(i),i="",s+=t.length;continue}i+=e[s],s+=1}return n.push(i),n}cleanupResult(e){let t=e;return t=t.replace(/\s+\(\s*\)$/g,""),t=t.replace(/^\(\s*\)\s+/g,""),t==="()"&&(t=""),t=t.replace(/\s+\[\s*\]$/g,""),t=t.replace(/^\[\s*\]\s+/g,""),t==="[]"&&(t=""),t=t.replace(/\s+/g," "),t.trim()}resolveValue(e,t,n,i,s){if(e==="_basename")return n;if(e==="_created")return i?this.formatDate(i):"";let{path:o,format:c}=r.splitKeyAndFormat(e),l=o.includes("|")?o.split("|").map(f=>f.trim()).filter(f=>f.length>0):[o],u="";for(let f of l){let d=this.getNestedValue(t,f,s),p;if(c){let h=r.applyValueFormat(d,c);p=h!==null?h:this.formatValue(d,s)}else p=this.formatValue(d,s);if(p!=="")return p;u=p}return u}static splitKeyAndFormat(e){let t=e.indexOf("::");if(t<=0)return{path:e};let n=e.slice(0,t).trim(),i=e.slice(t+2).trim();return!n||!i?{path:e}:{path:n,format:i}}static applyValueFormat(e,t){let n=e;if(Array.isArray(n)){if(n.length===0)return null;n=n[0]}let i,s,o,c,l,u;if(n instanceof Date){if(Number.isNaN(n.getTime()))return null;let p=a(h=>String(h).padStart(2,"0"),"pad");i=String(n.getUTCFullYear()).padStart(4,"0"),s=p(n.getUTCMonth()+1),o=p(n.getUTCDate()),c=p(n.getUTCHours()),l=p(n.getUTCMinutes()),u=p(n.getUTCSeconds())}else if(typeof n=="string"){let p=/^\s*(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?/.exec(n);if(!p)return null;i=p[1],s=p[2],o=p[3],c=p[4],l=p[5],u=p[6]}else return null;let f=!1,d=t.replace(/YYYY|YY|MM|DD|HH|mm|ss/g,p=>{switch(p){case"YYYY":return i;case"YY":return i.slice(-2);case"MM":return s;case"DD":return o;case"HH":return c===void 0&&(f=!0),c??"";case"mm":return l===void 0&&(f=!0),l??"";case"ss":return u===void 0&&(f=!0),u??"";default:return p}});return f?null:d}getNestedValue(e,t,n){return(0,ase.resolveKeyPath)(e,t,n)}formatWikilinkValue(e,t){let n=e.match(/^\[\[([^\]|]+?)(?:\|([^\]]+))?\]\]$/);if(!n)return e.replace(r.WIKILINK_PATTERN,"").trim();let i=n[1].trim(),s=n[2]?.trim();if(s)return s;if(t){let o=t(e);if(o){let c=o.exo__Asset_label;if(typeof c=="string"&&c.trim())return c.trim()}}return i}formatValue(e,t){if(e==null)return"";if(typeof e=="string")return this.formatWikilinkValue(e,t);if(Array.isArray(e)){if(e.length===0)return"";if(this.options.joinArrayValues){let n=[];for(let i of e){let s=this.formatValue(i,t);s&&!r.UUID_PATTERN.test(s)&&n.push(s)}return n.join(" ")}return this.formatValue(e[0],t)}return typeof e=="object"?JSON.stringify(e):String(e)}formatDate(e){let t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${i}`}getTemplate(){return this.template}isValid(){return!this.template||this.template.trim()===""?!1:/\{\{[^}]+\}\}/.test(this.template)}getPlaceholders(){let e=[],t=/\{\{([^}]+)\}\}/g,n;for(;(n=t.exec(this.template))!==null;)e.push(n[1].trim());return e}};Sa.DisplayNameTemplateEngine=Jf;Jf.PLACEHOLDER_PATTERN=/\{\{([^}]+)\}\}/g;Jf.WIKILINK_PATTERN=/^\[\[|\]\]$/g;Jf.UUID_PATTERN=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;Sa.DISPLAY_NAME_PRESETS={default:{name:"Label only (default)",template:"{{exo__Asset_label}}"},labelWithStatus:{name:"Label with status",template:"{{exo__Asset_label}}: {{ems__Effort_status}}"},classPrefix:{name:"Class prefix",template:"[{{exo__Instance_class}}] {{exo__Asset_label}}"},classSuffix:{name:"Class suffix",template:"{{exo__Asset_label}} ({{exo__Instance_class}})"},basenameWithLabel:{name:"Filename with label",template:"{{_basename}} - {{exo__Asset_label}}"},datePrefix:{name:"Date prefix",template:"{{_created}} - {{exo__Asset_label}}"}};Sa.DEFAULT_DISPLAY_NAME_TEMPLATE=Sa.DISPLAY_NAME_PRESETS.classSuffix.template});var z4=v(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});Gh.DisplayNameResolver=void 0;Gh.createDefaultResolver=dse;var cse=kR(),lse=Vh(),use=DR(),fse=new Set(["8619c4fc-64f1-4869-b17e-e34186cacca9","exo__Class","38277bfa-d7f9-4a75-b856-b23276ab0db3","exo__Property","9a1cf31c-9d41-4ef3-9023-584a8d087d16","exo__ObjectProperty","ae56ca4c-b610-42a4-a25d-058c23673296","exo__DatatypeProperty","84756998-3b4e-4989-91cc-a5d5c23664d4","exo__URLProperty"]),$b=class{static{a(this,"DisplayNameResolver")}constructor(e,t,n){this.settings=e,this.ruleService=t,this.metadataResolver=n}resolve(e){return this.resolveWithProvenance(e).displayName}resolveWithProvenance(e){let{metadata:t,basename:n,createdDate:i}=e,s=this.extractAssetClasses(t),o=this.computeTBoxNamingProjection(s,t);if(o!==null)return{displayName:o,provenance:"tboxProjection"};let{template:c,separator:l,provenance:u}=this.resolveRenderSpec(s,t);return{displayName:new cse.DisplayNameTemplateEngine(c,l?{separator:l}:{}).render(t,n,i,this.metadataResolver??void 0),provenance:u}}getTemplateForClasses(e,t){return this.resolveRenderSpec(e,t).template}resolveRenderSpec(e,t){if(this.ruleService&&e.length>0){let s=[],o=new Set;for(let c of e)for(let l of this.ruleService.getParticipatingRules(c,t))o.has(l.sourceFile)||(o.add(l.sourceFile),s.push(l));if(s.length>0)return s.sort((c,l)=>l.priority-c.priority||c.sourceFile.localeCompare(l.sourceFile)),s.length===1?{template:s[0].template,...s[0].separator?{separator:s[0].separator}:{},provenance:"spec"}:{...this.composeTemplates(s),provenance:"spec"}}let n=e[0],i=n?(0,lse.ownProperty)(this.settings.classTemplates,n):void 0;return typeof i=="string"&&i?{template:i,provenance:"classTemplate"}:{template:this.settings.defaultTemplate,provenance:"default"}}composeTemplates(e){let t=new Set,n=new Set,i=[],s=[],o=null,c,l=a((p,h,m)=>{for(let y of p.trim().split(/\s+/))!y||h.has(y)||(h.add(y),m.push(y))},"collect");for(let p of e){let{prefix:h,core:m,suffix:y}=this.splitTemplate(p.template);o===null&&m!==""&&(o=m,c=p.separator),l(h,t,i),l(y,n,s)}let u=o??"",f=i.map(p=>`${p} `).join(""),d=s.length?` ${s.join(" ")}`:"";return{template:`${f}${u}${d}`,...c?{separator:c}:{}}}splitTemplate(e){let t=e.indexOf("{{"),n=e.lastIndexOf("}}");return t===-1||n===-1||n<t?{prefix:e,core:"",suffix:""}:{prefix:e.slice(0,t),core:e.slice(t,n+2),suffix:e.slice(n+2)}}getTemplateForClass(e,t){return this.getTemplateForClasses(e?[e]:[],t)}extractAssetClasses(e){let t=e.exo__Instance_class;if(!t)return[];let n=Array.isArray(t)?t:[t],i=[],s=new Set;for(let o of n){let c=this.cleanClassValue(o);c&&!s.has(c)&&(s.add(c),i.push(c))}return i}cleanClassValue(e){if(typeof e!="string")return null;let t=e.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();return t.includes("|")&&(t=(t.split("|").pop()??t).trim()),t||null}computeTBoxNamingProjection(e,t){if(this.settings.projectTBoxNames===!1||!this.isTBoxNamingEntity(e))return null;if(this.ruleService){for(let u of e)if(this.ruleService.getParticipatingRules(u,t).length>0)return null}let n=typeof t.exo__Asset_label=="string"?t.exo__Asset_label.trim():"",[i,s]=this.splitPrefixedLabel(n),c=(typeof t.exo__Slugable_slug=="string"?t.exo__Slugable_slug.trim():"")||s;if(!c)return null;let l=this.resolveOntologyShortName(t)??i;return l?`${l}#${c}`:c}isTBoxNamingEntity(e){return e.some(t=>fse.has(t))}resolveOntologyShortName(e){if(!this.metadataResolver)return null;let t=this.firstString(e.exo__Asset_isDefinedBy);if(!t)return null;let i=this.metadataResolver(t)?.exo__Ontology_shortName;return typeof i=="string"&&i.trim()?i.trim():null}splitPrefixedLabel(e){let t=e.indexOf("__");if(t<=0)return[null,null];let n=e.slice(0,t),i=e.slice(t+2);return i?[n,i]:[null,null]}firstString(e){let t=e;if(Array.isArray(t)){if(t.length===0)return null;t=t[0]}return typeof t!="string"?null:t.trim()||null}configuredClassEntries(){return Object.entries(this.settings.classTemplates).filter(e=>typeof e[1]=="string"&&e[1].length>0)}getConfiguredClasses(){return this.configuredClassEntries().map(([e])=>e)}hasClassTemplates(){return this.configuredClassEntries().length>0}};Gh.DisplayNameResolver=$b;async function dse(){return new $b(use.DEFAULT_DISPLAY_NAME_SETTINGS)}a(dse,"createDefaultResolver")});var ej=v(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.isEffortBlocked=Q4;Zf.localToday=J4;Zf.isEpisodeOngoing=Z4;Zf.createDisplayMatcherHostFunctions=yse;var K4=el(),pse=Au(),hse=10,mse=/^\d{4}-\d{2}-\d{2}$/;function Q4(r,e){let t=e.ems__Effort_blocker;if(!t)return!1;let n=X4(String(t)).split("|")[0].trim();if(!n)return!1;let i=r.resolveLinkpathFrontmatter(n);if(!i)return!1;let s=gse(r,i.ems__Effort_status);return s!==K4.EffortStatus.DONE&&s!==K4.EffortStatus.TRASHED}a(Q4,"isEffortBlocked");function X4(r){return r.trim().replace(/^["']/,"").replace(/["']$/,"").replace(/^\[\[/,"").replace(/\]\]$/,"").replace(/\.md$/,"").trim()}a(X4,"unwrapWikilink");function gse(r,e){let t=(0,pse.normalizeEffortStatus)(e);if(t!==null)return t;let n=e;if(n==null)return"";if(Array.isArray(n)){if(n.length!==1)return"";n=n[0]}let i=X4(String(n));if(i==="")return"";let s=i.indexOf("|"),o=s===-1?i:i.slice(0,s).trim(),l=r.resolveLinkpathFrontmatter(o)?.exo__Asset_label;return Array.isArray(l)&&(l=l[0]),typeof l=="string"&&l.trim()?l.trim():o}a(gse,"resolveStatusLabel");function J4(r=new Date){let e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`}a(J4,"localToday");function Y4(r){let e=r;if(Array.isArray(e)){if(e.length===0)return null;e=e[0]}if(e instanceof Date){if(Number.isNaN(e.getTime()))return null;let l=a(u=>String(u).padStart(2,"0"),"pad");return`${String(e.getUTCFullYear()).padStart(4,"0")}-${l(e.getUTCMonth()+1)}-${l(e.getUTCDate())}`}if(typeof e!="string")return null;let n=e.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim().slice(0,hse);if(!mse.test(n))return null;let[i,s,o]=n.split("-").map(Number),c=new Date(Date.UTC(i,s-1,o));return c.getUTCFullYear()!==i||c.getUTCMonth()!==s-1||c.getUTCDate()!==o?null:n}a(Y4,"toDayKey");function Z4(r,e=new Date){let t=Y4(r.life__Episode_start);if(t===null)return!1;let n=J4(e);if(t>n)return!1;let i=r.life__Episode_end;if(i==null||Array.isArray(i)&&i.length===0||String(i).trim()==="")return!0;let o=Y4(i);return o===null?!1:o>=n}a(Z4,"isEpisodeOngoing");function yse(r){return{isEffortBlocked:a((e,t)=>Q4(r,t),"isEffortBlocked"),isEpisodeOngoing:a((e,t)=>Z4(t),"isEpisodeOngoing")}}a(yse,"createDisplayMatcherHostFunctions")});var We=v(g=>{"use strict";var _se=g&&g.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),Ai=g&&g.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&_se(e,r,t)};Object.defineProperty(g,"__esModule",{value:!0});g.CommandResolver=g.extractPropertyLabel=g.uriToPropertyName=g.propertyNameToUri=g.rangeToFieldType=g.PropertyFieldType=g.ParkedAssetIndex=g.resolveDependencyKind=g.parkedPathFor=g.classifyMountTransition=g.PARKED_ROOT=g.DEPENDENCY_KIND_REFERENCE_UID=g.DEPENDENCY_KIND_TBOX_UID=g.transitiveDependsOnClosure=g.isTsFloorMountPath=g.isTsFloorAssetSpace=g.assertTsFloorReconciled=g.assertTsFloor=g.TsFloorViolationError=g.CATALOG_KEEP_NAMESPACES=g.PLUGIN_UI_FLOOR=g.SDK_FLOOR=g.PLUGIN_UI_FLOOR_ASSETSPACE_UIDS=g.SDK_FLOOR_ASSETSPACE_UIDS=g.TS_FLOOR_AS_UID_SHARED_IDENTITIES=g.TS_FLOOR_AS_UID_EXOCMD=g.TS_FLOOR_AS_UID_EXO=g.parseGroundingDefinitionFromFrontmatter=g.isCommandBindingFrontmatter=g.isGroundingFrontmatter=g.isPreconditionFrontmatter=g.isCommandFrontmatter=g.isStyleSource=g.isLabelClass=g.isCommandVariant=g.STYLE_SOURCE_VALUES=g.LABEL_CLASS_VALUES=g.COMMAND_VARIANT_VALUES=g.CommandBindingStyleProperty=g.CommandBindingProperty=g.GroundingProperty=g.PreconditionProperty=g.CommandProperty=g.resolveGroundingTypeFromWikilinkLiteral=g.resolveGroundingTypeFromIRI=g.GROUNDING_TYPE_IRI_TO_ENUM=g.GROUNDING_TYPE_UID_TO_ENUM=g.GROUNDING_TYPE_UIDS=g.GroundingType=g.EFFORT_STATUS_OPTIONS=void 0;g.TypeRegistry=g.GraphQueryService=g.FixMissingLabelService=g.ArchiveAssetService=g.GenericAssetCreationService=g.EnumValueResolver=g.ClassHierarchyResolver=g.PropertySchemaResolver=g.orderProperties=g.loadDefaultSpec=g.clearOrderSpecLoader=g.registerOrderSpecLoader=g.StatusTimestampService=g.RenameToUidService=g.PropertyCleanupService=g.LoggingService=g.extractAssetReference=g.FolderRepairService=g.WorkflowCommandAdapter=g.VisibilityGenerator=g.InstantiationRuleResolver=g.stripTemplateFrontmatter=g.resolveTemplateBody=g.getRegisteredResolverIds=g.clearResolvers=g.registerResolver=g.getResolver=g.installDefaultResolvers=g.WorkflowResolver=g.WorkflowEngine=g.EffortStatusWorkflow=g.ConceptCreationService=g.ClassCreationService=g.AreaHierarchyBuilder=g.TaskStatusService=g.createTripleStoreRequiredPropertyResolver=g.CommandExecutionFlow=g.stripFrontmatter=g.extractSparqlBlock=g.iriToObsidianName=g.NamedQueryRunner=g.createVaultFrontmatterRefToFrontmatterResolver=g.createVaultFrontmatterRefToFolderResolver=g.createVaultFrontmatterClassLabelResolver=g.ServiceRegistry=g.GroundingExecutor=g.registerDefaultHostFunctions=g.hasUidFilename=g.hasNonUidFilename=g.PreconditionEvaluator=void 0;g.AlgebraTranslator=g.ExoQLAlgebraTranslator=g.DescribeOptionsTransformerError=g.DescribeOptionsTransformer=g.SPARQLParseError=g.SPARQLParser=g.ExoQLParser=g.canonicalYamlKey=g.UNPREFIXED_ASSET_FIELDS=g.isPathExcluded=g.normaliseExcludedFolders=g.NoteToRDFConverter=g.SOURCE_VARIABLE=g.SourceAnnotator=g.MAX_LAZY_DEPTH=g.LazyAssetGraphLoader=g.FILE_SPACE_CLASS_UID=g.frontmatterDeclaresFileSpace=g.discoverFileSpaceExclusions=g.deriveLegacyFlatPath=g.deriveUrl=g.derivePath=g.IRICanonicalizer=g.INFERRED_GRAPH=g.PrototypeChainMaterializer=g.PropertyCardinalityRegistry=g.NonInheritablePropertyRegistry=g.RDFSInferenceEngine=g.RDFVocabularyMapper=g.DomainTriple=g.DomainBlankNode=g.DomainLiteral=g.DomainIRI=g.InMemoryTripleStore=g.OBSIDIAN_VAULT_SCHEME=g.iriToVaultPath=g.vaultPathToIRI=g.NullLogger=g.RDFSerializer=g.FilenameValidator=g.EffortSortingHelpers=g.MetadataExtractor=g.MetadataHelpers=g.WikiLinkHelpers=g.DateFormatter=g.parseYamlFrontmatterTolerant=g.STRING_SCALAR_PROPERTIES=g.serializeYamlScalar=g.FrontmatterService=g.SPARQL_PREFIXES=void 0;g.DEFAULT_FLEETING_NOTE_CLASS_UID=g.DEFAULT_INBOX_FOLDER=g.DEFAULT_OWNER_IDENTITY=g.VaultSettings=g.seededUidGenerator=g.liveUidGenerator=g.frozenClock=g.liveClock=g.TransactionError=g.TripleNotFoundError=g.TripleAlreadyExistsError=g.FileAlreadyExistsError=g.FileNotFoundError=g.FilterContainsOptimizer=g.VaultPrefixTransformer=g.CaseWhenTransformerError=g.CaseWhenTransformer=g.ResultSerializer=g.createIncrementalIndexer=g.IncrementalIndexer=g.createSPARQLResultCache=g.SPARQLResultCache=g.QueryPlanCache=g.createDoubleLiteral=g.createDecimalLiteral=g.getNumericValue=g.createPercentileAggregate=g.modeAggregate=g.stddevAggregate=g.varianceAggregate=g.medianAggregate=g.EXO_AGGREGATE_NS=g.BUILT_IN_AGGREGATES=g.CustomAggregateError=g.CustomAggregateRegistry=g.AggregateFunctions=g.BuiltInFunctions=g.SolutionMapping=g.UpdateExecutorError=g.UpdateExecutor=g.QueryExecutor=g.ExoQLQueryExecutor=g.DescribeExecutor=g.ConstructExecutor=g.UnionExecutor=g.OptionalExecutor=g.FilterExecutor=g.BGPExecutor=g.AlgebraSerializer=g.AlgebraOptimizer=void 0;g.parseTarball=g.TripleClassHierarchy=g.ShaclShapeRegistry=g.shaclValidate=g.Namespace=g.ShapeRegistry=g.ShapeLoader=g.selectByPriority=g.LayoutSelector=g.partitionDailyEffortsByClass=g.EMS_PROJECT_CLASS_UID=g.EMS_ACTION_CLASS_UID=g.resolveDailyEffortVisibility=g.resolveBlockVisibility=g.coerceVisibilityOverride=g.DAILY_EFFORTS_OVERRIDE_KEYS=g.BUILTIN_DAILY_EFFORTS_VISIBILITY=g.isPropertiesBlock=g.isLayoutBlockFrontmatter=g.isDailyEffortsByClassBlock=g.isBacklinksTableBlock=g.createLayoutBlockFromFrontmatter=g.PROPERTIES_BLOCK_CLASS_UID=g.PROPERTIES_BLOCK_CLASS_IRI=g.DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_UID=g.DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_IRI=g.BACKLINKS_TABLE_BLOCK_CLASS_UID=g.BACKLINKS_TABLE_BLOCK_CLASS_IRI=g.isLayoutFrontmatter=g.isLayout=g.createLayoutFromFrontmatter=g.LAYOUT_CLASS_UID=g.LAYOUT_CLASS_IRI=g.ExoQLError=g.ExoQL=g.createStreamingSource=g.StreamingLoader=g.resetGlobalPool=g.getGlobalPool=g.MemoryPool=g.CompactGraphStore=g.StringTable=g.DEFAULT_COLORS=g.NODE_FLAGS=g.container=g.resetContainer=g.getContainer=g.createChildContainer=g.registerCoreServices=g.DI_TOKENS=void 0;g.diff3=g.LOCAL_MANIFEST_STORE_FILENAME=g.FileLocalManifestStore=g.isSyncablePath=g.isFileSpaceSyncablePath=g.contentEquals=g.InMemoryQuarantineStore=g.DEFAULT_MAX_FILE_BYTES=g.backupPathFor=g.QuarantineResolver=g.formatRepoTimings=g.formatTimingsLine=g.fmtMs=g.dominantPhase=g.totalMs=g.aggregateTimings=g.addTimings=g.emptyTimings=g.classifyRestPhase=g.SYNC_PHASES=g.SyncPhaseTimer=g.syncProgressPhaseText=g.orderChildrenFirst=g.isNonFastForwardError=g.SyncEngine=g.DEFAULT_LOCAL_MANIFEST_REHASH_MS=g.DEFAULT_MAX_PUSH_RETRIES=g.checkParkedStaleness=g.getTree=g.getHeadSha=g.getCommitInfo=g.getBlobText=g.getBlobBytes=g.planDuplicateUidFix=g.findDuplicateUidGroups=g.rewriteAssetUid=g.gitBlobSha=g.extractAssetUid=g.detectChanges=g.MATERIALIZE_PROGRESS_MIN_FILES=g.MATERIALIZE_PROGRESS_INTERVAL=g.escapeGitmodulesRegex=g.stripGitmodulesEntry=g.appendGitmodulesEntry=g.extractAssetSpaceSha=g.discoverAssetSpaceWrapperDir=g.mountAssetSpaceFiles=g.isBinaryPayload=g.restCreateCommit=g.parseTarballGzip=void 0;g.createDefaultResolver=g.DisplayNameResolver=g.PrintNameRuleService=g.DEFAULT_DISPLAY_NAME_SETTINGS=g.normalizeEffortStatus=g.EFFORT_STATUS_BY_UID=g.EFFORT_STATUS_UID=g.unwrapLinkTarget=g.resolvePreferenceList=g.isFormatOnlyDrift=g.compareAssetSemantics=g.summarizeParityRound=g.ParityValidator=g.deriveAssetSpaceNamespace=g.buildAssetSpaceDescriptor=g.readSpaceSource=g.parseStrictGitHubRepoURL=g.isFileSpaceFrontmatter=g.isAssetSpaceFrontmatter=g.classifySpaceDeclaration=g.SpaceSpecAccumulator=g.SYNC_BRANCH=g.ASSET_SPACE_CLASS_UID=g.OUTBOX_REMOTE_ABSENT=g.OUTBOX_STORE_FILENAME=g.LocalOutboxStore=g.CONFLICT_CACHE_STORE_FILENAME=g.LocalConflictCacheStore=g.scanForSecrets=g.redactSecrets=g.enrichRateLimitError=g.attachRateLimitFields=g.getRateLimitFields=g.extractRateLimitFields=g.parseRetryAfterMs=g.caseInsensitiveHeaderGetter=g.DEFAULT_MAX_RETRIES=g.MIN_RATE_LIMIT_WAIT_MS=g.createRateLimitBudget=g.withRateLimitBackoff=g.isRateLimitError=g.isAuthError=g.MOUNT_BASE_STORE_FILENAME=g.FileMountBaseStore=g.WATERMARK_STORE_FILENAME=g.FileWatermarkStore=g.GatedStructuredMerger=g.MergeShaclGate=g.splitSections=g.StructuredMerger=void 0;g.createDisplayMatcherHostFunctions=g.localToday=g.isEpisodeOngoing=g.isEffortBlocked=g.isWikilink=g.resolveKeyPath=g.DEFAULT_DISPLAY_NAME_TEMPLATE=g.DISPLAY_NAME_PRESETS=g.DisplayNameTemplateEngine=void 0;Ai(Zc(),g);Ai(el(),g);var bse=hE();Object.defineProperty(g,"EFFORT_STATUS_OPTIONS",{enumerable:!0,get:a(function(){return bse.EFFORT_STATUS_OPTIONS},"get")});var Sse=qa();Object.defineProperty(g,"GroundingType",{enumerable:!0,get:a(function(){return Sse.GroundingType},"get")});var qh=pp();Object.defineProperty(g,"GROUNDING_TYPE_UIDS",{enumerable:!0,get:a(function(){return qh.GROUNDING_TYPE_UIDS},"get")});Object.defineProperty(g,"GROUNDING_TYPE_UID_TO_ENUM",{enumerable:!0,get:a(function(){return qh.GROUNDING_TYPE_UID_TO_ENUM},"get")});Object.defineProperty(g,"GROUNDING_TYPE_IRI_TO_ENUM",{enumerable:!0,get:a(function(){return qh.GROUNDING_TYPE_IRI_TO_ENUM},"get")});Object.defineProperty(g,"resolveGroundingTypeFromIRI",{enumerable:!0,get:a(function(){return qh.resolveGroundingTypeFromIRI},"get")});Object.defineProperty(g,"resolveGroundingTypeFromWikilinkLiteral",{enumerable:!0,get:a(function(){return qh.resolveGroundingTypeFromWikilinkLiteral},"get")});var Wh=mE();Object.defineProperty(g,"CommandProperty",{enumerable:!0,get:a(function(){return Wh.CommandProperty},"get")});Object.defineProperty(g,"PreconditionProperty",{enumerable:!0,get:a(function(){return Wh.PreconditionProperty},"get")});Object.defineProperty(g,"GroundingProperty",{enumerable:!0,get:a(function(){return Wh.GroundingProperty},"get")});Object.defineProperty(g,"CommandBindingProperty",{enumerable:!0,get:a(function(){return Wh.CommandBindingProperty},"get")});Object.defineProperty(g,"CommandBindingStyleProperty",{enumerable:!0,get:a(function(){return Wh.CommandBindingStyleProperty},"get")});var ed=gE();Object.defineProperty(g,"COMMAND_VARIANT_VALUES",{enumerable:!0,get:a(function(){return ed.COMMAND_VARIANT_VALUES},"get")});Object.defineProperty(g,"LABEL_CLASS_VALUES",{enumerable:!0,get:a(function(){return ed.LABEL_CLASS_VALUES},"get")});Object.defineProperty(g,"STYLE_SOURCE_VALUES",{enumerable:!0,get:a(function(){return ed.STYLE_SOURCE_VALUES},"get")});Object.defineProperty(g,"isCommandVariant",{enumerable:!0,get:a(function(){return ed.isCommandVariant},"get")});Object.defineProperty(g,"isLabelClass",{enumerable:!0,get:a(function(){return ed.isLabelClass},"get")});Object.defineProperty(g,"isStyleSource",{enumerable:!0,get:a(function(){return ed.isStyleSource},"get")});var Ub=BP();Object.defineProperty(g,"isCommandFrontmatter",{enumerable:!0,get:a(function(){return Ub.isCommandFrontmatter},"get")});Object.defineProperty(g,"isPreconditionFrontmatter",{enumerable:!0,get:a(function(){return Ub.isPreconditionFrontmatter},"get")});Object.defineProperty(g,"isGroundingFrontmatter",{enumerable:!0,get:a(function(){return Ub.isGroundingFrontmatter},"get")});Object.defineProperty(g,"isCommandBindingFrontmatter",{enumerable:!0,get:a(function(){return Ub.isCommandBindingFrontmatter},"get")});var wse=VP();Object.defineProperty(g,"parseGroundingDefinitionFromFrontmatter",{enumerable:!0,get:a(function(){return wse.parseGroundingDefinitionFromFrontmatter},"get")});Ai(GP(),g);Ai(qP(),g);Ai(_E(),g);Ai(bE(),g);Ai(HP(),g);Ai(YP(),g);Ai(ev(),g);Ai(C3(),g);var Mi=x3();Object.defineProperty(g,"TS_FLOOR_AS_UID_EXO",{enumerable:!0,get:a(function(){return Mi.TS_FLOOR_AS_UID_EXO},"get")});Object.defineProperty(g,"TS_FLOOR_AS_UID_EXOCMD",{enumerable:!0,get:a(function(){return Mi.TS_FLOOR_AS_UID_EXOCMD},"get")});Object.defineProperty(g,"TS_FLOOR_AS_UID_SHARED_IDENTITIES",{enumerable:!0,get:a(function(){return Mi.TS_FLOOR_AS_UID_SHARED_IDENTITIES},"get")});Object.defineProperty(g,"SDK_FLOOR_ASSETSPACE_UIDS",{enumerable:!0,get:a(function(){return Mi.SDK_FLOOR_ASSETSPACE_UIDS},"get")});Object.defineProperty(g,"PLUGIN_UI_FLOOR_ASSETSPACE_UIDS",{enumerable:!0,get:a(function(){return Mi.PLUGIN_UI_FLOOR_ASSETSPACE_UIDS},"get")});Object.defineProperty(g,"SDK_FLOOR",{enumerable:!0,get:a(function(){return Mi.SDK_FLOOR},"get")});Object.defineProperty(g,"PLUGIN_UI_FLOOR",{enumerable:!0,get:a(function(){return Mi.PLUGIN_UI_FLOOR},"get")});Object.defineProperty(g,"CATALOG_KEEP_NAMESPACES",{enumerable:!0,get:a(function(){return Mi.CATALOG_KEEP_NAMESPACES},"get")});Object.defineProperty(g,"TsFloorViolationError",{enumerable:!0,get:a(function(){return Mi.TsFloorViolationError},"get")});Object.defineProperty(g,"assertTsFloor",{enumerable:!0,get:a(function(){return Mi.assertTsFloor},"get")});Object.defineProperty(g,"assertTsFloorReconciled",{enumerable:!0,get:a(function(){return Mi.assertTsFloorReconciled},"get")});Object.defineProperty(g,"isTsFloorAssetSpace",{enumerable:!0,get:a(function(){return Mi.isTsFloorAssetSpace},"get")});Object.defineProperty(g,"isTsFloorMountPath",{enumerable:!0,get:a(function(){return Mi.isTsFloorMountPath},"get")});var Ese=O3();Object.defineProperty(g,"transitiveDependsOnClosure",{enumerable:!0,get:a(function(){return Ese.transitiveDependsOnClosure},"get")});var td=iv();Object.defineProperty(g,"DEPENDENCY_KIND_TBOX_UID",{enumerable:!0,get:a(function(){return td.DEPENDENCY_KIND_TBOX_UID},"get")});Object.defineProperty(g,"DEPENDENCY_KIND_REFERENCE_UID",{enumerable:!0,get:a(function(){return td.DEPENDENCY_KIND_REFERENCE_UID},"get")});Object.defineProperty(g,"PARKED_ROOT",{enumerable:!0,get:a(function(){return td.PARKED_ROOT},"get")});Object.defineProperty(g,"classifyMountTransition",{enumerable:!0,get:a(function(){return td.classifyMountTransition},"get")});Object.defineProperty(g,"parkedPathFor",{enumerable:!0,get:a(function(){return td.parkedPathFor},"get")});Object.defineProperty(g,"resolveDependencyKind",{enumerable:!0,get:a(function(){return td.resolveDependencyKind},"get")});var vse=N3();Object.defineProperty(g,"ParkedAssetIndex",{enumerable:!0,get:a(function(){return vse.ParkedAssetIndex},"get")});var tj=Jg();Object.defineProperty(g,"PropertyFieldType",{enumerable:!0,get:a(function(){return tj.PropertyFieldType},"get")});Object.defineProperty(g,"rangeToFieldType",{enumerable:!0,get:a(function(){return tj.rangeToFieldType},"get")});var MR=cv();Object.defineProperty(g,"propertyNameToUri",{enumerable:!0,get:a(function(){return MR.propertyNameToUri},"get")});Object.defineProperty(g,"uriToPropertyName",{enumerable:!0,get:a(function(){return MR.uriToPropertyName},"get")});Object.defineProperty(g,"extractPropertyLabel",{enumerable:!0,get:a(function(){return MR.extractPropertyLabel},"get")});var Tse=PD();Object.defineProperty(g,"CommandResolver",{enumerable:!0,get:a(function(){return Tse.CommandResolver},"get")});var Ase=DD();Object.defineProperty(g,"PreconditionEvaluator",{enumerable:!0,get:a(function(){return Ase.PreconditionEvaluator},"get")});var jR=LD();Object.defineProperty(g,"hasNonUidFilename",{enumerable:!0,get:a(function(){return jR.hasNonUidFilename},"get")});Object.defineProperty(g,"hasUidFilename",{enumerable:!0,get:a(function(){return jR.hasUidFilename},"get")});Object.defineProperty(g,"registerDefaultHostFunctions",{enumerable:!0,get:a(function(){return jR.registerDefaultHostFunctions},"get")});var rj=rL();Object.defineProperty(g,"GroundingExecutor",{enumerable:!0,get:a(function(){return rj.GroundingExecutor},"get")});Object.defineProperty(g,"ServiceRegistry",{enumerable:!0,get:a(function(){return rj.ServiceRegistry},"get")});var Ise=nL();Object.defineProperty(g,"createVaultFrontmatterClassLabelResolver",{enumerable:!0,get:a(function(){return Ise.createVaultFrontmatterClassLabelResolver},"get")});var Rse=iL();Object.defineProperty(g,"createVaultFrontmatterRefToFolderResolver",{enumerable:!0,get:a(function(){return Rse.createVaultFrontmatterRefToFolderResolver},"get")});var Cse=sL();Object.defineProperty(g,"createVaultFrontmatterRefToFrontmatterResolver",{enumerable:!0,get:a(function(){return Cse.createVaultFrontmatterRefToFrontmatterResolver},"get")});var xse=aL();Object.defineProperty(g,"NamedQueryRunner",{enumerable:!0,get:a(function(){return xse.NamedQueryRunner},"get")});var Ose=Lp();Object.defineProperty(g,"iriToObsidianName",{enumerable:!0,get:a(function(){return Ose.iriToObsidianName},"get")});var nj=cL();Object.defineProperty(g,"extractSparqlBlock",{enumerable:!0,get:a(function(){return nj.extractSparqlBlock},"get")});Object.defineProperty(g,"stripFrontmatter",{enumerable:!0,get:a(function(){return nj.stripFrontmatter},"get")});var Pse=uL();Object.defineProperty(g,"CommandExecutionFlow",{enumerable:!0,get:a(function(){return Pse.CommandExecutionFlow},"get")});var Fse=pL();Object.defineProperty(g,"createTripleStoreRequiredPropertyResolver",{enumerable:!0,get:a(function(){return Fse.createTripleStoreRequiredPropertyResolver},"get")});var Dse=JT();Object.defineProperty(g,"TaskStatusService",{enumerable:!0,get:a(function(){return Dse.TaskStatusService},"get")});var Lse=e2();Object.defineProperty(g,"AreaHierarchyBuilder",{enumerable:!0,get:a(function(){return Lse.AreaHierarchyBuilder},"get")});var Nse=o2();Object.defineProperty(g,"ClassCreationService",{enumerable:!0,get:a(function(){return Nse.ClassCreationService},"get")});var kse=c2();Object.defineProperty(g,"ConceptCreationService",{enumerable:!0,get:a(function(){return kse.ConceptCreationService},"get")});var Mse=r_();Object.defineProperty(g,"EffortStatusWorkflow",{enumerable:!0,get:a(function(){return Mse.EffortStatusWorkflow},"get")});var jse=eh();Object.defineProperty(g,"WorkflowEngine",{enumerable:!0,get:a(function(){return jse.WorkflowEngine},"get")});var $se=UT();Object.defineProperty(g,"WorkflowResolver",{enumerable:!0,get:a(function(){return $se.WorkflowResolver},"get")});var Hh=O0();Object.defineProperty(g,"installDefaultResolvers",{enumerable:!0,get:a(function(){return Hh.installDefaultResolvers},"get")});Object.defineProperty(g,"getResolver",{enumerable:!0,get:a(function(){return Hh.getResolver},"get")});Object.defineProperty(g,"registerResolver",{enumerable:!0,get:a(function(){return Hh.registerResolver},"get")});Object.defineProperty(g,"clearResolvers",{enumerable:!0,get:a(function(){return Hh.clearResolvers},"get")});Object.defineProperty(g,"getRegisteredResolverIds",{enumerable:!0,get:a(function(){return Hh.getRegisteredResolverIds},"get")});var ij=gT();Object.defineProperty(g,"resolveTemplateBody",{enumerable:!0,get:a(function(){return ij.resolveTemplateBody},"get")});Object.defineProperty(g,"stripTemplateFrontmatter",{enumerable:!0,get:a(function(){return ij.stripTemplateFrontmatter},"get")});var Use=RL();Object.defineProperty(g,"InstantiationRuleResolver",{enumerable:!0,get:a(function(){return Use.InstantiationRuleResolver},"get")});var Bse=CL();Object.defineProperty(g,"VisibilityGenerator",{enumerable:!0,get:a(function(){return Bse.VisibilityGenerator},"get")});var Vse=xL();Object.defineProperty(g,"WorkflowCommandAdapter",{enumerable:!0,get:a(function(){return Vse.WorkflowCommandAdapter},"get")});var Gse=s_();Object.defineProperty(g,"FolderRepairService",{enumerable:!0,get:a(function(){return Gse.FolderRepairService},"get")});var qse=bf();Object.defineProperty(g,"extractAssetReference",{enumerable:!0,get:a(function(){return qse.extractAssetReference},"get")});var Wse=Al();Object.defineProperty(g,"LoggingService",{enumerable:!0,get:a(function(){return Wse.LoggingService},"get")});var Hse=g2();Object.defineProperty(g,"PropertyCleanupService",{enumerable:!0,get:a(function(){return Hse.PropertyCleanupService},"get")});var zse=_2();Object.defineProperty(g,"RenameToUidService",{enumerable:!0,get:a(function(){return zse.RenameToUidService},"get")});var Kse=n_();Object.defineProperty(g,"StatusTimestampService",{enumerable:!0,get:a(function(){return Kse.StatusTimestampService},"get")});var Bb=L0();Object.defineProperty(g,"registerOrderSpecLoader",{enumerable:!0,get:a(function(){return Bb.registerOrderSpecLoader},"get")});Object.defineProperty(g,"clearOrderSpecLoader",{enumerable:!0,get:a(function(){return Bb.clearOrderSpecLoader},"get")});Object.defineProperty(g,"loadDefaultSpec",{enumerable:!0,get:a(function(){return Bb.loadDefaultSpec},"get")});Object.defineProperty(g,"orderProperties",{enumerable:!0,get:a(function(){return Bb.orderProperties},"get")});var Yse=LL();Object.defineProperty(g,"PropertySchemaResolver",{enumerable:!0,get:a(function(){return Yse.PropertySchemaResolver},"get")});var Qse=NL();Object.defineProperty(g,"ClassHierarchyResolver",{enumerable:!0,get:a(function(){return Qse.ClassHierarchyResolver},"get")});var Xse=kL();Object.defineProperty(g,"EnumValueResolver",{enumerable:!0,get:a(function(){return Xse.EnumValueResolver},"get")});var Jse=v2();Object.defineProperty(g,"GenericAssetCreationService",{enumerable:!0,get:a(function(){return Jse.GenericAssetCreationService},"get")});var Zse=$L();Object.defineProperty(g,"ArchiveAssetService",{enumerable:!0,get:a(function(){return Zse.ArchiveAssetService},"get")});var eoe=BL();Object.defineProperty(g,"FixMissingLabelService",{enumerable:!0,get:a(function(){return eoe.FixMissingLabelService},"get")});var toe=VL();Object.defineProperty(g,"GraphQueryService",{enumerable:!0,get:a(function(){return toe.GraphQueryService},"get")});var roe=qL();Object.defineProperty(g,"TypeRegistry",{enumerable:!0,get:a(function(){return roe.TypeRegistry},"get")});var noe=WL();Object.defineProperty(g,"SPARQL_PREFIXES",{enumerable:!0,get:a(function(){return noe.SPARQL_PREFIXES},"get")});var ioe=Tl();Object.defineProperty(g,"FrontmatterService",{enumerable:!0,get:a(function(){return ioe.FrontmatterService},"get")});var sj=Cu();Object.defineProperty(g,"serializeYamlScalar",{enumerable:!0,get:a(function(){return sj.serializeYamlScalar},"get")});Object.defineProperty(g,"STRING_SCALAR_PROPERTIES",{enumerable:!0,get:a(function(){return sj.STRING_SCALAR_PROPERTIES},"get")});var soe=ck();Object.defineProperty(g,"parseYamlFrontmatterTolerant",{enumerable:!0,get:a(function(){return soe.parseYamlFrontmatterTolerant},"get")});var ooe=ps();Object.defineProperty(g,"DateFormatter",{enumerable:!0,get:a(function(){return ooe.DateFormatter},"get")});var aoe=eo();Object.defineProperty(g,"WikiLinkHelpers",{enumerable:!0,get:a(function(){return aoe.WikiLinkHelpers},"get")});var coe=Il();Object.defineProperty(g,"MetadataHelpers",{enumerable:!0,get:a(function(){return coe.MetadataHelpers},"get")});var loe=lk();Object.defineProperty(g,"MetadataExtractor",{enumerable:!0,get:a(function(){return loe.MetadataExtractor},"get")});var uoe=uk();Object.defineProperty(g,"EffortSortingHelpers",{enumerable:!0,get:a(function(){return uoe.EffortSortingHelpers},"get")});var foe=fk();Object.defineProperty(g,"FilenameValidator",{enumerable:!0,get:a(function(){return foe.FilenameValidator},"get")});var doe=_k();Object.defineProperty(g,"RDFSerializer",{enumerable:!0,get:a(function(){return doe.RDFSerializer},"get")});var poe=Dp();Object.defineProperty(g,"NullLogger",{enumerable:!0,get:a(function(){return poe.NullLogger},"get")});var $R=M0();Object.defineProperty(g,"vaultPathToIRI",{enumerable:!0,get:a(function(){return $R.vaultPathToIRI},"get")});Object.defineProperty(g,"iriToVaultPath",{enumerable:!0,get:a(function(){return $R.iriToVaultPath},"get")});Object.defineProperty(g,"OBSIDIAN_VAULT_SCHEME",{enumerable:!0,get:a(function(){return $R.OBSIDIAN_VAULT_SCHEME},"get")});var hoe=KT();Object.defineProperty(g,"InMemoryTripleStore",{enumerable:!0,get:a(function(){return hoe.InMemoryTripleStore},"get")});var moe=Le();Object.defineProperty(g,"DomainIRI",{enumerable:!0,get:a(function(){return moe.IRI},"get")});var goe=Ye();Object.defineProperty(g,"DomainLiteral",{enumerable:!0,get:a(function(){return goe.Literal},"get")});var yoe=rr();Object.defineProperty(g,"DomainBlankNode",{enumerable:!0,get:a(function(){return yoe.BlankNode},"get")});var _oe=hi();Object.defineProperty(g,"DomainTriple",{enumerable:!0,get:a(function(){return _oe.Triple},"get")});var boe=_T();Object.defineProperty(g,"RDFVocabularyMapper",{enumerable:!0,get:a(function(){return boe.RDFVocabularyMapper},"get")});var Soe=bk();Object.defineProperty(g,"RDFSInferenceEngine",{enumerable:!0,get:a(function(){return Soe.RDFSInferenceEngine},"get")});var woe=EA();Object.defineProperty(g,"NonInheritablePropertyRegistry",{enumerable:!0,get:a(function(){return woe.NonInheritablePropertyRegistry},"get")});var Eoe=AA();Object.defineProperty(g,"PropertyCardinalityRegistry",{enumerable:!0,get:a(function(){return Eoe.PropertyCardinalityRegistry},"get")});var oj=CA();Object.defineProperty(g,"PrototypeChainMaterializer",{enumerable:!0,get:a(function(){return oj.PrototypeChainMaterializer},"get")});Object.defineProperty(g,"INFERRED_GRAPH",{enumerable:!0,get:a(function(){return oj.INFERRED_GRAPH},"get")});var voe=Ik();Object.defineProperty(g,"IRICanonicalizer",{enumerable:!0,get:a(function(){return voe.IRICanonicalizer},"get")});var UR=$0();Object.defineProperty(g,"derivePath",{enumerable:!0,get:a(function(){return UR.derivePath},"get")});Object.defineProperty(g,"deriveUrl",{enumerable:!0,get:a(function(){return UR.deriveUrl},"get")});Object.defineProperty(g,"deriveLegacyFlatPath",{enumerable:!0,get:a(function(){return UR.deriveLegacyFlatPath},"get")});var BR=U0();Object.defineProperty(g,"discoverFileSpaceExclusions",{enumerable:!0,get:a(function(){return BR.discoverFileSpaceExclusions},"get")});Object.defineProperty(g,"frontmatterDeclaresFileSpace",{enumerable:!0,get:a(function(){return BR.frontmatterDeclaresFileSpace},"get")});Object.defineProperty(g,"FILE_SPACE_CLASS_UID",{enumerable:!0,get:a(function(){return BR.FILE_SPACE_CLASS_UID},"get")});var aj=Rk();Object.defineProperty(g,"LazyAssetGraphLoader",{enumerable:!0,get:a(function(){return aj.LazyAssetGraphLoader},"get")});Object.defineProperty(g,"MAX_LAZY_DEPTH",{enumerable:!0,get:a(function(){return aj.MAX_LAZY_DEPTH},"get")});var cj=DA();Object.defineProperty(g,"SourceAnnotator",{enumerable:!0,get:a(function(){return cj.SourceAnnotator},"get")});Object.defineProperty(g,"SOURCE_VARIABLE",{enumerable:!0,get:a(function(){return cj.SOURCE_VARIABLE},"get")});var zh=vl();Object.defineProperty(g,"NoteToRDFConverter",{enumerable:!0,get:a(function(){return zh.NoteToRDFConverter},"get")});Object.defineProperty(g,"normaliseExcludedFolders",{enumerable:!0,get:a(function(){return zh.normaliseExcludedFolders},"get")});Object.defineProperty(g,"isPathExcluded",{enumerable:!0,get:a(function(){return zh.isPathExcluded},"get")});Object.defineProperty(g,"UNPREFIXED_ASSET_FIELDS",{enumerable:!0,get:a(function(){return zh.UNPREFIXED_ASSET_FIELDS},"get")});Object.defineProperty(g,"canonicalYamlKey",{enumerable:!0,get:a(function(){return zh.canonicalYamlKey},"get")});var VR=Uu();Object.defineProperty(g,"ExoQLParser",{enumerable:!0,get:a(function(){return VR.ExoQLParser},"get")});Object.defineProperty(g,"SPARQLParser",{enumerable:!0,get:a(function(){return VR.SPARQLParser},"get")});Object.defineProperty(g,"SPARQLParseError",{enumerable:!0,get:a(function(){return VR.SPARQLParseError},"get")});var lj=a1();Object.defineProperty(g,"DescribeOptionsTransformer",{enumerable:!0,get:a(function(){return lj.DescribeOptionsTransformer},"get")});Object.defineProperty(g,"DescribeOptionsTransformerError",{enumerable:!0,get:a(function(){return lj.DescribeOptionsTransformerError},"get")});var uj=Hu();Object.defineProperty(g,"ExoQLAlgebraTranslator",{enumerable:!0,get:a(function(){return uj.ExoQLAlgebraTranslator},"get")});Object.defineProperty(g,"AlgebraTranslator",{enumerable:!0,get:a(function(){return uj.AlgebraTranslator},"get")});var Toe=Ck();Object.defineProperty(g,"AlgebraOptimizer",{enumerable:!0,get:a(function(){return Toe.AlgebraOptimizer},"get")});var Aoe=xk();Object.defineProperty(g,"AlgebraSerializer",{enumerable:!0,get:a(function(){return Aoe.AlgebraSerializer},"get")});var Ioe=C1();Object.defineProperty(g,"BGPExecutor",{enumerable:!0,get:a(function(){return Ioe.BGPExecutor},"get")});var Roe=u0();Object.defineProperty(g,"FilterExecutor",{enumerable:!0,get:a(function(){return Roe.FilterExecutor},"get")});var Coe=z1();Object.defineProperty(g,"OptionalExecutor",{enumerable:!0,get:a(function(){return Coe.OptionalExecutor},"get")});var xoe=Y1();Object.defineProperty(g,"UnionExecutor",{enumerable:!0,get:a(function(){return xoe.UnionExecutor},"get")});var Ooe=nT();Object.defineProperty(g,"ConstructExecutor",{enumerable:!0,get:a(function(){return Ooe.ConstructExecutor},"get")});var Poe=Pk();Object.defineProperty(g,"DescribeExecutor",{enumerable:!0,get:a(function(){return Poe.DescribeExecutor},"get")});var fj=df();Object.defineProperty(g,"ExoQLQueryExecutor",{enumerable:!0,get:a(function(){return fj.ExoQLQueryExecutor},"get")});Object.defineProperty(g,"QueryExecutor",{enumerable:!0,get:a(function(){return fj.QueryExecutor},"get")});var dj=Dk();Object.defineProperty(g,"UpdateExecutor",{enumerable:!0,get:a(function(){return dj.UpdateExecutor},"get")});Object.defineProperty(g,"UpdateExecutorError",{enumerable:!0,get:a(function(){return dj.UpdateExecutorError},"get")});var Foe=Ko();Object.defineProperty(g,"SolutionMapping",{enumerable:!0,get:a(function(){return Foe.SolutionMapping},"get")});var Doe=l0();Object.defineProperty(g,"BuiltInFunctions",{enumerable:!0,get:a(function(){return Doe.BuiltInFunctions},"get")});var Loe=Nk();Object.defineProperty(g,"AggregateFunctions",{enumerable:!0,get:a(function(){return Loe.AggregateFunctions},"get")});var pj=$y();Object.defineProperty(g,"CustomAggregateRegistry",{enumerable:!0,get:a(function(){return pj.CustomAggregateRegistry},"get")});Object.defineProperty(g,"CustomAggregateError",{enumerable:!0,get:a(function(){return pj.CustomAggregateError},"get")});var wo=By();Object.defineProperty(g,"BUILT_IN_AGGREGATES",{enumerable:!0,get:a(function(){return wo.BUILT_IN_AGGREGATES},"get")});Object.defineProperty(g,"EXO_AGGREGATE_NS",{enumerable:!0,get:a(function(){return wo.EXO_AGGREGATE_NS},"get")});Object.defineProperty(g,"medianAggregate",{enumerable:!0,get:a(function(){return wo.medianAggregate},"get")});Object.defineProperty(g,"varianceAggregate",{enumerable:!0,get:a(function(){return wo.varianceAggregate},"get")});Object.defineProperty(g,"stddevAggregate",{enumerable:!0,get:a(function(){return wo.stddevAggregate},"get")});Object.defineProperty(g,"modeAggregate",{enumerable:!0,get:a(function(){return wo.modeAggregate},"get")});Object.defineProperty(g,"createPercentileAggregate",{enumerable:!0,get:a(function(){return wo.createPercentileAggregate},"get")});Object.defineProperty(g,"getNumericValue",{enumerable:!0,get:a(function(){return wo.getNumericValue},"get")});Object.defineProperty(g,"createDecimalLiteral",{enumerable:!0,get:a(function(){return wo.createDecimalLiteral},"get")});Object.defineProperty(g,"createDoubleLiteral",{enumerable:!0,get:a(function(){return wo.createDoubleLiteral},"get")});var Noe=kk();Object.defineProperty(g,"QueryPlanCache",{enumerable:!0,get:a(function(){return Noe.QueryPlanCache},"get")});var hj=Mk();Object.defineProperty(g,"SPARQLResultCache",{enumerable:!0,get:a(function(){return hj.SPARQLResultCache},"get")});Object.defineProperty(g,"createSPARQLResultCache",{enumerable:!0,get:a(function(){return hj.createSPARQLResultCache},"get")});var mj=jk();Object.defineProperty(g,"IncrementalIndexer",{enumerable:!0,get:a(function(){return mj.IncrementalIndexer},"get")});Object.defineProperty(g,"createIncrementalIndexer",{enumerable:!0,get:a(function(){return mj.createIncrementalIndexer},"get")});var koe=$k();Object.defineProperty(g,"ResultSerializer",{enumerable:!0,get:a(function(){return koe.ResultSerializer},"get")});var gj=i1();Object.defineProperty(g,"CaseWhenTransformer",{enumerable:!0,get:a(function(){return gj.CaseWhenTransformer},"get")});Object.defineProperty(g,"CaseWhenTransformerError",{enumerable:!0,get:a(function(){return gj.CaseWhenTransformerError},"get")});var Moe=f1();Object.defineProperty(g,"VaultPrefixTransformer",{enumerable:!0,get:a(function(){return Moe.VaultPrefixTransformer},"get")});var joe=NA();Object.defineProperty(g,"FilterContainsOptimizer",{enumerable:!0,get:a(function(){return joe.FilterContainsOptimizer},"get")});var yj=Uk();Object.defineProperty(g,"FileNotFoundError",{enumerable:!0,get:a(function(){return yj.FileNotFoundError},"get")});Object.defineProperty(g,"FileAlreadyExistsError",{enumerable:!0,get:a(function(){return yj.FileAlreadyExistsError},"get")});var GR=qT();Object.defineProperty(g,"TripleAlreadyExistsError",{enumerable:!0,get:a(function(){return GR.TripleAlreadyExistsError},"get")});Object.defineProperty(g,"TripleNotFoundError",{enumerable:!0,get:a(function(){return GR.TripleNotFoundError},"get")});Object.defineProperty(g,"TransactionError",{enumerable:!0,get:a(function(){return GR.TransactionError},"get")});var _j=qp();Object.defineProperty(g,"liveClock",{enumerable:!0,get:a(function(){return _j.liveClock},"get")});Object.defineProperty(g,"frozenClock",{enumerable:!0,get:a(function(){return _j.frozenClock},"get")});var bj=R0();Object.defineProperty(g,"liveUidGenerator",{enumerable:!0,get:a(function(){return bj.liveUidGenerator},"get")});Object.defineProperty(g,"seededUidGenerator",{enumerable:!0,get:a(function(){return bj.seededUidGenerator},"get")});var Vb=KA();Object.defineProperty(g,"VaultSettings",{enumerable:!0,get:a(function(){return Vb.VaultSettings},"get")});Object.defineProperty(g,"DEFAULT_OWNER_IDENTITY",{enumerable:!0,get:a(function(){return Vb.DEFAULT_OWNER_IDENTITY},"get")});Object.defineProperty(g,"DEFAULT_INBOX_FOLDER",{enumerable:!0,get:a(function(){return Vb.DEFAULT_INBOX_FOLDER},"get")});Object.defineProperty(g,"DEFAULT_FLEETING_NOTE_CLASS_UID",{enumerable:!0,get:a(function(){return Vb.DEFAULT_FLEETING_NOTE_CLASS_UID},"get")});var $oe=Qn();Object.defineProperty(g,"DI_TOKENS",{enumerable:!0,get:a(function(){return $oe.DI_TOKENS},"get")});var Kh=Bk();Object.defineProperty(g,"registerCoreServices",{enumerable:!0,get:a(function(){return Kh.registerCoreServices},"get")});Object.defineProperty(g,"createChildContainer",{enumerable:!0,get:a(function(){return Kh.createChildContainer},"get")});Object.defineProperty(g,"getContainer",{enumerable:!0,get:a(function(){return Kh.getContainer},"get")});Object.defineProperty(g,"resetContainer",{enumerable:!0,get:a(function(){return Kh.resetContainer},"get")});Object.defineProperty(g,"container",{enumerable:!0,get:a(function(){return Kh.container},"get")});var wa=zk();Object.defineProperty(g,"NODE_FLAGS",{enumerable:!0,get:a(function(){return wa.NODE_FLAGS},"get")});Object.defineProperty(g,"DEFAULT_COLORS",{enumerable:!0,get:a(function(){return wa.DEFAULT_COLORS},"get")});Object.defineProperty(g,"StringTable",{enumerable:!0,get:a(function(){return wa.StringTable},"get")});Object.defineProperty(g,"CompactGraphStore",{enumerable:!0,get:a(function(){return wa.CompactGraphStore},"get")});Object.defineProperty(g,"MemoryPool",{enumerable:!0,get:a(function(){return wa.MemoryPool},"get")});Object.defineProperty(g,"getGlobalPool",{enumerable:!0,get:a(function(){return wa.getGlobalPool},"get")});Object.defineProperty(g,"resetGlobalPool",{enumerable:!0,get:a(function(){return wa.resetGlobalPool},"get")});Object.defineProperty(g,"StreamingLoader",{enumerable:!0,get:a(function(){return wa.StreamingLoader},"get")});Object.defineProperty(g,"createStreamingSource",{enumerable:!0,get:a(function(){return wa.createStreamingSource},"get")});var Sj=Kk();Object.defineProperty(g,"ExoQL",{enumerable:!0,get:a(function(){return Sj.ExoQL},"get")});Object.defineProperty(g,"ExoQLError",{enumerable:!0,get:a(function(){return Sj.ExoQLError},"get")});var Yh=Y_();Object.defineProperty(g,"LAYOUT_CLASS_IRI",{enumerable:!0,get:a(function(){return Yh.LAYOUT_CLASS_IRI},"get")});Object.defineProperty(g,"LAYOUT_CLASS_UID",{enumerable:!0,get:a(function(){return Yh.LAYOUT_CLASS_UID},"get")});Object.defineProperty(g,"createLayoutFromFrontmatter",{enumerable:!0,get:a(function(){return Yh.createLayoutFromFrontmatter},"get")});Object.defineProperty(g,"isLayout",{enumerable:!0,get:a(function(){return Yh.isLayout},"get")});Object.defineProperty(g,"isLayoutFrontmatter",{enumerable:!0,get:a(function(){return Yh.isLayoutFrontmatter},"get")});var Fs=Y_();Object.defineProperty(g,"BACKLINKS_TABLE_BLOCK_CLASS_IRI",{enumerable:!0,get:a(function(){return Fs.BACKLINKS_TABLE_BLOCK_CLASS_IRI},"get")});Object.defineProperty(g,"BACKLINKS_TABLE_BLOCK_CLASS_UID",{enumerable:!0,get:a(function(){return Fs.BACKLINKS_TABLE_BLOCK_CLASS_UID},"get")});Object.defineProperty(g,"DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_IRI",{enumerable:!0,get:a(function(){return Fs.DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_IRI},"get")});Object.defineProperty(g,"DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_UID",{enumerable:!0,get:a(function(){return Fs.DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_UID},"get")});Object.defineProperty(g,"PROPERTIES_BLOCK_CLASS_IRI",{enumerable:!0,get:a(function(){return Fs.PROPERTIES_BLOCK_CLASS_IRI},"get")});Object.defineProperty(g,"PROPERTIES_BLOCK_CLASS_UID",{enumerable:!0,get:a(function(){return Fs.PROPERTIES_BLOCK_CLASS_UID},"get")});Object.defineProperty(g,"createLayoutBlockFromFrontmatter",{enumerable:!0,get:a(function(){return Fs.createLayoutBlockFromFrontmatter},"get")});Object.defineProperty(g,"isBacklinksTableBlock",{enumerable:!0,get:a(function(){return Fs.isBacklinksTableBlock},"get")});Object.defineProperty(g,"isDailyEffortsByClassBlock",{enumerable:!0,get:a(function(){return Fs.isDailyEffortsByClassBlock},"get")});Object.defineProperty(g,"isLayoutBlockFrontmatter",{enumerable:!0,get:a(function(){return Fs.isLayoutBlockFrontmatter},"get")});Object.defineProperty(g,"isPropertiesBlock",{enumerable:!0,get:a(function(){return Fs.isPropertiesBlock},"get")});var yc=Y_();Object.defineProperty(g,"BUILTIN_DAILY_EFFORTS_VISIBILITY",{enumerable:!0,get:a(function(){return yc.BUILTIN_DAILY_EFFORTS_VISIBILITY},"get")});Object.defineProperty(g,"DAILY_EFFORTS_OVERRIDE_KEYS",{enumerable:!0,get:a(function(){return yc.DAILY_EFFORTS_OVERRIDE_KEYS},"get")});Object.defineProperty(g,"coerceVisibilityOverride",{enumerable:!0,get:a(function(){return yc.coerceVisibilityOverride},"get")});Object.defineProperty(g,"resolveBlockVisibility",{enumerable:!0,get:a(function(){return yc.resolveBlockVisibility},"get")});Object.defineProperty(g,"resolveDailyEffortVisibility",{enumerable:!0,get:a(function(){return yc.resolveDailyEffortVisibility},"get")});Object.defineProperty(g,"EMS_ACTION_CLASS_UID",{enumerable:!0,get:a(function(){return yc.EMS_ACTION_CLASS_UID},"get")});Object.defineProperty(g,"EMS_PROJECT_CLASS_UID",{enumerable:!0,get:a(function(){return yc.EMS_PROJECT_CLASS_UID},"get")});Object.defineProperty(g,"partitionDailyEffortsByClass",{enumerable:!0,get:a(function(){return yc.partitionDailyEffortsByClass},"get")});var wj=aM();Object.defineProperty(g,"LayoutSelector",{enumerable:!0,get:a(function(){return wj.LayoutSelector},"get")});Object.defineProperty(g,"selectByPriority",{enumerable:!0,get:a(function(){return wj.selectByPriority},"get")});Ai(gM(),g);var Uoe=yM();Object.defineProperty(g,"ShapeLoader",{enumerable:!0,get:a(function(){return Uoe.ShapeLoader},"get")});var Boe=yI();Object.defineProperty(g,"ShapeRegistry",{enumerable:!0,get:a(function(){return Boe.ShapeRegistry},"get")});var Voe=Yt();Object.defineProperty(g,"Namespace",{enumerable:!0,get:a(function(){return Voe.Namespace},"get")});var Ej=EI();Object.defineProperty(g,"shaclValidate",{enumerable:!0,get:a(function(){return Ej.validate},"get")});Object.defineProperty(g,"ShaclShapeRegistry",{enumerable:!0,get:a(function(){return Ej.ShapeRegistry},"get")});Ai(bM(),g);var Goe=SM();Object.defineProperty(g,"TripleClassHierarchy",{enumerable:!0,get:a(function(){return Goe.ClassHierarchy},"get")});var vj=II();Object.defineProperty(g,"parseTarball",{enumerable:!0,get:a(function(){return vj.parseTarball},"get")});Object.defineProperty(g,"parseTarballGzip",{enumerable:!0,get:a(function(){return vj.parseTarballGzip},"get")});var Tj=db();Object.defineProperty(g,"restCreateCommit",{enumerable:!0,get:a(function(){return Tj.restCreateCommit},"get")});Object.defineProperty(g,"isBinaryPayload",{enumerable:!0,get:a(function(){return Tj.isBinaryPayload},"get")});var _c=RM();Object.defineProperty(g,"mountAssetSpaceFiles",{enumerable:!0,get:a(function(){return _c.mountAssetSpaceFiles},"get")});Object.defineProperty(g,"discoverAssetSpaceWrapperDir",{enumerable:!0,get:a(function(){return _c.discoverWrapperDir},"get")});Object.defineProperty(g,"extractAssetSpaceSha",{enumerable:!0,get:a(function(){return _c.extractShaFromWrapper},"get")});Object.defineProperty(g,"appendGitmodulesEntry",{enumerable:!0,get:a(function(){return _c.appendGitmodulesEntry},"get")});Object.defineProperty(g,"stripGitmodulesEntry",{enumerable:!0,get:a(function(){return _c.stripGitmodulesEntry},"get")});Object.defineProperty(g,"escapeGitmodulesRegex",{enumerable:!0,get:a(function(){return _c.escapeGitmodulesRegex},"get")});Object.defineProperty(g,"MATERIALIZE_PROGRESS_INTERVAL",{enumerable:!0,get:a(function(){return _c.MATERIALIZE_PROGRESS_INTERVAL},"get")});Object.defineProperty(g,"MATERIALIZE_PROGRESS_MIN_FILES",{enumerable:!0,get:a(function(){return _c.MATERIALIZE_PROGRESS_MIN_FILES},"get")});var Aj=Ah();Object.defineProperty(g,"detectChanges",{enumerable:!0,get:a(function(){return Aj.detectChanges},"get")});Object.defineProperty(g,"extractAssetUid",{enumerable:!0,get:a(function(){return Aj.extractAssetUid},"get")});var qoe=Wf();Object.defineProperty(g,"gitBlobSha",{enumerable:!0,get:a(function(){return qoe.gitBlobSha},"get")});var qR=PM();Object.defineProperty(g,"rewriteAssetUid",{enumerable:!0,get:a(function(){return qR.rewriteAssetUid},"get")});Object.defineProperty(g,"findDuplicateUidGroups",{enumerable:!0,get:a(function(){return qR.findDuplicateUidGroups},"get")});Object.defineProperty(g,"planDuplicateUidFix",{enumerable:!0,get:a(function(){return qR.planDuplicateUidFix},"get")});var Qh=Hf();Object.defineProperty(g,"getBlobBytes",{enumerable:!0,get:a(function(){return Qh.getBlobBytes},"get")});Object.defineProperty(g,"getBlobText",{enumerable:!0,get:a(function(){return Qh.getBlobText},"get")});Object.defineProperty(g,"getCommitInfo",{enumerable:!0,get:a(function(){return Qh.getCommitInfo},"get")});Object.defineProperty(g,"getHeadSha",{enumerable:!0,get:a(function(){return Qh.getHeadSha},"get")});Object.defineProperty(g,"getTree",{enumerable:!0,get:a(function(){return Qh.getTree},"get")});var Woe=LM();Object.defineProperty(g,"checkParkedStaleness",{enumerable:!0,get:a(function(){return Woe.checkParkedStaleness},"get")});var rd=ZM();Object.defineProperty(g,"DEFAULT_MAX_PUSH_RETRIES",{enumerable:!0,get:a(function(){return rd.DEFAULT_MAX_PUSH_RETRIES},"get")});Object.defineProperty(g,"DEFAULT_LOCAL_MANIFEST_REHASH_MS",{enumerable:!0,get:a(function(){return rd.DEFAULT_LOCAL_MANIFEST_REHASH_MS},"get")});Object.defineProperty(g,"SyncEngine",{enumerable:!0,get:a(function(){return rd.SyncEngine},"get")});Object.defineProperty(g,"isNonFastForwardError",{enumerable:!0,get:a(function(){return rd.isNonFastForwardError},"get")});Object.defineProperty(g,"orderChildrenFirst",{enumerable:!0,get:a(function(){return rd.orderChildrenFirst},"get")});Object.defineProperty(g,"syncProgressPhaseText",{enumerable:!0,get:a(function(){return rd.syncProgressPhaseText},"get")});var Ds=NI();Object.defineProperty(g,"SyncPhaseTimer",{enumerable:!0,get:a(function(){return Ds.SyncPhaseTimer},"get")});Object.defineProperty(g,"SYNC_PHASES",{enumerable:!0,get:a(function(){return Ds.SYNC_PHASES},"get")});Object.defineProperty(g,"classifyRestPhase",{enumerable:!0,get:a(function(){return Ds.classifyRestPhase},"get")});Object.defineProperty(g,"emptyTimings",{enumerable:!0,get:a(function(){return Ds.emptyTimings},"get")});Object.defineProperty(g,"addTimings",{enumerable:!0,get:a(function(){return Ds.addTimings},"get")});Object.defineProperty(g,"aggregateTimings",{enumerable:!0,get:a(function(){return Ds.aggregateTimings},"get")});Object.defineProperty(g,"totalMs",{enumerable:!0,get:a(function(){return Ds.totalMs},"get")});Object.defineProperty(g,"dominantPhase",{enumerable:!0,get:a(function(){return Ds.dominantPhase},"get")});Object.defineProperty(g,"fmtMs",{enumerable:!0,get:a(function(){return Ds.fmtMs},"get")});Object.defineProperty(g,"formatTimingsLine",{enumerable:!0,get:a(function(){return Ds.formatTimingsLine},"get")});Object.defineProperty(g,"formatRepoTimings",{enumerable:!0,get:a(function(){return Ds.formatRepoTimings},"get")});var Ij=t4();Object.defineProperty(g,"QuarantineResolver",{enumerable:!0,get:a(function(){return Ij.QuarantineResolver},"get")});Object.defineProperty(g,"backupPathFor",{enumerable:!0,get:a(function(){return Ij.backupPathFor},"get")});var Xh=Sb();Object.defineProperty(g,"DEFAULT_MAX_FILE_BYTES",{enumerable:!0,get:a(function(){return Xh.DEFAULT_MAX_FILE_BYTES},"get")});Object.defineProperty(g,"InMemoryQuarantineStore",{enumerable:!0,get:a(function(){return Xh.InMemoryQuarantineStore},"get")});Object.defineProperty(g,"contentEquals",{enumerable:!0,get:a(function(){return Xh.contentEquals},"get")});Object.defineProperty(g,"isFileSpaceSyncablePath",{enumerable:!0,get:a(function(){return Xh.isFileSpaceSyncablePath},"get")});Object.defineProperty(g,"isSyncablePath",{enumerable:!0,get:a(function(){return Xh.isSyncablePath},"get")});var Rj=r4();Object.defineProperty(g,"FileLocalManifestStore",{enumerable:!0,get:a(function(){return Rj.FileLocalManifestStore},"get")});Object.defineProperty(g,"LOCAL_MANIFEST_STORE_FILENAME",{enumerable:!0,get:a(function(){return Rj.LOCAL_MANIFEST_STORE_FILENAME},"get")});var Hoe=JI();Object.defineProperty(g,"diff3",{enumerable:!0,get:a(function(){return Hoe.diff3},"get")});var Cj=s4();Object.defineProperty(g,"StructuredMerger",{enumerable:!0,get:a(function(){return Cj.StructuredMerger},"get")});Object.defineProperty(g,"splitSections",{enumerable:!0,get:a(function(){return Cj.splitSections},"get")});var zoe=o4();Object.defineProperty(g,"MergeShaclGate",{enumerable:!0,get:a(function(){return zoe.MergeShaclGate},"get")});var Koe=a4();Object.defineProperty(g,"GatedStructuredMerger",{enumerable:!0,get:a(function(){return Koe.GatedStructuredMerger},"get")});var xj=c4();Object.defineProperty(g,"FileWatermarkStore",{enumerable:!0,get:a(function(){return xj.FileWatermarkStore},"get")});Object.defineProperty(g,"WATERMARK_STORE_FILENAME",{enumerable:!0,get:a(function(){return xj.WATERMARK_STORE_FILENAME},"get")});var Oj=l4();Object.defineProperty(g,"FileMountBaseStore",{enumerable:!0,get:a(function(){return Oj.FileMountBaseStore},"get")});Object.defineProperty(g,"MOUNT_BASE_STORE_FILENAME",{enumerable:!0,get:a(function(){return Oj.MOUNT_BASE_STORE_FILENAME},"get")});var Yoe=yb();Object.defineProperty(g,"isAuthError",{enumerable:!0,get:a(function(){return Yoe.isAuthError},"get")});var Jh=bb();Object.defineProperty(g,"isRateLimitError",{enumerable:!0,get:a(function(){return Jh.isRateLimitError},"get")});Object.defineProperty(g,"withRateLimitBackoff",{enumerable:!0,get:a(function(){return Jh.withRateLimitBackoff},"get")});Object.defineProperty(g,"createRateLimitBudget",{enumerable:!0,get:a(function(){return Jh.createRateLimitBudget},"get")});Object.defineProperty(g,"MIN_RATE_LIMIT_WAIT_MS",{enumerable:!0,get:a(function(){return Jh.MIN_RATE_LIMIT_WAIT_MS},"get")});Object.defineProperty(g,"DEFAULT_MAX_RETRIES",{enumerable:!0,get:a(function(){return Jh.DEFAULT_MAX_RETRIES},"get")});var nd=VI();Object.defineProperty(g,"caseInsensitiveHeaderGetter",{enumerable:!0,get:a(function(){return nd.caseInsensitiveHeaderGetter},"get")});Object.defineProperty(g,"parseRetryAfterMs",{enumerable:!0,get:a(function(){return nd.parseRetryAfterMs},"get")});Object.defineProperty(g,"extractRateLimitFields",{enumerable:!0,get:a(function(){return nd.extractRateLimitFields},"get")});Object.defineProperty(g,"getRateLimitFields",{enumerable:!0,get:a(function(){return nd.getRateLimitFields},"get")});Object.defineProperty(g,"attachRateLimitFields",{enumerable:!0,get:a(function(){return nd.attachRateLimitFields},"get")});Object.defineProperty(g,"enrichRateLimitError",{enumerable:!0,get:a(function(){return nd.enrichRateLimitError},"get")});var Pj=$I();Object.defineProperty(g,"redactSecrets",{enumerable:!0,get:a(function(){return Pj.redactSecrets},"get")});Object.defineProperty(g,"scanForSecrets",{enumerable:!0,get:a(function(){return Pj.scanForSecrets},"get")});var Fj=u4();Object.defineProperty(g,"LocalConflictCacheStore",{enumerable:!0,get:a(function(){return Fj.LocalConflictCacheStore},"get")});Object.defineProperty(g,"CONFLICT_CACHE_STORE_FILENAME",{enumerable:!0,get:a(function(){return Fj.CONFLICT_CACHE_STORE_FILENAME},"get")});var WR=gb();Object.defineProperty(g,"LocalOutboxStore",{enumerable:!0,get:a(function(){return WR.LocalOutboxStore},"get")});Object.defineProperty(g,"OUTBOX_STORE_FILENAME",{enumerable:!0,get:a(function(){return WR.OUTBOX_STORE_FILENAME},"get")});Object.defineProperty(g,"OUTBOX_REMOTE_ABSENT",{enumerable:!0,get:a(function(){return WR.OUTBOX_REMOTE_ABSENT},"get")});var bc=dR();Object.defineProperty(g,"ASSET_SPACE_CLASS_UID",{enumerable:!0,get:a(function(){return bc.ASSET_SPACE_CLASS_UID},"get")});Object.defineProperty(g,"SYNC_BRANCH",{enumerable:!0,get:a(function(){return bc.SYNC_BRANCH},"get")});Object.defineProperty(g,"SpaceSpecAccumulator",{enumerable:!0,get:a(function(){return bc.SpaceSpecAccumulator},"get")});Object.defineProperty(g,"classifySpaceDeclaration",{enumerable:!0,get:a(function(){return bc.classifySpaceDeclaration},"get")});Object.defineProperty(g,"isAssetSpaceFrontmatter",{enumerable:!0,get:a(function(){return bc.isAssetSpaceFrontmatter},"get")});Object.defineProperty(g,"isFileSpaceFrontmatter",{enumerable:!0,get:a(function(){return bc.isFileSpaceFrontmatter},"get")});Object.defineProperty(g,"parseStrictGitHubRepoURL",{enumerable:!0,get:a(function(){return bc.parseStrictGitHubRepoURL},"get")});Object.defineProperty(g,"readSpaceSource",{enumerable:!0,get:a(function(){return bc.readSpaceSource},"get")});var Dj=_4();Object.defineProperty(g,"buildAssetSpaceDescriptor",{enumerable:!0,get:a(function(){return Dj.buildAssetSpaceDescriptor},"get")});Object.defineProperty(g,"deriveAssetSpaceNamespace",{enumerable:!0,get:a(function(){return Dj.deriveAssetSpaceNamespace},"get")});var Lj=T4();Object.defineProperty(g,"ParityValidator",{enumerable:!0,get:a(function(){return Lj.ParityValidator},"get")});Object.defineProperty(g,"summarizeParityRound",{enumerable:!0,get:a(function(){return Lj.summarizeParityRound},"get")});var Nj=hR();Object.defineProperty(g,"compareAssetSemantics",{enumerable:!0,get:a(function(){return Nj.compareAssetSemantics},"get")});Object.defineProperty(g,"isFormatOnlyDrift",{enumerable:!0,get:a(function(){return Nj.isFormatOnlyDrift},"get")});Ai(N4(),g);Ai(q4(),g);var Qoe=OR();Object.defineProperty(g,"resolvePreferenceList",{enumerable:!0,get:a(function(){return Qoe.resolvePreferenceList},"get")});var Xoe=FR();Object.defineProperty(g,"unwrapLinkTarget",{enumerable:!0,get:a(function(){return Xoe.unwrapLinkTarget},"get")});var HR=Au();Object.defineProperty(g,"EFFORT_STATUS_UID",{enumerable:!0,get:a(function(){return HR.EFFORT_STATUS_UID},"get")});Object.defineProperty(g,"EFFORT_STATUS_BY_UID",{enumerable:!0,get:a(function(){return HR.EFFORT_STATUS_BY_UID},"get")});Object.defineProperty(g,"normalizeEffortStatus",{enumerable:!0,get:a(function(){return HR.normalizeEffortStatus},"get")});var Joe=DR();Object.defineProperty(g,"DEFAULT_DISPLAY_NAME_SETTINGS",{enumerable:!0,get:a(function(){return Joe.DEFAULT_DISPLAY_NAME_SETTINGS},"get")});var Zoe=H4();Object.defineProperty(g,"PrintNameRuleService",{enumerable:!0,get:a(function(){return Zoe.PrintNameRuleService},"get")});var kj=z4();Object.defineProperty(g,"DisplayNameResolver",{enumerable:!0,get:a(function(){return kj.DisplayNameResolver},"get")});Object.defineProperty(g,"createDefaultResolver",{enumerable:!0,get:a(function(){return kj.createDefaultResolver},"get")});var zR=kR();Object.defineProperty(g,"DisplayNameTemplateEngine",{enumerable:!0,get:a(function(){return zR.DisplayNameTemplateEngine},"get")});Object.defineProperty(g,"DISPLAY_NAME_PRESETS",{enumerable:!0,get:a(function(){return zR.DISPLAY_NAME_PRESETS},"get")});Object.defineProperty(g,"DEFAULT_DISPLAY_NAME_TEMPLATE",{enumerable:!0,get:a(function(){return zR.DEFAULT_DISPLAY_NAME_TEMPLATE},"get")});var Mj=Vh();Object.defineProperty(g,"resolveKeyPath",{enumerable:!0,get:a(function(){return Mj.resolveKeyPath},"get")});Object.defineProperty(g,"isWikilink",{enumerable:!0,get:a(function(){return Mj.isWikilink},"get")});var Gb=ej();Object.defineProperty(g,"isEffortBlocked",{enumerable:!0,get:a(function(){return Gb.isEffortBlocked},"get")});Object.defineProperty(g,"isEpisodeOngoing",{enumerable:!0,get:a(function(){return Gb.isEpisodeOngoing},"get")});Object.defineProperty(g,"localToday",{enumerable:!0,get:a(function(){return Gb.localToday},"get")});Object.defineProperty(g,"createDisplayMatcherHostFunctions",{enumerable:!0,get:a(function(){return Gb.createDisplayMatcherHostFunctions},"get")})});var Zr=v(KR=>{"use strict";KR.fromCallback=function(r){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")r.apply(this,e);else return new Promise((t,n)=>{e.push((i,s)=>i!=null?n(i):t(s)),r.apply(this,e)})},"name",{value:r.name})};KR.fromPromise=function(r){return Object.defineProperty(function(...e){let t=e[e.length-1];if(typeof t!="function")return r.apply(this,e);e.pop(),r.apply(this,e).then(n=>t(null,n),t)},"name",{value:r.name})}});var $j=v((oCe,jj)=>{var Sc=require("constants"),eae=process.cwd,qb=null,tae=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return qb||(qb=eae.call(process)),qb};try{process.cwd()}catch{}typeof process.chdir=="function"&&(YR=process.chdir,process.chdir=function(r){qb=null,YR.call(process,r)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,YR));var YR;jj.exports=rae;function rae(r){Sc.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(r),r.lutimes||t(r),r.chown=s(r.chown),r.fchown=s(r.fchown),r.lchown=s(r.lchown),r.chmod=n(r.chmod),r.fchmod=n(r.fchmod),r.lchmod=n(r.lchmod),r.chownSync=o(r.chownSync),r.fchownSync=o(r.fchownSync),r.lchownSync=o(r.lchownSync),r.chmodSync=i(r.chmodSync),r.fchmodSync=i(r.fchmodSync),r.lchmodSync=i(r.lchmodSync),r.stat=c(r.stat),r.fstat=c(r.fstat),r.lstat=c(r.lstat),r.statSync=l(r.statSync),r.fstatSync=l(r.fstatSync),r.lstatSync=l(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(f,d,p){p&&process.nextTick(p)},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(f,d,p,h){h&&process.nextTick(h)},r.lchownSync=function(){}),tae==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:(function(f){function d(p,h,m){var y=Date.now(),_=0;f(p,h,a(function b(T){if(T&&(T.code==="EACCES"||T.code==="EPERM"||T.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){r.stat(h,function(I,E){I&&I.code==="ENOENT"?f(p,h,b):m(T)})},_),_<100&&(_+=10);return}m&&m(T)},"CB"))}return a(d,"rename"),Object.setPrototypeOf&&Object.setPrototypeOf(d,f),d})(r.rename)),r.read=typeof r.read!="function"?r.read:(function(f){function d(p,h,m,y,_,b){var T;if(b&&typeof b=="function"){var I=0;T=a(function(E,S,R){if(E&&E.code==="EAGAIN"&&I<10)return I++,f.call(r,p,h,m,y,_,T);b.apply(this,arguments)},"callback")}return f.call(r,p,h,m,y,_,T)}return a(d,"read"),Object.setPrototypeOf&&Object.setPrototypeOf(d,f),d})(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:(function(f){return function(d,p,h,m,y){for(var _=0;;)try{return f.call(r,d,p,h,m,y)}catch(b){if(b.code==="EAGAIN"&&_<10){_++;continue}throw b}}})(r.readSync);function e(f){f.lchmod=function(d,p,h){f.open(d,Sc.O_WRONLY|Sc.O_SYMLINK,p,function(m,y){if(m){h&&h(m);return}f.fchmod(y,p,function(_){f.close(y,function(b){h&&h(_||b)})})})},f.lchmodSync=function(d,p){var h=f.openSync(d,Sc.O_WRONLY|Sc.O_SYMLINK,p),m=!0,y;try{y=f.fchmodSync(h,p),m=!1}finally{if(m)try{f.closeSync(h)}catch{}else f.closeSync(h)}return y}}a(e,"patchLchmod");function t(f){Sc.hasOwnProperty("O_SYMLINK")&&f.futimes?(f.lutimes=function(d,p,h,m){f.open(d,Sc.O_SYMLINK,function(y,_){if(y){m&&m(y);return}f.futimes(_,p,h,function(b){f.close(_,function(T){m&&m(b||T)})})})},f.lutimesSync=function(d,p,h){var m=f.openSync(d,Sc.O_SYMLINK),y,_=!0;try{y=f.futimesSync(m,p,h),_=!1}finally{if(_)try{f.closeSync(m)}catch{}else f.closeSync(m)}return y}):f.futimes&&(f.lutimes=function(d,p,h,m){m&&process.nextTick(m)},f.lutimesSync=function(){})}a(t,"patchLutimes");function n(f){return f&&function(d,p,h){return f.call(r,d,p,function(m){u(m)&&(m=null),h&&h.apply(this,arguments)})}}a(n,"chmodFix");function i(f){return f&&function(d,p){try{return f.call(r,d,p)}catch(h){if(!u(h))throw h}}}a(i,"chmodFixSync");function s(f){return f&&function(d,p,h,m){return f.call(r,d,p,h,function(y){u(y)&&(y=null),m&&m.apply(this,arguments)})}}a(s,"chownFix");function o(f){return f&&function(d,p,h){try{return f.call(r,d,p,h)}catch(m){if(!u(m))throw m}}}a(o,"chownFixSync");function c(f){return f&&function(d,p,h){typeof p=="function"&&(h=p,p=null);function m(y,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),h&&h.apply(this,arguments)}return a(m,"callback"),p?f.call(r,d,p,m):f.call(r,d,m)}}a(c,"statFix");function l(f){return f&&function(d,p){var h=p?f.call(r,d,p):f.call(r,d);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}a(l,"statFixSync");function u(f){if(!f||f.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(f.code==="EINVAL"||f.code==="EPERM"))}a(u,"chownErOk")}a(rae,"patch")});var Vj=v((cCe,Bj)=>{var Uj=require("stream").Stream;Bj.exports=nae;function nae(r){return{ReadStream:e,WriteStream:t};function e(n,i){if(!(this instanceof e))return new e(n,i);Uj.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),c=0,l=o.length;c<l;c++){var u=o[c];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}r.open(this.path,this.flags,this.mode,function(f,d){if(f){s.emit("error",f),s.readable=!1;return}s.fd=d,s.emit("open",d),s._read()})}function t(n,i){if(!(this instanceof t))return new t(n,i);Uj.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),o=0,c=s.length;o<c;o++){var l=s[o];this[l]=i[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=r.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}a(nae,"legacy")});var qj=v((uCe,Gj)=>{"use strict";Gj.exports=sae;var iae=Object.getPrototypeOf||function(r){return r.__proto__};function sae(r){if(r===null||typeof r!="object")return r;if(r instanceof Object)var e={__proto__:iae(r)};else var e=Object.create(null);return Object.getOwnPropertyNames(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}a(sae,"clone")});var sd=v((dCe,JR)=>{var sr=require("fs"),oae=$j(),aae=Vj(),cae=qj(),Wb=require("util"),wn,zb;typeof Symbol=="function"&&typeof Symbol.for=="function"?(wn=Symbol.for("graceful-fs.queue"),zb=Symbol.for("graceful-fs.previous")):(wn="___graceful-fs.queue",zb="___graceful-fs.previous");function lae(){}a(lae,"noop");function zj(r,e){Object.defineProperty(r,wn,{get:a(function(){return e},"get")})}a(zj,"publishQueue");var Gl=lae;Wb.debuglog?Gl=Wb.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Gl=a(function(){var r=Wb.format.apply(Wb,arguments);r="GFS4: "+r.split(/\n/).join(`
353
- GFS4: `),console.error(r)},"debug"));sr[wn]||(Wj=global[wn]||[],zj(sr,Wj),sr.close=(function(r){function e(t,n){return r.call(sr,t,function(i){i||Hj(),typeof n=="function"&&n.apply(this,arguments)})}return a(e,"close"),Object.defineProperty(e,zb,{value:r}),e})(sr.close),sr.closeSync=(function(r){function e(t){r.apply(sr,arguments),Hj()}return a(e,"closeSync"),Object.defineProperty(e,zb,{value:r}),e})(sr.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Gl(sr[wn]),require("assert").equal(sr[wn].length,0)}));var Wj;global[wn]||zj(global,sr[wn]);JR.exports=QR(cae(sr));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!sr.__patched&&(JR.exports=QR(sr),sr.__patched=!0);function QR(r){oae(r),r.gracefulify=QR,r.createReadStream=S,r.createWriteStream=R;var e=r.readFile;r.readFile=t;function t(M,O,L){return typeof O=="function"&&(L=O,O=null),te(M,O,L);function te(re,V,K,Se){return e(re,V,function(ce){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?id([te,[re,V,K],ce,Se||Date.now(),Date.now()]):typeof K=="function"&&K.apply(this,arguments)})}a(te,"go$readFile")}a(t,"readFile");var n=r.writeFile;r.writeFile=i;function i(M,O,L,te){return typeof L=="function"&&(te=L,L=null),re(M,O,L,te);function re(V,K,Se,ce,q){return n(V,K,Se,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?id([re,[V,K,Se,ce],W,q||Date.now(),Date.now()]):typeof ce=="function"&&ce.apply(this,arguments)})}a(re,"go$writeFile")}a(i,"writeFile");var s=r.appendFile;s&&(r.appendFile=o);function o(M,O,L,te){return typeof L=="function"&&(te=L,L=null),re(M,O,L,te);function re(V,K,Se,ce,q){return s(V,K,Se,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?id([re,[V,K,Se,ce],W,q||Date.now(),Date.now()]):typeof ce=="function"&&ce.apply(this,arguments)})}a(re,"go$appendFile")}a(o,"appendFile");var c=r.copyFile;c&&(r.copyFile=l);function l(M,O,L,te){return typeof L=="function"&&(te=L,L=0),re(M,O,L,te);function re(V,K,Se,ce,q){return c(V,K,Se,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?id([re,[V,K,Se,ce],W,q||Date.now(),Date.now()]):typeof ce=="function"&&ce.apply(this,arguments)})}a(re,"go$copyFile")}a(l,"copyFile");var u=r.readdir;r.readdir=d;var f=/^v[0-5]\./;function d(M,O,L){typeof O=="function"&&(L=O,O=null);var te=f.test(process.version)?a(function(K,Se,ce,q){return u(K,re(K,Se,ce,q))},"go$readdir"):a(function(K,Se,ce,q){return u(K,Se,re(K,Se,ce,q))},"go$readdir");return te(M,O,L);function re(V,K,Se,ce){return function(q,W){q&&(q.code==="EMFILE"||q.code==="ENFILE")?id([te,[V,K,Se],q,ce||Date.now(),Date.now()]):(W&&W.sort&&W.sort(),typeof Se=="function"&&Se.call(this,q,W))}}}if(a(d,"readdir"),process.version.substr(0,4)==="v0.8"){var p=aae(r);b=p.ReadStream,I=p.WriteStream}var h=r.ReadStream;h&&(b.prototype=Object.create(h.prototype),b.prototype.open=T);var m=r.WriteStream;m&&(I.prototype=Object.create(m.prototype),I.prototype.open=E),Object.defineProperty(r,"ReadStream",{get:a(function(){return b},"get"),set:a(function(M){b=M},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(r,"WriteStream",{get:a(function(){return I},"get"),set:a(function(M){I=M},"set"),enumerable:!0,configurable:!0});var y=b;Object.defineProperty(r,"FileReadStream",{get:a(function(){return y},"get"),set:a(function(M){y=M},"set"),enumerable:!0,configurable:!0});var _=I;Object.defineProperty(r,"FileWriteStream",{get:a(function(){return _},"get"),set:a(function(M){_=M},"set"),enumerable:!0,configurable:!0});function b(M,O){return this instanceof b?(h.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}a(b,"ReadStream");function T(){var M=this;P(M.path,M.flags,M.mode,function(O,L){O?(M.autoClose&&M.destroy(),M.emit("error",O)):(M.fd=L,M.emit("open",L),M.read())})}a(T,"ReadStream$open");function I(M,O){return this instanceof I?(m.apply(this,arguments),this):I.apply(Object.create(I.prototype),arguments)}a(I,"WriteStream");function E(){var M=this;P(M.path,M.flags,M.mode,function(O,L){O?(M.destroy(),M.emit("error",O)):(M.fd=L,M.emit("open",L))})}a(E,"WriteStream$open");function S(M,O){return new r.ReadStream(M,O)}a(S,"createReadStream");function R(M,O){return new r.WriteStream(M,O)}a(R,"createWriteStream");var D=r.open;r.open=P;function P(M,O,L,te){return typeof L=="function"&&(te=L,L=null),re(M,O,L,te);function re(V,K,Se,ce,q){return D(V,K,Se,function(W,ne){W&&(W.code==="EMFILE"||W.code==="ENFILE")?id([re,[V,K,Se,ce],W,q||Date.now(),Date.now()]):typeof ce=="function"&&ce.apply(this,arguments)})}a(re,"go$open")}return a(P,"open"),r}a(QR,"patch");function id(r){Gl("ENQUEUE",r[0].name,r[1]),sr[wn].push(r),XR()}a(id,"enqueue");var Hb;function Hj(){for(var r=Date.now(),e=0;e<sr[wn].length;++e)sr[wn][e].length>2&&(sr[wn][e][3]=r,sr[wn][e][4]=r);XR()}a(Hj,"resetQueue");function XR(){if(clearTimeout(Hb),Hb=void 0,sr[wn].length!==0){var r=sr[wn].shift(),e=r[0],t=r[1],n=r[2],i=r[3],s=r[4];if(i===void 0)Gl("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-i>=6e4){Gl("TIMEOUT",e.name,t);var o=t.pop();typeof o=="function"&&o.call(null,n)}else{var c=Date.now()-s,l=Math.max(s-i,1),u=Math.min(l*1.2,100);c>=u?(Gl("RETRY",e.name,t),e.apply(null,t.concat([i]))):sr[wn].push(r)}Hb===void 0&&(Hb=setTimeout(XR,0))}}a(XR,"retry")});var ei=v(Ea=>{"use strict";var Kj=Zr().fromCallback,Zn=sd(),uae=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(r=>typeof Zn[r]=="function");Object.assign(Ea,Zn);uae.forEach(r=>{Ea[r]=Kj(Zn[r])});Ea.exists=function(r,e){return typeof e=="function"?Zn.exists(r,e):new Promise(t=>Zn.exists(r,t))};Ea.read=function(r,e,t,n,i,s){return typeof s=="function"?Zn.read(r,e,t,n,i,s):new Promise((o,c)=>{Zn.read(r,e,t,n,i,(l,u,f)=>{if(l)return c(l);o({bytesRead:u,buffer:f})})})};Ea.write=function(r,e,...t){return typeof t[t.length-1]=="function"?Zn.write(r,e,...t):new Promise((n,i)=>{Zn.write(r,e,...t,(s,o,c)=>{if(s)return i(s);n({bytesWritten:o,buffer:c})})})};Ea.readv=function(r,e,...t){return typeof t[t.length-1]=="function"?Zn.readv(r,e,...t):new Promise((n,i)=>{Zn.readv(r,e,...t,(s,o,c)=>{if(s)return i(s);n({bytesRead:o,buffers:c})})})};Ea.writev=function(r,e,...t){return typeof t[t.length-1]=="function"?Zn.writev(r,e,...t):new Promise((n,i)=>{Zn.writev(r,e,...t,(s,o,c)=>{if(s)return i(s);n({bytesWritten:o,buffers:c})})})};typeof Zn.realpath.native=="function"?Ea.realpath.native=Kj(Zn.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Qj=v((mCe,Yj)=>{"use strict";var fae=require("path");Yj.exports.checkPath=a(function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(fae.parse(e).root,""))){let n=new Error(`Path contains invalid characters: ${e}`);throw n.code="EINVAL",n}},"checkPath")});var e$=v((yCe,ZR)=>{"use strict";var Xj=ei(),{checkPath:Jj}=Qj(),Zj=a(r=>{let e={mode:511};return typeof r=="number"?r:{...e,...r}.mode},"getMode");ZR.exports.makeDir=async(r,e)=>(Jj(r),Xj.mkdir(r,{mode:Zj(e),recursive:!0}));ZR.exports.makeDirSync=(r,e)=>(Jj(r),Xj.mkdirSync(r,{mode:Zj(e),recursive:!0}))});var Ls=v((bCe,t$)=>{"use strict";var dae=Zr().fromPromise,{makeDir:pae,makeDirSync:eC}=e$(),tC=dae(pae);t$.exports={mkdirs:tC,mkdirsSync:eC,mkdirp:tC,mkdirpSync:eC,ensureDir:tC,ensureDirSync:eC}});var wc=v((SCe,n$)=>{"use strict";var hae=Zr().fromPromise,r$=ei();function mae(r){return r$.access(r).then(()=>!0).catch(()=>!1)}a(mae,"pathExists");n$.exports={pathExists:hae(mae),pathExistsSync:r$.existsSync}});var rC=v((ECe,i$)=>{"use strict";var od=ei(),gae=Zr().fromPromise;async function yae(r,e,t){let n=await od.open(r,"r+"),i=null;try{await od.futimes(n,e,t)}catch(s){i=s}finally{try{await od.close(n)}catch(s){i||(i=s)}}if(i)throw i}a(yae,"utimesMillis");function _ae(r,e,t){let n=od.openSync(r,"r+"),i=null;try{od.futimesSync(n,e,t)}catch(s){i=s}finally{try{od.closeSync(n)}catch(s){i||(i=s)}}if(i)throw i}a(_ae,"utimesMillisSync");i$.exports={utimesMillis:gae(yae),utimesMillisSync:_ae}});var ql=v((TCe,o$)=>{"use strict";var ad=ei(),en=require("path"),s$=Zr().fromPromise;function bae(r,e,t){let n=t.dereference?i=>ad.stat(i,{bigint:!0}):i=>ad.lstat(i,{bigint:!0});return Promise.all([n(r),n(e).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,s])=>({srcStat:i,destStat:s}))}a(bae,"getStats");function Sae(r,e,t){let n,i=t.dereference?o=>ad.statSync(o,{bigint:!0}):o=>ad.lstatSync(o,{bigint:!0}),s=i(r);try{n=i(e)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:n}}a(Sae,"getStatsSync");async function wae(r,e,t,n){let{srcStat:i,destStat:s}=await bae(r,e,n);if(s){if(Zh(i,s)){let o=en.basename(r),c=en.basename(e);if(t==="move"&&o!==c&&o.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${r}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${r}'.`)}if(i.isDirectory()&&sC(r,e))throw new Error(Kb(r,e,t));return{srcStat:i,destStat:s}}a(wae,"checkPaths");function Eae(r,e,t,n){let{srcStat:i,destStat:s}=Sae(r,e,n);if(s){if(Zh(i,s)){let o=en.basename(r),c=en.basename(e);if(t==="move"&&o!==c&&o.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${r}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${r}'.`)}if(i.isDirectory()&&sC(r,e))throw new Error(Kb(r,e,t));return{srcStat:i,destStat:s}}a(Eae,"checkPathsSync");async function nC(r,e,t,n){let i=en.resolve(en.dirname(r)),s=en.resolve(en.dirname(t));if(s===i||s===en.parse(s).root)return;let o;try{o=await ad.stat(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return nC(r,e,s,n);throw c}if(Zh(e,o))throw new Error(Kb(r,t,n));return nC(r,e,s,n)}a(nC,"checkParentPaths");function iC(r,e,t,n){let i=en.resolve(en.dirname(r)),s=en.resolve(en.dirname(t));if(s===i||s===en.parse(s).root)return;let o;try{o=ad.statSync(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return iC(r,e,s,n);throw c}if(Zh(e,o))throw new Error(Kb(r,t,n));return iC(r,e,s,n)}a(iC,"checkParentPathsSync");function Zh(r,e){return e.ino!==void 0&&e.dev!==void 0&&e.ino===r.ino&&e.dev===r.dev}a(Zh,"areIdentical");function sC(r,e){let t=en.resolve(r).split(en.sep).filter(i=>i),n=en.resolve(e).split(en.sep).filter(i=>i);return t.every((i,s)=>n[s]===i)}a(sC,"isSrcSubdir");function Kb(r,e,t){return`Cannot ${t} '${r}' to a subdirectory of itself, '${e}'.`}a(Kb,"errMsg");o$.exports={checkPaths:s$(wae),checkPathsSync:Eae,checkParentPaths:s$(nC),checkParentPathsSync:iC,isSrcSubdir:sC,areIdentical:Zh}});var c$=v((ICe,a$)=>{"use strict";async function vae(r,e){let t=[];for await(let n of r)t.push(e(n).then(()=>null,i=>i??new Error("unknown error")));await Promise.all(t.map(n=>n.then(i=>{if(i!==null)throw i})))}a(vae,"asyncIteratorConcurrentProcess");a$.exports={asyncIteratorConcurrentProcess:vae}});var p$=v((CCe,d$)=>{"use strict";var Nn=ei(),em=require("path"),{mkdirs:Tae}=Ls(),{pathExists:Aae}=wc(),{utimesMillis:Iae}=rC(),tm=ql(),{asyncIteratorConcurrentProcess:Rae}=c$();async function Cae(r,e,t={}){typeof t=="function"&&(t={filter:t}),t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
352
+ `)}a(Vie,"renderSettingAssetMarkdown")});var U4=v(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:!0});Nb.exportSettings=Gie;Nb.importSettings=qie;var Lb=Db();function Gie(r,e){return r.declaredKeys().map(t=>({field:t.field,fileName:`${t.settingUid}.md`,content:(0,Lb.renderSettingAssetMarkdown)(t,r.readLiveValue(t),r.settingClassUid,e.ontologyUid,e.nowIso)}))}a(Gie,"exportSettings");async function qie(r,e){let t=new Map;for(let s of r.declaredKeys())t.set(s.keyUid,s),t.set(s.keyLabel,s);let n=[],i=[];for(let s of e){let o=(0,Lb.extractKeyRef)(s.frontmatter),c=o!==null?t.get(o):void 0;if(c===void 0){i.push({path:s.path,reason:"unknown-key",detail:o??"<no setting key>"});continue}let l=(0,Lb.coerceSettingValue)(c.datatype,(0,Lb.readSettingValueRaw)(s.frontmatter));if(l===void 0){i.push({path:s.path,reason:"uncoercible",detail:`expected ${c.datatype}`});continue}await r.writeLiveValue(c,l),n.push(c.field)}return{applied:n,skipped:i}}a(qie,"importSettings")});var B4=v(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID=void 0;Uh.resolveDistributionOntology=Wie;var CR=Db();Uh.EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID="ea44f996-64e5-46ce-8953-b13d21ee750d";function Wie(r,e){for(let t of r){if((0,CR.extractKeyRef)(t.frontmatter)!==e)continue;let n=(0,CR.coerceSettingValue)("string",(0,CR.readSettingValueRaw)(t.frontmatter));if(typeof n=="string"){let i=n.trim();if(i.length>0)return i}}return null}a(Wie,"resolveDistributionOntology")});var q4=v(It=>{"use strict";var Hie=It&&It.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),zie=It&&It.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Hie(e,r,t)};Object.defineProperty(It,"__esModule",{value:!0});It.resolveDistributionOntology=It.EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID=It.importSettings=It.exportSettings=It.renderSettingAssetMarkdown=It.readSettingValueRaw=It.extractKeyRef=It.coerceSettingValue=It.LEGACY_SETTING_VALUE_PROPS=It.LEGACY_SETTING_KEY_PROPS=It.SETTING_VALUE_PROP=It.SETTING_KEY_PROP=void 0;zie(M4(),It);var gc=Db();Object.defineProperty(It,"SETTING_KEY_PROP",{enumerable:!0,get:a(function(){return gc.SETTING_KEY_PROP},"get")});Object.defineProperty(It,"SETTING_VALUE_PROP",{enumerable:!0,get:a(function(){return gc.SETTING_VALUE_PROP},"get")});Object.defineProperty(It,"LEGACY_SETTING_KEY_PROPS",{enumerable:!0,get:a(function(){return gc.LEGACY_SETTING_KEY_PROPS},"get")});Object.defineProperty(It,"LEGACY_SETTING_VALUE_PROPS",{enumerable:!0,get:a(function(){return gc.LEGACY_SETTING_VALUE_PROPS},"get")});Object.defineProperty(It,"coerceSettingValue",{enumerable:!0,get:a(function(){return gc.coerceSettingValue},"get")});Object.defineProperty(It,"extractKeyRef",{enumerable:!0,get:a(function(){return gc.extractKeyRef},"get")});Object.defineProperty(It,"readSettingValueRaw",{enumerable:!0,get:a(function(){return gc.readSettingValueRaw},"get")});Object.defineProperty(It,"renderSettingAssetMarkdown",{enumerable:!0,get:a(function(){return gc.renderSettingAssetMarkdown},"get")});var V4=U4();Object.defineProperty(It,"exportSettings",{enumerable:!0,get:a(function(){return V4.exportSettings},"get")});Object.defineProperty(It,"importSettings",{enumerable:!0,get:a(function(){return V4.importSettings},"get")});var G4=B4();Object.defineProperty(It,"EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID",{enumerable:!0,get:a(function(){return G4.EXOCORTEX_DISTRIBUTION_ONTOLOGY_KEY_UID},"get")});Object.defineProperty(It,"resolveDistributionOntology",{enumerable:!0,get:a(function(){return G4.resolveDistributionOntology},"get")})});var OR=v(xR=>{"use strict";Object.defineProperty(xR,"__esModule",{value:!0});xR.resolvePreferenceList=Kie;function Kie(r,e){if(Array.isArray(r)&&r.length>1){let t=r.map(n=>e(n)).filter(n=>n!==null&&n.length>0);return t.length>0?t.join("|"):null}return Array.isArray(r)?r.length===0?null:e(r[0]):e(r)}a(Kie,"resolvePreferenceList")});var FR=v(PR=>{"use strict";Object.defineProperty(PR,"__esModule",{value:!0});PR.unwrapLinkTarget=Yie;function Yie(r){let e=r.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();return e.includes("|")?e.split("|")[0]?.trim()??"":e}a(Yie,"unwrapLinkTarget")});var DR=v(kb=>{"use strict";Object.defineProperty(kb,"__esModule",{value:!0});kb.DEFAULT_DISPLAY_NAME_SETTINGS=void 0;kb.DEFAULT_DISPLAY_NAME_SETTINGS={defaultTemplate:"{{exo__Asset_label}}",classTemplates:{},projectTBoxNames:!0}});var Vh=v(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});Bh.isWikilink=LR;Bh.ownProperty=Mb;Bh.resolveKeyPath=Qie;function LR(r){return r.startsWith("[[")&&r.endsWith("]]")}a(LR,"isWikilink");function Mb(r,e){if(!(r===null||typeof r!="object"))return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0}a(Mb,"ownProperty");function Qie(r,e,t){let n=e.split("."),i=r;for(let s of n){if(i==null)return;if(Array.isArray(i)){let o=i[0];if(typeof o=="string"&&t&&LR(o)){let c=t(o);if(c){i=Mb(c,s);continue}return}}if(typeof i!="object"){if(typeof i=="string"&&t&&LR(i)){let o=t(i);if(o){i=Mb(o,s);continue}}return}i=Mb(i,s)}return i}a(Qie,"resolveKeyPath")});var H4=v(jb=>{"use strict";Object.defineProperty(jb,"__esModule",{value:!0});jb.PrintNameRuleService=void 0;var Xie=OR(),Jie=FR(),W4=Vh(),Zie="exo__DisplayNameSpec",ese="07eab746-0874-4676-9d98-dbaad1bc6fb8",tse="exo__PrintedProperty",rse="7d58de40-d941-4a66-88e2-13afc4fdc41d",nse="exo__PrintedLiteral",ise="4d5437c9-788e-4a6d-9be0-4af3a84554f4",sse=1e3,ose=300,NR=class{static{a(this,"PrintNameRuleService")}constructor(e,t={},n=void 0){this.vault=e,this.hostFunctions=t,this.host=n,this.rules=new Map,this.classHierarchy=new Map,this.initialized=!1,this.scanDebounceTimer=null}initialize(){this.scanVault(),this.initialized=!0}getTemplateForClass(e,t){if(!this.initialized)return null;let n=this.selectRule(this.rules.get(e),t);if(n)return{template:n.template,priority:n.priority};let i=this.getAncestorClasses(e);for(let s of i){let o=this.selectRule(this.rules.get(s),t);if(o)return{template:o.template,priority:o.priority}}return null}getParticipatingRules(e,t){if(!this.initialized)return[];let n=this.participatingOf(this.rules.get(e),t);if(n.length>0)return n;for(let i of this.getAncestorClasses(e)){let s=this.participatingOf(this.rules.get(i),t);if(s.length>0)return s}return[]}selectRule(e,t){if(!e||e.length===0)return null;for(let n of e)if(this.ruleParticipates(n,t))return n;return null}participatingOf(e,t){if(!e||e.length===0)return[];let n=[];for(let i of e)this.ruleParticipates(i,t)&&n.push({template:i.template,priority:i.priority,sourceFile:i.sourceFile,...i.separator?{separator:i.separator}:{}});return n}ruleParticipates(e,t){return e.matcher?t?this.matcherSatisfied(e.matcher,t):!1:!0}matcherSatisfied(e,t){if(e.kind==="hostFunction"){if(!Object.prototype.hasOwnProperty.call(this.hostFunctions,e.hostFunction))return!1;let s=this.hostFunctions[e.hostFunction];return typeof s!="function"?!1:s(this.host,t)}let n=e.matchKey.includes(".")?(0,W4.resolveKeyPath)(t,e.matchKey,this.createMetadataResolver()):(0,W4.ownProperty)(t,e.matchKey),i=this.extractClassKeys(n);return i.length===0?!1:i.some(s=>e.matchValues.includes(s))}resolveIdentityForms(e){let t=this.extractClassKeys(e);if(t.length===0)return[];let n=new Set(t);for(let i of t){let s=this.vault.resolveLinkpathFrontmatter(i);if(!s)continue;let o=s.exo__Asset_uid,c=s.exo__Asset_label;typeof o=="string"&&o.trim()&&n.add(o.trim()),typeof c=="string"&&c.trim()&&n.add(c.trim())}return[...n]}resolveMatchValues(e){return this.resolveIdentityForms(e)}resolveHostFunctionName(e){let t=e;if(Array.isArray(t)){if(t.length===0)return null;t=t[0]}return typeof t!="string"?null:t.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim()||null}createMetadataResolver(){return e=>{let t=(0,Jie.unwrapLinkTarget)(e);if(!t)return null;let n=this.vault.resolveLinkpathFrontmatter(t);return n?{...n}:null}}refresh(){this.scanVault()}scheduleRefresh(){this.scanDebounceTimer!==null&&clearTimeout(this.scanDebounceTimer),this.scanDebounceTimer=setTimeout(()=>{this.scanDebounceTimer=null,this.scanVault()},ose)}scanVault(){this.rules.clear(),this.classHierarchy.clear();let e=new Map,t=[];for(let n of this.vault.listFrontmatter()){let i=this.cleanClassValue(n.exo__Instance_class);i===Zie||i===ese?this.collectDisplayNameSpec(n,e):(i===tse||i===rse||i===nse||i===ise)&&this.collectDisplayNamePart(n,t);let s=this.cleanClassValue(n.exo__Class_superClass);if(s&&i){let o=this.cleanClassValue(n.exo__Asset_label)||i,c=this.classHierarchy.get(o);c?c.push(s):this.classHierarchy.set(o,[s])}}this.compileDisplayNameSpecs(e,t)}collectDisplayNameSpec(e,t){let n=typeof e.exo__Asset_uid=="string"?e.exo__Asset_uid.trim():"";if(!n)return;let i=this.resolveIdentityForms(e.exo__DisplayNameSpec_appliesToClass);if(i.length===0)return;let s=e.exo__DisplayNameSpec_priority,o=typeof s=="number"?s:typeof s=="string"&&s.trim()!==""?Number(s):0,c=this.resolvePropertyKey(e.exo__DisplayNameSpec_matchPath),l=this.resolveMatchValues(e.exo__DisplayNameSpec_matchValue),u=c!==null&&l.length>0,f=this.resolveHostFunctionName(e.exo__DisplayNameSpec_matchHostFunction),d=e.exo__DisplayNameSpec_separator,p=typeof d=="string"&&d!==""?d:void 0;t.set(n,{uid:n,classKeys:i,priority:Number.isFinite(o)?o:0,...u?{matchKey:c??void 0,matchValues:l}:{},...f?{hostFunction:f}:{},...p?{separator:p}:{}})}collectDisplayNamePart(e,t){let n=this.cleanClassValue(e.exo__DisplayNamePart_of);if(!n)return;let i=e.exo__DisplayNamePart_order,s=typeof i=="number"?i:typeof i=="string"&&i.trim()!==""?Number(i):NaN;if(!Number.isFinite(s))return;let o=this.resolvePropertyKeyList(e.exo__PrintedProperty_property),c=e.exo__PrintedLiteral_literal,l=typeof c=="string"?c:void 0,u=e.exo__PrintedProperty_format,f=typeof u=="string"&&u.trim()!==""?u.trim():void 0;o?t.push({specUid:n,order:s,propertyKey:o,...f?{format:f}:{}}):l!==void 0&&t.push({specUid:n,order:s,literal:l})}compileDisplayNameSpecs(e,t){let n=new Map;for(let i of t){let s=n.get(i.specUid);s?s.push(i):n.set(i.specUid,[i])}for(let i of e.values()){let s=(n.get(i.uid)??[]).slice().sort((u,f)=>u.order-f.order);if(s.length===0)continue;let o=s.map(u=>u.propertyKey?u.format?`{{${u.propertyKey}::${u.format}}}`:`{{${u.propertyKey}}}`:u.literal??"").join(i.separator??"");if(!o.trim())continue;let c=sse+i.priority,l;i.matchKey&&i.matchValues&&i.matchValues.length>0?l={kind:"value",matchKey:i.matchKey,matchValues:i.matchValues}:i.hostFunction&&(l={kind:"hostFunction",hostFunction:i.hostFunction});for(let u of i.classKeys){if(!u)continue;let f={className:u,template:o,priority:c,sourceFile:i.uid,...l?{matcher:l}:{},...i.separator?{separator:i.separator}:{}},d=this.rules.get(u);d?(d.push(f),d.sort((p,h)=>h.priority-p.priority)):this.rules.set(u,[f])}}}resolvePropertyKey(e){return Array.isArray(e)?e.length===0?null:this.resolveSinglePropertyKey(e[0]):this.resolveSinglePropertyKey(e)}resolvePropertyKeyList(e){return(0,Xie.resolvePreferenceList)(e,t=>this.resolveSinglePropertyKey(t))}resolveSinglePropertyKey(e){if(typeof e!="string")return null;let t=e.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();if(!t)return null;if(t.includes("|"))return t.split("|").pop()?.trim()||null;let n=t.replace(/\.md$/,"").trim();if(!n)return null;let i=this.vault.resolveLinkpathFrontmatter(n);if(i){let s=i.exo__Asset_label;if(typeof s=="string"&&s.trim())return s.trim()}return n}extractClassKeys(e){let t=e;if(Array.isArray(t)){if(t.length===0)return[];t=t[0]}if(typeof t!="string")return[];let n=t.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();if(!n)return[];if(n.includes("|")){let[i,s]=n.split("|");return[i.trim().replace(/\.md$/,""),s.trim()].filter(o=>!!o)}return[n.replace(/\.md$/,"")]}getAncestorClasses(e){let t=[],n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(!s||n.has(s))continue;n.add(s);let o=this.classHierarchy.get(s);if(o)for(let c of o)n.has(c)||(t.push(c),i.push(c))}return t}cleanClassValue(e){if(!e)return null;if(Array.isArray(e))return e.length===0?null:this.cleanClassValue(e[0]);if(typeof e!="string")return null;let t=e.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();return t.includes("|")&&(t=(t.split("|").pop()??t).trim()),t||null}getRulesCount(){let e=0;for(let t of this.rules.values())e+=t.length;return e}};jb.PrintNameRuleService=NR});var kR=v(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.DEFAULT_DISPLAY_NAME_TEMPLATE=Sa.DISPLAY_NAME_PRESETS=Sa.DisplayNameTemplateEngine=void 0;var ase=Vh(),Jf=class r{static{a(this,"DisplayNameTemplateEngine")}constructor(e,t={}){this.template=e,this.options=t}render(e,t,n,i){if(!this.template||this.template.trim()==="")return null;let s=this.options.separator;if(s)return this.renderWithSeparator(s,e,t,n,i);let o=this.renderSegment(this.template,e,t,n,i),c=this.cleanupResult(o);return c===""?null:c}renderSegment(e,t,n,i,s){return e.replace(r.PLACEHOLDER_PATTERN,(o,c)=>{let l=c.trim();return this.resolveValue(l,t,n,i,s)})}renderWithSeparator(e,t,n,i,s){let o=this.template.indexOf("{{"),c=this.template.lastIndexOf("}}");if(o===-1||c===-1||c<o){let y=this.cleanupResult(this.renderSegment(this.template,t,n,i,s));return y===""?null:y}let l=this.template.slice(0,o),u=this.template.slice(o,c+2),f=this.template.slice(c+2),d=[];for(let y of r.splitOutsidePlaceholders(u,e)){let _=this.cleanupResult(this.renderSegment(y,t,n,i,s));_!==""&&d.push(_)}if(d.length===0)return null;let p=this.renderSegment(l,t,n,i,s),h=this.renderSegment(f,t,n,i,s),m=`${p}${d.join(e)}${h}`.trim();return m===""?null:m}static splitOutsidePlaceholders(e,t){if(t.length===0)return[e];let n=[],i="",s=0;for(;s<e.length;){if(e.startsWith("{{",s)){let o=e.indexOf("}}",s+2);if(o!==-1){i+=e.slice(s,o+2),s=o+2;continue}}if(e.startsWith(t,s)){n.push(i),i="",s+=t.length;continue}i+=e[s],s+=1}return n.push(i),n}cleanupResult(e){let t=e;return t=t.replace(/\s+\(\s*\)$/g,""),t=t.replace(/^\(\s*\)\s+/g,""),t==="()"&&(t=""),t=t.replace(/\s+\[\s*\]$/g,""),t=t.replace(/^\[\s*\]\s+/g,""),t==="[]"&&(t=""),t=t.replace(/\s+/g," "),t.trim()}resolveValue(e,t,n,i,s){if(e==="_basename")return n;if(e==="_created")return i?this.formatDate(i):"";let{path:o,format:c}=r.splitKeyAndFormat(e),l=o.includes("|")?o.split("|").map(f=>f.trim()).filter(f=>f.length>0):[o],u="";for(let f of l){let d=this.getNestedValue(t,f,s),p;if(c){let h=r.applyValueFormat(d,c);p=h!==null?h:this.formatValue(d,s)}else p=this.formatValue(d,s);if(p!=="")return p;u=p}return u}static splitKeyAndFormat(e){let t=e.indexOf("::");if(t<=0)return{path:e};let n=e.slice(0,t).trim(),i=e.slice(t+2).trim();return!n||!i?{path:e}:{path:n,format:i}}static applyValueFormat(e,t){let n=e;if(Array.isArray(n)){if(n.length===0)return null;n=n[0]}let i,s,o,c,l,u;if(n instanceof Date){if(Number.isNaN(n.getTime()))return null;let p=a(h=>String(h).padStart(2,"0"),"pad");i=String(n.getUTCFullYear()).padStart(4,"0"),s=p(n.getUTCMonth()+1),o=p(n.getUTCDate()),c=p(n.getUTCHours()),l=p(n.getUTCMinutes()),u=p(n.getUTCSeconds())}else if(typeof n=="string"){let p=/^\s*(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?/.exec(n);if(!p)return null;i=p[1],s=p[2],o=p[3],c=p[4],l=p[5],u=p[6]}else return null;let f=!1,d=t.replace(/YYYY|YY|MM|DD|HH|mm|ss/g,p=>{switch(p){case"YYYY":return i;case"YY":return i.slice(-2);case"MM":return s;case"DD":return o;case"HH":return c===void 0&&(f=!0),c??"";case"mm":return l===void 0&&(f=!0),l??"";case"ss":return u===void 0&&(f=!0),u??"";default:return p}});return f?null:d}getNestedValue(e,t,n){return(0,ase.resolveKeyPath)(e,t,n)}formatWikilinkValue(e,t){let n=e.match(/^\[\[([^\]|]+?)(?:\|([^\]]+))?\]\]$/);if(!n)return e.replace(r.WIKILINK_PATTERN,"").trim();let i=n[1].trim(),s=n[2]?.trim();if(s)return s;if(t){let o=t(e);if(o){let c=o.exo__Asset_label;if(typeof c=="string"&&c.trim())return c.trim()}}return i}formatValue(e,t){if(e==null)return"";if(typeof e=="string")return this.formatWikilinkValue(e,t);if(Array.isArray(e)){if(e.length===0)return"";if(this.options.joinArrayValues){let n=[];for(let i of e){let s=this.formatValue(i,t);s&&!r.UUID_PATTERN.test(s)&&n.push(s)}return n.join(" ")}return this.formatValue(e[0],t)}return typeof e=="object"?JSON.stringify(e):String(e)}formatDate(e){let t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${i}`}getTemplate(){return this.template}isValid(){return!this.template||this.template.trim()===""?!1:/\{\{[^}]+\}\}/.test(this.template)}getPlaceholders(){let e=[],t=/\{\{([^}]+)\}\}/g,n;for(;(n=t.exec(this.template))!==null;)e.push(n[1].trim());return e}};Sa.DisplayNameTemplateEngine=Jf;Jf.PLACEHOLDER_PATTERN=/\{\{([^}]+)\}\}/g;Jf.WIKILINK_PATTERN=/^\[\[|\]\]$/g;Jf.UUID_PATTERN=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;Sa.DISPLAY_NAME_PRESETS={default:{name:"Label only (default)",template:"{{exo__Asset_label}}"},labelWithStatus:{name:"Label with status",template:"{{exo__Asset_label}}: {{ems__Effort_status}}"},classPrefix:{name:"Class prefix",template:"[{{exo__Instance_class}}] {{exo__Asset_label}}"},classSuffix:{name:"Class suffix",template:"{{exo__Asset_label}} ({{exo__Instance_class}})"},basenameWithLabel:{name:"Filename with label",template:"{{_basename}} - {{exo__Asset_label}}"},datePrefix:{name:"Date prefix",template:"{{_created}} - {{exo__Asset_label}}"}};Sa.DEFAULT_DISPLAY_NAME_TEMPLATE=Sa.DISPLAY_NAME_PRESETS.classSuffix.template});var z4=v(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});Gh.DisplayNameResolver=void 0;Gh.createDefaultResolver=dse;var cse=kR(),lse=Vh(),use=DR(),fse=new Set(["8619c4fc-64f1-4869-b17e-e34186cacca9","exo__Class","38277bfa-d7f9-4a75-b856-b23276ab0db3","exo__Property","9a1cf31c-9d41-4ef3-9023-584a8d087d16","exo__ObjectProperty","ae56ca4c-b610-42a4-a25d-058c23673296","exo__DatatypeProperty","84756998-3b4e-4989-91cc-a5d5c23664d4","exo__URLProperty"]),$b=class{static{a(this,"DisplayNameResolver")}constructor(e,t,n){this.settings=e,this.ruleService=t,this.metadataResolver=n}resolve(e){return this.resolveWithProvenance(e).displayName}resolveWithProvenance(e){let{metadata:t,basename:n,createdDate:i}=e,s=this.extractAssetClasses(t),o=this.computeTBoxNamingProjection(s,t);if(o!==null)return{displayName:o,provenance:"tboxProjection"};let{template:c,separator:l,provenance:u}=this.resolveRenderSpec(s,t);return{displayName:new cse.DisplayNameTemplateEngine(c,l?{separator:l}:{}).render(t,n,i,this.metadataResolver??void 0),provenance:u}}getTemplateForClasses(e,t){return this.resolveRenderSpec(e,t).template}resolveRenderSpec(e,t){if(this.ruleService&&e.length>0){let s=[],o=new Set;for(let c of e)for(let l of this.ruleService.getParticipatingRules(c,t))o.has(l.sourceFile)||(o.add(l.sourceFile),s.push(l));if(s.length>0)return s.sort((c,l)=>l.priority-c.priority||c.sourceFile.localeCompare(l.sourceFile)),s.length===1?{template:s[0].template,...s[0].separator?{separator:s[0].separator}:{},provenance:"spec"}:{...this.composeTemplates(s),provenance:"spec"}}let n=e[0],i=n?(0,lse.ownProperty)(this.settings.classTemplates,n):void 0;return typeof i=="string"&&i?{template:i,provenance:"classTemplate"}:{template:this.settings.defaultTemplate,provenance:"default"}}composeTemplates(e){let t=new Set,n=new Set,i=[],s=[],o=null,c,l=a((p,h,m)=>{for(let y of p.trim().split(/\s+/))!y||h.has(y)||(h.add(y),m.push(y))},"collect");for(let p of e){let{prefix:h,core:m,suffix:y}=this.splitTemplate(p.template);o===null&&m!==""&&(o=m,c=p.separator),l(h,t,i),l(y,n,s)}let u=o??"",f=i.map(p=>`${p} `).join(""),d=s.length?` ${s.join(" ")}`:"";return{template:`${f}${u}${d}`,...c?{separator:c}:{}}}splitTemplate(e){let t=e.indexOf("{{"),n=e.lastIndexOf("}}");return t===-1||n===-1||n<t?{prefix:e,core:"",suffix:""}:{prefix:e.slice(0,t),core:e.slice(t,n+2),suffix:e.slice(n+2)}}getTemplateForClass(e,t){return this.getTemplateForClasses(e?[e]:[],t)}extractAssetClasses(e){let t=e.exo__Instance_class;if(!t)return[];let n=Array.isArray(t)?t:[t],i=[],s=new Set;for(let o of n){let c=this.cleanClassValue(o);c&&!s.has(c)&&(s.add(c),i.push(c))}return i}cleanClassValue(e){if(typeof e!="string")return null;let t=e.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim();return t.includes("|")&&(t=(t.split("|").pop()??t).trim()),t||null}computeTBoxNamingProjection(e,t){if(this.settings.projectTBoxNames===!1||!this.isTBoxNamingEntity(e))return null;if(this.ruleService){for(let u of e)if(this.ruleService.getParticipatingRules(u,t).length>0)return null}let n=typeof t.exo__Asset_label=="string"?t.exo__Asset_label.trim():"",[i,s]=this.splitPrefixedLabel(n),c=(typeof t.exo__Slugable_slug=="string"?t.exo__Slugable_slug.trim():"")||s;if(!c)return null;let l=this.resolveOntologyShortName(t)??i;return l?`${l}#${c}`:c}isTBoxNamingEntity(e){return e.some(t=>fse.has(t))}resolveOntologyShortName(e){if(!this.metadataResolver)return null;let t=this.firstString(e.exo__Asset_isDefinedBy);if(!t)return null;let i=this.metadataResolver(t)?.exo__Ontology_shortName;return typeof i=="string"&&i.trim()?i.trim():null}splitPrefixedLabel(e){let t=e.indexOf("__");if(t<=0)return[null,null];let n=e.slice(0,t),i=e.slice(t+2);return i?[n,i]:[null,null]}firstString(e){let t=e;if(Array.isArray(t)){if(t.length===0)return null;t=t[0]}return typeof t!="string"?null:t.trim()||null}configuredClassEntries(){return Object.entries(this.settings.classTemplates).filter(e=>typeof e[1]=="string"&&e[1].length>0)}getConfiguredClasses(){return this.configuredClassEntries().map(([e])=>e)}hasClassTemplates(){return this.configuredClassEntries().length>0}};Gh.DisplayNameResolver=$b;async function dse(){return new $b(use.DEFAULT_DISPLAY_NAME_SETTINGS)}a(dse,"createDefaultResolver")});var ej=v(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.isEffortBlocked=Q4;Zf.localToday=J4;Zf.isEpisodeOngoing=Z4;Zf.createDisplayMatcherHostFunctions=yse;var K4=el(),pse=Au(),hse=10,mse=/^\d{4}-\d{2}-\d{2}$/;function Q4(r,e){let t=e.ems__Effort_blocker;if(!t)return!1;let n=X4(String(t)).split("|")[0].trim();if(!n)return!1;let i=r.resolveLinkpathFrontmatter(n);if(!i)return!1;let s=gse(r,i.ems__Effort_status);return s!==K4.EffortStatus.DONE&&s!==K4.EffortStatus.TRASHED}a(Q4,"isEffortBlocked");function X4(r){return r.trim().replace(/^["']/,"").replace(/["']$/,"").replace(/^\[\[/,"").replace(/\]\]$/,"").replace(/\.md$/,"").trim()}a(X4,"unwrapWikilink");function gse(r,e){let t=(0,pse.normalizeEffortStatus)(e);if(t!==null)return t;let n=e;if(n==null)return"";if(Array.isArray(n)){if(n.length!==1)return"";n=n[0]}let i=X4(String(n));if(i==="")return"";let s=i.indexOf("|"),o=s===-1?i:i.slice(0,s).trim(),l=r.resolveLinkpathFrontmatter(o)?.exo__Asset_label;return Array.isArray(l)&&(l=l[0]),typeof l=="string"&&l.trim()?l.trim():o}a(gse,"resolveStatusLabel");function J4(r=new Date){let e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`}a(J4,"localToday");function Y4(r){let e=r;if(Array.isArray(e)){if(e.length===0)return null;e=e[0]}if(e instanceof Date){if(Number.isNaN(e.getTime()))return null;let l=a(u=>String(u).padStart(2,"0"),"pad");return`${String(e.getUTCFullYear()).padStart(4,"0")}-${l(e.getUTCMonth()+1)}-${l(e.getUTCDate())}`}if(typeof e!="string")return null;let n=e.replace(/^\[\[|\]\]$/g,"").replace(/^"|"$/g,"").trim().slice(0,hse);if(!mse.test(n))return null;let[i,s,o]=n.split("-").map(Number),c=new Date(Date.UTC(i,s-1,o));return c.getUTCFullYear()!==i||c.getUTCMonth()!==s-1||c.getUTCDate()!==o?null:n}a(Y4,"toDayKey");function Z4(r,e=new Date){let t=Y4(r.life__Episode_start);if(t===null)return!1;let n=J4(e);if(t>n)return!1;let i=r.life__Episode_end;if(i==null||Array.isArray(i)&&i.length===0||String(i).trim()==="")return!0;let o=Y4(i);return o===null?!1:o>=n}a(Z4,"isEpisodeOngoing");function yse(r){return{isEffortBlocked:a((e,t)=>Q4(r,t),"isEffortBlocked"),isEpisodeOngoing:a((e,t)=>Z4(t),"isEpisodeOngoing")}}a(yse,"createDisplayMatcherHostFunctions")});var We=v(g=>{"use strict";var _se=g&&g.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:a(function(){return e[t]},"get")}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),Ai=g&&g.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&_se(e,r,t)};Object.defineProperty(g,"__esModule",{value:!0});g.CommandResolver=g.extractPropertyLabel=g.uriToPropertyName=g.propertyNameToUri=g.rangeToFieldType=g.PropertyFieldType=g.ParkedAssetIndex=g.resolveDependencyKind=g.parkedPathFor=g.classifyMountTransition=g.PARKED_ROOT=g.DEPENDENCY_KIND_REFERENCE_UID=g.DEPENDENCY_KIND_TBOX_UID=g.transitiveDependsOnClosure=g.isTsFloorMountPath=g.isTsFloorAssetSpace=g.assertTsFloorReconciled=g.assertTsFloor=g.TsFloorViolationError=g.CATALOG_KEEP_NAMESPACES=g.PLUGIN_UI_FLOOR=g.SDK_FLOOR=g.PLUGIN_UI_FLOOR_ASSETSPACE_UIDS=g.SDK_FLOOR_ASSETSPACE_UIDS=g.TS_FLOOR_AS_UID_SHARED_IDENTITIES=g.TS_FLOOR_AS_UID_EXOCMD=g.TS_FLOOR_AS_UID_EXO=g.parseGroundingDefinitionFromFrontmatter=g.isCommandBindingFrontmatter=g.isGroundingFrontmatter=g.isPreconditionFrontmatter=g.isCommandFrontmatter=g.isStyleSource=g.isLabelClass=g.isCommandVariant=g.STYLE_SOURCE_VALUES=g.LABEL_CLASS_VALUES=g.COMMAND_VARIANT_VALUES=g.CommandBindingStyleProperty=g.CommandBindingProperty=g.GroundingProperty=g.PreconditionProperty=g.CommandProperty=g.resolveGroundingTypeFromWikilinkLiteral=g.resolveGroundingTypeFromIRI=g.GROUNDING_TYPE_IRI_TO_ENUM=g.GROUNDING_TYPE_UID_TO_ENUM=g.GROUNDING_TYPE_UIDS=g.GroundingType=g.EFFORT_STATUS_OPTIONS=void 0;g.TypeRegistry=g.GraphQueryService=g.FixMissingLabelService=g.ArchiveAssetService=g.GenericAssetCreationService=g.EnumValueResolver=g.ClassHierarchyResolver=g.PropertySchemaResolver=g.orderProperties=g.loadDefaultSpec=g.clearOrderSpecLoader=g.registerOrderSpecLoader=g.StatusTimestampService=g.RenameToUidService=g.PropertyCleanupService=g.LoggingService=g.extractAssetReference=g.FolderRepairService=g.WorkflowCommandAdapter=g.VisibilityGenerator=g.InstantiationRuleResolver=g.stripTemplateFrontmatter=g.resolveTemplateBody=g.getRegisteredResolverIds=g.clearResolvers=g.registerResolver=g.getResolver=g.installDefaultResolvers=g.WorkflowResolver=g.WorkflowEngine=g.EffortStatusWorkflow=g.ConceptCreationService=g.ClassCreationService=g.AreaHierarchyBuilder=g.TaskStatusService=g.createTripleStoreRequiredPropertyResolver=g.CommandExecutionFlow=g.stripFrontmatter=g.extractSparqlBlock=g.iriToObsidianName=g.NamedQueryRunner=g.createVaultFrontmatterRefToFrontmatterResolver=g.createVaultFrontmatterRefToFolderResolver=g.createVaultFrontmatterClassLabelResolver=g.ServiceRegistry=g.GroundingExecutor=g.registerDefaultHostFunctions=g.hasUidFilename=g.hasNonUidFilename=g.PreconditionEvaluator=void 0;g.AlgebraTranslator=g.ExoQLAlgebraTranslator=g.DescribeOptionsTransformerError=g.DescribeOptionsTransformer=g.SPARQLParseError=g.SPARQLParser=g.ExoQLParser=g.canonicalYamlKey=g.UNPREFIXED_ASSET_FIELDS=g.isPathExcluded=g.normaliseExcludedFolders=g.NoteToRDFConverter=g.SOURCE_VARIABLE=g.SourceAnnotator=g.MAX_LAZY_DEPTH=g.LazyAssetGraphLoader=g.FILE_SPACE_CLASS_UID=g.frontmatterDeclaresFileSpace=g.discoverFileSpaceExclusions=g.deriveLegacyFlatPath=g.deriveUrl=g.derivePath=g.IRICanonicalizer=g.INFERRED_GRAPH=g.PrototypeChainMaterializer=g.PropertyCardinalityRegistry=g.NonInheritablePropertyRegistry=g.RDFSInferenceEngine=g.RDFVocabularyMapper=g.DomainTriple=g.DomainBlankNode=g.DomainLiteral=g.DomainIRI=g.InMemoryTripleStore=g.OBSIDIAN_VAULT_SCHEME=g.iriToVaultPath=g.vaultPathToIRI=g.NullLogger=g.RDFSerializer=g.FilenameValidator=g.EffortSortingHelpers=g.MetadataExtractor=g.MetadataHelpers=g.WikiLinkHelpers=g.DateFormatter=g.parseYamlFrontmatterTolerant=g.STRING_SCALAR_PROPERTIES=g.serializeYamlScalar=g.FrontmatterService=g.SPARQL_PREFIXES=void 0;g.DEFAULT_FLEETING_NOTE_CLASS_UID=g.DEFAULT_INBOX_FOLDER=g.DEFAULT_OWNER_IDENTITY=g.VaultSettings=g.seededUidGenerator=g.liveUidGenerator=g.frozenClock=g.liveClock=g.TransactionError=g.TripleNotFoundError=g.TripleAlreadyExistsError=g.FileAlreadyExistsError=g.FileNotFoundError=g.FilterContainsOptimizer=g.VaultPrefixTransformer=g.CaseWhenTransformerError=g.CaseWhenTransformer=g.ResultSerializer=g.createIncrementalIndexer=g.IncrementalIndexer=g.createSPARQLResultCache=g.SPARQLResultCache=g.QueryPlanCache=g.createDoubleLiteral=g.createDecimalLiteral=g.getNumericValue=g.createPercentileAggregate=g.modeAggregate=g.stddevAggregate=g.varianceAggregate=g.medianAggregate=g.EXO_AGGREGATE_NS=g.BUILT_IN_AGGREGATES=g.CustomAggregateError=g.CustomAggregateRegistry=g.AggregateFunctions=g.BuiltInFunctions=g.SolutionMapping=g.UpdateExecutorError=g.UpdateExecutor=g.QueryExecutor=g.ExoQLQueryExecutor=g.DescribeExecutor=g.ConstructExecutor=g.UnionExecutor=g.OptionalExecutor=g.FilterExecutor=g.BGPExecutor=g.AlgebraSerializer=g.AlgebraOptimizer=void 0;g.parseTarball=g.TripleClassHierarchy=g.ShaclShapeRegistry=g.shaclValidate=g.Namespace=g.ShapeRegistry=g.ShapeLoader=g.selectByPriority=g.LayoutSelector=g.partitionDailyEffortsByClass=g.EMS_PROJECT_CLASS_UID=g.EMS_ACTION_CLASS_UID=g.resolveDailyEffortVisibility=g.resolveBlockVisibility=g.coerceVisibilityOverride=g.DAILY_EFFORTS_OVERRIDE_KEYS=g.BUILTIN_DAILY_EFFORTS_VISIBILITY=g.isPropertiesBlock=g.isLayoutBlockFrontmatter=g.isDailyEffortsByClassBlock=g.isBacklinksTableBlock=g.createLayoutBlockFromFrontmatter=g.PROPERTIES_BLOCK_CLASS_UID=g.PROPERTIES_BLOCK_CLASS_IRI=g.DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_UID=g.DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_IRI=g.BACKLINKS_TABLE_BLOCK_CLASS_UID=g.BACKLINKS_TABLE_BLOCK_CLASS_IRI=g.isLayoutFrontmatter=g.isLayout=g.createLayoutFromFrontmatter=g.LAYOUT_CLASS_UID=g.LAYOUT_CLASS_IRI=g.ExoQLError=g.ExoQL=g.createStreamingSource=g.StreamingLoader=g.resetGlobalPool=g.getGlobalPool=g.MemoryPool=g.CompactGraphStore=g.StringTable=g.DEFAULT_COLORS=g.NODE_FLAGS=g.container=g.resetContainer=g.getContainer=g.createChildContainer=g.registerCoreServices=g.DI_TOKENS=void 0;g.diff3=g.LOCAL_MANIFEST_STORE_FILENAME=g.FileLocalManifestStore=g.isSyncablePath=g.isFileSpaceSyncablePath=g.contentEquals=g.InMemoryQuarantineStore=g.DEFAULT_MAX_FILE_BYTES=g.backupPathFor=g.QuarantineResolver=g.formatRepoTimings=g.formatTimingsLine=g.fmtMs=g.dominantPhase=g.totalMs=g.aggregateTimings=g.addTimings=g.emptyTimings=g.classifyRestPhase=g.SYNC_PHASES=g.SyncPhaseTimer=g.syncProgressPhaseText=g.orderChildrenFirst=g.isNonFastForwardError=g.SyncEngine=g.DEFAULT_LOCAL_MANIFEST_REHASH_MS=g.DEFAULT_MAX_PUSH_RETRIES=g.checkParkedStaleness=g.getTree=g.getHeadSha=g.getCommitInfo=g.getBlobText=g.getBlobBytes=g.planDuplicateUidFix=g.findDuplicateUidGroups=g.rewriteAssetUid=g.gitBlobSha=g.extractAssetUid=g.detectChanges=g.MATERIALIZE_PROGRESS_MIN_FILES=g.MATERIALIZE_PROGRESS_INTERVAL=g.escapeGitmodulesRegex=g.stripGitmodulesEntry=g.appendGitmodulesEntry=g.extractAssetSpaceSha=g.discoverAssetSpaceWrapperDir=g.mountAssetSpaceFiles=g.isBinaryPayload=g.restCreateCommit=g.parseTarballGzip=void 0;g.createDefaultResolver=g.DisplayNameResolver=g.PrintNameRuleService=g.DEFAULT_DISPLAY_NAME_SETTINGS=g.normalizeEffortStatus=g.EFFORT_STATUS_BY_UID=g.EFFORT_STATUS_UID=g.unwrapLinkTarget=g.resolvePreferenceList=g.isFormatOnlyDrift=g.compareAssetSemantics=g.summarizeParityRound=g.ParityValidator=g.deriveAssetSpaceNamespace=g.buildAssetSpaceDescriptor=g.readSpaceSource=g.parseStrictGitHubRepoURL=g.isFileSpaceFrontmatter=g.isAssetSpaceFrontmatter=g.classifySpaceDeclaration=g.SpaceSpecAccumulator=g.SYNC_BRANCH=g.ASSET_SPACE_CLASS_UID=g.OUTBOX_REMOTE_ABSENT=g.OUTBOX_STORE_FILENAME=g.LocalOutboxStore=g.CONFLICT_CACHE_STORE_FILENAME=g.LocalConflictCacheStore=g.scanForSecrets=g.redactSecrets=g.enrichRateLimitError=g.attachRateLimitFields=g.getRateLimitFields=g.extractRateLimitFields=g.parseRetryAfterMs=g.caseInsensitiveHeaderGetter=g.DEFAULT_MAX_RETRIES=g.MIN_RATE_LIMIT_WAIT_MS=g.createRateLimitBudget=g.withRateLimitBackoff=g.isRateLimitError=g.isAuthError=g.MOUNT_BASE_STORE_FILENAME=g.FileMountBaseStore=g.WATERMARK_STORE_FILENAME=g.FileWatermarkStore=g.GatedStructuredMerger=g.MergeShaclGate=g.splitSections=g.StructuredMerger=void 0;g.createDisplayMatcherHostFunctions=g.localToday=g.isEpisodeOngoing=g.isEffortBlocked=g.isWikilink=g.resolveKeyPath=g.DEFAULT_DISPLAY_NAME_TEMPLATE=g.DISPLAY_NAME_PRESETS=g.DisplayNameTemplateEngine=void 0;Ai(Zc(),g);Ai(el(),g);var bse=hE();Object.defineProperty(g,"EFFORT_STATUS_OPTIONS",{enumerable:!0,get:a(function(){return bse.EFFORT_STATUS_OPTIONS},"get")});var Sse=qa();Object.defineProperty(g,"GroundingType",{enumerable:!0,get:a(function(){return Sse.GroundingType},"get")});var qh=pp();Object.defineProperty(g,"GROUNDING_TYPE_UIDS",{enumerable:!0,get:a(function(){return qh.GROUNDING_TYPE_UIDS},"get")});Object.defineProperty(g,"GROUNDING_TYPE_UID_TO_ENUM",{enumerable:!0,get:a(function(){return qh.GROUNDING_TYPE_UID_TO_ENUM},"get")});Object.defineProperty(g,"GROUNDING_TYPE_IRI_TO_ENUM",{enumerable:!0,get:a(function(){return qh.GROUNDING_TYPE_IRI_TO_ENUM},"get")});Object.defineProperty(g,"resolveGroundingTypeFromIRI",{enumerable:!0,get:a(function(){return qh.resolveGroundingTypeFromIRI},"get")});Object.defineProperty(g,"resolveGroundingTypeFromWikilinkLiteral",{enumerable:!0,get:a(function(){return qh.resolveGroundingTypeFromWikilinkLiteral},"get")});var Wh=mE();Object.defineProperty(g,"CommandProperty",{enumerable:!0,get:a(function(){return Wh.CommandProperty},"get")});Object.defineProperty(g,"PreconditionProperty",{enumerable:!0,get:a(function(){return Wh.PreconditionProperty},"get")});Object.defineProperty(g,"GroundingProperty",{enumerable:!0,get:a(function(){return Wh.GroundingProperty},"get")});Object.defineProperty(g,"CommandBindingProperty",{enumerable:!0,get:a(function(){return Wh.CommandBindingProperty},"get")});Object.defineProperty(g,"CommandBindingStyleProperty",{enumerable:!0,get:a(function(){return Wh.CommandBindingStyleProperty},"get")});var ed=gE();Object.defineProperty(g,"COMMAND_VARIANT_VALUES",{enumerable:!0,get:a(function(){return ed.COMMAND_VARIANT_VALUES},"get")});Object.defineProperty(g,"LABEL_CLASS_VALUES",{enumerable:!0,get:a(function(){return ed.LABEL_CLASS_VALUES},"get")});Object.defineProperty(g,"STYLE_SOURCE_VALUES",{enumerable:!0,get:a(function(){return ed.STYLE_SOURCE_VALUES},"get")});Object.defineProperty(g,"isCommandVariant",{enumerable:!0,get:a(function(){return ed.isCommandVariant},"get")});Object.defineProperty(g,"isLabelClass",{enumerable:!0,get:a(function(){return ed.isLabelClass},"get")});Object.defineProperty(g,"isStyleSource",{enumerable:!0,get:a(function(){return ed.isStyleSource},"get")});var Ub=BP();Object.defineProperty(g,"isCommandFrontmatter",{enumerable:!0,get:a(function(){return Ub.isCommandFrontmatter},"get")});Object.defineProperty(g,"isPreconditionFrontmatter",{enumerable:!0,get:a(function(){return Ub.isPreconditionFrontmatter},"get")});Object.defineProperty(g,"isGroundingFrontmatter",{enumerable:!0,get:a(function(){return Ub.isGroundingFrontmatter},"get")});Object.defineProperty(g,"isCommandBindingFrontmatter",{enumerable:!0,get:a(function(){return Ub.isCommandBindingFrontmatter},"get")});var wse=VP();Object.defineProperty(g,"parseGroundingDefinitionFromFrontmatter",{enumerable:!0,get:a(function(){return wse.parseGroundingDefinitionFromFrontmatter},"get")});Ai(GP(),g);Ai(qP(),g);Ai(_E(),g);Ai(bE(),g);Ai(HP(),g);Ai(YP(),g);Ai(ev(),g);Ai(C3(),g);var Mi=x3();Object.defineProperty(g,"TS_FLOOR_AS_UID_EXO",{enumerable:!0,get:a(function(){return Mi.TS_FLOOR_AS_UID_EXO},"get")});Object.defineProperty(g,"TS_FLOOR_AS_UID_EXOCMD",{enumerable:!0,get:a(function(){return Mi.TS_FLOOR_AS_UID_EXOCMD},"get")});Object.defineProperty(g,"TS_FLOOR_AS_UID_SHARED_IDENTITIES",{enumerable:!0,get:a(function(){return Mi.TS_FLOOR_AS_UID_SHARED_IDENTITIES},"get")});Object.defineProperty(g,"SDK_FLOOR_ASSETSPACE_UIDS",{enumerable:!0,get:a(function(){return Mi.SDK_FLOOR_ASSETSPACE_UIDS},"get")});Object.defineProperty(g,"PLUGIN_UI_FLOOR_ASSETSPACE_UIDS",{enumerable:!0,get:a(function(){return Mi.PLUGIN_UI_FLOOR_ASSETSPACE_UIDS},"get")});Object.defineProperty(g,"SDK_FLOOR",{enumerable:!0,get:a(function(){return Mi.SDK_FLOOR},"get")});Object.defineProperty(g,"PLUGIN_UI_FLOOR",{enumerable:!0,get:a(function(){return Mi.PLUGIN_UI_FLOOR},"get")});Object.defineProperty(g,"CATALOG_KEEP_NAMESPACES",{enumerable:!0,get:a(function(){return Mi.CATALOG_KEEP_NAMESPACES},"get")});Object.defineProperty(g,"TsFloorViolationError",{enumerable:!0,get:a(function(){return Mi.TsFloorViolationError},"get")});Object.defineProperty(g,"assertTsFloor",{enumerable:!0,get:a(function(){return Mi.assertTsFloor},"get")});Object.defineProperty(g,"assertTsFloorReconciled",{enumerable:!0,get:a(function(){return Mi.assertTsFloorReconciled},"get")});Object.defineProperty(g,"isTsFloorAssetSpace",{enumerable:!0,get:a(function(){return Mi.isTsFloorAssetSpace},"get")});Object.defineProperty(g,"isTsFloorMountPath",{enumerable:!0,get:a(function(){return Mi.isTsFloorMountPath},"get")});var Ese=O3();Object.defineProperty(g,"transitiveDependsOnClosure",{enumerable:!0,get:a(function(){return Ese.transitiveDependsOnClosure},"get")});var td=iv();Object.defineProperty(g,"DEPENDENCY_KIND_TBOX_UID",{enumerable:!0,get:a(function(){return td.DEPENDENCY_KIND_TBOX_UID},"get")});Object.defineProperty(g,"DEPENDENCY_KIND_REFERENCE_UID",{enumerable:!0,get:a(function(){return td.DEPENDENCY_KIND_REFERENCE_UID},"get")});Object.defineProperty(g,"PARKED_ROOT",{enumerable:!0,get:a(function(){return td.PARKED_ROOT},"get")});Object.defineProperty(g,"classifyMountTransition",{enumerable:!0,get:a(function(){return td.classifyMountTransition},"get")});Object.defineProperty(g,"parkedPathFor",{enumerable:!0,get:a(function(){return td.parkedPathFor},"get")});Object.defineProperty(g,"resolveDependencyKind",{enumerable:!0,get:a(function(){return td.resolveDependencyKind},"get")});var vse=N3();Object.defineProperty(g,"ParkedAssetIndex",{enumerable:!0,get:a(function(){return vse.ParkedAssetIndex},"get")});var tj=Jg();Object.defineProperty(g,"PropertyFieldType",{enumerable:!0,get:a(function(){return tj.PropertyFieldType},"get")});Object.defineProperty(g,"rangeToFieldType",{enumerable:!0,get:a(function(){return tj.rangeToFieldType},"get")});var MR=cv();Object.defineProperty(g,"propertyNameToUri",{enumerable:!0,get:a(function(){return MR.propertyNameToUri},"get")});Object.defineProperty(g,"uriToPropertyName",{enumerable:!0,get:a(function(){return MR.uriToPropertyName},"get")});Object.defineProperty(g,"extractPropertyLabel",{enumerable:!0,get:a(function(){return MR.extractPropertyLabel},"get")});var Tse=PD();Object.defineProperty(g,"CommandResolver",{enumerable:!0,get:a(function(){return Tse.CommandResolver},"get")});var Ase=DD();Object.defineProperty(g,"PreconditionEvaluator",{enumerable:!0,get:a(function(){return Ase.PreconditionEvaluator},"get")});var jR=LD();Object.defineProperty(g,"hasNonUidFilename",{enumerable:!0,get:a(function(){return jR.hasNonUidFilename},"get")});Object.defineProperty(g,"hasUidFilename",{enumerable:!0,get:a(function(){return jR.hasUidFilename},"get")});Object.defineProperty(g,"registerDefaultHostFunctions",{enumerable:!0,get:a(function(){return jR.registerDefaultHostFunctions},"get")});var rj=rL();Object.defineProperty(g,"GroundingExecutor",{enumerable:!0,get:a(function(){return rj.GroundingExecutor},"get")});Object.defineProperty(g,"ServiceRegistry",{enumerable:!0,get:a(function(){return rj.ServiceRegistry},"get")});var Ise=nL();Object.defineProperty(g,"createVaultFrontmatterClassLabelResolver",{enumerable:!0,get:a(function(){return Ise.createVaultFrontmatterClassLabelResolver},"get")});var Rse=iL();Object.defineProperty(g,"createVaultFrontmatterRefToFolderResolver",{enumerable:!0,get:a(function(){return Rse.createVaultFrontmatterRefToFolderResolver},"get")});var Cse=sL();Object.defineProperty(g,"createVaultFrontmatterRefToFrontmatterResolver",{enumerable:!0,get:a(function(){return Cse.createVaultFrontmatterRefToFrontmatterResolver},"get")});var xse=aL();Object.defineProperty(g,"NamedQueryRunner",{enumerable:!0,get:a(function(){return xse.NamedQueryRunner},"get")});var Ose=Lp();Object.defineProperty(g,"iriToObsidianName",{enumerable:!0,get:a(function(){return Ose.iriToObsidianName},"get")});var nj=cL();Object.defineProperty(g,"extractSparqlBlock",{enumerable:!0,get:a(function(){return nj.extractSparqlBlock},"get")});Object.defineProperty(g,"stripFrontmatter",{enumerable:!0,get:a(function(){return nj.stripFrontmatter},"get")});var Pse=uL();Object.defineProperty(g,"CommandExecutionFlow",{enumerable:!0,get:a(function(){return Pse.CommandExecutionFlow},"get")});var Fse=pL();Object.defineProperty(g,"createTripleStoreRequiredPropertyResolver",{enumerable:!0,get:a(function(){return Fse.createTripleStoreRequiredPropertyResolver},"get")});var Dse=JT();Object.defineProperty(g,"TaskStatusService",{enumerable:!0,get:a(function(){return Dse.TaskStatusService},"get")});var Lse=e2();Object.defineProperty(g,"AreaHierarchyBuilder",{enumerable:!0,get:a(function(){return Lse.AreaHierarchyBuilder},"get")});var Nse=o2();Object.defineProperty(g,"ClassCreationService",{enumerable:!0,get:a(function(){return Nse.ClassCreationService},"get")});var kse=c2();Object.defineProperty(g,"ConceptCreationService",{enumerable:!0,get:a(function(){return kse.ConceptCreationService},"get")});var Mse=r_();Object.defineProperty(g,"EffortStatusWorkflow",{enumerable:!0,get:a(function(){return Mse.EffortStatusWorkflow},"get")});var jse=eh();Object.defineProperty(g,"WorkflowEngine",{enumerable:!0,get:a(function(){return jse.WorkflowEngine},"get")});var $se=UT();Object.defineProperty(g,"WorkflowResolver",{enumerable:!0,get:a(function(){return $se.WorkflowResolver},"get")});var Hh=O0();Object.defineProperty(g,"installDefaultResolvers",{enumerable:!0,get:a(function(){return Hh.installDefaultResolvers},"get")});Object.defineProperty(g,"getResolver",{enumerable:!0,get:a(function(){return Hh.getResolver},"get")});Object.defineProperty(g,"registerResolver",{enumerable:!0,get:a(function(){return Hh.registerResolver},"get")});Object.defineProperty(g,"clearResolvers",{enumerable:!0,get:a(function(){return Hh.clearResolvers},"get")});Object.defineProperty(g,"getRegisteredResolverIds",{enumerable:!0,get:a(function(){return Hh.getRegisteredResolverIds},"get")});var ij=gT();Object.defineProperty(g,"resolveTemplateBody",{enumerable:!0,get:a(function(){return ij.resolveTemplateBody},"get")});Object.defineProperty(g,"stripTemplateFrontmatter",{enumerable:!0,get:a(function(){return ij.stripTemplateFrontmatter},"get")});var Use=RL();Object.defineProperty(g,"InstantiationRuleResolver",{enumerable:!0,get:a(function(){return Use.InstantiationRuleResolver},"get")});var Bse=CL();Object.defineProperty(g,"VisibilityGenerator",{enumerable:!0,get:a(function(){return Bse.VisibilityGenerator},"get")});var Vse=xL();Object.defineProperty(g,"WorkflowCommandAdapter",{enumerable:!0,get:a(function(){return Vse.WorkflowCommandAdapter},"get")});var Gse=s_();Object.defineProperty(g,"FolderRepairService",{enumerable:!0,get:a(function(){return Gse.FolderRepairService},"get")});var qse=bf();Object.defineProperty(g,"extractAssetReference",{enumerable:!0,get:a(function(){return qse.extractAssetReference},"get")});var Wse=Al();Object.defineProperty(g,"LoggingService",{enumerable:!0,get:a(function(){return Wse.LoggingService},"get")});var Hse=g2();Object.defineProperty(g,"PropertyCleanupService",{enumerable:!0,get:a(function(){return Hse.PropertyCleanupService},"get")});var zse=_2();Object.defineProperty(g,"RenameToUidService",{enumerable:!0,get:a(function(){return zse.RenameToUidService},"get")});var Kse=n_();Object.defineProperty(g,"StatusTimestampService",{enumerable:!0,get:a(function(){return Kse.StatusTimestampService},"get")});var Bb=L0();Object.defineProperty(g,"registerOrderSpecLoader",{enumerable:!0,get:a(function(){return Bb.registerOrderSpecLoader},"get")});Object.defineProperty(g,"clearOrderSpecLoader",{enumerable:!0,get:a(function(){return Bb.clearOrderSpecLoader},"get")});Object.defineProperty(g,"loadDefaultSpec",{enumerable:!0,get:a(function(){return Bb.loadDefaultSpec},"get")});Object.defineProperty(g,"orderProperties",{enumerable:!0,get:a(function(){return Bb.orderProperties},"get")});var Yse=LL();Object.defineProperty(g,"PropertySchemaResolver",{enumerable:!0,get:a(function(){return Yse.PropertySchemaResolver},"get")});var Qse=NL();Object.defineProperty(g,"ClassHierarchyResolver",{enumerable:!0,get:a(function(){return Qse.ClassHierarchyResolver},"get")});var Xse=kL();Object.defineProperty(g,"EnumValueResolver",{enumerable:!0,get:a(function(){return Xse.EnumValueResolver},"get")});var Jse=v2();Object.defineProperty(g,"GenericAssetCreationService",{enumerable:!0,get:a(function(){return Jse.GenericAssetCreationService},"get")});var Zse=$L();Object.defineProperty(g,"ArchiveAssetService",{enumerable:!0,get:a(function(){return Zse.ArchiveAssetService},"get")});var eoe=BL();Object.defineProperty(g,"FixMissingLabelService",{enumerable:!0,get:a(function(){return eoe.FixMissingLabelService},"get")});var toe=VL();Object.defineProperty(g,"GraphQueryService",{enumerable:!0,get:a(function(){return toe.GraphQueryService},"get")});var roe=qL();Object.defineProperty(g,"TypeRegistry",{enumerable:!0,get:a(function(){return roe.TypeRegistry},"get")});var noe=WL();Object.defineProperty(g,"SPARQL_PREFIXES",{enumerable:!0,get:a(function(){return noe.SPARQL_PREFIXES},"get")});var ioe=Tl();Object.defineProperty(g,"FrontmatterService",{enumerable:!0,get:a(function(){return ioe.FrontmatterService},"get")});var sj=Cu();Object.defineProperty(g,"serializeYamlScalar",{enumerable:!0,get:a(function(){return sj.serializeYamlScalar},"get")});Object.defineProperty(g,"STRING_SCALAR_PROPERTIES",{enumerable:!0,get:a(function(){return sj.STRING_SCALAR_PROPERTIES},"get")});var soe=ck();Object.defineProperty(g,"parseYamlFrontmatterTolerant",{enumerable:!0,get:a(function(){return soe.parseYamlFrontmatterTolerant},"get")});var ooe=ps();Object.defineProperty(g,"DateFormatter",{enumerable:!0,get:a(function(){return ooe.DateFormatter},"get")});var aoe=eo();Object.defineProperty(g,"WikiLinkHelpers",{enumerable:!0,get:a(function(){return aoe.WikiLinkHelpers},"get")});var coe=Il();Object.defineProperty(g,"MetadataHelpers",{enumerable:!0,get:a(function(){return coe.MetadataHelpers},"get")});var loe=lk();Object.defineProperty(g,"MetadataExtractor",{enumerable:!0,get:a(function(){return loe.MetadataExtractor},"get")});var uoe=uk();Object.defineProperty(g,"EffortSortingHelpers",{enumerable:!0,get:a(function(){return uoe.EffortSortingHelpers},"get")});var foe=fk();Object.defineProperty(g,"FilenameValidator",{enumerable:!0,get:a(function(){return foe.FilenameValidator},"get")});var doe=_k();Object.defineProperty(g,"RDFSerializer",{enumerable:!0,get:a(function(){return doe.RDFSerializer},"get")});var poe=Dp();Object.defineProperty(g,"NullLogger",{enumerable:!0,get:a(function(){return poe.NullLogger},"get")});var $R=M0();Object.defineProperty(g,"vaultPathToIRI",{enumerable:!0,get:a(function(){return $R.vaultPathToIRI},"get")});Object.defineProperty(g,"iriToVaultPath",{enumerable:!0,get:a(function(){return $R.iriToVaultPath},"get")});Object.defineProperty(g,"OBSIDIAN_VAULT_SCHEME",{enumerable:!0,get:a(function(){return $R.OBSIDIAN_VAULT_SCHEME},"get")});var hoe=KT();Object.defineProperty(g,"InMemoryTripleStore",{enumerable:!0,get:a(function(){return hoe.InMemoryTripleStore},"get")});var moe=Le();Object.defineProperty(g,"DomainIRI",{enumerable:!0,get:a(function(){return moe.IRI},"get")});var goe=Ye();Object.defineProperty(g,"DomainLiteral",{enumerable:!0,get:a(function(){return goe.Literal},"get")});var yoe=rr();Object.defineProperty(g,"DomainBlankNode",{enumerable:!0,get:a(function(){return yoe.BlankNode},"get")});var _oe=hi();Object.defineProperty(g,"DomainTriple",{enumerable:!0,get:a(function(){return _oe.Triple},"get")});var boe=_T();Object.defineProperty(g,"RDFVocabularyMapper",{enumerable:!0,get:a(function(){return boe.RDFVocabularyMapper},"get")});var Soe=bk();Object.defineProperty(g,"RDFSInferenceEngine",{enumerable:!0,get:a(function(){return Soe.RDFSInferenceEngine},"get")});var woe=EA();Object.defineProperty(g,"NonInheritablePropertyRegistry",{enumerable:!0,get:a(function(){return woe.NonInheritablePropertyRegistry},"get")});var Eoe=AA();Object.defineProperty(g,"PropertyCardinalityRegistry",{enumerable:!0,get:a(function(){return Eoe.PropertyCardinalityRegistry},"get")});var oj=CA();Object.defineProperty(g,"PrototypeChainMaterializer",{enumerable:!0,get:a(function(){return oj.PrototypeChainMaterializer},"get")});Object.defineProperty(g,"INFERRED_GRAPH",{enumerable:!0,get:a(function(){return oj.INFERRED_GRAPH},"get")});var voe=Ik();Object.defineProperty(g,"IRICanonicalizer",{enumerable:!0,get:a(function(){return voe.IRICanonicalizer},"get")});var UR=$0();Object.defineProperty(g,"derivePath",{enumerable:!0,get:a(function(){return UR.derivePath},"get")});Object.defineProperty(g,"deriveUrl",{enumerable:!0,get:a(function(){return UR.deriveUrl},"get")});Object.defineProperty(g,"deriveLegacyFlatPath",{enumerable:!0,get:a(function(){return UR.deriveLegacyFlatPath},"get")});var BR=U0();Object.defineProperty(g,"discoverFileSpaceExclusions",{enumerable:!0,get:a(function(){return BR.discoverFileSpaceExclusions},"get")});Object.defineProperty(g,"frontmatterDeclaresFileSpace",{enumerable:!0,get:a(function(){return BR.frontmatterDeclaresFileSpace},"get")});Object.defineProperty(g,"FILE_SPACE_CLASS_UID",{enumerable:!0,get:a(function(){return BR.FILE_SPACE_CLASS_UID},"get")});var aj=Rk();Object.defineProperty(g,"LazyAssetGraphLoader",{enumerable:!0,get:a(function(){return aj.LazyAssetGraphLoader},"get")});Object.defineProperty(g,"MAX_LAZY_DEPTH",{enumerable:!0,get:a(function(){return aj.MAX_LAZY_DEPTH},"get")});var cj=DA();Object.defineProperty(g,"SourceAnnotator",{enumerable:!0,get:a(function(){return cj.SourceAnnotator},"get")});Object.defineProperty(g,"SOURCE_VARIABLE",{enumerable:!0,get:a(function(){return cj.SOURCE_VARIABLE},"get")});var zh=vl();Object.defineProperty(g,"NoteToRDFConverter",{enumerable:!0,get:a(function(){return zh.NoteToRDFConverter},"get")});Object.defineProperty(g,"normaliseExcludedFolders",{enumerable:!0,get:a(function(){return zh.normaliseExcludedFolders},"get")});Object.defineProperty(g,"isPathExcluded",{enumerable:!0,get:a(function(){return zh.isPathExcluded},"get")});Object.defineProperty(g,"UNPREFIXED_ASSET_FIELDS",{enumerable:!0,get:a(function(){return zh.UNPREFIXED_ASSET_FIELDS},"get")});Object.defineProperty(g,"canonicalYamlKey",{enumerable:!0,get:a(function(){return zh.canonicalYamlKey},"get")});var VR=Uu();Object.defineProperty(g,"ExoQLParser",{enumerable:!0,get:a(function(){return VR.ExoQLParser},"get")});Object.defineProperty(g,"SPARQLParser",{enumerable:!0,get:a(function(){return VR.SPARQLParser},"get")});Object.defineProperty(g,"SPARQLParseError",{enumerable:!0,get:a(function(){return VR.SPARQLParseError},"get")});var lj=a1();Object.defineProperty(g,"DescribeOptionsTransformer",{enumerable:!0,get:a(function(){return lj.DescribeOptionsTransformer},"get")});Object.defineProperty(g,"DescribeOptionsTransformerError",{enumerable:!0,get:a(function(){return lj.DescribeOptionsTransformerError},"get")});var uj=Hu();Object.defineProperty(g,"ExoQLAlgebraTranslator",{enumerable:!0,get:a(function(){return uj.ExoQLAlgebraTranslator},"get")});Object.defineProperty(g,"AlgebraTranslator",{enumerable:!0,get:a(function(){return uj.AlgebraTranslator},"get")});var Toe=Ck();Object.defineProperty(g,"AlgebraOptimizer",{enumerable:!0,get:a(function(){return Toe.AlgebraOptimizer},"get")});var Aoe=xk();Object.defineProperty(g,"AlgebraSerializer",{enumerable:!0,get:a(function(){return Aoe.AlgebraSerializer},"get")});var Ioe=C1();Object.defineProperty(g,"BGPExecutor",{enumerable:!0,get:a(function(){return Ioe.BGPExecutor},"get")});var Roe=u0();Object.defineProperty(g,"FilterExecutor",{enumerable:!0,get:a(function(){return Roe.FilterExecutor},"get")});var Coe=z1();Object.defineProperty(g,"OptionalExecutor",{enumerable:!0,get:a(function(){return Coe.OptionalExecutor},"get")});var xoe=Y1();Object.defineProperty(g,"UnionExecutor",{enumerable:!0,get:a(function(){return xoe.UnionExecutor},"get")});var Ooe=nT();Object.defineProperty(g,"ConstructExecutor",{enumerable:!0,get:a(function(){return Ooe.ConstructExecutor},"get")});var Poe=Pk();Object.defineProperty(g,"DescribeExecutor",{enumerable:!0,get:a(function(){return Poe.DescribeExecutor},"get")});var fj=df();Object.defineProperty(g,"ExoQLQueryExecutor",{enumerable:!0,get:a(function(){return fj.ExoQLQueryExecutor},"get")});Object.defineProperty(g,"QueryExecutor",{enumerable:!0,get:a(function(){return fj.QueryExecutor},"get")});var dj=Dk();Object.defineProperty(g,"UpdateExecutor",{enumerable:!0,get:a(function(){return dj.UpdateExecutor},"get")});Object.defineProperty(g,"UpdateExecutorError",{enumerable:!0,get:a(function(){return dj.UpdateExecutorError},"get")});var Foe=Ko();Object.defineProperty(g,"SolutionMapping",{enumerable:!0,get:a(function(){return Foe.SolutionMapping},"get")});var Doe=l0();Object.defineProperty(g,"BuiltInFunctions",{enumerable:!0,get:a(function(){return Doe.BuiltInFunctions},"get")});var Loe=Nk();Object.defineProperty(g,"AggregateFunctions",{enumerable:!0,get:a(function(){return Loe.AggregateFunctions},"get")});var pj=$y();Object.defineProperty(g,"CustomAggregateRegistry",{enumerable:!0,get:a(function(){return pj.CustomAggregateRegistry},"get")});Object.defineProperty(g,"CustomAggregateError",{enumerable:!0,get:a(function(){return pj.CustomAggregateError},"get")});var wo=By();Object.defineProperty(g,"BUILT_IN_AGGREGATES",{enumerable:!0,get:a(function(){return wo.BUILT_IN_AGGREGATES},"get")});Object.defineProperty(g,"EXO_AGGREGATE_NS",{enumerable:!0,get:a(function(){return wo.EXO_AGGREGATE_NS},"get")});Object.defineProperty(g,"medianAggregate",{enumerable:!0,get:a(function(){return wo.medianAggregate},"get")});Object.defineProperty(g,"varianceAggregate",{enumerable:!0,get:a(function(){return wo.varianceAggregate},"get")});Object.defineProperty(g,"stddevAggregate",{enumerable:!0,get:a(function(){return wo.stddevAggregate},"get")});Object.defineProperty(g,"modeAggregate",{enumerable:!0,get:a(function(){return wo.modeAggregate},"get")});Object.defineProperty(g,"createPercentileAggregate",{enumerable:!0,get:a(function(){return wo.createPercentileAggregate},"get")});Object.defineProperty(g,"getNumericValue",{enumerable:!0,get:a(function(){return wo.getNumericValue},"get")});Object.defineProperty(g,"createDecimalLiteral",{enumerable:!0,get:a(function(){return wo.createDecimalLiteral},"get")});Object.defineProperty(g,"createDoubleLiteral",{enumerable:!0,get:a(function(){return wo.createDoubleLiteral},"get")});var Noe=kk();Object.defineProperty(g,"QueryPlanCache",{enumerable:!0,get:a(function(){return Noe.QueryPlanCache},"get")});var hj=Mk();Object.defineProperty(g,"SPARQLResultCache",{enumerable:!0,get:a(function(){return hj.SPARQLResultCache},"get")});Object.defineProperty(g,"createSPARQLResultCache",{enumerable:!0,get:a(function(){return hj.createSPARQLResultCache},"get")});var mj=jk();Object.defineProperty(g,"IncrementalIndexer",{enumerable:!0,get:a(function(){return mj.IncrementalIndexer},"get")});Object.defineProperty(g,"createIncrementalIndexer",{enumerable:!0,get:a(function(){return mj.createIncrementalIndexer},"get")});var koe=$k();Object.defineProperty(g,"ResultSerializer",{enumerable:!0,get:a(function(){return koe.ResultSerializer},"get")});var gj=i1();Object.defineProperty(g,"CaseWhenTransformer",{enumerable:!0,get:a(function(){return gj.CaseWhenTransformer},"get")});Object.defineProperty(g,"CaseWhenTransformerError",{enumerable:!0,get:a(function(){return gj.CaseWhenTransformerError},"get")});var Moe=f1();Object.defineProperty(g,"VaultPrefixTransformer",{enumerable:!0,get:a(function(){return Moe.VaultPrefixTransformer},"get")});var joe=NA();Object.defineProperty(g,"FilterContainsOptimizer",{enumerable:!0,get:a(function(){return joe.FilterContainsOptimizer},"get")});var yj=Uk();Object.defineProperty(g,"FileNotFoundError",{enumerable:!0,get:a(function(){return yj.FileNotFoundError},"get")});Object.defineProperty(g,"FileAlreadyExistsError",{enumerable:!0,get:a(function(){return yj.FileAlreadyExistsError},"get")});var GR=qT();Object.defineProperty(g,"TripleAlreadyExistsError",{enumerable:!0,get:a(function(){return GR.TripleAlreadyExistsError},"get")});Object.defineProperty(g,"TripleNotFoundError",{enumerable:!0,get:a(function(){return GR.TripleNotFoundError},"get")});Object.defineProperty(g,"TransactionError",{enumerable:!0,get:a(function(){return GR.TransactionError},"get")});var _j=qp();Object.defineProperty(g,"liveClock",{enumerable:!0,get:a(function(){return _j.liveClock},"get")});Object.defineProperty(g,"frozenClock",{enumerable:!0,get:a(function(){return _j.frozenClock},"get")});var bj=R0();Object.defineProperty(g,"liveUidGenerator",{enumerable:!0,get:a(function(){return bj.liveUidGenerator},"get")});Object.defineProperty(g,"seededUidGenerator",{enumerable:!0,get:a(function(){return bj.seededUidGenerator},"get")});var Vb=KA();Object.defineProperty(g,"VaultSettings",{enumerable:!0,get:a(function(){return Vb.VaultSettings},"get")});Object.defineProperty(g,"DEFAULT_OWNER_IDENTITY",{enumerable:!0,get:a(function(){return Vb.DEFAULT_OWNER_IDENTITY},"get")});Object.defineProperty(g,"DEFAULT_INBOX_FOLDER",{enumerable:!0,get:a(function(){return Vb.DEFAULT_INBOX_FOLDER},"get")});Object.defineProperty(g,"DEFAULT_FLEETING_NOTE_CLASS_UID",{enumerable:!0,get:a(function(){return Vb.DEFAULT_FLEETING_NOTE_CLASS_UID},"get")});var $oe=Qn();Object.defineProperty(g,"DI_TOKENS",{enumerable:!0,get:a(function(){return $oe.DI_TOKENS},"get")});var Kh=Bk();Object.defineProperty(g,"registerCoreServices",{enumerable:!0,get:a(function(){return Kh.registerCoreServices},"get")});Object.defineProperty(g,"createChildContainer",{enumerable:!0,get:a(function(){return Kh.createChildContainer},"get")});Object.defineProperty(g,"getContainer",{enumerable:!0,get:a(function(){return Kh.getContainer},"get")});Object.defineProperty(g,"resetContainer",{enumerable:!0,get:a(function(){return Kh.resetContainer},"get")});Object.defineProperty(g,"container",{enumerable:!0,get:a(function(){return Kh.container},"get")});var wa=zk();Object.defineProperty(g,"NODE_FLAGS",{enumerable:!0,get:a(function(){return wa.NODE_FLAGS},"get")});Object.defineProperty(g,"DEFAULT_COLORS",{enumerable:!0,get:a(function(){return wa.DEFAULT_COLORS},"get")});Object.defineProperty(g,"StringTable",{enumerable:!0,get:a(function(){return wa.StringTable},"get")});Object.defineProperty(g,"CompactGraphStore",{enumerable:!0,get:a(function(){return wa.CompactGraphStore},"get")});Object.defineProperty(g,"MemoryPool",{enumerable:!0,get:a(function(){return wa.MemoryPool},"get")});Object.defineProperty(g,"getGlobalPool",{enumerable:!0,get:a(function(){return wa.getGlobalPool},"get")});Object.defineProperty(g,"resetGlobalPool",{enumerable:!0,get:a(function(){return wa.resetGlobalPool},"get")});Object.defineProperty(g,"StreamingLoader",{enumerable:!0,get:a(function(){return wa.StreamingLoader},"get")});Object.defineProperty(g,"createStreamingSource",{enumerable:!0,get:a(function(){return wa.createStreamingSource},"get")});var Sj=Kk();Object.defineProperty(g,"ExoQL",{enumerable:!0,get:a(function(){return Sj.ExoQL},"get")});Object.defineProperty(g,"ExoQLError",{enumerable:!0,get:a(function(){return Sj.ExoQLError},"get")});var Yh=Y_();Object.defineProperty(g,"LAYOUT_CLASS_IRI",{enumerable:!0,get:a(function(){return Yh.LAYOUT_CLASS_IRI},"get")});Object.defineProperty(g,"LAYOUT_CLASS_UID",{enumerable:!0,get:a(function(){return Yh.LAYOUT_CLASS_UID},"get")});Object.defineProperty(g,"createLayoutFromFrontmatter",{enumerable:!0,get:a(function(){return Yh.createLayoutFromFrontmatter},"get")});Object.defineProperty(g,"isLayout",{enumerable:!0,get:a(function(){return Yh.isLayout},"get")});Object.defineProperty(g,"isLayoutFrontmatter",{enumerable:!0,get:a(function(){return Yh.isLayoutFrontmatter},"get")});var Fs=Y_();Object.defineProperty(g,"BACKLINKS_TABLE_BLOCK_CLASS_IRI",{enumerable:!0,get:a(function(){return Fs.BACKLINKS_TABLE_BLOCK_CLASS_IRI},"get")});Object.defineProperty(g,"BACKLINKS_TABLE_BLOCK_CLASS_UID",{enumerable:!0,get:a(function(){return Fs.BACKLINKS_TABLE_BLOCK_CLASS_UID},"get")});Object.defineProperty(g,"DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_IRI",{enumerable:!0,get:a(function(){return Fs.DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_IRI},"get")});Object.defineProperty(g,"DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_UID",{enumerable:!0,get:a(function(){return Fs.DAILY_EFFORTS_BY_CLASS_BLOCK_CLASS_UID},"get")});Object.defineProperty(g,"PROPERTIES_BLOCK_CLASS_IRI",{enumerable:!0,get:a(function(){return Fs.PROPERTIES_BLOCK_CLASS_IRI},"get")});Object.defineProperty(g,"PROPERTIES_BLOCK_CLASS_UID",{enumerable:!0,get:a(function(){return Fs.PROPERTIES_BLOCK_CLASS_UID},"get")});Object.defineProperty(g,"createLayoutBlockFromFrontmatter",{enumerable:!0,get:a(function(){return Fs.createLayoutBlockFromFrontmatter},"get")});Object.defineProperty(g,"isBacklinksTableBlock",{enumerable:!0,get:a(function(){return Fs.isBacklinksTableBlock},"get")});Object.defineProperty(g,"isDailyEffortsByClassBlock",{enumerable:!0,get:a(function(){return Fs.isDailyEffortsByClassBlock},"get")});Object.defineProperty(g,"isLayoutBlockFrontmatter",{enumerable:!0,get:a(function(){return Fs.isLayoutBlockFrontmatter},"get")});Object.defineProperty(g,"isPropertiesBlock",{enumerable:!0,get:a(function(){return Fs.isPropertiesBlock},"get")});var yc=Y_();Object.defineProperty(g,"BUILTIN_DAILY_EFFORTS_VISIBILITY",{enumerable:!0,get:a(function(){return yc.BUILTIN_DAILY_EFFORTS_VISIBILITY},"get")});Object.defineProperty(g,"DAILY_EFFORTS_OVERRIDE_KEYS",{enumerable:!0,get:a(function(){return yc.DAILY_EFFORTS_OVERRIDE_KEYS},"get")});Object.defineProperty(g,"coerceVisibilityOverride",{enumerable:!0,get:a(function(){return yc.coerceVisibilityOverride},"get")});Object.defineProperty(g,"resolveBlockVisibility",{enumerable:!0,get:a(function(){return yc.resolveBlockVisibility},"get")});Object.defineProperty(g,"resolveDailyEffortVisibility",{enumerable:!0,get:a(function(){return yc.resolveDailyEffortVisibility},"get")});Object.defineProperty(g,"EMS_ACTION_CLASS_UID",{enumerable:!0,get:a(function(){return yc.EMS_ACTION_CLASS_UID},"get")});Object.defineProperty(g,"EMS_PROJECT_CLASS_UID",{enumerable:!0,get:a(function(){return yc.EMS_PROJECT_CLASS_UID},"get")});Object.defineProperty(g,"partitionDailyEffortsByClass",{enumerable:!0,get:a(function(){return yc.partitionDailyEffortsByClass},"get")});var wj=aM();Object.defineProperty(g,"LayoutSelector",{enumerable:!0,get:a(function(){return wj.LayoutSelector},"get")});Object.defineProperty(g,"selectByPriority",{enumerable:!0,get:a(function(){return wj.selectByPriority},"get")});Ai(gM(),g);var Uoe=yM();Object.defineProperty(g,"ShapeLoader",{enumerable:!0,get:a(function(){return Uoe.ShapeLoader},"get")});var Boe=yI();Object.defineProperty(g,"ShapeRegistry",{enumerable:!0,get:a(function(){return Boe.ShapeRegistry},"get")});var Voe=Yt();Object.defineProperty(g,"Namespace",{enumerable:!0,get:a(function(){return Voe.Namespace},"get")});var Ej=EI();Object.defineProperty(g,"shaclValidate",{enumerable:!0,get:a(function(){return Ej.validate},"get")});Object.defineProperty(g,"ShaclShapeRegistry",{enumerable:!0,get:a(function(){return Ej.ShapeRegistry},"get")});Ai(bM(),g);var Goe=SM();Object.defineProperty(g,"TripleClassHierarchy",{enumerable:!0,get:a(function(){return Goe.ClassHierarchy},"get")});var vj=II();Object.defineProperty(g,"parseTarball",{enumerable:!0,get:a(function(){return vj.parseTarball},"get")});Object.defineProperty(g,"parseTarballGzip",{enumerable:!0,get:a(function(){return vj.parseTarballGzip},"get")});var Tj=db();Object.defineProperty(g,"restCreateCommit",{enumerable:!0,get:a(function(){return Tj.restCreateCommit},"get")});Object.defineProperty(g,"isBinaryPayload",{enumerable:!0,get:a(function(){return Tj.isBinaryPayload},"get")});var _c=RM();Object.defineProperty(g,"mountAssetSpaceFiles",{enumerable:!0,get:a(function(){return _c.mountAssetSpaceFiles},"get")});Object.defineProperty(g,"discoverAssetSpaceWrapperDir",{enumerable:!0,get:a(function(){return _c.discoverWrapperDir},"get")});Object.defineProperty(g,"extractAssetSpaceSha",{enumerable:!0,get:a(function(){return _c.extractShaFromWrapper},"get")});Object.defineProperty(g,"appendGitmodulesEntry",{enumerable:!0,get:a(function(){return _c.appendGitmodulesEntry},"get")});Object.defineProperty(g,"stripGitmodulesEntry",{enumerable:!0,get:a(function(){return _c.stripGitmodulesEntry},"get")});Object.defineProperty(g,"escapeGitmodulesRegex",{enumerable:!0,get:a(function(){return _c.escapeGitmodulesRegex},"get")});Object.defineProperty(g,"MATERIALIZE_PROGRESS_INTERVAL",{enumerable:!0,get:a(function(){return _c.MATERIALIZE_PROGRESS_INTERVAL},"get")});Object.defineProperty(g,"MATERIALIZE_PROGRESS_MIN_FILES",{enumerable:!0,get:a(function(){return _c.MATERIALIZE_PROGRESS_MIN_FILES},"get")});var Aj=Ah();Object.defineProperty(g,"detectChanges",{enumerable:!0,get:a(function(){return Aj.detectChanges},"get")});Object.defineProperty(g,"extractAssetUid",{enumerable:!0,get:a(function(){return Aj.extractAssetUid},"get")});var qoe=Wf();Object.defineProperty(g,"gitBlobSha",{enumerable:!0,get:a(function(){return qoe.gitBlobSha},"get")});var qR=PM();Object.defineProperty(g,"rewriteAssetUid",{enumerable:!0,get:a(function(){return qR.rewriteAssetUid},"get")});Object.defineProperty(g,"findDuplicateUidGroups",{enumerable:!0,get:a(function(){return qR.findDuplicateUidGroups},"get")});Object.defineProperty(g,"planDuplicateUidFix",{enumerable:!0,get:a(function(){return qR.planDuplicateUidFix},"get")});var Qh=Hf();Object.defineProperty(g,"getBlobBytes",{enumerable:!0,get:a(function(){return Qh.getBlobBytes},"get")});Object.defineProperty(g,"getBlobText",{enumerable:!0,get:a(function(){return Qh.getBlobText},"get")});Object.defineProperty(g,"getCommitInfo",{enumerable:!0,get:a(function(){return Qh.getCommitInfo},"get")});Object.defineProperty(g,"getHeadSha",{enumerable:!0,get:a(function(){return Qh.getHeadSha},"get")});Object.defineProperty(g,"getTree",{enumerable:!0,get:a(function(){return Qh.getTree},"get")});var Woe=LM();Object.defineProperty(g,"checkParkedStaleness",{enumerable:!0,get:a(function(){return Woe.checkParkedStaleness},"get")});var rd=ZM();Object.defineProperty(g,"DEFAULT_MAX_PUSH_RETRIES",{enumerable:!0,get:a(function(){return rd.DEFAULT_MAX_PUSH_RETRIES},"get")});Object.defineProperty(g,"DEFAULT_LOCAL_MANIFEST_REHASH_MS",{enumerable:!0,get:a(function(){return rd.DEFAULT_LOCAL_MANIFEST_REHASH_MS},"get")});Object.defineProperty(g,"SyncEngine",{enumerable:!0,get:a(function(){return rd.SyncEngine},"get")});Object.defineProperty(g,"isNonFastForwardError",{enumerable:!0,get:a(function(){return rd.isNonFastForwardError},"get")});Object.defineProperty(g,"orderChildrenFirst",{enumerable:!0,get:a(function(){return rd.orderChildrenFirst},"get")});Object.defineProperty(g,"syncProgressPhaseText",{enumerable:!0,get:a(function(){return rd.syncProgressPhaseText},"get")});var Ds=NI();Object.defineProperty(g,"SyncPhaseTimer",{enumerable:!0,get:a(function(){return Ds.SyncPhaseTimer},"get")});Object.defineProperty(g,"SYNC_PHASES",{enumerable:!0,get:a(function(){return Ds.SYNC_PHASES},"get")});Object.defineProperty(g,"classifyRestPhase",{enumerable:!0,get:a(function(){return Ds.classifyRestPhase},"get")});Object.defineProperty(g,"emptyTimings",{enumerable:!0,get:a(function(){return Ds.emptyTimings},"get")});Object.defineProperty(g,"addTimings",{enumerable:!0,get:a(function(){return Ds.addTimings},"get")});Object.defineProperty(g,"aggregateTimings",{enumerable:!0,get:a(function(){return Ds.aggregateTimings},"get")});Object.defineProperty(g,"totalMs",{enumerable:!0,get:a(function(){return Ds.totalMs},"get")});Object.defineProperty(g,"dominantPhase",{enumerable:!0,get:a(function(){return Ds.dominantPhase},"get")});Object.defineProperty(g,"fmtMs",{enumerable:!0,get:a(function(){return Ds.fmtMs},"get")});Object.defineProperty(g,"formatTimingsLine",{enumerable:!0,get:a(function(){return Ds.formatTimingsLine},"get")});Object.defineProperty(g,"formatRepoTimings",{enumerable:!0,get:a(function(){return Ds.formatRepoTimings},"get")});var Ij=t4();Object.defineProperty(g,"QuarantineResolver",{enumerable:!0,get:a(function(){return Ij.QuarantineResolver},"get")});Object.defineProperty(g,"backupPathFor",{enumerable:!0,get:a(function(){return Ij.backupPathFor},"get")});var Xh=Sb();Object.defineProperty(g,"DEFAULT_MAX_FILE_BYTES",{enumerable:!0,get:a(function(){return Xh.DEFAULT_MAX_FILE_BYTES},"get")});Object.defineProperty(g,"InMemoryQuarantineStore",{enumerable:!0,get:a(function(){return Xh.InMemoryQuarantineStore},"get")});Object.defineProperty(g,"contentEquals",{enumerable:!0,get:a(function(){return Xh.contentEquals},"get")});Object.defineProperty(g,"isFileSpaceSyncablePath",{enumerable:!0,get:a(function(){return Xh.isFileSpaceSyncablePath},"get")});Object.defineProperty(g,"isSyncablePath",{enumerable:!0,get:a(function(){return Xh.isSyncablePath},"get")});var Rj=r4();Object.defineProperty(g,"FileLocalManifestStore",{enumerable:!0,get:a(function(){return Rj.FileLocalManifestStore},"get")});Object.defineProperty(g,"LOCAL_MANIFEST_STORE_FILENAME",{enumerable:!0,get:a(function(){return Rj.LOCAL_MANIFEST_STORE_FILENAME},"get")});var Hoe=JI();Object.defineProperty(g,"diff3",{enumerable:!0,get:a(function(){return Hoe.diff3},"get")});var Cj=s4();Object.defineProperty(g,"StructuredMerger",{enumerable:!0,get:a(function(){return Cj.StructuredMerger},"get")});Object.defineProperty(g,"splitSections",{enumerable:!0,get:a(function(){return Cj.splitSections},"get")});var zoe=o4();Object.defineProperty(g,"MergeShaclGate",{enumerable:!0,get:a(function(){return zoe.MergeShaclGate},"get")});var Koe=a4();Object.defineProperty(g,"GatedStructuredMerger",{enumerable:!0,get:a(function(){return Koe.GatedStructuredMerger},"get")});var xj=c4();Object.defineProperty(g,"FileWatermarkStore",{enumerable:!0,get:a(function(){return xj.FileWatermarkStore},"get")});Object.defineProperty(g,"WATERMARK_STORE_FILENAME",{enumerable:!0,get:a(function(){return xj.WATERMARK_STORE_FILENAME},"get")});var Oj=l4();Object.defineProperty(g,"FileMountBaseStore",{enumerable:!0,get:a(function(){return Oj.FileMountBaseStore},"get")});Object.defineProperty(g,"MOUNT_BASE_STORE_FILENAME",{enumerable:!0,get:a(function(){return Oj.MOUNT_BASE_STORE_FILENAME},"get")});var Yoe=yb();Object.defineProperty(g,"isAuthError",{enumerable:!0,get:a(function(){return Yoe.isAuthError},"get")});var Jh=bb();Object.defineProperty(g,"isRateLimitError",{enumerable:!0,get:a(function(){return Jh.isRateLimitError},"get")});Object.defineProperty(g,"withRateLimitBackoff",{enumerable:!0,get:a(function(){return Jh.withRateLimitBackoff},"get")});Object.defineProperty(g,"createRateLimitBudget",{enumerable:!0,get:a(function(){return Jh.createRateLimitBudget},"get")});Object.defineProperty(g,"MIN_RATE_LIMIT_WAIT_MS",{enumerable:!0,get:a(function(){return Jh.MIN_RATE_LIMIT_WAIT_MS},"get")});Object.defineProperty(g,"DEFAULT_MAX_RETRIES",{enumerable:!0,get:a(function(){return Jh.DEFAULT_MAX_RETRIES},"get")});var nd=VI();Object.defineProperty(g,"caseInsensitiveHeaderGetter",{enumerable:!0,get:a(function(){return nd.caseInsensitiveHeaderGetter},"get")});Object.defineProperty(g,"parseRetryAfterMs",{enumerable:!0,get:a(function(){return nd.parseRetryAfterMs},"get")});Object.defineProperty(g,"extractRateLimitFields",{enumerable:!0,get:a(function(){return nd.extractRateLimitFields},"get")});Object.defineProperty(g,"getRateLimitFields",{enumerable:!0,get:a(function(){return nd.getRateLimitFields},"get")});Object.defineProperty(g,"attachRateLimitFields",{enumerable:!0,get:a(function(){return nd.attachRateLimitFields},"get")});Object.defineProperty(g,"enrichRateLimitError",{enumerable:!0,get:a(function(){return nd.enrichRateLimitError},"get")});var Pj=$I();Object.defineProperty(g,"redactSecrets",{enumerable:!0,get:a(function(){return Pj.redactSecrets},"get")});Object.defineProperty(g,"scanForSecrets",{enumerable:!0,get:a(function(){return Pj.scanForSecrets},"get")});var Fj=u4();Object.defineProperty(g,"LocalConflictCacheStore",{enumerable:!0,get:a(function(){return Fj.LocalConflictCacheStore},"get")});Object.defineProperty(g,"CONFLICT_CACHE_STORE_FILENAME",{enumerable:!0,get:a(function(){return Fj.CONFLICT_CACHE_STORE_FILENAME},"get")});var WR=gb();Object.defineProperty(g,"LocalOutboxStore",{enumerable:!0,get:a(function(){return WR.LocalOutboxStore},"get")});Object.defineProperty(g,"OUTBOX_STORE_FILENAME",{enumerable:!0,get:a(function(){return WR.OUTBOX_STORE_FILENAME},"get")});Object.defineProperty(g,"OUTBOX_REMOTE_ABSENT",{enumerable:!0,get:a(function(){return WR.OUTBOX_REMOTE_ABSENT},"get")});var bc=dR();Object.defineProperty(g,"ASSET_SPACE_CLASS_UID",{enumerable:!0,get:a(function(){return bc.ASSET_SPACE_CLASS_UID},"get")});Object.defineProperty(g,"SYNC_BRANCH",{enumerable:!0,get:a(function(){return bc.SYNC_BRANCH},"get")});Object.defineProperty(g,"SpaceSpecAccumulator",{enumerable:!0,get:a(function(){return bc.SpaceSpecAccumulator},"get")});Object.defineProperty(g,"classifySpaceDeclaration",{enumerable:!0,get:a(function(){return bc.classifySpaceDeclaration},"get")});Object.defineProperty(g,"isAssetSpaceFrontmatter",{enumerable:!0,get:a(function(){return bc.isAssetSpaceFrontmatter},"get")});Object.defineProperty(g,"isFileSpaceFrontmatter",{enumerable:!0,get:a(function(){return bc.isFileSpaceFrontmatter},"get")});Object.defineProperty(g,"parseStrictGitHubRepoURL",{enumerable:!0,get:a(function(){return bc.parseStrictGitHubRepoURL},"get")});Object.defineProperty(g,"readSpaceSource",{enumerable:!0,get:a(function(){return bc.readSpaceSource},"get")});var Dj=_4();Object.defineProperty(g,"buildAssetSpaceDescriptor",{enumerable:!0,get:a(function(){return Dj.buildAssetSpaceDescriptor},"get")});Object.defineProperty(g,"deriveAssetSpaceNamespace",{enumerable:!0,get:a(function(){return Dj.deriveAssetSpaceNamespace},"get")});var Lj=T4();Object.defineProperty(g,"ParityValidator",{enumerable:!0,get:a(function(){return Lj.ParityValidator},"get")});Object.defineProperty(g,"summarizeParityRound",{enumerable:!0,get:a(function(){return Lj.summarizeParityRound},"get")});var Nj=hR();Object.defineProperty(g,"compareAssetSemantics",{enumerable:!0,get:a(function(){return Nj.compareAssetSemantics},"get")});Object.defineProperty(g,"isFormatOnlyDrift",{enumerable:!0,get:a(function(){return Nj.isFormatOnlyDrift},"get")});Ai(N4(),g);Ai(q4(),g);var Qoe=OR();Object.defineProperty(g,"resolvePreferenceList",{enumerable:!0,get:a(function(){return Qoe.resolvePreferenceList},"get")});var Xoe=FR();Object.defineProperty(g,"unwrapLinkTarget",{enumerable:!0,get:a(function(){return Xoe.unwrapLinkTarget},"get")});var HR=Au();Object.defineProperty(g,"EFFORT_STATUS_UID",{enumerable:!0,get:a(function(){return HR.EFFORT_STATUS_UID},"get")});Object.defineProperty(g,"EFFORT_STATUS_BY_UID",{enumerable:!0,get:a(function(){return HR.EFFORT_STATUS_BY_UID},"get")});Object.defineProperty(g,"normalizeEffortStatus",{enumerable:!0,get:a(function(){return HR.normalizeEffortStatus},"get")});var Joe=DR();Object.defineProperty(g,"DEFAULT_DISPLAY_NAME_SETTINGS",{enumerable:!0,get:a(function(){return Joe.DEFAULT_DISPLAY_NAME_SETTINGS},"get")});var Zoe=H4();Object.defineProperty(g,"PrintNameRuleService",{enumerable:!0,get:a(function(){return Zoe.PrintNameRuleService},"get")});var kj=z4();Object.defineProperty(g,"DisplayNameResolver",{enumerable:!0,get:a(function(){return kj.DisplayNameResolver},"get")});Object.defineProperty(g,"createDefaultResolver",{enumerable:!0,get:a(function(){return kj.createDefaultResolver},"get")});var zR=kR();Object.defineProperty(g,"DisplayNameTemplateEngine",{enumerable:!0,get:a(function(){return zR.DisplayNameTemplateEngine},"get")});Object.defineProperty(g,"DISPLAY_NAME_PRESETS",{enumerable:!0,get:a(function(){return zR.DISPLAY_NAME_PRESETS},"get")});Object.defineProperty(g,"DEFAULT_DISPLAY_NAME_TEMPLATE",{enumerable:!0,get:a(function(){return zR.DEFAULT_DISPLAY_NAME_TEMPLATE},"get")});var Mj=Vh();Object.defineProperty(g,"resolveKeyPath",{enumerable:!0,get:a(function(){return Mj.resolveKeyPath},"get")});Object.defineProperty(g,"isWikilink",{enumerable:!0,get:a(function(){return Mj.isWikilink},"get")});var Gb=ej();Object.defineProperty(g,"isEffortBlocked",{enumerable:!0,get:a(function(){return Gb.isEffortBlocked},"get")});Object.defineProperty(g,"isEpisodeOngoing",{enumerable:!0,get:a(function(){return Gb.isEpisodeOngoing},"get")});Object.defineProperty(g,"localToday",{enumerable:!0,get:a(function(){return Gb.localToday},"get")});Object.defineProperty(g,"createDisplayMatcherHostFunctions",{enumerable:!0,get:a(function(){return Gb.createDisplayMatcherHostFunctions},"get")})});var Zr=v(KR=>{"use strict";KR.fromCallback=function(r){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")r.apply(this,e);else return new Promise((t,n)=>{e.push((i,s)=>i!=null?n(i):t(s)),r.apply(this,e)})},"name",{value:r.name})};KR.fromPromise=function(r){return Object.defineProperty(function(...e){let t=e[e.length-1];if(typeof t!="function")return r.apply(this,e);e.pop(),r.apply(this,e).then(n=>t(null,n),t)},"name",{value:r.name})}});var $j=v((aCe,jj)=>{var Sc=require("constants"),eae=process.cwd,qb=null,tae=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return qb||(qb=eae.call(process)),qb};try{process.cwd()}catch{}typeof process.chdir=="function"&&(YR=process.chdir,process.chdir=function(r){qb=null,YR.call(process,r)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,YR));var YR;jj.exports=rae;function rae(r){Sc.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(r),r.lutimes||t(r),r.chown=s(r.chown),r.fchown=s(r.fchown),r.lchown=s(r.lchown),r.chmod=n(r.chmod),r.fchmod=n(r.fchmod),r.lchmod=n(r.lchmod),r.chownSync=o(r.chownSync),r.fchownSync=o(r.fchownSync),r.lchownSync=o(r.lchownSync),r.chmodSync=i(r.chmodSync),r.fchmodSync=i(r.fchmodSync),r.lchmodSync=i(r.lchmodSync),r.stat=c(r.stat),r.fstat=c(r.fstat),r.lstat=c(r.lstat),r.statSync=l(r.statSync),r.fstatSync=l(r.fstatSync),r.lstatSync=l(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(f,d,p){p&&process.nextTick(p)},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(f,d,p,h){h&&process.nextTick(h)},r.lchownSync=function(){}),tae==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:(function(f){function d(p,h,m){var y=Date.now(),_=0;f(p,h,a(function b(T){if(T&&(T.code==="EACCES"||T.code==="EPERM"||T.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){r.stat(h,function(I,E){I&&I.code==="ENOENT"?f(p,h,b):m(T)})},_),_<100&&(_+=10);return}m&&m(T)},"CB"))}return a(d,"rename"),Object.setPrototypeOf&&Object.setPrototypeOf(d,f),d})(r.rename)),r.read=typeof r.read!="function"?r.read:(function(f){function d(p,h,m,y,_,b){var T;if(b&&typeof b=="function"){var I=0;T=a(function(E,S,R){if(E&&E.code==="EAGAIN"&&I<10)return I++,f.call(r,p,h,m,y,_,T);b.apply(this,arguments)},"callback")}return f.call(r,p,h,m,y,_,T)}return a(d,"read"),Object.setPrototypeOf&&Object.setPrototypeOf(d,f),d})(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:(function(f){return function(d,p,h,m,y){for(var _=0;;)try{return f.call(r,d,p,h,m,y)}catch(b){if(b.code==="EAGAIN"&&_<10){_++;continue}throw b}}})(r.readSync);function e(f){f.lchmod=function(d,p,h){f.open(d,Sc.O_WRONLY|Sc.O_SYMLINK,p,function(m,y){if(m){h&&h(m);return}f.fchmod(y,p,function(_){f.close(y,function(b){h&&h(_||b)})})})},f.lchmodSync=function(d,p){var h=f.openSync(d,Sc.O_WRONLY|Sc.O_SYMLINK,p),m=!0,y;try{y=f.fchmodSync(h,p),m=!1}finally{if(m)try{f.closeSync(h)}catch{}else f.closeSync(h)}return y}}a(e,"patchLchmod");function t(f){Sc.hasOwnProperty("O_SYMLINK")&&f.futimes?(f.lutimes=function(d,p,h,m){f.open(d,Sc.O_SYMLINK,function(y,_){if(y){m&&m(y);return}f.futimes(_,p,h,function(b){f.close(_,function(T){m&&m(b||T)})})})},f.lutimesSync=function(d,p,h){var m=f.openSync(d,Sc.O_SYMLINK),y,_=!0;try{y=f.futimesSync(m,p,h),_=!1}finally{if(_)try{f.closeSync(m)}catch{}else f.closeSync(m)}return y}):f.futimes&&(f.lutimes=function(d,p,h,m){m&&process.nextTick(m)},f.lutimesSync=function(){})}a(t,"patchLutimes");function n(f){return f&&function(d,p,h){return f.call(r,d,p,function(m){u(m)&&(m=null),h&&h.apply(this,arguments)})}}a(n,"chmodFix");function i(f){return f&&function(d,p){try{return f.call(r,d,p)}catch(h){if(!u(h))throw h}}}a(i,"chmodFixSync");function s(f){return f&&function(d,p,h,m){return f.call(r,d,p,h,function(y){u(y)&&(y=null),m&&m.apply(this,arguments)})}}a(s,"chownFix");function o(f){return f&&function(d,p,h){try{return f.call(r,d,p,h)}catch(m){if(!u(m))throw m}}}a(o,"chownFixSync");function c(f){return f&&function(d,p,h){typeof p=="function"&&(h=p,p=null);function m(y,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),h&&h.apply(this,arguments)}return a(m,"callback"),p?f.call(r,d,p,m):f.call(r,d,m)}}a(c,"statFix");function l(f){return f&&function(d,p){var h=p?f.call(r,d,p):f.call(r,d);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}a(l,"statFixSync");function u(f){if(!f||f.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(f.code==="EINVAL"||f.code==="EPERM"))}a(u,"chownErOk")}a(rae,"patch")});var Vj=v((lCe,Bj)=>{var Uj=require("stream").Stream;Bj.exports=nae;function nae(r){return{ReadStream:e,WriteStream:t};function e(n,i){if(!(this instanceof e))return new e(n,i);Uj.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),c=0,l=o.length;c<l;c++){var u=o[c];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}r.open(this.path,this.flags,this.mode,function(f,d){if(f){s.emit("error",f),s.readable=!1;return}s.fd=d,s.emit("open",d),s._read()})}function t(n,i){if(!(this instanceof t))return new t(n,i);Uj.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),o=0,c=s.length;o<c;o++){var l=s[o];this[l]=i[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=r.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}a(nae,"legacy")});var qj=v((fCe,Gj)=>{"use strict";Gj.exports=sae;var iae=Object.getPrototypeOf||function(r){return r.__proto__};function sae(r){if(r===null||typeof r!="object")return r;if(r instanceof Object)var e={__proto__:iae(r)};else var e=Object.create(null);return Object.getOwnPropertyNames(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}a(sae,"clone")});var sd=v((pCe,JR)=>{var sr=require("fs"),oae=$j(),aae=Vj(),cae=qj(),Wb=require("util"),wn,zb;typeof Symbol=="function"&&typeof Symbol.for=="function"?(wn=Symbol.for("graceful-fs.queue"),zb=Symbol.for("graceful-fs.previous")):(wn="___graceful-fs.queue",zb="___graceful-fs.previous");function lae(){}a(lae,"noop");function zj(r,e){Object.defineProperty(r,wn,{get:a(function(){return e},"get")})}a(zj,"publishQueue");var Gl=lae;Wb.debuglog?Gl=Wb.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Gl=a(function(){var r=Wb.format.apply(Wb,arguments);r="GFS4: "+r.split(/\n/).join(`
353
+ GFS4: `),console.error(r)},"debug"));sr[wn]||(Wj=global[wn]||[],zj(sr,Wj),sr.close=(function(r){function e(t,n){return r.call(sr,t,function(i){i||Hj(),typeof n=="function"&&n.apply(this,arguments)})}return a(e,"close"),Object.defineProperty(e,zb,{value:r}),e})(sr.close),sr.closeSync=(function(r){function e(t){r.apply(sr,arguments),Hj()}return a(e,"closeSync"),Object.defineProperty(e,zb,{value:r}),e})(sr.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Gl(sr[wn]),require("assert").equal(sr[wn].length,0)}));var Wj;global[wn]||zj(global,sr[wn]);JR.exports=QR(cae(sr));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!sr.__patched&&(JR.exports=QR(sr),sr.__patched=!0);function QR(r){oae(r),r.gracefulify=QR,r.createReadStream=S,r.createWriteStream=R;var e=r.readFile;r.readFile=t;function t(M,O,L){return typeof O=="function"&&(L=O,O=null),te(M,O,L);function te(re,V,K,Se){return e(re,V,function(ce){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?id([te,[re,V,K],ce,Se||Date.now(),Date.now()]):typeof K=="function"&&K.apply(this,arguments)})}a(te,"go$readFile")}a(t,"readFile");var n=r.writeFile;r.writeFile=i;function i(M,O,L,te){return typeof L=="function"&&(te=L,L=null),re(M,O,L,te);function re(V,K,Se,ce,q){return n(V,K,Se,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?id([re,[V,K,Se,ce],W,q||Date.now(),Date.now()]):typeof ce=="function"&&ce.apply(this,arguments)})}a(re,"go$writeFile")}a(i,"writeFile");var s=r.appendFile;s&&(r.appendFile=o);function o(M,O,L,te){return typeof L=="function"&&(te=L,L=null),re(M,O,L,te);function re(V,K,Se,ce,q){return s(V,K,Se,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?id([re,[V,K,Se,ce],W,q||Date.now(),Date.now()]):typeof ce=="function"&&ce.apply(this,arguments)})}a(re,"go$appendFile")}a(o,"appendFile");var c=r.copyFile;c&&(r.copyFile=l);function l(M,O,L,te){return typeof L=="function"&&(te=L,L=0),re(M,O,L,te);function re(V,K,Se,ce,q){return c(V,K,Se,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?id([re,[V,K,Se,ce],W,q||Date.now(),Date.now()]):typeof ce=="function"&&ce.apply(this,arguments)})}a(re,"go$copyFile")}a(l,"copyFile");var u=r.readdir;r.readdir=d;var f=/^v[0-5]\./;function d(M,O,L){typeof O=="function"&&(L=O,O=null);var te=f.test(process.version)?a(function(K,Se,ce,q){return u(K,re(K,Se,ce,q))},"go$readdir"):a(function(K,Se,ce,q){return u(K,Se,re(K,Se,ce,q))},"go$readdir");return te(M,O,L);function re(V,K,Se,ce){return function(q,W){q&&(q.code==="EMFILE"||q.code==="ENFILE")?id([te,[V,K,Se],q,ce||Date.now(),Date.now()]):(W&&W.sort&&W.sort(),typeof Se=="function"&&Se.call(this,q,W))}}}if(a(d,"readdir"),process.version.substr(0,4)==="v0.8"){var p=aae(r);b=p.ReadStream,I=p.WriteStream}var h=r.ReadStream;h&&(b.prototype=Object.create(h.prototype),b.prototype.open=T);var m=r.WriteStream;m&&(I.prototype=Object.create(m.prototype),I.prototype.open=E),Object.defineProperty(r,"ReadStream",{get:a(function(){return b},"get"),set:a(function(M){b=M},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(r,"WriteStream",{get:a(function(){return I},"get"),set:a(function(M){I=M},"set"),enumerable:!0,configurable:!0});var y=b;Object.defineProperty(r,"FileReadStream",{get:a(function(){return y},"get"),set:a(function(M){y=M},"set"),enumerable:!0,configurable:!0});var _=I;Object.defineProperty(r,"FileWriteStream",{get:a(function(){return _},"get"),set:a(function(M){_=M},"set"),enumerable:!0,configurable:!0});function b(M,O){return this instanceof b?(h.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}a(b,"ReadStream");function T(){var M=this;P(M.path,M.flags,M.mode,function(O,L){O?(M.autoClose&&M.destroy(),M.emit("error",O)):(M.fd=L,M.emit("open",L),M.read())})}a(T,"ReadStream$open");function I(M,O){return this instanceof I?(m.apply(this,arguments),this):I.apply(Object.create(I.prototype),arguments)}a(I,"WriteStream");function E(){var M=this;P(M.path,M.flags,M.mode,function(O,L){O?(M.destroy(),M.emit("error",O)):(M.fd=L,M.emit("open",L))})}a(E,"WriteStream$open");function S(M,O){return new r.ReadStream(M,O)}a(S,"createReadStream");function R(M,O){return new r.WriteStream(M,O)}a(R,"createWriteStream");var D=r.open;r.open=P;function P(M,O,L,te){return typeof L=="function"&&(te=L,L=null),re(M,O,L,te);function re(V,K,Se,ce,q){return D(V,K,Se,function(W,ne){W&&(W.code==="EMFILE"||W.code==="ENFILE")?id([re,[V,K,Se,ce],W,q||Date.now(),Date.now()]):typeof ce=="function"&&ce.apply(this,arguments)})}a(re,"go$open")}return a(P,"open"),r}a(QR,"patch");function id(r){Gl("ENQUEUE",r[0].name,r[1]),sr[wn].push(r),XR()}a(id,"enqueue");var Hb;function Hj(){for(var r=Date.now(),e=0;e<sr[wn].length;++e)sr[wn][e].length>2&&(sr[wn][e][3]=r,sr[wn][e][4]=r);XR()}a(Hj,"resetQueue");function XR(){if(clearTimeout(Hb),Hb=void 0,sr[wn].length!==0){var r=sr[wn].shift(),e=r[0],t=r[1],n=r[2],i=r[3],s=r[4];if(i===void 0)Gl("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-i>=6e4){Gl("TIMEOUT",e.name,t);var o=t.pop();typeof o=="function"&&o.call(null,n)}else{var c=Date.now()-s,l=Math.max(s-i,1),u=Math.min(l*1.2,100);c>=u?(Gl("RETRY",e.name,t),e.apply(null,t.concat([i]))):sr[wn].push(r)}Hb===void 0&&(Hb=setTimeout(XR,0))}}a(XR,"retry")});var ei=v(Ea=>{"use strict";var Kj=Zr().fromCallback,Zn=sd(),uae=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(r=>typeof Zn[r]=="function");Object.assign(Ea,Zn);uae.forEach(r=>{Ea[r]=Kj(Zn[r])});Ea.exists=function(r,e){return typeof e=="function"?Zn.exists(r,e):new Promise(t=>Zn.exists(r,t))};Ea.read=function(r,e,t,n,i,s){return typeof s=="function"?Zn.read(r,e,t,n,i,s):new Promise((o,c)=>{Zn.read(r,e,t,n,i,(l,u,f)=>{if(l)return c(l);o({bytesRead:u,buffer:f})})})};Ea.write=function(r,e,...t){return typeof t[t.length-1]=="function"?Zn.write(r,e,...t):new Promise((n,i)=>{Zn.write(r,e,...t,(s,o,c)=>{if(s)return i(s);n({bytesWritten:o,buffer:c})})})};Ea.readv=function(r,e,...t){return typeof t[t.length-1]=="function"?Zn.readv(r,e,...t):new Promise((n,i)=>{Zn.readv(r,e,...t,(s,o,c)=>{if(s)return i(s);n({bytesRead:o,buffers:c})})})};Ea.writev=function(r,e,...t){return typeof t[t.length-1]=="function"?Zn.writev(r,e,...t):new Promise((n,i)=>{Zn.writev(r,e,...t,(s,o,c)=>{if(s)return i(s);n({bytesWritten:o,buffers:c})})})};typeof Zn.realpath.native=="function"?Ea.realpath.native=Kj(Zn.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Qj=v((gCe,Yj)=>{"use strict";var fae=require("path");Yj.exports.checkPath=a(function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(fae.parse(e).root,""))){let n=new Error(`Path contains invalid characters: ${e}`);throw n.code="EINVAL",n}},"checkPath")});var e$=v((_Ce,ZR)=>{"use strict";var Xj=ei(),{checkPath:Jj}=Qj(),Zj=a(r=>{let e={mode:511};return typeof r=="number"?r:{...e,...r}.mode},"getMode");ZR.exports.makeDir=async(r,e)=>(Jj(r),Xj.mkdir(r,{mode:Zj(e),recursive:!0}));ZR.exports.makeDirSync=(r,e)=>(Jj(r),Xj.mkdirSync(r,{mode:Zj(e),recursive:!0}))});var Ls=v((SCe,t$)=>{"use strict";var dae=Zr().fromPromise,{makeDir:pae,makeDirSync:eC}=e$(),tC=dae(pae);t$.exports={mkdirs:tC,mkdirsSync:eC,mkdirp:tC,mkdirpSync:eC,ensureDir:tC,ensureDirSync:eC}});var wc=v((wCe,n$)=>{"use strict";var hae=Zr().fromPromise,r$=ei();function mae(r){return r$.access(r).then(()=>!0).catch(()=>!1)}a(mae,"pathExists");n$.exports={pathExists:hae(mae),pathExistsSync:r$.existsSync}});var rC=v((vCe,i$)=>{"use strict";var od=ei(),gae=Zr().fromPromise;async function yae(r,e,t){let n=await od.open(r,"r+"),i=null;try{await od.futimes(n,e,t)}catch(s){i=s}finally{try{await od.close(n)}catch(s){i||(i=s)}}if(i)throw i}a(yae,"utimesMillis");function _ae(r,e,t){let n=od.openSync(r,"r+"),i=null;try{od.futimesSync(n,e,t)}catch(s){i=s}finally{try{od.closeSync(n)}catch(s){i||(i=s)}}if(i)throw i}a(_ae,"utimesMillisSync");i$.exports={utimesMillis:gae(yae),utimesMillisSync:_ae}});var ql=v((ACe,o$)=>{"use strict";var ad=ei(),en=require("path"),s$=Zr().fromPromise;function bae(r,e,t){let n=t.dereference?i=>ad.stat(i,{bigint:!0}):i=>ad.lstat(i,{bigint:!0});return Promise.all([n(r),n(e).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,s])=>({srcStat:i,destStat:s}))}a(bae,"getStats");function Sae(r,e,t){let n,i=t.dereference?o=>ad.statSync(o,{bigint:!0}):o=>ad.lstatSync(o,{bigint:!0}),s=i(r);try{n=i(e)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:n}}a(Sae,"getStatsSync");async function wae(r,e,t,n){let{srcStat:i,destStat:s}=await bae(r,e,n);if(s){if(Zh(i,s)){let o=en.basename(r),c=en.basename(e);if(t==="move"&&o!==c&&o.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${r}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${r}'.`)}if(i.isDirectory()&&sC(r,e))throw new Error(Kb(r,e,t));return{srcStat:i,destStat:s}}a(wae,"checkPaths");function Eae(r,e,t,n){let{srcStat:i,destStat:s}=Sae(r,e,n);if(s){if(Zh(i,s)){let o=en.basename(r),c=en.basename(e);if(t==="move"&&o!==c&&o.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${r}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${r}'.`)}if(i.isDirectory()&&sC(r,e))throw new Error(Kb(r,e,t));return{srcStat:i,destStat:s}}a(Eae,"checkPathsSync");async function nC(r,e,t,n){let i=en.resolve(en.dirname(r)),s=en.resolve(en.dirname(t));if(s===i||s===en.parse(s).root)return;let o;try{o=await ad.stat(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return nC(r,e,s,n);throw c}if(Zh(e,o))throw new Error(Kb(r,t,n));return nC(r,e,s,n)}a(nC,"checkParentPaths");function iC(r,e,t,n){let i=en.resolve(en.dirname(r)),s=en.resolve(en.dirname(t));if(s===i||s===en.parse(s).root)return;let o;try{o=ad.statSync(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return iC(r,e,s,n);throw c}if(Zh(e,o))throw new Error(Kb(r,t,n));return iC(r,e,s,n)}a(iC,"checkParentPathsSync");function Zh(r,e){return e.ino!==void 0&&e.dev!==void 0&&e.ino===r.ino&&e.dev===r.dev}a(Zh,"areIdentical");function sC(r,e){let t=en.resolve(r).split(en.sep).filter(i=>i),n=en.resolve(e).split(en.sep).filter(i=>i);return t.every((i,s)=>n[s]===i)}a(sC,"isSrcSubdir");function Kb(r,e,t){return`Cannot ${t} '${r}' to a subdirectory of itself, '${e}'.`}a(Kb,"errMsg");o$.exports={checkPaths:s$(wae),checkPathsSync:Eae,checkParentPaths:s$(nC),checkParentPathsSync:iC,isSrcSubdir:sC,areIdentical:Zh}});var c$=v((RCe,a$)=>{"use strict";async function vae(r,e){let t=[];for await(let n of r)t.push(e(n).then(()=>null,i=>i??new Error("unknown error")));await Promise.all(t.map(n=>n.then(i=>{if(i!==null)throw i})))}a(vae,"asyncIteratorConcurrentProcess");a$.exports={asyncIteratorConcurrentProcess:vae}});var p$=v((xCe,d$)=>{"use strict";var Nn=ei(),em=require("path"),{mkdirs:Tae}=Ls(),{pathExists:Aae}=wc(),{utimesMillis:Iae}=rC(),tm=ql(),{asyncIteratorConcurrentProcess:Rae}=c$();async function Cae(r,e,t={}){typeof t=="function"&&(t={filter:t}),t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
354
354
 
355
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:i}=await tm.checkPaths(r,e,"copy",t);if(await tm.checkParentPaths(r,n,e,"copy"),!await u$(r,e,t))return;let o=em.dirname(e);await Aae(o)||await Tae(o),await f$(i,r,e,t)}a(Cae,"copy");async function u$(r,e,t){return t.filter?t.filter(r,e):!0}a(u$,"runFilter");async function f$(r,e,t,n){let s=await(n.dereference?Nn.stat:Nn.lstat)(e);if(s.isDirectory())return Fae(s,r,e,t,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return xae(s,r,e,t,n);if(s.isSymbolicLink())return Dae(r,e,t,n);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}a(f$,"getStatsAndPerformCopy");async function xae(r,e,t,n,i){if(!e)return l$(r,t,n,i);if(i.overwrite)return await Nn.unlink(n),l$(r,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}a(xae,"onFile");async function l$(r,e,t,n){if(await Nn.copyFile(e,t),n.preserveTimestamps){Oae(r.mode)&&await Pae(t,r.mode);let i=await Nn.stat(e);await Iae(t,i.atime,i.mtime)}return Nn.chmod(t,r.mode)}a(l$,"copyFile");function Oae(r){return(r&128)===0}a(Oae,"fileIsNotWritable");function Pae(r,e){return Nn.chmod(r,e|128)}a(Pae,"makeFileWritable");async function Fae(r,e,t,n,i){e||await Nn.mkdir(n),await Rae(await Nn.opendir(t),async s=>{let o=em.join(t,s.name),c=em.join(n,s.name);if(await u$(o,c,i)){let{destStat:u}=await tm.checkPaths(o,c,"copy",i);await f$(u,o,c,i)}}),e||await Nn.chmod(n,r.mode)}a(Fae,"onDir");async function Dae(r,e,t,n){let i=await Nn.readlink(e);if(n.dereference&&(i=em.resolve(process.cwd(),i)),!r)return Nn.symlink(i,t);let s=null;try{s=await Nn.readlink(t)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return Nn.symlink(i,t);throw o}if(n.dereference&&(s=em.resolve(process.cwd(),s)),i!==s){if(tm.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(tm.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`)}return await Nn.unlink(t),Nn.symlink(i,t)}a(Dae,"onLink");d$.exports=Cae});var _$=v((OCe,y$)=>{"use strict";var ti=sd(),rm=require("path"),Lae=Ls().mkdirsSync,Nae=rC().utimesMillisSync,nm=ql();function kae(r,e,t){typeof t=="function"&&(t={filter:t}),t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
355
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:i}=await tm.checkPaths(r,e,"copy",t);if(await tm.checkParentPaths(r,n,e,"copy"),!await u$(r,e,t))return;let o=em.dirname(e);await Aae(o)||await Tae(o),await f$(i,r,e,t)}a(Cae,"copy");async function u$(r,e,t){return t.filter?t.filter(r,e):!0}a(u$,"runFilter");async function f$(r,e,t,n){let s=await(n.dereference?Nn.stat:Nn.lstat)(e);if(s.isDirectory())return Fae(s,r,e,t,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return xae(s,r,e,t,n);if(s.isSymbolicLink())return Dae(r,e,t,n);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}a(f$,"getStatsAndPerformCopy");async function xae(r,e,t,n,i){if(!e)return l$(r,t,n,i);if(i.overwrite)return await Nn.unlink(n),l$(r,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}a(xae,"onFile");async function l$(r,e,t,n){if(await Nn.copyFile(e,t),n.preserveTimestamps){Oae(r.mode)&&await Pae(t,r.mode);let i=await Nn.stat(e);await Iae(t,i.atime,i.mtime)}return Nn.chmod(t,r.mode)}a(l$,"copyFile");function Oae(r){return(r&128)===0}a(Oae,"fileIsNotWritable");function Pae(r,e){return Nn.chmod(r,e|128)}a(Pae,"makeFileWritable");async function Fae(r,e,t,n,i){e||await Nn.mkdir(n),await Rae(await Nn.opendir(t),async s=>{let o=em.join(t,s.name),c=em.join(n,s.name);if(await u$(o,c,i)){let{destStat:u}=await tm.checkPaths(o,c,"copy",i);await f$(u,o,c,i)}}),e||await Nn.chmod(n,r.mode)}a(Fae,"onDir");async function Dae(r,e,t,n){let i=await Nn.readlink(e);if(n.dereference&&(i=em.resolve(process.cwd(),i)),!r)return Nn.symlink(i,t);let s=null;try{s=await Nn.readlink(t)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return Nn.symlink(i,t);throw o}if(n.dereference&&(s=em.resolve(process.cwd(),s)),i!==s){if(tm.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(tm.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`)}return await Nn.unlink(t),Nn.symlink(i,t)}a(Dae,"onLink");d$.exports=Cae});var _$=v((PCe,y$)=>{"use strict";var ti=sd(),rm=require("path"),Lae=Ls().mkdirsSync,Nae=rC().utimesMillisSync,nm=ql();function kae(r,e,t){typeof t=="function"&&(t={filter:t}),t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
356
356
 
357
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:i}=nm.checkPathsSync(r,e,"copy",t);if(nm.checkParentPathsSync(r,n,e,"copy"),t.filter&&!t.filter(r,e))return;let s=rm.dirname(e);return ti.existsSync(s)||Lae(s),h$(i,r,e,t)}a(kae,"copySync");function h$(r,e,t,n){let s=(n.dereference?ti.statSync:ti.lstatSync)(e);if(s.isDirectory())return Gae(s,r,e,t,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Mae(s,r,e,t,n);if(s.isSymbolicLink())return Hae(r,e,t,n);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}a(h$,"getStats");function Mae(r,e,t,n,i){return e?jae(r,t,n,i):m$(r,t,n,i)}a(Mae,"onFile");function jae(r,e,t,n){if(n.overwrite)return ti.unlinkSync(t),m$(r,e,t,n);if(n.errorOnExist)throw new Error(`'${t}' already exists`)}a(jae,"mayCopyFile");function m$(r,e,t,n){return ti.copyFileSync(e,t),n.preserveTimestamps&&$ae(r.mode,e,t),oC(t,r.mode)}a(m$,"copyFile");function $ae(r,e,t){return Uae(r)&&Bae(t,r),Vae(e,t)}a($ae,"handleTimestamps");function Uae(r){return(r&128)===0}a(Uae,"fileIsNotWritable");function Bae(r,e){return oC(r,e|128)}a(Bae,"makeFileWritable");function oC(r,e){return ti.chmodSync(r,e)}a(oC,"setDestMode");function Vae(r,e){let t=ti.statSync(r);return Nae(e,t.atime,t.mtime)}a(Vae,"setDestTimestamps");function Gae(r,e,t,n,i){return e?g$(t,n,i):qae(r.mode,t,n,i)}a(Gae,"onDir");function qae(r,e,t,n){return ti.mkdirSync(t),g$(e,t,n),oC(t,r)}a(qae,"mkDirAndCopy");function g$(r,e,t){let n=ti.opendirSync(r);try{let i;for(;(i=n.readSync())!==null;)Wae(i.name,r,e,t)}finally{n.closeSync()}}a(g$,"copyDir");function Wae(r,e,t,n){let i=rm.join(e,r),s=rm.join(t,r);if(n.filter&&!n.filter(i,s))return;let{destStat:o}=nm.checkPathsSync(i,s,"copy",n);return h$(o,i,s,n)}a(Wae,"copyDirItem");function Hae(r,e,t,n){let i=ti.readlinkSync(e);if(n.dereference&&(i=rm.resolve(process.cwd(),i)),r){let s;try{s=ti.readlinkSync(t)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return ti.symlinkSync(i,t);throw o}if(n.dereference&&(s=rm.resolve(process.cwd(),s)),i!==s){if(nm.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(nm.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`)}return zae(i,t)}else return ti.symlinkSync(i,t)}a(Hae,"onLink");function zae(r,e){return ti.unlinkSync(e),ti.symlinkSync(r,e)}a(zae,"copyLink");y$.exports=kae});var Yb=v((FCe,b$)=>{"use strict";var Kae=Zr().fromPromise;b$.exports={copy:Kae(p$()),copySync:_$()}});var im=v((DCe,w$)=>{"use strict";var S$=sd(),Yae=Zr().fromCallback;function Qae(r,e){S$.rm(r,{recursive:!0,force:!0},e)}a(Qae,"remove");function Xae(r){S$.rmSync(r,{recursive:!0,force:!0})}a(Xae,"removeSync");w$.exports={remove:Yae(Qae),removeSync:Xae}});var x$=v((NCe,C$)=>{"use strict";var Jae=Zr().fromPromise,T$=ei(),A$=require("path"),I$=Ls(),R$=im(),E$=Jae(a(async function(e){let t;try{t=await T$.readdir(e)}catch{return I$.mkdirs(e)}return Promise.all(t.map(n=>R$.remove(A$.join(e,n))))},"emptyDir"));function v$(r){let e;try{e=T$.readdirSync(r)}catch{return I$.mkdirsSync(r)}e.forEach(t=>{t=A$.join(r,t),R$.removeSync(t)})}a(v$,"emptyDirSync");C$.exports={emptyDirSync:v$,emptydirSync:v$,emptyDir:E$,emptydir:E$}});var D$=v((MCe,F$)=>{"use strict";var Zae=Zr().fromPromise,O$=require("path"),va=ei(),P$=Ls();async function ece(r){let e;try{e=await va.stat(r)}catch{}if(e&&e.isFile())return;let t=O$.dirname(r),n=null;try{n=await va.stat(t)}catch(i){if(i.code==="ENOENT"){await P$.mkdirs(t),await va.writeFile(r,"");return}else throw i}n.isDirectory()?await va.writeFile(r,""):await va.readdir(t)}a(ece,"createFile");function tce(r){let e;try{e=va.statSync(r)}catch{}if(e&&e.isFile())return;let t=O$.dirname(r);try{va.statSync(t).isDirectory()||va.readdirSync(t)}catch(n){if(n&&n.code==="ENOENT")P$.mkdirsSync(t);else throw n}va.writeFileSync(r,"")}a(tce,"createFileSync");F$.exports={createFile:Zae(ece),createFileSync:tce}});var j$=v(($Ce,M$)=>{"use strict";var rce=Zr().fromPromise,L$=require("path"),Ec=ei(),N$=Ls(),{pathExists:nce}=wc(),{areIdentical:k$}=ql();async function ice(r,e){let t;try{t=await Ec.lstat(e,{bigint:!0})}catch{}let n;try{n=await Ec.lstat(r,{bigint:!0})}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}if(t&&k$(n,t))return;let i=L$.dirname(e);await nce(i)||await N$.mkdirs(i),await Ec.link(r,e)}a(ice,"createLink");function sce(r,e){let t;try{t=Ec.lstatSync(e,{bigint:!0})}catch{}try{let s=Ec.lstatSync(r,{bigint:!0});if(t&&k$(s,t))return}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}let n=L$.dirname(e);return Ec.existsSync(n)||N$.mkdirsSync(n),Ec.linkSync(r,e)}a(sce,"createLinkSync");M$.exports={createLink:rce(ice),createLinkSync:sce}});var U$=v((BCe,$$)=>{"use strict";var vc=require("path"),sm=ei(),{pathExists:oce}=wc(),ace=Zr().fromPromise;async function cce(r,e){if(vc.isAbsolute(r)){try{await sm.lstat(r)}catch(s){throw s.message=s.message.replace("lstat","ensureSymlink"),s}return{toCwd:r,toDst:r}}let t=vc.dirname(e),n=vc.join(t,r);if(await oce(n))return{toCwd:n,toDst:r};try{await sm.lstat(r)}catch(s){throw s.message=s.message.replace("lstat","ensureSymlink"),s}return{toCwd:r,toDst:vc.relative(t,r)}}a(cce,"symlinkPaths");function lce(r,e){if(vc.isAbsolute(r)){if(!sm.existsSync(r))throw new Error("absolute srcpath does not exist");return{toCwd:r,toDst:r}}let t=vc.dirname(e),n=vc.join(t,r);if(sm.existsSync(n))return{toCwd:n,toDst:r};if(!sm.existsSync(r))throw new Error("relative srcpath does not exist");return{toCwd:r,toDst:vc.relative(t,r)}}a(lce,"symlinkPathsSync");$$.exports={symlinkPaths:ace(cce),symlinkPathsSync:lce}});var G$=v((GCe,V$)=>{"use strict";var B$=ei(),uce=Zr().fromPromise;async function fce(r,e){if(e)return e;let t;try{t=await B$.lstat(r)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}a(fce,"symlinkType");function dce(r,e){if(e)return e;let t;try{t=B$.lstatSync(r)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}a(dce,"symlinkTypeSync");V$.exports={symlinkType:uce(fce),symlinkTypeSync:dce}});var H$=v((WCe,W$)=>{"use strict";var pce=Zr().fromPromise,Tc=require("path"),Ii=ei(),{mkdirs:hce,mkdirsSync:mce}=Ls(),{symlinkPaths:gce,symlinkPathsSync:yce}=U$(),{symlinkType:_ce,symlinkTypeSync:bce}=G$(),{pathExists:Sce}=wc(),{areIdentical:q$}=ql();async function wce(r,e,t){let n;try{n=await Ii.lstat(e)}catch{}if(n&&n.isSymbolicLink()){let c;if(Tc.isAbsolute(r))c=await Ii.stat(r,{bigint:!0});else{let u=Tc.dirname(e),f=Tc.join(u,r);try{c=await Ii.stat(f,{bigint:!0})}catch{c=await Ii.stat(r,{bigint:!0})}}let l;try{l=await Ii.stat(e,{bigint:!0})}catch(u){if(u.code!=="ENOENT")throw u}if(l&&q$(c,l))return}let i=await gce(r,e);r=i.toDst;let s=await _ce(i.toCwd,t),o=Tc.dirname(e);return await Sce(o)||await hce(o),Ii.symlink(r,e,s)}a(wce,"createSymlink");function Ece(r,e,t){let n;try{n=Ii.lstatSync(e)}catch{}if(n&&n.isSymbolicLink()){let c;if(Tc.isAbsolute(r))c=Ii.statSync(r,{bigint:!0});else{let u=Tc.dirname(e),f=Tc.join(u,r);try{c=Ii.statSync(f,{bigint:!0})}catch{c=Ii.statSync(r,{bigint:!0})}}let l;try{l=Ii.statSync(e,{bigint:!0})}catch(u){if(u.code!=="ENOENT")throw u}if(l&&q$(c,l))return}let i=yce(r,e);r=i.toDst,t=bce(i.toCwd,t);let s=Tc.dirname(e);return Ii.existsSync(s)||mce(s),Ii.symlinkSync(r,e,t)}a(Ece,"createSymlinkSync");W$.exports={createSymlink:pce(wce),createSymlinkSync:Ece}});var e9=v((zCe,Z$)=>{"use strict";var{createFile:z$,createFileSync:K$}=D$(),{createLink:Y$,createLinkSync:Q$}=j$(),{createSymlink:X$,createSymlinkSync:J$}=H$();Z$.exports={createFile:z$,createFileSync:K$,ensureFile:z$,ensureFileSync:K$,createLink:Y$,createLinkSync:Q$,ensureLink:Y$,ensureLinkSync:Q$,createSymlink:X$,createSymlinkSync:J$,ensureSymlink:X$,ensureSymlinkSync:J$}});var Qb=v((KCe,t9)=>{function vce(r,{EOL:e=`
358
- `,finalEOL:t=!0,replacer:n=null,spaces:i}={}){let s=t?e:"";return JSON.stringify(r,n,i).replace(/\n/g,e)+s}a(vce,"stringify");function Tce(r){return Buffer.isBuffer(r)&&(r=r.toString("utf8")),r.replace(/^\uFEFF/,"")}a(Tce,"stripBom");t9.exports={stringify:vce,stripBom:Tce}});var s9=v((QCe,i9)=>{var cd;try{cd=sd()}catch{cd=require("fs")}var Xb=Zr(),{stringify:r9,stripBom:n9}=Qb();async function Ace(r,e={}){typeof e=="string"&&(e={encoding:e});let t=e.fs||cd,n="throws"in e?e.throws:!0,i=await Xb.fromCallback(t.readFile)(r,e);i=n9(i);let s;try{s=JSON.parse(i,e?e.reviver:null)}catch(o){if(n)throw o.message=`${r}: ${o.message}`,o;return null}return s}a(Ace,"_readFile");var Ice=Xb.fromPromise(Ace);function Rce(r,e={}){typeof e=="string"&&(e={encoding:e});let t=e.fs||cd,n="throws"in e?e.throws:!0;try{let i=t.readFileSync(r,e);return i=n9(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${r}: ${i.message}`,i;return null}}a(Rce,"readFileSync");async function Cce(r,e,t={}){let n=t.fs||cd,i=r9(e,t);await Xb.fromCallback(n.writeFile)(r,i,t)}a(Cce,"_writeFile");var xce=Xb.fromPromise(Cce);function Oce(r,e,t={}){let n=t.fs||cd,i=r9(e,t);return n.writeFileSync(r,i,t)}a(Oce,"writeFileSync");i9.exports={readFile:Ice,readFileSync:Rce,writeFile:xce,writeFileSync:Oce}});var a9=v((JCe,o9)=>{"use strict";var Jb=s9();o9.exports={readJson:Jb.readFile,readJsonSync:Jb.readFileSync,writeJson:Jb.writeFile,writeJsonSync:Jb.writeFileSync}});var Zb=v((ZCe,u9)=>{"use strict";var Pce=Zr().fromPromise,aC=ei(),c9=require("path"),l9=Ls(),Fce=wc().pathExists;async function Dce(r,e,t="utf-8"){let n=c9.dirname(r);return await Fce(n)||await l9.mkdirs(n),aC.writeFile(r,e,t)}a(Dce,"outputFile");function Lce(r,...e){let t=c9.dirname(r);aC.existsSync(t)||l9.mkdirsSync(t),aC.writeFileSync(r,...e)}a(Lce,"outputFileSync");u9.exports={outputFile:Pce(Dce),outputFileSync:Lce}});var d9=v((txe,f9)=>{"use strict";var{stringify:Nce}=Qb(),{outputFile:kce}=Zb();async function Mce(r,e,t={}){let n=Nce(e,t);await kce(r,n,t)}a(Mce,"outputJson");f9.exports=Mce});var h9=v((nxe,p9)=>{"use strict";var{stringify:jce}=Qb(),{outputFileSync:$ce}=Zb();function Uce(r,e,t){let n=jce(e,t);$ce(r,n,t)}a(Uce,"outputJsonSync");p9.exports=Uce});var g9=v((sxe,m9)=>{"use strict";var Bce=Zr().fromPromise,ri=a9();ri.outputJson=Bce(d9());ri.outputJsonSync=h9();ri.outputJSON=ri.outputJson;ri.outputJSONSync=ri.outputJsonSync;ri.writeJSON=ri.writeJson;ri.writeJSONSync=ri.writeJsonSync;ri.readJSON=ri.readJson;ri.readJSONSync=ri.readJsonSync;m9.exports=ri});var w9=v((oxe,S9)=>{"use strict";var Vce=ei(),y9=require("path"),{copy:Gce}=Yb(),{remove:b9}=im(),{mkdirp:qce}=Ls(),{pathExists:Wce}=wc(),_9=ql();async function Hce(r,e,t={}){let n=t.overwrite||t.clobber||!1,{srcStat:i,isChangingCase:s=!1}=await _9.checkPaths(r,e,"move",t);await _9.checkParentPaths(r,i,e,"move");let o=y9.dirname(e);return y9.parse(o).root!==o&&await qce(o),zce(r,e,n,s)}a(Hce,"move");async function zce(r,e,t,n){if(!n){if(t)await b9(e);else if(await Wce(e))throw new Error("dest already exists.")}try{await Vce.rename(r,e)}catch(i){if(i.code!=="EXDEV")throw i;await Kce(r,e,t)}}a(zce,"doRename");async function Kce(r,e,t){return await Gce(r,e,{overwrite:t,errorOnExist:!0,preserveTimestamps:!0}),b9(r)}a(Kce,"moveAcrossDevice");S9.exports=Hce});var I9=v((cxe,A9)=>{"use strict";var v9=sd(),lC=require("path"),Yce=Yb().copySync,T9=im().removeSync,Qce=Ls().mkdirpSync,E9=ql();function Xce(r,e,t){t=t||{};let n=t.overwrite||t.clobber||!1,{srcStat:i,isChangingCase:s=!1}=E9.checkPathsSync(r,e,"move",t);return E9.checkParentPathsSync(r,i,e,"move"),Jce(e)||Qce(lC.dirname(e)),Zce(r,e,n,s)}a(Xce,"moveSync");function Jce(r){let e=lC.dirname(r);return lC.parse(e).root===e}a(Jce,"isParentRoot");function Zce(r,e,t,n){if(n)return cC(r,e,t);if(t)return T9(e),cC(r,e,t);if(v9.existsSync(e))throw new Error("dest already exists.");return cC(r,e,t)}a(Zce,"doRename");function cC(r,e,t){try{v9.renameSync(r,e)}catch(n){if(n.code!=="EXDEV")throw n;return ele(r,e,t)}}a(cC,"rename");function ele(r,e,t){return Yce(r,e,{overwrite:t,errorOnExist:!0,preserveTimestamps:!0}),T9(r)}a(ele,"moveAcrossDevice");A9.exports=Xce});var C9=v((uxe,R9)=>{"use strict";var tle=Zr().fromPromise;R9.exports={move:tle(w9()),moveSync:I9()}});var Ta=v((fxe,x9)=>{"use strict";x9.exports={...ei(),...Yb(),...x$(),...e9(),...g9(),...Ls(),...C9(),...Zb(),...wc(),...im()}});function Mn(r,e){return{tagName:r,nodeKind:"scalar",implicit:e.implicit??!1,matchByTagPrefix:e.matchByTagPrefix??!1,implicitFirstChars:e.implicitFirstChars??null,resolve:e.resolve,identify:e.identify,represent:e.represent??(t=>String(t)),representTagName:e.representTagName??(()=>r)}}function FC(r,e){let t=e.finalize===void 0;return{tagName:r,nodeKind:"sequence",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addItem:e.addItem,finalize:e.finalize??(n=>n),carrierIsResult:t,identify:e.identify,represent:e.represent??(n=>n),representTagName:e.representTagName??(()=>r)}}function oS(r,e){let t=e.finalize===void 0;return{tagName:r,nodeKind:"mapping",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addPair:e.addPair,has:e.has,keys:e.keys,get:e.get,finalize:e.finalize??(n=>n),carrierIsResult:t,identify:e.identify,represent:e.represent??(n=>n),representTagName:e.representTagName??(()=>r)}}function ble(r){let e=r,t=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(t=-1),e=e.slice(1)),e.startsWith("0b")?t*parseInt(e.slice(2),2):e.startsWith("0o")?t*parseInt(e.slice(2),8):e.startsWith("0x")?t*parseInt(e.slice(2),16):t*parseInt(e,10)}function Sle(r,e){if(e){if(!_le.test(r))return yt}else if(!yle.test(r))return yt;let t=ble(r);return Number.isFinite(t)?t:yt}function vle(r){let e=r,t=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(t=-1),e=e.slice(1)),e.startsWith("0b")?t*parseInt(e.slice(2),2):e.startsWith("0o")?t*parseInt(e.slice(2),8):e.startsWith("0x")?t*parseInt(e.slice(2),16):t*parseInt(e,10)}function Tle(r,e){if(e){if(!Ele.test(r))return yt}else if(!wle.test(r))return yt;let t=vle(r);return Number.isFinite(t)?t:yt}function Rle(r){let e=r.replace(/_/g,""),t=1;if((e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(t=-1),e=e.slice(1)),e.startsWith("0b"))return t*parseInt(e.slice(2),2);if(e.startsWith("0x"))return t*parseInt(e.slice(2),16);if(e.includes(":")){let n=0;for(let i of e.split(":"))n=n*60+Number(i);return t*n}return e!=="0"&&e[0]==="0"?t*parseInt(e,8):t*parseInt(e,10)}function Cle(r){if(!Ile.test(r))return yt;let e=Rle(r);return Number.isFinite(e)?e:yt}function Ple(r){if(!xle.test(r))return yt;let e=r.toLowerCase(),t=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let n=t*parseFloat(e);return Number.isFinite(n)||Ole.test(r)?n:yt}function Fle(r){if(isNaN(r))return".nan";if(r===Number.POSITIVE_INFINITY)return".inf";if(r===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(r,-0))return"-0.0";let e=r.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}function Nle(r,e){if(e){if(!Lle.test(r))return yt;let n=r.toLowerCase(),i=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;let s=i*parseFloat(n);return Number.isFinite(s)?s:yt}if(!Dle.test(r))return yt;let t=Number(r);return Number.isFinite(t)?t:yt}function kle(r){if(isNaN(r))return".nan";if(r===Number.POSITIVE_INFINITY)return".inf";if(r===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(r,-0))return"-0.0";let e=r.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}function Ule(r){if(!jle.test(r))return yt;let e=r.toLowerCase().replace(/_/g,""),t=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let n=0;if(e.includes(":")){for(let i of e.split(":"))n=n*60+Number(i);n*=t}else n=t*parseFloat(e);return Number.isFinite(n)||$le.test(r)?n:yt}function Ble(r){if(isNaN(r))return".nan";if(r===Number.POSITIVE_INFINITY)return".inf";if(r===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(r,-0))return"-0.0";let e=r.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}function qle(r){let e=r.replace(/\s/g,"");if(e.length%4!==0||!Gle.test(e))return yt;let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Wle(r){let e="";for(let t=0;t<r.length;t++)e+=String.fromCharCode(r[t]);return btoa(e)}function O9(r,e,t,n=0,i=0,s=0,o=0){let c=new Date(Date.UTC(r,e,t,n,i,s,o));return c.setUTCFullYear(r,e,t),c}function Yle(r){let e=zle.exec(r);if(e===null&&(e=Kle.exec(r)),e===null)return yt;let t=+e[1],n=+e[2]-1,i=+e[3];if(!e[4]){let f=O9(t,n,i);return f.getUTCFullYear()!==t||f.getUTCMonth()!==n||f.getUTCDate()!==i?yt:f}let s=+e[4],o=+e[5],c=+e[6],l=0;if(s>23||o>59||c>59)return yt;if(e[7]){let f=e[7].slice(0,3);for(;f.length<3;)f+="0";l=+f}let u=O9(t,n,i,s,o,c,l);if(u.getUTCFullYear()!==t||u.getUTCMonth()!==n||u.getUTCDate()!==i)return yt;if(e[9]){let f=+e[10],d=+(e[11]||0);if(f>23||d>59)return yt;let p=(f*60+d)*6e4;u.setTime(u.getTime()-(e[9]==="-"?-p:p))}return u}function aS(r){if(r===null||typeof r!="object"||Array.isArray(r))return!1;let e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}function _C(r,e){let t={};for(let n of e)r[n]!==void 0&&(t[n]=r[n]);return t}function rue(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function nue(){return{scalar:[],sequence:[],mapping:[]}}function iue(r){let e=[];for(let t of r){let n=e.length;for(let i=0;i<e.length;i++){let s=e[i];if(s.nodeKind===t.nodeKind&&s.tagName===t.tagName&&s.matchByTagPrefix===t.matchByTagPrefix){n=i;break}}e[n]=t}return e}function P9(r){if(Array.isArray(r)){let e=Array.prototype.slice.call(r);for(let t=0;t<e.length;t++){if(Array.isArray(e[t]))return null;typeof e[t]=="object"&&Object.prototype.toString.call(e[t])==="[object Object]"&&(e[t]="[object Object]")}return String(e)}return typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"?"[object Object]":String(r)}function uC(r,e,t,n,i){let s="",o="",c=Math.floor(i/2)-1;return n-e>c&&(s=" ... ",e=n-c+s.length),t-n>c&&(o=" ...",t=n+c-o.length),{str:s+r.slice(e,t).replace(/\t/g,"\u2192")+o,pos:n-e+s.length}}function fC(r,e){return" ".repeat(Math.max(e-r.length,0))+r}function aue(r,e){if(!r.buffer)return null;let t={...oue,...e},n=/\r?\n|\r|\0/g,i=[0],s=[],o,c=-1;for(;o=n.exec(r.buffer);)s.push(o.index),i.push(o.index+o[0].length),r.position<=o.index&&c<0&&(c=i.length-2);c<0&&(c=i.length-1);let l="",u=Math.min(r.line+t.linesAfter,s.length).toString().length,f=t.maxLength-(t.indent+u+3);for(let p=1;p<=t.linesBefore&&!(c-p<0);p++){let h=uC(r.buffer,i[c-p],s[c-p],r.position-(i[c]-i[c-p]),f);l=`${" ".repeat(t.indent)}${fC((r.line-p+1).toString(),u)} | ${h.str}
357
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:i}=nm.checkPathsSync(r,e,"copy",t);if(nm.checkParentPathsSync(r,n,e,"copy"),t.filter&&!t.filter(r,e))return;let s=rm.dirname(e);return ti.existsSync(s)||Lae(s),h$(i,r,e,t)}a(kae,"copySync");function h$(r,e,t,n){let s=(n.dereference?ti.statSync:ti.lstatSync)(e);if(s.isDirectory())return Gae(s,r,e,t,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Mae(s,r,e,t,n);if(s.isSymbolicLink())return Hae(r,e,t,n);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}a(h$,"getStats");function Mae(r,e,t,n,i){return e?jae(r,t,n,i):m$(r,t,n,i)}a(Mae,"onFile");function jae(r,e,t,n){if(n.overwrite)return ti.unlinkSync(t),m$(r,e,t,n);if(n.errorOnExist)throw new Error(`'${t}' already exists`)}a(jae,"mayCopyFile");function m$(r,e,t,n){return ti.copyFileSync(e,t),n.preserveTimestamps&&$ae(r.mode,e,t),oC(t,r.mode)}a(m$,"copyFile");function $ae(r,e,t){return Uae(r)&&Bae(t,r),Vae(e,t)}a($ae,"handleTimestamps");function Uae(r){return(r&128)===0}a(Uae,"fileIsNotWritable");function Bae(r,e){return oC(r,e|128)}a(Bae,"makeFileWritable");function oC(r,e){return ti.chmodSync(r,e)}a(oC,"setDestMode");function Vae(r,e){let t=ti.statSync(r);return Nae(e,t.atime,t.mtime)}a(Vae,"setDestTimestamps");function Gae(r,e,t,n,i){return e?g$(t,n,i):qae(r.mode,t,n,i)}a(Gae,"onDir");function qae(r,e,t,n){return ti.mkdirSync(t),g$(e,t,n),oC(t,r)}a(qae,"mkDirAndCopy");function g$(r,e,t){let n=ti.opendirSync(r);try{let i;for(;(i=n.readSync())!==null;)Wae(i.name,r,e,t)}finally{n.closeSync()}}a(g$,"copyDir");function Wae(r,e,t,n){let i=rm.join(e,r),s=rm.join(t,r);if(n.filter&&!n.filter(i,s))return;let{destStat:o}=nm.checkPathsSync(i,s,"copy",n);return h$(o,i,s,n)}a(Wae,"copyDirItem");function Hae(r,e,t,n){let i=ti.readlinkSync(e);if(n.dereference&&(i=rm.resolve(process.cwd(),i)),r){let s;try{s=ti.readlinkSync(t)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return ti.symlinkSync(i,t);throw o}if(n.dereference&&(s=rm.resolve(process.cwd(),s)),i!==s){if(nm.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(nm.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`)}return zae(i,t)}else return ti.symlinkSync(i,t)}a(Hae,"onLink");function zae(r,e){return ti.unlinkSync(e),ti.symlinkSync(r,e)}a(zae,"copyLink");y$.exports=kae});var Yb=v((DCe,b$)=>{"use strict";var Kae=Zr().fromPromise;b$.exports={copy:Kae(p$()),copySync:_$()}});var im=v((LCe,w$)=>{"use strict";var S$=sd(),Yae=Zr().fromCallback;function Qae(r,e){S$.rm(r,{recursive:!0,force:!0},e)}a(Qae,"remove");function Xae(r){S$.rmSync(r,{recursive:!0,force:!0})}a(Xae,"removeSync");w$.exports={remove:Yae(Qae),removeSync:Xae}});var x$=v((kCe,C$)=>{"use strict";var Jae=Zr().fromPromise,T$=ei(),A$=require("path"),I$=Ls(),R$=im(),E$=Jae(a(async function(e){let t;try{t=await T$.readdir(e)}catch{return I$.mkdirs(e)}return Promise.all(t.map(n=>R$.remove(A$.join(e,n))))},"emptyDir"));function v$(r){let e;try{e=T$.readdirSync(r)}catch{return I$.mkdirsSync(r)}e.forEach(t=>{t=A$.join(r,t),R$.removeSync(t)})}a(v$,"emptyDirSync");C$.exports={emptyDirSync:v$,emptydirSync:v$,emptyDir:E$,emptydir:E$}});var D$=v((jCe,F$)=>{"use strict";var Zae=Zr().fromPromise,O$=require("path"),va=ei(),P$=Ls();async function ece(r){let e;try{e=await va.stat(r)}catch{}if(e&&e.isFile())return;let t=O$.dirname(r),n=null;try{n=await va.stat(t)}catch(i){if(i.code==="ENOENT"){await P$.mkdirs(t),await va.writeFile(r,"");return}else throw i}n.isDirectory()?await va.writeFile(r,""):await va.readdir(t)}a(ece,"createFile");function tce(r){let e;try{e=va.statSync(r)}catch{}if(e&&e.isFile())return;let t=O$.dirname(r);try{va.statSync(t).isDirectory()||va.readdirSync(t)}catch(n){if(n&&n.code==="ENOENT")P$.mkdirsSync(t);else throw n}va.writeFileSync(r,"")}a(tce,"createFileSync");F$.exports={createFile:Zae(ece),createFileSync:tce}});var j$=v((UCe,M$)=>{"use strict";var rce=Zr().fromPromise,L$=require("path"),Ec=ei(),N$=Ls(),{pathExists:nce}=wc(),{areIdentical:k$}=ql();async function ice(r,e){let t;try{t=await Ec.lstat(e,{bigint:!0})}catch{}let n;try{n=await Ec.lstat(r,{bigint:!0})}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}if(t&&k$(n,t))return;let i=L$.dirname(e);await nce(i)||await N$.mkdirs(i),await Ec.link(r,e)}a(ice,"createLink");function sce(r,e){let t;try{t=Ec.lstatSync(e,{bigint:!0})}catch{}try{let s=Ec.lstatSync(r,{bigint:!0});if(t&&k$(s,t))return}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}let n=L$.dirname(e);return Ec.existsSync(n)||N$.mkdirsSync(n),Ec.linkSync(r,e)}a(sce,"createLinkSync");M$.exports={createLink:rce(ice),createLinkSync:sce}});var U$=v((VCe,$$)=>{"use strict";var vc=require("path"),sm=ei(),{pathExists:oce}=wc(),ace=Zr().fromPromise;async function cce(r,e){if(vc.isAbsolute(r)){try{await sm.lstat(r)}catch(s){throw s.message=s.message.replace("lstat","ensureSymlink"),s}return{toCwd:r,toDst:r}}let t=vc.dirname(e),n=vc.join(t,r);if(await oce(n))return{toCwd:n,toDst:r};try{await sm.lstat(r)}catch(s){throw s.message=s.message.replace("lstat","ensureSymlink"),s}return{toCwd:r,toDst:vc.relative(t,r)}}a(cce,"symlinkPaths");function lce(r,e){if(vc.isAbsolute(r)){if(!sm.existsSync(r))throw new Error("absolute srcpath does not exist");return{toCwd:r,toDst:r}}let t=vc.dirname(e),n=vc.join(t,r);if(sm.existsSync(n))return{toCwd:n,toDst:r};if(!sm.existsSync(r))throw new Error("relative srcpath does not exist");return{toCwd:r,toDst:vc.relative(t,r)}}a(lce,"symlinkPathsSync");$$.exports={symlinkPaths:ace(cce),symlinkPathsSync:lce}});var G$=v((qCe,V$)=>{"use strict";var B$=ei(),uce=Zr().fromPromise;async function fce(r,e){if(e)return e;let t;try{t=await B$.lstat(r)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}a(fce,"symlinkType");function dce(r,e){if(e)return e;let t;try{t=B$.lstatSync(r)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}a(dce,"symlinkTypeSync");V$.exports={symlinkType:uce(fce),symlinkTypeSync:dce}});var H$=v((HCe,W$)=>{"use strict";var pce=Zr().fromPromise,Tc=require("path"),Ii=ei(),{mkdirs:hce,mkdirsSync:mce}=Ls(),{symlinkPaths:gce,symlinkPathsSync:yce}=U$(),{symlinkType:_ce,symlinkTypeSync:bce}=G$(),{pathExists:Sce}=wc(),{areIdentical:q$}=ql();async function wce(r,e,t){let n;try{n=await Ii.lstat(e)}catch{}if(n&&n.isSymbolicLink()){let c;if(Tc.isAbsolute(r))c=await Ii.stat(r,{bigint:!0});else{let u=Tc.dirname(e),f=Tc.join(u,r);try{c=await Ii.stat(f,{bigint:!0})}catch{c=await Ii.stat(r,{bigint:!0})}}let l;try{l=await Ii.stat(e,{bigint:!0})}catch(u){if(u.code!=="ENOENT")throw u}if(l&&q$(c,l))return}let i=await gce(r,e);r=i.toDst;let s=await _ce(i.toCwd,t),o=Tc.dirname(e);return await Sce(o)||await hce(o),Ii.symlink(r,e,s)}a(wce,"createSymlink");function Ece(r,e,t){let n;try{n=Ii.lstatSync(e)}catch{}if(n&&n.isSymbolicLink()){let c;if(Tc.isAbsolute(r))c=Ii.statSync(r,{bigint:!0});else{let u=Tc.dirname(e),f=Tc.join(u,r);try{c=Ii.statSync(f,{bigint:!0})}catch{c=Ii.statSync(r,{bigint:!0})}}let l;try{l=Ii.statSync(e,{bigint:!0})}catch(u){if(u.code!=="ENOENT")throw u}if(l&&q$(c,l))return}let i=yce(r,e);r=i.toDst,t=bce(i.toCwd,t);let s=Tc.dirname(e);return Ii.existsSync(s)||mce(s),Ii.symlinkSync(r,e,t)}a(Ece,"createSymlinkSync");W$.exports={createSymlink:pce(wce),createSymlinkSync:Ece}});var e9=v((KCe,Z$)=>{"use strict";var{createFile:z$,createFileSync:K$}=D$(),{createLink:Y$,createLinkSync:Q$}=j$(),{createSymlink:X$,createSymlinkSync:J$}=H$();Z$.exports={createFile:z$,createFileSync:K$,ensureFile:z$,ensureFileSync:K$,createLink:Y$,createLinkSync:Q$,ensureLink:Y$,ensureLinkSync:Q$,createSymlink:X$,createSymlinkSync:J$,ensureSymlink:X$,ensureSymlinkSync:J$}});var Qb=v((YCe,t9)=>{function vce(r,{EOL:e=`
358
+ `,finalEOL:t=!0,replacer:n=null,spaces:i}={}){let s=t?e:"";return JSON.stringify(r,n,i).replace(/\n/g,e)+s}a(vce,"stringify");function Tce(r){return Buffer.isBuffer(r)&&(r=r.toString("utf8")),r.replace(/^\uFEFF/,"")}a(Tce,"stripBom");t9.exports={stringify:vce,stripBom:Tce}});var s9=v((XCe,i9)=>{var cd;try{cd=sd()}catch{cd=require("fs")}var Xb=Zr(),{stringify:r9,stripBom:n9}=Qb();async function Ace(r,e={}){typeof e=="string"&&(e={encoding:e});let t=e.fs||cd,n="throws"in e?e.throws:!0,i=await Xb.fromCallback(t.readFile)(r,e);i=n9(i);let s;try{s=JSON.parse(i,e?e.reviver:null)}catch(o){if(n)throw o.message=`${r}: ${o.message}`,o;return null}return s}a(Ace,"_readFile");var Ice=Xb.fromPromise(Ace);function Rce(r,e={}){typeof e=="string"&&(e={encoding:e});let t=e.fs||cd,n="throws"in e?e.throws:!0;try{let i=t.readFileSync(r,e);return i=n9(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${r}: ${i.message}`,i;return null}}a(Rce,"readFileSync");async function Cce(r,e,t={}){let n=t.fs||cd,i=r9(e,t);await Xb.fromCallback(n.writeFile)(r,i,t)}a(Cce,"_writeFile");var xce=Xb.fromPromise(Cce);function Oce(r,e,t={}){let n=t.fs||cd,i=r9(e,t);return n.writeFileSync(r,i,t)}a(Oce,"writeFileSync");i9.exports={readFile:Ice,readFileSync:Rce,writeFile:xce,writeFileSync:Oce}});var a9=v((ZCe,o9)=>{"use strict";var Jb=s9();o9.exports={readJson:Jb.readFile,readJsonSync:Jb.readFileSync,writeJson:Jb.writeFile,writeJsonSync:Jb.writeFileSync}});var Zb=v((exe,u9)=>{"use strict";var Pce=Zr().fromPromise,aC=ei(),c9=require("path"),l9=Ls(),Fce=wc().pathExists;async function Dce(r,e,t="utf-8"){let n=c9.dirname(r);return await Fce(n)||await l9.mkdirs(n),aC.writeFile(r,e,t)}a(Dce,"outputFile");function Lce(r,...e){let t=c9.dirname(r);aC.existsSync(t)||l9.mkdirsSync(t),aC.writeFileSync(r,...e)}a(Lce,"outputFileSync");u9.exports={outputFile:Pce(Dce),outputFileSync:Lce}});var d9=v((rxe,f9)=>{"use strict";var{stringify:Nce}=Qb(),{outputFile:kce}=Zb();async function Mce(r,e,t={}){let n=Nce(e,t);await kce(r,n,t)}a(Mce,"outputJson");f9.exports=Mce});var h9=v((ixe,p9)=>{"use strict";var{stringify:jce}=Qb(),{outputFileSync:$ce}=Zb();function Uce(r,e,t){let n=jce(e,t);$ce(r,n,t)}a(Uce,"outputJsonSync");p9.exports=Uce});var g9=v((oxe,m9)=>{"use strict";var Bce=Zr().fromPromise,ri=a9();ri.outputJson=Bce(d9());ri.outputJsonSync=h9();ri.outputJSON=ri.outputJson;ri.outputJSONSync=ri.outputJsonSync;ri.writeJSON=ri.writeJson;ri.writeJSONSync=ri.writeJsonSync;ri.readJSON=ri.readJson;ri.readJSONSync=ri.readJsonSync;m9.exports=ri});var w9=v((axe,S9)=>{"use strict";var Vce=ei(),y9=require("path"),{copy:Gce}=Yb(),{remove:b9}=im(),{mkdirp:qce}=Ls(),{pathExists:Wce}=wc(),_9=ql();async function Hce(r,e,t={}){let n=t.overwrite||t.clobber||!1,{srcStat:i,isChangingCase:s=!1}=await _9.checkPaths(r,e,"move",t);await _9.checkParentPaths(r,i,e,"move");let o=y9.dirname(e);return y9.parse(o).root!==o&&await qce(o),zce(r,e,n,s)}a(Hce,"move");async function zce(r,e,t,n){if(!n){if(t)await b9(e);else if(await Wce(e))throw new Error("dest already exists.")}try{await Vce.rename(r,e)}catch(i){if(i.code!=="EXDEV")throw i;await Kce(r,e,t)}}a(zce,"doRename");async function Kce(r,e,t){return await Gce(r,e,{overwrite:t,errorOnExist:!0,preserveTimestamps:!0}),b9(r)}a(Kce,"moveAcrossDevice");S9.exports=Hce});var I9=v((lxe,A9)=>{"use strict";var v9=sd(),lC=require("path"),Yce=Yb().copySync,T9=im().removeSync,Qce=Ls().mkdirpSync,E9=ql();function Xce(r,e,t){t=t||{};let n=t.overwrite||t.clobber||!1,{srcStat:i,isChangingCase:s=!1}=E9.checkPathsSync(r,e,"move",t);return E9.checkParentPathsSync(r,i,e,"move"),Jce(e)||Qce(lC.dirname(e)),Zce(r,e,n,s)}a(Xce,"moveSync");function Jce(r){let e=lC.dirname(r);return lC.parse(e).root===e}a(Jce,"isParentRoot");function Zce(r,e,t,n){if(n)return cC(r,e,t);if(t)return T9(e),cC(r,e,t);if(v9.existsSync(e))throw new Error("dest already exists.");return cC(r,e,t)}a(Zce,"doRename");function cC(r,e,t){try{v9.renameSync(r,e)}catch(n){if(n.code!=="EXDEV")throw n;return ele(r,e,t)}}a(cC,"rename");function ele(r,e,t){return Yce(r,e,{overwrite:t,errorOnExist:!0,preserveTimestamps:!0}),T9(r)}a(ele,"moveAcrossDevice");A9.exports=Xce});var C9=v((fxe,R9)=>{"use strict";var tle=Zr().fromPromise;R9.exports={move:tle(w9()),moveSync:I9()}});var Ta=v((dxe,x9)=>{"use strict";x9.exports={...ei(),...Yb(),...x$(),...e9(),...g9(),...Ls(),...C9(),...Zb(),...wc(),...im()}});function Mn(r,e){return{tagName:r,nodeKind:"scalar",implicit:e.implicit??!1,matchByTagPrefix:e.matchByTagPrefix??!1,implicitFirstChars:e.implicitFirstChars??null,resolve:e.resolve,identify:e.identify,represent:e.represent??(t=>String(t)),representTagName:e.representTagName??(()=>r)}}function FC(r,e){let t=e.finalize===void 0;return{tagName:r,nodeKind:"sequence",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addItem:e.addItem,finalize:e.finalize??(n=>n),carrierIsResult:t,identify:e.identify,represent:e.represent??(n=>n),representTagName:e.representTagName??(()=>r)}}function oS(r,e){let t=e.finalize===void 0;return{tagName:r,nodeKind:"mapping",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addPair:e.addPair,has:e.has,keys:e.keys,get:e.get,finalize:e.finalize??(n=>n),carrierIsResult:t,identify:e.identify,represent:e.represent??(n=>n),representTagName:e.representTagName??(()=>r)}}function ble(r){let e=r,t=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(t=-1),e=e.slice(1)),e.startsWith("0b")?t*parseInt(e.slice(2),2):e.startsWith("0o")?t*parseInt(e.slice(2),8):e.startsWith("0x")?t*parseInt(e.slice(2),16):t*parseInt(e,10)}function Sle(r,e){if(e){if(!_le.test(r))return yt}else if(!yle.test(r))return yt;let t=ble(r);return Number.isFinite(t)?t:yt}function vle(r){let e=r,t=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(t=-1),e=e.slice(1)),e.startsWith("0b")?t*parseInt(e.slice(2),2):e.startsWith("0o")?t*parseInt(e.slice(2),8):e.startsWith("0x")?t*parseInt(e.slice(2),16):t*parseInt(e,10)}function Tle(r,e){if(e){if(!Ele.test(r))return yt}else if(!wle.test(r))return yt;let t=vle(r);return Number.isFinite(t)?t:yt}function Rle(r){let e=r.replace(/_/g,""),t=1;if((e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(t=-1),e=e.slice(1)),e.startsWith("0b"))return t*parseInt(e.slice(2),2);if(e.startsWith("0x"))return t*parseInt(e.slice(2),16);if(e.includes(":")){let n=0;for(let i of e.split(":"))n=n*60+Number(i);return t*n}return e!=="0"&&e[0]==="0"?t*parseInt(e,8):t*parseInt(e,10)}function Cle(r){if(!Ile.test(r))return yt;let e=Rle(r);return Number.isFinite(e)?e:yt}function Ple(r){if(!xle.test(r))return yt;let e=r.toLowerCase(),t=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let n=t*parseFloat(e);return Number.isFinite(n)||Ole.test(r)?n:yt}function Fle(r){if(isNaN(r))return".nan";if(r===Number.POSITIVE_INFINITY)return".inf";if(r===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(r,-0))return"-0.0";let e=r.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}function Nle(r,e){if(e){if(!Lle.test(r))return yt;let n=r.toLowerCase(),i=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;let s=i*parseFloat(n);return Number.isFinite(s)?s:yt}if(!Dle.test(r))return yt;let t=Number(r);return Number.isFinite(t)?t:yt}function kle(r){if(isNaN(r))return".nan";if(r===Number.POSITIVE_INFINITY)return".inf";if(r===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(r,-0))return"-0.0";let e=r.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}function Ule(r){if(!jle.test(r))return yt;let e=r.toLowerCase().replace(/_/g,""),t=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let n=0;if(e.includes(":")){for(let i of e.split(":"))n=n*60+Number(i);n*=t}else n=t*parseFloat(e);return Number.isFinite(n)||$le.test(r)?n:yt}function Ble(r){if(isNaN(r))return".nan";if(r===Number.POSITIVE_INFINITY)return".inf";if(r===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(r,-0))return"-0.0";let e=r.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}function qle(r){let e=r.replace(/\s/g,"");if(e.length%4!==0||!Gle.test(e))return yt;let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Wle(r){let e="";for(let t=0;t<r.length;t++)e+=String.fromCharCode(r[t]);return btoa(e)}function O9(r,e,t,n=0,i=0,s=0,o=0){let c=new Date(Date.UTC(r,e,t,n,i,s,o));return c.setUTCFullYear(r,e,t),c}function Yle(r){let e=zle.exec(r);if(e===null&&(e=Kle.exec(r)),e===null)return yt;let t=+e[1],n=+e[2]-1,i=+e[3];if(!e[4]){let f=O9(t,n,i);return f.getUTCFullYear()!==t||f.getUTCMonth()!==n||f.getUTCDate()!==i?yt:f}let s=+e[4],o=+e[5],c=+e[6],l=0;if(s>23||o>59||c>59)return yt;if(e[7]){let f=e[7].slice(0,3);for(;f.length<3;)f+="0";l=+f}let u=O9(t,n,i,s,o,c,l);if(u.getUTCFullYear()!==t||u.getUTCMonth()!==n||u.getUTCDate()!==i)return yt;if(e[9]){let f=+e[10],d=+(e[11]||0);if(f>23||d>59)return yt;let p=(f*60+d)*6e4;u.setTime(u.getTime()-(e[9]==="-"?-p:p))}return u}function aS(r){if(r===null||typeof r!="object"||Array.isArray(r))return!1;let e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}function _C(r,e){let t={};for(let n of e)r[n]!==void 0&&(t[n]=r[n]);return t}function rue(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function nue(){return{scalar:[],sequence:[],mapping:[]}}function iue(r){let e=[];for(let t of r){let n=e.length;for(let i=0;i<e.length;i++){let s=e[i];if(s.nodeKind===t.nodeKind&&s.tagName===t.tagName&&s.matchByTagPrefix===t.matchByTagPrefix){n=i;break}}e[n]=t}return e}function P9(r){if(Array.isArray(r)){let e=Array.prototype.slice.call(r);for(let t=0;t<e.length;t++){if(Array.isArray(e[t]))return null;typeof e[t]=="object"&&Object.prototype.toString.call(e[t])==="[object Object]"&&(e[t]="[object Object]")}return String(e)}return typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"?"[object Object]":String(r)}function uC(r,e,t,n,i){let s="",o="",c=Math.floor(i/2)-1;return n-e>c&&(s=" ... ",e=n-c+s.length),t-n>c&&(o=" ...",t=n+c-o.length),{str:s+r.slice(e,t).replace(/\t/g,"\u2192")+o,pos:n-e+s.length}}function fC(r,e){return" ".repeat(Math.max(e-r.length,0))+r}function aue(r,e){if(!r.buffer)return null;let t={...oue,...e},n=/\r?\n|\r|\0/g,i=[0],s=[],o,c=-1;for(;o=n.exec(r.buffer);)s.push(o.index),i.push(o.index+o[0].length),r.position<=o.index&&c<0&&(c=i.length-2);c<0&&(c=i.length-1);let l="",u=Math.min(r.line+t.linesAfter,s.length).toString().length,f=t.maxLength-(t.indent+u+3);for(let p=1;p<=t.linesBefore&&!(c-p<0);p++){let h=uC(r.buffer,i[c-p],s[c-p],r.position-(i[c]-i[c-p]),f);l=`${" ".repeat(t.indent)}${fC((r.line-p+1).toString(),u)} | ${h.str}
359
359
  ${l}`}let d=uC(r.buffer,i[c],s[c],r.position,f);l+=`${" ".repeat(t.indent)}${fC((r.line+1).toString(),u)} | ${d.str}
360
360
  `,l+=`${"-".repeat(t.indent+u+3+d.pos)}^
361
361
  `;for(let p=1;p<=t.linesAfter&&!(c+p>=s.length);p++){let h=uC(r.buffer,i[c+p],s[c+p],r.position-(i[c]-i[c+p]),f);l+=`${" ".repeat(t.indent)}${fC((r.line+p+1).toString(),u)} | ${h.str}
@@ -399,7 +399,7 @@ ${r.slice(o+1)}`:l+=r.slice(i),l.slice(1)}function Efe(r){let e="",t=0;for(let n
399
399
  `:" ";n+=`---${d}${f}
400
400
  `}else n+=Ia(t,0,o.contents,{block:!0,compact:!0})+`
401
401
  `;i=o.explicitEnd||o.contents!==null&&Rfe(o.contents),i&&(n+=`...
402
- `)}return n}function yd(r,e={}){let t={...Ofe,...e},n=Que(r,t.schema,{noRefs:t.noRefs,skipInvalid:t.skipInvalid});return t.flowLevel>=0&&Jue(n,(i,s)=>{if(!(s.depth<t.flowLevel))return i.style.flow=!0,u5}),t.transform(n),xfe(n,{..._C(t,Object.keys(UC)),schema:t.schema})}var yt,rle,nle,ile,sle,ole,ale,cle,lle,ule,fle,dle,ple,hle,mle,gle,yle,_le,K9,wle,Ele,Ale,Ile,gC,xle,Ole,Y9,Dle,Lle,Mle,jle,$le,yC,Vle,Gle,Hle,zle,Kle,Qle,Xle,Jle,Zle,eue,tue,cS,DC,dxe,Xl,LC,sue,pxe,hxe,oue,Ic,hr,En,Rc,ji,cue,J9,Z9,gue,ld,yue,kC,wt,i5,pd,bC,s5,iS,vue,Tue,o5,SC,a5,Aue,Iue,Rue,MC,Hue,eS,Wl,Xue,u5,jC,Zue,Ql,f5,efe,tfe,d5,vC,rfe,nfe,p5,ife,TC,$C,um,sfe,ofe,h5,afe,AC,IC,cfe,RC,lfe,CC,jn,UC,dm,lm,BC,VC,Ac,Ofe,mxe,gxe,yxe,_xe,bxe,Sxe,wxe,Exe,vxe,Txe,Axe,Ixe,Rxe,Cxe,xxe,Oxe,hm=je(()=>{yt=Symbol("NOT_RESOLVED");a(Mn,"defineScalarTag");a(FC,"defineSequenceTag");a(oS,"defineMappingTag");rle=Mn("tag:yaml.org,2002:str",{resolve:a(r=>r,"resolve"),identify:a(r=>typeof r=="string","identify")}),nle=["","~","null","Null","NULL"],ile=Mn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:a(r=>nle.indexOf(r)!==-1?null:yt,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),sle=Mn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:a((r,e)=>r==="null"||e&&r===""?null:yt,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),ole=["","~","null","Null","NULL"],ale=Mn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:a(r=>ole.indexOf(r)!==-1?null:yt,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),cle=["true","True","TRUE"],lle=["false","False","FALSE"],ule=Mn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:a(r=>cle.indexOf(r)!==-1?!0:lle.indexOf(r)!==-1?!1:yt,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),fle=["true"],dle=["false"],ple=Mn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:a(r=>fle.indexOf(r)!==-1?!0:dle.indexOf(r)!==-1?!1:yt,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),hle=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],mle=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],gle=Mn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:a(r=>hle.indexOf(r)!==-1?!0:mle.indexOf(r)!==-1?!1:yt,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),yle=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),_le=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");a(ble,"parseYamlInteger$2");a(Sle,"resolveYamlInteger$2");K9=Mn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Sle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),wle=new RegExp("^-?(?:0|[1-9][0-9]*)$"),Ele=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");a(vle,"parseYamlInteger$1");a(Tle,"resolveYamlInteger$1");Ale=Mn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Tle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),Ile=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");a(Rle,"parseYamlInteger");a(Cle,"resolveYamlInteger");gC=Mn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Cle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),xle=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ole=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(Ple,"resolveYamlFloat$2");a(Fle,"representYamlFloat$2");Y9=Mn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Ple,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:Fle}),Dle=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Lle=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(Nle,"resolveYamlFloat$1");a(kle,"representYamlFloat$1");Mle=Mn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Nle,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:kle}),jle=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),$le=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(Ule,"resolveYamlFloat");a(Ble,"representYamlFloat");yC=Mn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Ule,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:Ble}),Vle=Mn("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:a((r,e)=>r==="<<"||e&&r===""?"<<":yt,"resolve"),identify:a(()=>!1,"identify")}),Gle=/^[A-Za-z0-9+/]*={0,2}$/;a(qle,"resolveYamlBinary");a(Wle,"representYamlBinary");Hle=Mn("tag:yaml.org,2002:binary",{resolve:qle,identify:a(r=>Object.prototype.toString.call(r)==="[object Uint8Array]","identify"),represent:Wle}),zle=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kle=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");a(O9,"makeUtcDate");a(Yle,"resolveYamlTimestamp");Qle=Mn("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:Yle,identify:a(r=>r instanceof Date,"identify"),represent:a(r=>r.toISOString(),"represent")}),Xle=FC("tag:yaml.org,2002:seq",{create:a(()=>[],"create"),addItem:a((r,e)=>{r.push(e)},"addItem"),identify:Array.isArray});a(aS,"isPlainObject");a(_C,"pick");Jle=FC("tag:yaml.org,2002:omap",{create:a(()=>({list:[],seen:new Set}),"create"),addItem:a((r,e)=>{let t;if(e instanceof Map){if(e.size!==1)return"cannot resolve an ordered map item";t=e.keys().next().value}else if(aS(e)){let n=Object.keys(e);if(n.length!==1)return"cannot resolve an ordered map item";t=n[0]}else return"cannot resolve an ordered map item";return r.seen.has(t)?"duplicate key in ordered map":(r.seen.add(t),r.list.push(e),"")},"addItem"),finalize:a(r=>r.list,"finalize"),identify:a(()=>!1,"identify")}),Zle=FC("tag:yaml.org,2002:pairs",{create:a(()=>[],"create"),addItem:a((r,e)=>{if(e instanceof Map)return e.size!==1?"cannot resolve a pairs item":(r.push(e.entries().next().value),"");if(Object.prototype.toString.call(e)!=="[object Object]")return"cannot resolve a pairs item";let t=e,n=Object.keys(t);return n.length!==1?"cannot resolve a pairs item":(r.push([n[0],t[n[0]]]),"")},"addItem"),identify:a(()=>!1,"identify")}),eue=oS("tag:yaml.org,2002:map",{create:a(()=>({}),"create"),identify:aS,represent:a(r=>{let e=new Map;for(let t of Object.keys(r))e.set(t,r[t]);return e},"represent"),addPair:a((r,e,t)=>{if(e!==null&&typeof e=="object")return"object-based map does not support complex keys";let n=String(e);return n==="__proto__"?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,""},"addPair"),has:a((r,e)=>e!==null&&typeof e=="object"?!1:Object.prototype.hasOwnProperty.call(r,String(e)),"has"),keys:a(r=>Object.keys(r),"keys"),get:a((r,e)=>{let t=String(e);return Object.prototype.hasOwnProperty.call(r,t)?r[t]:null},"get")}),tue=oS("tag:yaml.org,2002:set",{create:a(()=>new Set,"create"),identify:a(r=>r instanceof Set,"identify"),represent:a(r=>{let e=new Map;for(let t of r)e.set(t,null);return e},"represent"),addPair:a((r,e,t)=>t!==null?"cannot resolve a set item":(r.add(e),""),"addPair"),has:a((r,e)=>r.has(e),"has"),keys:a(r=>r.keys(),"keys"),get:a(()=>null,"get")});a(rue,"createTagDefinitionMap");a(nue,"createTagDefinitionListMap");a(iue,"compileTags");cS=class Q9{static{a(this,"Schema")}tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(e){let t=iue(e),n=[],i=rue(),s=nue();for(let f of t){if(f.nodeKind==="scalar"&&f.implicit){if(f.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");n.push(f)}switch(f.nodeKind){case"scalar":f.matchByTagPrefix?s.scalar.push(f):i.scalar[f.tagName]=f;break;case"sequence":f.matchByTagPrefix?s.sequence.push(f):i.sequence[f.tagName]=f;break;case"mapping":f.matchByTagPrefix?s.mapping.push(f):i.mapping[f.tagName]=f;break}}let o=n.filter(f=>f.implicitFirstChars===null),c=new Set;for(let f of n)if(f.implicitFirstChars!==null)for(let d of f.implicitFirstChars)c.add(d);let l=new Map;for(let f of c)l.set(f,n.filter(d=>d.implicitFirstChars===null||d.implicitFirstChars.indexOf(f)!==-1));let u=i.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=t,this.implicitScalarTags=n,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=o,this.defaultScalarTag=u,this.defaultSequenceTag=i.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=i.mapping["tag:yaml.org,2002:map"],this.exact=i,this.prefix=s}lookupScalarTag(e){let t=this.exact.scalar[e];if(t)return t;for(let n of this.prefix.scalar)if(e.startsWith(n.tagName))return n}lookupSequenceTag(e){let t=this.exact.sequence[e];if(t)return t;for(let n of this.prefix.sequence)if(e.startsWith(n.tagName))return n}lookupMappingTag(e){let t=this.exact.mapping[e];if(t)return t;for(let n of this.prefix.mapping)if(e.startsWith(n.tagName))return n}resolveImplicitScalarTag(e){let t=this.implicitScalarByFirstChar.get(e.charAt(0))??this.implicitScalarAnyFirstChar;for(let i of t){let s=i.resolve(e,!1,i.tagName);if(s!==yt)return{value:s,tag:i}}let n=this.defaultScalarTag;return{value:n.resolve(e,!1,n.tagName),tag:n}}withTags(...e){let t=[];for(let n of e)t=t.concat(n);return new Q9([...this.tags,...t])}},DC=new cS([rle,Xle,eue]),dxe=new cS([...DC.tags,sle,ple,Ale,Mle]),Xl=new cS([...DC.tags,ile,ule,K9,Y9]),LC=new cS([...DC.tags,ale,gle,gC,yC,Qle,Vle,Hle,Jle,Zle,tue]),sue=LC.withTags({...gC,resolve:a((r,e,t)=>{let n=gC.resolve(r,e,t);return n===yt?K9.resolve(r,e,t):n},"resolve")},{...yC,resolve:a((r,e,t)=>{let n=yC.resolve(r,e,t);return n===yt?Y9.resolve(r,e,t):n},"resolve")}),pxe=oS("tag:yaml.org,2002:map",{create:a(()=>new Map,"create"),addPair:a((r,e,t)=>(r.set(e,t),""),"addPair"),has:a((r,e)=>r.has(e),"has"),keys:a(r=>r.keys(),"keys"),get:a((r,e)=>r.get(e),"get"),identify:a(r=>r instanceof Map||aS(r),"identify"),represent:a(r=>{if(r instanceof Map)return r;let e=new Map,t=r;for(let n of Object.keys(t))e.set(n,t[n]);return e},"represent")});a(P9,"normalizeKey");hxe=oS("tag:yaml.org,2002:map",{create:a(()=>({}),"create"),identify:aS,represent:a(r=>{let e=new Map;for(let t of Object.keys(r))e.set(t,r[t]);return e},"represent"),addPair:a((r,e,t)=>{let n=P9(e);return n===null?"nested arrays are not supported inside keys":(n==="__proto__"?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,"")},"addPair"),has:a((r,e)=>{let t=P9(e);return t!==null&&Object.prototype.hasOwnProperty.call(r,t)},"has"),keys:a(r=>Object.keys(r),"keys"),get:a((r,e)=>{let t=String(e);return Object.prototype.hasOwnProperty.call(r,t)?r[t]:null},"get")}),oue={maxLength:79,indent:1,linesBefore:3,linesAfter:2};a(uC,"getLine");a(fC,"padStart");a(aue,"makeSnippet");a(F9,"formatError");Ic=class X9 extends Error{static{a(this,"YAMLException")}reason;mark;constructor(e,t){super(),this.name="YAMLException",this.reason=e,this.mark=t,this.message=F9(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${F9(this,e)}`}static throwAt(e,t,n,i=""){let s=0,o=0;for(let l=0;l<t;l++){let u=e.charCodeAt(l);u===10?(s++,o=l+1):u===13&&(s++,e.charCodeAt(l+1)===10&&l++,o=l+1)}let c={name:i,buffer:e,position:t,line:s,column:t-o};throw c.snippet=aue(c),new X9(n,c)}},hr={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},En={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},Rc={BLOCK:1,FLOW:2},ji={CLIP:1,STRIP:2,KEEP:3},cue=-1;a(D9,"simpleEscapeSequence");J9=new Array(256),Z9=new Array(256);for(let r=0;r<256;r++)J9[r]=D9(r)?1:0,Z9[r]=D9(r);a(lue,"charFromCodepoint");a(uue,"fromHexCode$1");a(fue,"escapedHexLen$1");a(nS,"skipFoldedBreaks");a(NC,"foldedBreaks");a(due,"getPlainValue");a(pue,"getSingleQuotedValue");a(hue,"getDoubleQuotedValue");a(L9,"getBlockValue");a(mue,"getScalarValue");gue=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});a(dC,"tagPercentEncode");a(e5,"tagNameFull");a(t5,"tagNameShort");ld=-1,yue="tag:yaml.org,2002:merge",kC={filename:"",schema:Xl,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};a(_ue,"eventPosition$1");a(kn,"throwError$1");a(r5,"finalizeCollection");a(bue,"constructScalar");a(N9,"collectionTagName");a(n5,"isMappingTag");a(k9,"mergeKeys");a(Sue,"mergeSource");a(wue,"addMappingValue");a(pC,"addValue");a(hC,"storeAnchor");a(Eue,"constructFromEvents");wt=-1,i5=Object.prototype.hasOwnProperty,pd=1,bC=2,s5=3,iS=4,vue=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Tue=/[,\[\]{}]/,o5=/^(?:!|!!|![0-9A-Za-z-]+!)$/,SC=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,a5=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,Aue=new RegExp(`^(?:${SC})*$`),Iue=new RegExp(`^(?:${a5})+$`),Rue=new RegExp(`^(?:!(?:${SC})*|${a5}(?:${SC})*)$`),MC={filename:"",maxDepth:100};a(Cue,"addDocumentEvent");a(c5,"addSequenceEvent");a(wC,"addMappingEvent");a(M9,"insertFlowPairMappingEvent");a(md,"addScalarEvent");a(xue,"addAliasEvent");a(ud,"addPopEvent");a(ni,"addEmptyScalarEvent");a(j9,"emptyProperties");a(cm,"snapshotState");a(fd,"restoreState");a(De,"throwError");a(tn,"isEol");a(Kl,"isWhiteSpace");a(Ns,"isWsOrEol");a(Aa,"isWsOrEolOrEnd");a(Yl,"isFlowIndicator");a(Oue,"fromDecimalCode");a(Pue,"fromHexCode");a(Fue,"escapedHexLen");a(Due,"isSimpleEscape");a(sS,"consumeLineBreak");a(ii,"skipSeparationSpace");a(Hl,"testDocumentSeparator");a($9,"skipUntilLineEnd");a(l5,"checkPrintable");a(Lue,"readTagProperty");a(Nue,"readAnchorProperty");a(kue,"readAlias");a(EC,"readFlowScalarBreak");a(Mue,"readSingleQuotedScalar");a(jue,"readDoubleQuotedScalar");a($ue,"readBlockScalar");a(Uue,"canStartPlainScalar");a(Bue,"readPlainScalar");a(om,"skipFlowSeparationSpace");a(Vue,"readFlowCollection");a(U9,"readBlockSequence");a(mC,"readBlockMapping");a(zl,"parseNode");a(Gue,"readDirective");a(que,"readDocument");a(Wue,"parseEvents");Hue={...MC,...kC};a(zue,"loadDocuments");a(gd,"load");eS=class{static{a(this,"Style")}tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},Wl=Symbol("INVALID");a(Kue,"buildRepresentTypes");a(Yue,"matchTag");a(am,"build");a(Que,"jsToAst");Xue=Symbol("visit:break"),u5=Symbol("visit:skip");a(rS,"visitNode");a(Jue,"visit");jC=65279,Zue=9,Ql=10,f5=13,efe=32,tfe=33,d5=34,vC=35,rfe=37,nfe=38,p5=39,ife=42,TC=44,$C=45,um=58,sfe=61,ofe=62,h5=63,afe=64,AC=91,IC=93,cfe=96,RC=123,lfe=124,CC=125,jn={};jn[0]="\\0";jn[7]="\\a";jn[8]="\\b";jn[9]="\\t";jn[10]="\\n";jn[11]="\\v";jn[12]="\\f";jn[13]="\\r";jn[27]="\\e";jn[34]='\\"';jn[92]="\\\\";jn[133]="\\N";jn[160]="\\_";jn[8232]="\\L";jn[8233]="\\P";UC={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};a(ufe,"nodeTagShort");a(ffe,"createPresenterState");a(dfe,"encodeNonPrintable");a(B9,"indentString");a(xC,"generateNextLine");a(pfe,"scalarLayout");a(hd,"isWhitespace");a(hfe,"startsWithDocumentSeparator");a(fm,"isPrintable");a(V9,"isNsCharOrWhitespace");a(OC,"isPlainSafe");a(mfe,"isPlainSafeFirst");a(gfe,"isPlainSafeAtStart");a(yfe,"isPlainSafeLast");a(dd,"codePointAt");a(m5,"needIndentIndicator");dm=1,lm=2,BC=3,VC=4,Ac=5;a(_fe,"chooseScalarStyle");a(bfe,"renderScalarStyle");a(Sfe,"resolveScalarStyle");a(G9,"blockHeader");a(q9,"encodeFlowBreaks");a(W9,"dropEndingNewline");a(pm,"isMoreIndented");a(wfe,"foldBlockScalar");a(H9,"foldLine");a(Efe,"escapeString");a(vfe,"writeFlowSequence");a(z9,"writeBlockSequence");a(Tfe,"writeFlowMapping");a(tS,"sortKeyValue");a(g5,"sortMappingItems");a(Afe,"writeBlockMapping");a(PC,"cannotBeCompact");a(Ia,"writeNode");a(Ife,"rootStartsOwnLine");a(Rfe,"isOpenEnded");a(Cfe,"writeDocumentDirectives");a(xfe,"present");Ofe={...UC,schema:sue,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:a(()=>{},"transform")};a(yd,"dump");mxe=hr.DOCUMENT,gxe=hr.SEQUENCE,yxe=hr.MAPPING,_xe=hr.SCALAR,bxe=hr.ALIAS,Sxe=hr.POP,wxe=En.PLAIN,Exe=En.SINGLE_QUOTED,vxe=En.DOUBLE_QUOTED,Txe=En.LITERAL_BLOCK,Axe=En.FOLDED_BLOCK,Ixe=Rc.BLOCK,Rxe=Rc.FLOW,Cxe=ji.CLIP,xxe=ji.STRIP,Oxe=ji.KEEP});var GC,y5,Pfe,_5=je(()=>{GC=a((r,e,t)=>{let n=r instanceof RegExp?y5(r,t):r,i=e instanceof RegExp?y5(e,t):e,s=n!==null&&i!=null&&Pfe(n,i,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+n.length,s[1]),post:t.slice(s[1]+i.length)}},"balanced"),y5=a((r,e)=>{let t=e.match(r);return t?t[0]:null},"maybeMatch"),Pfe=a((r,e,t)=>{let n,i,s,o,c,l=t.indexOf(r),u=t.indexOf(e,l+1),f=l;if(l>=0&&u>0){if(r===e)return[l,u];for(n=[],s=t.length;f>=0&&!c;){if(f===l)n.push(f),l=t.indexOf(r,f+1);else if(n.length===1){let d=n.pop();d!==void 0&&(c=[d,u])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=u),u=t.indexOf(e,f+1);f=l<u&&l>=0?l:u}n.length&&o!==void 0&&(c=[s,o])}return c},"range")});function qC(r){return isNaN(r)?r.charCodeAt(0):parseInt(r,10)}function qfe(r){return r.replace(Mfe,b5).replace(jfe,S5).replace($fe,HC).replace(Ufe,w5).replace(Bfe,E5)}function Wfe(r){return r.replace(Ffe,"\\").replace(Dfe,"{").replace(Lfe,"}").replace(Nfe,",").replace(kfe,".")}function v5(r){if(!r)return[""];let e=[],t=GC("{","}",r);if(!t)return r.split(",");let{pre:n,body:i,post:s}=t,o=n.split(",");o[o.length-1]+="{"+i+"}";let c=v5(s);return s.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),e.push.apply(e,o),e}function T5(r,e={}){if(!r)return[];let{max:t=Vfe,maxLength:n=Gfe}=e;return r.slice(0,2)==="{}"&&(r="\\{\\}"+r.slice(2)),WC(qfe(r),t,n,!0).map(Wfe)}function Hfe(r){return"{"+r+"}"}function zfe(r){return/^-?0\d/.test(r)}function Kfe(r,e){return r<=e}function Yfe(r,e){return r>=e}function mm(r,e,t,n,i,s){let o=[],c=0;for(let l=0;l<r.length;l++)for(let u=0;u<t.length;u++){if(o.length>=n)return o;let f=r[l]+e+t[u];if(!(s&&!f)){if(c+f.length>i)return o;o.push(f),c+=f.length}}return o}function Qfe(r,e,t,n){let i=r.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=qC(i[0]),c=qC(i[1]),l=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(qC(i[2])),1):1,f=Kfe;c<o&&(u*=-1,f=Yfe);let p=i.some(zfe),h=0;for(let m=o;f(m,c)&&s.length<t;m+=u){let y;if(e)y=String.fromCharCode(m),y==="\\"&&(y="");else if(y=String(m),p){let _=l-y.length;if(_>0){let b=new Array(_+1).join("0");m<0?y="-"+b+y.slice(1):y=b+y}}if(h+y.length>n)break;s.push(y),h+=y.length}return s}function WC(r,e,t,n){let i=[""],s=!1,o=!0;for(;;){let c=GC("{","}",r);if(!c)return mm(i,r,[""],e,t,s);let l=c.pre;if(/\$$/.test(l)){if(i=mm(i,l+"{"+c.body+"}",[""],e,t,s&&!c.post.length),o=!1,!c.post.length)break;r=c.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body),d=u||f,p=c.body.indexOf(",")>=0;if(!d&&!p){if(c.post.match(/,(?!,).*\}/)){r=c.pre+"{"+c.body+HC+c.post,n=!0;continue}return mm(i,l+"{"+c.body+"}"+c.post,[""],e,t,s)}o&&(s=n&&!d,o=!1);let h;if(d)h=Qfe(c.body,f,e,t);else{let m=v5(c.body);if(m.length===1&&m[0]!==void 0&&(m=WC(m[0],e,t,!1).map(Hfe),m.length===1)){if(i=mm(i,l+m[0],[""],e,t,s&&!c.post.length),!c.post.length)break;r=c.post;continue}let y=s&&!c.post.length&&!l;for(let b=0;y&&b<i.length;b++)i[b]&&(y=!1);h=[];let _=0;e:for(let b=0;b<m.length;b++){let T=WC(m[b],e,t,!1);for(let I=0;I<T.length;I++){let E=T[I];if(!(y&&!E)){if(h.length>=e||_+E.length>t)break e;h.push(E),_+=E.length}}}}if(i=mm(i,l,h,e,t,s&&!c.post.length),!c.post.length)break;r=c.post}return i}var b5,S5,HC,w5,E5,Ffe,Dfe,Lfe,Nfe,kfe,Mfe,jfe,$fe,Ufe,Bfe,Vfe,Gfe,A5=je(()=>{_5();b5="\0SLASH"+Math.random()+"\0",S5="\0OPEN"+Math.random()+"\0",HC="\0CLOSE"+Math.random()+"\0",w5="\0COMMA"+Math.random()+"\0",E5="\0PERIOD"+Math.random()+"\0",Ffe=new RegExp(b5,"g"),Dfe=new RegExp(S5,"g"),Lfe=new RegExp(HC,"g"),Nfe=new RegExp(w5,"g"),kfe=new RegExp(E5,"g"),Mfe=/\\\\/g,jfe=/\\{/g,$fe=/\\}/g,Ufe=/\\,/g,Bfe=/\\\./g,Vfe=1e5,Gfe=4e6;a(qC,"numeric");a(qfe,"escapeBraces");a(Wfe,"unescapeBraces");a(v5,"parseCommaParts");a(T5,"expand");a(Hfe,"embrace");a(zfe,"isPadded");a(Kfe,"lte");a(Yfe,"gte");a(mm,"combine");a(Qfe,"expandSequence");a(WC,"expand_")});var gm,I5=je(()=>{gm=a(r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern")});var Xfe,ym,Jfe,R5,C5,x5=je(()=>{Xfe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ym=a(r=>r.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Jfe=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),R5=a(r=>r.join(""),"rangesToString"),C5=a((r,e)=>{let t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=t+1,o=!1,c=!1,l=!1,u=!1,f=t,d="";e:for(;s<r.length;){let y=r.charAt(s);if((y==="!"||y==="^")&&s===t+1){u=!0,s++;continue}if(y==="]"&&o&&!l){f=s+1;break}if(o=!0,y==="\\"&&!l){l=!0,s++;continue}if(y==="["&&!l){for(let[_,[b,T,I]]of Object.entries(Xfe))if(r.startsWith(_,s)){if(d)return["$.",!1,r.length-t,!0];s+=_.length,I?i.push(b):n.push(b),c=c||T;continue e}}if(l=!1,d){y>d?n.push(ym(d)+"-"+ym(y)):y===d&&n.push(ym(y)),d="",s++;continue}if(r.startsWith("-]",s+1)){n.push(ym(y+"-")),s+=2;continue}if(r.startsWith("-",s+1)){d=y,s+=2;continue}n.push(ym(y)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,r.length-t,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let y=n[0].length===2?n[0].slice(-1):n[0];return[Jfe(y),!1,f-t,!1]}let p="["+(u?"^":"")+R5(n)+"]",h="["+(u?"":"^")+R5(i)+"]";return[n.length&&i.length?"("+p+"|"+h+")":n.length?p:h,c,f-t,!0]},"parseClass")});var ks,uS=je(()=>{ks=a((r,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?r.replace(/\[([^/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?r.replace(/\[([^/\\{}])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape")});var Ri,Zfe,zC,O5,ede,tde,rde,P5,nde,fS,ide,sde,ode,ade,KC,F5,D5,cde,Jl,YC=je(()=>{x5();uS();Zfe=new Set(["!","?","+","*","@"]),zC=a(r=>Zfe.has(r),"isExtglobType"),O5=a(r=>zC(r.type),"isExtglobAST"),ede=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),tde=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),rde=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),P5=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),nde="(?!(?:^|/)\\.\\.?(?:$|/))",fS="(?!\\.)",ide=new Set(["[","."]),sde=new Set(["..","."]),ode=new Set("().*{}+?[]^$\\!"),ade=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),KC="[^/]",F5=KC+"*?",D5=KC+"+?",cde=0,Jl=class{static{a(this,"AST")}type;#t;#r;#n=!1;#e=[];#i;#a;#p;#u=!1;#c;#f;#l=!1;id=++cde;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#t.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,t,n={}){this.type=e,e&&(this.#r=!0),this.#i=t,this.#t=this.#i?this.#i.#t:this,this.#c=this.#t===this?n:this.#t.#c,this.#p=this.#t===this?[]:this.#t.#p,e==="!"&&!this.#t.#u&&this.#p.push(this),this.#a=this.#i?this.#i.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#f=this.#e.map(e=>String(e)).join("")}#d(){if(this!==this.#t)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let e;for(;e=this.#p.pop();){if(e.type!=="!")continue;let t=e,n=t.#i;for(;n;){for(let i=t.#a+1;!n.type&&i<n.#e.length;i++)for(let s of e.#e){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#e[i])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof Ri&&t.#i===this))throw new Error("invalid part: "+t);this.#e.push(t)}}toJSON(){let e=this.type===null?this.#e.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#u&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#e[t];if(!(n instanceof Ri&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#e.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new Ri(this.type,e);for(let n of this.#e)t.copyIn(n);return t}static#o(e,t,n,i,s){let o=i.maxExtglobRecursion??2,c=!1,l=!1,u=-1,f=!1;if(t.type===null){let y=n,_="";for(;y<e.length;){let b=e.charAt(y++);if(c||b==="\\"){c=!c,_+=b;continue}if(l){y===u+1?(b==="^"||b==="!")&&(f=!0):b==="]"&&!(y===u+2&&f)&&(l=!1),_+=b;continue}else if(b==="["){l=!0,u=y,f=!1,_+=b;continue}if(!i.noext&&zC(b)&&e.charAt(y)==="("&&s<=o){t.push(_),_="";let I=new Ri(b,t);y=Ri.#o(e,I,y,i,s+1),t.push(I);continue}_+=b}return t.push(_),y}let d=n+1,p=new Ri(null,t),h=[],m="";for(;d<e.length;){let y=e.charAt(d++);if(c||y==="\\"){c=!c,m+=y;continue}if(l){d===u+1?(y==="^"||y==="!")&&(f=!0):y==="]"&&!(d===u+2&&f)&&(l=!1),m+=y;continue}else if(y==="["){l=!0,u=d,f=!1,m+=y;continue}if(!i.noext&&zC(y)&&e.charAt(d)==="("&&(s<=o||t&&t.#b(y))){let b=t&&t.#b(y)?0:1;p.push(m),m="";let T=new Ri(y,p);p.push(T),d=Ri.#o(e,T,d,i,s+b);continue}if(y==="|"){p.push(m),m="",h.push(p),p=new Ri(null,t);continue}if(y===")")return m===""&&t.#e.length===0&&(t.#l=!0),p.push(m),m="",t.push(...h,p),d;m+=y}return t.type=null,t.#r=void 0,t.#e=[e.substring(n-1)],d}#g(e){return this.#E(e,tde)}#E(e,t=ede){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#b(n.type,t)}#b(e,t=rde){return!!t.get(this.type)?.includes(e)}#S(e,t){let n=e.#e[0],i=new Ri(null,n,this.options);i.#e.push(""),n.push(i),this.#A(e,t)}#A(e,t){let n=e.#e[0];this.#e.splice(t,1,...n.#e);for(let i of n.#e)typeof i=="object"&&(i.#i=this);this.#f=void 0}#y(e){return!!P5.get(this.type)?.has(e)}#v(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let t=e.#e[0];return!t||typeof t!="object"||t.type===null?!1:this.#y(t.type)}#T(e){let t=P5.get(this.type),n=e.#e[0],i=t?.get(n.type);if(!i)return!1;this.#e=n.#e;for(let s of this.#e)typeof s=="object"&&(s.#i=this);this.type=i,this.#f=void 0,this.#l=!1}static fromGlob(e,t={}){let n=new Ri(null,void 0,t);return Ri.#o(e,n,0,t,0),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[t,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let c=(this.#c.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#t===this&&(this.#m(),this.#d()),!O5(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(h=>typeof h!="string"),u=this.#e.map(h=>{let[m,y,_,b]=typeof h=="string"?Ri.#w(h,this.#r,l):h.toRegExpSource(e);return this.#r=this.#r||_,this.#n=this.#n||b,m}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&sde.has(this.#e[0]))){let m=ide,y=t&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),_=!t&&!e&&m.has(u.charAt(0));f=y?nde:_?fS:""}let d="";return this.isEnd()&&this.#t.#u&&this.#i?.type==="!"&&(d="(?:$|\\/)"),[f+u+d,ks(u),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),u=this;return u.#e=[l],u.type=null,u.#r=void 0,[l,ks(this.toString()),!1,!1]}let o=!n||e||t||!fS?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!t?fS:"")+D5;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?fS:"")+F5+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=i+s+l}return[c,ks(s),this.#r=!!this.#r,this.#n]}#m(){if(O5(this)){let e=0,t=!1;do{t=!0;for(let n=0;n<this.#e.length;n++){let i=this.#e[n];typeof i=="object"&&(i.#m(),this.#E(i)?(t=!1,this.#A(i,n)):this.#g(i)?(t=!1,this.#S(i,n)):this.#v(i)&&(t=!1,this.#T(i)))}}while(!t&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#m();this.#f=void 0}#_(e){return this.#e.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=t.toRegExpSource(e);return this.#n=this.#n||o,n}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#w(e,t,n=!1){let i=!1,s="",o=!1,c=!1;for(let l=0;l<e.length;l++){let u=e.charAt(l);if(i){i=!1,s+=(ode.has(u)?"\\":"")+u;continue}if(u==="*"){if(c)continue;c=!0,s+=n&&/^[*]+$/.test(e)?D5:F5,t=!0;continue}else c=!1;if(u==="\\"){l===e.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[f,d,p,h]=C5(e,l);if(p){s+=f,o=o||d,l+=p-1,t=t||h;continue}}if(u==="?"){s+=KC,t=!0;continue}s+=ade(u)}return[s,ks(e),!!t,o]}};Ri=Jl});var _d,QC=je(()=>{_d=a((r,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?r.replace(/[?*()[\]{}]/g,"[$&]"):r.replace(/[?*()[\]\\{}]/g,"\\$&"):e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&"),"escape")});var si,lde,ude,fde,dde,pde,hde,mde,gde,yde,_de,bde,Sde,wde,Ede,vde,Tde,Ade,Ide,k5,M5,j5,L5,Rde,_r,Cde,xde,Ode,Pde,Fde,Ji,Dde,$5,Lde,Nde,N5,kde,$i,Cc=je(()=>{A5();I5();YC();QC();uS();YC();QC();uS();si=a((r,e,t={})=>(gm(e),!t.nocomment&&e.charAt(0)==="#"?!1:new $i(e,t).match(r)),"minimatch"),lde=/^\*+([^+@!?*[(]*)$/,ude=a(r=>e=>!e.startsWith(".")&&e.endsWith(r),"starDotExtTest"),fde=a(r=>e=>e.endsWith(r),"starDotExtTestDot"),dde=a(r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),"starDotExtTestNocase"),pde=a(r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),"starDotExtTestNocaseDot"),hde=/^\*+\.\*+$/,mde=a(r=>!r.startsWith(".")&&r.includes("."),"starDotStarTest"),gde=a(r=>r!=="."&&r!==".."&&r.includes("."),"starDotStarTestDot"),yde=/^\.\*+$/,_de=a(r=>r!=="."&&r!==".."&&r.startsWith("."),"dotStarTest"),bde=/^\*+$/,Sde=a(r=>r.length!==0&&!r.startsWith("."),"starTest"),wde=a(r=>r.length!==0&&r!=="."&&r!=="..","starTestDot"),Ede=/^\?+([^+@!?*[(]*)?$/,vde=a(([r,e=""])=>{let t=k5([r]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),Tde=a(([r,e=""])=>{let t=M5([r]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),Ade=a(([r,e=""])=>{let t=M5([r]);return e?n=>t(n)&&n.endsWith(e):t},"qmarksTestDot"),Ide=a(([r,e=""])=>{let t=k5([r]);return e?n=>t(n)&&n.endsWith(e):t},"qmarksTest"),k5=a(([r])=>{let e=r.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),M5=a(([r])=>{let e=r.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),j5=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",L5={win32:{sep:"\\"},posix:{sep:"/"}},Rde=j5==="win32"?L5.win32.sep:L5.posix.sep;si.sep=Rde;_r=Symbol("globstar **");si.GLOBSTAR=_r;Cde="[^/]",xde=Cde+"*?",Ode="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Pde="(?:(?!(?:\\/|^)\\.).)*?",Fde=a((r,e={})=>t=>si(t,r,e),"filter");si.filter=Fde;Ji=a((r,e={})=>Object.assign({},r,e),"ext"),Dde=a(r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return si;let e=si;return Object.assign(a((n,i,s={})=>e(n,i,Ji(r,s)),"m"),{Minimatch:class extends e.Minimatch{static{a(this,"Minimatch")}constructor(i,s={}){super(i,Ji(r,s))}static defaults(i){return e.defaults(Ji(r,i)).Minimatch}},AST:class extends e.AST{static{a(this,"AST")}constructor(i,s,o={}){super(i,s,Ji(r,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,Ji(r,s))}},unescape:a((n,i={})=>e.unescape(n,Ji(r,i)),"unescape"),escape:a((n,i={})=>e.escape(n,Ji(r,i)),"escape"),filter:a((n,i={})=>e.filter(n,Ji(r,i)),"filter"),defaults:a(n=>e.defaults(Ji(r,n)),"defaults"),makeRe:a((n,i={})=>e.makeRe(n,Ji(r,i)),"makeRe"),braceExpand:a((n,i={})=>e.braceExpand(n,Ji(r,i)),"braceExpand"),match:a((n,i,s={})=>e.match(n,i,Ji(r,s)),"match"),sep:e.sep,GLOBSTAR:_r})},"defaults");si.defaults=Dde;$5=a((r,e={})=>(gm(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:T5(r,{max:e.braceExpandMax})),"braceExpand");si.braceExpand=$5;Lde=a((r,e={})=>new $i(r,e).makeRe(),"makeRe");si.makeRe=Lde;Nde=a((r,e,t={})=>{let n=new $i(e,t);return r=r.filter(i=>n.match(i)),n.options.nonull&&!r.length&&r.push(e),r},"match");si.match=Nde;N5=/[?*]|[+@!]\(.*?\)|\[|\]/,kde=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),$i=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){gm(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||j5,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!N5.test(s[2]))&&!N5.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(u)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let i=n;for(;t[i+1]==="**";)i++;i!==n&&t.splice(n,i-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let s=e[i];i===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let c=n[i+1],l=n[i+2],u=n[i+3];if(c!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;t=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let c=n[o];o===1&&c===""&&n[0]===""||(c==="."||c==="")&&(t=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(t=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let i=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(i){e[t]=[],e[n]=i;break}}return e.filter(t=>t.length)}partsMatch(e,t,n=!1){let i=0,s=0,o=[],c="";for(;i<e.length&&s<t.length;)if(e[i]===t[s])o.push(c==="b"?t[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&t[s]===e[i+1])o.push(e[i]),i++;else if(n&&t[s]==="**"&&e[i]===t[s+1])o.push(t[s]),s++;else if(e[i]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(c==="b")return!1;c="a",o.push(e[i]),i++,s++}else if(t[s]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(c==="a")return!1;c="b",o.push(t[s]),i++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let i=0,s=0;if(this.isWindows){let c=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!c&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),d=l?3:c?0:void 0,p=f?3:u?0:void 0;if(typeof d=="number"&&typeof p=="number"){let[h,m]=[e[d],t[p]];h.toLowerCase()===m.toLowerCase()&&(t[p]=h,s=p,i=d)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(_r)?this.#t(e,t,n,i,s):this.#n(e,t,n,i,s)}#t(e,t,n,i,s){let o=t.indexOf(_r,s),c=t.lastIndexOf(_r),[l,u,f]=n?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,c),t.slice(c+1)];if(l.length){let T=e.slice(i,i+l.length);if(!this.#n(T,l,n,0,0))return!1;i+=l.length,s+=l.length}let d=0;if(f.length){if(f.length+i>e.length)return!1;let T=e.length-f.length;if(this.#n(e,f,n,T,0))d=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(T--,!this.#n(e,f,n,T,0)))return!1;d=f.length+1}}if(!u.length){let T=!!d;for(let I=i;I<e.length-d;I++){let E=String(e[I]);if(T=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return n||T}let p=[[[],0]],h=p[0],m=0,y=[0];for(let T of u)T===_r?(y.push(m),h=[[],0],p.push(h)):(h[0].push(T),m++);let _=p.length-1,b=e.length-d;for(let T of p)T[1]=b-(y[_--]+T[0].length);return!!this.#r(e,p,i,0,n,0,!!d)}#r(e,t,n,i,s,o,c){let l=t[i];if(!l){for(let d=n;d<e.length;d++){c=!0;let p=e[d];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[u,f]=l;for(;n<=f;){if(this.#n(e.slice(0,n+u.length),u,s,n,0)&&o<this.maxGlobstarRecursion){let h=this.#r(e,t,n+u.length,i+1,s,o+1,c);if(h!==!1)return h}let p=e[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return s||null}#n(e,t,n,i,s){let o,c,l,u;for(o=i,c=s,u=e.length,l=t.length;o<u&&c<l;o++,c++){this.debug("matchOne loop");let f=t[c],d=e[o];if(this.debug(t,f,d),f===!1||f===_r)return!1;let p;if(typeof f=="string"?(p=d===f,this.debug("string match",f,d,p)):(p=f.test(d),this.debug("pattern match",f,d,p)),!p)return!1}if(o===u&&c===l)return!0;if(o===u)return n;if(c===l)return o===u-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return $5(this.pattern,this.options)}parse(e){gm(e);let t=this.options;if(e==="**")return _r;if(e==="")return"";let n,i=null;(n=e.match(bde))?i=t.dot?wde:Sde:(n=e.match(lde))?i=(t.nocase?t.dot?pde:dde:t.dot?fde:ude)(n[1]):(n=e.match(Ede))?i=(t.nocase?t.dot?Tde:vde:t.dot?Ade:Ide)(n):(n=e.match(hde))?i=t.dot?gde:mde:(n=e.match(yde))&&(i=_de);let s=Jl.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?xde:t.dot?Ode:Pde,i=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(d=>{if(d instanceof RegExp)for(let p of d.flags.split(""))i.add(p);return typeof d=="string"?kde(d):d===_r?_r:d._src});u.forEach((d,p)=>{let h=u[p+1],m=u[p-1];d!==_r||m===_r||(m===void 0?h!==void 0&&h!==_r?u[p+1]="(?:\\/|"+n+"\\/)?"+h:u[p]=n:h===void 0?u[p-1]=m+"(?:\\/|\\/"+n+")?":h!==_r&&(u[p-1]=m+"(?:\\/|\\/"+n+"\\/)"+h,u[p+1]=_r))});let f=u.filter(d=>d!==_r);if(this.partial&&f.length>=1){let d=[];for(let p=1;p<=f.length;p++)d.push(f.slice(0,p).join("/"));return"(?:"+d.join("|")+")"}return f.join("/")}).join("|"),[o,c]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+c+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+c+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let c=i.length-2;!o&&c>=0;c--)o=i[c];for(let c of s){let l=i;if(n.matchBase&&c.length===1&&(l=[o]),this.matchOne(l,c,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return si.defaults(e).Minimatch}};si.AST=Jl;si.Minimatch=$i;si.escape=_d;si.unescape=ks});var pS,vn,_m,Mde,XC,B5,U5,jde,$de,xc,V5,dS,Ude,Sm,q5=je(()=>{pS=require("node:diagnostics_channel"),vn=(0,pS.channel)("lru-cache:metrics"),_m=(0,pS.tracingChannel)("lru-cache"),Mde=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,XC=a(()=>vn.hasSubscribers||_m.hasSubscribers,"R"),B5=new Set,U5=typeof process=="object"&&process?process:{},jde=a((r,e,t,n)=>{typeof U5.emitWarning=="function"?U5.emitWarning(r,e,t,n):console.error(`[${t}] ${e}: ${r}`)},"k"),$de=a(r=>!B5.has(r),"H"),xc=a(r=>!!r&&r===Math.floor(r)&&r>0&&isFinite(r),"T"),V5=a(r=>xc(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?dS:null:null,"j"),dS=class extends Array{static{a(this,"O")}constructor(r){super(r),this.fill(0)}},Ude=class bm{static{a(this,"d")}heap;length;static#t=!1;static create(e){let t=V5(e);if(!t)return[];bm.#t=!0;let n=new bm(e,t);return bm.#t=!1,n}constructor(e,t){if(!bm.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Sm=class G5{static{a(this,"d")}#t;#r;#n;#e;#i;#a;#p;#u;get perf(){return this.#u}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#c;#f;#l;#d;#o;#g;#E;#b;#S;#A;#y;#v;#T;#m;#_;#w;#R;#s;#x;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#m,autopurgeTimers:e.#_,sizes:e.#v,keyMap:e.#l,keyList:e.#d,valList:e.#o,next:e.#g,prev:e.#E,get head(){return e.#b},get tail(){return e.#S},free:e.#A,isBackgroundFetch:a(t=>e.#h(t),"isBackgroundFetch"),backgroundFetch:a((t,n,i,s)=>e.#M(t,n,i,s),"backgroundFetch"),moveToTail:a(t=>e.#K(t),"moveToTail"),indexes:a(t=>e.#P(t),"indexes"),rindexes:a(t=>e.#F(t),"rindexes"),isStale:a(t=>e.#I(t),"isStale")}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#p}get dispose(){return this.#n}get onInsert(){return this.#e}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:l,dispose:u,onInsert:f,disposeAfter:d,noDisposeOnSet:p,noUpdateTTL:h,maxSize:m=0,maxEntrySize:y=0,sizeCalculation:_,fetchMethod:b,memoMethod:T,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:R,ignoreFetchAbort:D,backgroundFetchSize:P=1,perf:M}=e;if(this.backgroundFetchSize=P,M!==void 0&&typeof M?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#u=M??Mde,t!==0&&!xc(t))throw new TypeError("max option must be a nonnegative integer");let O=t?V5(t):Array;if(!O)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=m,this.maxEntrySize=y||this.#r,this.sizeCalculation=_,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#p=T,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=b,this.#R=!!b,this.#l=new Map,this.#d=Array.from({length:t}).fill(void 0),this.#o=Array.from({length:t}).fill(void 0),this.#g=new O(t),this.#E=new O(t),this.#b=0,this.#S=0,this.#A=Ude.create(t),this.#c=0,this.#f=0,typeof u=="function"&&(this.#n=u),typeof f=="function"&&(this.#e=f),typeof d=="function"?(this.#i=d,this.#y=[]):(this.#i=void 0,this.#y=void 0),this.#w=!!this.#n,this.#x=!!this.#e,this.#s=!!this.#i,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!R,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#r!==0&&!xc(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!xc(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#q()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=xc(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!xc(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#O()}if(this.#t===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let L="LRU_CACHE_UNBOUNDED";$de(L)&&(B5.add(L),jde("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,G5))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#O(){let e=new dS(this.#t),t=new dS(this.#t);this.#m=e,this.#T=t;let n=this.ttlAutopurge?Array.from({length:this.#t}):void 0;this.#_=n,this.#$=(l,u,f=this.#u.now())=>{t[l]=u!==0?f:0,e[l]=u,i(l,u)},this.#C=l=>{t[l]=e[l]!==0?this.#u.now():0,i(l,e[l])};let i=this.ttlAutopurge?(l,u)=>{if(n?.[l]&&(clearTimeout(n[l]),n[l]=void 0),u&&u!==0&&n){let f=setTimeout(()=>{this.#I(l)?(this.#j(this.#d[l],"expire"),n[l]=void 0):i(l,c(l))},u+1);f.unref&&f.unref(),n[l]=f}}:()=>{};this.#D=(l,u)=>{if(e[u]){let f=e[u],d=t[u];if(!f||!d)return;l.ttl=f,l.start=d,l.now=s||o();let p=l.now-d;l.remainingTTL=f-p}};let s=0,o=a(()=>{let l=this.#u.now();if(this.ttlResolution>0){s=l;let u=setTimeout(()=>s=0,this.ttlResolution);u.unref&&u.unref()}return l},"o");this.getRemainingTTL=l=>{let u=this.#l.get(l);return u===void 0?0:c(u)};let c=a(l=>{let u=e[l],f=t[l];if(!u||!f)return 1/0;let d=(s||o())-f;return u-d},"l");this.#I=l=>{let u=t[l],f=e[l];return!!f&&!!u&&(s||o())-u>f}}#C=a(()=>{},"#R");#D=a(()=>{},"#v");#$=a(()=>{},"#H");#I=a(()=>!1,"#p");#q(){let e=new dS(this.#t);this.#f=0,this.#v=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#U=(t,n,i,s)=>{if(!xc(i)){if(this.#h(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,t),!xc(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#L=(t,n,i)=>{if(e[t]=n,this.#r){let s=this.#r-e[t];for(;this.#f>s;)this.#G(!0)}this.#f+=e[t],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#N=a(e=>{},"#x");#L=a((e,t,n)=>{},"#j");#U=a((e,t,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#N");*#P({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#S;this.#B(t)&&((e||!this.#I(t))&&(yield t),t!==this.#b);)t=this.#E[t]}*#F({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#b;this.#B(t)&&((e||!this.#I(t))&&(yield t),t!==this.#S);)t=this.#g[t]}#B(e){return e!==void 0&&this.#l.get(this.#d[e])===e}*entries(){for(let e of this.#P())this.#o[e]!==void 0&&this.#d[e]!==void 0&&!this.#h(this.#o[e])&&(yield[this.#d[e],this.#o[e]])}*rentries(){for(let e of this.#F())this.#o[e]!==void 0&&this.#d[e]!==void 0&&!this.#h(this.#o[e])&&(yield[this.#d[e],this.#o[e]])}*keys(){for(let e of this.#P()){let t=this.#d[e];t!==void 0&&!this.#h(this.#o[e])&&(yield t)}}*rkeys(){for(let e of this.#F()){let t=this.#d[e];t!==void 0&&!this.#h(this.#o[e])&&(yield t)}}*values(){for(let e of this.#P())this.#o[e]!==void 0&&!this.#h(this.#o[e])&&(yield this.#o[e])}*rvalues(){for(let e of this.#F())this.#o[e]!==void 0&&!this.#h(this.#o[e])&&(yield this.#o[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#P()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.#d[n],this))return this.#z(this.#d[n],t)}}forEach(e,t=this){for(let n of this.#P()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#d[n],this)}}rforEach(e,t=this){for(let n of this.#F()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#d[n],this)}}purgeStale(){let e=!1;for(let t of this.#F({allowStale:!0}))this.#I(t)&&(this.#j(this.#d[t],"expire"),e=!0);return e}info(e){let t=this.#l.get(e);if(t===void 0)return;let n=this.#o[t],i=this.#h(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#m&&this.#T){let o=this.#m[t],c=this.#T[t];if(o&&c){let l=o-(this.#u.now()-c);s.ttl=l,s.start=Date.now()}}return this.#v&&(s.size=this.#v[t]),s}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let n=this.#d[t],i=this.#o[t],s=this.#h(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#m&&this.#T){o.ttl=this.#m[t];let c=this.#u.now()-this.#T[t];o.start=Math.floor(Date.now()-c)}this.#v&&(o.size=this.#v[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let i=Date.now()-n.start;n.start=this.#u.now()-i}this.#k(t,n.value,n)}}set(e,t,n={}){let{status:i=vn.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=e,t!==void 0&&(i.value=t),i.cache=this);let s=this.#k(e,t,n);return i&&vn.hasSubscribers&&vn.publish(i),s}#k(e,t,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,f=this.#h(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:d=this.noUpdateTTL}=n;u&&!f&&(u.value=t);let p=this.#U(e,t,n.size||0,l,u);if(this.maxEntrySize&&p>this.maxEntrySize)return this.#j(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let h=this.#c===0?void 0:this.#l.get(e);if(h===void 0)h=this.#c===0?this.#S:this.#A.length!==0?this.#A.pop():this.#c===this.#t?this.#G(!1):this.#c,this.#d[h]=e,this.#o[h]=t,this.#l.set(e,h),this.#g[this.#S]=h,this.#E[h]=this.#S,this.#S=h,this.#c++,this.#L(h,p,u),u&&(u.set="add"),d=!1,this.#x&&!f&&this.#e?.(t,e,"add");else{this.#K(h);let m=this.#o[h];if(t!==m){if(!c)if(this.#h(m)){m!==i&&m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=m;y!==void 0&&y!==t&&(this.#w&&this.#n?.(y,e,"set"),this.#s&&this.#y?.push([y,e,"set"]))}else this.#w&&this.#n?.(m,e,"set"),this.#s&&this.#y?.push([m,e,"set"]);if(this.#N(h),this.#L(h,p,u),this.#o[h]=t,!f){let y=m&&this.#h(m)?m.__staleWhileFetching:m,_=y===void 0?"add":t!==y?"replace":"update";u&&(u.set=_,y!==void 0&&(u.oldValue=y)),this.#x&&this.onInsert?.(t,e,_)}}else f||(u&&(u.set="update"),this.#x&&this.onInsert?.(t,e,"update"))}if(s!==0&&!this.#m&&this.#O(),this.#m&&(d||this.#$(h,s,o),u&&this.#D(u,h)),!c&&this.#s&&this.#y){let m=this.#y,y;for(;y=m?.shift();)this.#i?.(...y)}return this}pop(){try{for(;this.#c;){let e=this.#o[this.#b];if(this.#G(!0),this.#h(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#s&&this.#y){let e=this.#y,t;for(;t=e?.shift();)this.#i?.(...t)}}}#G(e){let t=this.#b,n=this.#d[t],i=this.#o[t],s=this.#h(i);s&&i.__abortController.abort(new Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#w||this.#s)&&o!==void 0&&(this.#w&&this.#n?.(o,n,"evict"),this.#s&&this.#y?.push([o,n,"evict"])),this.#N(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#d[t]=void 0,this.#o[t]=void 0,this.#A.push(t)),this.#c===1?(this.#b=this.#S=0,this.#A.length=0):this.#b=this.#g[t],this.#l.delete(n),this.#c--,t}has(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#Y(e,t);return vn.hasSubscribers&&vn.publish(n),i}#Y(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,s=this.#l.get(e);if(s!==void 0){let o=this.#o[s];if(this.#h(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#I(s))i&&(i.has="stale",this.#D(i,s));else return n&&this.#C(s),i&&(i.has="hit",this.#D(i,s)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{status:n=XC()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let i=this.#W(e,t);return vn.hasSubscribers&&vn.publish(n),i}#W(e,t){let{status:n,allowStale:i=this.allowStale}=t,s=this.#l.get(e);if(s===void 0||!i&&this.#I(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#o[s],c=this.#h(o)?o.__staleWhileFetching:o;return n&&(c!==void 0?(n.peek="hit",n.value=c):n.peek="miss"),c}#M(e,t,n,i){let s=t===void 0?void 0:this.#o[t];if(this.#h(s))return s;let o=new AbortController,{signal:c}=n;c?.addEventListener("abort",()=>o.abort(c.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:i},u=a((y,_=!1)=>{let{aborted:b}=o.signal,T=n.ignoreFetchAbort&&y!==void 0,I=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&y!==void 0);if(n.status&&(b&&!_?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,T&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),b&&!T&&!_)return d(o.signal.reason,I);let E=h,S=this.#o[t];return(S===h||S===void 0&&T&&_)&&(y===void 0?E.__staleWhileFetching!==void 0?this.#o[t]=E.__staleWhileFetching:this.#j(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#k(e,y,l.options,E))),y},"r"),f=a(y=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=y),d(y,!1)),"c"),d=a((y,_)=>{let{aborted:b}=o.signal,T=b&&n.allowStaleOnFetchAbort,I=T||n.allowStaleOnFetchRejection,E=I||n.noDeleteOnFetchRejection,S=h;if(this.#o[t]===h&&(!E||!_&&S.__staleWhileFetching===void 0?this.#j(e,"fetch"):T||(this.#o[t]=S.__staleWhileFetching)),I)return n.status&&S.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw y},"m"),p=a((y,_)=>{let b=this.#a?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(y(void 0),n.allowStaleOnFetchAbort&&(y=a(T=>u(T,!0),"f")))}),b&&b instanceof Promise?b.then(T=>y(T===void 0?void 0:T),_):b!==void 0&&y(b)},"_");n.status&&(n.status.fetchDispatched=!0);let h=new Promise(p).then(u,f),m=Object.assign(h,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.#k(e,m,{...l.options,status:void 0}),t=this.#l.get(e)):this.#o[t]=m,m}#h(e){if(!this.#R)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=_m.hasSubscribers,{status:i=XC()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#H(e,t);return i&&n&&(i.trace=!0,_m.tracePromise(()=>s,i).catch(()=>{})),s}async#H(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:y,forceRefresh:_=!1,status:b,signal:T}=t;if(b&&(b.op="fetch",b.key=e,_&&(b.forceRefresh=!0),b.cache=this),!this.#R)return b&&(b.fetch="get"),this.#z(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:b});let I={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:c,size:l,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:m,ignoreFetchAbort:h,status:b,signal:T},E=this.#l.get(e);if(E===void 0){b&&(b.fetch="miss");let S=this.#M(e,E,I,y);return S.__returned=S}else{let S=this.#o[E];if(this.#h(S)){let M=n&&S.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",M&&(b.returnedStale=!0)),M?S.__staleWhileFetching:S.__returned=S}let R=this.#I(E);if(!_&&!R)return b&&(b.fetch="hit"),this.#K(E),i&&this.#C(E),b&&this.#D(b,E),S;let D=this.#M(e,E,I,y),P=D.__staleWhileFetching!==void 0&&n;return b&&(b.fetch=R?"stale":"refresh",P&&R&&(b.returnedStale=!0)),P?D.__staleWhileFetching:D.__returned=D}}forceFetch(e,t={}){let n=_m.hasSubscribers,{status:i=XC()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#V(e,t);return i&&n&&(i.trace=!0,_m.tracePromise(()=>s,i).catch(()=>{})),s}async#V(e,t={}){let n=await this.#H(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let i=this.#J(e,t);return n&&(n.value=i),vn.hasSubscribers&&vn.publish(n),i}#J(e,t={}){let n=this.#p;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...c}=t;s&&o&&(s.forceRefresh=!0);let l=this.#z(e,c),u=o||l===void 0;if(s&&(s.memo=u?"miss":"hit",u||(s.value=l)),!u)return l;let f=n(e,l,{options:c,context:i});return s&&(s.value=f),this.#k(e,f,c),f}get(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let i=this.#z(e,t);return n&&(i!==void 0&&(n.value=i),vn.hasSubscribers&&vn.publish(n)),i}#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,c=this.#l.get(e);if(c===void 0){o&&(o.get="miss");return}let l=this.#o[c],u=this.#h(l);return o&&this.#D(o,c),this.#I(c)?u?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#j(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=u?"fetching":"hit"),this.#K(c),i&&this.#C(c),u?l.__staleWhileFetching:l)}#Q(e,t){this.#E[t]=e,this.#g[e]=t}#K(e){e!==this.#S&&(e===this.#b?this.#b=this.#g[e]:this.#Q(this.#E[e],this.#g[e]),this.#Q(this.#S,e),this.#S=e)}delete(e){return this.#j(e,"delete")}#j(e,t){vn.hasSubscribers&&vn.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#c!==0){let i=this.#l.get(e);if(i!==void 0)if(this.#_?.[i]&&(clearTimeout(this.#_[i]),this.#_[i]=void 0),n=!0,this.#c===1)this.#X(t);else{this.#N(i);let s=this.#o[i];if(this.#h(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#s)&&(this.#w&&this.#n?.(s,e,t),this.#s&&this.#y?.push([s,e,t])),this.#l.delete(e),this.#d[i]=void 0,this.#o[i]=void 0,i===this.#S)this.#S=this.#E[i];else if(i===this.#b)this.#b=this.#g[i];else{let o=this.#E[i];this.#g[o]=this.#g[i];let c=this.#g[i];this.#E[c]=this.#E[i]}this.#c--,this.#A.push(i)}}if(this.#s&&this.#y?.length){let i=this.#y,s;for(;s=i?.shift();)this.#i?.(...s)}return n}clear(){return this.#X("delete")}#X(e){for(let t of this.#F({allowStale:!0})){let n=this.#o[t];if(this.#h(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#d[t];this.#w&&this.#n?.(n,i,e),this.#s&&this.#y?.push([n,i,e])}}if(this.#l.clear(),this.#o.fill(void 0),this.#d.fill(void 0),this.#m&&this.#T){this.#m.fill(0),this.#T.fill(0);for(let t of this.#_??[])t!==void 0&&clearTimeout(t);this.#_?.fill(void 0)}if(this.#v&&this.#v.fill(0),this.#b=0,this.#S=0,this.#A.length=0,this.#f=0,this.#c=0,this.#s&&this.#y){let t=this.#y,n;for(;n=t?.shift();)this.#i?.(...n)}}}});var SS,ix,Y5,W5,Bde,Vde,Gde,Ra,Ca,Oc,hS,wm,mS,H5,gS,z5,Ms,bd,rn,Em,Sd,nn,oi,sn,JC,yS,$n,br,ZC,ex,K5,tx,Eo,rx,_S,vm,Zl,Ui,Tm,qde,Wde,Hde,zde,bS,nx,Kde,Yde,Pc,sx=je(()=>{SS=require("node:events"),ix=J(require("node:stream"),1),Y5=require("node:string_decoder"),W5=typeof process=="object"&&process?process:{stdout:null,stderr:null},Bde=a(r=>!!r&&typeof r=="object"&&(r instanceof Pc||r instanceof ix.default||Vde(r)||Gde(r)),"isStream"),Vde=a(r=>!!r&&typeof r=="object"&&r instanceof SS.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==ix.default.Writable.prototype.pipe,"isReadable"),Gde=a(r=>!!r&&typeof r=="object"&&r instanceof SS.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function","isWritable"),Ra=Symbol("EOF"),Ca=Symbol("maybeEmitEnd"),Oc=Symbol("emittedEnd"),hS=Symbol("emittingEnd"),wm=Symbol("emittedError"),mS=Symbol("closed"),H5=Symbol("read"),gS=Symbol("flush"),z5=Symbol("flushChunk"),Ms=Symbol("encoding"),bd=Symbol("decoder"),rn=Symbol("flowing"),Em=Symbol("paused"),Sd=Symbol("resume"),nn=Symbol("buffer"),oi=Symbol("pipes"),sn=Symbol("bufferLength"),JC=Symbol("bufferPush"),yS=Symbol("bufferShift"),$n=Symbol("objectMode"),br=Symbol("destroyed"),ZC=Symbol("error"),ex=Symbol("emitData"),K5=Symbol("emitEnd"),tx=Symbol("emitEnd2"),Eo=Symbol("async"),rx=Symbol("abort"),_S=Symbol("aborted"),vm=Symbol("signal"),Zl=Symbol("dataListeners"),Ui=Symbol("discarded"),Tm=a(r=>Promise.resolve().then(r),"defer"),qde=a(r=>r(),"nodefer"),Wde=a(r=>r==="end"||r==="finish"||r==="prefinish","isEndish"),Hde=a(r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,"isArrayBufferLike"),zde=a(r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),"isArrayBufferView"),bS=class{static{a(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[Sd](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},nx=class extends bS{static{a(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}},Kde=a(r=>!!r.objectMode,"isObjectModeOptions"),Yde=a(r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer","isEncodingOptions"),Pc=class extends SS.EventEmitter{static{a(this,"Minipass")}[rn]=!1;[Em]=!1;[oi]=[];[nn]=[];[$n];[Ms];[Eo];[bd];[Ra]=!1;[Oc]=!1;[hS]=!1;[mS]=!1;[wm]=null;[sn]=0;[br]=!1;[vm];[_S]=!1;[Zl]=0;[Ui]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Kde(t)?(this[$n]=!0,this[Ms]=null):Yde(t)?(this[Ms]=t.encoding,this[$n]=!1):(this[$n]=!1,this[Ms]=null),this[Eo]=!!t.async,this[bd]=this[Ms]?new Y5.StringDecoder(this[Ms]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:a(()=>this[nn],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:a(()=>this[oi],"get")});let{signal:n}=t;n&&(this[vm]=n,n.aborted?this[rx]():n.addEventListener("abort",()=>this[rx]()))}get bufferLength(){return this[sn]}get encoding(){return this[Ms]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[$n]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Eo]}set async(e){this[Eo]=this[Eo]||!!e}[rx](){this[_S]=!0,this.emit("abort",this[vm]?.reason),this.destroy(this[vm]?.reason)}get aborted(){return this[_S]}set aborted(e){}write(e,t,n){if(this[_S])return!1;if(this[Ra])throw new Error("write after end");if(this[br])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(n=t,t="utf8"),t||(t="utf8");let i=this[Eo]?Tm:qde;if(!this[$n]&&!Buffer.isBuffer(e)){if(zde(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Hde(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[$n]?(this[rn]&&this[sn]!==0&&this[gS](!0),this[rn]?this.emit("data",e):this[JC](e),this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn]):e.length?(typeof e=="string"&&!(t===this[Ms]&&!this[bd]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Ms]&&(e=this[bd].write(e)),this[rn]&&this[sn]!==0&&this[gS](!0),this[rn]?this.emit("data",e):this[JC](e),this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn]):(this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn])}read(e){if(this[br])return null;if(this[Ui]=!1,this[sn]===0||e===0||e&&e>this[sn])return this[Ca](),null;this[$n]&&(e=null),this[nn].length>1&&!this[$n]&&(this[nn]=[this[Ms]?this[nn].join(""):Buffer.concat(this[nn],this[sn])]);let t=this[H5](e||null,this[nn][0]);return this[Ca](),t}[H5](e,t){if(this[$n])this[yS]();else{let n=t;e===n.length||e===null?this[yS]():typeof n=="string"?(this[nn][0]=n.slice(e),t=n.slice(0,e),this[sn]-=e):(this[nn][0]=n.subarray(e),t=n.subarray(0,e),this[sn]-=e)}return this.emit("data",t),!this[nn].length&&!this[Ra]&&this.emit("drain"),t}end(e,t,n){return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t="utf8"),e!==void 0&&this.write(e,t),n&&this.once("end",n),this[Ra]=!0,this.writable=!1,(this[rn]||!this[Em])&&this[Ca](),this}[Sd](){this[br]||(!this[Zl]&&!this[oi].length&&(this[Ui]=!0),this[Em]=!1,this[rn]=!0,this.emit("resume"),this[nn].length?this[gS]():this[Ra]?this[Ca]():this.emit("drain"))}resume(){return this[Sd]()}pause(){this[rn]=!1,this[Em]=!0,this[Ui]=!1}get destroyed(){return this[br]}get flowing(){return this[rn]}get paused(){return this[Em]}[JC](e){this[$n]?this[sn]+=1:this[sn]+=e.length,this[nn].push(e)}[yS](){return this[$n]?this[sn]-=1:this[sn]-=this[nn][0].length,this[nn].shift()}[gS](e=!1){do;while(this[z5](this[yS]())&&this[nn].length);!e&&!this[nn].length&&!this[Ra]&&this.emit("drain")}[z5](e){return this.emit("data",e),this[rn]}pipe(e,t){if(this[br])return e;this[Ui]=!1;let n=this[Oc];return t=t||{},e===W5.stdout||e===W5.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[oi].push(t.proxyErrors?new nx(this,e,t):new bS(this,e,t)),this[Eo]?Tm(()=>this[Sd]()):this[Sd]()),e}unpipe(e){let t=this[oi].find(n=>n.dest===e);t&&(this[oi].length===1?(this[rn]&&this[Zl]===0&&(this[rn]=!1),this[oi]=[]):this[oi].splice(this[oi].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e==="data")this[Ui]=!1,this[Zl]++,!this[oi].length&&!this[rn]&&this[Sd]();else if(e==="readable"&&this[sn]!==0)super.emit("readable");else if(Wde(e)&&this[Oc])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[wm]){let i=t;this[Eo]?Tm(()=>i.call(this,this[wm])):i.call(this,this[wm])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e==="data"&&(this[Zl]=this.listeners("data").length,this[Zl]===0&&!this[Ui]&&!this[oi].length&&(this[rn]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Zl]=0,!this[Ui]&&!this[oi].length&&(this[rn]=!1)),t}get emittedEnd(){return this[Oc]}[Ca](){!this[hS]&&!this[Oc]&&!this[br]&&this[nn].length===0&&this[Ra]&&(this[hS]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[mS]&&this.emit("close"),this[hS]=!1)}emit(e,...t){let n=t[0];if(e!=="error"&&e!=="close"&&e!==br&&this[br])return!1;if(e==="data")return!this[$n]&&!n?!1:this[Eo]?(Tm(()=>this[ex](n)),!0):this[ex](n);if(e==="end")return this[K5]();if(e==="close"){if(this[mS]=!0,!this[Oc]&&!this[br])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[wm]=n,super.emit(ZC,n);let s=!this[vm]||this.listeners("error").length?super.emit("error",n):!1;return this[Ca](),s}else if(e==="resume"){let s=super.emit("resume");return this[Ca](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let i=super.emit(e,...t);return this[Ca](),i}[ex](e){for(let n of this[oi])n.dest.write(e)===!1&&this.pause();let t=this[Ui]?!1:super.emit("data",e);return this[Ca](),t}[K5](){return this[Oc]?!1:(this[Oc]=!0,this.readable=!1,this[Eo]?(Tm(()=>this[tx]()),!0):this[tx]())}[tx](){if(this[bd]){let t=this[bd].end();if(t){for(let n of this[oi])n.dest.write(t);this[Ui]||super.emit("data",t)}}for(let t of this[oi])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[$n]||(e.dataLength=0);let t=this.promise();return this.on("data",n=>{e.push(n),this[$n]||(e.dataLength+=n.length)}),await t,e}async concat(){if(this[$n])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ms]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(br,()=>t(new Error("stream destroyed"))),this.on("error",n=>t(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ui]=!1;let e=!1,t=a(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:a(()=>{if(e)return t();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Ra])return t();let s,o,c=a(d=>{this.off("data",l),this.off("end",u),this.off(br,f),t(),o(d)},"onerr"),l=a(d=>{this.off("error",c),this.off("end",u),this.off(br,f),this.pause(),s({value:d,done:!!this[Ra]})},"ondata"),u=a(()=>{this.off("error",c),this.off("data",l),this.off(br,f),t(),s({done:!0,value:void 0})},"onend"),f=a(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((d,p)=>{o=p,s=d,this.once(br,f),this.once("error",c),this.once("end",u),this.once("data",l)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ui]=!1;let e=!1,t=a(()=>(this.pause(),this.off(ZC,t),this.off(br,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),n=a(()=>{if(e)return t();let i=this.read();return i===null?t():{done:!1,value:i}},"next");return this.once("end",t),this.once(ZC,t),this.once(br,t),{next:n,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[br])return e?this.emit("error",e):this.emit(br),this;this[br]=!0,this[Ui]=!0,this[nn].length=0,this[sn]=0;let t=this;return typeof t.close=="function"&&!this[mS]&&t.close(),e?this.emit("error",e):this.emit(br),this}static get isStream(){return Bde}}});var wd,eU,To,Qde,Fc,Xde,Im,tU,rU,Jde,Zde,es,nU,iU,vo,sU,oU,eu,aU,Zi,Am,ox,Q5,Rm,js,wS,vS,X5,epe,ax,J5,Cm,Z5,ES,TS,cx,cU,Un,AS,IS,RS,Ed,vd,xm,mOe,lU,uU=je(()=>{q5();wd=require("node:path"),eU=require("node:url"),To=require("fs"),Qde=J(require("node:fs"),1),Fc=require("node:fs/promises");sx();Xde=To.realpathSync.native,Im={lstatSync:To.lstatSync,readdir:To.readdir,readdirSync:To.readdirSync,readlinkSync:To.readlinkSync,realpathSync:Xde,promises:{lstat:Fc.lstat,readdir:Fc.readdir,readlink:Fc.readlink,realpath:Fc.realpath}},tU=a(r=>!r||r===Im||r===Qde?Im:{...Im,...r,promises:{...Im.promises,...r.promises||{}}},"fsFromOption"),rU=/^\\\\\?\\([a-z]:)\\?$/i,Jde=a(r=>r.replace(/\//g,"\\").replace(rU,"$1\\"),"uncToDrive"),Zde=/[\\\/]/,es=0,nU=1,iU=2,vo=4,sU=6,oU=8,eu=10,aU=12,Zi=15,Am=~Zi,ox=16,Q5=32,Rm=64,js=128,wS=256,vS=512,X5=Rm|js|vS,epe=1023,ax=a(r=>r.isFile()?oU:r.isDirectory()?vo:r.isSymbolicLink()?eu:r.isCharacterDevice()?iU:r.isBlockDevice()?sU:r.isSocket()?aU:r.isFIFO()?nU:es,"entToType"),J5=new Sm({max:2**12}),Cm=a(r=>{let e=J5.get(r);if(e)return e;let t=r.normalize("NFKD");return J5.set(r,t),t},"normalize"),Z5=new Sm({max:2**12}),ES=a(r=>{let e=Z5.get(r);if(e)return e;let t=Cm(r.toLowerCase());return Z5.set(r,t),t},"normalizeNocase"),TS=class extends Sm{static{a(this,"ResolveCache")}constructor(){super({max:256})}},cx=class extends Sm{static{a(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:a(t=>t.length+1,"sizeCalculation")})}},cU=Symbol("PathScurry setAsCwd"),Un=class{static{a(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#t;#r;get dev(){return this.#r}#n;get mode(){return this.#n}#e;get nlink(){return this.#e}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#p;get rdev(){return this.#p}#u;get blksize(){return this.#u}#c;get ino(){return this.#c}#f;get size(){return this.#f}#l;get blocks(){return this.#l}#d;get atimeMs(){return this.#d}#o;get mtimeMs(){return this.#o}#g;get ctimeMs(){return this.#g}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#S;get mtime(){return this.#S}#A;get ctime(){return this.#A}#y;get birthtime(){return this.#y}#v;#T;#m;#_;#w;#R;#s;#x;#O;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=es,n,i,s,o,c){this.name=e,this.#v=s?ES(e):Cm(e),this.#s=t&epe,this.nocase=s,this.roots=i,this.root=n||this,this.#x=o,this.#m=c.fullpath,this.#w=c.relative,this.#R=c.relativePosix,this.parent=c.parent,this.parent?this.#t=this.parent.#t:this.#t=tU(c.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#x}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#D(i):this.#D(i)}#D(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#x.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#x.set(this,t),this.#s&=~ox,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?ES(e):Cm(e);for(let l of n)if(l.#v===i)return l;let s=this.parent?this.sep:"",o=this.#m?this.#m+s+e:void 0,c=this.newChild(e,es,{...t,parent:this,fullpath:o});return this.canReaddir()||(c.#s|=js),n.push(c),c}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#R!==void 0)return this.#R;let e=this.name,t=this.parent;if(!t)return this.#R=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#m!==void 0)return this.#m;let e=this.name,t=this.parent;if(!t)return this.#m=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#m=i}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#_=`//?/${i}`:this.#_=i}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#s&Zi)===es}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#s&Zi)===oU}isDirectory(){return(this.#s&Zi)===vo}isCharacterDevice(){return(this.#s&Zi)===iU}isBlockDevice(){return(this.#s&Zi)===sU}isFIFO(){return(this.#s&Zi)===nU}isSocket(){return(this.#s&Zi)===aU}isSymbolicLink(){return(this.#s&eu)===eu}lstatCached(){return this.#s&Q5?this:void 0}readlinkCached(){return this.#O}realpathCached(){return this.#C}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#O)return!0;if(!this.parent)return!1;let e=this.#s&Zi;return!(e!==es&&e!==eu||this.#s&wS||this.#s&js)}calledReaddir(){return!!(this.#s&ox)}isENOENT(){return!!(this.#s&js)}isNamed(e){return this.nocase?this.#v===ES(e):this.#v===Cm(e)}async readlink(){let e=this.#O;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#t.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(t);if(n)return this.#O=n}catch(t){this.#F(t.code);return}}readlinkSync(){let e=this.#O;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#t.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(t);if(n)return this.#O=n}catch(t){this.#F(t.code);return}}#$(e){this.#s|=ox;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#I()}}#I(){this.#s&js||(this.#s=(this.#s|js)&Am,this.#q())}#q(){let e=this.children();e.provisional=0;for(let t of e)t.#I()}#N(){this.#s|=vS,this.#L()}#L(){if(this.#s&Rm)return;let e=this.#s;(e&Zi)===vo&&(e&=Am),this.#s=e|Rm,this.#q()}#U(e=""){e==="ENOTDIR"||e==="EPERM"?this.#L():e==="ENOENT"?this.#I():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#L():e==="ENOENT"&&this.#I()}#F(e=""){let t=this.#s;t|=wS,e==="ENOENT"&&(t|=js),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Am),this.#s=t,e==="ENOTDIR"&&this.parent&&this.parent.#L()}#B(e,t){return this.#G(e,t)||this.#k(e,t)}#k(e,t){let n=ax(e),i=this.newChild(e.name,n,{parent:this}),s=i.#s&Zi;return s!==vo&&s!==eu&&s!==es&&(i.#s|=Rm),t.unshift(i),t.provisional++,i}#G(e,t){for(let n=t.provisional;n<t.length;n++){let i=t[n];if((this.nocase?ES(e.name):Cm(e.name))===i.#v)return this.#Y(e,i,n,t)}}#Y(e,t,n,i){let s=t.name;return t.#s=t.#s&Am|ax(e),s!==e.name&&(t.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(t)),i.provisional++,t}async lstat(){if((this.#s&js)===0)try{return this.#W(await this.#t.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#s&js)===0)try{return this.#W(this.#t.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#W(e){let{atime:t,atimeMs:n,birthtime:i,birthtimeMs:s,blksize:o,blocks:c,ctime:l,ctimeMs:u,dev:f,gid:d,ino:p,mode:h,mtime:m,mtimeMs:y,nlink:_,rdev:b,size:T,uid:I}=e;this.#b=t,this.#d=n,this.#y=i,this.#E=s,this.#u=o,this.#l=c,this.#A=l,this.#g=u,this.#r=f,this.#a=d,this.#c=p,this.#n=h,this.#S=m,this.#o=y,this.#e=_,this.#p=b,this.#f=T,this.#i=I;let E=ax(e);this.#s=this.#s&Am|E|Q5,E!==es&&E!==vo&&E!==eu&&(this.#s|=Rm)}#M=[];#h=!1;#H(e){this.#h=!1;let t=this.#M.slice();this.#M.length=0,t.forEach(n=>n(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#M.push(e),this.#h)return;this.#h=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(s,o)=>{if(s)this.#U(s.code),n.provisional=0;else{for(let c of o)this.#B(c,n);this.#$(n)}this.#H(n.slice(0,n.provisional))})}#V;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#V)await this.#V;else{let n=a(()=>{},"resolve");this.#V=new Promise(i=>n=i);try{for(let i of await this.#t.promises.readdir(t,{withFileTypes:!0}))this.#B(i,e);this.#$(e)}catch(i){this.#U(i.code),e.provisional=0}this.#V=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#t.readdirSync(t,{withFileTypes:!0}))this.#B(n,e);this.#$(e)}catch(n){this.#U(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#s&X5)return!1;let e=Zi&this.#s;return e===es||e===vo||e===eu}shouldWalk(e,t){return(this.#s&vo)===vo&&!(this.#s&X5)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#C)return this.#C;if(!((vS|wS|js)&this.#s))try{let e=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#C)return this.#C;if(!((vS|wS|js)&this.#s))try{let e=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(e)}catch{this.#N()}}[cU](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],i=this;for(;i&&i.parent;)t.add(i),i.#w=n.join(this.sep),i.#R=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!t.has(i);)i.#w=void 0,i.#R=void 0,i=i.parent}},AS=class r extends Un{static{a(this,"PathWin32")}sep="\\";splitSep=Zde;constructor(e,t=es,n,i,s,o,c){super(e,t,n,i,s,o,c)}newChild(e,t=es,n={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return wd.win32.parse(e).root}getRoot(e){if(e=Jde(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Ed(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(rU,"$1\\"),e===t}},IS=class r extends Un{static{a(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=es,n,i,s,o,c){super(e,t,n,i,s,o,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=es,n={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}},RS=class{static{a(this,"PathScurryBase")}root;rootPath;roots;cwd;#t;#r;#n;nocase;#e;constructor(e=process.cwd(),t,n,{nocase:i,childrenCacheSize:s=16*1024,fs:o=Im}={}){this.#e=tU(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,eU.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#t=new TS,this.#r=new TS,this.#n=new cx(s);let l=c.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#e),this.roots[this.rootPath]=this.root;let u=this.root,f=l.length-1,d=t.sep,p=this.rootPath,h=!1;for(let m of l){let y=f--;u=u.child(m,{relative:new Array(y).fill("..").join(d),relativePosix:new Array(y).fill("..").join("/"),fullpath:p+=(h?"":d)+m}),h=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#t.get(t);if(n!==void 0)return n;let i=this.cwd.resolve(t).fullpath();return this.#t.set(t,i),i}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#r.get(t);if(n!==void 0)return n;let i=this.cwd.resolve(t).fullpathPosix();return this.#r.set(t,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=[];(!s||s(e))&&c.push(n?e:e.fullpath());let l=new Set,u=a((d,p)=>{l.add(d),d.readdirCB((h,m)=>{if(h)return p(h);let y=m.length;if(!y)return p();let _=a(()=>{--y===0&&p()},"next");for(let b of m)(!s||s(b))&&c.push(n?b:b.fullpath()),i&&b.isSymbolicLink()?b.realpath().then(T=>T?.isUnknown()?T.lstat():T).then(T=>T?.shouldWalk(l,o)?u(T,_):_()):b.shouldWalk(l,o)?u(b,_):_()},!0)},"walk"),f=e;return new Promise((d,p)=>{u(f,h=>{if(h)return p(h);d(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=[];(!s||s(e))&&c.push(n?e:e.fullpath());let l=new Set([e]);for(let u of l){let f=u.readdirSync();for(let d of f){(!s||s(d))&&c.push(n?d:d.fullpath());let p=d;if(d.isSymbolicLink()){if(!(i&&(p=d.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield n?e:e.fullpath());let c=new Set([e]);for(let l of c){let u=l.readdirSync();for(let f of u){(!s||s(f))&&(yield n?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(c,o)&&c.add(d)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=new Pc({objectMode:!0});(!s||s(e))&&c.write(n?e:e.fullpath());let l=new Set,u=[e],f=0,d=a(()=>{let p=!1;for(;!p;){let h=u.shift();if(!h){f===0&&c.end();return}f++,l.add(h);let m=a((_,b,T=!1)=>{if(_)return c.emit("error",_);if(i&&!T){let I=[];for(let E of b)E.isSymbolicLink()&&I.push(E.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(I.length){Promise.all(I).then(()=>m(null,b,!0));return}}for(let I of b)I&&(!s||s(I))&&(c.write(n?I:I.fullpath())||(p=!0));f--;for(let I of b){let E=I.realpathCached()||I;E.shouldWalk(l,o)&&u.push(E)}p&&!c.flowing?c.once("drain",d):y||d()},"onReaddir"),y=!0;h.readdirCB(m,!0),y=!1}},"process");return d(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=new Pc({objectMode:!0}),l=new Set;(!s||s(e))&&c.write(n?e:e.fullpath());let u=[e],f=0,d=a(()=>{let p=!1;for(;!p;){let h=u.shift();if(!h){f===0&&c.end();return}f++,l.add(h);let m=h.readdirSync();for(let y of m)(!s||s(y))&&(c.write(n?y:y.fullpath())||(p=!0));f--;for(let y of m){let _=y;if(y.isSymbolicLink()){if(!(i&&(_=y.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,o)&&u.push(_)}}p&&!c.flowing&&c.once("drain",d)},"process");return d(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[cU](t)}},Ed=class extends RS{static{a(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,wd.win32,"\\",{...t,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return wd.win32.parse(e).root.toUpperCase()}newRoot(e){return new AS(this.rootPath,vo,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},vd=class extends RS{static{a(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,wd.posix,"/",{...t,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new IS(this.rootPath,vo,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},xm=class extends vd{static{a(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}},mOe=process.platform==="win32"?AS:IS,lU=process.platform==="win32"?Ed:process.platform==="darwin"?xm:vd});var tpe,rpe,Td,lx=je(()=>{Cc();tpe=a(r=>r.length>=1,"isPatternList"),rpe=a(r=>r.length>=1,"isGlobList"),Td=class r{static{a(this,"Pattern")}#t;#r;#n;length;#e;#i;#a;#p;#u;#c;#f=!0;constructor(e,t,n,i){if(!tpe(e))throw new TypeError("empty pattern list");if(!rpe(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=e,this.#r=t,this.#n=n,this.#e=i,this.#n===0){if(this.isUNC()){let[s,o,c,l,...u]=this.#t,[f,d,p,h,...m]=this.#r;u[0]===""&&(u.shift(),m.shift());let y=[s,o,c,l,""].join("/"),_=[f,d,p,h,""].join("/");this.#t=[y,...u],this.#r=[_,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#t,[c,...l]=this.#r;o[0]===""&&(o.shift(),l.shift());let u=s+"/",f=c+"/";this.#t=[u,...o],this.#r=[f,...l],this.length=this.#t.length}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===_r}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new r(this.#t,this.#r,this.#n+1,this.#e),this.#i.#c=this.#c,this.#i.#u=this.#u,this.#i.#p=this.#p,this.#i):this.#i=null}isUNC(){let e=this.#t;return this.#u!==void 0?this.#u:this.#u=this.#e==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#t;return this.#p!==void 0?this.#p:this.#p=this.#e==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#t;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#t[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var npe,Ad,ux=je(()=>{Cc();lx();npe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ad=class{static{a(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:s,platform:o=npe}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new $i(e,this.mmopts);for(let n=0;n<t.set.length;n++){let i=t.set[n],s=t.globParts[n];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let o=new Td(i,s,0,this.platform),c=new $i(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(c):this.relative.push(c),l&&(u?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),n=`${t}/`,i=e.relative()||".",s=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(t))return!0;return!1}}});var fx,dx,px,Om,fU=je(()=>{Cc();fx=class r{static{a(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new r(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),i=this.store.get(n);i?i.add(t.globString()):this.store.set(n,new Set([t.globString()]))}},dx=class{static{a(this,"MatchRecord")}store=new Map;add(e,t,n){let i=(t?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},px=class{static{a(this,"SubWalks")}store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Om=class r{static{a(this,"Processor")}hasWalkedCache;matches=new dx;subwalks=new px;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new fx}processPatterns(e,t){this.patterns=t;let n=t.map(i=>[e,i]);for(let[i,s]of n){this.hasWalkedCache.storeWalked(i,s);let o=s.root(),c=s.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let d=s.rest();if(d)s=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,f=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,f=!0;if(l=s.pattern(),u=s.rest(),f){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),c,d);continue}else if(l===_r){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let d=u?.pattern(),p=u?.rest();if(!u||(d===""||d===".")&&!p)this.matches.add(i,c,d===""||d===".");else if(d===".."){let h=i.parent||i;p?this.hasWalkedCache.hasWalked(h,p)||this.subwalks.add(h,p):this.matches.add(h,c,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),i=this.child();for(let s of t)for(let o of n){let c=o.isAbsolute(),l=o.pattern(),u=o.rest();l===_r?i.testGlobstar(s,o,u,c):l instanceof RegExp?i.testRegExp(s,l,u,c):i.testString(s,l,u,c)}return i}testGlobstar(e,t,n,i){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),i);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),i)}}testRegExp(e,t,n,i){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,t,n,i){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}}});var ipe,CS,Pm,Fm,dU=je(()=>{sx();ux();fU();ipe=a((r,e)=>typeof r=="string"?new Ad([r],e):Array.isArray(r)?new Ad(r,e):r,"makeIgnore"),CS=class{static{a(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#r;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#r=ipe(n.ignore??[],n),!this.includeChildMatches&&typeof this.#r.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#e(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#i(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#t.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#t.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#e(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#e(e))return;if(!this.includeChildMatches&&this.#r?.add){let s=`${e.relativePosix()}/**`;this.#r.add(s)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+i)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(s?o+s+i:"."+i)}}async match(e,t,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,t)}matchSync(e,t,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new Om(this.opts),n)}walkCB2(e,t,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,i));return}n.processPatterns(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||(s++,this.match(c,l,u).then(()=>o()));for(let c of n.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;s++;let l=c.readdirCached();c.calledReaddir()?this.walkCB3(c,l,n,o):c.readdirCB((u,f)=>this.walkCB3(c,f,n,o),!0)}o()}walkCB3(e,t,n,i){n=n.filterEntries(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||(s++,this.match(c,l,u).then(()=>o()));for(let[c,l]of n.subwalks.entries())s++,this.walkCB2(c,l,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new Om(this.opts),n)}walkCB2Sync(e,t,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,i));return}n.processPatterns(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||this.matchSync(c,l,u);for(let c of n.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;s++;let l=c.readdirSync();this.walkCB3Sync(c,l,n,o)}o()}walkCB3Sync(e,t,n,i){n=n.filterEntries(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||this.matchSync(c,l,u);for(let[c,l]of n.subwalks.entries())s++,this.walkCB2Sync(c,l,n.child(),o);o()}},Pm=class extends CS{static{a(this,"GlobWalker")}matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Fm=class extends CS{static{a(this,"GlobStream")}results;constructor(e,t,n){super(e,t,n),this.results=new Pc({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});var pU,spe,$s,hx=je(()=>{Cc();pU=require("node:url");uU();lx();dU();spe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",$s=class{static{a(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,pU.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||spe,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Ed:t.platform==="darwin"?xm:t.platform?vd:lU;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new $i(l,i)),[o,c]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let f=c[u];if(!f)throw new Error("invalid pattern object");return new Td(l,f,0,this.platform)})}async walk(){return[...await new Pm(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Pm(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Fm(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Fm(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}});var mx,gx=je(()=>{Cc();mx=a((r,e={})=>{Array.isArray(r)||(r=[r]);for(let t of r)if(new $i(t,e).hasMagic())return!0;return!1},"hasMagic")});function xS(r,e={}){return new $s(r,e).streamSync()}function mU(r,e={}){return new $s(r,e).stream()}function gU(r,e={}){return new $s(r,e).walkSync()}async function hU(r,e={}){return new $s(r,e).walk()}function OS(r,e={}){return new $s(r,e).iterateSync()}function yU(r,e={}){return new $s(r,e).iterate()}var ope,ape,cpe,lpe,upe,Id,yx=je(()=>{Cc();hx();gx();Cc();hx();gx();ux();a(xS,"globStreamSync");a(mU,"globStream");a(gU,"globSync");a(hU,"glob_");a(OS,"globIterateSync");a(yU,"globIterate");ope=xS,ape=Object.assign(mU,{sync:xS}),cpe=OS,lpe=Object.assign(yU,{sync:OS}),upe=Object.assign(gU,{stream:xS,iterate:OS}),Id=Object.assign(hU,{glob:hU,globSync:gU,sync:upe,globStream:mU,stream:ape,globStreamSync:xS,streamSync:ope,globIterate:yU,iterate:lpe,globIterateSync:OS,iterateSync:cpe,Glob:$s,hasMagic:mx,escape:_d,unescape:ks});Id.glob=Id});async function bU(r,e,t,n={}){let{dryRun:i=!1,excludeRelPath:s}=n,o=tu.default.join(r,"**/*.md"),c=await Id(o,{nodir:!0,ignore:[tu.default.join(r,".obsidian/**"),tu.default.join(r,".trash/**"),tu.default.join(r,"**/.obsidian/**"),tu.default.join(r,"**/.trash/**")]}),l={filesScanned:0,filesModified:0,replacements:0,modifiedFiles:[]};for(let u of c){let f=tu.default.relative(r,u);if(s&&f===s)continue;l.filesScanned+=1;let d;try{d=await _x.default.readFile(u,"utf-8")}catch{continue}let{updated:p,replacements:h}=fpe(d,e,t);h>0&&(l.filesModified+=1,l.replacements+=h,l.modifiedFiles.push(f),i||await _x.default.writeFile(u,p,"utf-8"))}return l}function fpe(r,e,t){let n=r.split(/(^```[\s\S]*?^```)/m),i=0;for(let s=0;s<n.length;s++){if(s%2===1)continue;let o=n[s],c=dpe(o,e,t);i+=c.replacements,n[s]=c.updated}return{updated:n.join(""),replacements:i}}function dpe(r,e,t){let n=r.split(/(`[^`\n]*`)/),i=0;for(let s=0;s<n.length;s++){if(s%2===1)continue;let o=ppe(n[s],e,t);i+=o.replacements,n[s]=o.updated}return{updated:n.join(""),replacements:i}}function ppe(r,e,t){let n=/(?<!!)\[\[([^\[\]\n|#^]+)((?:[#^][^\[\]\n|]*)?)(?:\|[^\[\]\n]*)?\]\]/g,i=0;return{updated:r.replace(n,(o,c,l)=>c.trim()!==e?o:(i+=1,`[[${t}${l}]]`)),replacements:i}}var _x,tu,SU=je(()=>{"use strict";_x=J(Ta()),tu=J(require("path"));yx();a(bU,"rewriteInboundWikilinks");a(fpe,"rewriteContent");a(dpe,"rewriteProseSegment");a(ppe,"replaceWikilinks")});var Fr,or,wU,hpe,$t,Bi=je(()=>{"use strict";Fr=J(Ta()),or=J(require("path"));hm();wU=J(We());SU();hpe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,$t=class{constructor(e){this.rootPath=e;this.uuidIndex=null;this.basenameIndex=null;this.aliasIndex=null}static{a(this,"FileSystemVaultAdapter")}async read(e){let t=this.resolvePath(e.path);if(!await Fr.default.pathExists(t))throw new Error(`File not found: ${e.path}`);return Fr.default.readFile(t,"utf-8")}async create(e,t){let n=this.resolvePath(e);if(await Fr.default.pathExists(n))throw new Error(`File already exists: ${e}`);return await Fr.default.ensureDir(or.default.dirname(n)),await Fr.default.writeFile(n,t,"utf-8"),this.createFileObject(e)}async modify(e,t){let n=this.resolvePath(e.path);if(!await Fr.default.pathExists(n))throw new Error(`File not found: ${e.path}`);await Fr.default.writeFile(n,t,"utf-8")}async delete(e){let t=this.resolvePath(e.path);if(!await Fr.default.pathExists(t))throw new Error(`File not found: ${e.path}`);await Fr.default.remove(t)}async exists(e){let t=this.resolvePath(e);return Fr.default.pathExists(t)}getAbstractFileByPath(e){let t=this.resolvePath(e);try{let n=Fr.default.statSync(t);if(n.isFile())return this.createFileObject(e);if(n.isDirectory())return this.createFolderObject(e)}catch{return null}return null}getAllFiles(){let e=[];return this.walkDirectory(this.rootPath,t=>{if(t.endsWith(".md")){let n=or.default.relative(this.rootPath,t);e.push(this.createFileObject(n))}}),e}getFrontmatter(e){try{let t=Fr.default.readFileSync(this.resolvePath(e.path),"utf-8");return this.extractFrontmatter(t)}catch{return null}}async updateFrontmatter(e,t){let n=await this.read(e),i=this.extractFrontmatter(n)||{},s=t(i),o=this.replaceFrontmatter(n,s);await this.modify(e,o)}async rename(e,t){let n=this.resolvePath(e.path),i=this.resolvePath(t);if(!await Fr.default.pathExists(n))throw new Error(`File not found: ${e.path}`);await Fr.default.ensureDir(or.default.dirname(i)),await Fr.default.move(n,i)}async createFolder(e){let t=this.resolvePath(e);await Fr.default.ensureDir(t)}getFirstLinkpathDest(e,t,n){let i=e.split("|")[0].trim();if(!i)return null;if(hpe.test(i)){this.uuidIndex===null&&this.buildUuidIndex();let u=i.toLowerCase(),f=this.uuidIndex.get(u);return f?this.createFileObject(f):null}let s=or.default.dirname(this.resolvePath(t)),o;if(or.default.isAbsolute(i)?o=this.resolvePath(i):o=or.default.resolve(s,i),i.endsWith(".md")||(o+=".md"),Fr.default.existsSync(o)){let u=or.default.relative(this.rootPath,o);return this.createFileObject(u)}(this.basenameIndex===null||this.aliasIndex===null)&&this.buildLinkpathIndex();let c=i.toLowerCase(),l=this.basenameIndex.get(c);if(l)return this.createFileObject(l);if(n?.allowAliasFallback!==!1){let u=this.aliasIndex.get(c);if(u)return this.createFileObject(u)}return null}buildLinkpathIndex(){this.basenameIndex=new Map,this.aliasIndex=new Map,this.walkDirectory(this.rootPath,e=>{if(!e.endsWith(".md"))return;let t=or.default.relative(this.rootPath,e),n=or.default.basename(e,".md").toLowerCase();this.basenameIndex.has(n)||this.basenameIndex.set(n,t);let i;try{i=Fr.default.readFileSync(e,"utf-8")}catch{return}let s=this.extractFrontmatter(i);if(!s)return;let o=s.aliases,c=Array.isArray(o)?o:typeof o=="string"?[o]:[];for(let l of c){if(typeof l!="string")continue;let u=l.trim().toLowerCase();u&&(this.aliasIndex.has(u)||this.aliasIndex.set(u,t))}})}buildUuidIndex(){this.uuidIndex=new Map,this.walkDirectory(this.rootPath,e=>{if(e.endsWith(".md")){let n=or.default.basename(e,".md").match(/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i);if(n){let i=n[1].toLowerCase(),s=or.default.relative(this.rootPath,e);this.uuidIndex.set(i,s)}}})}async process(e,t){let n=await this.read(e),i=t(n);return await this.modify(e,i),i}getDefaultNewFileParent(){return{path:"",name:""}}async updateLinks(e,t,n){let i=or.default.basename(t,".md");await bU(this.rootPath,n,i,{excludeRelPath:e})}resolvePath(e){if(or.default.isAbsolute(e))return e;let t=this.rootPath.replace(/[/\\]+$/,""),n=or.default.sep+e;return n===t||n.startsWith(t+or.default.sep)?n:or.default.join(this.rootPath,e)}createFileObject(e){let t=or.default.basename(e),n=or.default.basename(e,or.default.extname(e)),i=or.default.dirname(e);return{path:e,basename:n,name:t,parent:i!=="."?this.createFolderObject(i):null}}createFolderObject(e){return{path:e,name:or.default.basename(e)}}extractFrontmatter(e){let t=/^---\n([\s\S]*?)\n---/,n=e.match(t);return n?(0,wU.parseYamlFrontmatterTolerant)(n[1]):null}replaceFrontmatter(e,t){let n=yd(t,{lineWidth:-1,noRefs:!0,quoteStyle:"double"}),i=/^---\n([\s\S]*?)\n---/;return e.match(i)?e.replace(i,`---
402
+ `)}return n}function yd(r,e={}){let t={...Ofe,...e},n=Que(r,t.schema,{noRefs:t.noRefs,skipInvalid:t.skipInvalid});return t.flowLevel>=0&&Jue(n,(i,s)=>{if(!(s.depth<t.flowLevel))return i.style.flow=!0,u5}),t.transform(n),xfe(n,{..._C(t,Object.keys(UC)),schema:t.schema})}var yt,rle,nle,ile,sle,ole,ale,cle,lle,ule,fle,dle,ple,hle,mle,gle,yle,_le,K9,wle,Ele,Ale,Ile,gC,xle,Ole,Y9,Dle,Lle,Mle,jle,$le,yC,Vle,Gle,Hle,zle,Kle,Qle,Xle,Jle,Zle,eue,tue,cS,DC,pxe,Xl,LC,sue,hxe,mxe,oue,Ic,hr,En,Rc,ji,cue,J9,Z9,gue,ld,yue,kC,wt,i5,pd,bC,s5,iS,vue,Tue,o5,SC,a5,Aue,Iue,Rue,MC,Hue,eS,Wl,Xue,u5,jC,Zue,Ql,f5,efe,tfe,d5,vC,rfe,nfe,p5,ife,TC,$C,um,sfe,ofe,h5,afe,AC,IC,cfe,RC,lfe,CC,jn,UC,dm,lm,BC,VC,Ac,Ofe,gxe,yxe,_xe,bxe,Sxe,wxe,Exe,vxe,Txe,Axe,Ixe,Rxe,Cxe,xxe,Oxe,Pxe,hm=je(()=>{yt=Symbol("NOT_RESOLVED");a(Mn,"defineScalarTag");a(FC,"defineSequenceTag");a(oS,"defineMappingTag");rle=Mn("tag:yaml.org,2002:str",{resolve:a(r=>r,"resolve"),identify:a(r=>typeof r=="string","identify")}),nle=["","~","null","Null","NULL"],ile=Mn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:a(r=>nle.indexOf(r)!==-1?null:yt,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),sle=Mn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:a((r,e)=>r==="null"||e&&r===""?null:yt,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),ole=["","~","null","Null","NULL"],ale=Mn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:a(r=>ole.indexOf(r)!==-1?null:yt,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),cle=["true","True","TRUE"],lle=["false","False","FALSE"],ule=Mn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:a(r=>cle.indexOf(r)!==-1?!0:lle.indexOf(r)!==-1?!1:yt,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),fle=["true"],dle=["false"],ple=Mn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:a(r=>fle.indexOf(r)!==-1?!0:dle.indexOf(r)!==-1?!1:yt,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),hle=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],mle=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],gle=Mn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:a(r=>hle.indexOf(r)!==-1?!0:mle.indexOf(r)!==-1?!1:yt,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),yle=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),_le=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");a(ble,"parseYamlInteger$2");a(Sle,"resolveYamlInteger$2");K9=Mn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Sle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),wle=new RegExp("^-?(?:0|[1-9][0-9]*)$"),Ele=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");a(vle,"parseYamlInteger$1");a(Tle,"resolveYamlInteger$1");Ale=Mn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Tle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),Ile=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");a(Rle,"parseYamlInteger");a(Cle,"resolveYamlInteger");gC=Mn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Cle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),xle=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ole=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(Ple,"resolveYamlFloat$2");a(Fle,"representYamlFloat$2");Y9=Mn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Ple,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:Fle}),Dle=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Lle=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(Nle,"resolveYamlFloat$1");a(kle,"representYamlFloat$1");Mle=Mn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Nle,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:kle}),jle=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),$le=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(Ule,"resolveYamlFloat");a(Ble,"representYamlFloat");yC=Mn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Ule,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:Ble}),Vle=Mn("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:a((r,e)=>r==="<<"||e&&r===""?"<<":yt,"resolve"),identify:a(()=>!1,"identify")}),Gle=/^[A-Za-z0-9+/]*={0,2}$/;a(qle,"resolveYamlBinary");a(Wle,"representYamlBinary");Hle=Mn("tag:yaml.org,2002:binary",{resolve:qle,identify:a(r=>Object.prototype.toString.call(r)==="[object Uint8Array]","identify"),represent:Wle}),zle=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kle=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");a(O9,"makeUtcDate");a(Yle,"resolveYamlTimestamp");Qle=Mn("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:Yle,identify:a(r=>r instanceof Date,"identify"),represent:a(r=>r.toISOString(),"represent")}),Xle=FC("tag:yaml.org,2002:seq",{create:a(()=>[],"create"),addItem:a((r,e)=>{r.push(e)},"addItem"),identify:Array.isArray});a(aS,"isPlainObject");a(_C,"pick");Jle=FC("tag:yaml.org,2002:omap",{create:a(()=>({list:[],seen:new Set}),"create"),addItem:a((r,e)=>{let t;if(e instanceof Map){if(e.size!==1)return"cannot resolve an ordered map item";t=e.keys().next().value}else if(aS(e)){let n=Object.keys(e);if(n.length!==1)return"cannot resolve an ordered map item";t=n[0]}else return"cannot resolve an ordered map item";return r.seen.has(t)?"duplicate key in ordered map":(r.seen.add(t),r.list.push(e),"")},"addItem"),finalize:a(r=>r.list,"finalize"),identify:a(()=>!1,"identify")}),Zle=FC("tag:yaml.org,2002:pairs",{create:a(()=>[],"create"),addItem:a((r,e)=>{if(e instanceof Map)return e.size!==1?"cannot resolve a pairs item":(r.push(e.entries().next().value),"");if(Object.prototype.toString.call(e)!=="[object Object]")return"cannot resolve a pairs item";let t=e,n=Object.keys(t);return n.length!==1?"cannot resolve a pairs item":(r.push([n[0],t[n[0]]]),"")},"addItem"),identify:a(()=>!1,"identify")}),eue=oS("tag:yaml.org,2002:map",{create:a(()=>({}),"create"),identify:aS,represent:a(r=>{let e=new Map;for(let t of Object.keys(r))e.set(t,r[t]);return e},"represent"),addPair:a((r,e,t)=>{if(e!==null&&typeof e=="object")return"object-based map does not support complex keys";let n=String(e);return n==="__proto__"?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,""},"addPair"),has:a((r,e)=>e!==null&&typeof e=="object"?!1:Object.prototype.hasOwnProperty.call(r,String(e)),"has"),keys:a(r=>Object.keys(r),"keys"),get:a((r,e)=>{let t=String(e);return Object.prototype.hasOwnProperty.call(r,t)?r[t]:null},"get")}),tue=oS("tag:yaml.org,2002:set",{create:a(()=>new Set,"create"),identify:a(r=>r instanceof Set,"identify"),represent:a(r=>{let e=new Map;for(let t of r)e.set(t,null);return e},"represent"),addPair:a((r,e,t)=>t!==null?"cannot resolve a set item":(r.add(e),""),"addPair"),has:a((r,e)=>r.has(e),"has"),keys:a(r=>r.keys(),"keys"),get:a(()=>null,"get")});a(rue,"createTagDefinitionMap");a(nue,"createTagDefinitionListMap");a(iue,"compileTags");cS=class Q9{static{a(this,"Schema")}tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(e){let t=iue(e),n=[],i=rue(),s=nue();for(let f of t){if(f.nodeKind==="scalar"&&f.implicit){if(f.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");n.push(f)}switch(f.nodeKind){case"scalar":f.matchByTagPrefix?s.scalar.push(f):i.scalar[f.tagName]=f;break;case"sequence":f.matchByTagPrefix?s.sequence.push(f):i.sequence[f.tagName]=f;break;case"mapping":f.matchByTagPrefix?s.mapping.push(f):i.mapping[f.tagName]=f;break}}let o=n.filter(f=>f.implicitFirstChars===null),c=new Set;for(let f of n)if(f.implicitFirstChars!==null)for(let d of f.implicitFirstChars)c.add(d);let l=new Map;for(let f of c)l.set(f,n.filter(d=>d.implicitFirstChars===null||d.implicitFirstChars.indexOf(f)!==-1));let u=i.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=t,this.implicitScalarTags=n,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=o,this.defaultScalarTag=u,this.defaultSequenceTag=i.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=i.mapping["tag:yaml.org,2002:map"],this.exact=i,this.prefix=s}lookupScalarTag(e){let t=this.exact.scalar[e];if(t)return t;for(let n of this.prefix.scalar)if(e.startsWith(n.tagName))return n}lookupSequenceTag(e){let t=this.exact.sequence[e];if(t)return t;for(let n of this.prefix.sequence)if(e.startsWith(n.tagName))return n}lookupMappingTag(e){let t=this.exact.mapping[e];if(t)return t;for(let n of this.prefix.mapping)if(e.startsWith(n.tagName))return n}resolveImplicitScalarTag(e){let t=this.implicitScalarByFirstChar.get(e.charAt(0))??this.implicitScalarAnyFirstChar;for(let i of t){let s=i.resolve(e,!1,i.tagName);if(s!==yt)return{value:s,tag:i}}let n=this.defaultScalarTag;return{value:n.resolve(e,!1,n.tagName),tag:n}}withTags(...e){let t=[];for(let n of e)t=t.concat(n);return new Q9([...this.tags,...t])}},DC=new cS([rle,Xle,eue]),pxe=new cS([...DC.tags,sle,ple,Ale,Mle]),Xl=new cS([...DC.tags,ile,ule,K9,Y9]),LC=new cS([...DC.tags,ale,gle,gC,yC,Qle,Vle,Hle,Jle,Zle,tue]),sue=LC.withTags({...gC,resolve:a((r,e,t)=>{let n=gC.resolve(r,e,t);return n===yt?K9.resolve(r,e,t):n},"resolve")},{...yC,resolve:a((r,e,t)=>{let n=yC.resolve(r,e,t);return n===yt?Y9.resolve(r,e,t):n},"resolve")}),hxe=oS("tag:yaml.org,2002:map",{create:a(()=>new Map,"create"),addPair:a((r,e,t)=>(r.set(e,t),""),"addPair"),has:a((r,e)=>r.has(e),"has"),keys:a(r=>r.keys(),"keys"),get:a((r,e)=>r.get(e),"get"),identify:a(r=>r instanceof Map||aS(r),"identify"),represent:a(r=>{if(r instanceof Map)return r;let e=new Map,t=r;for(let n of Object.keys(t))e.set(n,t[n]);return e},"represent")});a(P9,"normalizeKey");mxe=oS("tag:yaml.org,2002:map",{create:a(()=>({}),"create"),identify:aS,represent:a(r=>{let e=new Map;for(let t of Object.keys(r))e.set(t,r[t]);return e},"represent"),addPair:a((r,e,t)=>{let n=P9(e);return n===null?"nested arrays are not supported inside keys":(n==="__proto__"?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,"")},"addPair"),has:a((r,e)=>{let t=P9(e);return t!==null&&Object.prototype.hasOwnProperty.call(r,t)},"has"),keys:a(r=>Object.keys(r),"keys"),get:a((r,e)=>{let t=String(e);return Object.prototype.hasOwnProperty.call(r,t)?r[t]:null},"get")}),oue={maxLength:79,indent:1,linesBefore:3,linesAfter:2};a(uC,"getLine");a(fC,"padStart");a(aue,"makeSnippet");a(F9,"formatError");Ic=class X9 extends Error{static{a(this,"YAMLException")}reason;mark;constructor(e,t){super(),this.name="YAMLException",this.reason=e,this.mark=t,this.message=F9(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${F9(this,e)}`}static throwAt(e,t,n,i=""){let s=0,o=0;for(let l=0;l<t;l++){let u=e.charCodeAt(l);u===10?(s++,o=l+1):u===13&&(s++,e.charCodeAt(l+1)===10&&l++,o=l+1)}let c={name:i,buffer:e,position:t,line:s,column:t-o};throw c.snippet=aue(c),new X9(n,c)}},hr={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},En={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},Rc={BLOCK:1,FLOW:2},ji={CLIP:1,STRIP:2,KEEP:3},cue=-1;a(D9,"simpleEscapeSequence");J9=new Array(256),Z9=new Array(256);for(let r=0;r<256;r++)J9[r]=D9(r)?1:0,Z9[r]=D9(r);a(lue,"charFromCodepoint");a(uue,"fromHexCode$1");a(fue,"escapedHexLen$1");a(nS,"skipFoldedBreaks");a(NC,"foldedBreaks");a(due,"getPlainValue");a(pue,"getSingleQuotedValue");a(hue,"getDoubleQuotedValue");a(L9,"getBlockValue");a(mue,"getScalarValue");gue=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});a(dC,"tagPercentEncode");a(e5,"tagNameFull");a(t5,"tagNameShort");ld=-1,yue="tag:yaml.org,2002:merge",kC={filename:"",schema:Xl,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};a(_ue,"eventPosition$1");a(kn,"throwError$1");a(r5,"finalizeCollection");a(bue,"constructScalar");a(N9,"collectionTagName");a(n5,"isMappingTag");a(k9,"mergeKeys");a(Sue,"mergeSource");a(wue,"addMappingValue");a(pC,"addValue");a(hC,"storeAnchor");a(Eue,"constructFromEvents");wt=-1,i5=Object.prototype.hasOwnProperty,pd=1,bC=2,s5=3,iS=4,vue=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Tue=/[,\[\]{}]/,o5=/^(?:!|!!|![0-9A-Za-z-]+!)$/,SC=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,a5=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,Aue=new RegExp(`^(?:${SC})*$`),Iue=new RegExp(`^(?:${a5})+$`),Rue=new RegExp(`^(?:!(?:${SC})*|${a5}(?:${SC})*)$`),MC={filename:"",maxDepth:100};a(Cue,"addDocumentEvent");a(c5,"addSequenceEvent");a(wC,"addMappingEvent");a(M9,"insertFlowPairMappingEvent");a(md,"addScalarEvent");a(xue,"addAliasEvent");a(ud,"addPopEvent");a(ni,"addEmptyScalarEvent");a(j9,"emptyProperties");a(cm,"snapshotState");a(fd,"restoreState");a(De,"throwError");a(tn,"isEol");a(Kl,"isWhiteSpace");a(Ns,"isWsOrEol");a(Aa,"isWsOrEolOrEnd");a(Yl,"isFlowIndicator");a(Oue,"fromDecimalCode");a(Pue,"fromHexCode");a(Fue,"escapedHexLen");a(Due,"isSimpleEscape");a(sS,"consumeLineBreak");a(ii,"skipSeparationSpace");a(Hl,"testDocumentSeparator");a($9,"skipUntilLineEnd");a(l5,"checkPrintable");a(Lue,"readTagProperty");a(Nue,"readAnchorProperty");a(kue,"readAlias");a(EC,"readFlowScalarBreak");a(Mue,"readSingleQuotedScalar");a(jue,"readDoubleQuotedScalar");a($ue,"readBlockScalar");a(Uue,"canStartPlainScalar");a(Bue,"readPlainScalar");a(om,"skipFlowSeparationSpace");a(Vue,"readFlowCollection");a(U9,"readBlockSequence");a(mC,"readBlockMapping");a(zl,"parseNode");a(Gue,"readDirective");a(que,"readDocument");a(Wue,"parseEvents");Hue={...MC,...kC};a(zue,"loadDocuments");a(gd,"load");eS=class{static{a(this,"Style")}tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},Wl=Symbol("INVALID");a(Kue,"buildRepresentTypes");a(Yue,"matchTag");a(am,"build");a(Que,"jsToAst");Xue=Symbol("visit:break"),u5=Symbol("visit:skip");a(rS,"visitNode");a(Jue,"visit");jC=65279,Zue=9,Ql=10,f5=13,efe=32,tfe=33,d5=34,vC=35,rfe=37,nfe=38,p5=39,ife=42,TC=44,$C=45,um=58,sfe=61,ofe=62,h5=63,afe=64,AC=91,IC=93,cfe=96,RC=123,lfe=124,CC=125,jn={};jn[0]="\\0";jn[7]="\\a";jn[8]="\\b";jn[9]="\\t";jn[10]="\\n";jn[11]="\\v";jn[12]="\\f";jn[13]="\\r";jn[27]="\\e";jn[34]='\\"';jn[92]="\\\\";jn[133]="\\N";jn[160]="\\_";jn[8232]="\\L";jn[8233]="\\P";UC={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};a(ufe,"nodeTagShort");a(ffe,"createPresenterState");a(dfe,"encodeNonPrintable");a(B9,"indentString");a(xC,"generateNextLine");a(pfe,"scalarLayout");a(hd,"isWhitespace");a(hfe,"startsWithDocumentSeparator");a(fm,"isPrintable");a(V9,"isNsCharOrWhitespace");a(OC,"isPlainSafe");a(mfe,"isPlainSafeFirst");a(gfe,"isPlainSafeAtStart");a(yfe,"isPlainSafeLast");a(dd,"codePointAt");a(m5,"needIndentIndicator");dm=1,lm=2,BC=3,VC=4,Ac=5;a(_fe,"chooseScalarStyle");a(bfe,"renderScalarStyle");a(Sfe,"resolveScalarStyle");a(G9,"blockHeader");a(q9,"encodeFlowBreaks");a(W9,"dropEndingNewline");a(pm,"isMoreIndented");a(wfe,"foldBlockScalar");a(H9,"foldLine");a(Efe,"escapeString");a(vfe,"writeFlowSequence");a(z9,"writeBlockSequence");a(Tfe,"writeFlowMapping");a(tS,"sortKeyValue");a(g5,"sortMappingItems");a(Afe,"writeBlockMapping");a(PC,"cannotBeCompact");a(Ia,"writeNode");a(Ife,"rootStartsOwnLine");a(Rfe,"isOpenEnded");a(Cfe,"writeDocumentDirectives");a(xfe,"present");Ofe={...UC,schema:sue,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:a(()=>{},"transform")};a(yd,"dump");gxe=hr.DOCUMENT,yxe=hr.SEQUENCE,_xe=hr.MAPPING,bxe=hr.SCALAR,Sxe=hr.ALIAS,wxe=hr.POP,Exe=En.PLAIN,vxe=En.SINGLE_QUOTED,Txe=En.DOUBLE_QUOTED,Axe=En.LITERAL_BLOCK,Ixe=En.FOLDED_BLOCK,Rxe=Rc.BLOCK,Cxe=Rc.FLOW,xxe=ji.CLIP,Oxe=ji.STRIP,Pxe=ji.KEEP});var GC,y5,Pfe,_5=je(()=>{GC=a((r,e,t)=>{let n=r instanceof RegExp?y5(r,t):r,i=e instanceof RegExp?y5(e,t):e,s=n!==null&&i!=null&&Pfe(n,i,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+n.length,s[1]),post:t.slice(s[1]+i.length)}},"balanced"),y5=a((r,e)=>{let t=e.match(r);return t?t[0]:null},"maybeMatch"),Pfe=a((r,e,t)=>{let n,i,s,o,c,l=t.indexOf(r),u=t.indexOf(e,l+1),f=l;if(l>=0&&u>0){if(r===e)return[l,u];for(n=[],s=t.length;f>=0&&!c;){if(f===l)n.push(f),l=t.indexOf(r,f+1);else if(n.length===1){let d=n.pop();d!==void 0&&(c=[d,u])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=u),u=t.indexOf(e,f+1);f=l<u&&l>=0?l:u}n.length&&o!==void 0&&(c=[s,o])}return c},"range")});function qC(r){return isNaN(r)?r.charCodeAt(0):parseInt(r,10)}function qfe(r){return r.replace(Mfe,b5).replace(jfe,S5).replace($fe,HC).replace(Ufe,w5).replace(Bfe,E5)}function Wfe(r){return r.replace(Ffe,"\\").replace(Dfe,"{").replace(Lfe,"}").replace(Nfe,",").replace(kfe,".")}function v5(r){if(!r)return[""];let e=[],t=GC("{","}",r);if(!t)return r.split(",");let{pre:n,body:i,post:s}=t,o=n.split(",");o[o.length-1]+="{"+i+"}";let c=v5(s);return s.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),e.push.apply(e,o),e}function T5(r,e={}){if(!r)return[];let{max:t=Vfe,maxLength:n=Gfe}=e;return r.slice(0,2)==="{}"&&(r="\\{\\}"+r.slice(2)),WC(qfe(r),t,n,!0).map(Wfe)}function Hfe(r){return"{"+r+"}"}function zfe(r){return/^-?0\d/.test(r)}function Kfe(r,e){return r<=e}function Yfe(r,e){return r>=e}function mm(r,e,t,n,i,s){let o=[],c=0;for(let l=0;l<r.length;l++)for(let u=0;u<t.length;u++){if(o.length>=n)return o;let f=r[l]+e+t[u];if(!(s&&!f)){if(c+f.length>i)return o;o.push(f),c+=f.length}}return o}function Qfe(r,e,t,n){let i=r.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=qC(i[0]),c=qC(i[1]),l=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(qC(i[2])),1):1,f=Kfe;c<o&&(u*=-1,f=Yfe);let p=i.some(zfe),h=0;for(let m=o;f(m,c)&&s.length<t;m+=u){let y;if(e)y=String.fromCharCode(m),y==="\\"&&(y="");else if(y=String(m),p){let _=l-y.length;if(_>0){let b=new Array(_+1).join("0");m<0?y="-"+b+y.slice(1):y=b+y}}if(h+y.length>n)break;s.push(y),h+=y.length}return s}function WC(r,e,t,n){let i=[""],s=!1,o=!0;for(;;){let c=GC("{","}",r);if(!c)return mm(i,r,[""],e,t,s);let l=c.pre;if(/\$$/.test(l)){if(i=mm(i,l+"{"+c.body+"}",[""],e,t,s&&!c.post.length),o=!1,!c.post.length)break;r=c.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body),d=u||f,p=c.body.indexOf(",")>=0;if(!d&&!p){if(c.post.match(/,(?!,).*\}/)){r=c.pre+"{"+c.body+HC+c.post,n=!0;continue}return mm(i,l+"{"+c.body+"}"+c.post,[""],e,t,s)}o&&(s=n&&!d,o=!1);let h;if(d)h=Qfe(c.body,f,e,t);else{let m=v5(c.body);if(m.length===1&&m[0]!==void 0&&(m=WC(m[0],e,t,!1).map(Hfe),m.length===1)){if(i=mm(i,l+m[0],[""],e,t,s&&!c.post.length),!c.post.length)break;r=c.post;continue}let y=s&&!c.post.length&&!l;for(let b=0;y&&b<i.length;b++)i[b]&&(y=!1);h=[];let _=0;e:for(let b=0;b<m.length;b++){let T=WC(m[b],e,t,!1);for(let I=0;I<T.length;I++){let E=T[I];if(!(y&&!E)){if(h.length>=e||_+E.length>t)break e;h.push(E),_+=E.length}}}}if(i=mm(i,l,h,e,t,s&&!c.post.length),!c.post.length)break;r=c.post}return i}var b5,S5,HC,w5,E5,Ffe,Dfe,Lfe,Nfe,kfe,Mfe,jfe,$fe,Ufe,Bfe,Vfe,Gfe,A5=je(()=>{_5();b5="\0SLASH"+Math.random()+"\0",S5="\0OPEN"+Math.random()+"\0",HC="\0CLOSE"+Math.random()+"\0",w5="\0COMMA"+Math.random()+"\0",E5="\0PERIOD"+Math.random()+"\0",Ffe=new RegExp(b5,"g"),Dfe=new RegExp(S5,"g"),Lfe=new RegExp(HC,"g"),Nfe=new RegExp(w5,"g"),kfe=new RegExp(E5,"g"),Mfe=/\\\\/g,jfe=/\\{/g,$fe=/\\}/g,Ufe=/\\,/g,Bfe=/\\\./g,Vfe=1e5,Gfe=4e6;a(qC,"numeric");a(qfe,"escapeBraces");a(Wfe,"unescapeBraces");a(v5,"parseCommaParts");a(T5,"expand");a(Hfe,"embrace");a(zfe,"isPadded");a(Kfe,"lte");a(Yfe,"gte");a(mm,"combine");a(Qfe,"expandSequence");a(WC,"expand_")});var gm,I5=je(()=>{gm=a(r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern")});var Xfe,ym,Jfe,R5,C5,x5=je(()=>{Xfe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ym=a(r=>r.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Jfe=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),R5=a(r=>r.join(""),"rangesToString"),C5=a((r,e)=>{let t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=t+1,o=!1,c=!1,l=!1,u=!1,f=t,d="";e:for(;s<r.length;){let y=r.charAt(s);if((y==="!"||y==="^")&&s===t+1){u=!0,s++;continue}if(y==="]"&&o&&!l){f=s+1;break}if(o=!0,y==="\\"&&!l){l=!0,s++;continue}if(y==="["&&!l){for(let[_,[b,T,I]]of Object.entries(Xfe))if(r.startsWith(_,s)){if(d)return["$.",!1,r.length-t,!0];s+=_.length,I?i.push(b):n.push(b),c=c||T;continue e}}if(l=!1,d){y>d?n.push(ym(d)+"-"+ym(y)):y===d&&n.push(ym(y)),d="",s++;continue}if(r.startsWith("-]",s+1)){n.push(ym(y+"-")),s+=2;continue}if(r.startsWith("-",s+1)){d=y,s+=2;continue}n.push(ym(y)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,r.length-t,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let y=n[0].length===2?n[0].slice(-1):n[0];return[Jfe(y),!1,f-t,!1]}let p="["+(u?"^":"")+R5(n)+"]",h="["+(u?"":"^")+R5(i)+"]";return[n.length&&i.length?"("+p+"|"+h+")":n.length?p:h,c,f-t,!0]},"parseClass")});var ks,uS=je(()=>{ks=a((r,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?r.replace(/\[([^/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?r.replace(/\[([^/\\{}])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape")});var Ri,Zfe,zC,O5,ede,tde,rde,P5,nde,fS,ide,sde,ode,ade,KC,F5,D5,cde,Jl,YC=je(()=>{x5();uS();Zfe=new Set(["!","?","+","*","@"]),zC=a(r=>Zfe.has(r),"isExtglobType"),O5=a(r=>zC(r.type),"isExtglobAST"),ede=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),tde=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),rde=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),P5=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),nde="(?!(?:^|/)\\.\\.?(?:$|/))",fS="(?!\\.)",ide=new Set(["[","."]),sde=new Set(["..","."]),ode=new Set("().*{}+?[]^$\\!"),ade=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),KC="[^/]",F5=KC+"*?",D5=KC+"+?",cde=0,Jl=class{static{a(this,"AST")}type;#t;#r;#n=!1;#e=[];#i;#a;#p;#u=!1;#c;#f;#l=!1;id=++cde;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#t.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,t,n={}){this.type=e,e&&(this.#r=!0),this.#i=t,this.#t=this.#i?this.#i.#t:this,this.#c=this.#t===this?n:this.#t.#c,this.#p=this.#t===this?[]:this.#t.#p,e==="!"&&!this.#t.#u&&this.#p.push(this),this.#a=this.#i?this.#i.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#f=this.#e.map(e=>String(e)).join("")}#d(){if(this!==this.#t)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let e;for(;e=this.#p.pop();){if(e.type!=="!")continue;let t=e,n=t.#i;for(;n;){for(let i=t.#a+1;!n.type&&i<n.#e.length;i++)for(let s of e.#e){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#e[i])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof Ri&&t.#i===this))throw new Error("invalid part: "+t);this.#e.push(t)}}toJSON(){let e=this.type===null?this.#e.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#u&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#e[t];if(!(n instanceof Ri&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#e.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new Ri(this.type,e);for(let n of this.#e)t.copyIn(n);return t}static#o(e,t,n,i,s){let o=i.maxExtglobRecursion??2,c=!1,l=!1,u=-1,f=!1;if(t.type===null){let y=n,_="";for(;y<e.length;){let b=e.charAt(y++);if(c||b==="\\"){c=!c,_+=b;continue}if(l){y===u+1?(b==="^"||b==="!")&&(f=!0):b==="]"&&!(y===u+2&&f)&&(l=!1),_+=b;continue}else if(b==="["){l=!0,u=y,f=!1,_+=b;continue}if(!i.noext&&zC(b)&&e.charAt(y)==="("&&s<=o){t.push(_),_="";let I=new Ri(b,t);y=Ri.#o(e,I,y,i,s+1),t.push(I);continue}_+=b}return t.push(_),y}let d=n+1,p=new Ri(null,t),h=[],m="";for(;d<e.length;){let y=e.charAt(d++);if(c||y==="\\"){c=!c,m+=y;continue}if(l){d===u+1?(y==="^"||y==="!")&&(f=!0):y==="]"&&!(d===u+2&&f)&&(l=!1),m+=y;continue}else if(y==="["){l=!0,u=d,f=!1,m+=y;continue}if(!i.noext&&zC(y)&&e.charAt(d)==="("&&(s<=o||t&&t.#b(y))){let b=t&&t.#b(y)?0:1;p.push(m),m="";let T=new Ri(y,p);p.push(T),d=Ri.#o(e,T,d,i,s+b);continue}if(y==="|"){p.push(m),m="",h.push(p),p=new Ri(null,t);continue}if(y===")")return m===""&&t.#e.length===0&&(t.#l=!0),p.push(m),m="",t.push(...h,p),d;m+=y}return t.type=null,t.#r=void 0,t.#e=[e.substring(n-1)],d}#g(e){return this.#E(e,tde)}#E(e,t=ede){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#b(n.type,t)}#b(e,t=rde){return!!t.get(this.type)?.includes(e)}#S(e,t){let n=e.#e[0],i=new Ri(null,n,this.options);i.#e.push(""),n.push(i),this.#A(e,t)}#A(e,t){let n=e.#e[0];this.#e.splice(t,1,...n.#e);for(let i of n.#e)typeof i=="object"&&(i.#i=this);this.#f=void 0}#y(e){return!!P5.get(this.type)?.has(e)}#v(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let t=e.#e[0];return!t||typeof t!="object"||t.type===null?!1:this.#y(t.type)}#T(e){let t=P5.get(this.type),n=e.#e[0],i=t?.get(n.type);if(!i)return!1;this.#e=n.#e;for(let s of this.#e)typeof s=="object"&&(s.#i=this);this.type=i,this.#f=void 0,this.#l=!1}static fromGlob(e,t={}){let n=new Ri(null,void 0,t);return Ri.#o(e,n,0,t,0),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[t,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let c=(this.#c.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#t===this&&(this.#m(),this.#d()),!O5(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(h=>typeof h!="string"),u=this.#e.map(h=>{let[m,y,_,b]=typeof h=="string"?Ri.#w(h,this.#r,l):h.toRegExpSource(e);return this.#r=this.#r||_,this.#n=this.#n||b,m}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&sde.has(this.#e[0]))){let m=ide,y=t&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),_=!t&&!e&&m.has(u.charAt(0));f=y?nde:_?fS:""}let d="";return this.isEnd()&&this.#t.#u&&this.#i?.type==="!"&&(d="(?:$|\\/)"),[f+u+d,ks(u),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),u=this;return u.#e=[l],u.type=null,u.#r=void 0,[l,ks(this.toString()),!1,!1]}let o=!n||e||t||!fS?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!t?fS:"")+D5;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?fS:"")+F5+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=i+s+l}return[c,ks(s),this.#r=!!this.#r,this.#n]}#m(){if(O5(this)){let e=0,t=!1;do{t=!0;for(let n=0;n<this.#e.length;n++){let i=this.#e[n];typeof i=="object"&&(i.#m(),this.#E(i)?(t=!1,this.#A(i,n)):this.#g(i)?(t=!1,this.#S(i,n)):this.#v(i)&&(t=!1,this.#T(i)))}}while(!t&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#m();this.#f=void 0}#_(e){return this.#e.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=t.toRegExpSource(e);return this.#n=this.#n||o,n}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#w(e,t,n=!1){let i=!1,s="",o=!1,c=!1;for(let l=0;l<e.length;l++){let u=e.charAt(l);if(i){i=!1,s+=(ode.has(u)?"\\":"")+u;continue}if(u==="*"){if(c)continue;c=!0,s+=n&&/^[*]+$/.test(e)?D5:F5,t=!0;continue}else c=!1;if(u==="\\"){l===e.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[f,d,p,h]=C5(e,l);if(p){s+=f,o=o||d,l+=p-1,t=t||h;continue}}if(u==="?"){s+=KC,t=!0;continue}s+=ade(u)}return[s,ks(e),!!t,o]}};Ri=Jl});var _d,QC=je(()=>{_d=a((r,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?r.replace(/[?*()[\]{}]/g,"[$&]"):r.replace(/[?*()[\]\\{}]/g,"\\$&"):e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&"),"escape")});var si,lde,ude,fde,dde,pde,hde,mde,gde,yde,_de,bde,Sde,wde,Ede,vde,Tde,Ade,Ide,k5,M5,j5,L5,Rde,_r,Cde,xde,Ode,Pde,Fde,Ji,Dde,$5,Lde,Nde,N5,kde,$i,Cc=je(()=>{A5();I5();YC();QC();uS();YC();QC();uS();si=a((r,e,t={})=>(gm(e),!t.nocomment&&e.charAt(0)==="#"?!1:new $i(e,t).match(r)),"minimatch"),lde=/^\*+([^+@!?*[(]*)$/,ude=a(r=>e=>!e.startsWith(".")&&e.endsWith(r),"starDotExtTest"),fde=a(r=>e=>e.endsWith(r),"starDotExtTestDot"),dde=a(r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),"starDotExtTestNocase"),pde=a(r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),"starDotExtTestNocaseDot"),hde=/^\*+\.\*+$/,mde=a(r=>!r.startsWith(".")&&r.includes("."),"starDotStarTest"),gde=a(r=>r!=="."&&r!==".."&&r.includes("."),"starDotStarTestDot"),yde=/^\.\*+$/,_de=a(r=>r!=="."&&r!==".."&&r.startsWith("."),"dotStarTest"),bde=/^\*+$/,Sde=a(r=>r.length!==0&&!r.startsWith("."),"starTest"),wde=a(r=>r.length!==0&&r!=="."&&r!=="..","starTestDot"),Ede=/^\?+([^+@!?*[(]*)?$/,vde=a(([r,e=""])=>{let t=k5([r]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),Tde=a(([r,e=""])=>{let t=M5([r]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),Ade=a(([r,e=""])=>{let t=M5([r]);return e?n=>t(n)&&n.endsWith(e):t},"qmarksTestDot"),Ide=a(([r,e=""])=>{let t=k5([r]);return e?n=>t(n)&&n.endsWith(e):t},"qmarksTest"),k5=a(([r])=>{let e=r.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),M5=a(([r])=>{let e=r.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),j5=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",L5={win32:{sep:"\\"},posix:{sep:"/"}},Rde=j5==="win32"?L5.win32.sep:L5.posix.sep;si.sep=Rde;_r=Symbol("globstar **");si.GLOBSTAR=_r;Cde="[^/]",xde=Cde+"*?",Ode="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Pde="(?:(?!(?:\\/|^)\\.).)*?",Fde=a((r,e={})=>t=>si(t,r,e),"filter");si.filter=Fde;Ji=a((r,e={})=>Object.assign({},r,e),"ext"),Dde=a(r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return si;let e=si;return Object.assign(a((n,i,s={})=>e(n,i,Ji(r,s)),"m"),{Minimatch:class extends e.Minimatch{static{a(this,"Minimatch")}constructor(i,s={}){super(i,Ji(r,s))}static defaults(i){return e.defaults(Ji(r,i)).Minimatch}},AST:class extends e.AST{static{a(this,"AST")}constructor(i,s,o={}){super(i,s,Ji(r,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,Ji(r,s))}},unescape:a((n,i={})=>e.unescape(n,Ji(r,i)),"unescape"),escape:a((n,i={})=>e.escape(n,Ji(r,i)),"escape"),filter:a((n,i={})=>e.filter(n,Ji(r,i)),"filter"),defaults:a(n=>e.defaults(Ji(r,n)),"defaults"),makeRe:a((n,i={})=>e.makeRe(n,Ji(r,i)),"makeRe"),braceExpand:a((n,i={})=>e.braceExpand(n,Ji(r,i)),"braceExpand"),match:a((n,i,s={})=>e.match(n,i,Ji(r,s)),"match"),sep:e.sep,GLOBSTAR:_r})},"defaults");si.defaults=Dde;$5=a((r,e={})=>(gm(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:T5(r,{max:e.braceExpandMax})),"braceExpand");si.braceExpand=$5;Lde=a((r,e={})=>new $i(r,e).makeRe(),"makeRe");si.makeRe=Lde;Nde=a((r,e,t={})=>{let n=new $i(e,t);return r=r.filter(i=>n.match(i)),n.options.nonull&&!r.length&&r.push(e),r},"match");si.match=Nde;N5=/[?*]|[+@!]\(.*?\)|\[|\]/,kde=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),$i=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){gm(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||j5,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!N5.test(s[2]))&&!N5.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(u)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let i=n;for(;t[i+1]==="**";)i++;i!==n&&t.splice(n,i-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let s=e[i];i===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let c=n[i+1],l=n[i+2],u=n[i+3];if(c!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;t=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let c=n[o];o===1&&c===""&&n[0]===""||(c==="."||c==="")&&(t=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(t=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let i=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(i){e[t]=[],e[n]=i;break}}return e.filter(t=>t.length)}partsMatch(e,t,n=!1){let i=0,s=0,o=[],c="";for(;i<e.length&&s<t.length;)if(e[i]===t[s])o.push(c==="b"?t[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&t[s]===e[i+1])o.push(e[i]),i++;else if(n&&t[s]==="**"&&e[i]===t[s+1])o.push(t[s]),s++;else if(e[i]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(c==="b")return!1;c="a",o.push(e[i]),i++,s++}else if(t[s]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(c==="a")return!1;c="b",o.push(t[s]),i++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let i=0,s=0;if(this.isWindows){let c=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!c&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),d=l?3:c?0:void 0,p=f?3:u?0:void 0;if(typeof d=="number"&&typeof p=="number"){let[h,m]=[e[d],t[p]];h.toLowerCase()===m.toLowerCase()&&(t[p]=h,s=p,i=d)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(_r)?this.#t(e,t,n,i,s):this.#n(e,t,n,i,s)}#t(e,t,n,i,s){let o=t.indexOf(_r,s),c=t.lastIndexOf(_r),[l,u,f]=n?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,c),t.slice(c+1)];if(l.length){let T=e.slice(i,i+l.length);if(!this.#n(T,l,n,0,0))return!1;i+=l.length,s+=l.length}let d=0;if(f.length){if(f.length+i>e.length)return!1;let T=e.length-f.length;if(this.#n(e,f,n,T,0))d=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(T--,!this.#n(e,f,n,T,0)))return!1;d=f.length+1}}if(!u.length){let T=!!d;for(let I=i;I<e.length-d;I++){let E=String(e[I]);if(T=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return n||T}let p=[[[],0]],h=p[0],m=0,y=[0];for(let T of u)T===_r?(y.push(m),h=[[],0],p.push(h)):(h[0].push(T),m++);let _=p.length-1,b=e.length-d;for(let T of p)T[1]=b-(y[_--]+T[0].length);return!!this.#r(e,p,i,0,n,0,!!d)}#r(e,t,n,i,s,o,c){let l=t[i];if(!l){for(let d=n;d<e.length;d++){c=!0;let p=e[d];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[u,f]=l;for(;n<=f;){if(this.#n(e.slice(0,n+u.length),u,s,n,0)&&o<this.maxGlobstarRecursion){let h=this.#r(e,t,n+u.length,i+1,s,o+1,c);if(h!==!1)return h}let p=e[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return s||null}#n(e,t,n,i,s){let o,c,l,u;for(o=i,c=s,u=e.length,l=t.length;o<u&&c<l;o++,c++){this.debug("matchOne loop");let f=t[c],d=e[o];if(this.debug(t,f,d),f===!1||f===_r)return!1;let p;if(typeof f=="string"?(p=d===f,this.debug("string match",f,d,p)):(p=f.test(d),this.debug("pattern match",f,d,p)),!p)return!1}if(o===u&&c===l)return!0;if(o===u)return n;if(c===l)return o===u-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return $5(this.pattern,this.options)}parse(e){gm(e);let t=this.options;if(e==="**")return _r;if(e==="")return"";let n,i=null;(n=e.match(bde))?i=t.dot?wde:Sde:(n=e.match(lde))?i=(t.nocase?t.dot?pde:dde:t.dot?fde:ude)(n[1]):(n=e.match(Ede))?i=(t.nocase?t.dot?Tde:vde:t.dot?Ade:Ide)(n):(n=e.match(hde))?i=t.dot?gde:mde:(n=e.match(yde))&&(i=_de);let s=Jl.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?xde:t.dot?Ode:Pde,i=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(d=>{if(d instanceof RegExp)for(let p of d.flags.split(""))i.add(p);return typeof d=="string"?kde(d):d===_r?_r:d._src});u.forEach((d,p)=>{let h=u[p+1],m=u[p-1];d!==_r||m===_r||(m===void 0?h!==void 0&&h!==_r?u[p+1]="(?:\\/|"+n+"\\/)?"+h:u[p]=n:h===void 0?u[p-1]=m+"(?:\\/|\\/"+n+")?":h!==_r&&(u[p-1]=m+"(?:\\/|\\/"+n+"\\/)"+h,u[p+1]=_r))});let f=u.filter(d=>d!==_r);if(this.partial&&f.length>=1){let d=[];for(let p=1;p<=f.length;p++)d.push(f.slice(0,p).join("/"));return"(?:"+d.join("|")+")"}return f.join("/")}).join("|"),[o,c]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+c+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+c+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let c=i.length-2;!o&&c>=0;c--)o=i[c];for(let c of s){let l=i;if(n.matchBase&&c.length===1&&(l=[o]),this.matchOne(l,c,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return si.defaults(e).Minimatch}};si.AST=Jl;si.Minimatch=$i;si.escape=_d;si.unescape=ks});var pS,vn,_m,Mde,XC,B5,U5,jde,$de,xc,V5,dS,Ude,Sm,q5=je(()=>{pS=require("node:diagnostics_channel"),vn=(0,pS.channel)("lru-cache:metrics"),_m=(0,pS.tracingChannel)("lru-cache"),Mde=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,XC=a(()=>vn.hasSubscribers||_m.hasSubscribers,"R"),B5=new Set,U5=typeof process=="object"&&process?process:{},jde=a((r,e,t,n)=>{typeof U5.emitWarning=="function"?U5.emitWarning(r,e,t,n):console.error(`[${t}] ${e}: ${r}`)},"k"),$de=a(r=>!B5.has(r),"H"),xc=a(r=>!!r&&r===Math.floor(r)&&r>0&&isFinite(r),"T"),V5=a(r=>xc(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?dS:null:null,"j"),dS=class extends Array{static{a(this,"O")}constructor(r){super(r),this.fill(0)}},Ude=class bm{static{a(this,"d")}heap;length;static#t=!1;static create(e){let t=V5(e);if(!t)return[];bm.#t=!0;let n=new bm(e,t);return bm.#t=!1,n}constructor(e,t){if(!bm.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Sm=class G5{static{a(this,"d")}#t;#r;#n;#e;#i;#a;#p;#u;get perf(){return this.#u}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#c;#f;#l;#d;#o;#g;#E;#b;#S;#A;#y;#v;#T;#m;#_;#w;#R;#s;#x;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#m,autopurgeTimers:e.#_,sizes:e.#v,keyMap:e.#l,keyList:e.#d,valList:e.#o,next:e.#g,prev:e.#E,get head(){return e.#b},get tail(){return e.#S},free:e.#A,isBackgroundFetch:a(t=>e.#h(t),"isBackgroundFetch"),backgroundFetch:a((t,n,i,s)=>e.#M(t,n,i,s),"backgroundFetch"),moveToTail:a(t=>e.#K(t),"moveToTail"),indexes:a(t=>e.#P(t),"indexes"),rindexes:a(t=>e.#F(t),"rindexes"),isStale:a(t=>e.#I(t),"isStale")}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#p}get dispose(){return this.#n}get onInsert(){return this.#e}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:l,dispose:u,onInsert:f,disposeAfter:d,noDisposeOnSet:p,noUpdateTTL:h,maxSize:m=0,maxEntrySize:y=0,sizeCalculation:_,fetchMethod:b,memoMethod:T,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:R,ignoreFetchAbort:D,backgroundFetchSize:P=1,perf:M}=e;if(this.backgroundFetchSize=P,M!==void 0&&typeof M?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#u=M??Mde,t!==0&&!xc(t))throw new TypeError("max option must be a nonnegative integer");let O=t?V5(t):Array;if(!O)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=m,this.maxEntrySize=y||this.#r,this.sizeCalculation=_,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#p=T,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=b,this.#R=!!b,this.#l=new Map,this.#d=Array.from({length:t}).fill(void 0),this.#o=Array.from({length:t}).fill(void 0),this.#g=new O(t),this.#E=new O(t),this.#b=0,this.#S=0,this.#A=Ude.create(t),this.#c=0,this.#f=0,typeof u=="function"&&(this.#n=u),typeof f=="function"&&(this.#e=f),typeof d=="function"?(this.#i=d,this.#y=[]):(this.#i=void 0,this.#y=void 0),this.#w=!!this.#n,this.#x=!!this.#e,this.#s=!!this.#i,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!R,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.#r!==0&&!xc(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!xc(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#q()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=xc(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!xc(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#O()}if(this.#t===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let L="LRU_CACHE_UNBOUNDED";$de(L)&&(B5.add(L),jde("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,G5))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#O(){let e=new dS(this.#t),t=new dS(this.#t);this.#m=e,this.#T=t;let n=this.ttlAutopurge?Array.from({length:this.#t}):void 0;this.#_=n,this.#$=(l,u,f=this.#u.now())=>{t[l]=u!==0?f:0,e[l]=u,i(l,u)},this.#C=l=>{t[l]=e[l]!==0?this.#u.now():0,i(l,e[l])};let i=this.ttlAutopurge?(l,u)=>{if(n?.[l]&&(clearTimeout(n[l]),n[l]=void 0),u&&u!==0&&n){let f=setTimeout(()=>{this.#I(l)?(this.#j(this.#d[l],"expire"),n[l]=void 0):i(l,c(l))},u+1);f.unref&&f.unref(),n[l]=f}}:()=>{};this.#D=(l,u)=>{if(e[u]){let f=e[u],d=t[u];if(!f||!d)return;l.ttl=f,l.start=d,l.now=s||o();let p=l.now-d;l.remainingTTL=f-p}};let s=0,o=a(()=>{let l=this.#u.now();if(this.ttlResolution>0){s=l;let u=setTimeout(()=>s=0,this.ttlResolution);u.unref&&u.unref()}return l},"o");this.getRemainingTTL=l=>{let u=this.#l.get(l);return u===void 0?0:c(u)};let c=a(l=>{let u=e[l],f=t[l];if(!u||!f)return 1/0;let d=(s||o())-f;return u-d},"l");this.#I=l=>{let u=t[l],f=e[l];return!!f&&!!u&&(s||o())-u>f}}#C=a(()=>{},"#R");#D=a(()=>{},"#v");#$=a(()=>{},"#H");#I=a(()=>!1,"#p");#q(){let e=new dS(this.#t);this.#f=0,this.#v=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#U=(t,n,i,s)=>{if(!xc(i)){if(this.#h(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,t),!xc(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#L=(t,n,i)=>{if(e[t]=n,this.#r){let s=this.#r-e[t];for(;this.#f>s;)this.#G(!0)}this.#f+=e[t],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#N=a(e=>{},"#x");#L=a((e,t,n)=>{},"#j");#U=a((e,t,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#N");*#P({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#S;this.#B(t)&&((e||!this.#I(t))&&(yield t),t!==this.#b);)t=this.#E[t]}*#F({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#b;this.#B(t)&&((e||!this.#I(t))&&(yield t),t!==this.#S);)t=this.#g[t]}#B(e){return e!==void 0&&this.#l.get(this.#d[e])===e}*entries(){for(let e of this.#P())this.#o[e]!==void 0&&this.#d[e]!==void 0&&!this.#h(this.#o[e])&&(yield[this.#d[e],this.#o[e]])}*rentries(){for(let e of this.#F())this.#o[e]!==void 0&&this.#d[e]!==void 0&&!this.#h(this.#o[e])&&(yield[this.#d[e],this.#o[e]])}*keys(){for(let e of this.#P()){let t=this.#d[e];t!==void 0&&!this.#h(this.#o[e])&&(yield t)}}*rkeys(){for(let e of this.#F()){let t=this.#d[e];t!==void 0&&!this.#h(this.#o[e])&&(yield t)}}*values(){for(let e of this.#P())this.#o[e]!==void 0&&!this.#h(this.#o[e])&&(yield this.#o[e])}*rvalues(){for(let e of this.#F())this.#o[e]!==void 0&&!this.#h(this.#o[e])&&(yield this.#o[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#P()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.#d[n],this))return this.#z(this.#d[n],t)}}forEach(e,t=this){for(let n of this.#P()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#d[n],this)}}rforEach(e,t=this){for(let n of this.#F()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#d[n],this)}}purgeStale(){let e=!1;for(let t of this.#F({allowStale:!0}))this.#I(t)&&(this.#j(this.#d[t],"expire"),e=!0);return e}info(e){let t=this.#l.get(e);if(t===void 0)return;let n=this.#o[t],i=this.#h(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#m&&this.#T){let o=this.#m[t],c=this.#T[t];if(o&&c){let l=o-(this.#u.now()-c);s.ttl=l,s.start=Date.now()}}return this.#v&&(s.size=this.#v[t]),s}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let n=this.#d[t],i=this.#o[t],s=this.#h(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#m&&this.#T){o.ttl=this.#m[t];let c=this.#u.now()-this.#T[t];o.start=Math.floor(Date.now()-c)}this.#v&&(o.size=this.#v[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let i=Date.now()-n.start;n.start=this.#u.now()-i}this.#k(t,n.value,n)}}set(e,t,n={}){let{status:i=vn.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=e,t!==void 0&&(i.value=t),i.cache=this);let s=this.#k(e,t,n);return i&&vn.hasSubscribers&&vn.publish(i),s}#k(e,t,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,f=this.#h(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:d=this.noUpdateTTL}=n;u&&!f&&(u.value=t);let p=this.#U(e,t,n.size||0,l,u);if(this.maxEntrySize&&p>this.maxEntrySize)return this.#j(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let h=this.#c===0?void 0:this.#l.get(e);if(h===void 0)h=this.#c===0?this.#S:this.#A.length!==0?this.#A.pop():this.#c===this.#t?this.#G(!1):this.#c,this.#d[h]=e,this.#o[h]=t,this.#l.set(e,h),this.#g[this.#S]=h,this.#E[h]=this.#S,this.#S=h,this.#c++,this.#L(h,p,u),u&&(u.set="add"),d=!1,this.#x&&!f&&this.#e?.(t,e,"add");else{this.#K(h);let m=this.#o[h];if(t!==m){if(!c)if(this.#h(m)){m!==i&&m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=m;y!==void 0&&y!==t&&(this.#w&&this.#n?.(y,e,"set"),this.#s&&this.#y?.push([y,e,"set"]))}else this.#w&&this.#n?.(m,e,"set"),this.#s&&this.#y?.push([m,e,"set"]);if(this.#N(h),this.#L(h,p,u),this.#o[h]=t,!f){let y=m&&this.#h(m)?m.__staleWhileFetching:m,_=y===void 0?"add":t!==y?"replace":"update";u&&(u.set=_,y!==void 0&&(u.oldValue=y)),this.#x&&this.onInsert?.(t,e,_)}}else f||(u&&(u.set="update"),this.#x&&this.onInsert?.(t,e,"update"))}if(s!==0&&!this.#m&&this.#O(),this.#m&&(d||this.#$(h,s,o),u&&this.#D(u,h)),!c&&this.#s&&this.#y){let m=this.#y,y;for(;y=m?.shift();)this.#i?.(...y)}return this}pop(){try{for(;this.#c;){let e=this.#o[this.#b];if(this.#G(!0),this.#h(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#s&&this.#y){let e=this.#y,t;for(;t=e?.shift();)this.#i?.(...t)}}}#G(e){let t=this.#b,n=this.#d[t],i=this.#o[t],s=this.#h(i);s&&i.__abortController.abort(new Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#w||this.#s)&&o!==void 0&&(this.#w&&this.#n?.(o,n,"evict"),this.#s&&this.#y?.push([o,n,"evict"])),this.#N(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#d[t]=void 0,this.#o[t]=void 0,this.#A.push(t)),this.#c===1?(this.#b=this.#S=0,this.#A.length=0):this.#b=this.#g[t],this.#l.delete(n),this.#c--,t}has(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#Y(e,t);return vn.hasSubscribers&&vn.publish(n),i}#Y(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,s=this.#l.get(e);if(s!==void 0){let o=this.#o[s];if(this.#h(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#I(s))i&&(i.has="stale",this.#D(i,s));else return n&&this.#C(s),i&&(i.has="hit",this.#D(i,s)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{status:n=XC()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let i=this.#W(e,t);return vn.hasSubscribers&&vn.publish(n),i}#W(e,t){let{status:n,allowStale:i=this.allowStale}=t,s=this.#l.get(e);if(s===void 0||!i&&this.#I(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#o[s],c=this.#h(o)?o.__staleWhileFetching:o;return n&&(c!==void 0?(n.peek="hit",n.value=c):n.peek="miss"),c}#M(e,t,n,i){let s=t===void 0?void 0:this.#o[t];if(this.#h(s))return s;let o=new AbortController,{signal:c}=n;c?.addEventListener("abort",()=>o.abort(c.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:i},u=a((y,_=!1)=>{let{aborted:b}=o.signal,T=n.ignoreFetchAbort&&y!==void 0,I=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&y!==void 0);if(n.status&&(b&&!_?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,T&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),b&&!T&&!_)return d(o.signal.reason,I);let E=h,S=this.#o[t];return(S===h||S===void 0&&T&&_)&&(y===void 0?E.__staleWhileFetching!==void 0?this.#o[t]=E.__staleWhileFetching:this.#j(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#k(e,y,l.options,E))),y},"r"),f=a(y=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=y),d(y,!1)),"c"),d=a((y,_)=>{let{aborted:b}=o.signal,T=b&&n.allowStaleOnFetchAbort,I=T||n.allowStaleOnFetchRejection,E=I||n.noDeleteOnFetchRejection,S=h;if(this.#o[t]===h&&(!E||!_&&S.__staleWhileFetching===void 0?this.#j(e,"fetch"):T||(this.#o[t]=S.__staleWhileFetching)),I)return n.status&&S.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw y},"m"),p=a((y,_)=>{let b=this.#a?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(y(void 0),n.allowStaleOnFetchAbort&&(y=a(T=>u(T,!0),"f")))}),b&&b instanceof Promise?b.then(T=>y(T===void 0?void 0:T),_):b!==void 0&&y(b)},"_");n.status&&(n.status.fetchDispatched=!0);let h=new Promise(p).then(u,f),m=Object.assign(h,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.#k(e,m,{...l.options,status:void 0}),t=this.#l.get(e)):this.#o[t]=m,m}#h(e){if(!this.#R)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=_m.hasSubscribers,{status:i=XC()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#H(e,t);return i&&n&&(i.trace=!0,_m.tracePromise(()=>s,i).catch(()=>{})),s}async#H(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:y,forceRefresh:_=!1,status:b,signal:T}=t;if(b&&(b.op="fetch",b.key=e,_&&(b.forceRefresh=!0),b.cache=this),!this.#R)return b&&(b.fetch="get"),this.#z(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:b});let I={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:c,size:l,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:m,ignoreFetchAbort:h,status:b,signal:T},E=this.#l.get(e);if(E===void 0){b&&(b.fetch="miss");let S=this.#M(e,E,I,y);return S.__returned=S}else{let S=this.#o[E];if(this.#h(S)){let M=n&&S.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",M&&(b.returnedStale=!0)),M?S.__staleWhileFetching:S.__returned=S}let R=this.#I(E);if(!_&&!R)return b&&(b.fetch="hit"),this.#K(E),i&&this.#C(E),b&&this.#D(b,E),S;let D=this.#M(e,E,I,y),P=D.__staleWhileFetching!==void 0&&n;return b&&(b.fetch=R?"stale":"refresh",P&&R&&(b.returnedStale=!0)),P?D.__staleWhileFetching:D.__returned=D}}forceFetch(e,t={}){let n=_m.hasSubscribers,{status:i=XC()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#V(e,t);return i&&n&&(i.trace=!0,_m.tracePromise(()=>s,i).catch(()=>{})),s}async#V(e,t={}){let n=await this.#H(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let i=this.#J(e,t);return n&&(n.value=i),vn.hasSubscribers&&vn.publish(n),i}#J(e,t={}){let n=this.#p;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...c}=t;s&&o&&(s.forceRefresh=!0);let l=this.#z(e,c),u=o||l===void 0;if(s&&(s.memo=u?"miss":"hit",u||(s.value=l)),!u)return l;let f=n(e,l,{options:c,context:i});return s&&(s.value=f),this.#k(e,f,c),f}get(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let i=this.#z(e,t);return n&&(i!==void 0&&(n.value=i),vn.hasSubscribers&&vn.publish(n)),i}#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,c=this.#l.get(e);if(c===void 0){o&&(o.get="miss");return}let l=this.#o[c],u=this.#h(l);return o&&this.#D(o,c),this.#I(c)?u?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#j(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=u?"fetching":"hit"),this.#K(c),i&&this.#C(c),u?l.__staleWhileFetching:l)}#Q(e,t){this.#E[t]=e,this.#g[e]=t}#K(e){e!==this.#S&&(e===this.#b?this.#b=this.#g[e]:this.#Q(this.#E[e],this.#g[e]),this.#Q(this.#S,e),this.#S=e)}delete(e){return this.#j(e,"delete")}#j(e,t){vn.hasSubscribers&&vn.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#c!==0){let i=this.#l.get(e);if(i!==void 0)if(this.#_?.[i]&&(clearTimeout(this.#_[i]),this.#_[i]=void 0),n=!0,this.#c===1)this.#X(t);else{this.#N(i);let s=this.#o[i];if(this.#h(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#s)&&(this.#w&&this.#n?.(s,e,t),this.#s&&this.#y?.push([s,e,t])),this.#l.delete(e),this.#d[i]=void 0,this.#o[i]=void 0,i===this.#S)this.#S=this.#E[i];else if(i===this.#b)this.#b=this.#g[i];else{let o=this.#E[i];this.#g[o]=this.#g[i];let c=this.#g[i];this.#E[c]=this.#E[i]}this.#c--,this.#A.push(i)}}if(this.#s&&this.#y?.length){let i=this.#y,s;for(;s=i?.shift();)this.#i?.(...s)}return n}clear(){return this.#X("delete")}#X(e){for(let t of this.#F({allowStale:!0})){let n=this.#o[t];if(this.#h(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#d[t];this.#w&&this.#n?.(n,i,e),this.#s&&this.#y?.push([n,i,e])}}if(this.#l.clear(),this.#o.fill(void 0),this.#d.fill(void 0),this.#m&&this.#T){this.#m.fill(0),this.#T.fill(0);for(let t of this.#_??[])t!==void 0&&clearTimeout(t);this.#_?.fill(void 0)}if(this.#v&&this.#v.fill(0),this.#b=0,this.#S=0,this.#A.length=0,this.#f=0,this.#c=0,this.#s&&this.#y){let t=this.#y,n;for(;n=t?.shift();)this.#i?.(...n)}}}});var SS,ix,Y5,W5,Bde,Vde,Gde,Ra,Ca,Oc,hS,wm,mS,H5,gS,z5,Ms,bd,rn,Em,Sd,nn,oi,sn,JC,yS,$n,br,ZC,ex,K5,tx,Eo,rx,_S,vm,Zl,Ui,Tm,qde,Wde,Hde,zde,bS,nx,Kde,Yde,Pc,sx=je(()=>{SS=require("node:events"),ix=J(require("node:stream"),1),Y5=require("node:string_decoder"),W5=typeof process=="object"&&process?process:{stdout:null,stderr:null},Bde=a(r=>!!r&&typeof r=="object"&&(r instanceof Pc||r instanceof ix.default||Vde(r)||Gde(r)),"isStream"),Vde=a(r=>!!r&&typeof r=="object"&&r instanceof SS.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==ix.default.Writable.prototype.pipe,"isReadable"),Gde=a(r=>!!r&&typeof r=="object"&&r instanceof SS.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function","isWritable"),Ra=Symbol("EOF"),Ca=Symbol("maybeEmitEnd"),Oc=Symbol("emittedEnd"),hS=Symbol("emittingEnd"),wm=Symbol("emittedError"),mS=Symbol("closed"),H5=Symbol("read"),gS=Symbol("flush"),z5=Symbol("flushChunk"),Ms=Symbol("encoding"),bd=Symbol("decoder"),rn=Symbol("flowing"),Em=Symbol("paused"),Sd=Symbol("resume"),nn=Symbol("buffer"),oi=Symbol("pipes"),sn=Symbol("bufferLength"),JC=Symbol("bufferPush"),yS=Symbol("bufferShift"),$n=Symbol("objectMode"),br=Symbol("destroyed"),ZC=Symbol("error"),ex=Symbol("emitData"),K5=Symbol("emitEnd"),tx=Symbol("emitEnd2"),Eo=Symbol("async"),rx=Symbol("abort"),_S=Symbol("aborted"),vm=Symbol("signal"),Zl=Symbol("dataListeners"),Ui=Symbol("discarded"),Tm=a(r=>Promise.resolve().then(r),"defer"),qde=a(r=>r(),"nodefer"),Wde=a(r=>r==="end"||r==="finish"||r==="prefinish","isEndish"),Hde=a(r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,"isArrayBufferLike"),zde=a(r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),"isArrayBufferView"),bS=class{static{a(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[Sd](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},nx=class extends bS{static{a(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}},Kde=a(r=>!!r.objectMode,"isObjectModeOptions"),Yde=a(r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer","isEncodingOptions"),Pc=class extends SS.EventEmitter{static{a(this,"Minipass")}[rn]=!1;[Em]=!1;[oi]=[];[nn]=[];[$n];[Ms];[Eo];[bd];[Ra]=!1;[Oc]=!1;[hS]=!1;[mS]=!1;[wm]=null;[sn]=0;[br]=!1;[vm];[_S]=!1;[Zl]=0;[Ui]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Kde(t)?(this[$n]=!0,this[Ms]=null):Yde(t)?(this[Ms]=t.encoding,this[$n]=!1):(this[$n]=!1,this[Ms]=null),this[Eo]=!!t.async,this[bd]=this[Ms]?new Y5.StringDecoder(this[Ms]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:a(()=>this[nn],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:a(()=>this[oi],"get")});let{signal:n}=t;n&&(this[vm]=n,n.aborted?this[rx]():n.addEventListener("abort",()=>this[rx]()))}get bufferLength(){return this[sn]}get encoding(){return this[Ms]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[$n]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Eo]}set async(e){this[Eo]=this[Eo]||!!e}[rx](){this[_S]=!0,this.emit("abort",this[vm]?.reason),this.destroy(this[vm]?.reason)}get aborted(){return this[_S]}set aborted(e){}write(e,t,n){if(this[_S])return!1;if(this[Ra])throw new Error("write after end");if(this[br])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(n=t,t="utf8"),t||(t="utf8");let i=this[Eo]?Tm:qde;if(!this[$n]&&!Buffer.isBuffer(e)){if(zde(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Hde(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[$n]?(this[rn]&&this[sn]!==0&&this[gS](!0),this[rn]?this.emit("data",e):this[JC](e),this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn]):e.length?(typeof e=="string"&&!(t===this[Ms]&&!this[bd]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Ms]&&(e=this[bd].write(e)),this[rn]&&this[sn]!==0&&this[gS](!0),this[rn]?this.emit("data",e):this[JC](e),this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn]):(this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn])}read(e){if(this[br])return null;if(this[Ui]=!1,this[sn]===0||e===0||e&&e>this[sn])return this[Ca](),null;this[$n]&&(e=null),this[nn].length>1&&!this[$n]&&(this[nn]=[this[Ms]?this[nn].join(""):Buffer.concat(this[nn],this[sn])]);let t=this[H5](e||null,this[nn][0]);return this[Ca](),t}[H5](e,t){if(this[$n])this[yS]();else{let n=t;e===n.length||e===null?this[yS]():typeof n=="string"?(this[nn][0]=n.slice(e),t=n.slice(0,e),this[sn]-=e):(this[nn][0]=n.subarray(e),t=n.subarray(0,e),this[sn]-=e)}return this.emit("data",t),!this[nn].length&&!this[Ra]&&this.emit("drain"),t}end(e,t,n){return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t="utf8"),e!==void 0&&this.write(e,t),n&&this.once("end",n),this[Ra]=!0,this.writable=!1,(this[rn]||!this[Em])&&this[Ca](),this}[Sd](){this[br]||(!this[Zl]&&!this[oi].length&&(this[Ui]=!0),this[Em]=!1,this[rn]=!0,this.emit("resume"),this[nn].length?this[gS]():this[Ra]?this[Ca]():this.emit("drain"))}resume(){return this[Sd]()}pause(){this[rn]=!1,this[Em]=!0,this[Ui]=!1}get destroyed(){return this[br]}get flowing(){return this[rn]}get paused(){return this[Em]}[JC](e){this[$n]?this[sn]+=1:this[sn]+=e.length,this[nn].push(e)}[yS](){return this[$n]?this[sn]-=1:this[sn]-=this[nn][0].length,this[nn].shift()}[gS](e=!1){do;while(this[z5](this[yS]())&&this[nn].length);!e&&!this[nn].length&&!this[Ra]&&this.emit("drain")}[z5](e){return this.emit("data",e),this[rn]}pipe(e,t){if(this[br])return e;this[Ui]=!1;let n=this[Oc];return t=t||{},e===W5.stdout||e===W5.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[oi].push(t.proxyErrors?new nx(this,e,t):new bS(this,e,t)),this[Eo]?Tm(()=>this[Sd]()):this[Sd]()),e}unpipe(e){let t=this[oi].find(n=>n.dest===e);t&&(this[oi].length===1?(this[rn]&&this[Zl]===0&&(this[rn]=!1),this[oi]=[]):this[oi].splice(this[oi].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e==="data")this[Ui]=!1,this[Zl]++,!this[oi].length&&!this[rn]&&this[Sd]();else if(e==="readable"&&this[sn]!==0)super.emit("readable");else if(Wde(e)&&this[Oc])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[wm]){let i=t;this[Eo]?Tm(()=>i.call(this,this[wm])):i.call(this,this[wm])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e==="data"&&(this[Zl]=this.listeners("data").length,this[Zl]===0&&!this[Ui]&&!this[oi].length&&(this[rn]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Zl]=0,!this[Ui]&&!this[oi].length&&(this[rn]=!1)),t}get emittedEnd(){return this[Oc]}[Ca](){!this[hS]&&!this[Oc]&&!this[br]&&this[nn].length===0&&this[Ra]&&(this[hS]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[mS]&&this.emit("close"),this[hS]=!1)}emit(e,...t){let n=t[0];if(e!=="error"&&e!=="close"&&e!==br&&this[br])return!1;if(e==="data")return!this[$n]&&!n?!1:this[Eo]?(Tm(()=>this[ex](n)),!0):this[ex](n);if(e==="end")return this[K5]();if(e==="close"){if(this[mS]=!0,!this[Oc]&&!this[br])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[wm]=n,super.emit(ZC,n);let s=!this[vm]||this.listeners("error").length?super.emit("error",n):!1;return this[Ca](),s}else if(e==="resume"){let s=super.emit("resume");return this[Ca](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let i=super.emit(e,...t);return this[Ca](),i}[ex](e){for(let n of this[oi])n.dest.write(e)===!1&&this.pause();let t=this[Ui]?!1:super.emit("data",e);return this[Ca](),t}[K5](){return this[Oc]?!1:(this[Oc]=!0,this.readable=!1,this[Eo]?(Tm(()=>this[tx]()),!0):this[tx]())}[tx](){if(this[bd]){let t=this[bd].end();if(t){for(let n of this[oi])n.dest.write(t);this[Ui]||super.emit("data",t)}}for(let t of this[oi])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[$n]||(e.dataLength=0);let t=this.promise();return this.on("data",n=>{e.push(n),this[$n]||(e.dataLength+=n.length)}),await t,e}async concat(){if(this[$n])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ms]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(br,()=>t(new Error("stream destroyed"))),this.on("error",n=>t(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ui]=!1;let e=!1,t=a(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:a(()=>{if(e)return t();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Ra])return t();let s,o,c=a(d=>{this.off("data",l),this.off("end",u),this.off(br,f),t(),o(d)},"onerr"),l=a(d=>{this.off("error",c),this.off("end",u),this.off(br,f),this.pause(),s({value:d,done:!!this[Ra]})},"ondata"),u=a(()=>{this.off("error",c),this.off("data",l),this.off(br,f),t(),s({done:!0,value:void 0})},"onend"),f=a(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((d,p)=>{o=p,s=d,this.once(br,f),this.once("error",c),this.once("end",u),this.once("data",l)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ui]=!1;let e=!1,t=a(()=>(this.pause(),this.off(ZC,t),this.off(br,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),n=a(()=>{if(e)return t();let i=this.read();return i===null?t():{done:!1,value:i}},"next");return this.once("end",t),this.once(ZC,t),this.once(br,t),{next:n,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[br])return e?this.emit("error",e):this.emit(br),this;this[br]=!0,this[Ui]=!0,this[nn].length=0,this[sn]=0;let t=this;return typeof t.close=="function"&&!this[mS]&&t.close(),e?this.emit("error",e):this.emit(br),this}static get isStream(){return Bde}}});var wd,eU,To,Qde,Fc,Xde,Im,tU,rU,Jde,Zde,es,nU,iU,vo,sU,oU,eu,aU,Zi,Am,ox,Q5,Rm,js,wS,vS,X5,epe,ax,J5,Cm,Z5,ES,TS,cx,cU,Un,AS,IS,RS,Ed,vd,xm,gOe,lU,uU=je(()=>{q5();wd=require("node:path"),eU=require("node:url"),To=require("fs"),Qde=J(require("node:fs"),1),Fc=require("node:fs/promises");sx();Xde=To.realpathSync.native,Im={lstatSync:To.lstatSync,readdir:To.readdir,readdirSync:To.readdirSync,readlinkSync:To.readlinkSync,realpathSync:Xde,promises:{lstat:Fc.lstat,readdir:Fc.readdir,readlink:Fc.readlink,realpath:Fc.realpath}},tU=a(r=>!r||r===Im||r===Qde?Im:{...Im,...r,promises:{...Im.promises,...r.promises||{}}},"fsFromOption"),rU=/^\\\\\?\\([a-z]:)\\?$/i,Jde=a(r=>r.replace(/\//g,"\\").replace(rU,"$1\\"),"uncToDrive"),Zde=/[\\\/]/,es=0,nU=1,iU=2,vo=4,sU=6,oU=8,eu=10,aU=12,Zi=15,Am=~Zi,ox=16,Q5=32,Rm=64,js=128,wS=256,vS=512,X5=Rm|js|vS,epe=1023,ax=a(r=>r.isFile()?oU:r.isDirectory()?vo:r.isSymbolicLink()?eu:r.isCharacterDevice()?iU:r.isBlockDevice()?sU:r.isSocket()?aU:r.isFIFO()?nU:es,"entToType"),J5=new Sm({max:2**12}),Cm=a(r=>{let e=J5.get(r);if(e)return e;let t=r.normalize("NFKD");return J5.set(r,t),t},"normalize"),Z5=new Sm({max:2**12}),ES=a(r=>{let e=Z5.get(r);if(e)return e;let t=Cm(r.toLowerCase());return Z5.set(r,t),t},"normalizeNocase"),TS=class extends Sm{static{a(this,"ResolveCache")}constructor(){super({max:256})}},cx=class extends Sm{static{a(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:a(t=>t.length+1,"sizeCalculation")})}},cU=Symbol("PathScurry setAsCwd"),Un=class{static{a(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#t;#r;get dev(){return this.#r}#n;get mode(){return this.#n}#e;get nlink(){return this.#e}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#p;get rdev(){return this.#p}#u;get blksize(){return this.#u}#c;get ino(){return this.#c}#f;get size(){return this.#f}#l;get blocks(){return this.#l}#d;get atimeMs(){return this.#d}#o;get mtimeMs(){return this.#o}#g;get ctimeMs(){return this.#g}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#S;get mtime(){return this.#S}#A;get ctime(){return this.#A}#y;get birthtime(){return this.#y}#v;#T;#m;#_;#w;#R;#s;#x;#O;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=es,n,i,s,o,c){this.name=e,this.#v=s?ES(e):Cm(e),this.#s=t&epe,this.nocase=s,this.roots=i,this.root=n||this,this.#x=o,this.#m=c.fullpath,this.#w=c.relative,this.#R=c.relativePosix,this.parent=c.parent,this.parent?this.#t=this.parent.#t:this.#t=tU(c.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#x}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#D(i):this.#D(i)}#D(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#x.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#x.set(this,t),this.#s&=~ox,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?ES(e):Cm(e);for(let l of n)if(l.#v===i)return l;let s=this.parent?this.sep:"",o=this.#m?this.#m+s+e:void 0,c=this.newChild(e,es,{...t,parent:this,fullpath:o});return this.canReaddir()||(c.#s|=js),n.push(c),c}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#R!==void 0)return this.#R;let e=this.name,t=this.parent;if(!t)return this.#R=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#m!==void 0)return this.#m;let e=this.name,t=this.parent;if(!t)return this.#m=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#m=i}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#_=`//?/${i}`:this.#_=i}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#s&Zi)===es}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#s&Zi)===oU}isDirectory(){return(this.#s&Zi)===vo}isCharacterDevice(){return(this.#s&Zi)===iU}isBlockDevice(){return(this.#s&Zi)===sU}isFIFO(){return(this.#s&Zi)===nU}isSocket(){return(this.#s&Zi)===aU}isSymbolicLink(){return(this.#s&eu)===eu}lstatCached(){return this.#s&Q5?this:void 0}readlinkCached(){return this.#O}realpathCached(){return this.#C}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#O)return!0;if(!this.parent)return!1;let e=this.#s&Zi;return!(e!==es&&e!==eu||this.#s&wS||this.#s&js)}calledReaddir(){return!!(this.#s&ox)}isENOENT(){return!!(this.#s&js)}isNamed(e){return this.nocase?this.#v===ES(e):this.#v===Cm(e)}async readlink(){let e=this.#O;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#t.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(t);if(n)return this.#O=n}catch(t){this.#F(t.code);return}}readlinkSync(){let e=this.#O;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#t.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(t);if(n)return this.#O=n}catch(t){this.#F(t.code);return}}#$(e){this.#s|=ox;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#I()}}#I(){this.#s&js||(this.#s=(this.#s|js)&Am,this.#q())}#q(){let e=this.children();e.provisional=0;for(let t of e)t.#I()}#N(){this.#s|=vS,this.#L()}#L(){if(this.#s&Rm)return;let e=this.#s;(e&Zi)===vo&&(e&=Am),this.#s=e|Rm,this.#q()}#U(e=""){e==="ENOTDIR"||e==="EPERM"?this.#L():e==="ENOENT"?this.#I():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#L():e==="ENOENT"&&this.#I()}#F(e=""){let t=this.#s;t|=wS,e==="ENOENT"&&(t|=js),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Am),this.#s=t,e==="ENOTDIR"&&this.parent&&this.parent.#L()}#B(e,t){return this.#G(e,t)||this.#k(e,t)}#k(e,t){let n=ax(e),i=this.newChild(e.name,n,{parent:this}),s=i.#s&Zi;return s!==vo&&s!==eu&&s!==es&&(i.#s|=Rm),t.unshift(i),t.provisional++,i}#G(e,t){for(let n=t.provisional;n<t.length;n++){let i=t[n];if((this.nocase?ES(e.name):Cm(e.name))===i.#v)return this.#Y(e,i,n,t)}}#Y(e,t,n,i){let s=t.name;return t.#s=t.#s&Am|ax(e),s!==e.name&&(t.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(t)),i.provisional++,t}async lstat(){if((this.#s&js)===0)try{return this.#W(await this.#t.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#s&js)===0)try{return this.#W(this.#t.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#W(e){let{atime:t,atimeMs:n,birthtime:i,birthtimeMs:s,blksize:o,blocks:c,ctime:l,ctimeMs:u,dev:f,gid:d,ino:p,mode:h,mtime:m,mtimeMs:y,nlink:_,rdev:b,size:T,uid:I}=e;this.#b=t,this.#d=n,this.#y=i,this.#E=s,this.#u=o,this.#l=c,this.#A=l,this.#g=u,this.#r=f,this.#a=d,this.#c=p,this.#n=h,this.#S=m,this.#o=y,this.#e=_,this.#p=b,this.#f=T,this.#i=I;let E=ax(e);this.#s=this.#s&Am|E|Q5,E!==es&&E!==vo&&E!==eu&&(this.#s|=Rm)}#M=[];#h=!1;#H(e){this.#h=!1;let t=this.#M.slice();this.#M.length=0,t.forEach(n=>n(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#M.push(e),this.#h)return;this.#h=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(s,o)=>{if(s)this.#U(s.code),n.provisional=0;else{for(let c of o)this.#B(c,n);this.#$(n)}this.#H(n.slice(0,n.provisional))})}#V;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#V)await this.#V;else{let n=a(()=>{},"resolve");this.#V=new Promise(i=>n=i);try{for(let i of await this.#t.promises.readdir(t,{withFileTypes:!0}))this.#B(i,e);this.#$(e)}catch(i){this.#U(i.code),e.provisional=0}this.#V=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#t.readdirSync(t,{withFileTypes:!0}))this.#B(n,e);this.#$(e)}catch(n){this.#U(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#s&X5)return!1;let e=Zi&this.#s;return e===es||e===vo||e===eu}shouldWalk(e,t){return(this.#s&vo)===vo&&!(this.#s&X5)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#C)return this.#C;if(!((vS|wS|js)&this.#s))try{let e=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#C)return this.#C;if(!((vS|wS|js)&this.#s))try{let e=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(e)}catch{this.#N()}}[cU](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],i=this;for(;i&&i.parent;)t.add(i),i.#w=n.join(this.sep),i.#R=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!t.has(i);)i.#w=void 0,i.#R=void 0,i=i.parent}},AS=class r extends Un{static{a(this,"PathWin32")}sep="\\";splitSep=Zde;constructor(e,t=es,n,i,s,o,c){super(e,t,n,i,s,o,c)}newChild(e,t=es,n={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return wd.win32.parse(e).root}getRoot(e){if(e=Jde(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Ed(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(rU,"$1\\"),e===t}},IS=class r extends Un{static{a(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=es,n,i,s,o,c){super(e,t,n,i,s,o,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=es,n={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}},RS=class{static{a(this,"PathScurryBase")}root;rootPath;roots;cwd;#t;#r;#n;nocase;#e;constructor(e=process.cwd(),t,n,{nocase:i,childrenCacheSize:s=16*1024,fs:o=Im}={}){this.#e=tU(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,eU.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#t=new TS,this.#r=new TS,this.#n=new cx(s);let l=c.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#e),this.roots[this.rootPath]=this.root;let u=this.root,f=l.length-1,d=t.sep,p=this.rootPath,h=!1;for(let m of l){let y=f--;u=u.child(m,{relative:new Array(y).fill("..").join(d),relativePosix:new Array(y).fill("..").join("/"),fullpath:p+=(h?"":d)+m}),h=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#t.get(t);if(n!==void 0)return n;let i=this.cwd.resolve(t).fullpath();return this.#t.set(t,i),i}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#r.get(t);if(n!==void 0)return n;let i=this.cwd.resolve(t).fullpathPosix();return this.#r.set(t,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=[];(!s||s(e))&&c.push(n?e:e.fullpath());let l=new Set,u=a((d,p)=>{l.add(d),d.readdirCB((h,m)=>{if(h)return p(h);let y=m.length;if(!y)return p();let _=a(()=>{--y===0&&p()},"next");for(let b of m)(!s||s(b))&&c.push(n?b:b.fullpath()),i&&b.isSymbolicLink()?b.realpath().then(T=>T?.isUnknown()?T.lstat():T).then(T=>T?.shouldWalk(l,o)?u(T,_):_()):b.shouldWalk(l,o)?u(b,_):_()},!0)},"walk"),f=e;return new Promise((d,p)=>{u(f,h=>{if(h)return p(h);d(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=[];(!s||s(e))&&c.push(n?e:e.fullpath());let l=new Set([e]);for(let u of l){let f=u.readdirSync();for(let d of f){(!s||s(d))&&c.push(n?d:d.fullpath());let p=d;if(d.isSymbolicLink()){if(!(i&&(p=d.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield n?e:e.fullpath());let c=new Set([e]);for(let l of c){let u=l.readdirSync();for(let f of u){(!s||s(f))&&(yield n?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(c,o)&&c.add(d)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=new Pc({objectMode:!0});(!s||s(e))&&c.write(n?e:e.fullpath());let l=new Set,u=[e],f=0,d=a(()=>{let p=!1;for(;!p;){let h=u.shift();if(!h){f===0&&c.end();return}f++,l.add(h);let m=a((_,b,T=!1)=>{if(_)return c.emit("error",_);if(i&&!T){let I=[];for(let E of b)E.isSymbolicLink()&&I.push(E.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(I.length){Promise.all(I).then(()=>m(null,b,!0));return}}for(let I of b)I&&(!s||s(I))&&(c.write(n?I:I.fullpath())||(p=!0));f--;for(let I of b){let E=I.realpathCached()||I;E.shouldWalk(l,o)&&u.push(E)}p&&!c.flowing?c.once("drain",d):y||d()},"onReaddir"),y=!0;h.readdirCB(m,!0),y=!1}},"process");return d(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Un||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=new Pc({objectMode:!0}),l=new Set;(!s||s(e))&&c.write(n?e:e.fullpath());let u=[e],f=0,d=a(()=>{let p=!1;for(;!p;){let h=u.shift();if(!h){f===0&&c.end();return}f++,l.add(h);let m=h.readdirSync();for(let y of m)(!s||s(y))&&(c.write(n?y:y.fullpath())||(p=!0));f--;for(let y of m){let _=y;if(y.isSymbolicLink()){if(!(i&&(_=y.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,o)&&u.push(_)}}p&&!c.flowing&&c.once("drain",d)},"process");return d(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[cU](t)}},Ed=class extends RS{static{a(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,wd.win32,"\\",{...t,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return wd.win32.parse(e).root.toUpperCase()}newRoot(e){return new AS(this.rootPath,vo,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},vd=class extends RS{static{a(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,wd.posix,"/",{...t,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new IS(this.rootPath,vo,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},xm=class extends vd{static{a(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}},gOe=process.platform==="win32"?AS:IS,lU=process.platform==="win32"?Ed:process.platform==="darwin"?xm:vd});var tpe,rpe,Td,lx=je(()=>{Cc();tpe=a(r=>r.length>=1,"isPatternList"),rpe=a(r=>r.length>=1,"isGlobList"),Td=class r{static{a(this,"Pattern")}#t;#r;#n;length;#e;#i;#a;#p;#u;#c;#f=!0;constructor(e,t,n,i){if(!tpe(e))throw new TypeError("empty pattern list");if(!rpe(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=e,this.#r=t,this.#n=n,this.#e=i,this.#n===0){if(this.isUNC()){let[s,o,c,l,...u]=this.#t,[f,d,p,h,...m]=this.#r;u[0]===""&&(u.shift(),m.shift());let y=[s,o,c,l,""].join("/"),_=[f,d,p,h,""].join("/");this.#t=[y,...u],this.#r=[_,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#t,[c,...l]=this.#r;o[0]===""&&(o.shift(),l.shift());let u=s+"/",f=c+"/";this.#t=[u,...o],this.#r=[f,...l],this.length=this.#t.length}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===_r}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new r(this.#t,this.#r,this.#n+1,this.#e),this.#i.#c=this.#c,this.#i.#u=this.#u,this.#i.#p=this.#p,this.#i):this.#i=null}isUNC(){let e=this.#t;return this.#u!==void 0?this.#u:this.#u=this.#e==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#t;return this.#p!==void 0?this.#p:this.#p=this.#e==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#t;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#t[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var npe,Ad,ux=je(()=>{Cc();lx();npe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ad=class{static{a(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:s,platform:o=npe}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new $i(e,this.mmopts);for(let n=0;n<t.set.length;n++){let i=t.set[n],s=t.globParts[n];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let o=new Td(i,s,0,this.platform),c=new $i(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(c):this.relative.push(c),l&&(u?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),n=`${t}/`,i=e.relative()||".",s=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(t))return!0;return!1}}});var fx,dx,px,Om,fU=je(()=>{Cc();fx=class r{static{a(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new r(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),i=this.store.get(n);i?i.add(t.globString()):this.store.set(n,new Set([t.globString()]))}},dx=class{static{a(this,"MatchRecord")}store=new Map;add(e,t,n){let i=(t?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},px=class{static{a(this,"SubWalks")}store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Om=class r{static{a(this,"Processor")}hasWalkedCache;matches=new dx;subwalks=new px;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new fx}processPatterns(e,t){this.patterns=t;let n=t.map(i=>[e,i]);for(let[i,s]of n){this.hasWalkedCache.storeWalked(i,s);let o=s.root(),c=s.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let d=s.rest();if(d)s=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,f=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,f=!0;if(l=s.pattern(),u=s.rest(),f){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),c,d);continue}else if(l===_r){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let d=u?.pattern(),p=u?.rest();if(!u||(d===""||d===".")&&!p)this.matches.add(i,c,d===""||d===".");else if(d===".."){let h=i.parent||i;p?this.hasWalkedCache.hasWalked(h,p)||this.subwalks.add(h,p):this.matches.add(h,c,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),i=this.child();for(let s of t)for(let o of n){let c=o.isAbsolute(),l=o.pattern(),u=o.rest();l===_r?i.testGlobstar(s,o,u,c):l instanceof RegExp?i.testRegExp(s,l,u,c):i.testString(s,l,u,c)}return i}testGlobstar(e,t,n,i){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),i);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),i)}}testRegExp(e,t,n,i){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,t,n,i){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}}});var ipe,CS,Pm,Fm,dU=je(()=>{sx();ux();fU();ipe=a((r,e)=>typeof r=="string"?new Ad([r],e):Array.isArray(r)?new Ad(r,e):r,"makeIgnore"),CS=class{static{a(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#r;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#r=ipe(n.ignore??[],n),!this.includeChildMatches&&typeof this.#r.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#e(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#i(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#t.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#t.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#e(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#e(e))return;if(!this.includeChildMatches&&this.#r?.add){let s=`${e.relativePosix()}/**`;this.#r.add(s)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+i)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(s?o+s+i:"."+i)}}async match(e,t,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,t)}matchSync(e,t,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new Om(this.opts),n)}walkCB2(e,t,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,i));return}n.processPatterns(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||(s++,this.match(c,l,u).then(()=>o()));for(let c of n.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;s++;let l=c.readdirCached();c.calledReaddir()?this.walkCB3(c,l,n,o):c.readdirCB((u,f)=>this.walkCB3(c,f,n,o),!0)}o()}walkCB3(e,t,n,i){n=n.filterEntries(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||(s++,this.match(c,l,u).then(()=>o()));for(let[c,l]of n.subwalks.entries())s++,this.walkCB2(c,l,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new Om(this.opts),n)}walkCB2Sync(e,t,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,i));return}n.processPatterns(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||this.matchSync(c,l,u);for(let c of n.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;s++;let l=c.readdirSync();this.walkCB3Sync(c,l,n,o)}o()}walkCB3Sync(e,t,n,i){n=n.filterEntries(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||this.matchSync(c,l,u);for(let[c,l]of n.subwalks.entries())s++,this.walkCB2Sync(c,l,n.child(),o);o()}},Pm=class extends CS{static{a(this,"GlobWalker")}matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Fm=class extends CS{static{a(this,"GlobStream")}results;constructor(e,t,n){super(e,t,n),this.results=new Pc({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});var pU,spe,$s,hx=je(()=>{Cc();pU=require("node:url");uU();lx();dU();spe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",$s=class{static{a(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,pU.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||spe,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Ed:t.platform==="darwin"?xm:t.platform?vd:lU;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new $i(l,i)),[o,c]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let f=c[u];if(!f)throw new Error("invalid pattern object");return new Td(l,f,0,this.platform)})}async walk(){return[...await new Pm(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Pm(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Fm(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Fm(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}});var mx,gx=je(()=>{Cc();mx=a((r,e={})=>{Array.isArray(r)||(r=[r]);for(let t of r)if(new $i(t,e).hasMagic())return!0;return!1},"hasMagic")});function xS(r,e={}){return new $s(r,e).streamSync()}function mU(r,e={}){return new $s(r,e).stream()}function gU(r,e={}){return new $s(r,e).walkSync()}async function hU(r,e={}){return new $s(r,e).walk()}function OS(r,e={}){return new $s(r,e).iterateSync()}function yU(r,e={}){return new $s(r,e).iterate()}var ope,ape,cpe,lpe,upe,Id,yx=je(()=>{Cc();hx();gx();Cc();hx();gx();ux();a(xS,"globStreamSync");a(mU,"globStream");a(gU,"globSync");a(hU,"glob_");a(OS,"globIterateSync");a(yU,"globIterate");ope=xS,ape=Object.assign(mU,{sync:xS}),cpe=OS,lpe=Object.assign(yU,{sync:OS}),upe=Object.assign(gU,{stream:xS,iterate:OS}),Id=Object.assign(hU,{glob:hU,globSync:gU,sync:upe,globStream:mU,stream:ape,globStreamSync:xS,streamSync:ope,globIterate:yU,iterate:lpe,globIterateSync:OS,iterateSync:cpe,Glob:$s,hasMagic:mx,escape:_d,unescape:ks});Id.glob=Id});async function bU(r,e,t,n={}){let{dryRun:i=!1,excludeRelPath:s}=n,o=tu.default.join(r,"**/*.md"),c=await Id(o,{nodir:!0,ignore:[tu.default.join(r,".obsidian/**"),tu.default.join(r,".trash/**"),tu.default.join(r,"**/.obsidian/**"),tu.default.join(r,"**/.trash/**")]}),l={filesScanned:0,filesModified:0,replacements:0,modifiedFiles:[]};for(let u of c){let f=tu.default.relative(r,u);if(s&&f===s)continue;l.filesScanned+=1;let d;try{d=await _x.default.readFile(u,"utf-8")}catch{continue}let{updated:p,replacements:h}=fpe(d,e,t);h>0&&(l.filesModified+=1,l.replacements+=h,l.modifiedFiles.push(f),i||await _x.default.writeFile(u,p,"utf-8"))}return l}function fpe(r,e,t){let n=r.split(/(^```[\s\S]*?^```)/m),i=0;for(let s=0;s<n.length;s++){if(s%2===1)continue;let o=n[s],c=dpe(o,e,t);i+=c.replacements,n[s]=c.updated}return{updated:n.join(""),replacements:i}}function dpe(r,e,t){let n=r.split(/(`[^`\n]*`)/),i=0;for(let s=0;s<n.length;s++){if(s%2===1)continue;let o=ppe(n[s],e,t);i+=o.replacements,n[s]=o.updated}return{updated:n.join(""),replacements:i}}function ppe(r,e,t){let n=/(?<!!)\[\[([^\[\]\n|#^]+)((?:[#^][^\[\]\n|]*)?)(?:\|[^\[\]\n]*)?\]\]/g,i=0;return{updated:r.replace(n,(o,c,l)=>c.trim()!==e?o:(i+=1,`[[${t}${l}]]`)),replacements:i}}var _x,tu,SU=je(()=>{"use strict";_x=J(Ta()),tu=J(require("path"));yx();a(bU,"rewriteInboundWikilinks");a(fpe,"rewriteContent");a(dpe,"rewriteProseSegment");a(ppe,"replaceWikilinks")});var Fr,or,wU,hpe,$t,Bi=je(()=>{"use strict";Fr=J(Ta()),or=J(require("path"));hm();wU=J(We());SU();hpe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,$t=class{constructor(e){this.rootPath=e;this.uuidIndex=null;this.basenameIndex=null;this.aliasIndex=null}static{a(this,"FileSystemVaultAdapter")}async read(e){let t=this.resolvePath(e.path);if(!await Fr.default.pathExists(t))throw new Error(`File not found: ${e.path}`);return Fr.default.readFile(t,"utf-8")}async create(e,t){let n=this.resolvePath(e);if(await Fr.default.pathExists(n))throw new Error(`File already exists: ${e}`);return await Fr.default.ensureDir(or.default.dirname(n)),await Fr.default.writeFile(n,t,"utf-8"),this.createFileObject(e)}async modify(e,t){let n=this.resolvePath(e.path);if(!await Fr.default.pathExists(n))throw new Error(`File not found: ${e.path}`);await Fr.default.writeFile(n,t,"utf-8")}async delete(e){let t=this.resolvePath(e.path);if(!await Fr.default.pathExists(t))throw new Error(`File not found: ${e.path}`);await Fr.default.remove(t)}async exists(e){let t=this.resolvePath(e);return Fr.default.pathExists(t)}getAbstractFileByPath(e){let t=this.resolvePath(e);try{let n=Fr.default.statSync(t);if(n.isFile())return this.createFileObject(e);if(n.isDirectory())return this.createFolderObject(e)}catch{return null}return null}getAllFiles(){let e=[];return this.walkDirectory(this.rootPath,t=>{if(t.endsWith(".md")){let n=or.default.relative(this.rootPath,t);e.push(this.createFileObject(n))}}),e}getFrontmatter(e){try{let t=Fr.default.readFileSync(this.resolvePath(e.path),"utf-8");return this.extractFrontmatter(t)}catch{return null}}async updateFrontmatter(e,t){let n=await this.read(e),i=this.extractFrontmatter(n)||{},s=t(i),o=this.replaceFrontmatter(n,s);await this.modify(e,o)}async rename(e,t){let n=this.resolvePath(e.path),i=this.resolvePath(t);if(!await Fr.default.pathExists(n))throw new Error(`File not found: ${e.path}`);await Fr.default.ensureDir(or.default.dirname(i)),await Fr.default.move(n,i)}async createFolder(e){let t=this.resolvePath(e);await Fr.default.ensureDir(t)}getFirstLinkpathDest(e,t,n){let i=e.split("|")[0].trim();if(!i)return null;if(hpe.test(i)){this.uuidIndex===null&&this.buildUuidIndex();let u=i.toLowerCase(),f=this.uuidIndex.get(u);return f?this.createFileObject(f):null}let s=or.default.dirname(this.resolvePath(t)),o;if(or.default.isAbsolute(i)?o=this.resolvePath(i):o=or.default.resolve(s,i),i.endsWith(".md")||(o+=".md"),Fr.default.existsSync(o)){let u=or.default.relative(this.rootPath,o);return this.createFileObject(u)}(this.basenameIndex===null||this.aliasIndex===null)&&this.buildLinkpathIndex();let c=i.toLowerCase(),l=this.basenameIndex.get(c);if(l)return this.createFileObject(l);if(n?.allowAliasFallback!==!1){let u=this.aliasIndex.get(c);if(u)return this.createFileObject(u)}return null}buildLinkpathIndex(){this.basenameIndex=new Map,this.aliasIndex=new Map,this.walkDirectory(this.rootPath,e=>{if(!e.endsWith(".md"))return;let t=or.default.relative(this.rootPath,e),n=or.default.basename(e,".md").toLowerCase();this.basenameIndex.has(n)||this.basenameIndex.set(n,t);let i;try{i=Fr.default.readFileSync(e,"utf-8")}catch{return}let s=this.extractFrontmatter(i);if(!s)return;let o=s.aliases,c=Array.isArray(o)?o:typeof o=="string"?[o]:[];for(let l of c){if(typeof l!="string")continue;let u=l.trim().toLowerCase();u&&(this.aliasIndex.has(u)||this.aliasIndex.set(u,t))}})}buildUuidIndex(){this.uuidIndex=new Map,this.walkDirectory(this.rootPath,e=>{if(e.endsWith(".md")){let n=or.default.basename(e,".md").match(/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i);if(n){let i=n[1].toLowerCase(),s=or.default.relative(this.rootPath,e);this.uuidIndex.set(i,s)}}})}async process(e,t){let n=await this.read(e),i=t(n);return await this.modify(e,i),i}getDefaultNewFileParent(){return{path:"",name:""}}async updateLinks(e,t,n){let i=or.default.basename(t,".md");await bU(this.rootPath,n,i,{excludeRelPath:e})}resolvePath(e){if(or.default.isAbsolute(e))return e;let t=this.rootPath.replace(/[/\\]+$/,""),n=or.default.sep+e;return n===t||n.startsWith(t+or.default.sep)?n:or.default.join(this.rootPath,e)}createFileObject(e){let t=or.default.basename(e),n=or.default.basename(e,or.default.extname(e)),i=or.default.dirname(e);return{path:e,basename:n,name:t,parent:i!=="."?this.createFolderObject(i):null}}createFolderObject(e){return{path:e,name:or.default.basename(e)}}extractFrontmatter(e){let t=/^---\n([\s\S]*?)\n---/,n=e.match(t);return n?(0,wU.parseYamlFrontmatterTolerant)(n[1]):null}replaceFrontmatter(e,t){let n=yd(t,{lineWidth:-1,noRefs:!0,quoteStyle:"double"}),i=/^---\n([\s\S]*?)\n---/;return e.match(i)?e.replace(i,`---
403
403
  ${n.trim()}
404
404
  ---`):`---
405
405
  ${n.trim()}
@@ -454,25 +454,25 @@ ${i}`;super(s,{path:t,violations:n},{message:"Fix the frontmatter so the asset s
454
454
  \u2139\uFE0F ${p.length} warning(s)`+(h>0?` (${h} unresolvable class/symbolic ref(s) \u2014 not validated)`:"")+" \u2014 these do not affect the exit code."),m>0)){console.log(` \u26A0\uFE0F ${y.size} term-IRI collision(s) \u2014 one IRI emitted by several assets (${m} entr${m===1?"y":"ies"}):`);for(let _ of[...y].sort())console.log(` \u2022 ${_}`);console.log(" Run with --format json for the emitting assets.")}}u.conforms||(process.exitCode=1)}catch(i){se.handle(i)}}function pme(r,e,t){let n=R6(e),i=n.length>0?{...r,violations:[...r.violations,...n]}:r,s=rO(e,i);return t&&(s=iO(s,t)),s}function M6(){return new fe("schema").description("Check frontmatter properties against ontology (Issue #2713)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--output <type>","Response format: text|json (for MCP tools)","text").option("--staged","Only validate git-staged .md files (for pre-commit hooks)").option("--use-cache","Use persistent triple cache (faster vault loading)").option("--shapes-mode","Run SHACL-lite shapes validation instead of schema linting").option("--format <type>","Output format for shapes-mode: text|json|earl","text").option("--class <iri>","Only validate assets whose exo__Instance_class matches this IRI/slug (RFC 8e83442b T1.4)").action(async r=>{let e=r.output||"text";if(se.setFormat(e),r.shapesMode){await dme(r);return}try{let t=(0,Oa.resolve)(r.vault);if(!(0,Ro.existsSync)(t))throw new Me(t);let n;if(r.staged){if(n=L6(t),n.length===0){if(e==="json"){let f=ft.success({vaultPath:t,filesChecked:0,violations:[],healthy:!0});console.log(JSON.stringify(f,null,2))}else console.log("\u2705 No staged .md files to validate.");return}}else n=Jhe(t);if(r.class){let f=r.class;n=n.filter(d=>{try{let p=(0,Ro.readFileSync)((0,Oa.resolve)(t,d),"utf-8"),h=P6(p);return Yhe(h,f)}catch{return!1}})}e==="text"&&console.log(`\u{1F4E6} Loading vault: ${t}...`);let{triples:i,cacheHit:s}=await O6(t,!!r.useCache),o=i;e==="text"&&s&&console.log("\u{1F680} Cache hit! Loading from persistent cache..."),e==="text"&&(console.log(`\u2705 Loaded ${o.length} triples`),console.log("\u{1F50D} Querying ontology for declared properties..."));let c=await eme(o);e==="text"&&(console.log(`\u{1F4CB} Found ${c.size} declared properties in ontology`),console.log(`\u{1F50D} Validating ${n.length} file(s)...
455
455
  `));let l=[];for(let f of n){let d=(0,Oa.resolve)(t,f),p=rme(d,f,c);l.push(...p)}let u={vaultPath:t,filesChecked:n.length,violations:l,healthy:l.length===0};if(e==="json"){let f=ft.success(u);console.log(JSON.stringify(f,null,2))}else if(l.length===0)console.log(`\u2705 All ${n.length} file(s) pass schema validation.`);else{let f=new Map;for(let d of l){let p=f.get(d.file)||[];p.push(d),f.set(d.file,p)}console.log(`\u26A0\uFE0F Found ${l.length} schema violation(s) in ${f.size} file(s):
456
456
  `);for(let[d,p]of f){console.log(` \u274C ${d}`);for(let h of p)console.log(` \u2022 ${h.reason}`)}console.log(`
457
- \u{1F4DD} To fix these issues:`),console.log(" - Remove undeclared properties from frontmatter"),console.log(" - Or declare them in the ontology as Property instances")}l.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}var Ro,Oa,x6,ot,Khe,tO,Qhe,nme,ime,sme,eO,cme,ume,sO=je(()=>{"use strict";ct();Ro=require("fs"),Oa=require("path"),x6=require("child_process");hm();ot=J(We());Bi();Pt();C6();qt();Sr();xd();ZS();Khe=new Set(["aliases","archived","tags","cssclasses","publish","permalink","description","image","cover","banner","title","share","share_link","share_updated","metadata","uri"]),tO=new Map([["exo__","https://exocortex.my/ontology/exo#"],["ems__","https://exocortex.my/ontology/ems#"],["exocmd__","https://exocortex.my/ontology/exocmd#"],["ims__","https://exocortex.my/ontology/ims#"],["exoql__","https://exocortex.my/ontology/exoql#"],["query__","https://exocortex.my/ontology/query#"],["ztlk__","https://exocortex.my/ontology/ztlk#"],["ptms__","https://exocortex.my/ontology/ptms#"],["lit__","https://exocortex.my/ontology/lit#"],["inbox__","https://exocortex.my/ontology/inbox#"],["place__","https://exocortex.my/ontology/place#"],["pn__","https://exocortex.my/ontology/pn#"],["period__","https://exocortex.my/ontology/period#"],["rdf__","http://www.w3.org/1999/02/22-rdf-syntax-ns#"],["rdfs__","http://www.w3.org/2000/01/rdf-schema#"],["owl__","http://www.w3.org/2002/07/owl#"],["xsd__","http://www.w3.org/2001/XMLSchema#"],["sh__","http://www.w3.org/ns/shacl#"]]);a(Yhe,"frontmatterMatchesClass");a(O6,"loadTriplesFromAllVaults");Qhe="http://www.w3.org/1999/02/22-rdf-syntax-ns#type";a(P6,"extractFrontmatter");a(F6,"hasKnownPrefix");a(D6,"keyToURI");a(Xhe,"classifyKeys");a(L6,"getStagedMdFiles");a(Jhe,"collectMdFiles");a(Zhe,"extractPropertyNameFromURI");a(eme,"loadDeclaredProperties");a(tme,"detectUnparseableFrontmatter");a(rme,"validateFile");nme="http://www.w3.org/2000/01/rdf-schema#subClassOf",ime="https://exocortex.my/ontology/exo#Class_superClass",sme="http://www.w3.org/2000/01/rdf-schema#label";a(N6,"labelToOntologyIRI");a(ome,"fileIriToOntologyURIFromFilename");a(ame,"domainToAlgebraTriples");eO=class{constructor(e){this.subClassMap=new Map;let t=new Map,n=new Set,i=a(o=>o===nme||o===ime,"isSubClassPredicate");for(let o of e)o.predicate instanceof ot.DomainIRI&&i(o.predicate.value)&&o.subject instanceof ot.DomainIRI&&o.object instanceof ot.DomainIRI&&(n.add(o.subject.value),n.add(o.object.value));for(let o of e)if(o.predicate instanceof ot.DomainIRI&&o.predicate.value===sme&&o.subject instanceof ot.DomainIRI&&o.object instanceof ot.DomainLiteral){let c=N6(o.object.value);c&&t.set(o.subject.value,c)}for(let o of n)if(!t.has(o)){let c=ome(o);c&&t.set(o,c)}for(let[o,c]of t){let l=this.subClassMap.get(o)??new Set;l.add(c),this.subClassMap.set(o,l)}for(let o of e)if(o.predicate instanceof ot.DomainIRI&&i(o.predicate.value)&&o.subject instanceof ot.DomainIRI&&o.object instanceof ot.DomainIRI){let c=o.subject.value,l=o.object.value,u=this.subClassMap.get(c)??new Set;u.add(l),this.subClassMap.set(c,u);let f=t.get(c),d=l.startsWith("obsidian://")?t.get(l):l;if(f&&d){let p=this.subClassMap.get(f)??new Set;p.add(d),this.subClassMap.set(f,p)}}let s=e.filter(o=>o.predicate instanceof ot.DomainIRI&&o.predicate.value===Qhe&&o.subject instanceof ot.DomainIRI&&o.object instanceof ot.DomainIRI);for(let o of s){let c=o.subject.value,l=o.object.value,u=this.collectAncestors(l);for(let d of u){if(c===d)continue;let p=this.subClassMap.get(c)??new Set;p.add(d),this.subClassMap.set(c,p)}let f=t.get(c);if(f)for(let d of u){let p=d.startsWith("obsidian://")?t.get(d):d;if(!p||f===p)continue;let h=this.subClassMap.get(f)??new Set;h.add(p),this.subClassMap.set(f,h)}}}static{a(this,"TripleClassHierarchy")}collectAncestors(e){let t=new Set,n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(n.has(s))continue;n.add(s);let o=this.subClassMap.get(s);if(o)for(let c of o)c!==e&&(t.add(c),n.has(c)||i.push(c))}return t}isSubClassOf(e,t){let n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(s===t)return!0;if(n.has(s))continue;n.add(s);let o=this.subClassMap.get(s);if(o)for(let c of o)i.push(c)}return!1}},cme=new Set(["sh:Warning","sh:Info"]);a(lme,"earlOutcomeFor");a(k6,"buildEARLReport");ume="https://exocortex.my/ontology/exo#Asset_legacyValidationException";a(rO,"applyLegacyExceptionFilter");a(nO,"runShapesValidation");a(iO,"filterReportToStagedFocusNodes");a(fme,"emitEmptyStagedShapesResult");a(dme,"runShapesModeAction");a(pme,"assembleShapesReport");a(M6,"validateSchemaCommand")});var iB={};Sg(iB,{CandidateShaclValidator:()=>hO});function Rme(r){let e=r.match(/^https:\/\/exocortex\.my\/ontology\/([A-Za-z][A-Za-z0-9_]*)#(.+)$/);return e?`${e[1]}__${e[2]}`:r}function Cme(r){let e=(0,Wm.basename)(r);return{path:r,basename:(0,Wm.basename)(r,(0,Wm.extname)(r)),name:e,parent:null}}function xme(r){let e=r.match(Ime);return e?(0,hw.parseYamlFrontmatterTolerant)(e[1]):null}var Wm,hw,Ime,hO,sB=je(()=>{"use strict";Wm=require("path"),hw=J(We());Bi();sO();Ime=/^---\n([\s\S]*?)\n---/,hO=class{constructor(e){this.vaultPath=e}static{a(this,"CandidateShaclValidator")}async validateCandidate(e,t){let n=new $t(this.vaultPath),i=new hw.NoteToRDFConverter(n),s=Cme(e),o=xme(t),c=o?i.validateExocortexAsset(o,s.basename):null;if(c)return{violations:[{propertyPath:c.property,propertyIri:c.property,constraint:c.code,message:`${c.message} \u2014 the asset would be SKIPPED by the indexer (no triples emitted), making it invisible to every query, layout and graph relation.`}],warnings:[]};let l=await i.convertVault(),u;try{u=await i.convertNoteFromFrontmatter(s,o)}catch(_){return{violations:[{propertyPath:e,propertyIri:e,constraint:"indexability",message:`The asset could not be converted to RDF (${_ instanceof Error?_.message:String(_)}) \u2014 the indexer would SKIP it, making it invisible to every query, layout and graph relation.`}],warnings:[]}}let f=[...l,...u],d=await nO(this.vaultPath,f),p=rO(f,d),h=iO(p,new Set([e])),m=[],y=[];for(let _ of h.violations){let b={propertyPath:Rme(_.propertyPath),propertyIri:_.propertyPath,constraint:String(_.constraint),message:_.message,..._.actualValue!==void 0?{actualValue:_.actualValue}:{},..._.expectedRange!==void 0?{expectedRange:_.expectedRange}:{}};_.severity==="sh:Violation"?m.push(b):y.push(b)}return{violations:m,warnings:y}}};a(Rme,"iriToFrontmatterKey");a(Cme,"syntheticFile");a(xme,"extractFrontmatter")});var EB=v(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.createPathBasedTargetResolver=Ws;Tn.createCreateRelatedTaskService=ege;Tn.createCreateRelatedProjectService=tge;Tn.createCreateAssetService=rge;Tn.createArchiveAssetService=nge;Tn.createCleanPropertiesService=ige;Tn.createFixMissingLabelService=sge;Tn.createRenameToUidService=oge;Tn.createRepairFolderService=cge;Tn.createPlanForEveningService=lge;Tn.createUpdatePropertyService=uge;Tn.createRemovePropertyService=fge;Tn.createSetStatusService=dge;Tn.createDuplicateAssetService=pge;Tn.rewriteFrontmatterScalars=wB;var Ym=We();function Ws(r){return{resolveFile(e){let t=(0,Ym.iriToVaultPath)(e)??e,n=t.endsWith(".md")?t:`${t}.md`,i=r.getAbstractFileByPath(n);if(!i||!("basename"in i))throw new Error(`Cannot resolve target file for IRI: ${e}`);return i}}}a(Ws,"createPathBasedTargetResolver");var bO=a(()=>null,"NULL_CLASS_RESOLVER");function bw(r){return r.startsWith('"[[')&&r.endsWith(']]"')?r:r.startsWith("[[")&&r.endsWith("]]")?`"${r}"`:`"[[${r}]]"`}a(bw,"toQuotedWikilink");function ege(r,e,t=Ws(r),n,i=bO){return{async execute(s,o){let c=o?.label;if(!c)throw new Error("createRelatedTask requires userInput.label");let l=t.resolveFile(s),u=r.getFrontmatter(l)??{},f=l.parent?.path||"",d={ems__Effort_status:'"[[c42245d0-01de-4c35-bfcf-d910445ea28e]]"'},p=o?.parentProperty;p&&l.basename&&(d[p]=`"[[${l.basename}]]"`);let h=await e.createAsset({className:"ems__Task",label:c,folderPath:f,propertyValues:d,parentFile:l,parentMetadata:u,classResolver:i});n&&await n(h)}}}a(ege,"createCreateRelatedTaskService");function tge(r,e,t=Ws(r),n,i=bO){return{async execute(s,o){let c=o?.label;if(!c)throw new Error("createRelatedProject requires userInput.label");let l=t.resolveFile(s),u=r.getFrontmatter(l)??{},f=l.parent?.path||"",d={ems__Effort_status:'"[[c42245d0-01de-4c35-bfcf-d910445ea28e]]"'},p=o?.parentProperty;p&&l.basename&&(d[p]=`"[[${l.basename}]]"`);let h=await e.createAsset({className:"ems__Project",label:c,folderPath:f,propertyValues:d,parentFile:l,parentMetadata:u,classResolver:i});n&&await n(h)}}}a(tge,"createCreateRelatedProjectService");function rge(r,e,t=bO,n=Ws(r)){return{async execute(i,s){let o=s?.prototypeUID??s?.prototype,c=s?.label,l=s?.folder,u=s?.ownerIdentity,f=s?.isDefinedBy;if(!o)throw new Error("createAsset requires userInput.prototypeUID");if(!c)throw new Error("createAsset requires userInput.label");let d,p;if(i)try{let S=n.resolveFile(i);d=S.path,p=r.getFrontmatter(S)??void 0}catch{}if(!l&&d){let S=d.lastIndexOf("/");l=S>=0?d.substring(0,S):""}if(l===void 0)throw new Error("createAsset requires userInput.folder");let h=o.endsWith("Prototype")?o.slice(0,-9):o,m=crypto.randomUUID(),y=Ym.DateFormatter.toISOTimestamp(new Date),_=`${m}.md`,b=l?`${l}/${_}`:_,T=["---",`exo__Asset_uid: ${m}`,`exo__Asset_createdAt: ${y}`,`exo__Asset_label: ${c}`,`exo__Asset_prototype: "[[${o}]]"`,"exo__Instance_class:",` - "[[${h}]]"`],I=!1;if(f&&(T.push(`exo__Asset_isDefinedBy: ${bw(f)}`),I=!0),p){let S=p.exo__Instance_class,D=(Array.isArray(S)?S:S!=null?[S]:[]).some(M=>Ym.WikiLinkHelpers.resolveSymbolic(String(M),t).includes("Area")),P=d?d.substring(d.lastIndexOf("/")+1).replace(/\.md$/,""):void 0;if(P){let M=D?"ems__Effort_area":"ems__Effort_parent";T.push(`${M}: "[[${P}]]"`)}!D&&p.ems__Effort_area&&T.push(`ems__Effort_area: ${bw(String(p.ems__Effort_area))}`),T.push('ems__Effort_status: "[[753a44d5-846c-4b82-9196-4fd9a4d48777]]"'),!I&&p.exo__Asset_isDefinedBy&&(T.push(`exo__Asset_isDefinedBy: ${bw(String(p.exo__Asset_isDefinedBy))}`),I=!0)}!I&&u&&T.push(`exo__Asset_isDefinedBy: ${bw(u)}`),T.push("---","");let E=T.join(`
458
- `);await e.createFile(b,E)}}}a(rge,"createCreateAssetService");function nge(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n);await e.archiveAsset(i)}}}a(nge,"createArchiveAssetService");function ige(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n);await e.cleanEmptyProperties(i)}}}a(ige,"createCleanPropertiesService");function sge(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n);await e.fixMissingLabel(i)}}}a(sge,"createFixMissingLabelService");function oge(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n),s=r.getFrontmatter(i)??{};await e.renameToUid(i,s)}}}a(oge,"createRenameToUidService");async function age(r,e,t){try{let n=await r.read(t),i=e.parseObject(n);if(i)return i}catch{}return r.getFrontmatter(t)??{}}a(age,"readFreshFrontmatter");function cge(r,e,t=Ws(r)){let n=new Ym.FrontmatterService;return{async execute(i){let s=t.resolveFile(i),o=await age(r,n,s),c=await e.getExpectedFolder(s,o);if(c===null)throw new Error("repairFolder: cannot determine expected folder (missing exo__Asset_isDefinedBy or referenced asset not found)");(s.parent?.path??"")!==c&&await e.repairFolder(s,c)}}}a(cge,"createRepairFolderService");function lge(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n);await e.planForEvening(i)}}}a(lge,"createPlanForEveningService");function uge(r,e,t){return{async execute(n,i){let s=i?.property,o=i?.value;if(!s)throw new Error(`updateProperty requires userInput.property \u2014 pass it via --input '{"property":"<name>","value":"<value>"}'`);if(o===void 0)throw new Error(`updateProperty requires userInput.value \u2014 pass it via --input '{"value":"<value>"}' (e.g. set-planned-start: --input '{"value":"2026-07-25T09:00:00"}')`);let c=await t.resolveTargetPath(n),l=await r.readFile(c),u=e.updateProperty(l,s,o);await r.updateFile(c,u)}}}a(uge,"createUpdatePropertyService");function fge(r,e,t){return{async execute(n,i){let s=i?.property;if(!s)throw new Error("removeProperty requires userInput.property");let o=await t.resolveTargetPath(n),c=await r.readFile(o),l=e.removeProperty(c,s);await r.updateFile(o,l)}}}a(fge,"createRemovePropertyService");function dge(r,e,t){return{async execute(n,i){let s=i?.statusUID;if(!s)throw new Error("setStatus requires userInput.statusUID");let o=await t.resolveTargetPath(n),c=await r.readFile(o),l=e.updateProperty(c,"ems__Effort_status",`"[[${s}]]"`);await r.updateFile(o,l)}}}a(dge,"createSetStatusService");function pge(r,e=Ws(r),t){return{async execute(n){if(!n)throw new Error("duplicateAsset requires an active target \u2014 open an Exocortex asset before invoking");let i=e.resolveFile(n),s=await r.read(i),o=crypto.randomUUID(),c=Ym.DateFormatter.toLocalTimestamp(new Date),l=wB(s,{exo__Asset_uid:o,exo__Asset_createdAt:c}),u=i.parent?.path??"",f=u?`${u}/${o}.md`:`${o}.md`,d=await r.create(f,l);t&&await t(d)}}}a(pge,"createDuplicateAssetService");function wB(r,e){let t=r.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(!t)throw new Error("duplicateAsset: source file has no YAML frontmatter block");let n=t[1],i=new Map(Object.entries(e)),s=n.split(`
457
+ \u{1F4DD} To fix these issues:`),console.log(" - Remove undeclared properties from frontmatter"),console.log(" - Or declare them in the ontology as Property instances")}l.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}var Ro,Oa,x6,ot,Khe,tO,Qhe,nme,ime,sme,eO,cme,ume,sO=je(()=>{"use strict";ct();Ro=require("fs"),Oa=require("path"),x6=require("child_process");hm();ot=J(We());Bi();Pt();C6();qt();Sr();xd();ZS();Khe=new Set(["aliases","archived","tags","cssclasses","publish","permalink","description","image","cover","banner","title","share","share_link","share_updated","metadata","uri"]),tO=new Map([["exo__","https://exocortex.my/ontology/exo#"],["ems__","https://exocortex.my/ontology/ems#"],["exocmd__","https://exocortex.my/ontology/exocmd#"],["ims__","https://exocortex.my/ontology/ims#"],["exoql__","https://exocortex.my/ontology/exoql#"],["query__","https://exocortex.my/ontology/query#"],["ztlk__","https://exocortex.my/ontology/ztlk#"],["ptms__","https://exocortex.my/ontology/ptms#"],["lit__","https://exocortex.my/ontology/lit#"],["inbox__","https://exocortex.my/ontology/inbox#"],["place__","https://exocortex.my/ontology/place#"],["pn__","https://exocortex.my/ontology/pn#"],["period__","https://exocortex.my/ontology/period#"],["rdf__","http://www.w3.org/1999/02/22-rdf-syntax-ns#"],["rdfs__","http://www.w3.org/2000/01/rdf-schema#"],["owl__","http://www.w3.org/2002/07/owl#"],["xsd__","http://www.w3.org/2001/XMLSchema#"],["sh__","http://www.w3.org/ns/shacl#"]]);a(Yhe,"frontmatterMatchesClass");a(O6,"loadTriplesFromAllVaults");Qhe="http://www.w3.org/1999/02/22-rdf-syntax-ns#type";a(P6,"extractFrontmatter");a(F6,"hasKnownPrefix");a(D6,"keyToURI");a(Xhe,"classifyKeys");a(L6,"getStagedMdFiles");a(Jhe,"collectMdFiles");a(Zhe,"extractPropertyNameFromURI");a(eme,"loadDeclaredProperties");a(tme,"detectUnparseableFrontmatter");a(rme,"validateFile");nme="http://www.w3.org/2000/01/rdf-schema#subClassOf",ime="https://exocortex.my/ontology/exo#Class_superClass",sme="http://www.w3.org/2000/01/rdf-schema#label";a(N6,"labelToOntologyIRI");a(ome,"fileIriToOntologyURIFromFilename");a(ame,"domainToAlgebraTriples");eO=class{constructor(e){this.subClassMap=new Map;let t=new Map,n=new Set,i=a(o=>o===nme||o===ime,"isSubClassPredicate");for(let o of e)o.predicate instanceof ot.DomainIRI&&i(o.predicate.value)&&o.subject instanceof ot.DomainIRI&&o.object instanceof ot.DomainIRI&&(n.add(o.subject.value),n.add(o.object.value));for(let o of e)if(o.predicate instanceof ot.DomainIRI&&o.predicate.value===sme&&o.subject instanceof ot.DomainIRI&&o.object instanceof ot.DomainLiteral){let c=N6(o.object.value);c&&t.set(o.subject.value,c)}for(let o of n)if(!t.has(o)){let c=ome(o);c&&t.set(o,c)}for(let[o,c]of t){let l=this.subClassMap.get(o)??new Set;l.add(c),this.subClassMap.set(o,l)}for(let o of e)if(o.predicate instanceof ot.DomainIRI&&i(o.predicate.value)&&o.subject instanceof ot.DomainIRI&&o.object instanceof ot.DomainIRI){let c=o.subject.value,l=o.object.value,u=this.subClassMap.get(c)??new Set;u.add(l),this.subClassMap.set(c,u);let f=t.get(c),d=l.startsWith("obsidian://")?t.get(l):l;if(f&&d){let p=this.subClassMap.get(f)??new Set;p.add(d),this.subClassMap.set(f,p)}}let s=e.filter(o=>o.predicate instanceof ot.DomainIRI&&o.predicate.value===Qhe&&o.subject instanceof ot.DomainIRI&&o.object instanceof ot.DomainIRI);for(let o of s){let c=o.subject.value,l=o.object.value,u=this.collectAncestors(l);for(let d of u){if(c===d)continue;let p=this.subClassMap.get(c)??new Set;p.add(d),this.subClassMap.set(c,p)}let f=t.get(c);if(f)for(let d of u){let p=d.startsWith("obsidian://")?t.get(d):d;if(!p||f===p)continue;let h=this.subClassMap.get(f)??new Set;h.add(p),this.subClassMap.set(f,h)}}}static{a(this,"TripleClassHierarchy")}collectAncestors(e){let t=new Set,n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(n.has(s))continue;n.add(s);let o=this.subClassMap.get(s);if(o)for(let c of o)c!==e&&(t.add(c),n.has(c)||i.push(c))}return t}isSubClassOf(e,t){let n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(s===t)return!0;if(n.has(s))continue;n.add(s);let o=this.subClassMap.get(s);if(o)for(let c of o)i.push(c)}return!1}},cme=new Set(["sh:Warning","sh:Info"]);a(lme,"earlOutcomeFor");a(k6,"buildEARLReport");ume="https://exocortex.my/ontology/exo#Asset_legacyValidationException";a(rO,"applyLegacyExceptionFilter");a(nO,"runShapesValidation");a(iO,"filterReportToStagedFocusNodes");a(fme,"emitEmptyStagedShapesResult");a(dme,"runShapesModeAction");a(pme,"assembleShapesReport");a(M6,"validateSchemaCommand")});var iB={};Sg(iB,{CandidateShaclValidator:()=>hO});function Rme(r){let e=r.match(/^https:\/\/exocortex\.my\/ontology\/([A-Za-z][A-Za-z0-9_]*)#(.+)$/);return e?`${e[1]}__${e[2]}`:r}function Cme(r){let e=(0,Wm.basename)(r);return{path:r,basename:(0,Wm.basename)(r,(0,Wm.extname)(r)),name:e,parent:null}}function xme(r){let e=r.match(Ime);return e?(0,hw.parseYamlFrontmatterTolerant)(e[1]):null}var Wm,hw,Ime,hO,sB=je(()=>{"use strict";Wm=require("path"),hw=J(We());Bi();sO();Ime=/^---\n([\s\S]*?)\n---/,hO=class{constructor(e){this.vaultPath=e}static{a(this,"CandidateShaclValidator")}async validateCandidate(e,t){let n=new $t(this.vaultPath),i=new hw.NoteToRDFConverter(n),s=Cme(e),o=xme(t),c=o?i.validateExocortexAsset(o,s.basename):null;if(c)return{violations:[{propertyPath:c.property,propertyIri:c.property,constraint:c.code,message:`${c.message} \u2014 the asset would be SKIPPED by the indexer (no triples emitted), making it invisible to every query, layout and graph relation.`}],warnings:[]};let l=await i.convertVault(),u;try{u=await i.convertNoteFromFrontmatter(s,o)}catch(_){return{violations:[{propertyPath:e,propertyIri:e,constraint:"indexability",message:`The asset could not be converted to RDF (${_ instanceof Error?_.message:String(_)}) \u2014 the indexer would SKIP it, making it invisible to every query, layout and graph relation.`}],warnings:[]}}let f=[...l,...u],d=await nO(this.vaultPath,f),p=rO(f,d),h=iO(p,new Set([e])),m=[],y=[];for(let _ of h.violations){let b={propertyPath:Rme(_.propertyPath),propertyIri:_.propertyPath,constraint:String(_.constraint),message:_.message,..._.actualValue!==void 0?{actualValue:_.actualValue}:{},..._.expectedRange!==void 0?{expectedRange:_.expectedRange}:{}};_.severity==="sh:Violation"?m.push(b):y.push(b)}return{violations:m,warnings:y}}};a(Rme,"iriToFrontmatterKey");a(Cme,"syntheticFile");a(xme,"extractFrontmatter")});var EB=v(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.createPathBasedTargetResolver=Ws;Tn.createCreateRelatedTaskService=tge;Tn.createCreateRelatedProjectService=rge;Tn.createCreateAssetService=nge;Tn.createArchiveAssetService=ige;Tn.createCleanPropertiesService=sge;Tn.createFixMissingLabelService=oge;Tn.createRenameToUidService=age;Tn.createRepairFolderService=lge;Tn.createPlanForEveningService=uge;Tn.createUpdatePropertyService=fge;Tn.createRemovePropertyService=dge;Tn.createSetStatusService=pge;Tn.createDuplicateAssetService=hge;Tn.rewriteFrontmatterScalars=wB;var Ym=We();function Ws(r){return{resolveFile(e){let t=(0,Ym.iriToVaultPath)(e)??e,n=t.endsWith(".md")?t:`${t}.md`,i=r.getAbstractFileByPath(n);if(!i||!("basename"in i))throw new Error(`Cannot resolve target file for IRI: ${e}`);return i}}}a(Ws,"createPathBasedTargetResolver");var bO=a(()=>null,"NULL_CLASS_RESOLVER");function bw(r){return r.startsWith('"[[')&&r.endsWith(']]"')?r:r.startsWith("[[")&&r.endsWith("]]")?`"${r}"`:`"[[${r}]]"`}a(bw,"toQuotedWikilink");function tge(r,e,t=Ws(r),n,i=bO){return{async execute(s,o){let c=o?.label;if(!c)throw new Error("createRelatedTask requires userInput.label");let l=t.resolveFile(s),u=r.getFrontmatter(l)??{},f=l.parent?.path||"",d={ems__Effort_status:'"[[c42245d0-01de-4c35-bfcf-d910445ea28e]]"'},p=o?.parentProperty;p&&l.basename&&(d[p]=`"[[${l.basename}]]"`);let h=await e.createAsset({className:"ems__Task",label:c,folderPath:f,propertyValues:d,parentFile:l,parentMetadata:u,classResolver:i});n&&await n(h)}}}a(tge,"createCreateRelatedTaskService");function rge(r,e,t=Ws(r),n,i=bO){return{async execute(s,o){let c=o?.label;if(!c)throw new Error("createRelatedProject requires userInput.label");let l=t.resolveFile(s),u=r.getFrontmatter(l)??{},f=l.parent?.path||"",d={ems__Effort_status:'"[[c42245d0-01de-4c35-bfcf-d910445ea28e]]"'},p=o?.parentProperty;p&&l.basename&&(d[p]=`"[[${l.basename}]]"`);let h=await e.createAsset({className:"ems__Project",label:c,folderPath:f,propertyValues:d,parentFile:l,parentMetadata:u,classResolver:i});n&&await n(h)}}}a(rge,"createCreateRelatedProjectService");function nge(r,e,t=bO,n=Ws(r)){return{async execute(i,s){let o=s?.prototypeUID??s?.prototype,c=s?.label,l=s?.folder,u=s?.ownerIdentity,f=s?.isDefinedBy;if(!o)throw new Error("createAsset requires userInput.prototypeUID");if(!c)throw new Error("createAsset requires userInput.label");let d,p;if(i)try{let S=n.resolveFile(i);d=S.path,p=r.getFrontmatter(S)??void 0}catch{}if(!l&&d){let S=d.lastIndexOf("/");l=S>=0?d.substring(0,S):""}if(l===void 0)throw new Error("createAsset requires userInput.folder");let h=o.endsWith("Prototype")?o.slice(0,-9):o,m=crypto.randomUUID(),y=Ym.DateFormatter.toISOTimestamp(new Date),_=`${m}.md`,b=l?`${l}/${_}`:_,T=["---",`exo__Asset_uid: ${m}`,`exo__Asset_createdAt: ${y}`,`exo__Asset_label: ${c}`,`exo__Asset_prototype: "[[${o}]]"`,"exo__Instance_class:",` - "[[${h}]]"`],I=!1;if(f&&(T.push(`exo__Asset_isDefinedBy: ${bw(f)}`),I=!0),p){let S=p.exo__Instance_class,D=(Array.isArray(S)?S:S!=null?[S]:[]).some(M=>Ym.WikiLinkHelpers.resolveSymbolic(String(M),t).includes("Area")),P=d?d.substring(d.lastIndexOf("/")+1).replace(/\.md$/,""):void 0;if(P){let M=D?"ems__Effort_area":"ems__Effort_parent";T.push(`${M}: "[[${P}]]"`)}!D&&p.ems__Effort_area&&T.push(`ems__Effort_area: ${bw(String(p.ems__Effort_area))}`),T.push('ems__Effort_status: "[[753a44d5-846c-4b82-9196-4fd9a4d48777]]"'),!I&&p.exo__Asset_isDefinedBy&&(T.push(`exo__Asset_isDefinedBy: ${bw(String(p.exo__Asset_isDefinedBy))}`),I=!0)}!I&&u&&T.push(`exo__Asset_isDefinedBy: ${bw(u)}`),T.push("---","");let E=T.join(`
458
+ `);await e.createFile(b,E)}}}a(nge,"createCreateAssetService");function ige(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n);await e.archiveAsset(i)}}}a(ige,"createArchiveAssetService");function sge(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n);await e.cleanEmptyProperties(i)}}}a(sge,"createCleanPropertiesService");function oge(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n);await e.fixMissingLabel(i)}}}a(oge,"createFixMissingLabelService");function age(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n),s=r.getFrontmatter(i)??{};await e.renameToUid(i,s)}}}a(age,"createRenameToUidService");async function cge(r,e,t){try{let n=await r.read(t),i=e.parseObject(n);if(i)return i}catch{}return r.getFrontmatter(t)??{}}a(cge,"readFreshFrontmatter");function lge(r,e,t=Ws(r)){let n=new Ym.FrontmatterService;return{async execute(i){let s=t.resolveFile(i),o=await cge(r,n,s),c=await e.getExpectedFolder(s,o);if(c===null)throw new Error("repairFolder: cannot determine expected folder (missing exo__Asset_isDefinedBy or referenced asset not found)");(s.parent?.path??"")!==c&&await e.repairFolder(s,c)}}}a(lge,"createRepairFolderService");function uge(r,e,t=Ws(r)){return{async execute(n){let i=t.resolveFile(n);await e.planForEvening(i)}}}a(uge,"createPlanForEveningService");function fge(r,e,t){return{async execute(n,i){let s=i?.property,o=i?.value;if(!s)throw new Error(`updateProperty requires userInput.property \u2014 pass it via --input '{"property":"<name>","value":"<value>"}'`);if(o===void 0)throw new Error(`updateProperty requires userInput.value \u2014 pass it via --input '{"value":"<value>"}' (e.g. set-planned-start: --input '{"value":"2026-07-25T09:00:00"}')`);let c=await t.resolveTargetPath(n),l=await r.readFile(c),u=e.updateProperty(l,s,o);await r.updateFile(c,u)}}}a(fge,"createUpdatePropertyService");function dge(r,e,t){return{async execute(n,i){let s=i?.property;if(!s)throw new Error("removeProperty requires userInput.property");let o=await t.resolveTargetPath(n),c=await r.readFile(o),l=e.removeProperty(c,s);await r.updateFile(o,l)}}}a(dge,"createRemovePropertyService");function pge(r,e,t){return{async execute(n,i){let s=i?.statusUID;if(!s)throw new Error("setStatus requires userInput.statusUID");let o=await t.resolveTargetPath(n),c=await r.readFile(o),l=e.updateProperty(c,"ems__Effort_status",`"[[${s}]]"`);await r.updateFile(o,l)}}}a(pge,"createSetStatusService");function hge(r,e=Ws(r),t){return{async execute(n){if(!n)throw new Error("duplicateAsset requires an active target \u2014 open an Exocortex asset before invoking");let i=e.resolveFile(n),s=await r.read(i),o=crypto.randomUUID(),c=Ym.DateFormatter.toLocalTimestamp(new Date),l=wB(s,{exo__Asset_uid:o,exo__Asset_createdAt:c}),u=i.parent?.path??"",f=u?`${u}/${o}.md`:`${o}.md`,d=await r.create(f,l);t&&await t(d)}}}a(hge,"createDuplicateAssetService");function wB(r,e){let t=r.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(!t)throw new Error("duplicateAsset: source file has no YAML frontmatter block");let n=t[1],i=new Map(Object.entries(e)),s=n.split(`
459
459
  `).map(u=>{let f=u.match(/^([A-Za-z_][A-Za-z0-9_]*):/);if(!f)return u;let d=f[1],p=i.get(d);return p===void 0?u:(i.delete(d),`${d}: ${p}`)});for(let[u,f]of i)s.push(`${u}: ${f}`);let o=s.join(`
460
460
  `),c=t[0].includes(`\r
461
461
  `)?`\r
462
462
  `:`
463
- `;return`---${c}${o}${c}---`+r.slice(t[0].length)}a(wB,"rewriteFrontmatterScalars")});var vB=v(SO=>{"use strict";Object.defineProperty(SO,"__esModule",{value:!0});SO.createInstantiatePrototypeSubtreeService=bge;var Na=We(),hge="753a44d5-846c-4b82-9196-4fd9a4d48777",mge="ems__EffortPrototype_parentEffortPrototype",gge="8619c4fc-64f1-4869-b17e-e34186cacca9";function yge(r){if(typeof r!="string")return;let e=r.match(/\[\[[^\]|]+\|([^\]]+)\]\]/);return e?e[1].trim():void 0}a(yge,"extractAlias");function Sw(r){let e=String(ka(r)??""),t=e.match(/^"(.*)"$|^'(.*)'$/);return t?t[1]??t[2]??"":e}a(Sw,"plainScalar");function ka(r){return Array.isArray(r)?r[0]:r}a(ka,"firstValue");function _ge(r){let e=r.replace(/\.md$/,""),t=e.substring(e.lastIndexOf("/")+1);return decodeURIComponent(t)}a(_ge,"uidFromIRI");function bge(r,e){return{async execute(t,n){let i=new Map;for(let E of r.getAllFiles()){let S=r.getFrontmatter(E);if(!S)continue;let R=S.exo__Asset_uid??E.basename;i.set(R,{file:E,fm:S,uid:R})}let s=a(E=>{let S=yge(ka(E));if(S)return S;let R=(0,Na.extractAssetReference)(ka(E));if(!R)return;let D=i.get(R);return D?Sw(D.fm.exo__Asset_label):R},"classLabel"),o=a(E=>{for(let[S,R]of i){if(Sw(R.fm.exo__Asset_label)!==E)continue;if((0,Na.extractAssetReference)(ka(R.fm.exo__Instance_class))===gge)return S}},"classUidByLabel"),c=_ge(t);if(!i.get(c))throw new Error(`instantiatePrototypeSubtree: root prototype not found for target "${t}" (uid ${c})`);let u=new Set([c]),f=!0;for(;f;){f=!1;for(let[E,S]of i){if(u.has(E))continue;let R=(0,Na.extractAssetReference)(ka(S.fm[mge]));R&&u.has(R)&&(u.add(E),f=!0)}}let d=new Map;for(let E of u)d.set(E,crypto.randomUUID());let p={},h=[],m;for(let[E,S]of Object.entries(n??{})){if(S==null||E==="label"||E==="body")continue;let R=(0,Na.extractAssetReference)(ka(S)),D=R?i.get(R):void 0;if(D){let P=D.fm.exo__Asset_label?Sw(D.fm.exo__Asset_label):void 0;p[E]=P??String(S),(s(D.fm.exo__Instance_class)??"").includes("Project")?m||(m=R??void 0):h.push(R)}else p[E]=String(S)}let y=a(E=>{let S=String(E??"");for(let[R,D]of Object.entries(p))S=S.split(`{{${R}}}`).join(D);return S},"substitute"),_=new Set(h);for(let E of i.values()){if((0,Na.extractAssetReference)(ka(E.fm.exo__Asset_prototype))!==c)continue;let R=E.fm.exo__Asset_relates,D=new Set((Array.isArray(R)?R:R!=null?[R]:[]).map(P=>(0,Na.extractAssetReference)(P)).filter(P=>P!=null));if(D.size===_.size&&[..._].every(P=>D.has(P)))throw new Error(`instantiatePrototypeSubtree: already deployed \u2014 an instance of prototype ${c} with the same ref-params [${[..._].join(", ")}] already exists (${E.file.path}). Refusing to duplicate the subgraph.`)}let b=new Map;for(let E of u){let S=i.get(E);if(!S)continue;let R=s(S.fm.exo__Instance_class),D=R&&R.endsWith("Prototype")?R.slice(0,-9):R;if(!D)throw new Error(`instantiatePrototypeSubtree: cannot resolve instance class for subtree node ${E} (${S.file.path}) \u2014 its exo__Instance_class is missing or unresolvable. Aborting so no asset is written with a dangling [[undefined]] class.`);let P=o(D);if(!P)throw new Error(`instantiatePrototypeSubtree: cannot resolve class UID for instance class \xAB${D}\xBB (subtree node ${E}, ${S.file.path}) \u2014 no class-definition asset with that label is loaded. Aborting so no asset is written with a dangling [[${D}]] class wikilink.`);b.set(E,`[[${P}|${D}]]`)}let T=Na.DateFormatter.toISOTimestamp(new Date),I=[c,...[...u].filter(E=>E!==c)];for(let E of I){let S=i.get(E);if(!S)continue;let{file:R,fm:D}=S,P=d.get(E),M=b.get(E),O=y(Sw(D.exo__Asset_label)),L=["---",`exo__Asset_uid: ${P}`];D.exo__Asset_isDefinedBy&&L.push(`exo__Asset_isDefinedBy: "[[${(0,Na.extractAssetReference)(ka(D.exo__Asset_isDefinedBy))}]]"`),L.push(`exo__Asset_createdAt: ${T}`,`exo__Asset_updatedAt: ${T}`,"exo__Instance_class:",` - "${M}"`,`exo__Asset_label: ${JSON.stringify(O)}`,"aliases:",` - ${JSON.stringify(O)}`,`exo__Asset_prototype: "[[${E}]]"`,`ems__Effort_status: "[[${hge}]]"`);let te=(0,Na.extractAssetReference)(ka(D.ems__Effort_blocker));if(te){let ce=d.get(te)??te;L.push(`ems__Effort_blocker: "[[${ce}]]"`)}if(E===c){if(h.length>0){L.push("exo__Asset_relates:");for(let ce of h)L.push(` - "[[${ce}]]"`)}m&&L.push(`ems__Effort_parent: "[[${m}]]"`)}else L.push(`ems__Effort_parent: "[[${d.get(c)}]]"`);L.push("---","");let re=L.join(`
464
- `),V=R.path.lastIndexOf("/"),K=V>=0?R.path.substring(0,V):"",Se=K?`${K}/${P}.md`:`${P}.md`;await e.createFile(Se,re)}}}}a(bge,"createInstantiatePrototypeSubtreeService")});var TB=v(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.createInstantiatePrototypeSubtreeService=dt.createPathBasedTargetResolver=dt.rewriteFrontmatterScalars=dt.createDuplicateAssetService=dt.createSetStatusService=dt.createRemovePropertyService=dt.createUpdatePropertyService=dt.createPlanForEveningService=dt.createRepairFolderService=dt.createRenameToUidService=dt.createFixMissingLabelService=dt.createCleanPropertiesService=dt.createArchiveAssetService=dt.createCreateRelatedProjectService=dt.createCreateRelatedTaskService=dt.createCreateAssetService=void 0;var li=EB();Object.defineProperty(dt,"createCreateAssetService",{enumerable:!0,get:a(function(){return li.createCreateAssetService},"get")});Object.defineProperty(dt,"createCreateRelatedTaskService",{enumerable:!0,get:a(function(){return li.createCreateRelatedTaskService},"get")});Object.defineProperty(dt,"createCreateRelatedProjectService",{enumerable:!0,get:a(function(){return li.createCreateRelatedProjectService},"get")});Object.defineProperty(dt,"createArchiveAssetService",{enumerable:!0,get:a(function(){return li.createArchiveAssetService},"get")});Object.defineProperty(dt,"createCleanPropertiesService",{enumerable:!0,get:a(function(){return li.createCleanPropertiesService},"get")});Object.defineProperty(dt,"createFixMissingLabelService",{enumerable:!0,get:a(function(){return li.createFixMissingLabelService},"get")});Object.defineProperty(dt,"createRenameToUidService",{enumerable:!0,get:a(function(){return li.createRenameToUidService},"get")});Object.defineProperty(dt,"createRepairFolderService",{enumerable:!0,get:a(function(){return li.createRepairFolderService},"get")});Object.defineProperty(dt,"createPlanForEveningService",{enumerable:!0,get:a(function(){return li.createPlanForEveningService},"get")});Object.defineProperty(dt,"createUpdatePropertyService",{enumerable:!0,get:a(function(){return li.createUpdatePropertyService},"get")});Object.defineProperty(dt,"createRemovePropertyService",{enumerable:!0,get:a(function(){return li.createRemovePropertyService},"get")});Object.defineProperty(dt,"createSetStatusService",{enumerable:!0,get:a(function(){return li.createSetStatusService},"get")});Object.defineProperty(dt,"createDuplicateAssetService",{enumerable:!0,get:a(function(){return li.createDuplicateAssetService},"get")});Object.defineProperty(dt,"rewriteFrontmatterScalars",{enumerable:!0,get:a(function(){return li.rewriteFrontmatterScalars},"get")});Object.defineProperty(dt,"createPathBasedTargetResolver",{enumerable:!0,get:a(function(){return li.createPathBasedTargetResolver},"get")});var Sge=vB();Object.defineProperty(dt,"createInstantiatePrototypeSubtreeService",{enumerable:!0,get:a(function(){return Sge.createInstantiatePrototypeSubtreeService},"get")})});var r0e={};Sg(r0e,{createProgram:()=>Bw});module.exports=wg(r0e);var m9e=J(lE());ct();ct();var qm=require("fs"),Xx=require("path"),wr=J(We());Bi();var Rd=class{static{a(this,"TableFormatter")}format(e){if(e.length===0)return"No results";let t=this.getAllVariables(e),n=e.map(i=>this.solutionToRow(i,t));return this.renderTable(t,n)}getAllVariables(e){let t=new Set;for(let n of e)for(let i of n.variables())t.add(i);return Array.from(t).sort()}solutionToRow(e,t){return t.map(n=>{let i=e.get(n);return i?this.formatValue(i.toString()):""})}formatValue(e){return e.length>50?e.substring(0,47)+"...":e}renderTable(e,t){let n=e.map((s,o)=>{let c=s.length+1,l=Math.max(...t.map(u=>u[o]?.length||0));return Math.max(c,l,10)}),i=[];i.push(this.renderSeparator(n,"top")),i.push(this.renderRow(e.map(s=>`?${s}`),n)),i.push(this.renderSeparator(n,"mid"));for(let s of t)i.push(this.renderRow(s,n));return i.push(this.renderSeparator(n,"bottom")),i.join(`
463
+ `;return`---${c}${o}${c}---`+r.slice(t[0].length)}a(wB,"rewriteFrontmatterScalars")});var vB=v(SO=>{"use strict";Object.defineProperty(SO,"__esModule",{value:!0});SO.createInstantiatePrototypeSubtreeService=Sge;var Na=We(),mge="753a44d5-846c-4b82-9196-4fd9a4d48777",gge="ems__EffortPrototype_parentEffortPrototype",yge="8619c4fc-64f1-4869-b17e-e34186cacca9";function _ge(r){if(typeof r!="string")return;let e=r.match(/\[\[[^\]|]+\|([^\]]+)\]\]/);return e?e[1].trim():void 0}a(_ge,"extractAlias");function Sw(r){let e=String(ka(r)??""),t=e.match(/^"(.*)"$|^'(.*)'$/);return t?t[1]??t[2]??"":e}a(Sw,"plainScalar");function ka(r){return Array.isArray(r)?r[0]:r}a(ka,"firstValue");function bge(r){let e=r.replace(/\.md$/,""),t=e.substring(e.lastIndexOf("/")+1);return decodeURIComponent(t)}a(bge,"uidFromIRI");function Sge(r,e){return{async execute(t,n){let i=new Map;for(let E of r.getAllFiles()){let S=r.getFrontmatter(E);if(!S)continue;let R=S.exo__Asset_uid??E.basename;i.set(R,{file:E,fm:S,uid:R})}let s=a(E=>{let S=_ge(ka(E));if(S)return S;let R=(0,Na.extractAssetReference)(ka(E));if(!R)return;let D=i.get(R);return D?Sw(D.fm.exo__Asset_label):R},"classLabel"),o=a(E=>{for(let[S,R]of i){if(Sw(R.fm.exo__Asset_label)!==E)continue;if((0,Na.extractAssetReference)(ka(R.fm.exo__Instance_class))===yge)return S}},"classUidByLabel"),c=bge(t);if(!i.get(c))throw new Error(`instantiatePrototypeSubtree: root prototype not found for target "${t}" (uid ${c})`);let u=new Set([c]),f=!0;for(;f;){f=!1;for(let[E,S]of i){if(u.has(E))continue;let R=(0,Na.extractAssetReference)(ka(S.fm[gge]));R&&u.has(R)&&(u.add(E),f=!0)}}let d=new Map;for(let E of u)d.set(E,crypto.randomUUID());let p={},h=[],m;for(let[E,S]of Object.entries(n??{})){if(S==null||E==="label"||E==="body")continue;let R=(0,Na.extractAssetReference)(ka(S)),D=R?i.get(R):void 0;if(D){let P=D.fm.exo__Asset_label?Sw(D.fm.exo__Asset_label):void 0;p[E]=P??String(S),(s(D.fm.exo__Instance_class)??"").includes("Project")?m||(m=R??void 0):h.push(R)}else p[E]=String(S)}let y=a(E=>{let S=String(E??"");for(let[R,D]of Object.entries(p))S=S.split(`{{${R}}}`).join(D);return S},"substitute"),_=new Set(h);for(let E of i.values()){if((0,Na.extractAssetReference)(ka(E.fm.exo__Asset_prototype))!==c)continue;let R=E.fm.exo__Asset_relates,D=new Set((Array.isArray(R)?R:R!=null?[R]:[]).map(P=>(0,Na.extractAssetReference)(P)).filter(P=>P!=null));if(D.size===_.size&&[..._].every(P=>D.has(P)))throw new Error(`instantiatePrototypeSubtree: already deployed \u2014 an instance of prototype ${c} with the same ref-params [${[..._].join(", ")}] already exists (${E.file.path}). Refusing to duplicate the subgraph.`)}let b=new Map;for(let E of u){let S=i.get(E);if(!S)continue;let R=s(S.fm.exo__Instance_class),D=R&&R.endsWith("Prototype")?R.slice(0,-9):R;if(!D)throw new Error(`instantiatePrototypeSubtree: cannot resolve instance class for subtree node ${E} (${S.file.path}) \u2014 its exo__Instance_class is missing or unresolvable. Aborting so no asset is written with a dangling [[undefined]] class.`);let P=o(D);if(!P)throw new Error(`instantiatePrototypeSubtree: cannot resolve class UID for instance class \xAB${D}\xBB (subtree node ${E}, ${S.file.path}) \u2014 no class-definition asset with that label is loaded. Aborting so no asset is written with a dangling [[${D}]] class wikilink.`);b.set(E,`[[${P}|${D}]]`)}let T=Na.DateFormatter.toISOTimestamp(new Date),I=[c,...[...u].filter(E=>E!==c)];for(let E of I){let S=i.get(E);if(!S)continue;let{file:R,fm:D}=S,P=d.get(E),M=b.get(E),O=y(Sw(D.exo__Asset_label)),L=["---",`exo__Asset_uid: ${P}`];D.exo__Asset_isDefinedBy&&L.push(`exo__Asset_isDefinedBy: "[[${(0,Na.extractAssetReference)(ka(D.exo__Asset_isDefinedBy))}]]"`),L.push(`exo__Asset_createdAt: ${T}`,`exo__Asset_updatedAt: ${T}`,"exo__Instance_class:",` - "${M}"`,`exo__Asset_label: ${JSON.stringify(O)}`,"aliases:",` - ${JSON.stringify(O)}`,`exo__Asset_prototype: "[[${E}]]"`,`ems__Effort_status: "[[${mge}]]"`);let te=(0,Na.extractAssetReference)(ka(D.ems__Effort_blocker));if(te){let ce=d.get(te)??te;L.push(`ems__Effort_blocker: "[[${ce}]]"`)}if(E===c){if(h.length>0){L.push("exo__Asset_relates:");for(let ce of h)L.push(` - "[[${ce}]]"`)}m&&L.push(`ems__Effort_parent: "[[${m}]]"`)}else L.push(`ems__Effort_parent: "[[${d.get(c)}]]"`);L.push("---","");let re=L.join(`
464
+ `),V=R.path.lastIndexOf("/"),K=V>=0?R.path.substring(0,V):"",Se=K?`${K}/${P}.md`:`${P}.md`;await e.createFile(Se,re)}}}}a(Sge,"createInstantiatePrototypeSubtreeService")});var TB=v(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.createInstantiatePrototypeSubtreeService=dt.createPathBasedTargetResolver=dt.rewriteFrontmatterScalars=dt.createDuplicateAssetService=dt.createSetStatusService=dt.createRemovePropertyService=dt.createUpdatePropertyService=dt.createPlanForEveningService=dt.createRepairFolderService=dt.createRenameToUidService=dt.createFixMissingLabelService=dt.createCleanPropertiesService=dt.createArchiveAssetService=dt.createCreateRelatedProjectService=dt.createCreateRelatedTaskService=dt.createCreateAssetService=void 0;var li=EB();Object.defineProperty(dt,"createCreateAssetService",{enumerable:!0,get:a(function(){return li.createCreateAssetService},"get")});Object.defineProperty(dt,"createCreateRelatedTaskService",{enumerable:!0,get:a(function(){return li.createCreateRelatedTaskService},"get")});Object.defineProperty(dt,"createCreateRelatedProjectService",{enumerable:!0,get:a(function(){return li.createCreateRelatedProjectService},"get")});Object.defineProperty(dt,"createArchiveAssetService",{enumerable:!0,get:a(function(){return li.createArchiveAssetService},"get")});Object.defineProperty(dt,"createCleanPropertiesService",{enumerable:!0,get:a(function(){return li.createCleanPropertiesService},"get")});Object.defineProperty(dt,"createFixMissingLabelService",{enumerable:!0,get:a(function(){return li.createFixMissingLabelService},"get")});Object.defineProperty(dt,"createRenameToUidService",{enumerable:!0,get:a(function(){return li.createRenameToUidService},"get")});Object.defineProperty(dt,"createRepairFolderService",{enumerable:!0,get:a(function(){return li.createRepairFolderService},"get")});Object.defineProperty(dt,"createPlanForEveningService",{enumerable:!0,get:a(function(){return li.createPlanForEveningService},"get")});Object.defineProperty(dt,"createUpdatePropertyService",{enumerable:!0,get:a(function(){return li.createUpdatePropertyService},"get")});Object.defineProperty(dt,"createRemovePropertyService",{enumerable:!0,get:a(function(){return li.createRemovePropertyService},"get")});Object.defineProperty(dt,"createSetStatusService",{enumerable:!0,get:a(function(){return li.createSetStatusService},"get")});Object.defineProperty(dt,"createDuplicateAssetService",{enumerable:!0,get:a(function(){return li.createDuplicateAssetService},"get")});Object.defineProperty(dt,"rewriteFrontmatterScalars",{enumerable:!0,get:a(function(){return li.rewriteFrontmatterScalars},"get")});Object.defineProperty(dt,"createPathBasedTargetResolver",{enumerable:!0,get:a(function(){return li.createPathBasedTargetResolver},"get")});var wge=vB();Object.defineProperty(dt,"createInstantiatePrototypeSubtreeService",{enumerable:!0,get:a(function(){return wge.createInstantiatePrototypeSubtreeService},"get")})});var n0e={};Sg(n0e,{createProgram:()=>Bw});module.exports=wg(n0e);var g9e=J(lE());ct();ct();var qm=require("fs"),Xx=require("path"),wr=J(We());Bi();var Rd=class{static{a(this,"TableFormatter")}format(e){if(e.length===0)return"No results";let t=this.getAllVariables(e),n=e.map(i=>this.solutionToRow(i,t));return this.renderTable(t,n)}getAllVariables(e){let t=new Set;for(let n of e)for(let i of n.variables())t.add(i);return Array.from(t).sort()}solutionToRow(e,t){return t.map(n=>{let i=e.get(n);return i?this.formatValue(i.toString()):""})}formatValue(e){return e.length>50?e.substring(0,47)+"...":e}renderTable(e,t){let n=e.map((s,o)=>{let c=s.length+1,l=Math.max(...t.map(u=>u[o]?.length||0));return Math.max(c,l,10)}),i=[];i.push(this.renderSeparator(n,"top")),i.push(this.renderRow(e.map(s=>`?${s}`),n)),i.push(this.renderSeparator(n,"mid"));for(let s of t)i.push(this.renderRow(s,n));return i.push(this.renderSeparator(n,"bottom")),i.join(`
465
465
  `)}renderRow(e,t){return`\u2502 ${e.map((i,s)=>i.padEnd(t[s])).join(" \u2502 ")} \u2502`}renderSeparator(e,t){let n=t==="top"?"\u250C":t==="mid"?"\u251C":"\u2514",i=t==="top"?"\u2510":t==="mid"?"\u2524":"\u2518",o=t==="mid"?"\u2500\u253C\u2500":"\u2500"+(t==="mid"?"\u253C":"\u2500")+"\u2500",c=e.map(l=>"\u2500".repeat(l+2));return`${n}${c.join(o)}${i}`}};var PS=class{static{a(this,"JsonFormatter")}format(e){let t=e.map(n=>n.toJSON());return JSON.stringify(t,null,2)}};var FS=class{static{a(this,"CsvFormatter")}format(e){if(e.length===0)return"";let t=this.getAllVariables(e),n=[];n.push(t.join(","));for(let i of e){let s=t.map(o=>{let c=i.get(o);return c?this.escapeValue(c.toString()):""});n.push(s.join(","))}return n.join(`
466
466
  `)}getAllVariables(e){let t=new Set;for(let n of e)for(let i of n.variables())t.add(i);return Array.from(t).sort()}escapeValue(e){return e.includes(",")||e.includes('"')||e.includes(`
467
467
  `)||e.includes("\r")?`"${e.replace(/"/g,'""')}"`:e}};var Cd=class{static{a(this,"TriplesFormatter")}formatNTriples(e){return e.map(t=>t.toString()).join(`
468
468
  `)}formatTable(e){if(e.length===0)return"No triples generated.";let t=[];t.push("Subject | Predicate | Object"),t.push("------- | --------- | ------");for(let n of e){let i=this.formatNode(n.subject),s=this.formatNode(n.predicate),o=this.formatNode(n.object);t.push(`${i} | ${s} | ${o}`)}return t.join(`
469
469
  `)}formatJson(e){let t=e.map(n=>({subject:this.nodeToJson(n.subject),predicate:this.nodeToJson(n.predicate),object:this.nodeToJson(n.object)}));return JSON.stringify(t,null,2)}formatNode(e){return e.value!==void 0?String(e.value):String(e)}nodeToJson(e){return"datatype"in e||"language"in e?{type:"literal",value:String(e.value),...e.datatype&&{datatype:e.datatype.value||String(e.datatype)},...e.language&&{language:e.language}}:"id"in e&&String(e.id).startsWith("_:")?{type:"bnode",value:String(e.id)}:{type:"uri",value:String(e.value)}}};Pt();qt();Sr();mr();xd();var LU=J(require("crypto")),ru=J(require("path")),NU=J(require("os")),on=J(Ta());var gpe=500,ype=50*1024*1024,xa=class{static{a(this,"QueryResultCache")}constructor(e={}){this.cacheDir=e.cacheDir??ru.default.join(NU.default.homedir(),".exocortex","cache","query-results"),this.maxEntries=e.maxEntries??gpe,this.maxSizeBytes=e.maxSizeBytes??ype}getCacheDir(){return this.cacheDir}getCacheKey(e){let t=e.trim().replace(/\s+/g," ");return LU.default.createHash("sha256").update(t).digest("hex")}async get(e,t,n){let i=this.getCacheKey(e),s=this.getCachePath(i);try{if(!await on.default.pathExists(s))return null;let o=await on.default.readJson(s),c=Date.now()-o.timestamp,l=t*1e3;return c>l?(await on.default.remove(s),null):n&&o.vaultSignature&&o.vaultSignature!==n?(await on.default.remove(s),null):o.result}catch{return null}}async set(e,t,n,i){let s=this.getCacheKey(e),o=this.getCachePath(s);await on.default.ensureDir(this.cacheDir);let c={timestamp:Date.now(),result:t,...i?{vaultSignature:i}:{}};await on.default.writeJson(o,c,{spaces:0}),await this.prune(s)}async prune(e){try{let t=Number.isFinite(this.maxEntries)&&this.maxEntries>0,n=Number.isFinite(this.maxSizeBytes)&&this.maxSizeBytes>0;if(!t&&!n)return;let s=(await on.default.readdir(this.cacheDir)).filter(d=>d.endsWith(".json")),o=[],c=0,l=`${e}.json`;for(let d of s){if(d===l){try{let p=await on.default.stat(ru.default.join(this.cacheDir,d));c+=p.size}catch{}continue}try{let p=ru.default.join(this.cacheDir,d),h=await on.default.stat(p);o.push({path:p,mtimeMs:h.mtimeMs,size:h.size}),c+=h.size}catch{}}let u=o.length+1,f=a(()=>t&&u>this.maxEntries||n&&c>this.maxSizeBytes,"overCap");if(!f())return;o.sort((d,p)=>d.mtimeMs-p.mtimeMs);for(let d of o){if(!f())break;try{await on.default.remove(d.path),u--,c-=d.size}catch{}}}catch{}}async isCached(e,t){return await this.get(e,t)!==null}async invalidate(e){let t=this.getCacheKey(e),n=this.getCachePath(t);try{await on.default.remove(n)}catch{}}async clear(){try{if(await on.default.pathExists(this.cacheDir)){let e=await on.default.readdir(this.cacheDir);await Promise.all(e.filter(t=>t.endsWith(".json")).map(t=>on.default.remove(ru.default.join(this.cacheDir,t))))}}catch{}}async getCacheStats(){try{if(!await on.default.pathExists(this.cacheDir))return{entryCount:0,totalSizeBytes:0};let t=(await on.default.readdir(this.cacheDir)).filter(i=>i.endsWith(".json")),n=0;for(let i of t){let s=await on.default.stat(ru.default.join(this.cacheDir,i));n+=s.size}return{entryCount:t.length,totalSizeBytes:n}}catch{return{entryCount:0,totalSizeBytes:0}}}getCachePath(e){return ru.default.join(this.cacheDir,`${e}.json`)}};var Sx=J(Ta()),wx=J(require("path")),kU=J(require("crypto"));async function MU(r){let e=[],t=a(async n=>{let i;try{i=await Sx.default.readdir(n,{withFileTypes:!0})}catch{return}for(let s of i){let o=wx.default.join(n,s.name);if(s.isDirectory()){if(s.name===".git"||s.name==="node_modules"||s.name===".exocortex")continue;await t(o)}else if(s.name.endsWith(".md"))try{let c=await Sx.default.stat(o);e.push(`${wx.default.relative(r,o)}:${c.mtimeMs}`)}catch{}}},"walk");try{await t(r)}catch{return null}return e.length===0?null:(e.sort(),kU.default.createHash("sha256").update(e.join(`
470
- `)).digest("hex"))}a(MU,"computeVaultSignature");var Dd=J(require("node:process"),1),l6=require("node:util");var jU=a((r=0)=>e=>`\x1B[${e+r}m`,"wrapAnsi16"),$U=a((r=0)=>e=>`\x1B[${38+r};5;${e}m`,"wrapAnsi256"),UU=a((r=0)=>(e,t,n)=>`\x1B[${38+r};2;${e};${t};${n}m`,"wrapAnsi16m"),Zt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Z3e=Object.keys(Zt.modifier),_pe=Object.keys(Zt.color),bpe=Object.keys(Zt.bgColor),eFe=[..._pe,...bpe];function Spe(){let r=new Map;for(let[e,t]of Object.entries(Zt)){for(let[n,i]of Object.entries(t))Zt[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[n]=Zt[n],r.set(i[0],i[1]);Object.defineProperty(Zt,e,{value:t,enumerable:!1})}return Object.defineProperty(Zt,"codes",{value:r,enumerable:!1}),Zt.color.close="\x1B[39m",Zt.bgColor.close="\x1B[49m",Zt.color.ansi=jU(),Zt.color.ansi256=$U(),Zt.color.ansi16m=UU(),Zt.bgColor.ansi=jU(10),Zt.bgColor.ansi256=$U(10),Zt.bgColor.ansi16m=UU(10),Object.defineProperties(Zt,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:a(e=>Zt.rgbToAnsi256(...Zt.hexToRgb(e)),"value"),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,i;if(e>=232)t=((e-232)*10+8)/255,n=t,i=t;else{e-=16;let c=e%36;t=Math.floor(e/36)/5,n=Math.floor(c/6)/5,i=c%6/5}let s=Math.max(t,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(t));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:a((e,t,n)=>Zt.ansi256ToAnsi(Zt.rgbToAnsi256(e,t,n)),"value"),enumerable:!1},hexToAnsi:{value:a(e=>Zt.ansi256ToAnsi(Zt.hexToAnsi256(e)),"value"),enumerable:!1}}),Zt}a(Spe,"assembleStyles");var wpe=Spe(),Us=wpe;var kS=J(require("node:process"),1),VU=J(require("node:os"),1),Ex=J(require("node:tty"),1);function rs(r,e=globalThis.Deno?globalThis.Deno.args:kS.default.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}a(rs,"hasFlag");var{env:er}=kS.default,NS;rs("no-color")||rs("no-colors")||rs("color=false")||rs("color=never")?NS=0:(rs("color")||rs("colors")||rs("color=true")||rs("color=always"))&&(NS=1);function Epe(){if("FORCE_COLOR"in er)return er.FORCE_COLOR==="true"?1:er.FORCE_COLOR==="false"?0:er.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(er.FORCE_COLOR,10),3)}a(Epe,"envForceColor");function vpe(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}a(vpe,"translateLevel");function Tpe(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let n=Epe();n!==void 0&&(NS=n);let i=t?NS:n;if(i===0)return 0;if(t){if(rs("color=16m")||rs("color=full")||rs("color=truecolor"))return 3;if(rs("color=256"))return 2}if("TF_BUILD"in er&&"AGENT_NAME"in er)return 1;if(r&&!e&&i===void 0)return 0;let s=i||0;if(er.TERM==="dumb")return s;if(kS.default.platform==="win32"){let o=VU.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in er)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in er)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in er)||er.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in er)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(er.TEAMCITY_VERSION)?1:0;if(er.COLORTERM==="truecolor"||er.TERM==="xterm-kitty"||er.TERM==="xterm-ghostty"||er.TERM==="wezterm")return 3;if("TERM_PROGRAM"in er){let o=Number.parseInt((er.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(er.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(er.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(er.TERM)||"COLORTERM"in er?1:s}a(Tpe,"_supportsColor");function BU(r,e={}){let t=Tpe(r,{streamIsTTY:r&&r.isTTY,...e});return vpe(t)}a(BU,"createSupportsColor");var Ape={stdout:BU({isTTY:Ex.default.isatty(1)}),stderr:BU({isTTY:Ex.default.isatty(2)})},GU=Ape;function qU(r,e,t){let n=r.indexOf(e);if(n===-1)return r;let i=e.length,s=0,o="";do o+=r.slice(s,n)+e+t,s=n+i,n=r.indexOf(e,s);while(n!==-1);return o+=r.slice(s),o}a(qU,"stringReplaceAll");function WU(r,e,t,n){let i=0,s="";do{let o=r[n-1]==="\r";s+=r.slice(i,o?n-1:n)+e+(o?`\r
470
+ `)).digest("hex"))}a(MU,"computeVaultSignature");var Dd=J(require("node:process"),1),l6=require("node:util");var jU=a((r=0)=>e=>`\x1B[${e+r}m`,"wrapAnsi16"),$U=a((r=0)=>e=>`\x1B[${38+r};5;${e}m`,"wrapAnsi256"),UU=a((r=0)=>(e,t,n)=>`\x1B[${38+r};2;${e};${t};${n}m`,"wrapAnsi16m"),Zt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},eFe=Object.keys(Zt.modifier),_pe=Object.keys(Zt.color),bpe=Object.keys(Zt.bgColor),tFe=[..._pe,...bpe];function Spe(){let r=new Map;for(let[e,t]of Object.entries(Zt)){for(let[n,i]of Object.entries(t))Zt[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[n]=Zt[n],r.set(i[0],i[1]);Object.defineProperty(Zt,e,{value:t,enumerable:!1})}return Object.defineProperty(Zt,"codes",{value:r,enumerable:!1}),Zt.color.close="\x1B[39m",Zt.bgColor.close="\x1B[49m",Zt.color.ansi=jU(),Zt.color.ansi256=$U(),Zt.color.ansi16m=UU(),Zt.bgColor.ansi=jU(10),Zt.bgColor.ansi256=$U(10),Zt.bgColor.ansi16m=UU(10),Object.defineProperties(Zt,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:a(e=>Zt.rgbToAnsi256(...Zt.hexToRgb(e)),"value"),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,i;if(e>=232)t=((e-232)*10+8)/255,n=t,i=t;else{e-=16;let c=e%36;t=Math.floor(e/36)/5,n=Math.floor(c/6)/5,i=c%6/5}let s=Math.max(t,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(t));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:a((e,t,n)=>Zt.ansi256ToAnsi(Zt.rgbToAnsi256(e,t,n)),"value"),enumerable:!1},hexToAnsi:{value:a(e=>Zt.ansi256ToAnsi(Zt.hexToAnsi256(e)),"value"),enumerable:!1}}),Zt}a(Spe,"assembleStyles");var wpe=Spe(),Us=wpe;var kS=J(require("node:process"),1),VU=J(require("node:os"),1),Ex=J(require("node:tty"),1);function rs(r,e=globalThis.Deno?globalThis.Deno.args:kS.default.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}a(rs,"hasFlag");var{env:er}=kS.default,NS;rs("no-color")||rs("no-colors")||rs("color=false")||rs("color=never")?NS=0:(rs("color")||rs("colors")||rs("color=true")||rs("color=always"))&&(NS=1);function Epe(){if("FORCE_COLOR"in er)return er.FORCE_COLOR==="true"?1:er.FORCE_COLOR==="false"?0:er.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(er.FORCE_COLOR,10),3)}a(Epe,"envForceColor");function vpe(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}a(vpe,"translateLevel");function Tpe(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let n=Epe();n!==void 0&&(NS=n);let i=t?NS:n;if(i===0)return 0;if(t){if(rs("color=16m")||rs("color=full")||rs("color=truecolor"))return 3;if(rs("color=256"))return 2}if("TF_BUILD"in er&&"AGENT_NAME"in er)return 1;if(r&&!e&&i===void 0)return 0;let s=i||0;if(er.TERM==="dumb")return s;if(kS.default.platform==="win32"){let o=VU.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in er)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in er)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in er)||er.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in er)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(er.TEAMCITY_VERSION)?1:0;if(er.COLORTERM==="truecolor"||er.TERM==="xterm-kitty"||er.TERM==="xterm-ghostty"||er.TERM==="wezterm")return 3;if("TERM_PROGRAM"in er){let o=Number.parseInt((er.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(er.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(er.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(er.TERM)||"COLORTERM"in er?1:s}a(Tpe,"_supportsColor");function BU(r,e={}){let t=Tpe(r,{streamIsTTY:r&&r.isTTY,...e});return vpe(t)}a(BU,"createSupportsColor");var Ape={stdout:BU({isTTY:Ex.default.isatty(1)}),stderr:BU({isTTY:Ex.default.isatty(2)})},GU=Ape;function qU(r,e,t){let n=r.indexOf(e);if(n===-1)return r;let i=e.length,s=0,o="";do o+=r.slice(s,n)+e+t,s=n+i,n=r.indexOf(e,s);while(n!==-1);return o+=r.slice(s),o}a(qU,"stringReplaceAll");function WU(r,e,t,n){let i=0,s="";do{let o=r[n-1]==="\r";s+=r.slice(i,o?n-1:n)+e+(o?`\r
471
471
  `:`
472
472
  `)+t,i=n+1,n=r.indexOf(`
473
473
  `,i)}while(n!==-1);return s+=r.slice(i),s}a(WU,"stringEncaseCRLFWithFirstIndex");var{stdout:HU,stderr:zU}=GU,vx=Symbol("GENERATOR"),Od=Symbol("STYLER"),jm=Symbol("IS_EMPTY"),KU=["ansi","ansi","ansi256","ansi16m"],Pd=Object.create(null),Ipe=a((r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=HU?HU.level:0;r.level=e.level===void 0?t:e.level},"applyOptions");var Rpe=a(r=>{let e=a((...t)=>t.join(" "),"chalk");return Ipe(e,r),Object.setPrototypeOf(e,$m.prototype),e},"chalkFactory");function $m(r){return Rpe(r)}a($m,"createChalk");Object.setPrototypeOf($m.prototype,Function.prototype);for(let[r,e]of Object.entries(Us))Pd[r]={get(){let t=MS(this,Ax(e.open,e.close,this[Od]),this[jm]);return Object.defineProperty(this,r,{value:t}),t}};Pd.visible={get(){let r=MS(this,this[Od],!0);return Object.defineProperty(this,"visible",{value:r}),r}};var Tx=a((r,e,t,...n)=>r==="rgb"?e==="ansi16m"?Us[t].ansi16m(...n):e==="ansi256"?Us[t].ansi256(Us.rgbToAnsi256(...n)):Us[t].ansi(Us.rgbToAnsi(...n)):r==="hex"?Tx("rgb",e,t,...Us.hexToRgb(...n)):Us[t][r](...n),"getModelAnsi"),Cpe=["rgb","hex","ansi256"];for(let r of Cpe){Pd[r]={get(){let{level:t}=this;return function(...n){let i=Ax(Tx(r,KU[t],"color",...n),Us.color.close,this[Od]);return MS(this,i,this[jm])}}};let e="bg"+r[0].toUpperCase()+r.slice(1);Pd[e]={get(){let{level:t}=this;return function(...n){let i=Ax(Tx(r,KU[t],"bgColor",...n),Us.bgColor.close,this[Od]);return MS(this,i,this[jm])}}}}var xpe=Object.defineProperties(()=>{},{...Pd,level:{enumerable:!0,get(){return this[vx].level},set(r){this[vx].level=r}}}),Ax=a((r,e,t)=>{let n,i;return t===void 0?(n=r,i=e):(n=t.openAll+r,i=e+t.closeAll),{open:r,close:e,openAll:n,closeAll:i,parent:t}},"createStyler"),MS=a((r,e,t)=>{let n=a((...i)=>Ope(n,i.length===1?""+i[0]:i.join(" ")),"builder");return Object.setPrototypeOf(n,xpe),n[vx]=r,n[Od]=e,n[jm]=t,n},"createBuilder"),Ope=a((r,e)=>{if(r.level<=0||!e)return r[jm]?"":e;let t=r[Od];if(t===void 0)return e;let{openAll:n,closeAll:i}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=qU(e,t.close,t.open),t=t.parent;let s=e.indexOf(`
474
- `);return s!==-1&&(e=WU(e,i,n,s)),n+e+i},"applyStyle");Object.defineProperties($m.prototype,Pd);var Ppe=$m(),uFe=$m({level:zU?zU.level:0});var YU=Ppe;var Dx=J(require("node:process"),1);var Um=J(require("node:process"),1);var Fpe=a((r,e,t,n)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;let i=Object.getOwnPropertyDescriptor(r,t),s=Object.getOwnPropertyDescriptor(e,t);!Dpe(i,s)&&n||Object.defineProperty(r,t,s)},"copyProperty"),Dpe=a(function(r,e){return r===void 0||r.configurable||r.writable===e.writable&&r.enumerable===e.enumerable&&r.configurable===e.configurable&&(r.writable||r.value===e.value)},"canCopyProperty"),Lpe=a((r,e)=>{let t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(r)&&Object.setPrototypeOf(r,t)},"changePrototype"),Npe=a((r,e)=>`/* Wrapped ${r}*/
475
- ${e}`,"wrappedToString"),kpe=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Mpe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),jpe=a((r,e,t)=>{let n=t===""?"":`with ${t.trim()}() `,i=Npe.bind(null,n,e.toString());Object.defineProperty(i,"name",Mpe);let{writable:s,enumerable:o,configurable:c}=kpe;Object.defineProperty(r,"toString",{value:i,writable:s,enumerable:o,configurable:c})},"changeToString");function Ix(r,e,{ignoreNonConfigurable:t=!1}={}){let{name:n}=r;for(let i of Reflect.ownKeys(e))Fpe(r,e,i,t);return Lpe(r,e),jpe(r,e,n),r}a(Ix,"mimicFunction");var jS=new WeakMap,QU=a((r,e={})=>{if(typeof r!="function")throw new TypeError("Expected a function");let t,n=0,i=r.displayName||r.name||"<anonymous>",s=a(function(...o){if(jS.set(s,++n),n===1)t=r.apply(this,o),r=void 0;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return t},"onetime");return Ix(s,r),jS.set(s,n),s},"onetime");QU.callCount=r=>{if(!jS.has(r))throw new Error(`The given function \`${r.name}\` is not wrapped by the \`onetime\` package`);return jS.get(r)};var XU=QU;var nu=[];nu.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&nu.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&nu.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var $S=a(r=>!!r&&typeof r=="object"&&typeof r.removeListener=="function"&&typeof r.emit=="function"&&typeof r.reallyExit=="function"&&typeof r.listeners=="function"&&typeof r.kill=="function"&&typeof r.pid=="number"&&typeof r.on=="function","processOk"),Rx=Symbol.for("signal-exit emitter"),Cx=globalThis,$pe=Object.defineProperty.bind(Object),xx=class{static{a(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Cx[Rx])return Cx[Rx];$pe(Cx,Rx,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],i=n.indexOf(t);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let s of this.listeners[e])i=s(t,n)===!0||i;return e==="exit"&&(i=this.emit("afterExit",t,n)||i),i}},US=class{static{a(this,"SignalExitBase")}},Upe=a(r=>({onExit(e,t){return r.onExit(e,t)},load(){return r.load()},unload(){return r.unload()}}),"signalExitWrap"),Ox=class extends US{static{a(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}},Px=class extends US{static{a(this,"SignalExit")}#t=Fx.platform==="win32"?"SIGINT":"SIGHUP";#r=new xx;#n;#e;#i;#a={};#p=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of nu)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:i}=this.#r,s=e;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(i+=s.__signal_exit_emitter__.count),n.length===i){this.unload();let o=this.#r.emit("exit",null,t),c=t==="SIGHUP"?this.#t:t;o||e.kill(e.pid,c)}};this.#i=e.reallyExit,this.#e=e.emit}onExit(e,t){if(!$S(this.#n))return()=>{};this.#p===!1&&this.load();let n=t?.alwaysLast?"afterExit":"exit";return this.#r.on(n,e),()=>{this.#r.removeListener(n,e),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#p){this.#p=!0,this.#r.count+=1;for(let e of nu)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#u(e)}}unload(){this.#p&&(this.#p=!1,nu.forEach(e=>{let t=this.#a[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#e,this.#n.reallyExit=this.#i,this.#r.count-=1)}#u(e){return $S(this.#n)?(this.#n.exitCode=e||0,this.#r.emit("exit",this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#e;if(e==="exit"&&$S(this.#n)){typeof t[0]=="number"&&(this.#n.exitCode=t[0]);let i=n.call(this.#n,e,...t);return this.#r.emit("exit",this.#n.exitCode,null),i}else return n.call(this.#n,e,...t)}},Fx=globalThis.process,{onExit:JU,load:SFe,unload:wFe}=Upe($S(Fx)?new Px(Fx):new Ox);var ZU=Um.default.stderr.isTTY?Um.default.stderr:Um.default.stdout.isTTY?Um.default.stdout:void 0,Bpe=ZU?XU(()=>{JU(()=>{ZU.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},e6=Bpe;var BS=!1,Fd={};Fd.show=(r=Dx.default.stderr)=>{r.isTTY&&(BS=!1,r.write("\x1B[?25h"))};Fd.hide=(r=Dx.default.stderr)=>{r.isTTY&&(e6(),BS=!0,r.write("\x1B[?25l"))};Fd.toggle=(r,e)=>{r!==void 0&&(BS=r),BS?Fd.show(e):Fd.hide(e)};var Lx=Fd;var Nx={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}};var Bm=Nx,PFe=Object.keys(Nx);var iu={};Sg(iu,{error:()=>zpe,info:()=>qpe,success:()=>Wpe,warning:()=>Hpe});var t6=J(require("node:tty"),1);var Gpe=t6.default?.WriteStream?.prototype?.hasColors?.()??!1,et=a((r,e)=>{if(!Gpe)return i=>i;let t=`\x1B[${r}m`,n=`\x1B[${e}m`;return i=>{let s=i+"",o=s.indexOf(n);if(o===-1)return t+s+n;let c=t,l=0,f=(e===22?n:"")+t;for(;o!==-1;)c+=s.slice(l,o)+f,l=o+n.length,o=s.indexOf(n,l);return c+=s.slice(l)+n,c}},"format"),LFe=et(0,0),NFe=et(1,22),kFe=et(2,22),MFe=et(3,23),jFe=et(4,24),$Fe=et(53,55),UFe=et(7,27),BFe=et(8,28),VFe=et(9,29),GFe=et(30,39),r6=et(31,39),n6=et(32,39),i6=et(33,39),s6=et(34,39),qFe=et(35,39),WFe=et(36,39),HFe=et(37,39),zFe=et(90,39),KFe=et(40,49),YFe=et(41,49),QFe=et(42,49),XFe=et(43,49),JFe=et(44,49),ZFe=et(45,49),eDe=et(46,49),tDe=et(47,49),rDe=et(100,49),nDe=et(91,39),iDe=et(92,39),sDe=et(93,39),oDe=et(94,39),aDe=et(95,39),cDe=et(96,39),lDe=et(97,39),uDe=et(101,49),fDe=et(102,49),dDe=et(103,49),pDe=et(104,49),hDe=et(105,49),mDe=et(106,49),gDe=et(107,49);var kx=J(require("node:process"),1);function Vm(){let{env:r}=kx.default,{TERM:e,TERM_PROGRAM:t}=r;return kx.default.platform!=="win32"?e!=="linux":!!r.WT_SESSION||!!r.TERMINUS_SUBLIME||r.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||r.TERMINAL_EMULATOR==="JetBrains-JediTerm"}a(Vm,"isUnicodeSupported");var VS=Vm(),qpe=s6(VS?"\u2139":"i"),Wpe=n6(VS?"\u2714":"\u221A"),Hpe=i6(VS?"\u26A0":"\u203C"),zpe=r6(VS?"\u2716":"\xD7");function Mx({onlyFirst:r=!1}={}){let i="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(i,r?void 0:"g")}a(Mx,"ansiRegex");var Kpe=Mx();function jx(r){if(typeof r!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof r}\``);return r.replace(Kpe,"")}a(jx,"stripAnsi");function o6(r){return r===161||r===164||r===167||r===168||r===170||r===173||r===174||r>=176&&r<=180||r>=182&&r<=186||r>=188&&r<=191||r===198||r===208||r===215||r===216||r>=222&&r<=225||r===230||r>=232&&r<=234||r===236||r===237||r===240||r===242||r===243||r>=247&&r<=250||r===252||r===254||r===257||r===273||r===275||r===283||r===294||r===295||r===299||r>=305&&r<=307||r===312||r>=319&&r<=322||r===324||r>=328&&r<=331||r===333||r===338||r===339||r===358||r===359||r===363||r===462||r===464||r===466||r===468||r===470||r===472||r===474||r===476||r===593||r===609||r===708||r===711||r>=713&&r<=715||r===717||r===720||r>=728&&r<=731||r===733||r===735||r>=768&&r<=879||r>=913&&r<=929||r>=931&&r<=937||r>=945&&r<=961||r>=963&&r<=969||r===1025||r>=1040&&r<=1103||r===1105||r===8208||r>=8211&&r<=8214||r===8216||r===8217||r===8220||r===8221||r>=8224&&r<=8226||r>=8228&&r<=8231||r===8240||r===8242||r===8243||r===8245||r===8251||r===8254||r===8308||r===8319||r>=8321&&r<=8324||r===8364||r===8451||r===8453||r===8457||r===8467||r===8470||r===8481||r===8482||r===8486||r===8491||r===8531||r===8532||r>=8539&&r<=8542||r>=8544&&r<=8555||r>=8560&&r<=8569||r===8585||r>=8592&&r<=8601||r===8632||r===8633||r===8658||r===8660||r===8679||r===8704||r===8706||r===8707||r===8711||r===8712||r===8715||r===8719||r===8721||r===8725||r===8730||r>=8733&&r<=8736||r===8739||r===8741||r>=8743&&r<=8748||r===8750||r>=8756&&r<=8759||r===8764||r===8765||r===8776||r===8780||r===8786||r===8800||r===8801||r>=8804&&r<=8807||r===8810||r===8811||r===8814||r===8815||r===8834||r===8835||r===8838||r===8839||r===8853||r===8857||r===8869||r===8895||r===8978||r>=9312&&r<=9449||r>=9451&&r<=9547||r>=9552&&r<=9587||r>=9600&&r<=9615||r>=9618&&r<=9621||r===9632||r===9633||r>=9635&&r<=9641||r===9650||r===9651||r===9654||r===9655||r===9660||r===9661||r===9664||r===9665||r>=9670&&r<=9672||r===9675||r>=9678&&r<=9681||r>=9698&&r<=9701||r===9711||r===9733||r===9734||r===9737||r===9742||r===9743||r===9756||r===9758||r===9792||r===9794||r===9824||r===9825||r>=9827&&r<=9829||r>=9831&&r<=9834||r===9836||r===9837||r===9839||r===9886||r===9887||r===9919||r>=9926&&r<=9933||r>=9935&&r<=9939||r>=9941&&r<=9953||r===9955||r===9960||r===9961||r>=9963&&r<=9969||r===9972||r>=9974&&r<=9977||r===9979||r===9980||r===9982||r===9983||r===10045||r>=10102&&r<=10111||r>=11094&&r<=11097||r>=12872&&r<=12879||r>=57344&&r<=63743||r>=65024&&r<=65039||r===65533||r>=127232&&r<=127242||r>=127248&&r<=127277||r>=127280&&r<=127337||r>=127344&&r<=127373||r===127375||r===127376||r>=127387&&r<=127404||r>=917760&&r<=917999||r>=983040&&r<=1048573||r>=1048576&&r<=1114109}a(o6,"isAmbiguous");function a6(r){return r===12288||r>=65281&&r<=65376||r>=65504&&r<=65510}a(a6,"isFullWidth");function c6(r){return r>=4352&&r<=4447||r===8986||r===8987||r===9001||r===9002||r>=9193&&r<=9196||r===9200||r===9203||r===9725||r===9726||r===9748||r===9749||r>=9776&&r<=9783||r>=9800&&r<=9811||r===9855||r>=9866&&r<=9871||r===9875||r===9889||r===9898||r===9899||r===9917||r===9918||r===9924||r===9925||r===9934||r===9940||r===9962||r===9970||r===9971||r===9973||r===9978||r===9981||r===9989||r===9994||r===9995||r===10024||r===10060||r===10062||r>=10067&&r<=10069||r===10071||r>=10133&&r<=10135||r===10160||r===10175||r===11035||r===11036||r===11088||r===11093||r>=11904&&r<=11929||r>=11931&&r<=12019||r>=12032&&r<=12245||r>=12272&&r<=12287||r>=12289&&r<=12350||r>=12353&&r<=12438||r>=12441&&r<=12543||r>=12549&&r<=12591||r>=12593&&r<=12686||r>=12688&&r<=12773||r>=12783&&r<=12830||r>=12832&&r<=12871||r>=12880&&r<=42124||r>=42128&&r<=42182||r>=43360&&r<=43388||r>=44032&&r<=55203||r>=63744&&r<=64255||r>=65040&&r<=65049||r>=65072&&r<=65106||r>=65108&&r<=65126||r>=65128&&r<=65131||r>=94176&&r<=94180||r>=94192&&r<=94198||r>=94208&&r<=101589||r>=101631&&r<=101662||r>=101760&&r<=101874||r>=110576&&r<=110579||r>=110581&&r<=110587||r===110589||r===110590||r>=110592&&r<=110882||r===110898||r>=110928&&r<=110930||r===110933||r>=110948&&r<=110951||r>=110960&&r<=111355||r>=119552&&r<=119638||r>=119648&&r<=119670||r===126980||r===127183||r===127374||r>=127377&&r<=127386||r>=127488&&r<=127490||r>=127504&&r<=127547||r>=127552&&r<=127560||r===127568||r===127569||r>=127584&&r<=127589||r>=127744&&r<=127776||r>=127789&&r<=127797||r>=127799&&r<=127868||r>=127870&&r<=127891||r>=127904&&r<=127946||r>=127951&&r<=127955||r>=127968&&r<=127984||r===127988||r>=127992&&r<=128062||r===128064||r>=128066&&r<=128252||r>=128255&&r<=128317||r>=128331&&r<=128334||r>=128336&&r<=128359||r===128378||r===128405||r===128406||r===128420||r>=128507&&r<=128591||r>=128640&&r<=128709||r===128716||r>=128720&&r<=128722||r>=128725&&r<=128728||r>=128732&&r<=128735||r===128747||r===128748||r>=128756&&r<=128764||r>=128992&&r<=129003||r===129008||r>=129292&&r<=129338||r>=129340&&r<=129349||r>=129351&&r<=129535||r>=129648&&r<=129660||r>=129664&&r<=129674||r>=129678&&r<=129734||r===129736||r>=129741&&r<=129756||r>=129759&&r<=129770||r>=129775&&r<=129784||r>=131072&&r<=196605||r>=196608&&r<=262141}a(c6,"isWide");function Ype(r){if(!Number.isSafeInteger(r))throw new TypeError(`Expected a code point, got \`${typeof r}\`.`)}a(Ype,"validate");function $x(r,{ambiguousAsWide:e=!1}={}){return Ype(r),a6(r)||c6(r)||e&&o6(r)?2:1}a($x,"eastAsianWidth");var Qpe=new Intl.Segmenter,Xpe=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$","v"),Jpe=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),Zpe=new RegExp("^\\p{RGI_Emoji}$","v");function ehe(r){return r.replace(Jpe,"")}a(ehe,"baseVisible");function the(r){return Xpe.test(r)}a(the,"isZeroWidthCluster");function rhe(r,e){let t=0;if(r.length>1)for(let n of r.slice(1))n>="\uFF00"&&n<="\uFFEF"&&(t+=$x(n.codePointAt(0),e));return t}a(rhe,"trailingHalfwidthWidth");function Ux(r,e={}){if(typeof r!="string"||r.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:n=!1}=e,i=r;if(n||(i=jx(i)),i.length===0)return 0;let s=0,o={ambiguousAsWide:!t};for(let{segment:c}of Qpe.segment(i)){if(the(c))continue;if(Zpe.test(c)){s+=2;continue}let l=ehe(c).codePointAt(0);s+=$x(l,o),s+=rhe(c,o)}return s}a(Ux,"stringWidth");function Bx({stream:r=process.stdout}={}){return!!(r&&r.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}a(Bx,"isInteractive");var Gm=J(require("node:process"),1);var nhe=3,Vx=class{static{a(this,"StdinDiscarder")}#t=0;#r;#n=!1;#e=!1;#i=a(e=>{if(!e?.length)return;(typeof e=="string"?e.codePointAt(0):e[0])===nhe&&Gm.default.kill(Gm.default.pid,"SIGINT")},"#handleInputBound");start(){this.#t++,this.#t===1&&this.#a()}stop(){this.#t!==0&&--this.#t===0&&this.#p()}#a(){let{stdin:e}=Gm.default;if(Gm.default.platform==="win32"||!e?.isTTY||typeof e.setRawMode!="function"){this.#r=void 0;return}this.#r=e,this.#n=e.isPaused(),this.#e=!!e.isRaw,e.setRawMode(!0),e.prependListener("data",this.#i),this.#n&&e.resume()}#p(){if(!this.#r)return;let e=this.#r;e.off("data",this.#i),e.isTTY&&e.setRawMode?.(this.#e),this.#n&&e.pause(),this.#r=void 0,this.#n=!1,this.#e=!1}},ihe=new Vx,Gx=Object.freeze(ihe);var she=200,ohe="\x1B[?2026h",ahe="\x1B[?2026l",GS=new Map,che=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]),qx=class{static{a(this,"Ora")}#t=0;#r=-1;#n=0;#e;#i;#a;#p;#u=new Map;#c=!1;#f;#l;#d=!1;#o;#g(e){this.#c=!0;try{return e()}finally{this.#c=!1}}#E(){this.isSpinning&&this.render()}#b(e,t){if(e==null)return"";if(typeof e=="string")return e;if(Buffer.isBuffer(e)||ArrayBuffer.isView(e)){let n=typeof t=="string"&&t&&t!=="buffer"?t:"utf8";return Buffer.from(e).toString(n)}return String(e)}#S(e){if(!e)return!1;let t=e.at(-1);return t===`
474
+ `);return s!==-1&&(e=WU(e,i,n,s)),n+e+i},"applyStyle");Object.defineProperties($m.prototype,Pd);var Ppe=$m(),fFe=$m({level:zU?zU.level:0});var YU=Ppe;var Dx=J(require("node:process"),1);var Um=J(require("node:process"),1);var Fpe=a((r,e,t,n)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;let i=Object.getOwnPropertyDescriptor(r,t),s=Object.getOwnPropertyDescriptor(e,t);!Dpe(i,s)&&n||Object.defineProperty(r,t,s)},"copyProperty"),Dpe=a(function(r,e){return r===void 0||r.configurable||r.writable===e.writable&&r.enumerable===e.enumerable&&r.configurable===e.configurable&&(r.writable||r.value===e.value)},"canCopyProperty"),Lpe=a((r,e)=>{let t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(r)&&Object.setPrototypeOf(r,t)},"changePrototype"),Npe=a((r,e)=>`/* Wrapped ${r}*/
475
+ ${e}`,"wrappedToString"),kpe=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Mpe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),jpe=a((r,e,t)=>{let n=t===""?"":`with ${t.trim()}() `,i=Npe.bind(null,n,e.toString());Object.defineProperty(i,"name",Mpe);let{writable:s,enumerable:o,configurable:c}=kpe;Object.defineProperty(r,"toString",{value:i,writable:s,enumerable:o,configurable:c})},"changeToString");function Ix(r,e,{ignoreNonConfigurable:t=!1}={}){let{name:n}=r;for(let i of Reflect.ownKeys(e))Fpe(r,e,i,t);return Lpe(r,e),jpe(r,e,n),r}a(Ix,"mimicFunction");var jS=new WeakMap,QU=a((r,e={})=>{if(typeof r!="function")throw new TypeError("Expected a function");let t,n=0,i=r.displayName||r.name||"<anonymous>",s=a(function(...o){if(jS.set(s,++n),n===1)t=r.apply(this,o),r=void 0;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return t},"onetime");return Ix(s,r),jS.set(s,n),s},"onetime");QU.callCount=r=>{if(!jS.has(r))throw new Error(`The given function \`${r.name}\` is not wrapped by the \`onetime\` package`);return jS.get(r)};var XU=QU;var nu=[];nu.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&nu.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&nu.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var $S=a(r=>!!r&&typeof r=="object"&&typeof r.removeListener=="function"&&typeof r.emit=="function"&&typeof r.reallyExit=="function"&&typeof r.listeners=="function"&&typeof r.kill=="function"&&typeof r.pid=="number"&&typeof r.on=="function","processOk"),Rx=Symbol.for("signal-exit emitter"),Cx=globalThis,$pe=Object.defineProperty.bind(Object),xx=class{static{a(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Cx[Rx])return Cx[Rx];$pe(Cx,Rx,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],i=n.indexOf(t);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let s of this.listeners[e])i=s(t,n)===!0||i;return e==="exit"&&(i=this.emit("afterExit",t,n)||i),i}},US=class{static{a(this,"SignalExitBase")}},Upe=a(r=>({onExit(e,t){return r.onExit(e,t)},load(){return r.load()},unload(){return r.unload()}}),"signalExitWrap"),Ox=class extends US{static{a(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}},Px=class extends US{static{a(this,"SignalExit")}#t=Fx.platform==="win32"?"SIGINT":"SIGHUP";#r=new xx;#n;#e;#i;#a={};#p=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of nu)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:i}=this.#r,s=e;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(i+=s.__signal_exit_emitter__.count),n.length===i){this.unload();let o=this.#r.emit("exit",null,t),c=t==="SIGHUP"?this.#t:t;o||e.kill(e.pid,c)}};this.#i=e.reallyExit,this.#e=e.emit}onExit(e,t){if(!$S(this.#n))return()=>{};this.#p===!1&&this.load();let n=t?.alwaysLast?"afterExit":"exit";return this.#r.on(n,e),()=>{this.#r.removeListener(n,e),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#p){this.#p=!0,this.#r.count+=1;for(let e of nu)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#u(e)}}unload(){this.#p&&(this.#p=!1,nu.forEach(e=>{let t=this.#a[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#e,this.#n.reallyExit=this.#i,this.#r.count-=1)}#u(e){return $S(this.#n)?(this.#n.exitCode=e||0,this.#r.emit("exit",this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#e;if(e==="exit"&&$S(this.#n)){typeof t[0]=="number"&&(this.#n.exitCode=t[0]);let i=n.call(this.#n,e,...t);return this.#r.emit("exit",this.#n.exitCode,null),i}else return n.call(this.#n,e,...t)}},Fx=globalThis.process,{onExit:JU,load:wFe,unload:EFe}=Upe($S(Fx)?new Px(Fx):new Ox);var ZU=Um.default.stderr.isTTY?Um.default.stderr:Um.default.stdout.isTTY?Um.default.stdout:void 0,Bpe=ZU?XU(()=>{JU(()=>{ZU.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},e6=Bpe;var BS=!1,Fd={};Fd.show=(r=Dx.default.stderr)=>{r.isTTY&&(BS=!1,r.write("\x1B[?25h"))};Fd.hide=(r=Dx.default.stderr)=>{r.isTTY&&(e6(),BS=!0,r.write("\x1B[?25l"))};Fd.toggle=(r,e)=>{r!==void 0&&(BS=r),BS?Fd.show(e):Fd.hide(e)};var Lx=Fd;var Nx={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}};var Bm=Nx,FFe=Object.keys(Nx);var iu={};Sg(iu,{error:()=>zpe,info:()=>qpe,success:()=>Wpe,warning:()=>Hpe});var t6=J(require("node:tty"),1);var Gpe=t6.default?.WriteStream?.prototype?.hasColors?.()??!1,et=a((r,e)=>{if(!Gpe)return i=>i;let t=`\x1B[${r}m`,n=`\x1B[${e}m`;return i=>{let s=i+"",o=s.indexOf(n);if(o===-1)return t+s+n;let c=t,l=0,f=(e===22?n:"")+t;for(;o!==-1;)c+=s.slice(l,o)+f,l=o+n.length,o=s.indexOf(n,l);return c+=s.slice(l)+n,c}},"format"),NFe=et(0,0),kFe=et(1,22),MFe=et(2,22),jFe=et(3,23),$Fe=et(4,24),UFe=et(53,55),BFe=et(7,27),VFe=et(8,28),GFe=et(9,29),qFe=et(30,39),r6=et(31,39),n6=et(32,39),i6=et(33,39),s6=et(34,39),WFe=et(35,39),HFe=et(36,39),zFe=et(37,39),KFe=et(90,39),YFe=et(40,49),QFe=et(41,49),XFe=et(42,49),JFe=et(43,49),ZFe=et(44,49),eDe=et(45,49),tDe=et(46,49),rDe=et(47,49),nDe=et(100,49),iDe=et(91,39),sDe=et(92,39),oDe=et(93,39),aDe=et(94,39),cDe=et(95,39),lDe=et(96,39),uDe=et(97,39),fDe=et(101,49),dDe=et(102,49),pDe=et(103,49),hDe=et(104,49),mDe=et(105,49),gDe=et(106,49),yDe=et(107,49);var kx=J(require("node:process"),1);function Vm(){let{env:r}=kx.default,{TERM:e,TERM_PROGRAM:t}=r;return kx.default.platform!=="win32"?e!=="linux":!!r.WT_SESSION||!!r.TERMINUS_SUBLIME||r.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||r.TERMINAL_EMULATOR==="JetBrains-JediTerm"}a(Vm,"isUnicodeSupported");var VS=Vm(),qpe=s6(VS?"\u2139":"i"),Wpe=n6(VS?"\u2714":"\u221A"),Hpe=i6(VS?"\u26A0":"\u203C"),zpe=r6(VS?"\u2716":"\xD7");function Mx({onlyFirst:r=!1}={}){let i="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(i,r?void 0:"g")}a(Mx,"ansiRegex");var Kpe=Mx();function jx(r){if(typeof r!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof r}\``);return r.replace(Kpe,"")}a(jx,"stripAnsi");function o6(r){return r===161||r===164||r===167||r===168||r===170||r===173||r===174||r>=176&&r<=180||r>=182&&r<=186||r>=188&&r<=191||r===198||r===208||r===215||r===216||r>=222&&r<=225||r===230||r>=232&&r<=234||r===236||r===237||r===240||r===242||r===243||r>=247&&r<=250||r===252||r===254||r===257||r===273||r===275||r===283||r===294||r===295||r===299||r>=305&&r<=307||r===312||r>=319&&r<=322||r===324||r>=328&&r<=331||r===333||r===338||r===339||r===358||r===359||r===363||r===462||r===464||r===466||r===468||r===470||r===472||r===474||r===476||r===593||r===609||r===708||r===711||r>=713&&r<=715||r===717||r===720||r>=728&&r<=731||r===733||r===735||r>=768&&r<=879||r>=913&&r<=929||r>=931&&r<=937||r>=945&&r<=961||r>=963&&r<=969||r===1025||r>=1040&&r<=1103||r===1105||r===8208||r>=8211&&r<=8214||r===8216||r===8217||r===8220||r===8221||r>=8224&&r<=8226||r>=8228&&r<=8231||r===8240||r===8242||r===8243||r===8245||r===8251||r===8254||r===8308||r===8319||r>=8321&&r<=8324||r===8364||r===8451||r===8453||r===8457||r===8467||r===8470||r===8481||r===8482||r===8486||r===8491||r===8531||r===8532||r>=8539&&r<=8542||r>=8544&&r<=8555||r>=8560&&r<=8569||r===8585||r>=8592&&r<=8601||r===8632||r===8633||r===8658||r===8660||r===8679||r===8704||r===8706||r===8707||r===8711||r===8712||r===8715||r===8719||r===8721||r===8725||r===8730||r>=8733&&r<=8736||r===8739||r===8741||r>=8743&&r<=8748||r===8750||r>=8756&&r<=8759||r===8764||r===8765||r===8776||r===8780||r===8786||r===8800||r===8801||r>=8804&&r<=8807||r===8810||r===8811||r===8814||r===8815||r===8834||r===8835||r===8838||r===8839||r===8853||r===8857||r===8869||r===8895||r===8978||r>=9312&&r<=9449||r>=9451&&r<=9547||r>=9552&&r<=9587||r>=9600&&r<=9615||r>=9618&&r<=9621||r===9632||r===9633||r>=9635&&r<=9641||r===9650||r===9651||r===9654||r===9655||r===9660||r===9661||r===9664||r===9665||r>=9670&&r<=9672||r===9675||r>=9678&&r<=9681||r>=9698&&r<=9701||r===9711||r===9733||r===9734||r===9737||r===9742||r===9743||r===9756||r===9758||r===9792||r===9794||r===9824||r===9825||r>=9827&&r<=9829||r>=9831&&r<=9834||r===9836||r===9837||r===9839||r===9886||r===9887||r===9919||r>=9926&&r<=9933||r>=9935&&r<=9939||r>=9941&&r<=9953||r===9955||r===9960||r===9961||r>=9963&&r<=9969||r===9972||r>=9974&&r<=9977||r===9979||r===9980||r===9982||r===9983||r===10045||r>=10102&&r<=10111||r>=11094&&r<=11097||r>=12872&&r<=12879||r>=57344&&r<=63743||r>=65024&&r<=65039||r===65533||r>=127232&&r<=127242||r>=127248&&r<=127277||r>=127280&&r<=127337||r>=127344&&r<=127373||r===127375||r===127376||r>=127387&&r<=127404||r>=917760&&r<=917999||r>=983040&&r<=1048573||r>=1048576&&r<=1114109}a(o6,"isAmbiguous");function a6(r){return r===12288||r>=65281&&r<=65376||r>=65504&&r<=65510}a(a6,"isFullWidth");function c6(r){return r>=4352&&r<=4447||r===8986||r===8987||r===9001||r===9002||r>=9193&&r<=9196||r===9200||r===9203||r===9725||r===9726||r===9748||r===9749||r>=9776&&r<=9783||r>=9800&&r<=9811||r===9855||r>=9866&&r<=9871||r===9875||r===9889||r===9898||r===9899||r===9917||r===9918||r===9924||r===9925||r===9934||r===9940||r===9962||r===9970||r===9971||r===9973||r===9978||r===9981||r===9989||r===9994||r===9995||r===10024||r===10060||r===10062||r>=10067&&r<=10069||r===10071||r>=10133&&r<=10135||r===10160||r===10175||r===11035||r===11036||r===11088||r===11093||r>=11904&&r<=11929||r>=11931&&r<=12019||r>=12032&&r<=12245||r>=12272&&r<=12287||r>=12289&&r<=12350||r>=12353&&r<=12438||r>=12441&&r<=12543||r>=12549&&r<=12591||r>=12593&&r<=12686||r>=12688&&r<=12773||r>=12783&&r<=12830||r>=12832&&r<=12871||r>=12880&&r<=42124||r>=42128&&r<=42182||r>=43360&&r<=43388||r>=44032&&r<=55203||r>=63744&&r<=64255||r>=65040&&r<=65049||r>=65072&&r<=65106||r>=65108&&r<=65126||r>=65128&&r<=65131||r>=94176&&r<=94180||r>=94192&&r<=94198||r>=94208&&r<=101589||r>=101631&&r<=101662||r>=101760&&r<=101874||r>=110576&&r<=110579||r>=110581&&r<=110587||r===110589||r===110590||r>=110592&&r<=110882||r===110898||r>=110928&&r<=110930||r===110933||r>=110948&&r<=110951||r>=110960&&r<=111355||r>=119552&&r<=119638||r>=119648&&r<=119670||r===126980||r===127183||r===127374||r>=127377&&r<=127386||r>=127488&&r<=127490||r>=127504&&r<=127547||r>=127552&&r<=127560||r===127568||r===127569||r>=127584&&r<=127589||r>=127744&&r<=127776||r>=127789&&r<=127797||r>=127799&&r<=127868||r>=127870&&r<=127891||r>=127904&&r<=127946||r>=127951&&r<=127955||r>=127968&&r<=127984||r===127988||r>=127992&&r<=128062||r===128064||r>=128066&&r<=128252||r>=128255&&r<=128317||r>=128331&&r<=128334||r>=128336&&r<=128359||r===128378||r===128405||r===128406||r===128420||r>=128507&&r<=128591||r>=128640&&r<=128709||r===128716||r>=128720&&r<=128722||r>=128725&&r<=128728||r>=128732&&r<=128735||r===128747||r===128748||r>=128756&&r<=128764||r>=128992&&r<=129003||r===129008||r>=129292&&r<=129338||r>=129340&&r<=129349||r>=129351&&r<=129535||r>=129648&&r<=129660||r>=129664&&r<=129674||r>=129678&&r<=129734||r===129736||r>=129741&&r<=129756||r>=129759&&r<=129770||r>=129775&&r<=129784||r>=131072&&r<=196605||r>=196608&&r<=262141}a(c6,"isWide");function Ype(r){if(!Number.isSafeInteger(r))throw new TypeError(`Expected a code point, got \`${typeof r}\`.`)}a(Ype,"validate");function $x(r,{ambiguousAsWide:e=!1}={}){return Ype(r),a6(r)||c6(r)||e&&o6(r)?2:1}a($x,"eastAsianWidth");var Qpe=new Intl.Segmenter,Xpe=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$","v"),Jpe=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),Zpe=new RegExp("^\\p{RGI_Emoji}$","v");function ehe(r){return r.replace(Jpe,"")}a(ehe,"baseVisible");function the(r){return Xpe.test(r)}a(the,"isZeroWidthCluster");function rhe(r,e){let t=0;if(r.length>1)for(let n of r.slice(1))n>="\uFF00"&&n<="\uFFEF"&&(t+=$x(n.codePointAt(0),e));return t}a(rhe,"trailingHalfwidthWidth");function Ux(r,e={}){if(typeof r!="string"||r.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:n=!1}=e,i=r;if(n||(i=jx(i)),i.length===0)return 0;let s=0,o={ambiguousAsWide:!t};for(let{segment:c}of Qpe.segment(i)){if(the(c))continue;if(Zpe.test(c)){s+=2;continue}let l=ehe(c).codePointAt(0);s+=$x(l,o),s+=rhe(c,o)}return s}a(Ux,"stringWidth");function Bx({stream:r=process.stdout}={}){return!!(r&&r.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}a(Bx,"isInteractive");var Gm=J(require("node:process"),1);var nhe=3,Vx=class{static{a(this,"StdinDiscarder")}#t=0;#r;#n=!1;#e=!1;#i=a(e=>{if(!e?.length)return;(typeof e=="string"?e.codePointAt(0):e[0])===nhe&&Gm.default.kill(Gm.default.pid,"SIGINT")},"#handleInputBound");start(){this.#t++,this.#t===1&&this.#a()}stop(){this.#t!==0&&--this.#t===0&&this.#p()}#a(){let{stdin:e}=Gm.default;if(Gm.default.platform==="win32"||!e?.isTTY||typeof e.setRawMode!="function"){this.#r=void 0;return}this.#r=e,this.#n=e.isPaused(),this.#e=!!e.isRaw,e.setRawMode(!0),e.prependListener("data",this.#i),this.#n&&e.resume()}#p(){if(!this.#r)return;let e=this.#r;e.off("data",this.#i),e.isTTY&&e.setRawMode?.(this.#e),this.#n&&e.pause(),this.#r=void 0,this.#n=!1,this.#e=!1}},ihe=new Vx,Gx=Object.freeze(ihe);var she=200,ohe="\x1B[?2026h",ahe="\x1B[?2026l",GS=new Map,che=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]),qx=class{static{a(this,"Ora")}#t=0;#r=-1;#n=0;#e;#i;#a;#p;#u=new Map;#c=!1;#f;#l;#d=!1;#o;#g(e){this.#c=!0;try{return e()}finally{this.#c=!1}}#E(){this.isSpinning&&this.render()}#b(e,t){if(e==null)return"";if(typeof e=="string")return e;if(Buffer.isBuffer(e)||ArrayBuffer.isView(e)){let n=typeof t=="string"&&t&&t!=="buffer"?t:"utf8";return Buffer.from(e).toString(n)}return String(e)}#S(e){if(!e)return!1;let t=e.at(-1);return t===`
476
476
  `||t==="\r"}#A(){this.#l||(this.#l=setTimeout(()=>{this.#l=void 0,this.isSpinning&&this.#E()},she),typeof this.#l?.unref=="function"&&this.#l.unref())}#y(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#v(e,t,n,i){let s=this.#m(n," "),c=typeof t=="string"?(e?" ":"")+t:"",l=this.#_(i," ");return s+e+c+l}constructor(e){if(typeof e=="string"&&(e={text:e}),this.#e={color:"cyan",stream:Dd.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#e.color,this.#a=this.#e.stream,typeof this.#e.isEnabled!="boolean"&&(this.#e.isEnabled=Bx({stream:this.#a})),typeof this.#e.isSilent!="boolean"&&(this.#e.isSilent=!1),this.#e.interval!==void 0&&!(Number.isInteger(this.#e.interval)&&this.#e.interval>0))throw new Error("The `interval` option must be a positive integer");let t=this.#e.interval;this.spinner=this.#e.spinner,this.#e.interval=t,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.suffixText=this.#e.suffixText,this.indent=this.#e.indent,Dd.default.env.NODE_ENV==="test"&&(this._stream=this.#a,this._isEnabled=this.#e.isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return this.#t},set(n){this.#t=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#r}}),Object.defineProperty(this,"_lineCount",{get(){let n=this.#a.columns??80,i=typeof this.#e.prefixText=="function"?"":this.#e.prefixText,s=typeof this.#e.suffixText=="function"?"":this.#e.suffixText,o=typeof i=="string"&&i!==""?i+" ":"",c=typeof s=="string"&&s!==""?" "+s:"",u=" ".repeat(this.#e.indent)+o+"-"+(typeof this.#e.text=="string"?" "+this.#e.text:"")+c;return this.#w(u,n)}}))}get indent(){return this.#e.indent}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#e.indent=e}get interval(){return this.#e.interval??this.#i.interval??100}get spinner(){return this.#i}set spinner(e){if(this.#r=-1,this.#e.interval=void 0,typeof e=="object"){if(!Array.isArray(e.frames)||e.frames.length===0||e.frames.some(t=>typeof t!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(e.interval!==void 0&&!(Number.isInteger(e.interval)&&e.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");this.#i=e}else if(!Vm())this.#i=Bm.line;else if(e===void 0)this.#i=Bm.dots;else if(e!=="default"&&Bm[e])this.#i=Bm[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#e.text}set text(e=""){this.#e.text=e}get prefixText(){return this.#e.prefixText}set prefixText(e=""){this.#e.prefixText=e}get suffixText(){return this.#e.suffixText}set suffixText(e=""){this.#e.suffixText=e}get isSpinning(){return this.#p!==void 0}#T(e,t,n=!1){let i=typeof e=="function"?e():e;return typeof i=="string"&&i!==""?n?t+i:i+t:""}#m(e=this.#e.prefixText,t=" "){return this.#T(e,t,!1)}#_(e=this.#e.suffixText,t=" "){return this.#T(e,t,!0)}#w(e,t){let n=0;for(let i of(0,l6.stripVTControlCharacters)(e).split(`
477
477
  `))n+=Math.max(1,Math.ceil(Ux(i)/t));return n}get color(){return this.#o}set color(e){if(e!==void 0&&e!==!1&&!che.has(e))throw new Error("The `color` option must be a valid color or `false` to disable");this.#o=e}get isEnabled(){return this.#e.isEnabled&&!this.#e.isSilent}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#e.isEnabled=e}get isSilent(){return this.#e.isSilent}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#e.isSilent=e}frame(){let e=Date.now();(this.#r===-1||e-this.#n>=this.interval)&&(this.#r=(this.#r+1)%this.#i.frames.length,this.#n=e);let{frames:t}=this.#i,n=t[this.#r];this.#o&&(n=YU[this.#o](n));let i=this.#m(this.#e.prefixText," "),s=typeof this.text=="string"?" "+this.text:"",o=this.#_(this.#e.suffixText," ");return i+n+s+o}clear(){return!this.isEnabled||!this.#a.isTTY?this:(this.#g(()=>{this.#a.cursorTo(0);for(let e=0;e<this.#t;e++)e>0&&this.#a.moveCursor(0,-1),this.#a.clearLine(1);this.#e.indent&&this.#a.cursorTo(this.#e.indent)}),this.#t=0,this)}#R(e){if(!e||this.#u.has(e)||!e.isTTY||typeof e.write!="function")return;GS.has(e)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let t=e.write;this.#u.set(e,t),GS.set(e,this),e.write=(n,i,s)=>this.#O(e,t,n,i,s)}#s(){if(!this.isEnabled||this.#u.size>0)return;let e=new Set([this.#a,Dd.default.stdout,Dd.default.stderr]);for(let t of e)this.#R(t)}#x(){for(let[e,t]of this.#u)e.write=t,GS.get(e)===this&&GS.delete(e);this.#u.clear()}#O(e,t,n,i,s){if(typeof i=="function"&&(s=i,i=void 0),this.#c)return t.call(e,n,i,s);this.clear();let o=this.#b(n,i),c=this.#S(o),l=t.call(e,n,i,s);return c?this.#y():o.length>0&&this.#A(),this.isSpinning&&!this.#l&&this.render(),l}render(){if(!this.isEnabled||this.#f||this.#l)return this;let e=this.#a.isTTY,t=!1;try{e&&(this.#g(()=>this.#a.write(ohe)),t=!0),this.clear();let n=this.frame(),i=this.#a.columns??80,s=this.#w(n,i),o=this.#a.rows;if(o&&o>1&&s>o){let l=n.split(`
478
478
  `),u=o-1;n=[...l.slice(0,u),"... (content truncated to fit terminal)"].join(`
@@ -570,19 +570,19 @@ Available classes: ${t.join(", ")}`),super(n),this.name="ClassNotFoundError"}},l
570
570
  `);if(K.length>0)throw new Nm(te.path,K)}let D,P;if(r.dryRun){let O=S.buildAsset(R);D=O.uid,P=O.path,process.stderr.write(`--- DRY RUN PREVIEW ---
571
571
  ${O.content}--- END PREVIEW ---
572
572
  `)}else{let O=await S.createAsset(R);D=O.basename,P=O.path}let M={uuid:D,path:P,label:t};process.stdout.write(JSON.stringify(M)+`
573
- `),process.exit(0)}catch(e){se.handle(e)}})}a(uB,"createCommand");function kme(r,e){return e.concat([r])}a(kme,"collect");ct();var qs=require("path"),Vd=require("fs"),jc=J(We());Pt();qt();var zm=J(We());var $d="Asia/Almaty",au="exo__Asset_updatedAt";var gO={ems__Effort_status:{commands:["mark-done","move-to-backlog","rollback-to-backlog","start-effort","set-draft-status"]},ems__Task_zone:{commands:["set-criticality-high","set-criticality-medium","set-criticality-low"]},ems__Effort_parent:{commands:["set-parent"],argSuffix:`--input '{"parent":"<uid>"}'`},exo__Asset_label:{commands:["set-label"],argSuffix:`--input '{"label":"<text>"}'`},exo__Instance_class:{commands:["convert-to-task","convert-to-project"],note:"reclassing is a semantic operation with a precondition"},ems__Effort_startTimestamp:{commands:["start-effort","rollback-to-backlog","park-waiting"],clearedBy:["rollback-to-backlog","park-waiting"],note:"start-effort sets it; the others clear it as a side effect of the status change"},ems__Effort_endTimestamp:{commands:["mark-done","re-open"],clearedBy:["re-open"],note:"mark-done sets it; re-open clears it as a side effect of the status change"},ems__Effort_resolutionTimestamp:{commands:["mark-done","re-open"],clearedBy:["re-open"],note:"mark-done sets it; re-open clears it as a side effect of the status change"},ems__Effort_plannedStartTimestamp:{commands:["set-planned-start","plan-on-today","plan-for-evening","shift-day-forward","shift-day-backward"]},ems__Effort_plannedEndTimestamp:{commands:["set-planned-end"]},ems__Effort_scheduledDate:{commands:["set-scheduled-date"]},ems__Effort_votes:{commands:["vote-on-effort"]},archived:{commands:["archive","archive-ontologically","un-archive"],clearedBy:["un-archive"]},exo__Asset_archived:{commands:["archive","archive-ontologically","un-archive"],clearedBy:["un-archive"]}};function Km(r){return Object.prototype.hasOwnProperty.call(gO,r)?gO[r]:void 0}a(Km,"guardedRouteFor");function mw(r,e){if(e.size===0)return yO(r);let t=r.commands.filter(n=>e.has(n));return t.length===0?`apply ${r.commands.join("|")} <path> (\u26D4 none of these resolve in this vault \u2014 the owning assetspace looks unmounted)`:yO({...r,commands:t})}a(mw,"renderGuardedRouteResolved");function yO(r){let e=`apply ${r.commands.join("|")} <path>`,t=r.argSuffix?`${e} ${r.argSuffix}`:e;return r.note?`${t} (${r.note})`:t}a(yO,"renderGuardedRoute");var lMe=Object.fromEntries(Object.entries(gO).map(([r,e])=>[r,yO(e)])),gw={exo__Asset_uid:"the asset identity \u2014 changing it breaks UID-canon filenames and every inbound [[uid]] wikilink",[au]:"auto-managed (bumped on every mutation)"};function fB(r){let e=Km(r);if(e===void 0)return;let t=e.clearedBy??[];if(t.length===0)return;let{note:n,...i}=e;return{...i,commands:t}}a(fB,"clearingRouteFor");function dB(r){return`Refusing to remove "${r}" via remove-property \u2014 it is guarded, and no dedicated command clears it (the ones that own it assign a value). If dropping the facet is intended, say so explicitly: --force --reason "<why>"`}a(dB,"renderNoClearingPathRefusal");function yw(r,e,t,n){return`Refusing to ${r} "${t}" via ${e} \u2014 it has a dedicated guarded command so the state machine / precondition is not bypassed. Use: exocortex ${n} --vault <v>`}a(yw,"renderGuardRefusal");function _w(r,e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0}a(_w,"guardedReason");function Ud(r,e){let n=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(r),i=a(s=>n.find(o=>o.type===s)?.value??"00","get");return`${i("year")}-${i("month")}-${i("day")}T${i("hour")}:${i("minute")}:${i("second")}`}a(Ud,"stampTimestamp");var Mme=/^\s*exocmd__Command_cliName:\s*(.+?)\s*$/gm;function jme(r){let e=r.trim();return e.length>=2&&(e[0]==='"'||e[0]==="'")&&e[e.length-1]===e[0]?e.slice(1,-1).trim():e}a(jme,"unquote");var Bd=class{constructor(e){this.vaultPath=e}static{a(this,"CommandNameRegistry")}async collect(){if(this.cache)return this.cache;let{readdir:e,readFile:t}=await import("fs/promises"),n=new Set,i=a(async s=>{let o;try{o=await e(s,{withFileTypes:!0})}catch{return}for(let c of o){let l=`${s}/${c.name}`;if(c.isDirectory()){if(c.name===".git"||c.name==="node_modules")continue;await i(l)}else if(c.isFile()&&c.name.endsWith(".md")){let u;try{u=await t(l,"utf-8")}catch{continue}for(let f of u.matchAll(Mme)){let d=jme(f[1]);d&&n.add(d)}}}},"walk");return await i(this.vaultPath),this.cache=n,n}};var $me="exo__Asset_isDefinedBy";function Ume(r){let e=a(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean","isScalar");if(e(r)||Array.isArray(r)&&r.every(e))return;let t=r===null?"null":Array.isArray(r)?"an array with non-scalar elements":typeof r;throw new Error(`--input.value must be a scalar (string/number/boolean) or an array of scalars, not ${t}`)}a(Ume,"assertScalarOrScalarArray");function Bme(r){let e=r.input!==void 0,t=r.property!==void 0;if(e&&t)throw new Xe("Pass --input OR --property/--value, not both.",`set-property <path> --input '{"property":"<name>","value":<v>}'`);if(e){let n;try{n=JSON.parse(r.input)}catch(o){let c=o instanceof Error?o.message:String(o);throw new Error(`--input: invalid JSON (${c})`)}if(typeof n!="object"||n===null||Array.isArray(n))throw new Error('--input must be a JSON object of the form {"property":"<name>","value":<v>}');let i=n,s=i.property;if(typeof s!="string"||s.trim().length===0)throw new Error("--input.property must be a non-empty string");if(!("value"in i))throw new Error("--input.value is required");return{property:s.trim(),value:i.value}}if(t){if(r.value===void 0)throw new Error("--property requires --value (or use --input for a typed/array value)");return{property:r.property.trim(),value:r.value}}throw new Xe("No property provided.",`set-property <path> --input '{"property":"<name>","value":<v>}' OR set-property <path> --property <name> --value <string>`)}a(Bme,"resolvePropertyAndValue");function Vme(r,e){let t=jc.STRING_SCALAR_PROPERTIES.has(e);return Array.isArray(r)?r.map(n=>(0,jc.serializeYamlScalar)(n,t)):(0,jc.serializeYamlScalar)(r,t)}a(Vme,"serializeForWrite");function pB(){return new fe("set-property").description("Set an arbitrary non-guarded frontmatter property on an existing vault asset (bumps exo__Asset_updatedAt). Refuses state-machine-guarded properties (status/zone/parent/label/fact-timestamps) \u2014 those keep their dedicated `apply` commands. Issues #3795 / #3848.").argument("<path>","Vault-relative path to the target asset").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--input <json>",'JSON {"property":"<name>","value":<v>} \u2014 value is JSON-typed (boolean/number/string/array). Primary form.').option("--property <name>","Property name (string-value convenience form; pair with --value; use --input for boolean/number/array values)").option("--value <value>","Property value as a string (pair with --property; use --input for typed/array values)").option("--skip-wikilink-validation","Skip [[...]] wikilink existence validation").option("--timezone <tz>","Timezone for the exo__Asset_updatedAt bump (defaults to Asia/Almaty)").option("--frozen-clock <iso>","Freeze the updatedAt clock to an ISO timestamp for test/replay").option("--dry-run","Preview the resulting frontmatter without writing").option("--yes","Accepted for symmetry with the apply/create subcommands (set-property is non-interactive; no-op)").action(async(r,e)=>{try{let t=(0,qs.resolve)(e.vault);if(!(0,Vd.existsSync)(t))throw new Me(t);let n=(0,qs.resolve)(t,r),i=(0,qs.relative)(t,n);if(i===".."||i.startsWith(`..${qs.sep}`)||(0,qs.isAbsolute)(i))throw new Error(`Target is outside the vault: ${r} (vault: ${t})`);let s;try{s=(0,Vd.readFileSync)(n,"utf-8")}catch(E){throw E.code==="ENOENT"?new Error(`Target file not found: ${r}`):E}if(!/^\s*exo__Asset_uid:/m.test(s))throw new Error(`Not a vault asset (no exo__Asset_uid): ${i}. set-property only mutates existing assets.`);let{property:o,value:c}=Bme(e),l=jc.FrontmatterService.normalizeIRI(o),u=_w(gw,l);if(u!==void 0)throw new Error(`Refusing to set "${l}" \u2014 ${u}.`);let f=Km(l);if(f!==void 0){let E=await new Bd(t).collect();throw new Error(yw("set","set-property",l,mw(f,E)))}if(await new kc(t).validate([l]),Ume(c),!e.skipWikilinkValidation){let E=new Nc(new ci(t)),S=Array.isArray(c)?c:[c];for(let R of S)typeof R=="string"&&await E.validateValue(R)}let p=new jc.FrontmatterService,h=e.frozenClock?new Date(e.frozenClock):new Date,m=e.timezone??$d,y=Ud(h,m),_=(0,zm.canonicalYamlKey)(l),b=p.updateProperty(s,_,Vme(c,_));b=p.updateProperty(b,au,y);let T;if(l===$me){let E=Array.isArray(c)?c[0]:c,S=await pw(new ci(t),E);if(S!==null){let R=(0,qs.dirname)(i),D=R==="."?"":R;D!==S&&(T=`\u26A0 co-location: exo__Asset_isDefinedBy now points at "${S||"<vault root>"}" but the file is in "${D||"<vault root>"}". Move it to match: exocortex apply repair-folder ${i} --vault <v>`)}}e.dryRun?process.stderr.write(`--- DRY RUN PREVIEW ---
573
+ `),process.exit(0)}catch(e){se.handle(e)}})}a(uB,"createCommand");function kme(r,e){return e.concat([r])}a(kme,"collect");ct();var qs=require("path"),Vd=require("fs"),jc=J(We());Pt();qt();var zm=J(We());var $d="Asia/Almaty",au="exo__Asset_updatedAt";var gO={ems__Effort_status:{commands:["mark-done","move-to-backlog","rollback-to-backlog","start-effort","set-draft-status"]},ems__Task_zone:{commands:["set-criticality-high","set-criticality-medium","set-criticality-low"]},ems__Effort_parent:{commands:["set-parent"],argSuffix:`--input '{"parent":"<uid>"}'`},exo__Asset_label:{commands:["set-label"],argSuffix:`--input '{"label":"<text>"}'`},exo__Instance_class:{commands:["convert-to-task","convert-to-project"],note:"reclassing is a semantic operation with a precondition"},ems__Effort_startTimestamp:{commands:["start-effort","rollback-to-backlog","park-waiting"],clearedBy:["rollback-to-backlog","park-waiting"],note:"start-effort sets it; the others clear it as a side effect of the status change"},ems__Effort_endTimestamp:{commands:["mark-done","re-open"],clearedBy:["re-open"],note:"mark-done sets it; re-open clears it as a side effect of the status change"},ems__Effort_resolutionTimestamp:{commands:["mark-done","re-open"],clearedBy:["re-open"],note:"mark-done sets it; re-open clears it as a side effect of the status change"},ems__Effort_plannedStartTimestamp:{commands:["set-planned-start","plan-on-today","plan-for-evening","shift-day-forward","shift-day-backward"]},ems__Effort_plannedEndTimestamp:{commands:["set-planned-end"]},ems__Effort_scheduledDate:{commands:["set-scheduled-date"]},ems__Effort_votes:{commands:["vote-on-effort"]},archived:{commands:["archive","archive-ontologically","un-archive"],clearedBy:["un-archive"]},exo__Asset_archived:{commands:["archive","archive-ontologically","un-archive"],clearedBy:["un-archive"]}};function Km(r){return Object.prototype.hasOwnProperty.call(gO,r)?gO[r]:void 0}a(Km,"guardedRouteFor");function mw(r,e){if(e.size===0)return yO(r);let t=r.commands.filter(n=>e.has(n));return t.length===0?`apply ${r.commands.join("|")} <path> (\u26D4 none of these resolve in this vault \u2014 the owning assetspace looks unmounted)`:yO({...r,commands:t})}a(mw,"renderGuardedRouteResolved");function yO(r){let e=`apply ${r.commands.join("|")} <path>`,t=r.argSuffix?`${e} ${r.argSuffix}`:e;return r.note?`${t} (${r.note})`:t}a(yO,"renderGuardedRoute");var uMe=Object.fromEntries(Object.entries(gO).map(([r,e])=>[r,yO(e)])),gw={exo__Asset_uid:"the asset identity \u2014 changing it breaks UID-canon filenames and every inbound [[uid]] wikilink",[au]:"auto-managed (bumped on every mutation)"};function fB(r){let e=Km(r);if(e===void 0)return;let t=e.clearedBy??[];if(t.length===0)return;let{note:n,...i}=e;return{...i,commands:t}}a(fB,"clearingRouteFor");function dB(r){return`Refusing to remove "${r}" via remove-property \u2014 it is guarded, and no dedicated command clears it (the ones that own it assign a value). If dropping the facet is intended, say so explicitly: --force --reason "<why>"`}a(dB,"renderNoClearingPathRefusal");function yw(r,e,t,n){return`Refusing to ${r} "${t}" via ${e} \u2014 it has a dedicated guarded command so the state machine / precondition is not bypassed. Use: exocortex ${n} --vault <v>`}a(yw,"renderGuardRefusal");function _w(r,e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0}a(_w,"guardedReason");function Ud(r,e){let n=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(r),i=a(s=>n.find(o=>o.type===s)?.value??"00","get");return`${i("year")}-${i("month")}-${i("day")}T${i("hour")}:${i("minute")}:${i("second")}`}a(Ud,"stampTimestamp");var Mme=/^\s*exocmd__Command_cliName:\s*(.+?)\s*$/gm;function jme(r){let e=r.trim();return e.length>=2&&(e[0]==='"'||e[0]==="'")&&e[e.length-1]===e[0]?e.slice(1,-1).trim():e}a(jme,"unquote");var Bd=class{constructor(e){this.vaultPath=e}static{a(this,"CommandNameRegistry")}async collect(){if(this.cache)return this.cache;let{readdir:e,readFile:t}=await import("fs/promises"),n=new Set,i=a(async s=>{let o;try{o=await e(s,{withFileTypes:!0})}catch{return}for(let c of o){let l=`${s}/${c.name}`;if(c.isDirectory()){if(c.name===".git"||c.name==="node_modules")continue;await i(l)}else if(c.isFile()&&c.name.endsWith(".md")){let u;try{u=await t(l,"utf-8")}catch{continue}for(let f of u.matchAll(Mme)){let d=jme(f[1]);d&&n.add(d)}}}},"walk");return await i(this.vaultPath),this.cache=n,n}};var $me="exo__Asset_isDefinedBy";function Ume(r){let e=a(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean","isScalar");if(e(r)||Array.isArray(r)&&r.every(e))return;let t=r===null?"null":Array.isArray(r)?"an array with non-scalar elements":typeof r;throw new Error(`--input.value must be a scalar (string/number/boolean) or an array of scalars, not ${t}`)}a(Ume,"assertScalarOrScalarArray");function Bme(r,e){if(e==="")throw new Error(`Refusing to set "${r}" to an EMPTY value \u2014 an empty string writes a junk key (${r}: "") rather than clearing the property. To delete it use: exocortex remove-property <path> --property ${r} --vault <v>`)}a(Bme,"assertNonEmptyValue");function Vme(r){let e=r.input!==void 0,t=r.property!==void 0;if(e&&t)throw new Xe("Pass --input OR --property/--value, not both.",`set-property <path> --input '{"property":"<name>","value":<v>}'`);if(e){let n;try{n=JSON.parse(r.input)}catch(o){let c=o instanceof Error?o.message:String(o);throw new Error(`--input: invalid JSON (${c})`)}if(typeof n!="object"||n===null||Array.isArray(n))throw new Error('--input must be a JSON object of the form {"property":"<name>","value":<v>}');let i=n,s=i.property;if(typeof s!="string"||s.trim().length===0)throw new Error("--input.property must be a non-empty string");if(!("value"in i))throw new Error("--input.value is required");return{property:s.trim(),value:i.value}}if(t){if(r.value===void 0)throw new Error("--property requires --value (or use --input for a typed/array value)");return{property:r.property.trim(),value:r.value}}throw new Xe("No property provided.",`set-property <path> --input '{"property":"<name>","value":<v>}' OR set-property <path> --property <name> --value <string>`)}a(Vme,"resolvePropertyAndValue");function Gme(r,e){let t=jc.STRING_SCALAR_PROPERTIES.has(e);return Array.isArray(r)?r.map(n=>(0,jc.serializeYamlScalar)(n,t)):(0,jc.serializeYamlScalar)(r,t)}a(Gme,"serializeForWrite");function pB(){return new fe("set-property").description("Set an arbitrary non-guarded frontmatter property on an existing vault asset (bumps exo__Asset_updatedAt). Refuses state-machine-guarded properties (status/zone/parent/label/fact-timestamps) \u2014 those keep their dedicated `apply` commands. Issues #3795 / #3848.").argument("<path>","Vault-relative path to the target asset").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--input <json>",'JSON {"property":"<name>","value":<v>} \u2014 value is JSON-typed (boolean/number/string/array). Primary form.').option("--property <name>","Property name (string-value convenience form; pair with --value; use --input for boolean/number/array values)").option("--value <value>","Property value as a string (pair with --property; use --input for typed/array values)").option("--skip-wikilink-validation","Skip [[...]] wikilink existence validation").option("--timezone <tz>","Timezone for the exo__Asset_updatedAt bump (defaults to Asia/Almaty)").option("--frozen-clock <iso>","Freeze the updatedAt clock to an ISO timestamp for test/replay").option("--dry-run","Preview the resulting frontmatter without writing").option("--yes","Accepted for symmetry with the apply/create subcommands (set-property is non-interactive; no-op)").action(async(r,e)=>{try{let t=(0,qs.resolve)(e.vault);if(!(0,Vd.existsSync)(t))throw new Me(t);let n=(0,qs.resolve)(t,r),i=(0,qs.relative)(t,n);if(i===".."||i.startsWith(`..${qs.sep}`)||(0,qs.isAbsolute)(i))throw new Error(`Target is outside the vault: ${r} (vault: ${t})`);let s;try{s=(0,Vd.readFileSync)(n,"utf-8")}catch(E){throw E.code==="ENOENT"?new Error(`Target file not found: ${r}`):E}if(!/^\s*exo__Asset_uid:/m.test(s))throw new Error(`Not a vault asset (no exo__Asset_uid): ${i}. set-property only mutates existing assets.`);let{property:o,value:c}=Vme(e),l=jc.FrontmatterService.normalizeIRI(o),u=_w(gw,l);if(u!==void 0)throw new Error(`Refusing to set "${l}" \u2014 ${u}.`);let f=Km(l);if(f!==void 0){let E=await new Bd(t).collect();throw new Error(yw("set","set-property",l,mw(f,E)))}if(await new kc(t).validate([l]),Ume(c),Bme(o,c),!e.skipWikilinkValidation){let E=new Nc(new ci(t)),S=Array.isArray(c)?c:[c];for(let R of S)typeof R=="string"&&await E.validateValue(R)}let p=new jc.FrontmatterService,h=e.frozenClock?new Date(e.frozenClock):new Date,m=e.timezone??$d,y=Ud(h,m),_=(0,zm.canonicalYamlKey)(l),b=p.updateProperty(s,_,Gme(c,_));b=p.updateProperty(b,au,y);let T;if(l===$me){let E=Array.isArray(c)?c[0]:c,S=await pw(new ci(t),E);if(S!==null){let R=(0,qs.dirname)(i),D=R==="."?"":R;D!==S&&(T=`\u26A0 co-location: exo__Asset_isDefinedBy now points at "${S||"<vault root>"}" but the file is in "${D||"<vault root>"}". Move it to match: exocortex apply repair-folder ${i} --vault <v>`)}}e.dryRun?process.stderr.write(`--- DRY RUN PREVIEW ---
574
574
  ${b}
575
575
  --- END PREVIEW ---
576
576
  `):(0,Vd.writeFileSync)(n,b,"utf-8"),T&&process.stderr.write(T+`
577
577
  `);let I={path:i,property:l,value:c,updatedAt:y,...T?{coLocationWarning:!0}:{}};process.stdout.write(JSON.stringify(I)+`
578
- `),process.exit(0)}catch(t){se.handle(t)}})}a(pB,"setPropertyCommand");ct();var Fa=require("path"),Gd=require("fs"),_O=J(We());Pt();qt();function Gme(r){let e=r.input!==void 0,t=r.property!==void 0;if(e&&t)throw new Xe("Pass --input OR --property, not both.","remove-property <path> --property <name>");if(e){let n;try{n=JSON.parse(r.input)}catch(s){let o=s instanceof Error?s.message:String(s);throw new Error(`--input: invalid JSON (${o})`)}if(typeof n!="object"||n===null||Array.isArray(n))throw new Error('--input must be a JSON object of the form {"property":"<name>"}');let i=n.property;if(typeof i!="string"||i.trim().length===0)throw new Error("--input.property must be a non-empty string");return i.trim()}if(t){let n=r.property.trim();if(n.length===0)throw new Error("--property must be a non-empty name");return n}throw new Xe("No property provided.",`remove-property <path> --property <name> OR remove-property <path> --input '{"property":"<name>"}'`)}a(Gme,"resolveProperty");function hB(){return new fe("remove-property").description("Delete a non-guarded frontmatter property from an existing vault asset (bumps exo__Asset_updatedAt when a change occurs). The delete-side counterpart of set-property; refuses state-machine-guarded properties (status/zone/parent/label/fact-timestamps) \u2014 those keep their dedicated `apply` commands. Issue #3926.").argument("<path>","Vault-relative path to the target asset").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--input <json>",`JSON {"property":"<name>"} \u2014 the property to remove (symmetric with set-property's --input).`).option("--property <name>","Property name to remove (convenience form; use --input for scripting)").option("--timezone <tz>","Timezone for the exo__Asset_updatedAt bump (defaults to Asia/Almaty)").option("--frozen-clock <iso>","Freeze the updatedAt clock to an ISO timestamp for test/replay").option("--force","Remove a guarded property that has NO clearing command (requires --reason). Refused when a clearing command exists \u2014 see req 148ce5a4.").option("--reason <text>","Why the guarded property is being dropped; recorded on stderr as the audit trail of a deliberate bypass").option("--dry-run","Preview the resulting frontmatter without writing").option("--yes","Accepted for symmetry with the apply/create subcommands (remove-property is non-interactive; no-op)").action(async(r,e)=>{try{let t=(0,Fa.resolve)(e.vault);if(!(0,Gd.existsSync)(t))throw new Me(t);let n=(0,Fa.resolve)(t,r),i=(0,Fa.relative)(t,n);if(i===".."||i.startsWith(`..${Fa.sep}`)||(0,Fa.isAbsolute)(i))throw new Error(`Target is outside the vault: ${r} (vault: ${t})`);let s;try{s=(0,Gd.readFileSync)(n,"utf-8")}catch(_){throw _.code==="ENOENT"?new Error(`Target file not found: ${r}`):_}if(!/^\s*exo__Asset_uid:/m.test(s))throw new Error(`Not a vault asset (no exo__Asset_uid): ${i}. remove-property only mutates existing assets.`);let o=Gme(e),c=_O.FrontmatterService.normalizeIRI(o),l=_w(gw,c);if(l!==void 0)throw new Error(`Refusing to remove "${c}" \u2014 ${l}.`);if(Km(c)!==void 0){let _=fB(c);if(_!==void 0){let T=await new Bd(t).collect();throw new Error(yw("remove","remove-property",c,mw(_,T)))}let b=typeof e.reason=="string"?e.reason.trim():"";if(e.force!==!0||b.length===0)throw new Error(dB(c));console.error(`[guard-bypass] remove-property "${c}" on ${i} \u2014 reason: ${b}`)}let f=new _O.FrontmatterService,d=f.removeProperty(s,(0,zm.canonicalYamlKey)(c)),p=d!==s,h=d,m;if(p){let _=e.frozenClock?new Date(e.frozenClock):new Date,b=e.timezone??$d;m=Ud(_,b),h=f.updateProperty(d,au,m)}p||await new kc(t).isUnknownName(c)&&process.stderr.write(`\u26A0\uFE0F Nothing was removed, and "${c}" is not a property in the mounted TBox \u2014 check the spelling (an undeclared property is removable, so this is a hint, not a refusal).
578
+ `),process.exit(0)}catch(t){se.handle(t)}})}a(pB,"setPropertyCommand");ct();var Fa=require("path"),Gd=require("fs"),_O=J(We());Pt();qt();function qme(r){let e=r.input!==void 0,t=r.property!==void 0;if(e&&t)throw new Xe("Pass --input OR --property, not both.","remove-property <path> --property <name>");if(e){let n;try{n=JSON.parse(r.input)}catch(s){let o=s instanceof Error?s.message:String(s);throw new Error(`--input: invalid JSON (${o})`)}if(typeof n!="object"||n===null||Array.isArray(n))throw new Error('--input must be a JSON object of the form {"property":"<name>"}');let i=n.property;if(typeof i!="string"||i.trim().length===0)throw new Error("--input.property must be a non-empty string");return i.trim()}if(t){let n=r.property.trim();if(n.length===0)throw new Error("--property must be a non-empty name");return n}throw new Xe("No property provided.",`remove-property <path> --property <name> OR remove-property <path> --input '{"property":"<name>"}'`)}a(qme,"resolveProperty");function hB(){return new fe("remove-property").description("Delete a non-guarded frontmatter property from an existing vault asset (bumps exo__Asset_updatedAt when a change occurs). The delete-side counterpart of set-property; refuses state-machine-guarded properties (status/zone/parent/label/fact-timestamps) \u2014 those keep their dedicated `apply` commands. Issue #3926.").argument("<path>","Vault-relative path to the target asset").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--input <json>",`JSON {"property":"<name>"} \u2014 the property to remove (symmetric with set-property's --input).`).option("--property <name>","Property name to remove (convenience form; use --input for scripting)").option("--timezone <tz>","Timezone for the exo__Asset_updatedAt bump (defaults to Asia/Almaty)").option("--frozen-clock <iso>","Freeze the updatedAt clock to an ISO timestamp for test/replay").option("--force","Remove a guarded property that has NO clearing command (requires --reason). Refused when a clearing command exists \u2014 see req 148ce5a4.").option("--reason <text>","Why the guarded property is being dropped; recorded on stderr as the audit trail of a deliberate bypass").option("--dry-run","Preview the resulting frontmatter without writing").option("--yes","Accepted for symmetry with the apply/create subcommands (remove-property is non-interactive; no-op)").action(async(r,e)=>{try{let t=(0,Fa.resolve)(e.vault);if(!(0,Gd.existsSync)(t))throw new Me(t);let n=(0,Fa.resolve)(t,r),i=(0,Fa.relative)(t,n);if(i===".."||i.startsWith(`..${Fa.sep}`)||(0,Fa.isAbsolute)(i))throw new Error(`Target is outside the vault: ${r} (vault: ${t})`);let s;try{s=(0,Gd.readFileSync)(n,"utf-8")}catch(_){throw _.code==="ENOENT"?new Error(`Target file not found: ${r}`):_}if(!/^\s*exo__Asset_uid:/m.test(s))throw new Error(`Not a vault asset (no exo__Asset_uid): ${i}. remove-property only mutates existing assets.`);let o=qme(e),c=_O.FrontmatterService.normalizeIRI(o),l=_w(gw,c);if(l!==void 0)throw new Error(`Refusing to remove "${c}" \u2014 ${l}.`);if(Km(c)!==void 0){let _=fB(c);if(_!==void 0){let T=await new Bd(t).collect();throw new Error(yw("remove","remove-property",c,mw(_,T)))}let b=typeof e.reason=="string"?e.reason.trim():"";if(e.force!==!0||b.length===0)throw new Error(dB(c));console.error(`[guard-bypass] remove-property "${c}" on ${i} \u2014 reason: ${b}`)}let f=new _O.FrontmatterService,d=f.removeProperty(s,(0,zm.canonicalYamlKey)(c)),p=d!==s,h=d,m;if(p){let _=e.frozenClock?new Date(e.frozenClock):new Date,b=e.timezone??$d;m=Ud(_,b),h=f.updateProperty(d,au,m)}p||await new kc(t).isUnknownName(c)&&process.stderr.write(`\u26A0\uFE0F Nothing was removed, and "${c}" is not a property in the mounted TBox \u2014 check the spelling (an undeclared property is removable, so this is a hint, not a refusal).
579
579
  `),e.dryRun?process.stderr.write(`--- DRY RUN PREVIEW ---
580
580
  ${h}
581
581
  --- END PREVIEW ---
582
582
  `):p&&(0,Gd.writeFileSync)(n,h,"utf-8");let y={path:i,property:c,removed:p,...m?{updatedAt:m}:{}};process.stdout.write(JSON.stringify(y)+`
583
- `),process.exit(0)}catch(t){se.handle(t)}})}a(hB,"removePropertyCommand");ct();var Da=require("path"),$c=require("fs"),mB=J(We());Pt();qt();function qme(r){return new Promise((e,t)=>{let n=[],i=setTimeout(()=>{t(new Error(`Timed out reading body from stdin after ${r}ms`))},r);process.stdin.on("data",s=>n.push(Buffer.from(s))),process.stdin.on("end",()=>{clearTimeout(i),e(Buffer.concat(n).toString("utf-8"))}),process.stdin.on("error",s=>{clearTimeout(i),t(s)})})}a(qme,"readStdin");async function Wme(r){if(r.bodyFile){if(!(0,$c.existsSync)(r.bodyFile))throw new Error(`Body file not found: ${r.bodyFile}`);return{text:(0,$c.readFileSync)(r.bodyFile,"utf-8"),source:"file"}}if(r.body==="-")return{text:await qme(3e4),source:"stdin"};if(r.body!==void 0)return{text:r.body,source:"inline"}}a(Wme,"resolveNewBody");function gB(){return new fe("set-body").description("Overwrite the markdown BODY of an existing vault asset (frontmatter untouched, exo__Asset_updatedAt bumped, new-body wikilinks validated). The dogfood body-rewrite path \u2014 no raw backup\u2192rm\u2192Write. Issue #3943.").argument("<path>","Vault-relative path to the asset to rewrite").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--body-file <path>","Read the new body from a file").option("--body <text>","New body text ('-' reads from stdin)").option("--timezone <tz>","Timezone for the exo__Asset_updatedAt bump (defaults to Asia/Almaty)").option("--frozen-clock <iso>","Freeze the updatedAt clock to an ISO timestamp for test/replay").option("--dry-run","Preview the resulting content without writing").option("--skip-wikilink-validation","Skip wikilink existence validation for the new body").action(async(r,e)=>{try{let t=(0,Da.resolve)(e.vault);if(!(0,$c.existsSync)(t))throw new Me(t);let n=(0,Da.resolve)(t,r),i=(0,Da.relative)(t,n);if(i===".."||i.startsWith(`..${Da.sep}`)||(0,Da.isAbsolute)(i))throw new Error(`Target is outside the vault: ${r} (vault: ${t})`);if(e.bodyFile===void 0&&e.body===void 0)throw new Error("Provide the new body via --body-file <path>, --body <text>, or --body - (stdin).");let s;try{s=(0,$c.readFileSync)(n,"utf-8")}catch(T){throw T.code==="ENOENT"?new Error(`Target file not found: ${r}`):T}if(!/^\s*exo__Asset_uid:/m.test(s))throw new Error(`Not a vault asset (no exo__Asset_uid): ${i}. set-body only rewrites existing assets.`);let o=new mB.FrontmatterService,c=o.parse(s);if(!c.exists)throw new Error(`No frontmatter block found in ${i}; set-body preserves the frontmatter and only rewrites the body.`);let l=`---
583
+ `),process.exit(0)}catch(t){se.handle(t)}})}a(hB,"removePropertyCommand");ct();var Da=require("path"),$c=require("fs"),mB=J(We());Pt();qt();function Wme(r){return new Promise((e,t)=>{let n=[],i=setTimeout(()=>{t(new Error(`Timed out reading body from stdin after ${r}ms`))},r);process.stdin.on("data",s=>n.push(Buffer.from(s))),process.stdin.on("end",()=>{clearTimeout(i),e(Buffer.concat(n).toString("utf-8"))}),process.stdin.on("error",s=>{clearTimeout(i),t(s)})})}a(Wme,"readStdin");async function Hme(r){if(r.bodyFile){if(!(0,$c.existsSync)(r.bodyFile))throw new Error(`Body file not found: ${r.bodyFile}`);return{text:(0,$c.readFileSync)(r.bodyFile,"utf-8"),source:"file"}}if(r.body==="-")return{text:await Wme(3e4),source:"stdin"};if(r.body!==void 0)return{text:r.body,source:"inline"}}a(Hme,"resolveNewBody");function gB(){return new fe("set-body").description("Overwrite the markdown BODY of an existing vault asset (frontmatter untouched, exo__Asset_updatedAt bumped, new-body wikilinks validated). The dogfood body-rewrite path \u2014 no raw backup\u2192rm\u2192Write. Issue #3943.").argument("<path>","Vault-relative path to the asset to rewrite").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--body-file <path>","Read the new body from a file").option("--body <text>","New body text ('-' reads from stdin)").option("--timezone <tz>","Timezone for the exo__Asset_updatedAt bump (defaults to Asia/Almaty)").option("--frozen-clock <iso>","Freeze the updatedAt clock to an ISO timestamp for test/replay").option("--dry-run","Preview the resulting content without writing").option("--skip-wikilink-validation","Skip wikilink existence validation for the new body").action(async(r,e)=>{try{let t=(0,Da.resolve)(e.vault);if(!(0,$c.existsSync)(t))throw new Me(t);let n=(0,Da.resolve)(t,r),i=(0,Da.relative)(t,n);if(i===".."||i.startsWith(`..${Da.sep}`)||(0,Da.isAbsolute)(i))throw new Error(`Target is outside the vault: ${r} (vault: ${t})`);if(e.bodyFile===void 0&&e.body===void 0)throw new Error("Provide the new body via --body-file <path>, --body <text>, or --body - (stdin).");let s;try{s=(0,$c.readFileSync)(n,"utf-8")}catch(T){throw T.code==="ENOENT"?new Error(`Target file not found: ${r}`):T}if(!/^\s*exo__Asset_uid:/m.test(s))throw new Error(`Not a vault asset (no exo__Asset_uid): ${i}. set-body only rewrites existing assets.`);let o=new mB.FrontmatterService,c=o.parse(s);if(!c.exists)throw new Error(`No frontmatter block found in ${i}; set-body preserves the frontmatter and only rewrites the body.`);let l=`---
584
584
  ${c.content}
585
- ---`,u=await Wme(e),f=u?.text??"";u?.source==="inline"&&(f=f.replace(/\\n/g,`
585
+ ---`,u=await Hme(e),f=u?.text??"";u?.source==="inline"&&(f=f.replace(/\\n/g,`
586
586
  `)),e.skipWikilinkValidation||await new Nc(new ci(t)).validateValue(f);let d=f.length>0?f.endsWith(`
587
587
  `)?f:`${f}
588
588
  `:"",p=`${l}
@@ -590,39 +590,39 @@ ${d}`,h=e.frozenClock?new Date(e.frozenClock):new Date,m=e.timezone??$d,y=Ud(h,m
590
590
  ${_}
591
591
  --- END PREVIEW ---
592
592
  `):(0,$c.writeFileSync)(n,_,"utf-8");let b={path:i,updatedAt:y,bodyBytes:Buffer.byteLength(d,"utf8")};process.stdout.write(JSON.stringify(b)+`
593
- `),process.exit(0)}catch(t){se.handle(t)}})}a(gB,"setBodyCommand");ct();var La=require("path"),qd=require("fs");Pt();qt();var Hme=/^([^\s#][^:]*):(?:\s.*)?$/;function zme(r){let e=r.match(/^(---\r?\n)([\s\S]*?)(\r?\n---)/);if(!e)return{changed:!1,content:r,removed:[]};let[,t,n,i]=e,s=t.includes(`\r
593
+ `),process.exit(0)}catch(t){se.handle(t)}})}a(gB,"setBodyCommand");ct();var La=require("path"),qd=require("fs");Pt();qt();var zme=/^([^\s#][^:]*):(?:\s.*)?$/;function Kme(r){let e=r.match(/^(---\r?\n)([\s\S]*?)(\r?\n---)/);if(!e)return{changed:!1,content:r,removed:[]};let[,t,n,i]=e,s=t.includes(`\r
594
594
  `)?`\r
595
595
  `:`
596
- `,o=n.split(/\r?\n/),c=[];for(let m of o){let y=Hme.exec(m);y?c.push({key:y[1],lines:[m]}):c.length>0?c[c.length-1].lines.push(m):c.push({key:null,lines:[m]})}let l=new Map,u=new Map;c.forEach((m,y)=>{m.key!==null&&(l.set(m.key,(l.get(m.key)??0)+1),u.set(m.key,y))});let f=new Map,d=c.filter((m,y)=>m.key===null||(l.get(m.key)??0)<=1||y===u.get(m.key)?!0:(f.set(m.key,(f.get(m.key)??0)+1),!1));if(f.size===0)return{changed:!1,content:r,removed:[]};let p=d.map(m=>m.lines.join(s)).join(s);return{changed:!0,content:`${t}${p}${i}`+r.slice(e[0].length),removed:[...f.entries()].map(([m,y])=>({key:m,removedOccurrences:y}))}}a(zme,"dedupeFrontmatterKeys");function yB(){return new fe("repair-frontmatter").description("Remove duplicated top-level YAML frontmatter keys (keep-last) \u2014 the dogfood-clean repair for the invisible/unrepairable duplicate-key class (#3800). Operates on raw text, so it fixes a file the parser itself cannot read.").argument("<path>","Vault-relative path to the target asset").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--dry-run","Preview the dedupe diff without writing").option("--yes","Accepted for symmetry with the apply/create subcommands (repair-frontmatter is non-interactive; no-op)").action(async(r,e)=>{try{let t=(0,La.resolve)(e.vault);if(!(0,qd.existsSync)(t))throw new Me(t);let n=(0,La.resolve)(t,r),i=(0,La.relative)(t,n);if(i===".."||i.startsWith(`..${La.sep}`)||(0,La.isAbsolute)(i))throw new Error(`Target is outside the vault: ${r} (vault: ${t})`);let s;try{s=(0,qd.readFileSync)(n,"utf-8")}catch(c){throw c.code==="ENOENT"?new Error(`Target file not found: ${r}`):c}let o=zme(s);if(!o.changed){process.stdout.write(JSON.stringify({path:i,changed:!1,dryRun:!!e.dryRun,removed:[]})+`
596
+ `,o=n.split(/\r?\n/),c=[];for(let m of o){let y=zme.exec(m);y?c.push({key:y[1],lines:[m]}):c.length>0?c[c.length-1].lines.push(m):c.push({key:null,lines:[m]})}let l=new Map,u=new Map;c.forEach((m,y)=>{m.key!==null&&(l.set(m.key,(l.get(m.key)??0)+1),u.set(m.key,y))});let f=new Map,d=c.filter((m,y)=>m.key===null||(l.get(m.key)??0)<=1||y===u.get(m.key)?!0:(f.set(m.key,(f.get(m.key)??0)+1),!1));if(f.size===0)return{changed:!1,content:r,removed:[]};let p=d.map(m=>m.lines.join(s)).join(s);return{changed:!0,content:`${t}${p}${i}`+r.slice(e[0].length),removed:[...f.entries()].map(([m,y])=>({key:m,removedOccurrences:y}))}}a(Kme,"dedupeFrontmatterKeys");function yB(){return new fe("repair-frontmatter").description("Remove duplicated top-level YAML frontmatter keys (keep-last) \u2014 the dogfood-clean repair for the invisible/unrepairable duplicate-key class (#3800). Operates on raw text, so it fixes a file the parser itself cannot read.").argument("<path>","Vault-relative path to the target asset").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--dry-run","Preview the dedupe diff without writing").option("--yes","Accepted for symmetry with the apply/create subcommands (repair-frontmatter is non-interactive; no-op)").action(async(r,e)=>{try{let t=(0,La.resolve)(e.vault);if(!(0,qd.existsSync)(t))throw new Me(t);let n=(0,La.resolve)(t,r),i=(0,La.relative)(t,n);if(i===".."||i.startsWith(`..${La.sep}`)||(0,La.isAbsolute)(i))throw new Error(`Target is outside the vault: ${r} (vault: ${t})`);let s;try{s=(0,qd.readFileSync)(n,"utf-8")}catch(c){throw c.code==="ENOENT"?new Error(`Target file not found: ${r}`):c}let o=Kme(s);if(!o.changed){process.stdout.write(JSON.stringify({path:i,changed:!1,dryRun:!!e.dryRun,removed:[]})+`
597
597
  `);return}e.dryRun||(0,qd.writeFileSync)(n,o.content,"utf-8"),process.stdout.write(JSON.stringify({path:i,changed:!0,dryRun:!!e.dryRun,removed:o.removed})+`
598
- `)}catch(t){se.handle(t)}})}a(yB,"repairFrontmatterCommand");ct();var _B=require("fs"),bB=require("path"),ss=J(We());Bi();Pt();qt();mr();ZS();var Kme="https://exocortex.my/ontology/find#Alias_sparql",Yme="https://exocortex.my/ontology/exo#Asset_label";function Wd(r){if(r&&typeof r=="object"&&"value"in r){let e=r.value;return typeof e=="string"?e:String(e)}return String(r)}a(Wd,"nodeValue");async function Qme(r,e){let t=await r.match(void 0,void 0,void 0),n=[];for(let s of t)Wd(s.predicate)!==Yme||Wd(s.object)!==e||n.push(Wd(s.subject));if(n.length===0)return null;let i=[];for(let s of n)for(let o of t)Wd(o.predicate)===Kme&&Wd(o.subject)===s&&i.push(Wd(o.object));if(i.length===0)return null;if(i.length>1)throw new Xe(`Ambiguous find__Alias "${e}" \u2014 ${i.length} instances define a sparql fragment`,`Ensure exactly one find__Alias asset has exo:Asset_label "${e}"`);return i[0]}a(Qme,"resolveAliasFragment");var Xme=/^([a-z][a-zA-Z0-9]*)__([A-Za-z0-9_]+)$/,Jme="https://exocortex.my/ontology/";function Zme(r,e){let t=Xme.exec(e);if(t){let i=`<${Jme}${t[1]}#${t[2]}>`;return r.replace(/\?value\b/g,i)}let n=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return r.replace(/\?value\b/g,`"${n}"`)}a(Zme,"bindValueLiteral");function SB(){return new fe("find").description("Find vault assets via SPARQL \u2014 outputs file paths one per line (RFC 8e83442b T1.1)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--sparql <query>","SPARQL SELECT query (must bind ?path)").option("--class <value>","Filter by class label via find__Alias 'class' (e.g. ems__Task)").action(async r=>{se.setFormat("text");try{if(r.sparql&&r.class)throw new Xe("--sparql and --class are mutually exclusive","Pass either a raw --sparql query or a find__Alias-backed flag like --class");if(!r.sparql&&!r.class)throw new Xe("one of --sparql <query> or --class <value> is required",'exocortex find --class ems__Task OR exocortex find --sparql "SELECT ?path WHERE { ... }"');let e=(0,bB.resolve)(r.vault);if(!(0,_B.existsSync)(e))throw new Me(e);let t=new $t(e),i=await new ss.NoteToRDFConverter(t).convertVault(),s=new ss.InMemoryTripleStore;await s.addAll(i);let o;if(r.class){let _=await Qme(s,"class");if(_===null)throw new Xe('No find__Alias with exo:Asset_label "class" was found in the vault',"Seed a find__Alias asset (label=class) or fall back to exocortex find --sparql");o=`SELECT ?path WHERE { ${Zme(_,r.class)} }`}else o=r.sparql;let c=XS(o);c=Ld(c);let l=new ss.ExoQLParser,u=JS(QS(e));u.size>0&&l.setVaultPrefixes(u);let f=l.parse(c),p=new ss.ExoQLAlgebraTranslator().translate(f);p.type!=="construct"&&(p=new ss.AlgebraOptimizer().optimize(p));let m=await new ss.ExoQLQueryExecutor(s).executeAll(p),y="obsidian://vault/";for(let _ of m){let T=_.toJSON().path;if(typeof T!="string"||!T.startsWith(y))continue;let I=T.slice(y.length),E;try{E=decodeURIComponent(I)}catch{E=I}process.stdout.write(E+`
599
- `)}}catch(e){se.handle(e),process.exit(5)}})}a(SB,"findCommand");ct();var EO=require("fs"),Ma=require("path"),Re=J(We());Pt();qt();mr();Bi();var RB=J(We()),Ht=J(TB());var AB="obsidian://vault/";function wge(r){let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return{async resolveTargetPath(t){if(!t)throw new Error("Cannot resolve empty targetIRI to a vault path");let n=t;if(n.startsWith(AB))n=decodeURI(n.slice(AB.length));else if(e.test(n)){let i=await r.findFileByUID(n);if(!i)throw new Error(`No vault file found for UID: ${n}`);n=i}if(n.endsWith(".md")||(n=`${n}.md`),!await r.fileExists(n))throw new Error(`Cannot resolve target file for IRI "${t}" (tried "${n}")`);return n}}}a(wge,"createCliPathResolver");var Ege=["openFile","sparqlSelect","getActiveFileIRI","getActiveFilePath","trashFile","duplicateFile"],wO=class extends Error{constructor(t){super(`Service "${t}" is not implemented in the CLI (no-op stub). dyncommand exec on this service_call grounding cannot change vault state. See CLI parity issues #2865-#2868 for port status.`);this.serviceId=t;this.name="CliServiceNotImplementedError"}static{a(this,"CliServiceNotImplementedError")}};function IB(r){return{async execute(){throw new wO(r)}}}a(IB,"notImplementedService");function vge(r){return e=>{let t=r.getFirstLinkpathDest(e,"");if(!t||!("basename"in t))return null;let i=r.getFrontmatter(t)?.exo__Asset_label;return typeof i=="string"&&i.length>0?i:null}}a(vge,"createCliClassResolver");function CB(r,e){for(let t of Ege)r.register(t,IB(t));for(let t of["updateProperty","removeProperty","setStatus","createAsset"])r.register(t,IB(t));if(e){if(e.fsAdapter){let t=new RB.FrontmatterService,n=wge(e.fsAdapter);r.register("updateProperty",(0,Ht.createUpdatePropertyService)(e.fsAdapter,t,n)),r.register("removeProperty",(0,Ht.createRemovePropertyService)(e.fsAdapter,t,n)),r.register("setStatus",(0,Ht.createSetStatusService)(e.fsAdapter,t,n)),r.register("createAsset",(0,Ht.createCreateAssetService)(e.vaultAdapter,e.fsAdapter,vge(e.vaultAdapter))),r.register("instantiatePrototypeSubtree",(0,Ht.createInstantiatePrototypeSubtreeService)(e.vaultAdapter,e.fsAdapter))}r.register("createRelatedTask",(0,Ht.createCreateRelatedTaskService)(e.vaultAdapter,e.genericAssetCreationService)),r.register("createRelatedProject",(0,Ht.createCreateRelatedProjectService)(e.vaultAdapter,e.genericAssetCreationService)),r.register("archiveAsset",(0,Ht.createArchiveAssetService)(e.vaultAdapter,e.archiveAssetService)),r.register("planForEvening",(0,Ht.createPlanForEveningService)(e.vaultAdapter,e.taskStatusService)),r.register("cleanProperties",(0,Ht.createCleanPropertiesService)(e.vaultAdapter,e.propertyCleanupService)),r.register("renameToUid",(0,Ht.createRenameToUidService)(e.vaultAdapter,e.renameToUidService)),r.register("repairFolder",(0,Ht.createRepairFolderService)(e.vaultAdapter,e.folderRepairService)),r.register("fixMissingLabel",(0,Ht.createFixMissingLabelService)(e.vaultAdapter,e.fixMissingLabelService))}}a(CB,"populateCliServiceRegistry");function Tge(r,e){let t=r.getAbstractFileByPath(e),n=t!==null&&"basename"in t?t:null,i=n?r.getFrontmatter(n):null,s=i&&typeof i=="object"?i.exo__Asset_label:void 0;return{uuid:n?.basename??e.replace(/^.*\//,"").replace(/\.md$/,""),path:e,label:typeof s=="string"?s:""}}a(Tge,"buildCreatedAsset");var Age=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function Ige(){if(process.stdin.isTTY)return[];let r=[];for await(let t of process.stdin)r.push(t);return Buffer.concat(r).toString("utf-8").split(`
600
- `).map(t=>t.trim()).filter(t=>t.length>0)}a(Ige,"readStdinLines");function ww(r){if(r&&typeof r=="object"&&"value"in r){let e=r.value;return typeof e=="string"?e:String(e)}return String(r)}a(ww,"nodeValue");async function Rge(r,e){let t=new Re.IRI("https://exocortex.my/ontology/exocmd#Command_cliName"),n=await r.match(void 0,t,void 0),i=[];for(let s of n)if(ww(s.object)===e){let l=ww(s.subject).match(/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i);l&&i.push(l[1])}if(i.length===0)return null;if(i.length>1)throw new Xe(`Ambiguous cliName "${e}" \u2014 resolves to ${i.length} commands: ${i.join(", ")}`,"Use the UUID directly: exocortex apply <uuid> <path>");return i[0]}a(Rge,"resolveSlugToUuid");async function Cge(r,e){let t=new Re.IRI("https://exocortex.my/ontology/exocmd#Command_destructive"),n=await r.match(void 0,t,void 0);for(let i of n)if(ww(i.subject).includes(e)){let o=ww(i.object);if(o==="true"||o==="True")return!0}return!1}a(Cge,"isDestructive");async function xge(r,e,t,n,i,s,o,c){let l={ok:!1,created:[]},u=(0,Ma.resolve)(r,i);if(!(0,EO.existsSync)(u))return console.error(`\u274C Target file not found: ${i}`),l;let f=(0,Ma.relative)(r,u);if(f===".."||f.startsWith(`..${Ma.sep}`)||(0,Ma.isAbsolute)(f))return console.error(`\u274C Target is outside the vault: ${i} (vault: ${r})`),l;let d=new Re.CommandResolver(e,iw),p=await d.loadCommand(n);if(!p)return console.error(`\u274C Command with UID "${n}" not found.`),l;if(await Cge(e,n)&&!s.dryRun&&!s.yes)return console.error(`\u274C Command "${p.name}" is marked destructive. Add --dry-run to preview, or --yes to apply.`),l;let m=(0,Re.vaultPathToIRI)(f),y=new $t(r),_=new Re.FolderRepairService(y),b=new Re.PreconditionEvaluator(e,void 0,{clock:o});(0,Re.registerDefaultHostFunctions)(b),b.registerHostFunction("isInWrongFolder",tw(y,_)),b.registerHostFunction("hasObsoleteProperties",rw(y));let T=y.getAbstractFileByPath(f),I=T!==null&&"basename"in T?T:null,E=I?y.getFrontmatter(I):null,S=E&&typeof E=="object"?E.exo__Asset_uid:void 0,R={targetIRI:m,filePath:f,fileBasename:I?.basename,assetUid:typeof S=="string"?S:void 0};if(!await b.evaluate(p.precondition,m,R))return console.error(`\u274C Precondition not satisfied for "${p.name}" on "${f}".`),l;if(s.dryRun)return s.json||console.log(`\u{1F50D} Dry-run: would apply "${p.name}" to "${f}" (precondition passed).`),{ok:!0,created:[]};let P=new Re.ServiceRegistry,M=new Re.GenericAssetCreationService(y).withDeterminism({clock:o,uidGenerator:c}),O=new Re.ArchiveAssetService(y),L=new Re.PropertyCleanupService(y),te=new Re.FixMissingLabelService(y),re=new Re.RenameToUidService(y),V=new Re.TaskStatusService(y,new Re.EffortStatusWorkflow,new Re.StatusTimestampService(y)),K=new ci(r);CB(P,{vaultAdapter:y,fsAdapter:K,genericAssetCreationService:M,archiveAssetService:O,taskStatusService:V,propertyCleanupService:L,fixMissingLabelService:te,renameToUidService:re,folderRepairService:_});let Se=new Re.NamedQueryRunner(new kd(e,K),e),ce=new Re.GroundingExecutor(K,K,P,(0,Re.createVaultFrontmatterClassLabelResolver)(K),{clock:o,uidGenerator:c,workflowResolver:t,groundingLoader:a(ne=>d.loadGroundingByUid(ne),"groundingLoader"),templateLoader:a(async ne=>{let xe=await K.findFileByUID(ne);return xe?(0,Re.stripTemplateFrontmatter)(await K.readFile(xe)):null},"templateLoader"),namedQueryRunner:Se,refToFolder:(0,Re.createVaultFrontmatterRefToFolderResolver)(K),refToFrontmatter:(0,Re.createVaultFrontmatterRefToFrontmatterResolver)(K)}),q;if(s.input)try{let ne=JSON.parse(s.input);if(typeof ne!="object"||ne===null||Array.isArray(ne))throw new Error("must be a JSON object");q=ne}catch(ne){let xe=ne instanceof Error?ne.message:String(ne);return console.error(`\u274C --input: invalid JSON object (${xe})`),l}let W=await ce.execute(p.grounding,m,f,q);if(W.success){let ne=[];W.openPath&&ne.push(W.openPath),W.createdPaths&&ne.push(...W.createdPaths);let xe=[],X=new Set;for(let ee of ne)X.has(ee)||(X.add(ee),xe.push(Tge(y,ee)));if(!s.json){let ee=p.successMessage??`Applied "${p.name}" to "${f}".`,Z=W.openPath??W.createdPaths?.[0],H=Z?` \u2192 ${Z}`:"";console.log(`\u2705 ${ee}${H}`)}return{ok:!0,created:xe}}else return console.error(`\u274C "${p.name}" failed on "${f}": ${W.error}`),l}a(xge,"executeOnTarget");function xB(){return new fe("apply").description("Apply an exocmd__Command to one or more vault assets (RFC 8e83442b T1.2). Pass a path arg or pipe paths via stdin.").argument("<cmd>","Command UUID or cliName slug").argument("[path]","Vault-relative path to target asset (omit to read paths from stdin)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--dry-run","Preview without writing").option("--yes","Skip destructive-command confirmation").option("--input <json>",`JSON userInput for a grounding. Value-setting commands need a value key, e.g. set-planned-start / set-scheduled-date: --input '{"value":"<ISO>"}'; set-label: --input '{"value":"New label"}'. The required key is named in the error if omitted.`).option("--seed <uuid>","Deterministic UID seed for test/replay (uses seededUidGenerator)").option("--frozen-clock <iso>","Freeze clock to ISO timestamp for test/replay (uses frozenClock)").option("--json","Emit a machine-readable JSON result ({command,target,created:[{uuid,path,label}]}) instead of human-readable output").action(async(r,e,t)=>{se.setFormat("text");try{let n=(0,Ma.resolve)(t.vault);if(!(0,EO.existsSync)(n))throw new Me(n);dw(n);let i=t.frozenClock?(0,Re.frozenClock)(t.frozenClock):(0,Re.liveClock)(),s=t.seed?(0,Re.seededUidGenerator)(t.seed):(0,Re.liveUidGenerator)(),o=new $t(n),l=await new Re.NoteToRDFConverter(o).convertVault(),u=new Re.InMemoryTripleStore;await u.addAll(l);let f=new Re.WorkflowResolver(u),d;if(Age.test(r))d=r;else{let _=await Rge(u,r);_||(console.error(`\u274C No command found with UUID or cliName "${r}".`),process.exit(3)),d=_}let p;if(e)p=[e];else if(p=await Ige(),p.length===0)throw new Xe("No target path provided and stdin is empty.","exocortex apply <uuid> <path> OR exocortex find ... | exocortex apply <uuid>");let h=0,m=0,y=[];for(let _ of p){let b=await xge(n,u,f,d,_,t,i,s);b.ok?h++:m++,y.push(...b.created)}if(p.length>1&&!t.json&&console.log(`
598
+ `)}catch(t){se.handle(t)}})}a(yB,"repairFrontmatterCommand");ct();var _B=require("fs"),bB=require("path"),ss=J(We());Bi();Pt();qt();mr();ZS();var Yme="https://exocortex.my/ontology/find#Alias_sparql",Qme="https://exocortex.my/ontology/exo#Asset_label";function Wd(r){if(r&&typeof r=="object"&&"value"in r){let e=r.value;return typeof e=="string"?e:String(e)}return String(r)}a(Wd,"nodeValue");async function Xme(r,e){let t=await r.match(void 0,void 0,void 0),n=[];for(let s of t)Wd(s.predicate)!==Qme||Wd(s.object)!==e||n.push(Wd(s.subject));if(n.length===0)return null;let i=[];for(let s of n)for(let o of t)Wd(o.predicate)===Yme&&Wd(o.subject)===s&&i.push(Wd(o.object));if(i.length===0)return null;if(i.length>1)throw new Xe(`Ambiguous find__Alias "${e}" \u2014 ${i.length} instances define a sparql fragment`,`Ensure exactly one find__Alias asset has exo:Asset_label "${e}"`);return i[0]}a(Xme,"resolveAliasFragment");var Jme=/^([a-z][a-zA-Z0-9]*)__([A-Za-z0-9_]+)$/,Zme="https://exocortex.my/ontology/";function ege(r,e){let t=Jme.exec(e);if(t){let i=`<${Zme}${t[1]}#${t[2]}>`;return r.replace(/\?value\b/g,i)}let n=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return r.replace(/\?value\b/g,`"${n}"`)}a(ege,"bindValueLiteral");function SB(){return new fe("find").description("Find vault assets via SPARQL \u2014 outputs file paths one per line (RFC 8e83442b T1.1)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--sparql <query>","SPARQL SELECT query (must bind ?path)").option("--class <value>","Filter by class label via find__Alias 'class' (e.g. ems__Task)").action(async r=>{se.setFormat("text");try{if(r.sparql&&r.class)throw new Xe("--sparql and --class are mutually exclusive","Pass either a raw --sparql query or a find__Alias-backed flag like --class");if(!r.sparql&&!r.class)throw new Xe("one of --sparql <query> or --class <value> is required",'exocortex find --class ems__Task OR exocortex find --sparql "SELECT ?path WHERE { ... }"');let e=(0,bB.resolve)(r.vault);if(!(0,_B.existsSync)(e))throw new Me(e);let t=new $t(e),i=await new ss.NoteToRDFConverter(t).convertVault(),s=new ss.InMemoryTripleStore;await s.addAll(i);let o;if(r.class){let _=await Xme(s,"class");if(_===null)throw new Xe('No find__Alias with exo:Asset_label "class" was found in the vault',"Seed a find__Alias asset (label=class) or fall back to exocortex find --sparql");o=`SELECT ?path WHERE { ${ege(_,r.class)} }`}else o=r.sparql;let c=XS(o);c=Ld(c);let l=new ss.ExoQLParser,u=JS(QS(e));u.size>0&&l.setVaultPrefixes(u);let f=l.parse(c),p=new ss.ExoQLAlgebraTranslator().translate(f);p.type!=="construct"&&(p=new ss.AlgebraOptimizer().optimize(p));let m=await new ss.ExoQLQueryExecutor(s).executeAll(p),y="obsidian://vault/";for(let _ of m){let T=_.toJSON().path;if(typeof T!="string"||!T.startsWith(y))continue;let I=T.slice(y.length),E;try{E=decodeURIComponent(I)}catch{E=I}process.stdout.write(E+`
599
+ `)}}catch(e){se.handle(e),process.exit(5)}})}a(SB,"findCommand");ct();var EO=require("fs"),Ma=require("path"),Re=J(We());Pt();qt();mr();Bi();var RB=J(We()),Ht=J(TB());var AB="obsidian://vault/";function Ege(r){let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return{async resolveTargetPath(t){if(!t)throw new Error("Cannot resolve empty targetIRI to a vault path");let n=t;if(n.startsWith(AB))n=decodeURI(n.slice(AB.length));else if(e.test(n)){let i=await r.findFileByUID(n);if(!i)throw new Error(`No vault file found for UID: ${n}`);n=i}if(n.endsWith(".md")||(n=`${n}.md`),!await r.fileExists(n))throw new Error(`Cannot resolve target file for IRI "${t}" (tried "${n}")`);return n}}}a(Ege,"createCliPathResolver");var vge=["openFile","sparqlSelect","getActiveFileIRI","getActiveFilePath","trashFile","duplicateFile"],wO=class extends Error{constructor(t){super(`Service "${t}" is not implemented in the CLI (no-op stub). dyncommand exec on this service_call grounding cannot change vault state. See CLI parity issues #2865-#2868 for port status.`);this.serviceId=t;this.name="CliServiceNotImplementedError"}static{a(this,"CliServiceNotImplementedError")}};function IB(r){return{async execute(){throw new wO(r)}}}a(IB,"notImplementedService");function Tge(r){return e=>{let t=r.getFirstLinkpathDest(e,"");if(!t||!("basename"in t))return null;let i=r.getFrontmatter(t)?.exo__Asset_label;return typeof i=="string"&&i.length>0?i:null}}a(Tge,"createCliClassResolver");function CB(r,e){for(let t of vge)r.register(t,IB(t));for(let t of["updateProperty","removeProperty","setStatus","createAsset"])r.register(t,IB(t));if(e){if(e.fsAdapter){let t=new RB.FrontmatterService,n=Ege(e.fsAdapter);r.register("updateProperty",(0,Ht.createUpdatePropertyService)(e.fsAdapter,t,n)),r.register("removeProperty",(0,Ht.createRemovePropertyService)(e.fsAdapter,t,n)),r.register("setStatus",(0,Ht.createSetStatusService)(e.fsAdapter,t,n)),r.register("createAsset",(0,Ht.createCreateAssetService)(e.vaultAdapter,e.fsAdapter,Tge(e.vaultAdapter))),r.register("instantiatePrototypeSubtree",(0,Ht.createInstantiatePrototypeSubtreeService)(e.vaultAdapter,e.fsAdapter))}r.register("createRelatedTask",(0,Ht.createCreateRelatedTaskService)(e.vaultAdapter,e.genericAssetCreationService)),r.register("createRelatedProject",(0,Ht.createCreateRelatedProjectService)(e.vaultAdapter,e.genericAssetCreationService)),r.register("archiveAsset",(0,Ht.createArchiveAssetService)(e.vaultAdapter,e.archiveAssetService)),r.register("planForEvening",(0,Ht.createPlanForEveningService)(e.vaultAdapter,e.taskStatusService)),r.register("cleanProperties",(0,Ht.createCleanPropertiesService)(e.vaultAdapter,e.propertyCleanupService)),r.register("renameToUid",(0,Ht.createRenameToUidService)(e.vaultAdapter,e.renameToUidService)),r.register("repairFolder",(0,Ht.createRepairFolderService)(e.vaultAdapter,e.folderRepairService)),r.register("fixMissingLabel",(0,Ht.createFixMissingLabelService)(e.vaultAdapter,e.fixMissingLabelService))}}a(CB,"populateCliServiceRegistry");function Age(r,e){let t=r.getAbstractFileByPath(e),n=t!==null&&"basename"in t?t:null,i=n?r.getFrontmatter(n):null,s=i&&typeof i=="object"?i.exo__Asset_label:void 0;return{uuid:n?.basename??e.replace(/^.*\//,"").replace(/\.md$/,""),path:e,label:typeof s=="string"?s:""}}a(Age,"buildCreatedAsset");var Ige=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function Rge(){if(process.stdin.isTTY)return[];let r=[];for await(let t of process.stdin)r.push(t);return Buffer.concat(r).toString("utf-8").split(`
600
+ `).map(t=>t.trim()).filter(t=>t.length>0)}a(Rge,"readStdinLines");function ww(r){if(r&&typeof r=="object"&&"value"in r){let e=r.value;return typeof e=="string"?e:String(e)}return String(r)}a(ww,"nodeValue");async function Cge(r,e){let t=new Re.IRI("https://exocortex.my/ontology/exocmd#Command_cliName"),n=await r.match(void 0,t,void 0),i=[];for(let s of n)if(ww(s.object)===e){let l=ww(s.subject).match(/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i);l&&i.push(l[1])}if(i.length===0)return null;if(i.length>1)throw new Xe(`Ambiguous cliName "${e}" \u2014 resolves to ${i.length} commands: ${i.join(", ")}`,"Use the UUID directly: exocortex apply <uuid> <path>");return i[0]}a(Cge,"resolveSlugToUuid");async function xge(r,e){let t=new Re.IRI("https://exocortex.my/ontology/exocmd#Command_destructive"),n=await r.match(void 0,t,void 0);for(let i of n)if(ww(i.subject).includes(e)){let o=ww(i.object);if(o==="true"||o==="True")return!0}return!1}a(xge,"isDestructive");async function Oge(r,e,t,n,i,s,o,c){let l={ok:!1,created:[]},u=(0,Ma.resolve)(r,i);if(!(0,EO.existsSync)(u))return console.error(`\u274C Target file not found: ${i}`),l;let f=(0,Ma.relative)(r,u);if(f===".."||f.startsWith(`..${Ma.sep}`)||(0,Ma.isAbsolute)(f))return console.error(`\u274C Target is outside the vault: ${i} (vault: ${r})`),l;let d=new Re.CommandResolver(e,iw),p=await d.loadCommand(n);if(!p)return console.error(`\u274C Command with UID "${n}" not found.`),l;if(await xge(e,n)&&!s.dryRun&&!s.yes)return console.error(`\u274C Command "${p.name}" is marked destructive. Add --dry-run to preview, or --yes to apply.`),l;let m=(0,Re.vaultPathToIRI)(f),y=new $t(r),_=new Re.FolderRepairService(y),b=new Re.PreconditionEvaluator(e,void 0,{clock:o});(0,Re.registerDefaultHostFunctions)(b),b.registerHostFunction("isInWrongFolder",tw(y,_)),b.registerHostFunction("hasObsoleteProperties",rw(y));let T=y.getAbstractFileByPath(f),I=T!==null&&"basename"in T?T:null,E=I?y.getFrontmatter(I):null,S=E&&typeof E=="object"?E.exo__Asset_uid:void 0,R={targetIRI:m,filePath:f,fileBasename:I?.basename,assetUid:typeof S=="string"?S:void 0};if(!await b.evaluate(p.precondition,m,R))return console.error(`\u274C Precondition not satisfied for "${p.name}" on "${f}".`),l;if(s.dryRun)return s.json||console.log(`\u{1F50D} Dry-run: would apply "${p.name}" to "${f}" (precondition passed).`),{ok:!0,created:[]};let P=new Re.ServiceRegistry,M=new Re.GenericAssetCreationService(y).withDeterminism({clock:o,uidGenerator:c}),O=new Re.ArchiveAssetService(y),L=new Re.PropertyCleanupService(y),te=new Re.FixMissingLabelService(y),re=new Re.RenameToUidService(y),V=new Re.TaskStatusService(y,new Re.EffortStatusWorkflow,new Re.StatusTimestampService(y)),K=new ci(r);CB(P,{vaultAdapter:y,fsAdapter:K,genericAssetCreationService:M,archiveAssetService:O,taskStatusService:V,propertyCleanupService:L,fixMissingLabelService:te,renameToUidService:re,folderRepairService:_});let Se=new Re.NamedQueryRunner(new kd(e,K),e),ce=new Re.GroundingExecutor(K,K,P,(0,Re.createVaultFrontmatterClassLabelResolver)(K),{clock:o,uidGenerator:c,workflowResolver:t,groundingLoader:a(ne=>d.loadGroundingByUid(ne),"groundingLoader"),templateLoader:a(async ne=>{let xe=await K.findFileByUID(ne);return xe?(0,Re.stripTemplateFrontmatter)(await K.readFile(xe)):null},"templateLoader"),namedQueryRunner:Se,refToFolder:(0,Re.createVaultFrontmatterRefToFolderResolver)(K),refToFrontmatter:(0,Re.createVaultFrontmatterRefToFrontmatterResolver)(K)}),q;if(s.input)try{let ne=JSON.parse(s.input);if(typeof ne!="object"||ne===null||Array.isArray(ne))throw new Error("must be a JSON object");q=ne}catch(ne){let xe=ne instanceof Error?ne.message:String(ne);return console.error(`\u274C --input: invalid JSON object (${xe})`),l}let W=await ce.execute(p.grounding,m,f,q);if(W.success){let ne=[];W.openPath&&ne.push(W.openPath),W.createdPaths&&ne.push(...W.createdPaths);let xe=[],X=new Set;for(let ee of ne)X.has(ee)||(X.add(ee),xe.push(Age(y,ee)));if(!s.json){let ee=p.successMessage??`Applied "${p.name}" to "${f}".`,Z=W.openPath??W.createdPaths?.[0],H=Z?` \u2192 ${Z}`:"";console.log(`\u2705 ${ee}${H}`)}return{ok:!0,created:xe}}else return console.error(`\u274C "${p.name}" failed on "${f}": ${W.error}`),l}a(Oge,"executeOnTarget");function xB(){return new fe("apply").description("Apply an exocmd__Command to one or more vault assets (RFC 8e83442b T1.2). Pass a path arg or pipe paths via stdin.").argument("<cmd>","Command UUID or cliName slug").argument("[path]","Vault-relative path to target asset (omit to read paths from stdin)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--dry-run","Preview without writing").option("--yes","Skip destructive-command confirmation").option("--input <json>",`JSON userInput for a grounding. Value-setting commands need a value key, e.g. set-planned-start / set-scheduled-date: --input '{"value":"<ISO>"}'; set-label: --input '{"value":"New label"}'. The required key is named in the error if omitted.`).option("--seed <uuid>","Deterministic UID seed for test/replay (uses seededUidGenerator)").option("--frozen-clock <iso>","Freeze clock to ISO timestamp for test/replay (uses frozenClock)").option("--json","Emit a machine-readable JSON result ({command,target,created:[{uuid,path,label}]}) instead of human-readable output").action(async(r,e,t)=>{se.setFormat("text");try{let n=(0,Ma.resolve)(t.vault);if(!(0,EO.existsSync)(n))throw new Me(n);dw(n);let i=t.frozenClock?(0,Re.frozenClock)(t.frozenClock):(0,Re.liveClock)(),s=t.seed?(0,Re.seededUidGenerator)(t.seed):(0,Re.liveUidGenerator)(),o=new $t(n),l=await new Re.NoteToRDFConverter(o).convertVault(),u=new Re.InMemoryTripleStore;await u.addAll(l);let f=new Re.WorkflowResolver(u),d;if(Ige.test(r))d=r;else{let _=await Cge(u,r);_||(console.error(`\u274C No command found with UUID or cliName "${r}".`),process.exit(3)),d=_}let p;if(e)p=[e];else if(p=await Rge(),p.length===0)throw new Xe("No target path provided and stdin is empty.","exocortex apply <uuid> <path> OR exocortex find ... | exocortex apply <uuid>");let h=0,m=0,y=[];for(let _ of p){let b=await Oge(n,u,f,d,_,t,i,s);b.ok?h++:m++,y.push(...b.created)}if(p.length>1&&!t.json&&console.log(`
601
601
  \u{1F4CA} Applied to ${h}/${p.length} target(s) (${m} failed).`),t.json){let _={command:r,created:y};e?_.target=e:_.targets=p,process.stdout.write(JSON.stringify(_)+`
602
- `)}m>0&&process.exit(5)}catch(n){se.handle(n),process.exit(5)}})}a(xB,"applyCommand");ct();ct();var Ew=require("fs"),TO=J(require("path")),OB=require("path"),PB=J(We());Pt();qt();var Oge=new Set(["templates","09 templates"]);function os(r){return r.split("/").some(e=>Oge.has(e.toLowerCase()))}a(os,"isTemplatesPath");function Co(r){return r.split("/").includes("node_modules")}a(Co,"isNodeModulesPath");var Pge=5;function vO(r,e,t){r[e].length<Pge&&r[e].push(t)}a(vO,"addExample");async function Fge(r){let e=new xi(r),t=await e.indexedAssets(),n=[],i={"empty-isDefinedBy":0,"bang-prefix":0,unresolvable:0},s={"empty-isDefinedBy":[],"bang-prefix":[],unresolvable:[]},o=0;for(let{path:c,metadata:l}of t){if(c.split("/").includes("node_modules")||os(c))continue;let u=l.exo__Asset_isDefinedBy,f=(0,PB.extractAssetReference)(u);if(!f){i["empty-isDefinedBy"]++,vO(s,"empty-isDefinedBy",c);continue}if(f.startsWith("!")){i["bang-prefix"]++,vO(s,"bang-prefix",c);continue}let d=await Mc(e,f,c);if(!d){i.unresolvable++,vO(s,"unresolvable",c);continue}o++;let p=pO(TO.default.dirname(d)),h=pO(TO.default.dirname(c));p!==h&&n.push({path:c,isDefinedBy:f,expectedFolder:p,actualFolder:h})}return{vaultPath:r,totalFiles:t.length,checked:o,violations:n,skips:i,skipExamples:s}}a(Fge,"scanVaultForCoLocation");function FB(){return new fe("co-location").description("Detect asset\u2013ontology co-location violations: any asset not in the folder of its exo__Asset_isDefinedBy ontology file (fail-open, skip-accounted)").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,OB.resolve)(r.vault);if(!(0,Ew.existsSync)(t)||!(0,Ew.statSync)(t).isDirectory())throw new Me(t);let n=await Fge(t),i=n.skips["empty-isDefinedBy"]+n.skips["bang-prefix"]+n.skips.unresolvable;if(e==="json")console.log(JSON.stringify({vaultPath:n.vaultPath,totalFiles:n.totalFiles,checked:n.checked,violationCount:n.violations.length,violations:n.violations,skips:n.skips,skipTotal:i,skipExamples:n.skipExamples,clean:n.violations.length===0},null,2));else{if(n.violations.length===0)console.log(`OK ${t}: 0 co-location violations (${n.checked}/${n.totalFiles} checked)`);else{console.error(`FAIL ${t}: ${n.violations.length} co-location violation(s) (${n.checked}/${n.totalFiles} checked):`);for(let s of n.violations)console.error(` ${s.path}
602
+ `)}m>0&&process.exit(5)}catch(n){se.handle(n),process.exit(5)}})}a(xB,"applyCommand");ct();ct();var Ew=require("fs"),TO=J(require("path")),OB=require("path"),PB=J(We());Pt();qt();var Pge=new Set(["templates","09 templates"]);function os(r){return r.split("/").some(e=>Pge.has(e.toLowerCase()))}a(os,"isTemplatesPath");function Co(r){return r.split("/").includes("node_modules")}a(Co,"isNodeModulesPath");var Fge=5;function vO(r,e,t){r[e].length<Fge&&r[e].push(t)}a(vO,"addExample");async function Dge(r){let e=new xi(r),t=await e.indexedAssets(),n=[],i={"empty-isDefinedBy":0,"bang-prefix":0,unresolvable:0},s={"empty-isDefinedBy":[],"bang-prefix":[],unresolvable:[]},o=0;for(let{path:c,metadata:l}of t){if(c.split("/").includes("node_modules")||os(c))continue;let u=l.exo__Asset_isDefinedBy,f=(0,PB.extractAssetReference)(u);if(!f){i["empty-isDefinedBy"]++,vO(s,"empty-isDefinedBy",c);continue}if(f.startsWith("!")){i["bang-prefix"]++,vO(s,"bang-prefix",c);continue}let d=await Mc(e,f,c);if(!d){i.unresolvable++,vO(s,"unresolvable",c);continue}o++;let p=pO(TO.default.dirname(d)),h=pO(TO.default.dirname(c));p!==h&&n.push({path:c,isDefinedBy:f,expectedFolder:p,actualFolder:h})}return{vaultPath:r,totalFiles:t.length,checked:o,violations:n,skips:i,skipExamples:s}}a(Dge,"scanVaultForCoLocation");function FB(){return new fe("co-location").description("Detect asset\u2013ontology co-location violations: any asset not in the folder of its exo__Asset_isDefinedBy ontology file (fail-open, skip-accounted)").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,OB.resolve)(r.vault);if(!(0,Ew.existsSync)(t)||!(0,Ew.statSync)(t).isDirectory())throw new Me(t);let n=await Dge(t),i=n.skips["empty-isDefinedBy"]+n.skips["bang-prefix"]+n.skips.unresolvable;if(e==="json")console.log(JSON.stringify({vaultPath:n.vaultPath,totalFiles:n.totalFiles,checked:n.checked,violationCount:n.violations.length,violations:n.violations,skips:n.skips,skipTotal:i,skipExamples:n.skipExamples,clean:n.violations.length===0},null,2));else{if(n.violations.length===0)console.log(`OK ${t}: 0 co-location violations (${n.checked}/${n.totalFiles} checked)`);else{console.error(`FAIL ${t}: ${n.violations.length} co-location violation(s) (${n.checked}/${n.totalFiles} checked):`);for(let s of n.violations)console.error(` ${s.path}
603
603
  isDefinedBy=${s.isDefinedBy} expected=${s.expectedFolder}/ actual=${s.actualFolder}/`)}console.error(`
604
- Skipped (fail-open, NOT verified): ${i} \u2014 empty-isDefinedBy=${n.skips["empty-isDefinedBy"]}, bang-prefix=${n.skips["bang-prefix"]}, unresolvable(cross-vault/missing)=${n.skips.unresolvable}`)}n.violations.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}a(FB,"auditCoLocationCommand");ct();var Tw=require("fs"),GB=require("path"),RO=J(We());function DB(r,e){let t=new Map,n=new Map,i=new Set,s=[],o=[],c=0;for(let l of r){if(t.has(l))continue;let u=[],f=a(d=>{t.set(d,c),n.set(d,c),c++,s.push(d),i.add(d),u.push([d,(e.get(d)??new Set).values()])},"pushNode");for(f(l);u.length>0;){let[d,p]=u[u.length-1],h=p.next();if(h.done){if(u.pop(),u.length>0){let m=u[u.length-1][0];n.set(m,Math.min(n.get(m),n.get(d)))}if(n.get(d)===t.get(d)){let m=[],y;do y=s.pop(),i.delete(y),m.push(y);while(y!==d);o.push(m)}}else{let m=h.value;t.has(m)?i.has(m)&&n.set(d,Math.min(n.get(d),t.get(m))):f(m)}}}return o}a(DB,"stronglyConnectedComponents");function LB(r,e){return DB(r,e).filter(t=>t.length>=2)}a(LB,"tarjanSCC");function vw(r,e){let t=new Map;for(let n of r){let i=new Set,s=[...e.get(n)??[]];for(;s.length>0;){let o=s.shift();if(!i.has(o)){i.add(o);for(let c of e.get(o)??[])i.has(c)||s.push(c)}}t.set(n,i)}return t}a(vw,"transitiveClosure");function NB(r,e){let t=DB(r,e),n=new Map;t.forEach((s,o)=>{for(let c of s)n.set(c,o)});let i=new Map;for(let[s,o]of e){let c=n.get(s);if(c!==void 0)for(let l of o){let u=n.get(l);if(u===void 0||c===u)continue;let f=i.get(c);f||(f=new Set,i.set(c,f)),f.add(u)}}return{components:t,componentOf:n,condensedEdges:i}}a(NB,"condense");function kB(r,e){let t=vw(r,e),n=new Map;for(let[i,s]of e)for(let o of s){let c=!1;for(let l of s)if(l!==o&&t.get(l)?.has(o)){c=!0;break}if(!c){let l=n.get(i);l||(l=new Set,n.set(i,l)),l.add(o)}}return n}a(kB,"transitiveReduction");function MB(r,e){let t=new Map,n=new Map;for(let p of r)t.set(p,new Map),n.set(p,new Map);for(let p of e){if(p.source===p.target)continue;let h=t.get(p.source),m=n.get(p.target);!h||!m||(h.set(p.target,(h.get(p.target)??0)+p.weight),m.set(p.source,(m.get(p.source)??0)+p.weight))}let i=new Set(r),s=[],o=[],c=a(p=>{i.delete(p);for(let h of t.get(p).keys())n.get(h)?.delete(p);for(let h of n.get(p).keys())t.get(h)?.delete(p);t.get(p).clear(),n.get(p).clear()},"removeNode"),l=a(p=>{let h=0;for(let m of p.values())h+=m;return h},"sumWeights"),u=a(()=>[...i].sort(),"sortedRemaining");for(;i.size>0;){let p=!0;for(;p;){p=!1;for(let h of u())i.has(h)&&t.get(h).size===0&&(o.unshift(h),c(h),p=!0);for(let h of u())i.has(h)&&n.get(h).size===0&&(s.push(h),c(h),p=!0)}if(i.size>0){let h=null,m=-1/0;for(let y of u()){let _=l(t.get(y))-l(n.get(y));_>m&&(m=_,h=y)}h!==null&&(s.push(h),c(h))}}let f=[...s,...o],d=new Map(f.map((p,h)=>[p,h]));return e.filter(p=>{if(p.source===p.target)return!1;let h=d.get(p.source),m=d.get(p.target);return h===void 0||m===void 0?!1:h>m})}a(MB,"greedyFeedbackArcSet");var jB=/\[\[([^\]]+)\]\]/g;function Dge(r){let e=r.split(`
604
+ Skipped (fail-open, NOT verified): ${i} \u2014 empty-isDefinedBy=${n.skips["empty-isDefinedBy"]}, bang-prefix=${n.skips["bang-prefix"]}, unresolvable(cross-vault/missing)=${n.skips.unresolvable}`)}n.violations.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}a(FB,"auditCoLocationCommand");ct();var Tw=require("fs"),GB=require("path"),RO=J(We());function DB(r,e){let t=new Map,n=new Map,i=new Set,s=[],o=[],c=0;for(let l of r){if(t.has(l))continue;let u=[],f=a(d=>{t.set(d,c),n.set(d,c),c++,s.push(d),i.add(d),u.push([d,(e.get(d)??new Set).values()])},"pushNode");for(f(l);u.length>0;){let[d,p]=u[u.length-1],h=p.next();if(h.done){if(u.pop(),u.length>0){let m=u[u.length-1][0];n.set(m,Math.min(n.get(m),n.get(d)))}if(n.get(d)===t.get(d)){let m=[],y;do y=s.pop(),i.delete(y),m.push(y);while(y!==d);o.push(m)}}else{let m=h.value;t.has(m)?i.has(m)&&n.set(d,Math.min(n.get(d),t.get(m))):f(m)}}}return o}a(DB,"stronglyConnectedComponents");function LB(r,e){return DB(r,e).filter(t=>t.length>=2)}a(LB,"tarjanSCC");function vw(r,e){let t=new Map;for(let n of r){let i=new Set,s=[...e.get(n)??[]];for(;s.length>0;){let o=s.shift();if(!i.has(o)){i.add(o);for(let c of e.get(o)??[])i.has(c)||s.push(c)}}t.set(n,i)}return t}a(vw,"transitiveClosure");function NB(r,e){let t=DB(r,e),n=new Map;t.forEach((s,o)=>{for(let c of s)n.set(c,o)});let i=new Map;for(let[s,o]of e){let c=n.get(s);if(c!==void 0)for(let l of o){let u=n.get(l);if(u===void 0||c===u)continue;let f=i.get(c);f||(f=new Set,i.set(c,f)),f.add(u)}}return{components:t,componentOf:n,condensedEdges:i}}a(NB,"condense");function kB(r,e){let t=vw(r,e),n=new Map;for(let[i,s]of e)for(let o of s){let c=!1;for(let l of s)if(l!==o&&t.get(l)?.has(o)){c=!0;break}if(!c){let l=n.get(i);l||(l=new Set,n.set(i,l)),l.add(o)}}return n}a(kB,"transitiveReduction");function MB(r,e){let t=new Map,n=new Map;for(let p of r)t.set(p,new Map),n.set(p,new Map);for(let p of e){if(p.source===p.target)continue;let h=t.get(p.source),m=n.get(p.target);!h||!m||(h.set(p.target,(h.get(p.target)??0)+p.weight),m.set(p.source,(m.get(p.source)??0)+p.weight))}let i=new Set(r),s=[],o=[],c=a(p=>{i.delete(p);for(let h of t.get(p).keys())n.get(h)?.delete(p);for(let h of n.get(p).keys())t.get(h)?.delete(p);t.get(p).clear(),n.get(p).clear()},"removeNode"),l=a(p=>{let h=0;for(let m of p.values())h+=m;return h},"sumWeights"),u=a(()=>[...i].sort(),"sortedRemaining");for(;i.size>0;){let p=!0;for(;p;){p=!1;for(let h of u())i.has(h)&&t.get(h).size===0&&(o.unshift(h),c(h),p=!0);for(let h of u())i.has(h)&&n.get(h).size===0&&(s.push(h),c(h),p=!0)}if(i.size>0){let h=null,m=-1/0;for(let y of u()){let _=l(t.get(y))-l(n.get(y));_>m&&(m=_,h=y)}h!==null&&(s.push(h),c(h))}}let f=[...s,...o],d=new Map(f.map((p,h)=>[p,h]));return e.filter(p=>{if(p.source===p.target)return!1;let h=d.get(p.source),m=d.get(p.target);return h===void 0||m===void 0?!1:h>m})}a(MB,"greedyFeedbackArcSet");var jB=/\[\[([^\]]+)\]\]/g;function Lge(r){let e=r.split(`
605
605
  `),t=[],n=null;for(let i of e){let s=i.match(/^[ \t]*(`{3,}|~{3,})/),o=s&&(s[1][0]==="~"||!i.slice(i.indexOf(s[1])+s[1].length).includes("`"));n===null?o?n=s[1]:t.push(i):s&&s[1][0]===n[0]&&s[1].length>=n.length&&/^[ \t]*(?:`{3,}|~{3,})[ \t]*$/.test(i)&&(n=null)}return t.join(`
606
- `)}a(Dge,"stripFencedCodeBlocks");function $B(r){let e=[],t;for(jB.lastIndex=0;(t=jB.exec(r))!==null;){let n=t[1],i=n.indexOf("|");i!==-1&&(n=n.slice(0,i));let s=n.indexOf("#");s!==-1&&(n=n.slice(0,s));let o=n.trim();o.length>0&&e.push(o)}return e}a($B,"extractWikilinkTargets");function AO(r){return typeof r=="string"?[r]:Array.isArray(r)?r.flatMap(AO):r!==null&&typeof r=="object"?Object.values(r).flatMap(AO):[]}a(AO,"collectFrontmatterStrings");function Lge(r){let e=r.match(/^---\n[\s\S]*?\n---/);return e?r.slice(e[0].length):r}a(Lge,"bodyOf");function UB(r,e,t){let n=[];for(let[s,o]of Object.entries(r))if(!t?.has(s))for(let c of AO(o))for(let l of $B(c))n.push(l);let i=$B(Dge(Lge(e)));return[...n,...i]}a(UB,"extractFileWikilinkTargets");var Nge=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function BB(r,e){if(e.includes("/")){let n=e.replace(/^\//,""),i=n.endsWith(".md")?n:`${n}.md`;if(await r.hasIndexedPath(i))return i;e=n.slice(n.lastIndexOf("/")+1)}if(e.endsWith(".md")&&(e=e.slice(0,-3)),Nge.test(e)){let n=await r.findFileByUID(e);if(n)return n}let t=await r.findPathsByBasename(e);return t.length===1?t[0]:t.length>1?new Set(t).size===1?t[0]:"ambiguous":null}a(BB,"resolveTargetPath");Pt();qt();var kge="\0",Mge="829b9b3b-6fc3-4276-be6a-27d3398c012e",jge=["exo__Asset_relates","concept__Concept_related","concept__Concept_broader","concept__Concept_synonym","exo__Asset_createdBy"],$ge=5,Uge=10,Bge=new Set(["png","jpg","jpeg","gif","svg","webp","bmp","ico","avif","pdf","mp3","wav","m4a","ogg","flac","mp4","mov","webm","avi","mkv","zip","gz","tar","canvas","base","json","css","js","ts","html"]);function Vge(r){let e=r.lastIndexOf(".");if(e===-1||e===r.length-1)return!1;let t=r.slice(e+1).toLowerCase();return Bge.has(t)}a(Vge,"nonMarkdownExtension");function IO(r){if(Array.isArray(r)){let e=r.filter(t=>typeof t=="string");return{value:e[0]??null,multiple:e.length>1}}return{value:typeof r=="string"?r:null,multiple:!1}}a(IO,"firstString");function VB(r){let e=Array.isArray(r)?r:r==null?[]:[r],t=[];for(let n of e){let i=(0,RO.extractAssetReference)(n);i&&t.push(i)}return t}a(VB,"asRefList");function Qm(r,e,t=$ge){r.length<t&&r.push(e)}a(Qm,"pushExample");async function Gge(r,e={}){let t=new xi(r,{cacheContent:!0}),n=await t.indexedAssets(),i=new Set(e.excludePredicates??[]),s=new Map,o=new Map,c=new Map,l=[];for(let k of n){if(Co(k.path)||os(k.path)||!VB(k.metadata.exo__Instance_class).includes(Mge))continue;let{value:de}=IO(k.metadata.exo__Asset_uid);if(!de){l.push(k.path);continue}let{value:Ae}=IO(k.metadata.exo__Asset_label),we=Ae??k.path,ve=c.get(de);ve?ve.push(k.path):c.set(de,[k.path]),s.set(k.path,de),o.has(de)||o.set(de,{uid:de,label:we,path:k.path,metadata:k.metadata})}let u=[...c.entries()].filter(([,k])=>k.length>1).map(([k,oe])=>({uid:k,paths:oe})),f=new Map,d={"empty-isDefinedBy":0,"bang-prefix":0,unresolvable:0,"not-an-ontology":0},p=[],h=0,m=0,y=new Map,_=0,b=a((k,oe)=>{f.set(k,null),d[oe]++,h++,Qm(p,`${k} (${oe})`,Uge)},"markNoOntology");for(let k of n){if(Co(k.path)||os(k.path))continue;_++;let oe=k.metadata.exo__Asset_isDefinedBy,{value:de,multiple:Ae}=IO(oe);Ae&&m++;let we=(0,RO.extractAssetReference)(de);if(!we){b(k.path,"empty-isDefinedBy");continue}if(we.startsWith("!")){b(k.path,"bang-prefix");continue}let ve=await Mc(t,we,k.path);if(!ve){b(k.path,"unresolvable");continue}let Te=s.get(ve);if(!Te){b(k.path,"not-an-ontology");continue}f.set(k.path,Te),y.set(Te,(y.get(Te)??0)+1)}let T=[...o.keys()],I=new Map,E=[],S=new Map,R=new Map,D=0;for(let k of T){let oe=o.get(k),de=VB(oe.metadata.exo__Ontology_imports),Ae=[],we=[],ve=!1;for(let Te of de){let ge=null;if(o.has(Te))ge=Te;else{let G=await Mc(t,Te,oe.path);ge=G?s.get(G)??null:null}if(ge===null)we.push(Te);else if(ge===k)ve=!0;else{Ae.push(ge);let G=I.get(k);G||(G=new Set,I.set(k,G)),G.has(ge)||(G.add(ge),D++)}}S.set(k,Ae),R.set(k,we),ve&&E.push(k)}let P=LB(T,I),M=vw(T,I),O={total:0,internal:0,crossOntologyValid:0,crossOntologyViolation:0,crossVault:0,noOntology:0},L={broken:0,"dup-basename":0,"non-markdown":0},te={broken:[],"dup-basename":[],"non-markdown":[]},re=new Map,V=new Map,K=new Map,Se=new Map,ce=new Map,q=new Map,W=a(k=>{let oe=o.get(k);return oe?{uid:oe.uid,label:oe.label,path:oe.path}:{uid:k,label:k,path:""}},"toRef");for(let k of n){if(Co(k.path)||os(k.path))continue;let oe=f.get(k.path)??null,de=UB(k.metadata,k.content??"",i);for(let Ae of de){if(O.total++,Vge(Ae)){L["non-markdown"]++,Qm(te["non-markdown"],`${k.path} \u2192 ${Ae}`);continue}let we=await BB(t,Ae);if(we==="ambiguous"){L["dup-basename"]++,Qm(te["dup-basename"],`${k.path} \u2192 ${Ae}`);continue}if(we===null){L.broken++,Qm(te.broken,`${k.path} \u2192 ${Ae}`);continue}let ve=f.get(we)??s.get(we)??null;if(oe===null||ve===null){O.noOntology++;continue}if(oe===ve){O.internal++,K.set(oe,(K.get(oe)??0)+1);continue}let Te=M.get(oe)?.has(ve)??!1,ge=`${oe}${kge}${ve}`,G=re.get(ge);if(G?G.occurrences++:re.set(ge,{source:oe,target:ve,occurrences:1,valid:Te}),Se.set(oe,(Se.get(oe)??0)+1),ce.set(ve,(ce.get(ve)??0)+1),Te)O.crossOntologyValid++;else{O.crossOntologyViolation++,q.set(oe,(q.get(oe)??0)+1);let ae=V.get(ge);ae?(ae.occurrences++,Qm(ae.examples,k.path)):V.set(ge,{source:oe,target:ve,occurrences:1,examples:[k.path]})}}}let ne=[...re.values()].sort((k,oe)=>oe.occurrences-k.occurrences),xe=new Map,X=new Map;for(let k of ne)X.set(k.source,(X.get(k.source)??0)+1),xe.set(k.target,(xe.get(k.target)??0)+1);let ee=T.map(k=>({...W(k),declaredImports:S.get(k)??[],unresolvedImports:R.get(k)??[],selfImport:E.includes(k),assetCount:y.get(k)??0,inDegree:xe.get(k)??0,outDegree:X.get(k)??0,internalLinks:K.get(k)??0,externalLinksOut:Se.get(k)??0,externalLinksIn:ce.get(k)??0,violatingOut:q.get(k)??0})).sort((k,oe)=>k.label.localeCompare(oe.label)),Z=[...V.values()].map(k=>({source:W(k.source),target:W(k.target),occurrences:k.occurrences,examples:k.examples})).sort((k,oe)=>oe.occurrences-k.occurrences),H=[],ie=P.length===0,$e=Z.length===0&&O.crossVault===0&&ie&&u.length===0;return{vaultPath:r,totalFiles:n.length,scannedFiles:_,ontologies:ee,duplicateOntologyUids:u,declared:{edgeCount:D,sccs:P,acyclic:ie},derivedEdges:ne,violations:Z,crossVault:H,linkCounts:O,skips:L,skipExamples:te,noOntologyAssets:{count:h,byReason:d,examples:p},warnings:{selfImports:E,multipleIsDefinedBy:m,ontologiesWithoutUid:l},clean:$e,...i.size>0?{excludedPredicates:[...i]}:{}}}a(Gge,"scanVaultForOntologyImports");function qge(r){let e=r.ontologies.map(S=>S.uid),t=new Map;for(let S of r.ontologies)t.set(S.uid,{uid:S.uid,label:S.label,path:S.path});let n=a(S=>t.get(S)??{uid:S,label:S,path:""},"refOf"),i=new Map;for(let S of r.ontologies)S.declaredImports.length>0&&i.set(S.uid,new Set(S.declaredImports));let s=new Map,o=new Map;for(let S of r.derivedEdges){let R=s.get(S.source);R||(R=new Set,s.set(S.source,R)),R.add(S.target),o.set(`${S.source} ${S.target}`,S.occurrences)}let{components:c,componentOf:l}=NB(e,s),u=[],f=new Map,d=0;for(let S of r.derivedEdges){let R=l.get(S.source),D=l.get(S.target);if(R!==void 0&&D!==void 0&&R===D){let M=f.get(R);M||(M=[],f.set(R,M)),M.push({source:S.source,target:S.target,weight:S.occurrences})}else u.push({source:S.source,target:S.target,occurrences:S.occurrences}),S.valid&&d++}let p=a((S,R,D)=>{if(S===R)return!0;let P=[...D.get(S)??[]],M=new Set;for(;P.length>0;){let O=P.shift();if(O===R)return!0;if(!M.has(O)){M.add(O);for(let L of D.get(O)??[])P.push(L)}}return!1},"reaches"),h=new Map;for(let[S,R]of i)h.set(S,new Set(R));let m=[],y=[...u].sort((S,R)=>S.source===R.source?S.target.localeCompare(R.target):S.source.localeCompare(R.source));for(let S of y)if(p(S.target,S.source,h))m.push({source:n(S.source),target:n(S.target),occurrences:S.occurrences});else{let R=h.get(S.source);R||(R=new Set,h.set(S.source,R)),R.add(S.target)}let _=kB(e,h),b=[];for(let[S,R]of _)for(let D of R)i.get(S)?.has(D)||b.push({source:n(S),target:n(D),occurrences:o.get(`${S} ${D}`)??0});b.sort((S,R)=>R.occurrences-S.occurrences||S.source.uid.localeCompare(R.source.uid)||S.target.uid.localeCompare(R.target.uid));let T=[];for(let[S,R]of f){let D=c[S],M=MB(D,R).map(O=>({source:n(O.source),target:n(O.target),occurrences:O.weight})).sort((O,L)=>O.occurrences-L.occurrences||O.source.uid.localeCompare(L.source.uid)||O.target.uid.localeCompare(L.target.uid));T.push({ontologies:D.map(n).sort((O,L)=>O.label.localeCompare(L.label)),edgeCount:R.length,occurrenceCount:R.reduce((O,L)=>O+L.weight,0),suggestedCuts:M})}T.sort((S,R)=>R.ontologies.length-S.ontologies.length||R.occurrenceCount-S.occurrenceCount);let I=vw(e,i),E=[];for(let[S,R]of i)for(let D of R){let P=!1;for(let M of R)if(M!==D&&I.get(M)?.has(D)){P=!0;break}P&&E.push({source:n(S),target:n(D),occurrences:o.get(`${S} ${D}`)??0})}return{additions:b,acyclicEdgeCount:u.length,alreadyCovered:d,conflicts:m,intraScc:T,redundantDeclared:E}}a(qge,"computeImportProposal");function Hs(r){return`${r.uid}|${r.label}|${r.path}`}a(Hs,"formatRef");function Wge(r){let e=r.ontologies.filter(i=>i.declaredImports.length>0||i.unresolvedImports.length>0).length,t=r.clean?console.log:console.error;if(t(`${r.clean?"OK":"FAIL"} ${r.vaultPath}: ontology-imports audit \u2014 ${r.linkCounts.crossOntologyViolation} violating occurrence(s) in ${r.violations.length} pair(s)`),t(`Ontologies: ${r.ontologies.length} (${e} with imports declared), declared graph: ${r.declared.edgeCount} edge(s), `+(r.declared.acyclic?"acyclic":`NOT ACYCLIC \u2014 ${r.declared.sccs.length} SCC(s)`)),r.excludedPredicates&&r.excludedPredicates.length>0&&t(`Structural-only mode (VL#30): excluded ${r.excludedPredicates.length} associative predicate(s) from edge extraction \u2014 ${r.excludedPredicates.join(", ")}`),r.duplicateOntologyUids.length>0){console.error(`
606
+ `)}a(Lge,"stripFencedCodeBlocks");function $B(r){let e=[],t;for(jB.lastIndex=0;(t=jB.exec(r))!==null;){let n=t[1],i=n.indexOf("|");i!==-1&&(n=n.slice(0,i));let s=n.indexOf("#");s!==-1&&(n=n.slice(0,s));let o=n.trim();o.length>0&&e.push(o)}return e}a($B,"extractWikilinkTargets");function AO(r){return typeof r=="string"?[r]:Array.isArray(r)?r.flatMap(AO):r!==null&&typeof r=="object"?Object.values(r).flatMap(AO):[]}a(AO,"collectFrontmatterStrings");function Nge(r){let e=r.match(/^---\n[\s\S]*?\n---/);return e?r.slice(e[0].length):r}a(Nge,"bodyOf");function UB(r,e,t){let n=[];for(let[s,o]of Object.entries(r))if(!t?.has(s))for(let c of AO(o))for(let l of $B(c))n.push(l);let i=$B(Lge(Nge(e)));return[...n,...i]}a(UB,"extractFileWikilinkTargets");var kge=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function BB(r,e){if(e.includes("/")){let n=e.replace(/^\//,""),i=n.endsWith(".md")?n:`${n}.md`;if(await r.hasIndexedPath(i))return i;e=n.slice(n.lastIndexOf("/")+1)}if(e.endsWith(".md")&&(e=e.slice(0,-3)),kge.test(e)){let n=await r.findFileByUID(e);if(n)return n}let t=await r.findPathsByBasename(e);return t.length===1?t[0]:t.length>1?new Set(t).size===1?t[0]:"ambiguous":null}a(BB,"resolveTargetPath");Pt();qt();var Mge="\0",jge="829b9b3b-6fc3-4276-be6a-27d3398c012e",$ge=["exo__Asset_relates","concept__Concept_related","concept__Concept_broader","concept__Concept_synonym","exo__Asset_createdBy"],Uge=5,Bge=10,Vge=new Set(["png","jpg","jpeg","gif","svg","webp","bmp","ico","avif","pdf","mp3","wav","m4a","ogg","flac","mp4","mov","webm","avi","mkv","zip","gz","tar","canvas","base","json","css","js","ts","html"]);function Gge(r){let e=r.lastIndexOf(".");if(e===-1||e===r.length-1)return!1;let t=r.slice(e+1).toLowerCase();return Vge.has(t)}a(Gge,"nonMarkdownExtension");function IO(r){if(Array.isArray(r)){let e=r.filter(t=>typeof t=="string");return{value:e[0]??null,multiple:e.length>1}}return{value:typeof r=="string"?r:null,multiple:!1}}a(IO,"firstString");function VB(r){let e=Array.isArray(r)?r:r==null?[]:[r],t=[];for(let n of e){let i=(0,RO.extractAssetReference)(n);i&&t.push(i)}return t}a(VB,"asRefList");function Qm(r,e,t=Uge){r.length<t&&r.push(e)}a(Qm,"pushExample");async function qge(r,e={}){let t=new xi(r,{cacheContent:!0}),n=await t.indexedAssets(),i=new Set(e.excludePredicates??[]),s=new Map,o=new Map,c=new Map,l=[];for(let k of n){if(Co(k.path)||os(k.path)||!VB(k.metadata.exo__Instance_class).includes(jge))continue;let{value:de}=IO(k.metadata.exo__Asset_uid);if(!de){l.push(k.path);continue}let{value:Ae}=IO(k.metadata.exo__Asset_label),we=Ae??k.path,ve=c.get(de);ve?ve.push(k.path):c.set(de,[k.path]),s.set(k.path,de),o.has(de)||o.set(de,{uid:de,label:we,path:k.path,metadata:k.metadata})}let u=[...c.entries()].filter(([,k])=>k.length>1).map(([k,oe])=>({uid:k,paths:oe})),f=new Map,d={"empty-isDefinedBy":0,"bang-prefix":0,unresolvable:0,"not-an-ontology":0},p=[],h=0,m=0,y=new Map,_=0,b=a((k,oe)=>{f.set(k,null),d[oe]++,h++,Qm(p,`${k} (${oe})`,Bge)},"markNoOntology");for(let k of n){if(Co(k.path)||os(k.path))continue;_++;let oe=k.metadata.exo__Asset_isDefinedBy,{value:de,multiple:Ae}=IO(oe);Ae&&m++;let we=(0,RO.extractAssetReference)(de);if(!we){b(k.path,"empty-isDefinedBy");continue}if(we.startsWith("!")){b(k.path,"bang-prefix");continue}let ve=await Mc(t,we,k.path);if(!ve){b(k.path,"unresolvable");continue}let Te=s.get(ve);if(!Te){b(k.path,"not-an-ontology");continue}f.set(k.path,Te),y.set(Te,(y.get(Te)??0)+1)}let T=[...o.keys()],I=new Map,E=[],S=new Map,R=new Map,D=0;for(let k of T){let oe=o.get(k),de=VB(oe.metadata.exo__Ontology_imports),Ae=[],we=[],ve=!1;for(let Te of de){let ge=null;if(o.has(Te))ge=Te;else{let G=await Mc(t,Te,oe.path);ge=G?s.get(G)??null:null}if(ge===null)we.push(Te);else if(ge===k)ve=!0;else{Ae.push(ge);let G=I.get(k);G||(G=new Set,I.set(k,G)),G.has(ge)||(G.add(ge),D++)}}S.set(k,Ae),R.set(k,we),ve&&E.push(k)}let P=LB(T,I),M=vw(T,I),O={total:0,internal:0,crossOntologyValid:0,crossOntologyViolation:0,crossVault:0,noOntology:0},L={broken:0,"dup-basename":0,"non-markdown":0},te={broken:[],"dup-basename":[],"non-markdown":[]},re=new Map,V=new Map,K=new Map,Se=new Map,ce=new Map,q=new Map,W=a(k=>{let oe=o.get(k);return oe?{uid:oe.uid,label:oe.label,path:oe.path}:{uid:k,label:k,path:""}},"toRef");for(let k of n){if(Co(k.path)||os(k.path))continue;let oe=f.get(k.path)??null,de=UB(k.metadata,k.content??"",i);for(let Ae of de){if(O.total++,Gge(Ae)){L["non-markdown"]++,Qm(te["non-markdown"],`${k.path} \u2192 ${Ae}`);continue}let we=await BB(t,Ae);if(we==="ambiguous"){L["dup-basename"]++,Qm(te["dup-basename"],`${k.path} \u2192 ${Ae}`);continue}if(we===null){L.broken++,Qm(te.broken,`${k.path} \u2192 ${Ae}`);continue}let ve=f.get(we)??s.get(we)??null;if(oe===null||ve===null){O.noOntology++;continue}if(oe===ve){O.internal++,K.set(oe,(K.get(oe)??0)+1);continue}let Te=M.get(oe)?.has(ve)??!1,ge=`${oe}${Mge}${ve}`,G=re.get(ge);if(G?G.occurrences++:re.set(ge,{source:oe,target:ve,occurrences:1,valid:Te}),Se.set(oe,(Se.get(oe)??0)+1),ce.set(ve,(ce.get(ve)??0)+1),Te)O.crossOntologyValid++;else{O.crossOntologyViolation++,q.set(oe,(q.get(oe)??0)+1);let ae=V.get(ge);ae?(ae.occurrences++,Qm(ae.examples,k.path)):V.set(ge,{source:oe,target:ve,occurrences:1,examples:[k.path]})}}}let ne=[...re.values()].sort((k,oe)=>oe.occurrences-k.occurrences),xe=new Map,X=new Map;for(let k of ne)X.set(k.source,(X.get(k.source)??0)+1),xe.set(k.target,(xe.get(k.target)??0)+1);let ee=T.map(k=>({...W(k),declaredImports:S.get(k)??[],unresolvedImports:R.get(k)??[],selfImport:E.includes(k),assetCount:y.get(k)??0,inDegree:xe.get(k)??0,outDegree:X.get(k)??0,internalLinks:K.get(k)??0,externalLinksOut:Se.get(k)??0,externalLinksIn:ce.get(k)??0,violatingOut:q.get(k)??0})).sort((k,oe)=>k.label.localeCompare(oe.label)),Z=[...V.values()].map(k=>({source:W(k.source),target:W(k.target),occurrences:k.occurrences,examples:k.examples})).sort((k,oe)=>oe.occurrences-k.occurrences),H=[],ie=P.length===0,$e=Z.length===0&&O.crossVault===0&&ie&&u.length===0;return{vaultPath:r,totalFiles:n.length,scannedFiles:_,ontologies:ee,duplicateOntologyUids:u,declared:{edgeCount:D,sccs:P,acyclic:ie},derivedEdges:ne,violations:Z,crossVault:H,linkCounts:O,skips:L,skipExamples:te,noOntologyAssets:{count:h,byReason:d,examples:p},warnings:{selfImports:E,multipleIsDefinedBy:m,ontologiesWithoutUid:l},clean:$e,...i.size>0?{excludedPredicates:[...i]}:{}}}a(qge,"scanVaultForOntologyImports");function Wge(r){let e=r.ontologies.map(S=>S.uid),t=new Map;for(let S of r.ontologies)t.set(S.uid,{uid:S.uid,label:S.label,path:S.path});let n=a(S=>t.get(S)??{uid:S,label:S,path:""},"refOf"),i=new Map;for(let S of r.ontologies)S.declaredImports.length>0&&i.set(S.uid,new Set(S.declaredImports));let s=new Map,o=new Map;for(let S of r.derivedEdges){let R=s.get(S.source);R||(R=new Set,s.set(S.source,R)),R.add(S.target),o.set(`${S.source} ${S.target}`,S.occurrences)}let{components:c,componentOf:l}=NB(e,s),u=[],f=new Map,d=0;for(let S of r.derivedEdges){let R=l.get(S.source),D=l.get(S.target);if(R!==void 0&&D!==void 0&&R===D){let M=f.get(R);M||(M=[],f.set(R,M)),M.push({source:S.source,target:S.target,weight:S.occurrences})}else u.push({source:S.source,target:S.target,occurrences:S.occurrences}),S.valid&&d++}let p=a((S,R,D)=>{if(S===R)return!0;let P=[...D.get(S)??[]],M=new Set;for(;P.length>0;){let O=P.shift();if(O===R)return!0;if(!M.has(O)){M.add(O);for(let L of D.get(O)??[])P.push(L)}}return!1},"reaches"),h=new Map;for(let[S,R]of i)h.set(S,new Set(R));let m=[],y=[...u].sort((S,R)=>S.source===R.source?S.target.localeCompare(R.target):S.source.localeCompare(R.source));for(let S of y)if(p(S.target,S.source,h))m.push({source:n(S.source),target:n(S.target),occurrences:S.occurrences});else{let R=h.get(S.source);R||(R=new Set,h.set(S.source,R)),R.add(S.target)}let _=kB(e,h),b=[];for(let[S,R]of _)for(let D of R)i.get(S)?.has(D)||b.push({source:n(S),target:n(D),occurrences:o.get(`${S} ${D}`)??0});b.sort((S,R)=>R.occurrences-S.occurrences||S.source.uid.localeCompare(R.source.uid)||S.target.uid.localeCompare(R.target.uid));let T=[];for(let[S,R]of f){let D=c[S],M=MB(D,R).map(O=>({source:n(O.source),target:n(O.target),occurrences:O.weight})).sort((O,L)=>O.occurrences-L.occurrences||O.source.uid.localeCompare(L.source.uid)||O.target.uid.localeCompare(L.target.uid));T.push({ontologies:D.map(n).sort((O,L)=>O.label.localeCompare(L.label)),edgeCount:R.length,occurrenceCount:R.reduce((O,L)=>O+L.weight,0),suggestedCuts:M})}T.sort((S,R)=>R.ontologies.length-S.ontologies.length||R.occurrenceCount-S.occurrenceCount);let I=vw(e,i),E=[];for(let[S,R]of i)for(let D of R){let P=!1;for(let M of R)if(M!==D&&I.get(M)?.has(D)){P=!0;break}P&&E.push({source:n(S),target:n(D),occurrences:o.get(`${S} ${D}`)??0})}return{additions:b,acyclicEdgeCount:u.length,alreadyCovered:d,conflicts:m,intraScc:T,redundantDeclared:E}}a(Wge,"computeImportProposal");function Hs(r){return`${r.uid}|${r.label}|${r.path}`}a(Hs,"formatRef");function Hge(r){let e=r.ontologies.filter(i=>i.declaredImports.length>0||i.unresolvedImports.length>0).length,t=r.clean?console.log:console.error;if(t(`${r.clean?"OK":"FAIL"} ${r.vaultPath}: ontology-imports audit \u2014 ${r.linkCounts.crossOntologyViolation} violating occurrence(s) in ${r.violations.length} pair(s)`),t(`Ontologies: ${r.ontologies.length} (${e} with imports declared), declared graph: ${r.declared.edgeCount} edge(s), `+(r.declared.acyclic?"acyclic":`NOT ACYCLIC \u2014 ${r.declared.sccs.length} SCC(s)`)),r.excludedPredicates&&r.excludedPredicates.length>0&&t(`Structural-only mode (VL#30): excluded ${r.excludedPredicates.length} associative predicate(s) from edge extraction \u2014 ${r.excludedPredicates.join(", ")}`),r.duplicateOntologyUids.length>0){console.error(`
607
607
  HARD ERRORS \u2014 duplicate ontology UIDs (R7):`);for(let i of r.duplicateOntologyUids)console.error(` ${i.uid}: ${i.paths.join(", ")}`)}if(!r.declared.acyclic){console.error(`
608
- Declared-graph cycles (must be a DAG):`);for(let i of r.declared.sccs)console.error(` SCC[${i.length}]: ${i.map(s=>Hs(Hge(r,s))).join(" \u21C4 ")}`)}if(r.violations.length>0){console.error(`
608
+ Declared-graph cycles (must be a DAG):`);for(let i of r.declared.sccs)console.error(` SCC[${i.length}]: ${i.map(s=>Hs(zge(r,s))).join(" \u21C4 ")}`)}if(r.violations.length>0){console.error(`
609
609
  Violating pairs (src \u2192 tgt, occurrences desc):`);for(let i of r.violations)console.error(` ${Hs(i.source)} \u2192 ${Hs(i.target)}: ${i.occurrences}`)}let n=r.ontologies.reduce((i,s)=>i+s.unresolvedImports.length,0);t(`
610
- Links: total=${r.linkCounts.total}, internal=${r.linkCounts.internal}, cross-ontology-valid=${r.linkCounts.crossOntologyValid}, cross-ontology-violation=${r.linkCounts.crossOntologyViolation}, cross-vault=${r.linkCounts.crossVault}, no-ontology=${r.linkCounts.noOntology}`),t(`Skipped (fail-open, NOT verified): broken=${r.skips.broken}, dup-basename=${r.skips["dup-basename"]}, non-markdown=${r.skips["non-markdown"]}`),t(`No-ontology assets (Phase-4 data gap): ${r.noOntologyAssets.count} \u2014 empty=${r.noOntologyAssets.byReason["empty-isDefinedBy"]}, bang-prefix=${r.noOntologyAssets.byReason["bang-prefix"]}, unresolvable=${r.noOntologyAssets.byReason.unresolvable}, not-an-ontology=${r.noOntologyAssets.byReason["not-an-ontology"]}`),(r.warnings.selfImports.length>0||r.warnings.multipleIsDefinedBy>0||r.warnings.ontologiesWithoutUid.length>0||n>0)&&t(`Warnings: self-imports=${r.warnings.selfImports.length}, unresolved-imports=${n}, multiple-isDefinedBy=${r.warnings.multipleIsDefinedBy}, ontologies-without-uid=${r.warnings.ontologiesWithoutUid.length}`)}a(Wge,"printText");function Hge(r,e){return r.ontologies.find(t=>t.uid===e)??{uid:e,label:e,path:""}}a(Hge,"toRefSafe");function zge(r){if(console.log(`
610
+ Links: total=${r.linkCounts.total}, internal=${r.linkCounts.internal}, cross-ontology-valid=${r.linkCounts.crossOntologyValid}, cross-ontology-violation=${r.linkCounts.crossOntologyViolation}, cross-vault=${r.linkCounts.crossVault}, no-ontology=${r.linkCounts.noOntology}`),t(`Skipped (fail-open, NOT verified): broken=${r.skips.broken}, dup-basename=${r.skips["dup-basename"]}, non-markdown=${r.skips["non-markdown"]}`),t(`No-ontology assets (Phase-4 data gap): ${r.noOntologyAssets.count} \u2014 empty=${r.noOntologyAssets.byReason["empty-isDefinedBy"]}, bang-prefix=${r.noOntologyAssets.byReason["bang-prefix"]}, unresolvable=${r.noOntologyAssets.byReason.unresolvable}, not-an-ontology=${r.noOntologyAssets.byReason["not-an-ontology"]}`),(r.warnings.selfImports.length>0||r.warnings.multipleIsDefinedBy>0||r.warnings.ontologiesWithoutUid.length>0||n>0)&&t(`Warnings: self-imports=${r.warnings.selfImports.length}, unresolved-imports=${n}, multiple-isDefinedBy=${r.warnings.multipleIsDefinedBy}, ontologies-without-uid=${r.warnings.ontologiesWithoutUid.length}`)}a(Hge,"printText");function zge(r,e){return r.ontologies.find(t=>t.uid===e)??{uid:e,label:e,path:""}}a(zge,"toRefSafe");function Kge(r){if(console.log(`
611
611
  === Import proposal (--propose-imports) ===
612
612
  Acyclic part: ${r.acyclicEdgeCount} cross-SCC derived edge(s), ${r.alreadyCovered} already covered by declared closure.`),console.log(`
613
613
  Additions (minimal \u2014 transitive reduction of the condensation), ${r.additions.length} edge(s):`),r.additions.length===0)console.log(" (none \u2014 acyclic part already covered)");else for(let e of r.additions)console.log(` + ${Hs(e.source)} imports ${Hs(e.target)} (${e.occurrences} occ)`);if(r.conflicts.length>0){console.log(`
614
614
  Conflicts \u2014 derived edges that would create a declared-graph cycle (need Phase-3 re-home, not an import), ${r.conflicts.length}:`);for(let e of r.conflicts)console.log(` ! ${Hs(e.source)} \u2192 ${Hs(e.target)} (${e.occurrences} occ)`)}if(r.intraScc.length>0){console.log(`
615
615
  Intra-SCC cycles (require Phase 3 \u2014 imports cannot legitimize a cycle), ${r.intraScc.length} component(s):`);for(let e of r.intraScc){console.log(` SCC[${e.ontologies.length}] ${e.edgeCount} edge(s) / ${e.occurrenceCount} occ \u2014 members: ${e.ontologies.map(t=>t.label).join(", ")}`),console.log(` suggested feedback-arc-set to cut (cheapest first), ${e.suggestedCuts.length} edge(s):`);for(let t of e.suggestedCuts)console.log(` \u2702 ${Hs(t.source)} \u2192 ${Hs(t.target)} (${t.occurrences} occ)`)}}if(r.redundantDeclared.length>0){console.log(`
616
- Redundant declared imports (informational, R8 \u2014 never auto-removed), ${r.redundantDeclared.length}:`);for(let e of r.redundantDeclared)console.log(` ~ ${Hs(e.source)} imports ${Hs(e.target)} (reachable without the direct edge)`)}}a(zge,"printProposal");function qB(){return new fe("ontology-imports").description("Detect cross-ontology wikilinks not covered by the declared exo__Ontology_imports transitive closure (DAG check, per-pair grouping, fail-open skip-accounting); --propose-imports suggests minimal import additions").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").option("--propose-imports","Emit a minimal additions-only import proposal (SCC condensation + transitive reduction + suggested feedback-arc-set)").option("--structural-only","Exclude curated associative predicates (exo__Asset_relates, concept__Concept_related/broader/synonym, exo__Asset_createdBy) from edge extraction to measure the structural backbone import-DAG (EKA Phase B, Vision VL#30). Default: every wikilink counts.").option("--exclude-predicate <name>","Additional frontmatter predicate (top-level key) to exclude from edge extraction (repeatable; combines with --structural-only)",Kge,[]).action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,GB.resolve)(r.vault);if(!(0,Tw.existsSync)(t)||!(0,Tw.statSync)(t).isDirectory())throw new Me(t);let n=[...r.structuralOnly?jge:[],...r.excludePredicate??[]],i=await Gge(t,{excludePredicates:n});r.proposeImports&&(i.proposal=qge(i)),e==="json"?console.log(JSON.stringify(i,null,2)):(Wge(i),i.proposal&&zge(i.proposal)),i.clean||(process.exitCode=1)}catch(t){se.handle(t)}})}a(qB,"auditOntologyImportsCommand");function Kge(r,e){return e.concat([r])}a(Kge,"collectExcludePredicate");ct();var Iw=require("fs"),WB=require("path"),xO=J(We());Pt();qt();var Yge="829b9b3b-6fc3-4276-be6a-27d3398c012e",Qge=5;function CO(r){return Array.isArray(r)?r.find(t=>typeof t=="string")??null:typeof r=="string"?r:null}a(CO,"firstString");function Aw(r){let e=r==null?[]:Array.isArray(r)?r:[r],t=[];for(let n of e){let i=n;for(;Array.isArray(i);)i=i[0];let s=(0,xO.extractAssetReference)(i);s&&t.push(s)}return t}a(Aw,"asRefList");var Xge=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function Jge(r){let e=new xi(r),t=await e.indexedAssets(),n=new Map,i=new Map,s=new Map,o=new Map,c=new Map,l=new Map;for(let b of t){if(Co(b.path)||os(b.path))continue;let T=CO(b.metadata.exo__Asset_uid);if(T){n.has(T)||n.set(T,b.metadata);let E=CO(b.metadata.exo__Asset_label);E&&!i.has(E)&&i.set(E,T)}let I=Aw(b.metadata.exo__Instance_class);if(T&&I.includes(Yge)){s.set(b.path,T);let E=CO(b.metadata.exo__Asset_label)??b.path;o.has(T)||o.set(T,E)}}let u=a(b=>Xge.test(b)?b:i.get(b)??null,"resolveClassRefToUid");for(let b of t){if(Co(b.path)||os(b.path))continue;let T=s.get(b.path);if(!T)continue;let I=Aw(b.metadata.exo__Ontology_admits);if(I.length===0)continue;let E=new Set;for(let S of I){let R=u(S);R&&E.add(R)}E.size>0&&(c.set(T,E),l.set(T,[...E]))}let f=new Map,d=a(b=>{let T=f.get(b);if(T)return T;let I=new Set,E=[b];for(;E.length>0;){let S=E.shift();if(I.has(S))continue;I.add(S);let R=n.get(S);if(R)for(let D of Aw(R.exo__Class_superClass)){let P=u(D);P&&!I.has(P)&&E.push(P)}}return f.set(b,I),I},"classClosure"),p=[],h={"no-isDefinedBy":0,"ontology-unresolvable":0,"ontology-no-admits":0,"no-instance-class":0,"unresolvable-class":0},m={"no-isDefinedBy":[],"ontology-unresolvable":[],"ontology-no-admits":[],"no-instance-class":[],"unresolvable-class":[]},y=0,_=a((b,T)=>{h[b]++,m[b].length<Qge&&m[b].push(T)},"skip");for(let b of t){if(Co(b.path)||os(b.path))continue;let T=(0,xO.extractAssetReference)(b.metadata.exo__Asset_isDefinedBy);if(!T||T.startsWith("!")){_("no-isDefinedBy",b.path);continue}let I=await Mc(e,T,b.path),E=I?s.get(I):void 0;if(!E){_("ontology-unresolvable",b.path);continue}let S=c.get(E);if(!S){_("ontology-no-admits",b.path);continue}let R=Aw(b.metadata.exo__Instance_class);if(R.length===0){_("no-instance-class",b.path);continue}let D=R.map(u).filter(M=>M!==null);if(D.length===0){_("unresolvable-class",b.path);continue}y++,D.some(M=>{for(let O of d(M))if(S.has(O))return!0;return!1})||p.push({path:b.path,ontologyUid:E,ontologyLabel:o.get(E)??E,classUids:D,admits:l.get(E)??[...S]})}return{vaultPath:r,totalFiles:t.length,ontologies:s.size,ontologiesWithAdmits:c.size,checked:y,violations:p,skips:h,skipExamples:m}}a(Jge,"scanVaultForOntologyMembership");function HB(){return new fe("ontology-membership").description("Detect ontology-membership violations: any asset whose exo__Instance_class (or a superClass ancestor) is not in its isDefinedBy ontology's exo__Ontology_admits allow-list (subsumption-aware superClass walk, dual-IRI-safe, fail-open when no allow-list is declared, skip-accounted)").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,WB.resolve)(r.vault);if(!(0,Iw.existsSync)(t)||!(0,Iw.statSync)(t).isDirectory())throw new Me(t);let n=await Jge(t),i=Object.values(n.skips).reduce((s,o)=>s+o,0);if(e==="json")console.log(JSON.stringify({vaultPath:n.vaultPath,totalFiles:n.totalFiles,ontologies:n.ontologies,ontologiesWithAdmits:n.ontologiesWithAdmits,checked:n.checked,violationCount:n.violations.length,violations:n.violations,skips:n.skips,skipTotal:i,skipExamples:n.skipExamples,clean:n.violations.length===0},null,2));else{if(n.violations.length===0)console.log(`OK ${t}: 0 ontology-membership violations (${n.checked} checked; ${n.ontologiesWithAdmits}/${n.ontologies} ontologies declare exo__Ontology_admits)`);else{console.error(`FAIL ${t}: ${n.violations.length} ontology-membership violation(s) (${n.checked} checked; ${n.ontologiesWithAdmits}/${n.ontologies} ontologies declare exo__Ontology_admits):`);for(let s of n.violations)console.error(` ${s.path}
616
+ Redundant declared imports (informational, R8 \u2014 never auto-removed), ${r.redundantDeclared.length}:`);for(let e of r.redundantDeclared)console.log(` ~ ${Hs(e.source)} imports ${Hs(e.target)} (reachable without the direct edge)`)}}a(Kge,"printProposal");function qB(){return new fe("ontology-imports").description("Detect cross-ontology wikilinks not covered by the declared exo__Ontology_imports transitive closure (DAG check, per-pair grouping, fail-open skip-accounting); --propose-imports suggests minimal import additions").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").option("--propose-imports","Emit a minimal additions-only import proposal (SCC condensation + transitive reduction + suggested feedback-arc-set)").option("--structural-only","Exclude curated associative predicates (exo__Asset_relates, concept__Concept_related/broader/synonym, exo__Asset_createdBy) from edge extraction to measure the structural backbone import-DAG (EKA Phase B, Vision VL#30). Default: every wikilink counts.").option("--exclude-predicate <name>","Additional frontmatter predicate (top-level key) to exclude from edge extraction (repeatable; combines with --structural-only)",Yge,[]).action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,GB.resolve)(r.vault);if(!(0,Tw.existsSync)(t)||!(0,Tw.statSync)(t).isDirectory())throw new Me(t);let n=[...r.structuralOnly?$ge:[],...r.excludePredicate??[]],i=await qge(t,{excludePredicates:n});r.proposeImports&&(i.proposal=Wge(i)),e==="json"?console.log(JSON.stringify(i,null,2)):(Hge(i),i.proposal&&Kge(i.proposal)),i.clean||(process.exitCode=1)}catch(t){se.handle(t)}})}a(qB,"auditOntologyImportsCommand");function Yge(r,e){return e.concat([r])}a(Yge,"collectExcludePredicate");ct();var Iw=require("fs"),WB=require("path"),xO=J(We());Pt();qt();var Qge="829b9b3b-6fc3-4276-be6a-27d3398c012e",Xge=5;function CO(r){return Array.isArray(r)?r.find(t=>typeof t=="string")??null:typeof r=="string"?r:null}a(CO,"firstString");function Aw(r){let e=r==null?[]:Array.isArray(r)?r:[r],t=[];for(let n of e){let i=n;for(;Array.isArray(i);)i=i[0];let s=(0,xO.extractAssetReference)(i);s&&t.push(s)}return t}a(Aw,"asRefList");var Jge=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function Zge(r){let e=new xi(r),t=await e.indexedAssets(),n=new Map,i=new Map,s=new Map,o=new Map,c=new Map,l=new Map;for(let b of t){if(Co(b.path)||os(b.path))continue;let T=CO(b.metadata.exo__Asset_uid);if(T){n.has(T)||n.set(T,b.metadata);let E=CO(b.metadata.exo__Asset_label);E&&!i.has(E)&&i.set(E,T)}let I=Aw(b.metadata.exo__Instance_class);if(T&&I.includes(Qge)){s.set(b.path,T);let E=CO(b.metadata.exo__Asset_label)??b.path;o.has(T)||o.set(T,E)}}let u=a(b=>Jge.test(b)?b:i.get(b)??null,"resolveClassRefToUid");for(let b of t){if(Co(b.path)||os(b.path))continue;let T=s.get(b.path);if(!T)continue;let I=Aw(b.metadata.exo__Ontology_admits);if(I.length===0)continue;let E=new Set;for(let S of I){let R=u(S);R&&E.add(R)}E.size>0&&(c.set(T,E),l.set(T,[...E]))}let f=new Map,d=a(b=>{let T=f.get(b);if(T)return T;let I=new Set,E=[b];for(;E.length>0;){let S=E.shift();if(I.has(S))continue;I.add(S);let R=n.get(S);if(R)for(let D of Aw(R.exo__Class_superClass)){let P=u(D);P&&!I.has(P)&&E.push(P)}}return f.set(b,I),I},"classClosure"),p=[],h={"no-isDefinedBy":0,"ontology-unresolvable":0,"ontology-no-admits":0,"no-instance-class":0,"unresolvable-class":0},m={"no-isDefinedBy":[],"ontology-unresolvable":[],"ontology-no-admits":[],"no-instance-class":[],"unresolvable-class":[]},y=0,_=a((b,T)=>{h[b]++,m[b].length<Xge&&m[b].push(T)},"skip");for(let b of t){if(Co(b.path)||os(b.path))continue;let T=(0,xO.extractAssetReference)(b.metadata.exo__Asset_isDefinedBy);if(!T||T.startsWith("!")){_("no-isDefinedBy",b.path);continue}let I=await Mc(e,T,b.path),E=I?s.get(I):void 0;if(!E){_("ontology-unresolvable",b.path);continue}let S=c.get(E);if(!S){_("ontology-no-admits",b.path);continue}let R=Aw(b.metadata.exo__Instance_class);if(R.length===0){_("no-instance-class",b.path);continue}let D=R.map(u).filter(M=>M!==null);if(D.length===0){_("unresolvable-class",b.path);continue}y++,D.some(M=>{for(let O of d(M))if(S.has(O))return!0;return!1})||p.push({path:b.path,ontologyUid:E,ontologyLabel:o.get(E)??E,classUids:D,admits:l.get(E)??[...S]})}return{vaultPath:r,totalFiles:t.length,ontologies:s.size,ontologiesWithAdmits:c.size,checked:y,violations:p,skips:h,skipExamples:m}}a(Zge,"scanVaultForOntologyMembership");function HB(){return new fe("ontology-membership").description("Detect ontology-membership violations: any asset whose exo__Instance_class (or a superClass ancestor) is not in its isDefinedBy ontology's exo__Ontology_admits allow-list (subsumption-aware superClass walk, dual-IRI-safe, fail-open when no allow-list is declared, skip-accounted)").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,WB.resolve)(r.vault);if(!(0,Iw.existsSync)(t)||!(0,Iw.statSync)(t).isDirectory())throw new Me(t);let n=await Zge(t),i=Object.values(n.skips).reduce((s,o)=>s+o,0);if(e==="json")console.log(JSON.stringify({vaultPath:n.vaultPath,totalFiles:n.totalFiles,ontologies:n.ontologies,ontologiesWithAdmits:n.ontologiesWithAdmits,checked:n.checked,violationCount:n.violations.length,violations:n.violations,skips:n.skips,skipTotal:i,skipExamples:n.skipExamples,clean:n.violations.length===0},null,2));else{if(n.violations.length===0)console.log(`OK ${t}: 0 ontology-membership violations (${n.checked} checked; ${n.ontologiesWithAdmits}/${n.ontologies} ontologies declare exo__Ontology_admits)`);else{console.error(`FAIL ${t}: ${n.violations.length} ontology-membership violation(s) (${n.checked} checked; ${n.ontologiesWithAdmits}/${n.ontologies} ontologies declare exo__Ontology_admits):`);for(let s of n.violations)console.error(` ${s.path}
617
617
  isDefinedBy=${s.ontologyUid} (${s.ontologyLabel}) instance_class=[${s.classUids.join(", ")}] not in admits=[${s.admits.join(", ")}]`)}console.error(`
618
- Skipped (fail-open, NOT verified): ${i} \u2014 no-isDefinedBy=${n.skips["no-isDefinedBy"]}, ontology-unresolvable=${n.skips["ontology-unresolvable"]}, ontology-no-admits=${n.skips["ontology-no-admits"]}, no-instance-class=${n.skips["no-instance-class"]}, unresolvable-class=${n.skips["unresolvable-class"]}`)}n.violations.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}a(HB,"auditOntologyMembershipCommand");ct();var Rw=require("fs"),zB=require("path");Pt();qt();var Zge="exocortex.my",eye=5;function tye(r){return Array.isArray(r)?r.find(t=>typeof t=="string")??null:typeof r=="string"?r:null}a(tye,"firstString");function rye(r){try{return new URL(r).host}catch{return null}}a(rye,"urlHost");function nye(r){return`${r.replace(/\/+$/,"")}#`}a(nye,"expectedCanonicalForm");async function iye(r){let t=await new xi(r).indexedAssets(),n=[],i={"foreign-vocab":0,"unparseable-url":0},s={"foreign-vocab":[],"unparseable-url":[]},o=0,c=0,l=a((u,f)=>{s[u].length<eye&&s[u].push(f)},"addExample");for(let{path:u,metadata:f}of t){if(Co(u)||os(u))continue;let d=tye(f.exo__Ontology_url);if(!d)continue;o++;let p=rye(d);if(p===null){i["unparseable-url"]++,l("unparseable-url",u);continue}if(p!==Zge){i["foreign-vocab"]++,l("foreign-vocab",u);continue}c++,d.endsWith("#")||n.push({path:u,url:d,expected:nye(d)})}return{vaultPath:r,totalFiles:t.length,ontologiesFound:o,checked:c,violations:n,skips:i,skipExamples:s}}a(iye,"scanVaultForOntologyUrl");function KB(){return new fe("ontology-url").description("Detect exocortex.my ontologies whose exo__Ontology_url lacks the canonical trailing '#' separator (foreign vocabularies skipped, path hierarchy preserved, fail-open + skip-accounted)").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,zB.resolve)(r.vault);if(!(0,Rw.existsSync)(t)||!(0,Rw.statSync)(t).isDirectory())throw new Me(t);let n=await iye(t),i=n.skips["foreign-vocab"]+n.skips["unparseable-url"];if(e==="json")console.log(JSON.stringify({vaultPath:n.vaultPath,totalFiles:n.totalFiles,ontologiesFound:n.ontologiesFound,checked:n.checked,violationCount:n.violations.length,violations:n.violations,skips:n.skips,skipTotal:i,skipExamples:n.skipExamples,clean:n.violations.length===0},null,2));else{if(n.violations.length===0)console.log(`OK ${t}: 0 ontology-url violations (${n.checked}/${n.ontologiesFound} exocortex.my ontologies checked)`);else{console.error(`FAIL ${t}: ${n.violations.length} ontology-url violation(s) (${n.checked}/${n.ontologiesFound} exocortex.my ontologies checked):`);for(let s of n.violations)console.error(` ${s.path}
618
+ Skipped (fail-open, NOT verified): ${i} \u2014 no-isDefinedBy=${n.skips["no-isDefinedBy"]}, ontology-unresolvable=${n.skips["ontology-unresolvable"]}, ontology-no-admits=${n.skips["ontology-no-admits"]}, no-instance-class=${n.skips["no-instance-class"]}, unresolvable-class=${n.skips["unresolvable-class"]}`)}n.violations.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}a(HB,"auditOntologyMembershipCommand");ct();var Rw=require("fs"),zB=require("path");Pt();qt();var eye="exocortex.my",tye=5;function rye(r){return Array.isArray(r)?r.find(t=>typeof t=="string")??null:typeof r=="string"?r:null}a(rye,"firstString");function nye(r){try{return new URL(r).host}catch{return null}}a(nye,"urlHost");function iye(r){return`${r.replace(/\/+$/,"")}#`}a(iye,"expectedCanonicalForm");async function sye(r){let t=await new xi(r).indexedAssets(),n=[],i={"foreign-vocab":0,"unparseable-url":0},s={"foreign-vocab":[],"unparseable-url":[]},o=0,c=0,l=a((u,f)=>{s[u].length<tye&&s[u].push(f)},"addExample");for(let{path:u,metadata:f}of t){if(Co(u)||os(u))continue;let d=rye(f.exo__Ontology_url);if(!d)continue;o++;let p=nye(d);if(p===null){i["unparseable-url"]++,l("unparseable-url",u);continue}if(p!==eye){i["foreign-vocab"]++,l("foreign-vocab",u);continue}c++,d.endsWith("#")||n.push({path:u,url:d,expected:iye(d)})}return{vaultPath:r,totalFiles:t.length,ontologiesFound:o,checked:c,violations:n,skips:i,skipExamples:s}}a(sye,"scanVaultForOntologyUrl");function KB(){return new fe("ontology-url").description("Detect exocortex.my ontologies whose exo__Ontology_url lacks the canonical trailing '#' separator (foreign vocabularies skipped, path hierarchy preserved, fail-open + skip-accounted)").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,zB.resolve)(r.vault);if(!(0,Rw.existsSync)(t)||!(0,Rw.statSync)(t).isDirectory())throw new Me(t);let n=await sye(t),i=n.skips["foreign-vocab"]+n.skips["unparseable-url"];if(e==="json")console.log(JSON.stringify({vaultPath:n.vaultPath,totalFiles:n.totalFiles,ontologiesFound:n.ontologiesFound,checked:n.checked,violationCount:n.violations.length,violations:n.violations,skips:n.skips,skipTotal:i,skipExamples:n.skipExamples,clean:n.violations.length===0},null,2));else{if(n.violations.length===0)console.log(`OK ${t}: 0 ontology-url violations (${n.checked}/${n.ontologiesFound} exocortex.my ontologies checked)`);else{console.error(`FAIL ${t}: ${n.violations.length} ontology-url violation(s) (${n.checked}/${n.ontologiesFound} exocortex.my ontologies checked):`);for(let s of n.violations)console.error(` ${s.path}
619
619
  url=${s.url} expected=${s.expected}`)}console.error(`
620
- Skipped (fail-open, NOT verified): ${i} \u2014 foreign-vocab=${n.skips["foreign-vocab"]}, unparseable-url=${n.skips["unparseable-url"]}`)}n.violations.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}a(KB,"auditOntologyUrlCommand");function YB(){let r=new fe("audit").description("Audit vault for regression patterns (RFC cutover detectors)");return r.addCommand(FB()),r.addCommand(qB()),r.addCommand(HB()),r.addCommand(KB()),r}a(YB,"auditCommand");ct();var Cw=require("fs"),QB=require("fs/promises"),XB=require("crypto"),cu=require("path"),xo=J(We());Pt();qt();var sye="35cf35fb-935f-4d35-a150-939f29109aec",oye=[{checkId:xo.CHECK_ID_UID_UNIQUENESS,label:"uid-uniqueness",value:!0},{checkId:xo.CHECK_ID_CO_LOCATION,label:"co-location",value:!1},{checkId:xo.CHECK_ID_SHACL,label:"shacl",value:!1},{checkId:xo.CHECK_ID_DAG_ONTOLOGY_IMPORTS,label:"dag-ontology-imports",value:!1}];function aye(r,e,t,n,i,s){return`---
620
+ Skipped (fail-open, NOT verified): ${i} \u2014 foreign-vocab=${n.skips["foreign-vocab"]}, unparseable-url=${n.skips["unparseable-url"]}`)}n.violations.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}a(KB,"auditOntologyUrlCommand");function YB(){let r=new fe("audit").description("Audit vault for regression patterns (RFC cutover detectors)");return r.addCommand(FB()),r.addCommand(qB()),r.addCommand(HB()),r.addCommand(KB()),r}a(YB,"auditCommand");ct();var Cw=require("fs"),QB=require("fs/promises"),XB=require("crypto"),cu=require("path"),xo=J(We());Pt();qt();var oye="35cf35fb-935f-4d35-a150-939f29109aec",aye=[{checkId:xo.CHECK_ID_UID_UNIQUENESS,label:"uid-uniqueness",value:!0},{checkId:xo.CHECK_ID_CO_LOCATION,label:"co-location",value:!1},{checkId:xo.CHECK_ID_SHACL,label:"shacl",value:!1},{checkId:xo.CHECK_ID_DAG_ONTOLOGY_IMPORTS,label:"dag-ontology-imports",value:!1}];function cye(r,e,t,n,i,s){return`---
621
621
  exo__Asset_uid: ${r}
622
622
  exo__Asset_isDefinedBy: "[[${e}]]"
623
623
  exo__Asset_createdAt: ${s}
624
624
  exo__Instance_class:
625
- - "[[${sye}]]"
625
+ - "[[${oye}]]"
626
626
  exo__Asset_label: "Validation check: ${n} (${i?"enabled":"disabled"})"
627
627
  setting__Setting_key: "[[${t}]]"
628
628
  setting__Setting_value: ${i}
@@ -631,12 +631,12 @@ setting__Setting_value: ${i}
631
631
  # Validation check: ${n}
632
632
 
633
633
  Homoiconic validation-check setting (RFC f402002b, M1.5). \`Exocortex: Validate vault\` reads this instance's \`setting__Setting_value\` to decide whether to run the **${n}** check (key \`[[${t}]]\`). Scaffolded default \u2014 edit \`setting__Setting_value\` to toggle.
634
- `}a(aye,"settingAsset");function JB(){return new fe("scaffold").description("Scaffold homoiconic configuration assets").addCommand(cye())}a(JB,"scaffoldCommand");function cye(){return new fe("validation-settings").description("Scaffold the 4 validation-check setting__Setting instances (uid-uniqueness=true, rest=false) co-located in the chosen ontology").requiredOption("--vault <path>","Vault root directory").requiredOption("--ontology <uid>","UID of the ontology whose folder the check settings are co-located in").option("--output <type>","Response format: text|json","text").action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,cu.resolve)(r.vault);if(!(0,Cw.existsSync)(t)||!(0,Cw.statSync)(t).isDirectory())throw new Me(t);let s=(await new xi(t).indexedAssets()).find(u=>(0,xo.readUid)(u.metadata)===r.ontology);if(!s)throw new Error(`Ontology UID "${r.ontology}" not found in vault ${t} (its folder is where the check settings co-locate).`);let o=(0,cu.join)(t,(0,cu.dirname)(s.path)),c=new Date().toISOString().slice(0,19),l=[];for(let u of oye){let f=(0,XB.randomUUID)(),d=(0,cu.join)(o,`${f}.md`);await(0,QB.writeFile)(d,aye(f,r.ontology,u.checkId,u.label,u.value,c),"utf-8"),l.push(d)}if(e==="json")console.log(JSON.stringify({vaultPath:t,ontology:r.ontology,targetDir:o,created:l},null,2));else{console.log(`OK: scaffolded ${l.length} validation-check setting(s) in ${o}`);for(let u of l)console.log(` ${u}`);console.log(`
635
- Defaults: uid-uniqueness=true, co-location/shacl/dag=false. Run 'exocortex validate vault --vault <path>'.`)}}catch(t){se.handle(t)}})}a(cye,"scaffoldValidationCommand");ct();var f7=require("fs"),d7=require("path");var xw=J(Ta()),Ow=J(require("path")),Uc=J(We()),Fw=J(We());var lye=Uc.SDK_FLOOR_ASSETSPACE_UIDS,Xm="73bd00e4-ccc0-4f3f-b20d-c4388c4588fb",OO="3de846cd-1f0e-4f98-8613-b8587aa15174",uye=5,Pw=class{static{a(this,"CliProfileResolver")}constructor(e){this.vaultPaths=[Ow.default.resolve(e.vaultPath)],this.maxExtendsDepth=e.maxExtendsDepth??uye,this.warn=e.warn??(()=>{})}async resolveFilter(e){if(e==null||e==="")return{outcome:"no-profile"};let t;try{t=await this.scanAllVaults()}catch(f){let d=`[CliProfileResolver] vault scan threw \u2014 ${String(f)}`;return this.warn(d),{outcome:"error",reason:d}}if(t.profiles.get(e)===void 0)return this.warn(`[CliProfileResolver] profileUid=${e} not found in any scanned vault \u2014 falling back to no-filter (full vault).`),{outcome:"missing-profile",profileUid:e};let i=new Set;try{this.walkProfileChain(e,t.profiles,i,new Set,0)}catch(f){let d=`[CliProfileResolver] profile chain walk threw \u2014 ${String(f)}`;return this.warn(d),{outcome:"error",reason:d}}let s=(0,Uc.transitiveDependsOnClosure)(i,t.dependsOn),o=new Set(t.folderMap.values()),c=new Set,l=[];for(let f of s){if(o.has(f)){c.add(f);continue}l.push(f)}for(let f of lye)c.add(f);if(!Array.from(c).some(f=>o.has(f))){let f=`[CliProfileResolver] profileUid=${e} produced effective set with zero AssetSpace folder overlap (${c.size} AS UIDs incl. floor; ${t.folderMap.size} folders known). Likely cause: profile declares AssetSpace UIDs not present as descriptors, or vault has no scanned AssetSpaces. Falling back to no-filter (full vault indexed).`;return this.warn(f),{outcome:"degraded",reason:f}}return{outcome:"engaged",result:{effective:c,folderMap:t.folderMap,declaredOntologies:s,untranslated:l}}}walkProfileChain(e,t,n,i,s){if(s>this.maxExtendsDepth)throw new Error(`Profile chain exceeds max depth ${this.maxExtendsDepth} at ${e} \u2014 possible cycle`);if(i.has(e))return;i.add(e);let o=t.get(e);if(o!==void 0){for(let c of o.includes)n.add(c);typeof o.extends=="string"&&o.extends.length>0&&this.walkProfileChain(o.extends,t,n,i,s+1)}}async scanAllVaults(){let e=new Map,t=new Map,n=new Map;for(let i of this.vaultPaths){if(!await xw.default.pathExists(i)){this.warn(`[CliProfileResolver] vault path does not exist: ${i} \u2014 skipping.`);continue}let s=await this.walkVault(i);for(let o of s){let c=ja(o.frontmatter.exo__Instance_class);if(c.some(l=>l===Xm)){let l=dye(o.filePath,o.vaultRoot);l.length>0&&!e.has(l)&&e.set(l,o.uid);let u=typeof o.frontmatter.exo__AssetSpace_source=="string"?o.frontmatter.exo__AssetSpace_source:typeof o.frontmatter.exo__AssetSpace_git=="string"?o.frontmatter.exo__AssetSpace_git:"";if(u.length>0){let d=(0,Uc.derivePath)(u);d!==null&&e.set(d,o.uid)}let f=ja(o.frontmatter.exo__AssetSpace_dependsOn);f.length>0&&n.set(o.uid,f)}if(c.some(l=>l===OO)){let l={uid:o.uid,label:typeof o.frontmatter.exo__Asset_label=="string"?o.frontmatter.exo__Asset_label:void 0,includes:ja(o.frontmatter.exo__Profile_includes),extends:ja(o.frontmatter.exo__Profile_imports)[0]??null};t.set(o.uid,l)}}}return{folderMap:e,profiles:t,dependsOn:n}}async walkVault(e){let t=[],n=[e];for(;n.length>0;){let i=n.pop(),s;try{s=await xw.default.readdir(i,{withFileTypes:!0})}catch{continue}for(let o of s){let c=Ow.default.join(i,o.name);if(o.isDirectory()){if(o.name.startsWith(".")||o.name==="node_modules"||o.name===".obsidian"||o.name===".exocortex")continue;n.push(c);continue}if(!o.isFile()||!o.name.endsWith(".md"))continue;let l=await this.tryReadFrontmatter(c);if(l===null)continue;let u=l.exo__Asset_uid;typeof u!="string"||u.length===0||t.push({uid:u,filePath:c,vaultRoot:e,frontmatter:l})}}return t}async tryReadFrontmatter(e){let t;try{t=await xw.default.readFile(e,"utf-8")}catch{return null}if(!t.startsWith("---"))return null;let n=t.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(n===null)return null;try{let i=(0,Uc.parseYamlFrontmatterTolerant)(n[1],e);return i&&typeof i=="object"&&!Array.isArray(i)?i:null}catch{return null}}};function ja(r){if(r==null)return[];let e=Array.isArray(r)?r:[r],t=[];for(let n of e){if(typeof n!="string")continue;let i=fye(n);i!==null&&t.push(i)}return t}a(ja,"parseWikilinkArray");function fye(r){let e=r.trim().replace(/^\[\[/,"").replace(/\]\]$/,"").split("|")[0].trim();return e.length===0?null:e}a(fye,"extractUidFromWikilink");function dye(r,e){let t=Ow.default.relative(e,r).replace(/\\/g,"/");if(!t.startsWith("assetspaces/"))return"";let n=t.slice(12),i=n.indexOf("/");return i<0?"":`assetspaces/${n.slice(0,i)}`}a(dye,"parentFolderRelative");var Bc=require("node:fs"),lu=require("node:path"),Nr=J(We());var pt=require("node:fs"),e7=require("node:fs/promises"),t7=require("node:os"),an=require("node:path"),as=J(We());var pye=/^https:\/\/github\.com\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_.-]+?)(?:\.git)?$/,ZB=50*1024*1024,Oi=class r{static{a(this,"BootstrapAssetSpaceService")}static{this.PAT_REGEX=/(?:gh[pousr]_[A-Za-z0-9_]{36,}|github_pat_[A-Za-z0-9_]{22,}_[A-Za-z0-9_]{59,})/g}constructor(e={}){this.fetchImpl=e.fetchImpl??globalThis.fetch,this.token=e.token??"",this.mountBaseStore=e.mountBaseStore}redact(e){return(typeof e=="string"?e:String(e)).replace(r.PAT_REGEX,"***REDACTED***")}static parseGitHubURL(e){let t=e.match(pye);if(t===null)throw new Error(`parseGitHubURL: invalid URL shape \u2014 expected https://github.com/<owner>/<repo>, got: ${e}`);return{owner:t[1],repo:t[2]}}static deriveFolderName(e){let{repo:t}=r.parseGitHubURL(e);return t.startsWith("exoas-")?t.slice(6):t}async pullAssetSpace(e,t,n){let{owner:i,repo:s}=r.parseGitHubURL(e);if((0,pt.existsSync)(n)&&(0,pt.readdirSync)(n).length>0)throw new Error(`pullAssetSpace: target ${n} exists \u0438 not empty \u2014 refusing \u043A overwrite`);let o=await(0,as.mountAssetSpaceFiles)({http:this.httpPort(),fs:this.fsPort(),owner:i,repo:s,ref:t,targetPath:n});if(this.mountBaseStore!==void 0)try{await this.mountBaseStore.set(`${i}/${s}#${as.SYNC_BRANCH}`,o.sha)}catch{}return o}httpPort(){let e=this.fetchImpl,t=this.token,n=a(i=>this.redact(i),"redact");return{async fetchTarball(i,s,o){let c=`https://api.github.com/repos/${i}/${s}/tarball/${o}`,l={signal:AbortSignal.timeout(6e4)};t.length>0&&(l.headers={Authorization:`Bearer ${t}`,"User-Agent":"exocortex-cli","X-GitHub-Api-Version":"2022-11-28"});let u;try{u=await e(c,l)}catch(d){throw new Error(n(`pullAssetSpace: fetch error for ${c}: ${d instanceof Error?d.message:String(d)}`))}if(!u.ok){if(u.status===403){let d=u.headers?.get?.("x-ratelimit-remaining"),p=u.headers?.get?.("x-ratelimit-reset");if(d==="0"||p!=null){let h=p!=null?new Date(Number(p)*1e3).toISOString():"unknown";throw new Error(`pullAssetSpace: GitHub anonymous API rate-limit exceeded (60 req/hour). Reset at ${h}. Wait or use authenticated CLI.`)}}if(u.status===404){let d=t.length>0?"repo not found, or the provided token lacks access to it":"if this is a private repo, pass --token <pat> (or set GITHUB_TOKEN / GH_TOKEN)";throw new Error(n(`pullAssetSpace: fetch failed (404 Not Found) for ${c} \u2014 ${d}`))}throw new Error(n(`pullAssetSpace: fetch failed (${u.status} ${u.statusText}) for ${c}`))}let f=await u.arrayBuffer();if(f.byteLength>ZB)throw new Error(`pullAssetSpace: tarball too large (${f.byteLength} bytes > ${ZB})`);return new Uint8Array(f)}}}fsPort(){return{async exists(e){return(0,pt.existsSync)(e)},async read(e){return(0,pt.readFileSync)(e,"utf8")},async write(e,t){(0,pt.writeFileSync)(e,t,{encoding:"utf8"})},async removeDir(e){(0,pt.rmSync)(e,{recursive:!0,force:!0})},async materialize(e,t,n){let i=await(0,e7.mkdtemp)((0,an.join)((0,t7.tmpdir)(),`exo-bootstrap-${(0,an.basename)(e)}-`)),s=0;try{for(let o of t){let c=o.relPath;if(c.split("/").some(u=>u===".."))throw new Error(`pullAssetSpace: path traversal detected for entry "${c}"`);let l=(0,an.resolve)(i,c);if(l!==i&&!l.startsWith(i+an.sep))throw new Error(`pullAssetSpace: zip-slip detected for entry "${c}"`);(0,pt.mkdirSync)((0,an.dirname)(l),{recursive:!0}),(0,pt.writeFileSync)(l,o.content),s++,n?.(s)}(0,pt.mkdirSync)((0,an.dirname)(e),{recursive:!0});try{(0,pt.renameSync)(i,e)}catch(o){if(o.code==="EXDEV"){let{cpSync:c}=await import("node:fs");c(i,e,{recursive:!0}),(0,pt.rmSync)(i,{recursive:!0,force:!0})}else throw o}}catch(o){throw(0,pt.rmSync)(i,{recursive:!0,force:!0}),o}return s}}}ensureGitmodulesEntry(e,t,n){let i=(0,an.join)(e,".gitmodules"),s="";try{s=(0,pt.readFileSync)(i,"utf8")}catch(l){if(l.code!=="ENOENT")throw l}let{content:o,added:c}=(0,as.appendGitmodulesEntry)(s,t,n);return c?((0,pt.appendFileSync)(i,o.slice(s.length),{encoding:"utf8"}),{added:!0}):{added:!1}}removeGitmodulesEntry(e,t){let n=(0,an.join)(e,".gitmodules"),i;try{i=(0,pt.readFileSync)(n,"utf8")}catch(o){if(o.code==="ENOENT")return{removed:!1};throw o}let s=(0,as.stripGitmodulesEntry)(i,t);return s===i?{removed:!1}:((0,pt.writeFileSync)(n,s,{encoding:"utf8"}),{removed:!0})}static stripGitmodulesEntry(e,t){return(0,as.stripGitmodulesEntry)(e,t)}unmountAssetSpace(e,t){let n=this.assertSafeVaultTarget(e,t,"unmountAssetSpace");this.removeGitmodulesEntry(e,t),(0,pt.existsSync)(n)&&(0,pt.rmSync)(n,{recursive:!0,force:!0})}parkAssetSpace(e,t){let n=this.assertSafeVaultTarget(e,t,"parkAssetSpace"),i=(0,as.parkedPathFor)(t),s=this.assertSafeVaultTarget(e,i,"parkAssetSpace",{requireAssetspacesRoot:!1});if((0,pt.existsSync)(n)){if((0,pt.existsSync)(s))throw new Error(`parkAssetSpace: refusing to park "${t}" \u2014 a parked copy already exists at "${i}". Resolve by hand: one of the two holds work the other does not.`);this.removeGitmodulesEntry(e,t),(0,pt.mkdirSync)((0,an.dirname)(s),{recursive:!0}),(0,pt.renameSync)(n,s)}}unparkAssetSpace(e,t){let n=this.assertSafeVaultTarget(e,t,"unparkAssetSpace"),i=(0,as.parkedPathFor)(t),s=this.assertSafeVaultTarget(e,i,"unparkAssetSpace",{requireAssetspacesRoot:!1});if(!(0,pt.existsSync)(s))throw new Error(`unparkAssetSpace: nothing parked at "${i}" for "${t}"`);if((0,pt.existsSync)(n))throw new Error(`unparkAssetSpace: refusing to unpark onto existing mount "${t}"`);(0,pt.mkdirSync)((0,an.dirname)(n),{recursive:!0}),(0,pt.renameSync)(s,n)}assertSafeVaultTarget(e,t,n,i={}){let s=i.requireAssetspacesRoot??!0,o=t.split("/");if(t.length===0||s&&!t.startsWith("assetspaces/")||o.some(u=>u.length===0||u==="."||u===".."))throw new Error(`${n}: refusing unsafe submodulePath "${t}"`);let c=(0,an.resolve)(e),l=(0,an.resolve)(c,t);if(l===c||!l.startsWith(c+an.sep))throw new Error(`${n}: target "${l}" escapes vault root "${c}"`);return l}};function hye(r){let e=(0,Nr.derivePath)(r);return e===null?r:(0,Nr.deriveUrl)(e)??r}a(hye,"toHttpsGitHubUrl");var mye=new Set(["node_modules",".obsidian",".exocortex",".git"]),Hd=class{static{a(this,"CliApplyProfileService")}constructor(e){this.vaultPath=e.vaultPath,this.mount=e.mount??new Oi,this.ref=e.ref??"main"}scanVault(){let e=[],t=new Map,n=new Set,i=[this.vaultPath];for(;i.length>0;){let s=i.pop(),o;try{o=(0,Bc.readdirSync)(s,{withFileTypes:!0})}catch{continue}for(let c of o){let l=(0,lu.join)(s,c.name);if(c.isDirectory()){if(c.name.startsWith(".")||mye.has(c.name))continue;i.push(l);continue}if(!c.isFile()||!c.name.endsWith(".md"))continue;let u=this.readFrontmatter(l);if(u===null)continue;let f=u.exo__Asset_uid;if(typeof f!="string"||f.length===0)continue;let d=ja(u.exo__Instance_class);if(d.includes(Xm)){if(n.has(f))continue;let h=(typeof u.exo__AssetSpace_source=="string"?u.exo__AssetSpace_source:"")||(typeof u.exo__AssetSpace_git=="string"?u.exo__AssetSpace_git:"");if(h.length===0)continue;let m=(0,Nr.derivePath)(h);if(m===null)continue;let y=typeof u.exo__AssetSpace_namespace=="string"?u.exo__AssetSpace_namespace:"",_=y||yye(m)||f.slice(0,8),b=u.exo__AssetSpace_dependsOnKind,T=typeof b=="string"?b:Array.isArray(b)&&typeof b[0]=="string"?b[0]:void 0;n.add(f),e.push({uid:f,git:h,folderName:m,label:_,namespace:y,dependsOnKind:T})}if(d.includes(OO)){let p=u.exo__Asset_label;typeof p=="string"&&p.length>0&&t.set(f,p)}}}return{infos:e,profileLabels:t}}assertTsFloor(e,t){(0,Nr.assertTsFloorReconciled)(e,t,Nr.SDK_FLOOR)}buildDiff(e){let{targetProfileUid:t,targetProfileLabel:n,sourceProfileUid:i,sourceProfileLabel:s,result:o,infos:c}=e,l=new Map;for(let S of c)l.set(S.uid,S);let u=new Set(l.keys()),f=new Set,d=new Set;for(let S of o.declaredOntologies)if(u.has(S)){f.add(S);let R=l.get(S)?.namespace;R!==void 0&&R.length>0&&d.add(R)}this.assertTsFloor(f,d);let p=new Set([...o.effective,...f]),h=new Map;for(let S of c){let R=(0,Bc.existsSync)((0,lu.join)(this.vaultPath,S.folderName))?"active":(0,Bc.existsSync)((0,lu.join)(this.vaultPath,(0,Nr.parkedPathFor)(S.folderName)))?"parked":"absent";h.set(S.uid,R)}let m=new Set([...h].filter(([,S])=>S==="active").map(([S])=>S));for(let S of c)Nr.CATALOG_KEEP_NAMESPACES.has(S.namespace)&&m.has(S.uid)&&p.add(S.uid);let y=[],_=[],b=[];for(let S of c){let R=(0,Nr.classifyMountTransition)({state:h.get(S.uid)??"absent",inEffectiveSet:p.has(S.uid),dependsOnKind:S.dependsOnKind});switch(R){case"none":break;case"destroy":y.push({asUid:S.uid,folderName:S.folderName,label:S.label,files:this.enumerateFilesUnder(S.folderName)});break;case"park":_.push({asUid:S.uid,folderName:S.folderName,label:S.label,files:this.enumerateFilesUnder(S.folderName)});break;case"unpark":case"materialize":b.push({asUid:S.uid,folderName:S.folderName,httpsUrl:hye(S.git),label:S.label,source:R==="unpark"?"unpark":"pull"});break}}let T=new Map;for(let S of y)T.set(S.asUid,S.files);let I=new Set(b.filter(S=>S.source==="unpark").map(S=>S.asUid)),E={targetProfileUid:t,targetProfileLabel:n,sourceProfileUid:i,sourceProfileLabel:s,filesToDestroy:T,assetSpacesBeingTornDown:y.map(S=>({asUid:S.asUid,asLabel:S.label,fileCount:S.files.length})),assetSpacesBeingParked:_.map(S=>({asUid:S.asUid,asLabel:S.label,fileCount:S.files.length})),assetSpacesBeingMaterialized:b.map(S=>({asUid:S.asUid,asLabel:S.label})),assetSpacesBeingUnparked:b.filter(S=>I.has(S.asUid)).map(S=>({asUid:S.asUid,asLabel:S.label}))};return{toDestroy:y,toPark:_,toMaterialize:b,plan:E}}async execute(e){let t=[],n=[],i=[];for(let s of e.toDestroy)this.mount.unmountAssetSpace(this.vaultPath,s.folderName),t.push(s.asUid);for(let s of e.toPark)this.mount.parkAssetSpace(this.vaultPath,s.folderName),n.push(s.asUid);for(let s of e.toMaterialize){if(s.source==="unpark")this.mount.unparkAssetSpace(this.vaultPath,s.folderName);else{let o=(0,lu.join)(this.vaultPath,s.folderName);await this.mount.pullAssetSpace(s.httpsUrl,this.ref,o)}this.mount.ensureGitmodulesEntry(this.vaultPath,s.folderName,s.httpsUrl),i.push(s.asUid)}return{destroyed:t,parked:n,materialized:i}}enumerateFilesUnder(e){let t=[],i=[(0,lu.join)(this.vaultPath,e)];for(;i.length>0;){let s=i.pop(),o;try{o=(0,Bc.readdirSync)(s,{withFileTypes:!0})}catch{continue}for(let c of o){let l=(0,lu.join)(s,c.name);if(c.isDirectory()){if(c.name.startsWith("."))continue;i.push(l);continue}c.isFile()&&t.push(gye(l,this.vaultPath))}}return t}readFrontmatter(e){let t;try{t=(0,Bc.readFileSync)(e,"utf-8")}catch{return null}if(!t.startsWith("---"))return null;let n=t.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(n===null)return null;try{let i=(0,Nr.parseYamlFrontmatterTolerant)(n[1],e);return i&&typeof i=="object"&&!Array.isArray(i)?i:null}catch{return null}}};function gye(r,e){let t=e.endsWith("/")?e:e+"/";return(r.startsWith(t)?r.slice(t.length):r).split("\\").join("/")}a(gye,"relativeVaultPath");function yye(r){let e=r.split("/").filter(t=>t.length>0);return e.length>0?e[e.length-1]:""}a(yye,"lastSegment");ct();var qr=require("node:fs"),a7=require("node:crypto"),c7=require("node:child_process"),l7=require("node:util"),Wr=J(require("node:path"));hm();var it=J(We());ct();var Po=require("node:fs"),n7=require("node:crypto"),qi=J(require("node:path"));hm();var Vn=J(We());Bi();var r7=require("node:child_process"),Dw=J(We());var _ye=6e4,Oo=class r{static{a(this,"RestPushService")}static{this.PAT_REGEX=/(?:gh[pousr]_[A-Za-z0-9_]{36,}|github_pat_[A-Za-z0-9_]{22,}_[A-Za-z0-9_]{59,})/g}constructor(e={}){this.fetchImpl=e.fetchImpl??globalThis.fetch,this.token=e.token??"",this.apiBase=(e.apiBase??"https://api.github.com").replace(/\/$/,"")}static resolveGhToken(e){let t=e??(()=>(0,r7.execFileSync)("gh",["auth","token"],{encoding:"utf8",timeout:15e3})),n;try{n=t()}catch(s){let o=s instanceof Error?s.message:String(s);throw new Error(`RestPushService: \`gh auth token\` failed \u2014 is GitHub CLI installed and authenticated? (run \`gh auth login\`). Underlying: ${o}`.replace(r.PAT_REGEX,"***REDACTED***"))}let i=n.trim();if(i.length===0)throw new Error("RestPushService: `gh auth token` returned empty output \u2014 not authenticated. Run `gh auth login`.");return i}redact(e){return(typeof e=="string"?e:String(e)).replace(r.PAT_REGEX,"***REDACTED***")}async push(e,t,n,i,s){return(0,Dw.restCreateCommit)(this.buildTransport(),{owner:e,repo:t,branch:n,files:i,message:s,baseURL:this.apiBase,redact:a(o=>this.redact(o),"redact")})}transport(){return this.buildTransport()}buildTransport(){let e=this.token,t=this.fetchImpl,n=a(i=>this.redact(i),"redact");return async i=>{let s={Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"exocortex-cli"};e.length>0&&(s.Authorization=`Bearer ${e}`),i.contentType&&(s["Content-Type"]=i.contentType);let o;try{o=await t(i.url,{method:i.method,headers:s,body:i.body,signal:AbortSignal.timeout(_ye)})}catch(u){throw new Error(n(`GitHub request failed: ${bye(u)}`))}let c=await o.text().catch(()=>"");if(o.status<200||o.status>=300){let u=a(f=>o.headers?.get?.(f)??void 0,"get");throw(0,Dw.enrichRateLimitError)(new Error(Sye(n(`GitHub request ${i.method} ${i.url} \u2192 HTTP ${o.status}: ${c}`),512)),u)}let l;try{l=c.length>0?JSON.parse(c):void 0}catch{l=void 0}return{status:o.status,json:l,text:c}}}};function bye(r){if(r instanceof Error)return r.message;if(typeof r=="string")return r;try{return JSON.stringify(r)}catch{return String(r)}}a(bye,"errMsg");function Sye(r,e){return r.length>e?r.slice(0,e)+"...":r}a(Sye,"truncate");Pt();var wye=a(async r=>{let e=await n7.webcrypto.subtle.digest("SHA-1",r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength));return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")},"nodeSha1"),Eye={parse:a(r=>gd(r,{schema:Xl}),"parse"),stringify:a(r=>yd(r,{schema:Xl,lineWidth:-1}),"stringify")};function vye(r,e){if(r.tokenFromGh===!0)return Oo.resolveGhToken(e.ghTokenRunner);let t=e.env??process.env,n=r.token||t.GITHUB_TOKEN||t.GH_TOKEN||"";if(n.length===0)throw new Error("A GitHub token is required (private sync units read as 404 without one). Use --token-from-gh, --token <pat>, or set GITHUB_TOKEN / GH_TOKEN.");return n}a(vye,"resolveToken");function Tye(r){let e=a(n=>qi.join(r,n),"abs"),t=a(async(n,i)=>{let s;try{s=await Po.promises.readdir(n,{withFileTypes:!0})}catch{return}for(let o of s){let c=qi.join(n,o.name);if(o.isDirectory()){if(o.name===".git")continue;await t(c,i)}else o.isFile()&&i.push(qi.relative(r,c).split(qi.sep).join("/"))}},"walk");return{async list(){let n=[];return(0,Po.existsSync)(r)&&await t(r,n),n},read:a(n=>Po.promises.readFile(e(n),"utf-8"),"read"),async readBinary(n){return new Uint8Array(await Po.promises.readFile(e(n)))},async write(){throw new Error("exosync-parity is read-only \u2014 write refused")},async delete(){throw new Error("exosync-parity is read-only \u2014 delete refused")}}}a(Tye,"nodeLocalFilesPort");function Aye(r,e){let t;try{t=(0,Vn.parkedPathFor)(e)}catch{return!1}return(0,Po.existsSync)(qi.join(r,t))}a(Aye,"isParked");function zd(r){let e=new $t(r),t=new Vn.SpaceSpecAccumulator,n=[];for(let i of e.getAllFiles()){let s=e.getFrontmatter(i);if(!s)continue;let o=(0,Vn.classifySpaceDeclaration)(s,i.path);if(o.kind==="not-space"||(o.warning!==void 0&&t.warnings.push(o.warning),o.kind==="skip"))continue;let c=t.offer(o.candidate);if(c!==null){if(!(0,Po.existsSync)(qi.join(r,c.localPath))){Aye(r,c.localPath)&&n.push(c);continue}t.commit(o.candidate)}}return{specs:t.specs,parked:n,warnings:t.warnings}}a(zd,"collectVaultSpecs");function Iye(r,e){for(let t of r.repos){let n=t.headSha!==void 0?` @${t.headSha.slice(0,7)}`:"";e(`${t.repoKey}${n}: ${t.status} \u2014 ${t.inParity}/${t.filesChecked} in parity, M2 diffs ${t.m2SemanticDiffs}, accounted ${t.accountedCount}, M1 violations ${t.m1Violations.length}${t.attachmentHashSetIdentical!==void 0?`, attachment hash-set ${t.attachmentHashSetIdentical?"identical":"DIFFERS"}`:""}`),t.detail!==void 0&&e(` ${t.detail}`);for(let i of t.warnings)e(` warn: ${i}`);for(let i of t.discrepancies)e(` ${i.cls}: ${i.path}${i.detail!==void 0?` (${i.detail})`:""}`);for(let i of t.m1Violations)e(` M1 VIOLATION: ${i.path} \u2014 ${i.detail}`)}e((0,Vn.summarizeParityRound)(r))}a(Iye,"printHumanReport");function Rye(r,e){if(r.length!==0){e(`Parked AssetSpaces (frozen on this device, not synced): ${r.length}`);for(let t of r){let n=t.lastSyncedSha!==null?t.lastSyncedSha.slice(0,7):"never",i=t.remoteHeadSha!==null?t.remoteHeadSha.slice(0,7):"unread";switch(t.freshness){case"behind":e(` ${t.repoKey}: BEHIND \u2014 parked at ${n}, remote head is ${i}`);break;case"current":e(` ${t.repoKey}: current \u2014 parked at ${n}, matches the remote head`);break;case"unknown":e(` ${t.repoKey}: unknown \u2014 ${t.reason??"no verdict"}`);break}}}}a(Rye,"printParkedSection");async function Cye(r,e={}){let t=e.out??(_=>console.log(_)),n=qi.resolve(r.vault);if(!(0,Po.existsSync)(n))throw new Error(`Vault path does not exist: ${n}`);let i=vye(r,e),s=new Oo({token:i,...r.apiBase!==void 0?{apiBase:r.apiBase}:{}}),o=e.transportFactory?.(i,r.apiBase)??s.transport(),{specs:c,parked:l,warnings:u}=zd(n);for(let _ of u)t(`warn: ${_}`);let f=r.configDir??".obsidian",d=qi.join(n,f,"plugins","exocortex",Vn.WATERMARK_STORE_FILENAME),p=new Vn.FileWatermarkStore({read:a(async()=>{try{return await Po.promises.readFile(d,"utf-8")}catch{return null}},"read"),writeAtomic:a(async()=>{throw new Error("exosync-parity: watermark access is read-only by contract")},"writeAtomic")}),h=[];for(let _ of l)h.push(await(0,Vn.checkParkedStaleness)(_,{transport:o,watermarks:{get:a(b=>p.get(b),"get")},redact:a(b=>s.redact(b),"redact"),...r.apiBase!==void 0?{baseURL:r.apiBase}:{}}));if(r.json!==!0&&Rye(h,t),c.length===0)return r.json===!0&&h.length>0&&t(JSON.stringify({parked:h},null,2)),t("Nothing to check \u2014 no materialized AssetSpaces with a GitHub source found in this vault."),2;let m=new Vn.ParityValidator({transport:o,sha1:wye,localFilesFor:a(_=>Tye(qi.join(n,_.localPath)),"localFilesFor"),watermarks:{get:a(_=>p.get(_),"get")},yaml:Eye,redact:a(_=>s.redact(_),"redact"),...r.apiBase!==void 0?{baseURL:r.apiBase}:{}});t(`ExoSync parity check: ${c.length} repo(s), vault ${n}`);let y=await m.runRound(c,{trigger:"standalone"});return r.json===!0?t(JSON.stringify({...y,parked:h},null,2)):Iye(y,t),y.vacuous?2:y.ok?0:1}a(Cye,"runExosyncParity");function i7(){return new fe("exosync-parity").description("ExoSync M1/M2 parity report: compare materialized sync units against their remote heads (read-only; RFC 4e4dc453 Phase E)").requiredOption("--vault <path>","Vault root path").option("--config-dir <name>","Obsidian config dir name (watermark location)",".obsidian").option("--json","Print the full round record as JSON").option("--token <pat>","GitHub PAT (or env GITHUB_TOKEN / GH_TOKEN). Prefer --token-from-gh.").option("--token-from-gh","Resolve the PAT via `gh auth token`").option("--api-base <url>","GitHub API base (testing)").action(async r=>{try{process.exitCode=await Cye(r)}catch(e){se.handle(e,{command:"exosync-parity"}),process.exitCode=1}})}a(i7,"exosyncParityCommand");ct();var Wi=require("node:fs"),FO=require("node:crypto"),Pi=J(require("node:path")),kr=J(We());Pt();var xye="exosync-watermarks.local.json";function s7(r,e,t){let n=NO(e,t),i=new Oo({token:n,...e.apiBase!==void 0?{apiBase:e.apiBase}:{}}),s=t.transportFactory?.(n,e.apiBase)??i.transport(),{specs:o,warnings:c}=zd(r),l=e.configDir??".obsidian",u=Pi.join(r,l,"plugins","exocortex",xye),f=Pi.join(r,l,"plugins","exocortex",kr.CONFLICT_CACHE_STORE_FILENAME),d=new kr.LocalConflictCacheStore({io:$a(f)}),p=Pi.join(r,l,"plugins","exocortex",kr.OUTBOX_STORE_FILENAME),h=new kr.LocalOutboxStore({io:$a(p)});return{resolver:new kr.QuarantineResolver({transport:s,watermarkStore:new kr.FileWatermarkStore($a(u)),localFilesFor:a(y=>Lw(Pi.join(r,y.localPath)),"localFilesFor"),sha1:LO,...e.apiBase!==void 0?{baseURL:e.apiBase}:{},redact:a(y=>i.redact(y),"redact"),conflictCache:d,outbox:h}),specs:o,warnings:c}}a(s7,"buildResolver");async function Oye(r,e={}){let t=e.out??(l=>console.log(l)),n=Pi.resolve(r.vault);if(!(0,Wi.existsSync)(n))throw new Error(`Vault path does not exist: ${n}`);let{resolver:i,specs:s,warnings:o}=s7(n,r,e);for(let l of o)t(`warn: ${l}`);if(s.length===0)return t("No materialized AssetSpaces with a GitHub source found in this vault."),0;let c=await i.listOpenConflicts(s);if(r.json===!0)return t(JSON.stringify(c,null,2)),0;if(c.length===0)return t("No open conflicts \u2014 nothing to resolve. \u2705"),0;t(`${c.length} open conflict(s):`);for(let l of c){let u=`${l.hasLocal?"local":"(no local)"} vs ${l.hasRemote?"remote":"(no remote)"}`;t(` ${l.repoKey} ${l.path} [${u}]${l.uid?` uid=${l.uid}`:""}`)}return t(""),t("Resolve with: exosync quarantine resolve <path> --take local|remote|file <path> --vault <vault>"),0}a(Oye,"runQuarantineList");async function Pye(r,e,t={}){let n=t.out??(_=>console.log(_)),i=Pi.resolve(e.vault);if(!(0,Wi.existsSync)(i))throw new Error(`Vault path does not exist: ${i}`);let s=(e.take??"").trim();if(s!=="local"&&s!=="remote"&&s!=="file")throw new Error("resolve requires --take local | remote | file (with --file <path> for the merged content)");let o;if(s==="file"){if(e.file===void 0||e.file.length===0)throw new Error("--take file requires --file <path> to the merged content");o={take:"merged",content:await Wi.promises.readFile(Pi.resolve(e.file),"utf-8")}}else o={take:s};let{resolver:c,specs:l,warnings:u}=s7(i,e,t);for(let _ of u)n(`warn: ${_}`);let d=(await c.listOpenConflicts(l)).filter(_=>_.path===r&&(e.repo===void 0||_.repoKey===e.repo));if(d.length===0)return n(`No open conflict for "${r}"${e.repo?` in ${e.repo}`:""} \u2014 run \`exosync quarantine list\` to see the current set.`),1;if(d.length>1){n(`"${r}" conflicts in ${d.length} repos \u2014 disambiguate with --repo <repoKey>:`);for(let _ of d)n(` --repo ${_.repoKey}`);return 1}let p=d[0],h=l.find(_=>_.repoKey===p.repoKey),m=await c.resolve(h,p.path,o),y=m.awaitingPush===!0?" \u2014 awaiting push (run `exosync sync` to push it)":m.pushedSha!==void 0?` \u2014 pushed @${m.pushedSha.slice(0,7)}`:" \u2014 remote already matched";return n(`Resolved ${p.path} (${m.resolvedTo}) in ${p.repoKey}${y}.`),m.discardedLocalBackupPath!==void 0&&n(` \u21B3 your discarded local version is preserved at ${h.localPath}/${m.discardedLocalBackupPath}`),0}a(Pye,"runQuarantineResolve");function DO(r){return r.replace(/\r\n?/g,`
636
- `).replace(/\n+$/,"")}a(DO,"normalizeForCompare");function Fye(r,e,t){let n=[...e].sort((o,c)=>o.path.localeCompare(c.path)),i=[],s=[];for(let o of n){let c=DO(o.content),l=i.find(u=>u.norm===c);if(l!==void 0){s.push({action:"delete",path:o.path,identicalTo:l.path});continue}i.push({path:o.path,norm:c}),i.length===1?s.push({action:"keep",path:o.path,uid:r}):s.push({action:"reuuid",path:o.path,fromUid:r,toUid:t()})}return s}a(Fye,"planDedupGroup");async function Dye(r,e={}){let t=e.out??(f=>console.log(f)),n=Pi.resolve(r.vault);if(!(0,Wi.existsSync)(n))throw new Error(`Vault path does not exist: ${n}`);let{specs:i,warnings:s}=zd(n);for(let f of s)t(`warn: ${f}`);let o=[];for(let f of i){let d=Pi.join(n,f.localPath);if(!(0,Wi.existsSync)(d))continue;let p=Lw(d);for(let h of await p.list())if(h.endsWith(".md"))try{o.push({path:Pi.join(d,h),content:await p.read(h)})}catch{continue}}let c=(0,kr.findDuplicateUidGroups)(o).map(f=>[f.uid,[...f.paths]]);if(c.length===0)return t("No duplicate uids on disk. \u2705"),0;let l=a(f=>Pi.relative(n,f),"rel");if(r.auto===!0){let f=[];for(let[_,b]of c){let T=[],I=new Map;for(let E of b){let S=await Wi.promises.readFile(E,"utf-8");T.push({path:E,content:S}),I.set(E,S)}f.push({uid:_,decisions:Fye(_,T,FO.randomUUID),snap:I})}let d=0,p=0;t(`${c.length} duplicate uid(s) on disk \u2014 zero-loss plan:`);for(let{uid:_,decisions:b}of f){t(` ${_}:`);for(let T of b)T.action==="keep"?t(` KEEP ${l(T.path)} (keeps uid ${_})`):T.action==="reuuid"?(p++,t(` RE-UUID ${l(T.path)} (content differs \u2192 fresh uid; both survive, zero-loss)`)):(d++,t(` DELETE ${l(T.path)} (identical content \u2192 ${l(T.identicalTo)}; zero-loss)`))}if(r.apply!==!0)return t(""),t(`Plan: delete ${d} identical copy(ies), re-uuid ${p} differing variant(s).`),t("DRY-RUN \u2014 nothing changed. Re-run with `--auto --apply` to execute (a deleted copy's content always survives in the kept file; if previously synced it is also recoverable from the git remote)."),1;let h=0,m=0,y=0;for(let{decisions:_,snap:b}of f){for(let T of _){if(T.action!=="delete")continue;let I;try{I=await Wi.promises.readFile(T.path,"utf-8")}catch{continue}if(DO(I)!==DO(b.get(T.path)??"")){t(` ! skipped delete ${l(T.path)} (changed since scan \u2014 re-run dedup-uids)`),y++;continue}await Wi.promises.rm(T.path,{force:!0}),t(` deleted ${l(T.path)} (identical to ${l(T.identicalTo)})`),h++}for(let T of _){if(T.action!=="reuuid")continue;let I;try{I=await Wi.promises.readFile(T.path,"utf-8")}catch{continue}if((0,kr.extractAssetUid)(I)!==T.fromUid){t(` ! skipped re-uuid ${l(T.path)} (uid changed since scan \u2014 re-run dedup-uids)`),y++;continue}let E=(0,kr.rewriteAssetUid)(I,T.toUid);E!==I&&(await Wi.promises.writeFile(T.path,E,"utf-8"),t(` re-uuid ${l(T.path)} \u2192 uid=${T.toUid} (content differs from kept copy)`),m++)}}return t(`Resolved: deleted ${h} identical copy(ies), re-uuid ${m} differing variant(s).${y>0?` ${y} skipped (re-run).`:""} Run \`exosync sync\` to propagate.`),y>0?1:0}r.apply===!0&&t("Note: --apply only applies with --auto; running in report mode."),t(`${c.length} duplicate uid(s) on disk:`);for(let[f,d]of c){t(` ${f} \u2014 ${d.length} files:`);for(let p of d)t(` ${l(p)}`)}if(r.fix!==!0)return t(""),t("Re-run with --fix to assign a fresh uuid to every duplicate but the first (frontmatter rewrite only \u2014 never renames the file)."),1;let u=0;for(let f of(0,kr.planDuplicateUidFix)(o,FO.randomUUID))await Wi.promises.writeFile(f.path,f.content,"utf-8"),t(` fixed ${l(f.path)} \u2192 uid=${f.toUid}`),u++;return t(`Reassigned ${u} uid(s). Run \`exosync sync\` to propagate.`),0}a(Dye,"runDedupUids");function PO(r){return r.requiredOption("--vault <path>","Vault root path").option("--config-dir <name>","Obsidian config dir name (watermark location)",".obsidian").option("--token <pat>","GitHub PAT (or env GITHUB_TOKEN / GH_TOKEN). Prefer --token-from-gh.").option("--token-from-gh","Resolve the PAT via `gh auth token`").option("--json","Machine-readable output").option("--api-base <url>","GitHub API base (testing)")}a(PO,"withQuarantineOptions");function o7(r){let e=new fe("quarantine").description("Inspect and resolve ExoSync conflicts (quarantine resolver; RFC 4e4dc453, finding a0a3d1d6)");PO(e.command("list").description("List open conflicts that need a manual choice")).action(async t=>{try{process.exitCode=await Oye(t)}catch(n){se.handle(n,{command:"exosync quarantine list"}),process.exitCode=1}}),PO(e.command("resolve <path>").description("Resolve one conflict: --take local | remote | file <path> (merged)").option("--take <choice>","local | remote | file").option("--file <path>","Merged content file (with --take file)").option("--repo <repoKey>","Disambiguate a cross-repo path collision")).action(async(t,n)=>{try{process.exitCode=await Pye(t,n)}catch(i){se.handle(i,{command:"exosync quarantine resolve"}),process.exitCode=1}}),r.addCommand(e),PO(r.command("dedup-uids").description("Report duplicate exo__Asset_uid on disk (#3477); --fix re-uuids all but the first; --auto zero-loss auto-resolve (identical\u2192delete, differing\u2192re-uuid; dry-run unless --apply)").option("--fix","Assign a fresh uuid to every duplicate but the first").option("--auto","Zero-loss auto-resolve: delete identical copies, re-uuid distinct variants (DRY-RUN unless --apply). Supersedes --fix.").option("--apply","Execute the --auto plan (without it --auto is a dry-run; a deleted copy's content always survives in the kept file, and if previously synced is recoverable from the git remote)")).action(async t=>{try{process.exitCode=await Dye(t)}catch(n){se.handle(n,{command:"exosync dedup-uids"}),process.exitCode=1}})}a(o7,"registerQuarantineCommands");Pt();var LO=a(async r=>{let e=await a7.webcrypto.subtle.digest("SHA-1",r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength));return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")},"nodeSha1"),Lye={parse:a(r=>gd(r,{schema:Xl}),"parse"),stringify:a(r=>yd(r,{schema:Xl,lineWidth:-1}),"stringify")};function NO(r,e){if(r.tokenFromGh===!0)return Oo.resolveGhToken(e.ghTokenRunner);let t=e.env??process.env,n=r.token||t.GITHUB_TOKEN||t.GH_TOKEN||"";if(n.length===0)throw new Error("A GitHub token is required (private sync units read as 404 and push needs write scope). Use --token-from-gh, --token <pat>, or set GITHUB_TOKEN / GH_TOKEN.");return n}a(NO,"resolveToken");function Lw(r){let e=a(i=>Wr.join(r,i),"abs"),t=a(async(i,s)=>{let o;try{o=await qr.promises.readdir(i,{withFileTypes:!0})}catch{return}for(let c of o){let l=Wr.join(i,c.name);if(c.isDirectory()){if(c.name===".git")continue;await t(l,s)}else c.isFile()&&s.push(Wr.relative(r,l).split(Wr.sep).join("/"))}},"walk"),n=a(async(i,s)=>{let o=Wr.dirname(i);await qr.promises.mkdir(o,{recursive:!0});let c=`${i}.local.tmp`;await s(c),await qr.promises.rename(c,i)},"writeAtomic");return{async list(){let i=[];return(0,qr.existsSync)(r)&&await t(r,i),i},read:a(i=>qr.promises.readFile(e(i),"utf-8"),"read"),async write(i,s){await n(e(i),o=>qr.promises.writeFile(o,s,"utf-8"))},async delete(i){await qr.promises.rm(e(i),{force:!0})},async readBinary(i){return new Uint8Array(await qr.promises.readFile(e(i)))},async writeBinary(i,s){let o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength);await n(e(i),c=>qr.promises.writeFile(c,Buffer.from(o)))},async stat(i){try{let s=await qr.promises.stat(e(i));return{mtimeMs:s.mtimeMs,size:s.size}}catch{return null}}}}a(Lw,"nodeLocalFilesPort");function $a(r){return{async read(){try{return await qr.promises.readFile(r,"utf-8")}catch{return null}},async writeAtomic(e){await qr.promises.mkdir(Wr.dirname(r),{recursive:!0});let t=`${r}.local.tmp`;await qr.promises.writeFile(t,e,"utf-8"),await qr.promises.rename(t,r)}}}a($a,"nodeWatermarkFileIO");function uu(r,e=".obsidian"){let t=Wr.join(r,e,"plugins","exocortex",it.MOUNT_BASE_STORE_FILENAME);return new it.FileMountBaseStore($a(t))}a(uu,"nodeMountBaseStore");var Nye=(0,l7.promisify)(c7.execFile);function kye(r){return async e=>{if(e.localPath.length===0||e.localPath.startsWith("-"))return null;try{let{stdout:t}=await Nye("git",["-C",r,"submodule","status",e.localPath],{timeout:3e4,maxBuffer:4194304}),n=t.match(/^[ +\-U]?([0-9a-f]{40})\b/m);return n?n[1]:null}catch{return null}}}a(kye,"nodeLocalBaseShaProvider");function Mye(r){return{async check(e){let t=Wr.join(r,e.localPath);if(!(0,qr.existsSync)(t))return{fullyMaterialized:!1,reason:`mount folder ${e.localPath} does not exist`};let n=0;try{n=(await qr.promises.readdir(t)).length}catch{return{fullyMaterialized:!1,reason:`mount folder ${e.localPath} is not readable`}}return n===0&&e.spaceKind!=="file"?{fullyMaterialized:!1,reason:`mount folder ${e.localPath} is empty (mid-mount?)`}:{fullyMaterialized:!0}}}}a(Mye,"nodeMaterializationCheck");function jye(r,e){let t=r.pushedSha!==void 0?` \u2192@${r.pushedSha.slice(0,7)}`:"",n=(r.outboxPushedCount??0)>0?`, pushed ${r.outboxPushedCount} resolved`:"",i=(r.outboxReconflictedCount??0)>0?`, ${r.outboxReconflictedCount} re-conflicted (remote moved)`:"";e(`${r.repoKey}${t}: ${r.status} \u2014 pulled ${r.pulledCount}, pushed ${r.pushedCount}, merged ${r.mergedCount}, quarantined ${r.quarantinedCount}${(r.pushedDeletes?.length??0)>0?`, deleted ${r.pushedDeletes.length}`:""}${n}${i}`),r.detail!==void 0&&e(` ${r.detail}`);for(let s of r.warnings)e(` warn: ${s}`);(r.quarantinedPaths?.length??0)>0&&e(` quarantined (\u2192 exosync quarantine resolve): ${r.quarantinedPaths.join(", ")}`),(r.deferredPaths?.length??0)>0&&e(` deferred (\u2192 full sync): ${r.deferredPaths.join(", ")}`),(r.deferredDeletes?.length??0)>0&&e(` deferred deletes: ${r.deferredDeletes.join(", ")}`),r.timings!==void 0&&(0,it.totalMs)(r.timings)>0&&e(` ${(0,it.formatRepoTimings)(r.repoKey,r.timings)}`)}a(jye,"printRepoResult");function $ye(r){return r==="conflict"||r==="full-conflict"||r==="retry-exhausted"||r==="busy"||r==="auth-required"||r==="error"}a($ye,"isFailureStatus");async function Uye(r,e,t={}){let n=t.out??(R=>console.log(R)),i=Wr.resolve(e.vault);if(!(0,qr.existsSync)(i))throw new Error(`Vault path does not exist: ${i}`);let s=NO(e,t),o=new Oo({token:s,...e.apiBase!==void 0?{apiBase:e.apiBase}:{}}),c=t.transportFactory?.(s,e.apiBase)??o.transport(),{specs:l,warnings:u}=zd(i);for(let R of u)n(`warn: ${R}`);if(l.length===0)return n("Nothing to sync \u2014 no materialized AssetSpaces with a GitHub source found in this vault."),2;let f=e.configDir??".obsidian",d=Wr.join(i,f,"plugins","exocortex",it.WATERMARK_STORE_FILENAME),p=Wr.join(i,f,"plugins","exocortex",it.LOCAL_MANIFEST_STORE_FILENAME),h=Wr.join(i,f,"plugins","exocortex",it.CONFLICT_CACHE_STORE_FILENAME),m=new it.LocalConflictCacheStore({io:$a(h)}),y=Wr.join(i,f,"plugins","exocortex",it.OUTBOX_STORE_FILENAME),_=new it.LocalOutboxStore({io:$a(y)}),b=m,T=new it.SyncEngine({transport:c,watermarkStore:new it.FileWatermarkStore($a(d)),localManifestStore:new it.FileLocalManifestStore($a(p)),mountBaseStore:uu(i,f),localBaseShaProvider:kye(i),materializationCheck:Mye(i),localFilesFor:a(R=>Lw(Wr.join(i,R.localPath)),"localFilesFor"),sha1:LO,redact:a(R=>o.redact(R),"redact"),commitMessage:a((R,D,P=0)=>`exosync: ${D} change(s)${P>0?`, ${P} deletion(s)`:""} (CLI)`,"commitMessage"),mergeLayer:new it.GatedStructuredMerger(new it.StructuredMerger(Lye)),quarantine:b,outbox:_,...e.apiBase!==void 0?{baseURL:e.apiBase}:{}});n(`ExoSync ${r}: ${l.length} repo(s), vault ${i}`);let I=(0,it.orderChildrenFirst)(l),E=e.json===!0?void 0:R=>{n(`[ExoSync] ${R.repoKey}: ${(0,it.syncProgressPhaseText)(R)}`)},S=await T.syncAll(I,r,E);if(e.json===!0)n(JSON.stringify(S,null,2));else{for(let P of S)jye(P,n);let R=S.reduce((P,M)=>({pulled:P.pulled+M.pulledCount,pushed:P.pushed+M.pushedCount,merged:P.merged+M.mergedCount,quarantined:P.quarantined+M.quarantinedCount}),{pulled:0,pushed:0,merged:0,quarantined:0});n(`Summary: ${S.length} repo(s) \u2014 pulled ${R.pulled}, pushed ${R.pushed}, merged ${R.merged}, quarantined ${R.quarantined}`);let D=(0,it.aggregateTimings)(S);(0,it.totalMs)(D)>0&&n((0,it.formatTimingsLine)(D))}return S.some(R=>$ye(R.status))?1:0}a(Uye,"runExosyncSync");function kO(r){return r.requiredOption("--vault <path>","Vault root path").option("--config-dir <name>","Obsidian config dir name (watermark location)",".obsidian").option("--token <pat>","GitHub PAT (or env GITHUB_TOKEN / GH_TOKEN). Prefer --token-from-gh.").option("--token-from-gh","Resolve the PAT via `gh auth token`").option("--json","Print the full per-repo result array as JSON").option("--api-base <url>","GitHub API base (testing)")}a(kO,"withSyncOptions");function MO(r){return async e=>{try{process.exitCode=await Uye(r,e)}catch(t){se.handle(t,{command:`exosync ${r}`}),process.exitCode=1}}}a(MO,"makeDirectionAction");function u7(){let r=new fe("exosync").description("ExoSync over the GitHub REST API: sync/pull/push the materialized AssetSpace set (CLI parity with the plugin; RFC 4e4dc453 Phase B). Read-only divergence check: `exosync-parity`.");return kO(r.command("sync").description("Full pull\u2192merge\u2192push cycle for every materialized repo")).action(MO("sync")),kO(r.command("pull").description("Apply remote changes only (nothing leaves the device; local changes re-derive)")).action(MO("pull")),kO(r.command("push").description("Send the local delta only (remote changes are pinned to re-derive on the next pull/sync)")).action(MO("push")),o7(r),r}a(u7,"exosyncCommand");var Bye=a(r=>{process.stderr.write(`${r}
637
- `)},"DEFAULT_LOG"),Nw=class{static{a(this,"HeadlessConfirmGate")}constructor(e){this.yes=e.yes,this.verbose=e.verbose??!1,this.log=e.log??Bye}async confirmApply(e){if(this.verbose){let t=Array.from(e.filesToDestroy.values()).reduce((n,i)=>n+i.length,0);if(this.log(`[apply-profile] Target: ${e.targetProfileLabel} (${e.targetProfileUid})`),this.log(`[apply-profile] Source: ${e.sourceProfileLabel}`),this.log(`[apply-profile] ${t} files to remove, ${e.assetSpacesBeingTornDown.length} AS to tear down, ${e.assetSpacesBeingMaterialized.length} AS to materialize`),e.assetSpacesBeingParked.length>0){let n=e.assetSpacesBeingParked.reduce((i,s)=>i+s.fileCount,0);this.log(`[apply-profile] ${n} files to park (moved to .exocortex/parked, NOT removed), ${e.assetSpacesBeingParked.length} AS to park`)}e.assetSpacesBeingUnparked.length>0&&this.log(`[apply-profile] ${e.assetSpacesBeingUnparked.length} AS to unpark (restored from .exocortex/parked, no download)`)}return this.yes?!0:(this.log("[apply-profile] Refused: --yes flag required for headless mode (Decision #2 safety)."),!1)}};Pt();qt();mr();async function Vye(r,e,t={}){let n=[],i=[],s=t.out??(R=>process.stdout.write(`${R}
634
+ `}a(cye,"settingAsset");function JB(){return new fe("scaffold").description("Scaffold homoiconic configuration assets").addCommand(lye())}a(JB,"scaffoldCommand");function lye(){return new fe("validation-settings").description("Scaffold the 4 validation-check setting__Setting instances (uid-uniqueness=true, rest=false) co-located in the chosen ontology").requiredOption("--vault <path>","Vault root directory").requiredOption("--ontology <uid>","UID of the ontology whose folder the check settings are co-located in").option("--output <type>","Response format: text|json","text").action(async r=>{let e=r.output??"text";se.setFormat(e);try{let t=(0,cu.resolve)(r.vault);if(!(0,Cw.existsSync)(t)||!(0,Cw.statSync)(t).isDirectory())throw new Me(t);let s=(await new xi(t).indexedAssets()).find(u=>(0,xo.readUid)(u.metadata)===r.ontology);if(!s)throw new Error(`Ontology UID "${r.ontology}" not found in vault ${t} (its folder is where the check settings co-locate).`);let o=(0,cu.join)(t,(0,cu.dirname)(s.path)),c=new Date().toISOString().slice(0,19),l=[];for(let u of aye){let f=(0,XB.randomUUID)(),d=(0,cu.join)(o,`${f}.md`);await(0,QB.writeFile)(d,cye(f,r.ontology,u.checkId,u.label,u.value,c),"utf-8"),l.push(d)}if(e==="json")console.log(JSON.stringify({vaultPath:t,ontology:r.ontology,targetDir:o,created:l},null,2));else{console.log(`OK: scaffolded ${l.length} validation-check setting(s) in ${o}`);for(let u of l)console.log(` ${u}`);console.log(`
635
+ Defaults: uid-uniqueness=true, co-location/shacl/dag=false. Run 'exocortex validate vault --vault <path>'.`)}}catch(t){se.handle(t)}})}a(lye,"scaffoldValidationCommand");ct();var f7=require("fs"),d7=require("path");var xw=J(Ta()),Ow=J(require("path")),Uc=J(We()),Fw=J(We());var uye=Uc.SDK_FLOOR_ASSETSPACE_UIDS,Xm="73bd00e4-ccc0-4f3f-b20d-c4388c4588fb",OO="3de846cd-1f0e-4f98-8613-b8587aa15174",fye=5,Pw=class{static{a(this,"CliProfileResolver")}constructor(e){this.vaultPaths=[Ow.default.resolve(e.vaultPath)],this.maxExtendsDepth=e.maxExtendsDepth??fye,this.warn=e.warn??(()=>{})}async resolveFilter(e){if(e==null||e==="")return{outcome:"no-profile"};let t;try{t=await this.scanAllVaults()}catch(f){let d=`[CliProfileResolver] vault scan threw \u2014 ${String(f)}`;return this.warn(d),{outcome:"error",reason:d}}if(t.profiles.get(e)===void 0)return this.warn(`[CliProfileResolver] profileUid=${e} not found in any scanned vault \u2014 falling back to no-filter (full vault).`),{outcome:"missing-profile",profileUid:e};let i=new Set;try{this.walkProfileChain(e,t.profiles,i,new Set,0)}catch(f){let d=`[CliProfileResolver] profile chain walk threw \u2014 ${String(f)}`;return this.warn(d),{outcome:"error",reason:d}}let s=(0,Uc.transitiveDependsOnClosure)(i,t.dependsOn),o=new Set(t.folderMap.values()),c=new Set,l=[];for(let f of s){if(o.has(f)){c.add(f);continue}l.push(f)}for(let f of uye)c.add(f);if(!Array.from(c).some(f=>o.has(f))){let f=`[CliProfileResolver] profileUid=${e} produced effective set with zero AssetSpace folder overlap (${c.size} AS UIDs incl. floor; ${t.folderMap.size} folders known). Likely cause: profile declares AssetSpace UIDs not present as descriptors, or vault has no scanned AssetSpaces. Falling back to no-filter (full vault indexed).`;return this.warn(f),{outcome:"degraded",reason:f}}return{outcome:"engaged",result:{effective:c,folderMap:t.folderMap,declaredOntologies:s,untranslated:l}}}walkProfileChain(e,t,n,i,s){if(s>this.maxExtendsDepth)throw new Error(`Profile chain exceeds max depth ${this.maxExtendsDepth} at ${e} \u2014 possible cycle`);if(i.has(e))return;i.add(e);let o=t.get(e);if(o!==void 0){for(let c of o.includes)n.add(c);typeof o.extends=="string"&&o.extends.length>0&&this.walkProfileChain(o.extends,t,n,i,s+1)}}async scanAllVaults(){let e=new Map,t=new Map,n=new Map;for(let i of this.vaultPaths){if(!await xw.default.pathExists(i)){this.warn(`[CliProfileResolver] vault path does not exist: ${i} \u2014 skipping.`);continue}let s=await this.walkVault(i);for(let o of s){let c=ja(o.frontmatter.exo__Instance_class);if(c.some(l=>l===Xm)){let l=pye(o.filePath,o.vaultRoot);l.length>0&&!e.has(l)&&e.set(l,o.uid);let u=typeof o.frontmatter.exo__AssetSpace_source=="string"?o.frontmatter.exo__AssetSpace_source:typeof o.frontmatter.exo__AssetSpace_git=="string"?o.frontmatter.exo__AssetSpace_git:"";if(u.length>0){let d=(0,Uc.derivePath)(u);d!==null&&e.set(d,o.uid)}let f=ja(o.frontmatter.exo__AssetSpace_dependsOn);f.length>0&&n.set(o.uid,f)}if(c.some(l=>l===OO)){let l={uid:o.uid,label:typeof o.frontmatter.exo__Asset_label=="string"?o.frontmatter.exo__Asset_label:void 0,includes:ja(o.frontmatter.exo__Profile_includes),extends:ja(o.frontmatter.exo__Profile_imports)[0]??null};t.set(o.uid,l)}}}return{folderMap:e,profiles:t,dependsOn:n}}async walkVault(e){let t=[],n=[e];for(;n.length>0;){let i=n.pop(),s;try{s=await xw.default.readdir(i,{withFileTypes:!0})}catch{continue}for(let o of s){let c=Ow.default.join(i,o.name);if(o.isDirectory()){if(o.name.startsWith(".")||o.name==="node_modules"||o.name===".obsidian"||o.name===".exocortex")continue;n.push(c);continue}if(!o.isFile()||!o.name.endsWith(".md"))continue;let l=await this.tryReadFrontmatter(c);if(l===null)continue;let u=l.exo__Asset_uid;typeof u!="string"||u.length===0||t.push({uid:u,filePath:c,vaultRoot:e,frontmatter:l})}}return t}async tryReadFrontmatter(e){let t;try{t=await xw.default.readFile(e,"utf-8")}catch{return null}if(!t.startsWith("---"))return null;let n=t.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(n===null)return null;try{let i=(0,Uc.parseYamlFrontmatterTolerant)(n[1],e);return i&&typeof i=="object"&&!Array.isArray(i)?i:null}catch{return null}}};function ja(r){if(r==null)return[];let e=Array.isArray(r)?r:[r],t=[];for(let n of e){if(typeof n!="string")continue;let i=dye(n);i!==null&&t.push(i)}return t}a(ja,"parseWikilinkArray");function dye(r){let e=r.trim().replace(/^\[\[/,"").replace(/\]\]$/,"").split("|")[0].trim();return e.length===0?null:e}a(dye,"extractUidFromWikilink");function pye(r,e){let t=Ow.default.relative(e,r).replace(/\\/g,"/");if(!t.startsWith("assetspaces/"))return"";let n=t.slice(12),i=n.indexOf("/");return i<0?"":`assetspaces/${n.slice(0,i)}`}a(pye,"parentFolderRelative");var Bc=require("node:fs"),lu=require("node:path"),Nr=J(We());var pt=require("node:fs"),e7=require("node:fs/promises"),t7=require("node:os"),an=require("node:path"),as=J(We());var hye=/^https:\/\/github\.com\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_.-]+?)(?:\.git)?$/,ZB=50*1024*1024,Oi=class r{static{a(this,"BootstrapAssetSpaceService")}static{this.PAT_REGEX=/(?:gh[pousr]_[A-Za-z0-9_]{36,}|github_pat_[A-Za-z0-9_]{22,}_[A-Za-z0-9_]{59,})/g}constructor(e={}){this.fetchImpl=e.fetchImpl??globalThis.fetch,this.token=e.token??"",this.mountBaseStore=e.mountBaseStore}redact(e){return(typeof e=="string"?e:String(e)).replace(r.PAT_REGEX,"***REDACTED***")}static parseGitHubURL(e){let t=e.match(hye);if(t===null)throw new Error(`parseGitHubURL: invalid URL shape \u2014 expected https://github.com/<owner>/<repo>, got: ${e}`);return{owner:t[1],repo:t[2]}}static deriveFolderName(e){let{repo:t}=r.parseGitHubURL(e);return t.startsWith("exoas-")?t.slice(6):t}async pullAssetSpace(e,t,n){let{owner:i,repo:s}=r.parseGitHubURL(e);if((0,pt.existsSync)(n)&&(0,pt.readdirSync)(n).length>0)throw new Error(`pullAssetSpace: target ${n} exists \u0438 not empty \u2014 refusing \u043A overwrite`);let o=await(0,as.mountAssetSpaceFiles)({http:this.httpPort(),fs:this.fsPort(),owner:i,repo:s,ref:t,targetPath:n});if(this.mountBaseStore!==void 0)try{await this.mountBaseStore.set(`${i}/${s}#${as.SYNC_BRANCH}`,o.sha)}catch{}return o}httpPort(){let e=this.fetchImpl,t=this.token,n=a(i=>this.redact(i),"redact");return{async fetchTarball(i,s,o){let c=`https://api.github.com/repos/${i}/${s}/tarball/${o}`,l={signal:AbortSignal.timeout(6e4)};t.length>0&&(l.headers={Authorization:`Bearer ${t}`,"User-Agent":"exocortex-cli","X-GitHub-Api-Version":"2022-11-28"});let u;try{u=await e(c,l)}catch(d){throw new Error(n(`pullAssetSpace: fetch error for ${c}: ${d instanceof Error?d.message:String(d)}`))}if(!u.ok){if(u.status===403){let d=u.headers?.get?.("x-ratelimit-remaining"),p=u.headers?.get?.("x-ratelimit-reset");if(d==="0"||p!=null){let h=p!=null?new Date(Number(p)*1e3).toISOString():"unknown";throw new Error(`pullAssetSpace: GitHub anonymous API rate-limit exceeded (60 req/hour). Reset at ${h}. Wait or use authenticated CLI.`)}}if(u.status===404){let d=t.length>0?"repo not found, or the provided token lacks access to it":"if this is a private repo, pass --token <pat> (or set GITHUB_TOKEN / GH_TOKEN)";throw new Error(n(`pullAssetSpace: fetch failed (404 Not Found) for ${c} \u2014 ${d}`))}throw new Error(n(`pullAssetSpace: fetch failed (${u.status} ${u.statusText}) for ${c}`))}let f=await u.arrayBuffer();if(f.byteLength>ZB)throw new Error(`pullAssetSpace: tarball too large (${f.byteLength} bytes > ${ZB})`);return new Uint8Array(f)}}}fsPort(){return{async exists(e){return(0,pt.existsSync)(e)},async read(e){return(0,pt.readFileSync)(e,"utf8")},async write(e,t){(0,pt.writeFileSync)(e,t,{encoding:"utf8"})},async removeDir(e){(0,pt.rmSync)(e,{recursive:!0,force:!0})},async materialize(e,t,n){let i=await(0,e7.mkdtemp)((0,an.join)((0,t7.tmpdir)(),`exo-bootstrap-${(0,an.basename)(e)}-`)),s=0;try{for(let o of t){let c=o.relPath;if(c.split("/").some(u=>u===".."))throw new Error(`pullAssetSpace: path traversal detected for entry "${c}"`);let l=(0,an.resolve)(i,c);if(l!==i&&!l.startsWith(i+an.sep))throw new Error(`pullAssetSpace: zip-slip detected for entry "${c}"`);(0,pt.mkdirSync)((0,an.dirname)(l),{recursive:!0}),(0,pt.writeFileSync)(l,o.content),s++,n?.(s)}(0,pt.mkdirSync)((0,an.dirname)(e),{recursive:!0});try{(0,pt.renameSync)(i,e)}catch(o){if(o.code==="EXDEV"){let{cpSync:c}=await import("node:fs");c(i,e,{recursive:!0}),(0,pt.rmSync)(i,{recursive:!0,force:!0})}else throw o}}catch(o){throw(0,pt.rmSync)(i,{recursive:!0,force:!0}),o}return s}}}ensureGitmodulesEntry(e,t,n){let i=(0,an.join)(e,".gitmodules"),s="";try{s=(0,pt.readFileSync)(i,"utf8")}catch(l){if(l.code!=="ENOENT")throw l}let{content:o,added:c}=(0,as.appendGitmodulesEntry)(s,t,n);return c?((0,pt.appendFileSync)(i,o.slice(s.length),{encoding:"utf8"}),{added:!0}):{added:!1}}removeGitmodulesEntry(e,t){let n=(0,an.join)(e,".gitmodules"),i;try{i=(0,pt.readFileSync)(n,"utf8")}catch(o){if(o.code==="ENOENT")return{removed:!1};throw o}let s=(0,as.stripGitmodulesEntry)(i,t);return s===i?{removed:!1}:((0,pt.writeFileSync)(n,s,{encoding:"utf8"}),{removed:!0})}static stripGitmodulesEntry(e,t){return(0,as.stripGitmodulesEntry)(e,t)}unmountAssetSpace(e,t){let n=this.assertSafeVaultTarget(e,t,"unmountAssetSpace");this.removeGitmodulesEntry(e,t),(0,pt.existsSync)(n)&&(0,pt.rmSync)(n,{recursive:!0,force:!0})}parkAssetSpace(e,t){let n=this.assertSafeVaultTarget(e,t,"parkAssetSpace"),i=(0,as.parkedPathFor)(t),s=this.assertSafeVaultTarget(e,i,"parkAssetSpace",{requireAssetspacesRoot:!1});if((0,pt.existsSync)(n)){if((0,pt.existsSync)(s))throw new Error(`parkAssetSpace: refusing to park "${t}" \u2014 a parked copy already exists at "${i}". Resolve by hand: one of the two holds work the other does not.`);this.removeGitmodulesEntry(e,t),(0,pt.mkdirSync)((0,an.dirname)(s),{recursive:!0}),(0,pt.renameSync)(n,s)}}unparkAssetSpace(e,t){let n=this.assertSafeVaultTarget(e,t,"unparkAssetSpace"),i=(0,as.parkedPathFor)(t),s=this.assertSafeVaultTarget(e,i,"unparkAssetSpace",{requireAssetspacesRoot:!1});if(!(0,pt.existsSync)(s))throw new Error(`unparkAssetSpace: nothing parked at "${i}" for "${t}"`);if((0,pt.existsSync)(n))throw new Error(`unparkAssetSpace: refusing to unpark onto existing mount "${t}"`);(0,pt.mkdirSync)((0,an.dirname)(n),{recursive:!0}),(0,pt.renameSync)(s,n)}assertSafeVaultTarget(e,t,n,i={}){let s=i.requireAssetspacesRoot??!0,o=t.split("/");if(t.length===0||s&&!t.startsWith("assetspaces/")||o.some(u=>u.length===0||u==="."||u===".."))throw new Error(`${n}: refusing unsafe submodulePath "${t}"`);let c=(0,an.resolve)(e),l=(0,an.resolve)(c,t);if(l===c||!l.startsWith(c+an.sep))throw new Error(`${n}: target "${l}" escapes vault root "${c}"`);return l}};function mye(r){let e=(0,Nr.derivePath)(r);return e===null?r:(0,Nr.deriveUrl)(e)??r}a(mye,"toHttpsGitHubUrl");var gye=new Set(["node_modules",".obsidian",".exocortex",".git"]),Hd=class{static{a(this,"CliApplyProfileService")}constructor(e){this.vaultPath=e.vaultPath,this.mount=e.mount??new Oi,this.ref=e.ref??"main"}scanVault(){let e=[],t=new Map,n=new Set,i=[this.vaultPath];for(;i.length>0;){let s=i.pop(),o;try{o=(0,Bc.readdirSync)(s,{withFileTypes:!0})}catch{continue}for(let c of o){let l=(0,lu.join)(s,c.name);if(c.isDirectory()){if(c.name.startsWith(".")||gye.has(c.name))continue;i.push(l);continue}if(!c.isFile()||!c.name.endsWith(".md"))continue;let u=this.readFrontmatter(l);if(u===null)continue;let f=u.exo__Asset_uid;if(typeof f!="string"||f.length===0)continue;let d=ja(u.exo__Instance_class);if(d.includes(Xm)){if(n.has(f))continue;let h=(typeof u.exo__AssetSpace_source=="string"?u.exo__AssetSpace_source:"")||(typeof u.exo__AssetSpace_git=="string"?u.exo__AssetSpace_git:"");if(h.length===0)continue;let m=(0,Nr.derivePath)(h);if(m===null)continue;let y=typeof u.exo__AssetSpace_namespace=="string"?u.exo__AssetSpace_namespace:"",_=y||_ye(m)||f.slice(0,8),b=u.exo__AssetSpace_dependsOnKind,T=typeof b=="string"?b:Array.isArray(b)&&typeof b[0]=="string"?b[0]:void 0;n.add(f),e.push({uid:f,git:h,folderName:m,label:_,namespace:y,dependsOnKind:T})}if(d.includes(OO)){let p=u.exo__Asset_label;typeof p=="string"&&p.length>0&&t.set(f,p)}}}return{infos:e,profileLabels:t}}assertTsFloor(e,t){(0,Nr.assertTsFloorReconciled)(e,t,Nr.SDK_FLOOR)}buildDiff(e){let{targetProfileUid:t,targetProfileLabel:n,sourceProfileUid:i,sourceProfileLabel:s,result:o,infos:c}=e,l=new Map;for(let S of c)l.set(S.uid,S);let u=new Set(l.keys()),f=new Set,d=new Set;for(let S of o.declaredOntologies)if(u.has(S)){f.add(S);let R=l.get(S)?.namespace;R!==void 0&&R.length>0&&d.add(R)}this.assertTsFloor(f,d);let p=new Set([...o.effective,...f]),h=new Map;for(let S of c){let R=(0,Bc.existsSync)((0,lu.join)(this.vaultPath,S.folderName))?"active":(0,Bc.existsSync)((0,lu.join)(this.vaultPath,(0,Nr.parkedPathFor)(S.folderName)))?"parked":"absent";h.set(S.uid,R)}let m=new Set([...h].filter(([,S])=>S==="active").map(([S])=>S));for(let S of c)Nr.CATALOG_KEEP_NAMESPACES.has(S.namespace)&&m.has(S.uid)&&p.add(S.uid);let y=[],_=[],b=[];for(let S of c){let R=(0,Nr.classifyMountTransition)({state:h.get(S.uid)??"absent",inEffectiveSet:p.has(S.uid),dependsOnKind:S.dependsOnKind});switch(R){case"none":break;case"destroy":y.push({asUid:S.uid,folderName:S.folderName,label:S.label,files:this.enumerateFilesUnder(S.folderName)});break;case"park":_.push({asUid:S.uid,folderName:S.folderName,label:S.label,files:this.enumerateFilesUnder(S.folderName)});break;case"unpark":case"materialize":b.push({asUid:S.uid,folderName:S.folderName,httpsUrl:mye(S.git),label:S.label,source:R==="unpark"?"unpark":"pull"});break}}let T=new Map;for(let S of y)T.set(S.asUid,S.files);let I=new Set(b.filter(S=>S.source==="unpark").map(S=>S.asUid)),E={targetProfileUid:t,targetProfileLabel:n,sourceProfileUid:i,sourceProfileLabel:s,filesToDestroy:T,assetSpacesBeingTornDown:y.map(S=>({asUid:S.asUid,asLabel:S.label,fileCount:S.files.length})),assetSpacesBeingParked:_.map(S=>({asUid:S.asUid,asLabel:S.label,fileCount:S.files.length})),assetSpacesBeingMaterialized:b.map(S=>({asUid:S.asUid,asLabel:S.label})),assetSpacesBeingUnparked:b.filter(S=>I.has(S.asUid)).map(S=>({asUid:S.asUid,asLabel:S.label}))};return{toDestroy:y,toPark:_,toMaterialize:b,plan:E}}async execute(e){let t=[],n=[],i=[];for(let s of e.toDestroy)this.mount.unmountAssetSpace(this.vaultPath,s.folderName),t.push(s.asUid);for(let s of e.toPark)this.mount.parkAssetSpace(this.vaultPath,s.folderName),n.push(s.asUid);for(let s of e.toMaterialize){if(s.source==="unpark")this.mount.unparkAssetSpace(this.vaultPath,s.folderName);else{let o=(0,lu.join)(this.vaultPath,s.folderName);await this.mount.pullAssetSpace(s.httpsUrl,this.ref,o)}this.mount.ensureGitmodulesEntry(this.vaultPath,s.folderName,s.httpsUrl),i.push(s.asUid)}return{destroyed:t,parked:n,materialized:i}}enumerateFilesUnder(e){let t=[],i=[(0,lu.join)(this.vaultPath,e)];for(;i.length>0;){let s=i.pop(),o;try{o=(0,Bc.readdirSync)(s,{withFileTypes:!0})}catch{continue}for(let c of o){let l=(0,lu.join)(s,c.name);if(c.isDirectory()){if(c.name.startsWith("."))continue;i.push(l);continue}c.isFile()&&t.push(yye(l,this.vaultPath))}}return t}readFrontmatter(e){let t;try{t=(0,Bc.readFileSync)(e,"utf-8")}catch{return null}if(!t.startsWith("---"))return null;let n=t.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(n===null)return null;try{let i=(0,Nr.parseYamlFrontmatterTolerant)(n[1],e);return i&&typeof i=="object"&&!Array.isArray(i)?i:null}catch{return null}}};function yye(r,e){let t=e.endsWith("/")?e:e+"/";return(r.startsWith(t)?r.slice(t.length):r).split("\\").join("/")}a(yye,"relativeVaultPath");function _ye(r){let e=r.split("/").filter(t=>t.length>0);return e.length>0?e[e.length-1]:""}a(_ye,"lastSegment");ct();var qr=require("node:fs"),a7=require("node:crypto"),c7=require("node:child_process"),l7=require("node:util"),Wr=J(require("node:path"));hm();var it=J(We());ct();var Po=require("node:fs"),n7=require("node:crypto"),qi=J(require("node:path"));hm();var Vn=J(We());Bi();var r7=require("node:child_process"),Dw=J(We());var bye=6e4,Oo=class r{static{a(this,"RestPushService")}static{this.PAT_REGEX=/(?:gh[pousr]_[A-Za-z0-9_]{36,}|github_pat_[A-Za-z0-9_]{22,}_[A-Za-z0-9_]{59,})/g}constructor(e={}){this.fetchImpl=e.fetchImpl??globalThis.fetch,this.token=e.token??"",this.apiBase=(e.apiBase??"https://api.github.com").replace(/\/$/,"")}static resolveGhToken(e){let t=e??(()=>(0,r7.execFileSync)("gh",["auth","token"],{encoding:"utf8",timeout:15e3})),n;try{n=t()}catch(s){let o=s instanceof Error?s.message:String(s);throw new Error(`RestPushService: \`gh auth token\` failed \u2014 is GitHub CLI installed and authenticated? (run \`gh auth login\`). Underlying: ${o}`.replace(r.PAT_REGEX,"***REDACTED***"))}let i=n.trim();if(i.length===0)throw new Error("RestPushService: `gh auth token` returned empty output \u2014 not authenticated. Run `gh auth login`.");return i}redact(e){return(typeof e=="string"?e:String(e)).replace(r.PAT_REGEX,"***REDACTED***")}async push(e,t,n,i,s){return(0,Dw.restCreateCommit)(this.buildTransport(),{owner:e,repo:t,branch:n,files:i,message:s,baseURL:this.apiBase,redact:a(o=>this.redact(o),"redact")})}transport(){return this.buildTransport()}buildTransport(){let e=this.token,t=this.fetchImpl,n=a(i=>this.redact(i),"redact");return async i=>{let s={Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"exocortex-cli"};e.length>0&&(s.Authorization=`Bearer ${e}`),i.contentType&&(s["Content-Type"]=i.contentType);let o;try{o=await t(i.url,{method:i.method,headers:s,body:i.body,signal:AbortSignal.timeout(bye)})}catch(u){throw new Error(n(`GitHub request failed: ${Sye(u)}`))}let c=await o.text().catch(()=>"");if(o.status<200||o.status>=300){let u=a(f=>o.headers?.get?.(f)??void 0,"get");throw(0,Dw.enrichRateLimitError)(new Error(wye(n(`GitHub request ${i.method} ${i.url} \u2192 HTTP ${o.status}: ${c}`),512)),u)}let l;try{l=c.length>0?JSON.parse(c):void 0}catch{l=void 0}return{status:o.status,json:l,text:c}}}};function Sye(r){if(r instanceof Error)return r.message;if(typeof r=="string")return r;try{return JSON.stringify(r)}catch{return String(r)}}a(Sye,"errMsg");function wye(r,e){return r.length>e?r.slice(0,e)+"...":r}a(wye,"truncate");Pt();var Eye=a(async r=>{let e=await n7.webcrypto.subtle.digest("SHA-1",r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength));return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")},"nodeSha1"),vye={parse:a(r=>gd(r,{schema:Xl}),"parse"),stringify:a(r=>yd(r,{schema:Xl,lineWidth:-1}),"stringify")};function Tye(r,e){if(r.tokenFromGh===!0)return Oo.resolveGhToken(e.ghTokenRunner);let t=e.env??process.env,n=r.token||t.GITHUB_TOKEN||t.GH_TOKEN||"";if(n.length===0)throw new Error("A GitHub token is required (private sync units read as 404 without one). Use --token-from-gh, --token <pat>, or set GITHUB_TOKEN / GH_TOKEN.");return n}a(Tye,"resolveToken");function Aye(r){let e=a(n=>qi.join(r,n),"abs"),t=a(async(n,i)=>{let s;try{s=await Po.promises.readdir(n,{withFileTypes:!0})}catch{return}for(let o of s){let c=qi.join(n,o.name);if(o.isDirectory()){if(o.name===".git")continue;await t(c,i)}else o.isFile()&&i.push(qi.relative(r,c).split(qi.sep).join("/"))}},"walk");return{async list(){let n=[];return(0,Po.existsSync)(r)&&await t(r,n),n},read:a(n=>Po.promises.readFile(e(n),"utf-8"),"read"),async readBinary(n){return new Uint8Array(await Po.promises.readFile(e(n)))},async write(){throw new Error("exosync-parity is read-only \u2014 write refused")},async delete(){throw new Error("exosync-parity is read-only \u2014 delete refused")}}}a(Aye,"nodeLocalFilesPort");function Iye(r,e){let t;try{t=(0,Vn.parkedPathFor)(e)}catch{return!1}return(0,Po.existsSync)(qi.join(r,t))}a(Iye,"isParked");function zd(r){let e=new $t(r),t=new Vn.SpaceSpecAccumulator,n=[];for(let i of e.getAllFiles()){let s=e.getFrontmatter(i);if(!s)continue;let o=(0,Vn.classifySpaceDeclaration)(s,i.path);if(o.kind==="not-space"||(o.warning!==void 0&&t.warnings.push(o.warning),o.kind==="skip"))continue;let c=t.offer(o.candidate);if(c!==null){if(!(0,Po.existsSync)(qi.join(r,c.localPath))){Iye(r,c.localPath)&&n.push(c);continue}t.commit(o.candidate)}}return{specs:t.specs,parked:n,warnings:t.warnings}}a(zd,"collectVaultSpecs");function Rye(r,e){for(let t of r.repos){let n=t.headSha!==void 0?` @${t.headSha.slice(0,7)}`:"";e(`${t.repoKey}${n}: ${t.status} \u2014 ${t.inParity}/${t.filesChecked} in parity, M2 diffs ${t.m2SemanticDiffs}, accounted ${t.accountedCount}, M1 violations ${t.m1Violations.length}${t.attachmentHashSetIdentical!==void 0?`, attachment hash-set ${t.attachmentHashSetIdentical?"identical":"DIFFERS"}`:""}`),t.detail!==void 0&&e(` ${t.detail}`);for(let i of t.warnings)e(` warn: ${i}`);for(let i of t.discrepancies)e(` ${i.cls}: ${i.path}${i.detail!==void 0?` (${i.detail})`:""}`);for(let i of t.m1Violations)e(` M1 VIOLATION: ${i.path} \u2014 ${i.detail}`)}e((0,Vn.summarizeParityRound)(r))}a(Rye,"printHumanReport");function Cye(r,e){if(r.length!==0){e(`Parked AssetSpaces (frozen on this device, not synced): ${r.length}`);for(let t of r){let n=t.lastSyncedSha!==null?t.lastSyncedSha.slice(0,7):"never",i=t.remoteHeadSha!==null?t.remoteHeadSha.slice(0,7):"unread";switch(t.freshness){case"behind":e(` ${t.repoKey}: BEHIND \u2014 parked at ${n}, remote head is ${i}`);break;case"current":e(` ${t.repoKey}: current \u2014 parked at ${n}, matches the remote head`);break;case"unknown":e(` ${t.repoKey}: unknown \u2014 ${t.reason??"no verdict"}`);break}}}}a(Cye,"printParkedSection");async function xye(r,e={}){let t=e.out??(_=>console.log(_)),n=qi.resolve(r.vault);if(!(0,Po.existsSync)(n))throw new Error(`Vault path does not exist: ${n}`);let i=Tye(r,e),s=new Oo({token:i,...r.apiBase!==void 0?{apiBase:r.apiBase}:{}}),o=e.transportFactory?.(i,r.apiBase)??s.transport(),{specs:c,parked:l,warnings:u}=zd(n);for(let _ of u)t(`warn: ${_}`);let f=r.configDir??".obsidian",d=qi.join(n,f,"plugins","exocortex",Vn.WATERMARK_STORE_FILENAME),p=new Vn.FileWatermarkStore({read:a(async()=>{try{return await Po.promises.readFile(d,"utf-8")}catch{return null}},"read"),writeAtomic:a(async()=>{throw new Error("exosync-parity: watermark access is read-only by contract")},"writeAtomic")}),h=[];for(let _ of l)h.push(await(0,Vn.checkParkedStaleness)(_,{transport:o,watermarks:{get:a(b=>p.get(b),"get")},redact:a(b=>s.redact(b),"redact"),...r.apiBase!==void 0?{baseURL:r.apiBase}:{}}));if(r.json!==!0&&Cye(h,t),c.length===0)return r.json===!0&&h.length>0&&t(JSON.stringify({parked:h},null,2)),t("Nothing to check \u2014 no materialized AssetSpaces with a GitHub source found in this vault."),2;let m=new Vn.ParityValidator({transport:o,sha1:Eye,localFilesFor:a(_=>Aye(qi.join(n,_.localPath)),"localFilesFor"),watermarks:{get:a(_=>p.get(_),"get")},yaml:vye,redact:a(_=>s.redact(_),"redact"),...r.apiBase!==void 0?{baseURL:r.apiBase}:{}});t(`ExoSync parity check: ${c.length} repo(s), vault ${n}`);let y=await m.runRound(c,{trigger:"standalone"});return r.json===!0?t(JSON.stringify({...y,parked:h},null,2)):Rye(y,t),y.vacuous?2:y.ok?0:1}a(xye,"runExosyncParity");function i7(){return new fe("exosync-parity").description("ExoSync M1/M2 parity report: compare materialized sync units against their remote heads (read-only; RFC 4e4dc453 Phase E)").requiredOption("--vault <path>","Vault root path").option("--config-dir <name>","Obsidian config dir name (watermark location)",".obsidian").option("--json","Print the full round record as JSON").option("--token <pat>","GitHub PAT (or env GITHUB_TOKEN / GH_TOKEN). Prefer --token-from-gh.").option("--token-from-gh","Resolve the PAT via `gh auth token`").option("--api-base <url>","GitHub API base (testing)").action(async r=>{try{process.exitCode=await xye(r)}catch(e){se.handle(e,{command:"exosync-parity"}),process.exitCode=1}})}a(i7,"exosyncParityCommand");ct();var Wi=require("node:fs"),FO=require("node:crypto"),Pi=J(require("node:path")),kr=J(We());Pt();var Oye="exosync-watermarks.local.json";function s7(r,e,t){let n=NO(e,t),i=new Oo({token:n,...e.apiBase!==void 0?{apiBase:e.apiBase}:{}}),s=t.transportFactory?.(n,e.apiBase)??i.transport(),{specs:o,warnings:c}=zd(r),l=e.configDir??".obsidian",u=Pi.join(r,l,"plugins","exocortex",Oye),f=Pi.join(r,l,"plugins","exocortex",kr.CONFLICT_CACHE_STORE_FILENAME),d=new kr.LocalConflictCacheStore({io:$a(f)}),p=Pi.join(r,l,"plugins","exocortex",kr.OUTBOX_STORE_FILENAME),h=new kr.LocalOutboxStore({io:$a(p)});return{resolver:new kr.QuarantineResolver({transport:s,watermarkStore:new kr.FileWatermarkStore($a(u)),localFilesFor:a(y=>Lw(Pi.join(r,y.localPath)),"localFilesFor"),sha1:LO,...e.apiBase!==void 0?{baseURL:e.apiBase}:{},redact:a(y=>i.redact(y),"redact"),conflictCache:d,outbox:h}),specs:o,warnings:c}}a(s7,"buildResolver");async function Pye(r,e={}){let t=e.out??(l=>console.log(l)),n=Pi.resolve(r.vault);if(!(0,Wi.existsSync)(n))throw new Error(`Vault path does not exist: ${n}`);let{resolver:i,specs:s,warnings:o}=s7(n,r,e);for(let l of o)t(`warn: ${l}`);if(s.length===0)return t("No materialized AssetSpaces with a GitHub source found in this vault."),0;let c=await i.listOpenConflicts(s);if(r.json===!0)return t(JSON.stringify(c,null,2)),0;if(c.length===0)return t("No open conflicts \u2014 nothing to resolve. \u2705"),0;t(`${c.length} open conflict(s):`);for(let l of c){let u=`${l.hasLocal?"local":"(no local)"} vs ${l.hasRemote?"remote":"(no remote)"}`;t(` ${l.repoKey} ${l.path} [${u}]${l.uid?` uid=${l.uid}`:""}`)}return t(""),t("Resolve with: exosync quarantine resolve <path> --take local|remote|file <path> --vault <vault>"),0}a(Pye,"runQuarantineList");async function Fye(r,e,t={}){let n=t.out??(_=>console.log(_)),i=Pi.resolve(e.vault);if(!(0,Wi.existsSync)(i))throw new Error(`Vault path does not exist: ${i}`);let s=(e.take??"").trim();if(s!=="local"&&s!=="remote"&&s!=="file")throw new Error("resolve requires --take local | remote | file (with --file <path> for the merged content)");let o;if(s==="file"){if(e.file===void 0||e.file.length===0)throw new Error("--take file requires --file <path> to the merged content");o={take:"merged",content:await Wi.promises.readFile(Pi.resolve(e.file),"utf-8")}}else o={take:s};let{resolver:c,specs:l,warnings:u}=s7(i,e,t);for(let _ of u)n(`warn: ${_}`);let d=(await c.listOpenConflicts(l)).filter(_=>_.path===r&&(e.repo===void 0||_.repoKey===e.repo));if(d.length===0)return n(`No open conflict for "${r}"${e.repo?` in ${e.repo}`:""} \u2014 run \`exosync quarantine list\` to see the current set.`),1;if(d.length>1){n(`"${r}" conflicts in ${d.length} repos \u2014 disambiguate with --repo <repoKey>:`);for(let _ of d)n(` --repo ${_.repoKey}`);return 1}let p=d[0],h=l.find(_=>_.repoKey===p.repoKey),m=await c.resolve(h,p.path,o),y=m.awaitingPush===!0?" \u2014 awaiting push (run `exosync sync` to push it)":m.pushedSha!==void 0?` \u2014 pushed @${m.pushedSha.slice(0,7)}`:" \u2014 remote already matched";return n(`Resolved ${p.path} (${m.resolvedTo}) in ${p.repoKey}${y}.`),m.discardedLocalBackupPath!==void 0&&n(` \u21B3 your discarded local version is preserved at ${h.localPath}/${m.discardedLocalBackupPath}`),0}a(Fye,"runQuarantineResolve");function DO(r){return r.replace(/\r\n?/g,`
636
+ `).replace(/\n+$/,"")}a(DO,"normalizeForCompare");function Dye(r,e,t){let n=[...e].sort((o,c)=>o.path.localeCompare(c.path)),i=[],s=[];for(let o of n){let c=DO(o.content),l=i.find(u=>u.norm===c);if(l!==void 0){s.push({action:"delete",path:o.path,identicalTo:l.path});continue}i.push({path:o.path,norm:c}),i.length===1?s.push({action:"keep",path:o.path,uid:r}):s.push({action:"reuuid",path:o.path,fromUid:r,toUid:t()})}return s}a(Dye,"planDedupGroup");async function Lye(r,e={}){let t=e.out??(f=>console.log(f)),n=Pi.resolve(r.vault);if(!(0,Wi.existsSync)(n))throw new Error(`Vault path does not exist: ${n}`);let{specs:i,warnings:s}=zd(n);for(let f of s)t(`warn: ${f}`);let o=[];for(let f of i){let d=Pi.join(n,f.localPath);if(!(0,Wi.existsSync)(d))continue;let p=Lw(d);for(let h of await p.list())if(h.endsWith(".md"))try{o.push({path:Pi.join(d,h),content:await p.read(h)})}catch{continue}}let c=(0,kr.findDuplicateUidGroups)(o).map(f=>[f.uid,[...f.paths]]);if(c.length===0)return t("No duplicate uids on disk. \u2705"),0;let l=a(f=>Pi.relative(n,f),"rel");if(r.auto===!0){let f=[];for(let[_,b]of c){let T=[],I=new Map;for(let E of b){let S=await Wi.promises.readFile(E,"utf-8");T.push({path:E,content:S}),I.set(E,S)}f.push({uid:_,decisions:Dye(_,T,FO.randomUUID),snap:I})}let d=0,p=0;t(`${c.length} duplicate uid(s) on disk \u2014 zero-loss plan:`);for(let{uid:_,decisions:b}of f){t(` ${_}:`);for(let T of b)T.action==="keep"?t(` KEEP ${l(T.path)} (keeps uid ${_})`):T.action==="reuuid"?(p++,t(` RE-UUID ${l(T.path)} (content differs \u2192 fresh uid; both survive, zero-loss)`)):(d++,t(` DELETE ${l(T.path)} (identical content \u2192 ${l(T.identicalTo)}; zero-loss)`))}if(r.apply!==!0)return t(""),t(`Plan: delete ${d} identical copy(ies), re-uuid ${p} differing variant(s).`),t("DRY-RUN \u2014 nothing changed. Re-run with `--auto --apply` to execute (a deleted copy's content always survives in the kept file; if previously synced it is also recoverable from the git remote)."),1;let h=0,m=0,y=0;for(let{decisions:_,snap:b}of f){for(let T of _){if(T.action!=="delete")continue;let I;try{I=await Wi.promises.readFile(T.path,"utf-8")}catch{continue}if(DO(I)!==DO(b.get(T.path)??"")){t(` ! skipped delete ${l(T.path)} (changed since scan \u2014 re-run dedup-uids)`),y++;continue}await Wi.promises.rm(T.path,{force:!0}),t(` deleted ${l(T.path)} (identical to ${l(T.identicalTo)})`),h++}for(let T of _){if(T.action!=="reuuid")continue;let I;try{I=await Wi.promises.readFile(T.path,"utf-8")}catch{continue}if((0,kr.extractAssetUid)(I)!==T.fromUid){t(` ! skipped re-uuid ${l(T.path)} (uid changed since scan \u2014 re-run dedup-uids)`),y++;continue}let E=(0,kr.rewriteAssetUid)(I,T.toUid);E!==I&&(await Wi.promises.writeFile(T.path,E,"utf-8"),t(` re-uuid ${l(T.path)} \u2192 uid=${T.toUid} (content differs from kept copy)`),m++)}}return t(`Resolved: deleted ${h} identical copy(ies), re-uuid ${m} differing variant(s).${y>0?` ${y} skipped (re-run).`:""} Run \`exosync sync\` to propagate.`),y>0?1:0}r.apply===!0&&t("Note: --apply only applies with --auto; running in report mode."),t(`${c.length} duplicate uid(s) on disk:`);for(let[f,d]of c){t(` ${f} \u2014 ${d.length} files:`);for(let p of d)t(` ${l(p)}`)}if(r.fix!==!0)return t(""),t("Re-run with --fix to assign a fresh uuid to every duplicate but the first (frontmatter rewrite only \u2014 never renames the file)."),1;let u=0;for(let f of(0,kr.planDuplicateUidFix)(o,FO.randomUUID))await Wi.promises.writeFile(f.path,f.content,"utf-8"),t(` fixed ${l(f.path)} \u2192 uid=${f.toUid}`),u++;return t(`Reassigned ${u} uid(s). Run \`exosync sync\` to propagate.`),0}a(Lye,"runDedupUids");function PO(r){return r.requiredOption("--vault <path>","Vault root path").option("--config-dir <name>","Obsidian config dir name (watermark location)",".obsidian").option("--token <pat>","GitHub PAT (or env GITHUB_TOKEN / GH_TOKEN). Prefer --token-from-gh.").option("--token-from-gh","Resolve the PAT via `gh auth token`").option("--json","Machine-readable output").option("--api-base <url>","GitHub API base (testing)")}a(PO,"withQuarantineOptions");function o7(r){let e=new fe("quarantine").description("Inspect and resolve ExoSync conflicts (quarantine resolver; RFC 4e4dc453, finding a0a3d1d6)");PO(e.command("list").description("List open conflicts that need a manual choice")).action(async t=>{try{process.exitCode=await Pye(t)}catch(n){se.handle(n,{command:"exosync quarantine list"}),process.exitCode=1}}),PO(e.command("resolve <path>").description("Resolve one conflict: --take local | remote | file <path> (merged)").option("--take <choice>","local | remote | file").option("--file <path>","Merged content file (with --take file)").option("--repo <repoKey>","Disambiguate a cross-repo path collision")).action(async(t,n)=>{try{process.exitCode=await Fye(t,n)}catch(i){se.handle(i,{command:"exosync quarantine resolve"}),process.exitCode=1}}),r.addCommand(e),PO(r.command("dedup-uids").description("Report duplicate exo__Asset_uid on disk (#3477); --fix re-uuids all but the first; --auto zero-loss auto-resolve (identical\u2192delete, differing\u2192re-uuid; dry-run unless --apply)").option("--fix","Assign a fresh uuid to every duplicate but the first").option("--auto","Zero-loss auto-resolve: delete identical copies, re-uuid distinct variants (DRY-RUN unless --apply). Supersedes --fix.").option("--apply","Execute the --auto plan (without it --auto is a dry-run; a deleted copy's content always survives in the kept file, and if previously synced is recoverable from the git remote)")).action(async t=>{try{process.exitCode=await Lye(t)}catch(n){se.handle(n,{command:"exosync dedup-uids"}),process.exitCode=1}})}a(o7,"registerQuarantineCommands");Pt();var LO=a(async r=>{let e=await a7.webcrypto.subtle.digest("SHA-1",r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength));return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")},"nodeSha1"),Nye={parse:a(r=>gd(r,{schema:Xl}),"parse"),stringify:a(r=>yd(r,{schema:Xl,lineWidth:-1}),"stringify")};function NO(r,e){if(r.tokenFromGh===!0)return Oo.resolveGhToken(e.ghTokenRunner);let t=e.env??process.env,n=r.token||t.GITHUB_TOKEN||t.GH_TOKEN||"";if(n.length===0)throw new Error("A GitHub token is required (private sync units read as 404 and push needs write scope). Use --token-from-gh, --token <pat>, or set GITHUB_TOKEN / GH_TOKEN.");return n}a(NO,"resolveToken");function Lw(r){let e=a(i=>Wr.join(r,i),"abs"),t=a(async(i,s)=>{let o;try{o=await qr.promises.readdir(i,{withFileTypes:!0})}catch{return}for(let c of o){let l=Wr.join(i,c.name);if(c.isDirectory()){if(c.name===".git")continue;await t(l,s)}else c.isFile()&&s.push(Wr.relative(r,l).split(Wr.sep).join("/"))}},"walk"),n=a(async(i,s)=>{let o=Wr.dirname(i);await qr.promises.mkdir(o,{recursive:!0});let c=`${i}.local.tmp`;await s(c),await qr.promises.rename(c,i)},"writeAtomic");return{async list(){let i=[];return(0,qr.existsSync)(r)&&await t(r,i),i},read:a(i=>qr.promises.readFile(e(i),"utf-8"),"read"),async write(i,s){await n(e(i),o=>qr.promises.writeFile(o,s,"utf-8"))},async delete(i){await qr.promises.rm(e(i),{force:!0})},async readBinary(i){return new Uint8Array(await qr.promises.readFile(e(i)))},async writeBinary(i,s){let o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength);await n(e(i),c=>qr.promises.writeFile(c,Buffer.from(o)))},async stat(i){try{let s=await qr.promises.stat(e(i));return{mtimeMs:s.mtimeMs,size:s.size}}catch{return null}}}}a(Lw,"nodeLocalFilesPort");function $a(r){return{async read(){try{return await qr.promises.readFile(r,"utf-8")}catch{return null}},async writeAtomic(e){await qr.promises.mkdir(Wr.dirname(r),{recursive:!0});let t=`${r}.local.tmp`;await qr.promises.writeFile(t,e,"utf-8"),await qr.promises.rename(t,r)}}}a($a,"nodeWatermarkFileIO");function uu(r,e=".obsidian"){let t=Wr.join(r,e,"plugins","exocortex",it.MOUNT_BASE_STORE_FILENAME);return new it.FileMountBaseStore($a(t))}a(uu,"nodeMountBaseStore");var kye=(0,l7.promisify)(c7.execFile);function Mye(r){return async e=>{if(e.localPath.length===0||e.localPath.startsWith("-"))return null;try{let{stdout:t}=await kye("git",["-C",r,"submodule","status",e.localPath],{timeout:3e4,maxBuffer:4194304}),n=t.match(/^[ +\-U]?([0-9a-f]{40})\b/m);return n?n[1]:null}catch{return null}}}a(Mye,"nodeLocalBaseShaProvider");function jye(r){return{async check(e){let t=Wr.join(r,e.localPath);if(!(0,qr.existsSync)(t))return{fullyMaterialized:!1,reason:`mount folder ${e.localPath} does not exist`};let n=0;try{n=(await qr.promises.readdir(t)).length}catch{return{fullyMaterialized:!1,reason:`mount folder ${e.localPath} is not readable`}}return n===0&&e.spaceKind!=="file"?{fullyMaterialized:!1,reason:`mount folder ${e.localPath} is empty (mid-mount?)`}:{fullyMaterialized:!0}}}}a(jye,"nodeMaterializationCheck");function $ye(r,e){let t=r.pushedSha!==void 0?` \u2192@${r.pushedSha.slice(0,7)}`:"",n=(r.outboxPushedCount??0)>0?`, pushed ${r.outboxPushedCount} resolved`:"",i=(r.outboxReconflictedCount??0)>0?`, ${r.outboxReconflictedCount} re-conflicted (remote moved)`:"";e(`${r.repoKey}${t}: ${r.status} \u2014 pulled ${r.pulledCount}, pushed ${r.pushedCount}, merged ${r.mergedCount}, quarantined ${r.quarantinedCount}${(r.pushedDeletes?.length??0)>0?`, deleted ${r.pushedDeletes.length}`:""}${n}${i}`),r.detail!==void 0&&e(` ${r.detail}`);for(let s of r.warnings)e(` warn: ${s}`);(r.quarantinedPaths?.length??0)>0&&e(` quarantined (\u2192 exosync quarantine resolve): ${r.quarantinedPaths.join(", ")}`),(r.deferredPaths?.length??0)>0&&e(` deferred (\u2192 full sync): ${r.deferredPaths.join(", ")}`),(r.deferredDeletes?.length??0)>0&&e(` deferred deletes: ${r.deferredDeletes.join(", ")}`),r.timings!==void 0&&(0,it.totalMs)(r.timings)>0&&e(` ${(0,it.formatRepoTimings)(r.repoKey,r.timings)}`)}a($ye,"printRepoResult");function Uye(r){return r==="conflict"||r==="full-conflict"||r==="retry-exhausted"||r==="busy"||r==="auth-required"||r==="error"}a(Uye,"isFailureStatus");async function Bye(r,e,t={}){let n=t.out??(R=>console.log(R)),i=Wr.resolve(e.vault);if(!(0,qr.existsSync)(i))throw new Error(`Vault path does not exist: ${i}`);let s=NO(e,t),o=new Oo({token:s,...e.apiBase!==void 0?{apiBase:e.apiBase}:{}}),c=t.transportFactory?.(s,e.apiBase)??o.transport(),{specs:l,warnings:u}=zd(i);for(let R of u)n(`warn: ${R}`);if(l.length===0)return n("Nothing to sync \u2014 no materialized AssetSpaces with a GitHub source found in this vault."),2;let f=e.configDir??".obsidian",d=Wr.join(i,f,"plugins","exocortex",it.WATERMARK_STORE_FILENAME),p=Wr.join(i,f,"plugins","exocortex",it.LOCAL_MANIFEST_STORE_FILENAME),h=Wr.join(i,f,"plugins","exocortex",it.CONFLICT_CACHE_STORE_FILENAME),m=new it.LocalConflictCacheStore({io:$a(h)}),y=Wr.join(i,f,"plugins","exocortex",it.OUTBOX_STORE_FILENAME),_=new it.LocalOutboxStore({io:$a(y)}),b=m,T=new it.SyncEngine({transport:c,watermarkStore:new it.FileWatermarkStore($a(d)),localManifestStore:new it.FileLocalManifestStore($a(p)),mountBaseStore:uu(i,f),localBaseShaProvider:Mye(i),materializationCheck:jye(i),localFilesFor:a(R=>Lw(Wr.join(i,R.localPath)),"localFilesFor"),sha1:LO,redact:a(R=>o.redact(R),"redact"),commitMessage:a((R,D,P=0)=>`exosync: ${D} change(s)${P>0?`, ${P} deletion(s)`:""} (CLI)`,"commitMessage"),mergeLayer:new it.GatedStructuredMerger(new it.StructuredMerger(Nye)),quarantine:b,outbox:_,...e.apiBase!==void 0?{baseURL:e.apiBase}:{}});n(`ExoSync ${r}: ${l.length} repo(s), vault ${i}`);let I=(0,it.orderChildrenFirst)(l),E=e.json===!0?void 0:R=>{n(`[ExoSync] ${R.repoKey}: ${(0,it.syncProgressPhaseText)(R)}`)},S=await T.syncAll(I,r,E);if(e.json===!0)n(JSON.stringify(S,null,2));else{for(let P of S)$ye(P,n);let R=S.reduce((P,M)=>({pulled:P.pulled+M.pulledCount,pushed:P.pushed+M.pushedCount,merged:P.merged+M.mergedCount,quarantined:P.quarantined+M.quarantinedCount}),{pulled:0,pushed:0,merged:0,quarantined:0});n(`Summary: ${S.length} repo(s) \u2014 pulled ${R.pulled}, pushed ${R.pushed}, merged ${R.merged}, quarantined ${R.quarantined}`);let D=(0,it.aggregateTimings)(S);(0,it.totalMs)(D)>0&&n((0,it.formatTimingsLine)(D))}return S.some(R=>Uye(R.status))?1:0}a(Bye,"runExosyncSync");function kO(r){return r.requiredOption("--vault <path>","Vault root path").option("--config-dir <name>","Obsidian config dir name (watermark location)",".obsidian").option("--token <pat>","GitHub PAT (or env GITHUB_TOKEN / GH_TOKEN). Prefer --token-from-gh.").option("--token-from-gh","Resolve the PAT via `gh auth token`").option("--json","Print the full per-repo result array as JSON").option("--api-base <url>","GitHub API base (testing)")}a(kO,"withSyncOptions");function MO(r){return async e=>{try{process.exitCode=await Bye(r,e)}catch(t){se.handle(t,{command:`exosync ${r}`}),process.exitCode=1}}}a(MO,"makeDirectionAction");function u7(){let r=new fe("exosync").description("ExoSync over the GitHub REST API: sync/pull/push the materialized AssetSpace set (CLI parity with the plugin; RFC 4e4dc453 Phase B). Read-only divergence check: `exosync-parity`.");return kO(r.command("sync").description("Full pull\u2192merge\u2192push cycle for every materialized repo")).action(MO("sync")),kO(r.command("pull").description("Apply remote changes only (nothing leaves the device; local changes re-derive)")).action(MO("pull")),kO(r.command("push").description("Send the local delta only (remote changes are pinned to re-derive on the next pull/sync)")).action(MO("push")),o7(r),r}a(u7,"exosyncCommand");var Vye=a(r=>{process.stderr.write(`${r}
637
+ `)},"DEFAULT_LOG"),Nw=class{static{a(this,"HeadlessConfirmGate")}constructor(e){this.yes=e.yes,this.verbose=e.verbose??!1,this.log=e.log??Vye}async confirmApply(e){if(this.verbose){let t=Array.from(e.filesToDestroy.values()).reduce((n,i)=>n+i.length,0);if(this.log(`[apply-profile] Target: ${e.targetProfileLabel} (${e.targetProfileUid})`),this.log(`[apply-profile] Source: ${e.sourceProfileLabel}`),this.log(`[apply-profile] ${t} files to remove, ${e.assetSpacesBeingTornDown.length} AS to tear down, ${e.assetSpacesBeingMaterialized.length} AS to materialize`),e.assetSpacesBeingParked.length>0){let n=e.assetSpacesBeingParked.reduce((i,s)=>i+s.fileCount,0);this.log(`[apply-profile] ${n} files to park (moved to .exocortex/parked, NOT removed), ${e.assetSpacesBeingParked.length} AS to park`)}e.assetSpacesBeingUnparked.length>0&&this.log(`[apply-profile] ${e.assetSpacesBeingUnparked.length} AS to unpark (restored from .exocortex/parked, no download)`)}return this.yes?!0:(this.log("[apply-profile] Refused: --yes flag required for headless mode (Decision #2 safety)."),!1)}};Pt();qt();mr();async function Gye(r,e,t={}){let n=[],i=[],s=t.out??(R=>process.stdout.write(`${R}
638
638
  `)),o=t.err??(R=>process.stderr.write(`${R}
639
- `)),c=a(R=>{n.push(R),s(R)},"out"),l=a(R=>{i.push(R),o(R)},"err");if(!e.vault)throw new Xe("--vault is required");let u=(0,d7.resolve)(e.vault);if(!(0,f7.existsSync)(u))throw new Me(u);if(!r||r.length===0)throw new Xe("profile-uid argument is required","exocortex apply-profile <profile-uid> --vault <path>");let d=await(t.resolverFactory?.(e)??new Pw({vaultPath:u,warn:a(R=>l(R),"warn")})).resolveFilter(r);if(d.outcome==="missing-profile")throw new Xe(`Profile not found: ${r}`,"Run `exocortex find --class exo__Profile` to list available profiles");if(d.outcome==="error")return l(`[apply-profile] Resolver error: ${d.reason}`),{exitCode:5,stdout:n,stderr:i};if(d.outcome==="degraded")return l(`[apply-profile] Refused: profile resolution degraded \u2014 ${d.reason}. Apply aborted to prevent vault corruption.`),{exitCode:5,stdout:n,stderr:i};if(d.outcome!=="engaged")return l(`[apply-profile] Unexpected resolver outcome: ${d.outcome}`),{exitCode:5,stdout:n,stderr:i};let p=d.result,h=e.token||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,m=t.applyServiceFactory?.(e,u)??new Hd({vaultPath:u,ref:e.ref??"main",mount:new Oi({token:h,mountBaseStore:uu(u)})}),{infos:y,profileLabels:_}=m.scanVault(),b=_.get(r)??r,T;try{T=m.buildDiff({targetProfileUid:r,targetProfileLabel:b,sourceProfileUid:null,sourceProfileLabel:"<unknown>",result:p,infos:y})}catch(R){if(R instanceof Nr.TsFloorViolationError)return l(`[apply-profile] Refused: ${R.message}`),{exitCode:5,stdout:n,stderr:i};throw R}if(!await(t.confirmGate??new Nw({yes:e.yes??!1,verbose:e.verbose??!1,log:a(R=>l(R),"log")})).confirmApply(T.plan))return{exitCode:0,stdout:n,stderr:i};if(T.toDestroy.length===0&&T.toMaterialize.length===0)return c(`[apply-profile] Already in target mount-state for ${b} \u2014 no-op.`),{exitCode:0,stdout:n,stderr:i};let S;try{S=await m.execute(T)}catch(R){return l(`[apply-profile] Execution failed: ${R instanceof Error?R.message:String(R)}`),{exitCode:5,stdout:n,stderr:i}}return c(`[apply-profile] Switched to ${b}: ${S.destroyed.length} AssetSpace(s) torn down, ${S.materialized.length} materialized.`),{exitCode:0,stdout:n,stderr:i}}a(Vye,"runApplyProfile");function p7(){return new fe("apply-profile").description("Apply the specified Profile (mount-state filesystem mutation). Requires --yes for headless mode.").argument("<profile-uid>","Target Profile UID").requiredOption("--vault <path>","Path to Obsidian vault").option("--yes","Confirm apply (headless mode safety override per RFC 22b50a17 Decision #2)",!1).option("--verbose","Print plan summary to stderr before deciding",!1).option("--ref <branch>","Git ref to pull when materialising AssetSpaces","main").option("--token <pat>","GitHub PAT for private-repo materialisation (or env GITHUB_TOKEN / GH_TOKEN)").action(async(e,t)=>{try{let n=await Vye(e,t);process.exit(n.exitCode)}catch(n){se.handle(n)}})}a(p7,"applyProfileCommand");ct();var Kd=require("node:path"),fu=require("node:fs"),h7=J(We());Pt();qt();function m7(){return new fe("bootstrap").description("Bootstrap a vault with the SDK floor AssetSpace (exo). Pulls a tarball from a public GitHub repo, extracts \u043A assetspaces/, writes .gitmodules. Only --exo is required \u2014 bootstrap installs only the SDK platform. exocmd (the optional UI-command library) and any other AssetSpace are added afterwards via `exocortex assetspace add`. Example URL: https://github.com/kitelev/exoas-exo.").requiredOption("--vault <path>","Path \u043A target vault").requiredOption("--exo <url>","Public GitHub URL \u0434\u043B\u044F exo TBox AssetSpace (e.g. https://github.com/kitelev/exoas-exo)").option("--ref <branch>","Branch ref \u043A pull from","main").option("--token <pat>","GitHub PAT for private repos (or env GITHUB_TOKEN / GH_TOKEN). Optional \u2014 anonymous for public repos.").option("--json","Emit result as JSON",!1).action(async r=>{try{if(!r.vault)throw new Xe("--vault is required");let e=(0,Kd.resolve)(r.vault);(0,fu.mkdirSync)(e,{recursive:!0});let t=(0,Kd.join)(e,".gitmodules"),n=(0,Kd.join)(e,"assetspaces");if((0,fu.existsSync)(t))throw new Xe(`Vault ${e} already has .gitmodules \u2014 refusing \u043A re-bootstrap. Use \`assetspace add\` \u0434\u043B\u044F individual AS.`);if((0,fu.existsSync)(n)&&(0,fu.readdirSync)(n).length>0)throw new Xe(`Vault ${e}/assetspaces/ already has content \u2014 refusing \u043A re-bootstrap.`);let i=r.token||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,s=new Oi({token:i,mountBaseStore:uu(e)}),o=r.ref??"main",c=[],l=(0,h7.derivePath)(r.exo)??"assetspaces/exo",u=(0,Kd.join)(e,l);process.stderr.write(`[bootstrap] Pulling ${r.exo}@${o} \u2192 ${l}/...
639
+ `)),c=a(R=>{n.push(R),s(R)},"out"),l=a(R=>{i.push(R),o(R)},"err");if(!e.vault)throw new Xe("--vault is required");let u=(0,d7.resolve)(e.vault);if(!(0,f7.existsSync)(u))throw new Me(u);if(!r||r.length===0)throw new Xe("profile-uid argument is required","exocortex apply-profile <profile-uid> --vault <path>");let d=await(t.resolverFactory?.(e)??new Pw({vaultPath:u,warn:a(R=>l(R),"warn")})).resolveFilter(r);if(d.outcome==="missing-profile")throw new Xe(`Profile not found: ${r}`,"Run `exocortex find --class exo__Profile` to list available profiles");if(d.outcome==="error")return l(`[apply-profile] Resolver error: ${d.reason}`),{exitCode:5,stdout:n,stderr:i};if(d.outcome==="degraded")return l(`[apply-profile] Refused: profile resolution degraded \u2014 ${d.reason}. Apply aborted to prevent vault corruption.`),{exitCode:5,stdout:n,stderr:i};if(d.outcome!=="engaged")return l(`[apply-profile] Unexpected resolver outcome: ${d.outcome}`),{exitCode:5,stdout:n,stderr:i};let p=d.result,h=e.token||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,m=t.applyServiceFactory?.(e,u)??new Hd({vaultPath:u,ref:e.ref??"main",mount:new Oi({token:h,mountBaseStore:uu(u)})}),{infos:y,profileLabels:_}=m.scanVault(),b=_.get(r)??r,T;try{T=m.buildDiff({targetProfileUid:r,targetProfileLabel:b,sourceProfileUid:null,sourceProfileLabel:"<unknown>",result:p,infos:y})}catch(R){if(R instanceof Nr.TsFloorViolationError)return l(`[apply-profile] Refused: ${R.message}`),{exitCode:5,stdout:n,stderr:i};throw R}if(!await(t.confirmGate??new Nw({yes:e.yes??!1,verbose:e.verbose??!1,log:a(R=>l(R),"log")})).confirmApply(T.plan))return{exitCode:0,stdout:n,stderr:i};if(T.toDestroy.length===0&&T.toMaterialize.length===0)return c(`[apply-profile] Already in target mount-state for ${b} \u2014 no-op.`),{exitCode:0,stdout:n,stderr:i};let S;try{S=await m.execute(T)}catch(R){return l(`[apply-profile] Execution failed: ${R instanceof Error?R.message:String(R)}`),{exitCode:5,stdout:n,stderr:i}}return c(`[apply-profile] Switched to ${b}: ${S.destroyed.length} AssetSpace(s) torn down, ${S.materialized.length} materialized.`),{exitCode:0,stdout:n,stderr:i}}a(Gye,"runApplyProfile");function p7(){return new fe("apply-profile").description("Apply the specified Profile (mount-state filesystem mutation). Requires --yes for headless mode.").argument("<profile-uid>","Target Profile UID").requiredOption("--vault <path>","Path to Obsidian vault").option("--yes","Confirm apply (headless mode safety override per RFC 22b50a17 Decision #2)",!1).option("--verbose","Print plan summary to stderr before deciding",!1).option("--ref <branch>","Git ref to pull when materialising AssetSpaces","main").option("--token <pat>","GitHub PAT for private-repo materialisation (or env GITHUB_TOKEN / GH_TOKEN)").action(async(e,t)=>{try{let n=await Gye(e,t);process.exit(n.exitCode)}catch(n){se.handle(n)}})}a(p7,"applyProfileCommand");ct();var Kd=require("node:path"),fu=require("node:fs"),h7=J(We());Pt();qt();function m7(){return new fe("bootstrap").description("Bootstrap a vault with the SDK floor AssetSpace (exo). Pulls a tarball from a public GitHub repo, extracts \u043A assetspaces/, writes .gitmodules. Only --exo is required \u2014 bootstrap installs only the SDK platform. exocmd (the optional UI-command library) and any other AssetSpace are added afterwards via `exocortex assetspace add`. Example URL: https://github.com/kitelev/exoas-exo.").requiredOption("--vault <path>","Path \u043A target vault").requiredOption("--exo <url>","Public GitHub URL \u0434\u043B\u044F exo TBox AssetSpace (e.g. https://github.com/kitelev/exoas-exo)").option("--ref <branch>","Branch ref \u043A pull from","main").option("--token <pat>","GitHub PAT for private repos (or env GITHUB_TOKEN / GH_TOKEN). Optional \u2014 anonymous for public repos.").option("--json","Emit result as JSON",!1).action(async r=>{try{if(!r.vault)throw new Xe("--vault is required");let e=(0,Kd.resolve)(r.vault);(0,fu.mkdirSync)(e,{recursive:!0});let t=(0,Kd.join)(e,".gitmodules"),n=(0,Kd.join)(e,"assetspaces");if((0,fu.existsSync)(t))throw new Xe(`Vault ${e} already has .gitmodules \u2014 refusing \u043A re-bootstrap. Use \`assetspace add\` \u0434\u043B\u044F individual AS.`);if((0,fu.existsSync)(n)&&(0,fu.readdirSync)(n).length>0)throw new Xe(`Vault ${e}/assetspaces/ already has content \u2014 refusing \u043A re-bootstrap.`);let i=r.token||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,s=new Oi({token:i,mountBaseStore:uu(e)}),o=r.ref??"main",c=[],l=(0,h7.derivePath)(r.exo)??"assetspaces/exo",u=(0,Kd.join)(e,l);process.stderr.write(`[bootstrap] Pulling ${r.exo}@${o} \u2192 ${l}/...
640
640
  `);let f=await s.pullAssetSpace(r.exo,o,u);if(s.ensureGitmodulesEntry(e,l,r.exo),c.push({folder:l,url:r.exo,sha:f.sha,fileCount:f.fileCount}),r.json)process.stdout.write(JSON.stringify({vault:e,materialized:c},null,2)+`
641
641
  `);else{process.stdout.write(`
642
642
  \u2713 Bootstrap complete
@@ -648,7 +648,7 @@ Next steps:
648
648
  `),process.stdout.write(` 2. git add . && git commit -m "feat: bootstrap vault"
649
649
  `),process.stdout.write(` 3. (optional) Add the exocmd UI-command library: \`exocortex assetspace add --vault ${e} --url https://github.com/kitelev/exoas-exocmd\`
650
650
  `),process.stdout.write(` 4. Add additional AssetSpaces via \`exocortex assetspace add --vault ${e} --url <github-url>\`
651
- `)}process.exit(0)}catch(e){se.handle(e)}})}a(m7,"bootstrapCommand");ct();var kw=require("node:path"),g7=require("node:fs"),y7=J(We());Pt();qt();function Gye(r,e){return e!==void 0&&e.length>0?`assetspaces/${e}`:(0,y7.derivePath)(r)??`assetspaces/${Oi.deriveFolderName(r)}`}a(Gye,"resolveAddAssetSpacePath");function _7(){return new fe("assetspace-add").description("Phase 6.3: add single AssetSpace \u043A existing vault by public GitHub URL. Pulls tarball, extracts \u043A assetspaces/<folder>/, updates .gitmodules.").requiredOption("--vault <path>","Path \u043A target vault").requiredOption("--url <url>","Public GitHub URL \u0434\u043B\u044F the AssetSpace (e.g. https://github.com/kitelev/exoas-pmbok-ontology)").option("--folder <name>","Local folder name \u043F\u043E\u0434 assetspaces/. Defaults \u043A URL-derived (strips exoas- prefix)").option("--ref <branch>","Branch ref \u043A pull from","main").option("--token <pat>","GitHub PAT for private repos (or env GITHUB_TOKEN / GH_TOKEN). Optional \u2014 anonymous for public repos.").option("--json","Emit result as JSON",!1).action(async r=>{try{if(!r.vault)throw new Xe("--vault is required");if(!r.url)throw new Xe("--url is required");let e=(0,kw.resolve)(r.vault);if(!(0,g7.existsSync)(e))throw new Me(e);let t=r.token||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,n=new Oi({token:t,mountBaseStore:uu(e)}),i=r.ref??"main",s=Gye(r.url,r.folder),o=(0,kw.join)(e,s);process.stderr.write(`[assetspace-add] Pulling ${r.url}@${i} \u2192 ${s}/...
651
+ `)}process.exit(0)}catch(e){se.handle(e)}})}a(m7,"bootstrapCommand");ct();var kw=require("node:path"),g7=require("node:fs"),y7=J(We());Pt();qt();function qye(r,e){return e!==void 0&&e.length>0?`assetspaces/${e}`:(0,y7.derivePath)(r)??`assetspaces/${Oi.deriveFolderName(r)}`}a(qye,"resolveAddAssetSpacePath");function _7(){return new fe("assetspace-add").description("Phase 6.3: add single AssetSpace \u043A existing vault by public GitHub URL. Pulls tarball, extracts \u043A assetspaces/<folder>/, updates .gitmodules.").requiredOption("--vault <path>","Path \u043A target vault").requiredOption("--url <url>","Public GitHub URL \u0434\u043B\u044F the AssetSpace (e.g. https://github.com/kitelev/exoas-pmbok-ontology)").option("--folder <name>","Local folder name \u043F\u043E\u0434 assetspaces/. Defaults \u043A URL-derived (strips exoas- prefix)").option("--ref <branch>","Branch ref \u043A pull from","main").option("--token <pat>","GitHub PAT for private repos (or env GITHUB_TOKEN / GH_TOKEN). Optional \u2014 anonymous for public repos.").option("--json","Emit result as JSON",!1).action(async r=>{try{if(!r.vault)throw new Xe("--vault is required");if(!r.url)throw new Xe("--url is required");let e=(0,kw.resolve)(r.vault);if(!(0,g7.existsSync)(e))throw new Me(e);let t=r.token||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,n=new Oi({token:t,mountBaseStore:uu(e)}),i=r.ref??"main",s=qye(r.url,r.folder),o=(0,kw.join)(e,s);process.stderr.write(`[assetspace-add] Pulling ${r.url}@${i} \u2192 ${s}/...
652
652
  `);let c=await n.pullAssetSpace(r.url,i,o),l=n.ensureGitmodulesEntry(e,s,r.url);r.json?process.stdout.write(JSON.stringify({vault:e,folder:s,url:r.url,sha:c.sha,fileCount:c.fileCount,gitmodulesEntryAdded:l.added},null,2)+`
653
653
  `):(process.stdout.write(`
654
654
  \u2713 AssetSpace added
@@ -656,17 +656,17 @@ Next steps:
656
656
  `),process.stdout.write(` URL: ${r.url}
657
657
  `),process.stdout.write(` SHA: ${c.sha} (${c.fileCount} files)
658
658
  `),process.stdout.write(` .gitmodules: ${l.added?"entry added":"entry already present"}
659
- `)),process.exit(0)}catch(e){se.handle(e)}})}a(_7,"assetSpaceAddCommand");ct();var Mw=require("node:path"),jO=require("node:fs"),Yd=J(We());Pt();qt();mr();function qye(r){if(r.folder!==void 0&&r.folder.length>0)return r.folder.startsWith("assetspaces/")?r.folder:`assetspaces/${r.folder}`;if(r.url!==void 0&&r.url.length>0)return(0,Yd.derivePath)(r.url)??`assetspaces/${Oi.deriveFolderName(r.url)}`;throw new Xe("either --folder or --url is required","exocortex assetspace-remove --vault <path> (--folder <mount-path> | --url <url>)")}a(qye,"resolveRemoveAssetSpacePath");async function Wye(r,e={}){let t=[],n=[],i=a(h=>{t.push(h),(e.out??(m=>process.stdout.write(`${m}
659
+ `)),process.exit(0)}catch(e){se.handle(e)}})}a(_7,"assetSpaceAddCommand");ct();var Mw=require("node:path"),jO=require("node:fs"),Yd=J(We());Pt();qt();mr();function Wye(r){if(r.folder!==void 0&&r.folder.length>0)return r.folder.startsWith("assetspaces/")?r.folder:`assetspaces/${r.folder}`;if(r.url!==void 0&&r.url.length>0)return(0,Yd.derivePath)(r.url)??`assetspaces/${Oi.deriveFolderName(r.url)}`;throw new Xe("either --folder or --url is required","exocortex assetspace-remove --vault <path> (--folder <mount-path> | --url <url>)")}a(Wye,"resolveRemoveAssetSpacePath");async function Hye(r,e={}){let t=[],n=[],i=a(h=>{t.push(h),(e.out??(m=>process.stdout.write(`${m}
660
660
  `)))(h)},"out"),s=a(h=>{n.push(h),(e.err??(m=>process.stderr.write(`${m}
661
- `)))(h)},"err");if(!r.vault)throw new Xe("--vault is required");let o=(0,Mw.resolve)(r.vault);if(!(0,jO.existsSync)(o))throw new Me(o);let c=qye(r),u=(e.scanInfos?.(o)??new Hd({vaultPath:o}).scanVault().infos).find(h=>h.folderName===c);if(u!==void 0&&(0,Yd.isTsFloorAssetSpace)(u.uid,u.namespace)||(0,Yd.isTsFloorMountPath)(c)){let h=u?.label??c,m=u?`${u.namespace||u.uid}`:"path resolves to a floor namespace";return s(`[assetspace-remove] Refused: \xAB${h}\xBB (${m}) is a TS-floor AssetSpace \u2014 unmounting it would self-brick the runtime (R24). Aborted, no changes made.`),{exitCode:5,stdout:t,stderr:n,removed:!1,folder:c}}let d=(0,jO.existsSync)((0,Mw.join)(o,c)),p=e.unmount??((h,m)=>new Oi().unmountAssetSpace(h,m));try{p(o,c)}catch(h){return s(`[assetspace-remove] Unmount failed: ${h instanceof Error?h.message:String(h)}`),{exitCode:5,stdout:t,stderr:n,removed:!1,folder:c}}return r.json?i(JSON.stringify({vault:o,folder:c,existedBefore:d,unmounted:!0},null,2)):d?(i(`
661
+ `)))(h)},"err");if(!r.vault)throw new Xe("--vault is required");let o=(0,Mw.resolve)(r.vault);if(!(0,jO.existsSync)(o))throw new Me(o);let c=Wye(r),u=(e.scanInfos?.(o)??new Hd({vaultPath:o}).scanVault().infos).find(h=>h.folderName===c);if(u!==void 0&&(0,Yd.isTsFloorAssetSpace)(u.uid,u.namespace)||(0,Yd.isTsFloorMountPath)(c)){let h=u?.label??c,m=u?`${u.namespace||u.uid}`:"path resolves to a floor namespace";return s(`[assetspace-remove] Refused: \xAB${h}\xBB (${m}) is a TS-floor AssetSpace \u2014 unmounting it would self-brick the runtime (R24). Aborted, no changes made.`),{exitCode:5,stdout:t,stderr:n,removed:!1,folder:c}}let d=(0,jO.existsSync)((0,Mw.join)(o,c)),p=e.unmount??((h,m)=>new Oi().unmountAssetSpace(h,m));try{p(o,c)}catch(h){return s(`[assetspace-remove] Unmount failed: ${h instanceof Error?h.message:String(h)}`),{exitCode:5,stdout:t,stderr:n,removed:!1,folder:c}}return r.json?i(JSON.stringify({vault:o,folder:c,existedBefore:d,unmounted:!0},null,2)):d?(i(`
662
662
  \u2713 AssetSpace unmounted`),i(` Folder: ${c} (removed from vault + .gitmodules)`)):(i(`
663
- \u2713 AssetSpace already absent \u2014 .gitmodules stanza stripped (no-op)`),i(` Folder: ${c}`)),{exitCode:0,stdout:t,stderr:n,removed:!0,folder:c}}a(Wye,"runAssetSpaceRemove");function b7(){return new fe("assetspace-remove").description("Unmount a single AssetSpace (inverse of assetspace-add). Strips its .gitmodules stanza and deletes the mount folder. TS-floor AssetSpaces ({exo}) are refused.").requiredOption("--vault <path>","Path to target vault").option("--folder <path>","Vault-relative mount path to unmount (e.g. assetspaces/kitelev/exoas-pmbok-ontology). Takes precedence over --url.").option("--url <url>","Public GitHub URL of the AssetSpace \u2014 derives the canonical mount path (parity with assetspace-add).").option("--json","Emit result as JSON",!1).action(async r=>{try{let e=await Wye(r);process.exit(e.exitCode)}catch(e){se.handle(e)}})}a(b7,"assetSpaceRemoveCommand");ct();var w7=require("node:path"),E7=require("node:fs");var jw=J(Ta()),$O=J(require("path")),Qd=J(We());var $w=class{static{a(this,"RegistryDependencyResolver")}constructor(e={}){this.warn=e.warn??(()=>{})}async resolve(e,t){let n=await this.scanRegistry(e),i=this.matchSelf(n,t);if(i===null)return{outcome:"self-not-found",selfIdentifier:t,descriptorCount:n.size};let s=new Map;for(let y of n.values())y.dependsOn.length>0&&s.set(y.uid,y.dependsOn);let o=(0,Qd.transitiveDependsOnClosure)([i.uid],s);o.delete(i.uid);let c=[],l=new Set,u=new Set([i.uid]),f=[...i.dependsOn];for(;f.length>0;){let y=f.shift();if(y===void 0||u.has(y))continue;u.add(y),o.has(y)&&!l.has(y)&&(c.push(y),l.add(y));let _=n.get(y);if(_!==void 0)for(let b of _.dependsOn)u.has(b)||f.push(b)}for(let y of o)l.has(y)||(c.push(y),l.add(y));let d=[],p=[];for(let y of c){let _=n.get(y);_===void 0?p.push(y):d.push(_)}let h=d.filter(y=>y.source===null||y.source.length===0),m=d.filter(y=>y.source!==null&&y.source.length>0&&!Hye(y.source));return{outcome:"resolved",self:i,dependencies:d,missingDescriptors:p,sourceless:h,unsafeSources:m}}matchSelf(e,t){let n=S7(t);if(n!==null)for(let i of e.values()){if(i.source===null)continue;let s=S7(i.source);if(s!==null&&s===n)return i}for(let i of e.values())if(i.namespace!==null&&i.namespace===t)return i;return null}async scanRegistry(e){let t=new Map,n=$O.default.resolve(e);if(!await jw.default.pathExists(n))return this.warn(`[RegistryDependencyResolver] registry path does not exist: ${n}`),t;let i=[n];for(;i.length>0;){let s=i.pop(),o;try{o=await jw.default.readdir(s,{withFileTypes:!0})}catch{continue}for(let c of o){let l=$O.default.join(s,c.name);if(c.isDirectory()){if(c.name.startsWith(".")||c.name==="node_modules"||c.name===".obsidian"||c.name===".exocortex")continue;i.push(l);continue}if(!c.isFile()||!c.name.endsWith(".md"))continue;let u=await this.tryReadFrontmatter(l);if(u===null||!ja(u.exo__Instance_class).some(y=>y===Xm))continue;let d=u.exo__Asset_uid;if(typeof d!="string"||d.length===0)continue;let p=typeof u.exo__AssetSpace_source=="string"?u.exo__AssetSpace_source:typeof u.exo__AssetSpace_git=="string"?u.exo__AssetSpace_git:null,h=typeof u.exo__AssetSpace_namespace=="string"?u.exo__AssetSpace_namespace:null,m=ja(u.exo__AssetSpace_dependsOn);t.has(d)&&this.warn(`[RegistryDependencyResolver] duplicate AssetSpace descriptor for uid=${d} \u2014 last wins (${l})`),t.set(d,{uid:d,namespace:h,source:p,dependsOn:m})}}return t}async tryReadFrontmatter(e){let t;try{t=await jw.default.readFile(e,"utf-8")}catch{return null}if(!t.startsWith("---"))return null;let n=t.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(n===null)return null;try{let i=(0,Qd.parseYamlFrontmatterTolerant)(n[1],e);return i&&typeof i=="object"&&!Array.isArray(i)?i:null}catch{return null}}};function S7(r){let e=r.trim();if(e.length===0)return null;let t=(0,Qd.derivePath)(e);if(t!==null)return t.replace(/^assetspaces\//,"").toLowerCase();if(!e.includes("://")&&!e.includes("@")){let i=e.replace(/\.git$/i,"").replace(/\/+$/,"").split("/").filter(s=>s.length>0);if(i.length===2)return`${i[0]}/${i[1]}`.toLowerCase()}return null}a(S7,"ownerRepoSlug");function Hye(r){return typeof r!="string"||r.length===0||/[\s\x00-\x1f]/.test(r)||r.startsWith("-")||/^(ext|file|fd|ftp|ftps)::/i.test(r)?!1:!!(/^https?:\/\/[^\s]+$/i.test(r)||/^ssh:\/\/[^\s]+$/i.test(r)||/^git:\/\/[^\s]+$/i.test(r)||/^[A-Za-z0-9._-]+@[A-Za-z0-9._-]+:[^\s]+$/.test(r))}a(Hye,"isSafeCloneUrl");Pt();qt();async function zye(r,e={}){let t=e.out??(l=>process.stdout.write(`${l}
663
+ \u2713 AssetSpace already absent \u2014 .gitmodules stanza stripped (no-op)`),i(` Folder: ${c}`)),{exitCode:0,stdout:t,stderr:n,removed:!0,folder:c}}a(Hye,"runAssetSpaceRemove");function b7(){return new fe("assetspace-remove").description("Unmount a single AssetSpace (inverse of assetspace-add). Strips its .gitmodules stanza and deletes the mount folder. TS-floor AssetSpaces ({exo}) are refused.").requiredOption("--vault <path>","Path to target vault").option("--folder <path>","Vault-relative mount path to unmount (e.g. assetspaces/kitelev/exoas-pmbok-ontology). Takes precedence over --url.").option("--url <url>","Public GitHub URL of the AssetSpace \u2014 derives the canonical mount path (parity with assetspace-add).").option("--json","Emit result as JSON",!1).action(async r=>{try{let e=await Hye(r);process.exit(e.exitCode)}catch(e){se.handle(e)}})}a(b7,"assetSpaceRemoveCommand");ct();var w7=require("node:path"),E7=require("node:fs");var jw=J(Ta()),$O=J(require("path")),Qd=J(We());var $w=class{static{a(this,"RegistryDependencyResolver")}constructor(e={}){this.warn=e.warn??(()=>{})}async resolve(e,t){let n=await this.scanRegistry(e),i=this.matchSelf(n,t);if(i===null)return{outcome:"self-not-found",selfIdentifier:t,descriptorCount:n.size};let s=new Map;for(let y of n.values())y.dependsOn.length>0&&s.set(y.uid,y.dependsOn);let o=(0,Qd.transitiveDependsOnClosure)([i.uid],s);o.delete(i.uid);let c=[],l=new Set,u=new Set([i.uid]),f=[...i.dependsOn];for(;f.length>0;){let y=f.shift();if(y===void 0||u.has(y))continue;u.add(y),o.has(y)&&!l.has(y)&&(c.push(y),l.add(y));let _=n.get(y);if(_!==void 0)for(let b of _.dependsOn)u.has(b)||f.push(b)}for(let y of o)l.has(y)||(c.push(y),l.add(y));let d=[],p=[];for(let y of c){let _=n.get(y);_===void 0?p.push(y):d.push(_)}let h=d.filter(y=>y.source===null||y.source.length===0),m=d.filter(y=>y.source!==null&&y.source.length>0&&!zye(y.source));return{outcome:"resolved",self:i,dependencies:d,missingDescriptors:p,sourceless:h,unsafeSources:m}}matchSelf(e,t){let n=S7(t);if(n!==null)for(let i of e.values()){if(i.source===null)continue;let s=S7(i.source);if(s!==null&&s===n)return i}for(let i of e.values())if(i.namespace!==null&&i.namespace===t)return i;return null}async scanRegistry(e){let t=new Map,n=$O.default.resolve(e);if(!await jw.default.pathExists(n))return this.warn(`[RegistryDependencyResolver] registry path does not exist: ${n}`),t;let i=[n];for(;i.length>0;){let s=i.pop(),o;try{o=await jw.default.readdir(s,{withFileTypes:!0})}catch{continue}for(let c of o){let l=$O.default.join(s,c.name);if(c.isDirectory()){if(c.name.startsWith(".")||c.name==="node_modules"||c.name===".obsidian"||c.name===".exocortex")continue;i.push(l);continue}if(!c.isFile()||!c.name.endsWith(".md"))continue;let u=await this.tryReadFrontmatter(l);if(u===null||!ja(u.exo__Instance_class).some(y=>y===Xm))continue;let d=u.exo__Asset_uid;if(typeof d!="string"||d.length===0)continue;let p=typeof u.exo__AssetSpace_source=="string"?u.exo__AssetSpace_source:typeof u.exo__AssetSpace_git=="string"?u.exo__AssetSpace_git:null,h=typeof u.exo__AssetSpace_namespace=="string"?u.exo__AssetSpace_namespace:null,m=ja(u.exo__AssetSpace_dependsOn);t.has(d)&&this.warn(`[RegistryDependencyResolver] duplicate AssetSpace descriptor for uid=${d} \u2014 last wins (${l})`),t.set(d,{uid:d,namespace:h,source:p,dependsOn:m})}}return t}async tryReadFrontmatter(e){let t;try{t=await jw.default.readFile(e,"utf-8")}catch{return null}if(!t.startsWith("---"))return null;let n=t.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(n===null)return null;try{let i=(0,Qd.parseYamlFrontmatterTolerant)(n[1],e);return i&&typeof i=="object"&&!Array.isArray(i)?i:null}catch{return null}}};function S7(r){let e=r.trim();if(e.length===0)return null;let t=(0,Qd.derivePath)(e);if(t!==null)return t.replace(/^assetspaces\//,"").toLowerCase();if(!e.includes("://")&&!e.includes("@")){let i=e.replace(/\.git$/i,"").replace(/\/+$/,"").split("/").filter(s=>s.length>0);if(i.length===2)return`${i[0]}/${i[1]}`.toLowerCase()}return null}a(S7,"ownerRepoSlug");function zye(r){return typeof r!="string"||r.length===0||/[\s\x00-\x1f]/.test(r)||r.startsWith("-")||/^(ext|file|fd|ftp|ftps)::/i.test(r)?!1:!!(/^https?:\/\/[^\s]+$/i.test(r)||/^ssh:\/\/[^\s]+$/i.test(r)||/^git:\/\/[^\s]+$/i.test(r)||/^[A-Za-z0-9._-]+@[A-Za-z0-9._-]+:[^\s]+$/.test(r))}a(zye,"isSafeCloneUrl");Pt();qt();async function Kye(r,e={}){let t=e.out??(l=>process.stdout.write(`${l}
664
664
  `)),n=e.err??(l=>process.stderr.write(`${l}
665
- `));if(!r.registry)throw new Xe("--registry <path> is required");if(!r.self)throw new Xe("--self <owner/repo | git-url | namespace> is required");let i=(0,w7.resolve)(r.registry);if(!(0,E7.existsSync)(i))throw new Xe(`Registry path does not exist: ${i}`,"Clone kitelev/exoas-registry first, then pass --registry <path>");let o=await new $w({warn:a(l=>n(l),"warn")}).resolve(i,r.self),c=r.format??"urls";if(o.outcome==="self-not-found"){let l=`[resolve-deps] self '${r.self}' not found among ${o.descriptorCount} registry descriptor(s) \u2014 validating standalone (no dependencies to materialise).`;return r.strict?(n(`[resolve-deps] STRICT: self '${r.self}' not registered. Add an exo__AssetSpace descriptor to kitelev/exoas-registry.`),c==="json"&&t(JSON.stringify(o,null,2)),{exitCode:2,outcome:o}):(n(l),c==="json"&&t(JSON.stringify(o,null,2)),{exitCode:0,outcome:o})}if(o.missingDescriptors.length>0&&n(`[resolve-deps] \u26A0\uFE0F ${o.missingDescriptors.length} dangling dependsOn edge(s) (no descriptor in registry): `+o.missingDescriptors.join(", ")),o.sourceless.length>0&&n(`[resolve-deps] \u26A0\uFE0F ${o.sourceless.length} dependency descriptor(s) have no source URL (cannot clone): `+o.sourceless.map(l=>l.namespace??l.uid).join(", ")),o.unsafeSources.length>0&&n(`[resolve-deps] \u26A0\uFE0F ${o.unsafeSources.length} dependency source(s) rejected as unsafe git-clone targets (option/transport injection) \u2014 NOT emitted: `+o.unsafeSources.map(l=>`${l.namespace??l.uid}=${l.source}`).join(", ")),c==="json")t(JSON.stringify(o,null,2));else{let l=new Set(o.unsafeSources.map(u=>u.uid));for(let u of o.dependencies)u.source&&u.source.length>0&&!l.has(u.uid)&&t(u.source)}return{exitCode:0,outcome:o}}a(zye,"runResolveDeps");function v7(){return new fe("resolve-deps").description("Resolve an AssetSpace repo's transitive dependsOn closure from the central registry and print dependency clone URLs (issue #3513). Used by the per-AssetSpace SHACL CI gate to materialise dependent TBox.").requiredOption("--registry <path>","Path to a checked-out central registry (kitelev/exoas-registry)").requiredOption("--self <id>","Identity of the calling repo: an owner/repo slug (e.g. kitelev/exoas-exo, matches GitHub's github.repository), a full git URL, or a bare namespace").option("--format <type>","Output format: urls (one clone URL per line) | json (full diagnostics)","urls").option("--strict","Exit non-zero (2) when self is not registered, instead of validating standalone",!1).action(async r=>{try{let{exitCode:e}=await zye(r);process.exit(e)}catch(e){se.handle(e)}})}a(v7,"resolveDepsCommand");ct();function T7(){let r=new fe("cache").description("SPARQL query-result cache maintenance (clear / stats). For read-after-write, prefer `query --no-cache` or a short `--cache-ttl`.");return r.addCommand(Kye()),r.addCommand(Yye()),r}a(T7,"cacheCommand");function Kye(){return new fe("clear").description("Remove all cached SPARQL query results from disk").option("--output <format>","Output format: text | json","text").action(async r=>{let e=new xa,t=await e.getCacheStats();if(await e.clear(),r.output==="json"){console.log(JSON.stringify({success:!0,data:{action:"clear",cacheDir:e.getCacheDir(),clearedEntries:t.entryCount,freedBytes:t.totalSizeBytes}}));return}console.log(`\u{1F5D1}\uFE0F Cleared ${t.entryCount} cached query result(s) (${A7(t.totalSizeBytes)} freed) from ${e.getCacheDir()}`)})}a(Kye,"cacheClearCommand");function Yye(){return new fe("stats").description("Show query-result cache entry count and total size").option("--output <format>","Output format: text | json","text").action(async r=>{let e=new xa,t=await e.getCacheStats();if(r.output==="json"){console.log(JSON.stringify({success:!0,data:{cacheDir:e.getCacheDir(),entryCount:t.entryCount,totalSizeBytes:t.totalSizeBytes}}));return}console.log(`\u{1F4CA} SPARQL query-result cache: ${e.getCacheDir()}`),console.log(` Entries: ${t.entryCount.toLocaleString()}`),console.log(` Size: ${A7(t.totalSizeBytes)}`)})}a(Yye,"cacheStatsCommand");function A7(r){return r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:`${(r/(1024*1024)).toFixed(1)} MB`}a(A7,"formatBytes");ct();var k7=require("readline");function I7(r){let e=r.aliases;if(e!==void 0&&(!Array.isArray(e)||e.some(n=>typeof n!="string")))return"`aliases` must be an array of strings";if(r.body!==void 0&&typeof r.body!="string")return"`body` must be a string";if(r.status!==void 0&&typeof r.status!="string"&&r.status!==!1)return"`status` must be a status name or false";let t=r.properties;if(t!==void 0){if(typeof t!="object"||t===null||Array.isArray(t))return"`properties` must be an object";for(let[n,i]of Object.entries(t))if((Array.isArray(i)?i:[i]).some(o=>typeof o!="string"))return`property \`${n}\` must be a string or an array of strings`}return null}a(I7,"invalidCreateAssetShape");function R7(r){let e=["create","--vault",r.vault,"--class",r.class,"--label",r.label];for(let t of r.aliases??[])e.push("--aliases",t);for(let[t,n]of Object.entries(r.properties??{})){let i=Array.isArray(n)?n:[n];for(let s of i)e.push("--property",`${t}=${s}`)}return r.body!==void 0&&e.push("--body",r.body),r.status===!1?e.push("--no-status"):typeof r.status=="string"&&e.push("--status",r.status),r.validate!==!1&&e.push("--validate"),r.dryRun&&e.push("--dry-run"),e}a(R7,"buildCreateAssetArgs");function C7(r){let e=["apply",r.command,r.target,"--vault",r.vault,"--json","--yes"];return r.input!==void 0&&e.push("--input",JSON.stringify(r.input)),r.dryRun&&e.push("--dry-run"),e}a(C7,"buildCreateEffortArgs");var Qye={oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},x7=[{name:"create_asset",description:"Create a vault asset through the Exocortex creation pipeline (co-location by exo__Asset_isDefinedBy, dangling-wikilink rejection, unknown-property-name rejection and \u2014 by default \u2014 SHACL-lite conformance validation before the file is written). Values are passed as an argument vector, so labels, bodies and property values containing $, backticks, quotes, parentheses or newlines are preserved byte-identically.",inputSchema:{type:"object",properties:{vault:{type:"string",description:"Path to the Obsidian vault."},class:{type:"string",description:"Class UUID or short name (e.g. ems__Task)."},label:{type:"string",description:"exo__Asset_label for the new asset."},properties:{type:"object",description:"Frontmatter properties. A string sets one value; an array of strings sets a multi-value (YAML array) property.",additionalProperties:Qye},aliases:{type:"array",items:{type:"string"},description:"Additional aliases."},body:{type:"string",description:"Markdown body of the asset."},status:{type:["string","boolean"],description:"ems__Effort_status name for a status-bearing class (e.g. Backlog, Doing). Pass false to create a status-less asset. Omit for the CLI default."},validate:{type:"boolean",default:!0,description:"Run the pre-write SHACL-lite conformance gate. Defaults to true; pass false to skip it."},dryRun:{type:"boolean",description:"Preview without writing the file."}},required:["vault","class","label"],additionalProperties:!1}},{name:"create_effort",description:"Create an effort (Task / Project / Area / \u2026) by applying a homoiconic Exocortex command to a target asset \u2014 the canonical effort-creation path. Returns the {command,target,created:[{uuid,path,label}]} envelope.",inputSchema:{type:"object",properties:{vault:{type:"string",description:"Path to the Obsidian vault."},command:{type:"string",description:"Command cliName slug (e.g. create-task) or command UUID."},target:{type:"string",description:"Vault-relative path to the target asset the command is applied to."},input:{type:"object",description:`userInput for the command's grounding (serialised as JSON), e.g. {"value":"New label"}.`},dryRun:{type:"boolean",description:"Preview without writing."}},required:["vault","command","target"],additionalProperties:!1}}];var Xye="2024-11-05",F7=-32700,O7=-32600,Jye=-32601,D7=-32603;function Xd(r,e=!1){return e?{content:[{type:"text",text:r}],isError:!0}:{content:[{type:"text",text:r}]}}a(Xd,"textResult");function Zye(r){let e=r.split(`
666
- `).map(n=>n.trim()).filter(n=>n.length>0),t=e[e.length-1];if(t!==void 0)try{return JSON.parse(t)}catch{return}}a(Zye,"parseLastJsonLine");function P7(r,e){return e.filter(t=>{let n=r[t];return typeof n!="string"||n.trim().length===0})}a(P7,"missingStringFields");var Uw=class{constructor(e){this.deps=e}static{a(this,"McpServer")}async handle(e){if(typeof e!="object"||e===null||Array.isArray(e))return{jsonrpc:"2.0",id:null,error:{code:O7,message:"Invalid request: expected a JSON-RPC object"}};let t=e.id,n=t===void 0;if(typeof e.method!="string")return n?null:{jsonrpc:"2.0",id:t??null,error:{code:O7,message:"Invalid request: missing method"}};if(n)return null;let i=t??null;switch(e.method){case"initialize":return{jsonrpc:"2.0",id:i,result:{protocolVersion:Xye,capabilities:{tools:{}},serverInfo:{name:"exocortex",version:this.deps.version}}};case"ping":return{jsonrpc:"2.0",id:i,result:{}};case"tools/list":return{jsonrpc:"2.0",id:i,result:{tools:x7}};case"tools/call":return{jsonrpc:"2.0",id:i,result:await this.callTool(e.params??{})};default:return{jsonrpc:"2.0",id:i,error:{code:Jye,message:`Method not found: ${e.method}`}}}}async callTool(e){let t=e.name,n=e.arguments??{},i;if(t==="create_asset"){let c=P7(n,["vault","class","label"]);if(c.length>0)return Xd(`create_asset: missing required argument(s): ${c.join(", ")}`,!0);let l=I7(n);if(l!==null)return Xd(`create_asset: ${l}`,!0);i=R7(n)}else if(t==="create_effort"){let c=P7(n,["vault","command","target"]);if(c.length>0)return Xd(`create_effort: missing required argument(s): ${c.join(", ")}`,!0);i=C7(n)}else return Xd(`Unknown tool: ${String(t)}`,!0);let s=await this.deps.runCli(i);if(s.exitCode!==0){let c=s.stderr.trim()||s.stdout.trim()||"(no diagnostic output)";return Xd(`exocortex-cli exited ${s.exitCode}
667
- ${c}`,!0)}let o=Zye(s.stdout);return Xd(o===void 0?s.stdout.trim():JSON.stringify(o))}};var L7=require("child_process");var e0e=32*1024*1024;function N7(r){return e=>new Promise(t=>{(0,L7.execFile)(process.execPath,[r,...e],{maxBuffer:e0e},(n,i,s)=>{let o=0;if(n){let c=n.code;o=typeof c=="number"?c:1}t({stdout:i,stderr:s,exitCode:o})})})}a(N7,"createSelfCliRunner");async function t0e(r,e,t){let n=(0,k7.createInterface)({input:e,crlfDelay:1/0});for await(let i of n){let s=i.trim();if(s.length===0)continue;let o;try{o=JSON.parse(s)}catch{t(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:F7,message:"Parse error: invalid JSON"}})+`
665
+ `));if(!r.registry)throw new Xe("--registry <path> is required");if(!r.self)throw new Xe("--self <owner/repo | git-url | namespace> is required");let i=(0,w7.resolve)(r.registry);if(!(0,E7.existsSync)(i))throw new Xe(`Registry path does not exist: ${i}`,"Clone kitelev/exoas-registry first, then pass --registry <path>");let o=await new $w({warn:a(l=>n(l),"warn")}).resolve(i,r.self),c=r.format??"urls";if(o.outcome==="self-not-found"){let l=`[resolve-deps] self '${r.self}' not found among ${o.descriptorCount} registry descriptor(s) \u2014 validating standalone (no dependencies to materialise).`;return r.strict?(n(`[resolve-deps] STRICT: self '${r.self}' not registered. Add an exo__AssetSpace descriptor to kitelev/exoas-registry.`),c==="json"&&t(JSON.stringify(o,null,2)),{exitCode:2,outcome:o}):(n(l),c==="json"&&t(JSON.stringify(o,null,2)),{exitCode:0,outcome:o})}if(o.missingDescriptors.length>0&&n(`[resolve-deps] \u26A0\uFE0F ${o.missingDescriptors.length} dangling dependsOn edge(s) (no descriptor in registry): `+o.missingDescriptors.join(", ")),o.sourceless.length>0&&n(`[resolve-deps] \u26A0\uFE0F ${o.sourceless.length} dependency descriptor(s) have no source URL (cannot clone): `+o.sourceless.map(l=>l.namespace??l.uid).join(", ")),o.unsafeSources.length>0&&n(`[resolve-deps] \u26A0\uFE0F ${o.unsafeSources.length} dependency source(s) rejected as unsafe git-clone targets (option/transport injection) \u2014 NOT emitted: `+o.unsafeSources.map(l=>`${l.namespace??l.uid}=${l.source}`).join(", ")),c==="json")t(JSON.stringify(o,null,2));else{let l=new Set(o.unsafeSources.map(u=>u.uid));for(let u of o.dependencies)u.source&&u.source.length>0&&!l.has(u.uid)&&t(u.source)}return{exitCode:0,outcome:o}}a(Kye,"runResolveDeps");function v7(){return new fe("resolve-deps").description("Resolve an AssetSpace repo's transitive dependsOn closure from the central registry and print dependency clone URLs (issue #3513). Used by the per-AssetSpace SHACL CI gate to materialise dependent TBox.").requiredOption("--registry <path>","Path to a checked-out central registry (kitelev/exoas-registry)").requiredOption("--self <id>","Identity of the calling repo: an owner/repo slug (e.g. kitelev/exoas-exo, matches GitHub's github.repository), a full git URL, or a bare namespace").option("--format <type>","Output format: urls (one clone URL per line) | json (full diagnostics)","urls").option("--strict","Exit non-zero (2) when self is not registered, instead of validating standalone",!1).action(async r=>{try{let{exitCode:e}=await Kye(r);process.exit(e)}catch(e){se.handle(e)}})}a(v7,"resolveDepsCommand");ct();function T7(){let r=new fe("cache").description("SPARQL query-result cache maintenance (clear / stats). For read-after-write, prefer `query --no-cache` or a short `--cache-ttl`.");return r.addCommand(Yye()),r.addCommand(Qye()),r}a(T7,"cacheCommand");function Yye(){return new fe("clear").description("Remove all cached SPARQL query results from disk").option("--output <format>","Output format: text | json","text").action(async r=>{let e=new xa,t=await e.getCacheStats();if(await e.clear(),r.output==="json"){console.log(JSON.stringify({success:!0,data:{action:"clear",cacheDir:e.getCacheDir(),clearedEntries:t.entryCount,freedBytes:t.totalSizeBytes}}));return}console.log(`\u{1F5D1}\uFE0F Cleared ${t.entryCount} cached query result(s) (${A7(t.totalSizeBytes)} freed) from ${e.getCacheDir()}`)})}a(Yye,"cacheClearCommand");function Qye(){return new fe("stats").description("Show query-result cache entry count and total size").option("--output <format>","Output format: text | json","text").action(async r=>{let e=new xa,t=await e.getCacheStats();if(r.output==="json"){console.log(JSON.stringify({success:!0,data:{cacheDir:e.getCacheDir(),entryCount:t.entryCount,totalSizeBytes:t.totalSizeBytes}}));return}console.log(`\u{1F4CA} SPARQL query-result cache: ${e.getCacheDir()}`),console.log(` Entries: ${t.entryCount.toLocaleString()}`),console.log(` Size: ${A7(t.totalSizeBytes)}`)})}a(Qye,"cacheStatsCommand");function A7(r){return r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:`${(r/(1024*1024)).toFixed(1)} MB`}a(A7,"formatBytes");ct();var k7=require("readline");function I7(r){let e=r.aliases;if(e!==void 0&&(!Array.isArray(e)||e.some(n=>typeof n!="string")))return"`aliases` must be an array of strings";if(r.body!==void 0&&typeof r.body!="string")return"`body` must be a string";if(r.status!==void 0&&typeof r.status!="string"&&r.status!==!1)return"`status` must be a status name or false";let t=r.properties;if(t!==void 0){if(typeof t!="object"||t===null||Array.isArray(t))return"`properties` must be an object";for(let[n,i]of Object.entries(t))if((Array.isArray(i)?i:[i]).some(o=>typeof o!="string"))return`property \`${n}\` must be a string or an array of strings`}return null}a(I7,"invalidCreateAssetShape");function R7(r){let e=["create","--vault",r.vault,"--class",r.class,"--label",r.label];for(let t of r.aliases??[])e.push("--aliases",t);for(let[t,n]of Object.entries(r.properties??{})){let i=Array.isArray(n)?n:[n];for(let s of i)e.push("--property",`${t}=${s}`)}return r.body!==void 0&&e.push("--body",r.body),r.status===!1?e.push("--no-status"):typeof r.status=="string"&&e.push("--status",r.status),r.validate!==!1&&e.push("--validate"),r.dryRun&&e.push("--dry-run"),e}a(R7,"buildCreateAssetArgs");function C7(r){let e=["apply",r.command,r.target,"--vault",r.vault,"--json","--yes"];return r.input!==void 0&&e.push("--input",JSON.stringify(r.input)),r.dryRun&&e.push("--dry-run"),e}a(C7,"buildCreateEffortArgs");var Xye={oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},x7=[{name:"create_asset",description:"Create a vault asset through the Exocortex creation pipeline (co-location by exo__Asset_isDefinedBy, dangling-wikilink rejection, unknown-property-name rejection and \u2014 by default \u2014 SHACL-lite conformance validation before the file is written). Values are passed as an argument vector, so labels, bodies and property values containing $, backticks, quotes, parentheses or newlines are preserved byte-identically.",inputSchema:{type:"object",properties:{vault:{type:"string",description:"Path to the Obsidian vault."},class:{type:"string",description:"Class UUID or short name (e.g. ems__Task)."},label:{type:"string",description:"exo__Asset_label for the new asset."},properties:{type:"object",description:"Frontmatter properties. A string sets one value; an array of strings sets a multi-value (YAML array) property.",additionalProperties:Xye},aliases:{type:"array",items:{type:"string"},description:"Additional aliases."},body:{type:"string",description:"Markdown body of the asset."},status:{type:["string","boolean"],description:"ems__Effort_status name for a status-bearing class (e.g. Backlog, Doing). Pass false to create a status-less asset. Omit for the CLI default."},validate:{type:"boolean",default:!0,description:"Run the pre-write SHACL-lite conformance gate. Defaults to true; pass false to skip it."},dryRun:{type:"boolean",description:"Preview without writing the file."}},required:["vault","class","label"],additionalProperties:!1}},{name:"create_effort",description:"Create an effort (Task / Project / Area / \u2026) by applying a homoiconic Exocortex command to a target asset \u2014 the canonical effort-creation path. Returns the {command,target,created:[{uuid,path,label}]} envelope.",inputSchema:{type:"object",properties:{vault:{type:"string",description:"Path to the Obsidian vault."},command:{type:"string",description:"Command cliName slug (e.g. create-task) or command UUID."},target:{type:"string",description:"Vault-relative path to the target asset the command is applied to."},input:{type:"object",description:`userInput for the command's grounding (serialised as JSON), e.g. {"value":"New label"}.`},dryRun:{type:"boolean",description:"Preview without writing."}},required:["vault","command","target"],additionalProperties:!1}}];var Jye="2024-11-05",F7=-32700,O7=-32600,Zye=-32601,D7=-32603;function Xd(r,e=!1){return e?{content:[{type:"text",text:r}],isError:!0}:{content:[{type:"text",text:r}]}}a(Xd,"textResult");function e0e(r){let e=r.split(`
666
+ `).map(n=>n.trim()).filter(n=>n.length>0),t=e[e.length-1];if(t!==void 0)try{return JSON.parse(t)}catch{return}}a(e0e,"parseLastJsonLine");function P7(r,e){return e.filter(t=>{let n=r[t];return typeof n!="string"||n.trim().length===0})}a(P7,"missingStringFields");var Uw=class{constructor(e){this.deps=e}static{a(this,"McpServer")}async handle(e){if(typeof e!="object"||e===null||Array.isArray(e))return{jsonrpc:"2.0",id:null,error:{code:O7,message:"Invalid request: expected a JSON-RPC object"}};let t=e.id,n=t===void 0;if(typeof e.method!="string")return n?null:{jsonrpc:"2.0",id:t??null,error:{code:O7,message:"Invalid request: missing method"}};if(n)return null;let i=t??null;switch(e.method){case"initialize":return{jsonrpc:"2.0",id:i,result:{protocolVersion:Jye,capabilities:{tools:{}},serverInfo:{name:"exocortex",version:this.deps.version}}};case"ping":return{jsonrpc:"2.0",id:i,result:{}};case"tools/list":return{jsonrpc:"2.0",id:i,result:{tools:x7}};case"tools/call":return{jsonrpc:"2.0",id:i,result:await this.callTool(e.params??{})};default:return{jsonrpc:"2.0",id:i,error:{code:Zye,message:`Method not found: ${e.method}`}}}}async callTool(e){let t=e.name,n=e.arguments??{},i;if(t==="create_asset"){let c=P7(n,["vault","class","label"]);if(c.length>0)return Xd(`create_asset: missing required argument(s): ${c.join(", ")}`,!0);let l=I7(n);if(l!==null)return Xd(`create_asset: ${l}`,!0);i=R7(n)}else if(t==="create_effort"){let c=P7(n,["vault","command","target"]);if(c.length>0)return Xd(`create_effort: missing required argument(s): ${c.join(", ")}`,!0);i=C7(n)}else return Xd(`Unknown tool: ${String(t)}`,!0);let s=await this.deps.runCli(i);if(s.exitCode!==0){let c=s.stderr.trim()||s.stdout.trim()||"(no diagnostic output)";return Xd(`exocortex-cli exited ${s.exitCode}
667
+ ${c}`,!0)}let o=e0e(s.stdout);return Xd(o===void 0?s.stdout.trim():JSON.stringify(o))}};var L7=require("child_process");var t0e=32*1024*1024;function N7(r){return e=>new Promise(t=>{(0,L7.execFile)(process.execPath,[r,...e],{maxBuffer:t0e},(n,i,s)=>{let o=0;if(n){let c=n.code;o=typeof c=="number"?c:1}t({stdout:i,stderr:s,exitCode:o})})})}a(N7,"createSelfCliRunner");async function r0e(r,e,t){let n=(0,k7.createInterface)({input:e,crlfDelay:1/0});for await(let i of n){let s=i.trim();if(s.length===0)continue;let o;try{o=JSON.parse(s)}catch{t(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:F7,message:"Parse error: invalid JSON"}})+`
668
668
  `);continue}let c;try{c=await r.handle(o)}catch(l){c={jsonrpc:"2.0",id:typeof o?.id=="string"||typeof o?.id=="number"?o.id:null,error:{code:D7,message:`Internal error: ${l instanceof Error?l.message:String(l)}`}}}c!==null&&t(JSON.stringify(c)+`
669
- `)}}a(t0e,"runStdioServer");function M7(r){return new fe("mcp").description("Run an MCP (Model Context Protocol) stdio server exposing create_asset / create_effort tools backed by this CLI").option("--entry <path>","Path to the CLI entry script the tools invoke (defaults to this process's script)").action(async e=>{let t=e.entry??process.argv[1],n=new Uw({runCli:N7(t),version:r??"unknown"});await t0e(n,process.stdin,i=>process.stdout.write(i))})}a(M7,"mcpCommand");function Bw(r){let e=new fe;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more").version(r??"16.234.0"),e.addCommand(SB()),e.addCommand(xB()),e.addCommand(h6()),e.addCommand(_6()),e.addCommand(U6()),e.addCommand(b6()),e.addCommand(A6()),e.addCommand(I6()),e.addCommand(z6()),e.addCommand(J6()),e.addCommand(uB()),e.addCommand(pB()),e.addCommand(hB()),e.addCommand(gB()),e.addCommand(yB()),e.addCommand(YB()),e.addCommand(JB()),e.addCommand(p7()),e.addCommand(m7()),e.addCommand(_7()),e.addCommand(b7()),e.addCommand(v7()),e.addCommand(i7()),e.addCommand(u7()),e.addCommand(T7()),e.addCommand(M7(r??"16.234.0")),e}a(Bw,"createProgram");Bw().parse();0&&(module.exports={createProgram});
669
+ `)}}a(r0e,"runStdioServer");function M7(r){return new fe("mcp").description("Run an MCP (Model Context Protocol) stdio server exposing create_asset / create_effort tools backed by this CLI").option("--entry <path>","Path to the CLI entry script the tools invoke (defaults to this process's script)").action(async e=>{let t=e.entry??process.argv[1],n=new Uw({runCli:N7(t),version:r??"unknown"});await r0e(n,process.stdin,i=>process.stdout.write(i))})}a(M7,"mcpCommand");function Bw(r){let e=new fe;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more").version(r??"16.234.1"),e.addCommand(SB()),e.addCommand(xB()),e.addCommand(h6()),e.addCommand(_6()),e.addCommand(U6()),e.addCommand(b6()),e.addCommand(A6()),e.addCommand(I6()),e.addCommand(z6()),e.addCommand(J6()),e.addCommand(uB()),e.addCommand(pB()),e.addCommand(hB()),e.addCommand(gB()),e.addCommand(yB()),e.addCommand(YB()),e.addCommand(JB()),e.addCommand(p7()),e.addCommand(m7()),e.addCommand(_7()),e.addCommand(b7()),e.addCommand(v7()),e.addCommand(i7()),e.addCommand(u7()),e.addCommand(T7()),e.addCommand(M7(r??"16.234.1")),e}a(Bw,"createProgram");Bw().parse();0&&(module.exports={createProgram});
670
670
  /*! Bundled license information:
671
671
 
672
672
  reflect-metadata/Reflect.js: