sml-cli 2026.7.0-rc.32 → 2026.7.0-rc.33

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.
package/dist/index.js CHANGED
@@ -666,10 +666,10 @@ ${r}`,aKr=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),cKr=Obj
666
666
  `),i=[];for(let l of r){let p=l.trim();if(p.startsWith("#")||p==="")i.push(l);else break}return i.some(l=>l.trim().startsWith("#"))?i.join(`
667
667
  `):""},Oxe=n=>{let r=n.split(`
668
668
  `),i=0;for(let a=0;a<r.length;a++){let l=r[a].trim();if(l.startsWith("#")||l==="")i=a+1;else break}return r.slice(i).join(`
669
- `)};var vkr=n=>`${n} is required`,iUe=class n{constructor(r){this.ErrorConstructor=r}forError(r){return new n(r)}should(r,i){if(!r)throw new this.ErrorConstructor(i)}exists(r,i){this.should(r!=null,i),typeof r=="number"&&this.should(!isNaN(r),i)}notEmpty(r,i){let a=r!=null&&r.trim()!=="";this.should(a,i)}allRequired(r){r.forEach(([i,a])=>{let l=vkr(a);typeof i=="string"&&this.notEmpty(i,l),this.exists(i,l)})}ensure(r,i){if(this.exists(r,i),!r)throw new this.ErrorConstructor(i);return r}ensureType(r,i,a){if(i(r))return r;throw new this.ErrorConstructor(a)}},fs=new iUe(Error),zb=fs;var bkr=n=>n?n instanceof Error?n.message:typeof n=="string"?n:`${n}`:"unknown error",Wd={getErrorMessage(n,r){let i=bkr(n);return r?.removeStartString&&i.startsWith(r.removeStartString)?i.substring(r.removeStartString.length).trim():i},getError(n){return new Error(this.getErrorMessage(n))},hasErrorCode:n=>{if(!n)return!1;let r=n.code;return r?typeof r=="string":!1},async executeQueryOrThrow(n){try{return await n()}catch(r){let i;if(r.response)try{i=(await r.response.json()).message}catch(a){i=`Could not get json error. Error ${Wd.getErrorMessage(a)}. Original error: ${Wd.getErrorMessage(r)}`}else i=`Error: ${Wd.getErrorMessage(r)}`;throw new Error(i)}}},Fxe=Wd;var sUe=class{async wait(r=50){return new Promise(i=>{setTimeout(()=>i(),r)})}async returnDelayed(r,i=300){return await this.wait(i),r}},Pin=new sUe;var Skr={cloneFunctions:!1},DC=class n{static deep(r,i={}){let a={...Skr,...i};if(r==null)return r;let l=typeof r=="function";if(!l&&!(typeof r=="object"))return r;if(l)return a.cloneFunctions?r:void 0;if(Array.isArray(r))return r.map(_=>n.deep(_,a));if(r instanceof Date)return new Date(r.getTime());{let _={},b=Object.keys(r);for(let T of b)_[T]=n.deep(r[T],a);return _}}static cleanEmptyProperties(r){let i={};for(let a in r){let l=r[a];l===""||l===void 0||l===null||(typeof l=="object"?i[a]=n.cleanEmptyProperties(l):i[a]=l)}return i}};var Dkr=/token/i,xkr=/password/i,Tkr=/secret/i,O2t=[Dkr,xkr,Tkr],oUe=class{constructor(){this.undefinedString="[undefined]";this.functionString="[function]";this.circularString="[Circular]";this.obfuscatedString="***"}obfuscate(r){return typeof r=="string"?r==null?this.obfuscatedString:r.length<=6?this.obfuscatedString:r.length<=9?`${this.obfuscatedString}${r.substring(r.length-3)}`:`${r.substring(0,3)}${this.obfuscatedString}${r.substring(r.length-3)}`:this.obfuscatedString}getMaxObjectDepthError(r){return`Max object depth (${r.maxObjectDepth}) exceeded. Current depth: ${r.currentDepth}`}obfuscateObject(r,i,a,l=1){if(l>i.maxObjectDepth)return this.getMaxObjectDepthError({maxObjectDepth:i.maxObjectDepth,currentDepth:l});if(r instanceof Date)return r.toISOString();if(r instanceof Map){let p={};for(let[_,b]of r.entries()){let T=typeof _=="string"?_:i.jsonSerialize(_);O2t.some(E=>E.test(T))?p[T]=this.obfuscate(b):p[T]=this.obfuscateObject(b,i,a,l+1)}return p}if(r instanceof Set)return Array.from(r).map(p=>this.obfuscateObject(p,i,a,l+1));if(typeof r=="bigint")return r.toString();if(r===void 0)return i.serializeUndefined?this.undefinedString:r;if(typeof r=="function")return i.serializeFunctions?this.functionString:r;if(typeof r=="symbol")return i.serializeSymbols?r.toString():r;if(Array.isArray(r))return r.map(p=>this.obfuscateObject(p,i,a,l+1));if(r!==null&&typeof r=="object"){if(a.has(r))return this.circularString;a.add(r);let p={};for(let[_,b]of Object.entries(r))_.toLowerCase()!=="prototype"&&(typeof b=="function"&&!i.serializeFunctions||(typeof b=="string"&&O2t.some(T=>T.test(_))?p[_]=this.obfuscate(b):p[_]=this.obfuscateObject(b,i,a,l+1)));return p}return r}safeToString(r,i){let l=Object.assign({serializeUndefined:!0,serializeFunctions:!1,serializeSymbols:!1,rethrowErrors:!1,maxObjectDepth:10,jsonSerialize:JSON.stringify},i??{});try{let p=new WeakSet,_=this.obfuscateObject(r,l,p);return l.jsonSerialize(_,null,l.space)}catch(p){let _=`Error serializing object: ${Fxe.getErrorMessage(p)}`;if(l.rethrowErrors)throw Error(_);return _}}},qin=new oUe;var MO=n=>n!=null;var F2t=zl(require("crypto")),Mxe=new Uint8Array(256),Rxe=Mxe.length;function aUe(){return Rxe>Mxe.length-16&&(F2t.default.randomFillSync(Mxe),Rxe=0),Mxe.slice(Rxe,Rxe+=16)}var R2t=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ckr(n){return typeof n=="string"&&R2t.test(n)}var s3=Ckr;var Gb=[];for(let n=0;n<256;++n)Gb.push((n+256).toString(16).slice(1));function Lxe(n,r=0){return(Gb[n[r+0]]+Gb[n[r+1]]+Gb[n[r+2]]+Gb[n[r+3]]+"-"+Gb[n[r+4]]+Gb[n[r+5]]+"-"+Gb[n[r+6]]+Gb[n[r+7]]+"-"+Gb[n[r+8]]+Gb[n[r+9]]+"-"+Gb[n[r+10]]+Gb[n[r+11]]+Gb[n[r+12]]+Gb[n[r+13]]+Gb[n[r+14]]+Gb[n[r+15]]).toLowerCase()}function Ekr(n){if(!s3(n))throw TypeError("Invalid UUID");let r,i=new Uint8Array(16);return i[0]=(r=parseInt(n.slice(0,8),16))>>>24,i[1]=r>>>16&255,i[2]=r>>>8&255,i[3]=r&255,i[4]=(r=parseInt(n.slice(9,13),16))>>>8,i[5]=r&255,i[6]=(r=parseInt(n.slice(14,18),16))>>>8,i[7]=r&255,i[8]=(r=parseInt(n.slice(19,23),16))>>>8,i[9]=r&255,i[10]=(r=parseInt(n.slice(24,36),16))/1099511627776&255,i[11]=r/4294967296&255,i[12]=r>>>24&255,i[13]=r>>>16&255,i[14]=r>>>8&255,i[15]=r&255,i}var DB=Ekr;function wkr(n){n=unescape(encodeURIComponent(n));let r=[];for(let i=0;i<n.length;++i)r.push(n.charCodeAt(i));return r}var Akr="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Ikr="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function cUe(n,r,i){function a(l,p,_,b){var T;if(typeof l=="string"&&(l=wkr(l)),typeof p=="string"&&(p=DB(p)),((T=p)===null||T===void 0?void 0:T.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let E=new Uint8Array(16+l.length);if(E.set(p),E.set(l,p.length),E=i(E),E[6]=E[6]&15|r,E[8]=E[8]&63|128,_){b=b||0;for(let k=0;k<16;++k)_[b+k]=E[k];return _}return Lxe(E)}try{a.name=n}catch{}return a.DNS=Akr,a.URL=Ikr,a}var M2t=zl(require("crypto")),lUe={randomUUID:M2t.default.randomUUID};function kkr(n,r,i){if(lUe.randomUUID&&!r&&!n)return lUe.randomUUID();n=n||{};let a=n.random||(n.rng||aUe)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,r){i=i||0;for(let l=0;l<16;++l)r[i+l]=a[l];return r}return Lxe(a)}var xB=kkr;var L2t=zl(require("crypto"));function Pkr(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),L2t.default.createHash("sha1").update(n).digest()}var j2t=Pkr;var Nkr=cUe("v5",80,j2t),$L=Nkr;var Okr="4d2cacb5-5b53-4da4-b120-709089990e91",uUe=class{generateNew(){return xB()}generateNewPredictable(r){return $L(r,Okr)}validate(r){return s3(r)}parse(r){return DB(r)}},fUe=new uUe;var Mkr=(n,r)=>{let i=r===void 0?"string":r,a=Object.keys(n).map(l=>n[l]);if(i==="string")return a;if(i==="number")return a.map(l=>parseInt(l)).filter(l=>!isNaN(l));throw new Error(`result type "${r}" is not supported in EnumUtil.getAllValues`)},Rk={getAllValues:Mkr},q2t=Rk;var U2t=(p=>(p.Second="s",p.Minute="m",p.Hour="h",p.Day="d",p.Week="w",p))(U2t||{}),B2t=q2t.getAllValues(U2t,"string"),$2t=/^\d{1,10}[smhdw]$/,J2t=/^\d+$/,pUe=[{unit:"w",factor:1},{unit:"d",factor:7},{unit:"h",factor:24},{unit:"m",factor:60},{unit:"s",factor:60}],o3={isValidNonNegativeInteger:n=>J2t.test(n.trim()),isValidDuration:n=>$2t.test(n.trim()),toString:n=>n.unit?`${n.value}${n.unit}`:`${n.value}`,parse:n=>{let r=n.trim();if(J2t.test(r))return{value:parseInt(r,10)};zb.should($2t.test(r),`invalid input for duration: "${n}"`);let i=r[r.length-1];zb.should(B2t.includes(i),`invalid time unit in "${n}". Unit "${i}" should be one of ${B2t.join(", ")} `);let a=i;return{value:parseInt(r.substring(0,r.length-1)),unit:a}},toSeconds:n=>{if(!n.unit)return n.value;let r=pUe.findIndex(a=>a.unit===n.unit);zb.should(r>=0,`Cannot convert duration with time unit: ${n.unit}. No mapping was found`);let i=n.value;for(let a=r+1;a<pUe.length;a++)i=i*pUe[a].factor;return i}};var W2t="\\",dUe="/",V2t=[dUe,W2t],_Ue=class{constructor(){this._pathSeparator=typeof process<"u"&&process.platform==="win32"?W2t:dUe;this._pathSeparatorChanged=!1}get pathSeparator(){return this._pathSeparator}set pathSeparator(r){zb.should(!this._pathSeparatorChanged,`Path separator is already changed to ${this._pathSeparator}. For protection it can be set only once.`),zb.should(V2t.includes(r),`Cannot set pathSeparator to '${r}'. It is invalid. It should be one of: ${V2t.join(",")}`),this._pathSeparatorChanged=!0,this._pathSeparator=r}joinTwo(r,i){if(r==="")return i;if(i==="")return r;let a=r.endsWith(this.pathSeparator)?r.slice(void 0,r.length-1):r,l=i.startsWith(this.pathSeparator)?i.slice(1):i;return`${a}${this.pathSeparator}${l}`}join(...r){return zb.ensure(r.length>1,"Cannot join path for less than two paths"),r.slice(1).reduce((i,a)=>this.joinTwo(i,a),r[0])}areEqual(r,i){if(r===i)return!0;if(r===void 0||i===void 0)return!1;let a=r.startsWith(this.pathSeparator)?r.substring(1):r,l=i.startsWith(this.pathSeparator)?i.substring(1):i;return a.endsWith(this.pathSeparator)&&(a=a.substring(0,a.length-1)),l.endsWith(this.pathSeparator)&&(l=l.substring(0,l.length-1)),a===l}getExtensionFromPath(r){let i=r.lastIndexOf(this.pathSeparator),a=i===-1?0:i+1,l=r.substring(a),p=l.lastIndexOf(".");if(!(p===-1||p===l.length-1))return l.substring(p+1)}getFileNameFromPath(r){let i=r.lastIndexOf(this.pathSeparator);return i!==-1?r.substring(i+1):r}getFileNameFromPathWithoutExtension(r){let i=this.getFileNameFromPath(r),a=this.getExtensionFromPath(r);return a?i.replace("."+a,""):i}isFileOnRootLevel(r){let i=r.lastIndexOf(this.pathSeparator);return i===-1?!0:!r.substring(0,i).length}getPath(r,i){let a=this.pathSeparator===dUe,l=`${r}${i}`;return r.endsWith(this.pathSeparator)&&i.startsWith(this.pathSeparator)&&(l=`${r}${i.slice(1)}`),!r.endsWith(this.pathSeparator)&&!i.startsWith(this.pathSeparator)&&(l=`${r}${this.pathSeparator}${i}`),a&&!l.startsWith(this.pathSeparator)?`${this.pathSeparator}${l}`:l}getPathWithoutFileName(r){if(this.isFileOnRootLevel(r))return this.pathSeparator;let i=r.lastIndexOf(this.pathSeparator);return r.substring(0,i)}rewriteFolderPath(r,i){zb.ensure(r.startsWith(this.pathSeparator)&&r.endsWith(this.pathSeparator),"Path is not a folder path");let l=[...r.split(this.pathSeparator).filter(p=>p!=="").slice(0,-1),i];return`${this.pathSeparator}${l.join(this.pathSeparator)}${this.pathSeparator}`}getFolderPath(r,i){return`${r}${i}${this.pathSeparator}`}getFolders(r){let i=this.isFolderPath(r),a=r.split(this.pathSeparator).filter(l=>l!=="");return i?a:a.slice(0,-1)}isFolderPath(r){return r.endsWith(this.pathSeparator)}getParentFolderPath(r){let i=this.isFolderPath(r),a=this.getFolders(r);return a=i?a.slice(0,-1):a,`${a.join(this.pathSeparator)}${this.pathSeparator}`}},Na=new _Ue;function JL(n){return({unique_name:r,uniqueName:i})=>r===n||i===n}function jxe(n){return({id:r})=>r===n}var eh=n=>{if(n.length===0)return"";if(n.length===1)return`"${n[0]}"`;let r=n.slice(0,-1).join('", "'),i=n[n.length-1];return`"${r}" and "${i}"`};var qxe=zl(z2t(),1),G2t=Symbol.for("Dexie"),Bxe=globalThis[G2t]||(globalThis[G2t]=qxe.default);if(qxe.default.semVer!==Bxe.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${qxe.default.semVer} and ${Bxe.semVer}`);var{liveQuery:Son,mergeRanges:Don,rangesOverlap:xon,RangeSet:Ton,cmp:Con,Entity:Eon,PropModification:won,replacePrefix:Aon,add:Ion,remove:kon}=Bxe;var $xe=Bxe;var gUe=class extends $xe{constructor(r){super(r),this.version(1).stores({logs:`++id,
669
+ `)};var vkr=n=>`${n} is required`,iUe=class n{constructor(r){this.ErrorConstructor=r}forError(r){return new n(r)}should(r,i){if(!r)throw new this.ErrorConstructor(i)}exists(r,i){this.should(r!=null,i),typeof r=="number"&&this.should(!isNaN(r),i)}notEmpty(r,i){let a=r!=null&&r.trim()!=="";this.should(a,i)}allRequired(r){r.forEach(([i,a])=>{let l=vkr(a);typeof i=="string"&&this.notEmpty(i,l),this.exists(i,l)})}ensure(r,i){if(this.exists(r,i),!r)throw new this.ErrorConstructor(i);return r}ensureType(r,i,a){if(i(r))return r;throw new this.ErrorConstructor(a)}},fs=new iUe(Error),zb=fs;var bkr=n=>n?n instanceof Error?n.message:typeof n=="string"?n:`${n}`:"unknown error",Wd={getErrorMessage(n,r){let i=bkr(n);return r?.removeStartString&&i.startsWith(r.removeStartString)?i.substring(r.removeStartString.length).trim():i},getError(n){return new Error(this.getErrorMessage(n))},hasErrorCode:n=>{if(!n)return!1;let r=n.code;return r?typeof r=="string":!1},async executeQueryOrThrow(n){try{return await n()}catch(r){let i;if(r.response)try{i=(await r.response.json()).message}catch(l){i=`Could not get json error. Error ${Wd.getErrorMessage(l)}. Original error: ${Wd.getErrorMessage(r)}`}else i=`Error: ${Wd.getErrorMessage(r)}`;let a=new Error(i);throw a.status=r.response?.status,a}}},Fxe=Wd;var sUe=class{async wait(r=50){return new Promise(i=>{setTimeout(()=>i(),r)})}async returnDelayed(r,i=300){return await this.wait(i),r}},Pin=new sUe;var Skr={cloneFunctions:!1},DC=class n{static deep(r,i={}){let a={...Skr,...i};if(r==null)return r;let l=typeof r=="function";if(!l&&!(typeof r=="object"))return r;if(l)return a.cloneFunctions?r:void 0;if(Array.isArray(r))return r.map(_=>n.deep(_,a));if(r instanceof Date)return new Date(r.getTime());{let _={},b=Object.keys(r);for(let T of b)_[T]=n.deep(r[T],a);return _}}static cleanEmptyProperties(r){let i={};for(let a in r){let l=r[a];l===""||l===void 0||l===null||(typeof l=="object"?i[a]=n.cleanEmptyProperties(l):i[a]=l)}return i}};var Dkr=/token/i,xkr=/password/i,Tkr=/secret/i,O2t=[Dkr,xkr,Tkr],oUe=class{constructor(){this.undefinedString="[undefined]";this.functionString="[function]";this.circularString="[Circular]";this.obfuscatedString="***"}obfuscate(r){return typeof r=="string"?r==null?this.obfuscatedString:r.length<=6?this.obfuscatedString:r.length<=9?`${this.obfuscatedString}${r.substring(r.length-3)}`:`${r.substring(0,3)}${this.obfuscatedString}${r.substring(r.length-3)}`:this.obfuscatedString}getMaxObjectDepthError(r){return`Max object depth (${r.maxObjectDepth}) exceeded. Current depth: ${r.currentDepth}`}obfuscateObject(r,i,a,l=1){if(l>i.maxObjectDepth)return this.getMaxObjectDepthError({maxObjectDepth:i.maxObjectDepth,currentDepth:l});if(r instanceof Date)return r.toISOString();if(r instanceof Map){let p={};for(let[_,b]of r.entries()){let T=typeof _=="string"?_:i.jsonSerialize(_);O2t.some(E=>E.test(T))?p[T]=this.obfuscate(b):p[T]=this.obfuscateObject(b,i,a,l+1)}return p}if(r instanceof Set)return Array.from(r).map(p=>this.obfuscateObject(p,i,a,l+1));if(typeof r=="bigint")return r.toString();if(r===void 0)return i.serializeUndefined?this.undefinedString:r;if(typeof r=="function")return i.serializeFunctions?this.functionString:r;if(typeof r=="symbol")return i.serializeSymbols?r.toString():r;if(Array.isArray(r))return r.map(p=>this.obfuscateObject(p,i,a,l+1));if(r!==null&&typeof r=="object"){if(a.has(r))return this.circularString;a.add(r);let p={};for(let[_,b]of Object.entries(r))_.toLowerCase()!=="prototype"&&(typeof b=="function"&&!i.serializeFunctions||(typeof b=="string"&&O2t.some(T=>T.test(_))?p[_]=this.obfuscate(b):p[_]=this.obfuscateObject(b,i,a,l+1)));return p}return r}safeToString(r,i){let l=Object.assign({serializeUndefined:!0,serializeFunctions:!1,serializeSymbols:!1,rethrowErrors:!1,maxObjectDepth:10,jsonSerialize:JSON.stringify},i??{});try{let p=new WeakSet,_=this.obfuscateObject(r,l,p);return l.jsonSerialize(_,null,l.space)}catch(p){let _=`Error serializing object: ${Fxe.getErrorMessage(p)}`;if(l.rethrowErrors)throw Error(_);return _}}},qin=new oUe;var MO=n=>n!=null;var F2t=zl(require("crypto")),Mxe=new Uint8Array(256),Rxe=Mxe.length;function aUe(){return Rxe>Mxe.length-16&&(F2t.default.randomFillSync(Mxe),Rxe=0),Mxe.slice(Rxe,Rxe+=16)}var R2t=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ckr(n){return typeof n=="string"&&R2t.test(n)}var s3=Ckr;var Gb=[];for(let n=0;n<256;++n)Gb.push((n+256).toString(16).slice(1));function Lxe(n,r=0){return(Gb[n[r+0]]+Gb[n[r+1]]+Gb[n[r+2]]+Gb[n[r+3]]+"-"+Gb[n[r+4]]+Gb[n[r+5]]+"-"+Gb[n[r+6]]+Gb[n[r+7]]+"-"+Gb[n[r+8]]+Gb[n[r+9]]+"-"+Gb[n[r+10]]+Gb[n[r+11]]+Gb[n[r+12]]+Gb[n[r+13]]+Gb[n[r+14]]+Gb[n[r+15]]).toLowerCase()}function Ekr(n){if(!s3(n))throw TypeError("Invalid UUID");let r,i=new Uint8Array(16);return i[0]=(r=parseInt(n.slice(0,8),16))>>>24,i[1]=r>>>16&255,i[2]=r>>>8&255,i[3]=r&255,i[4]=(r=parseInt(n.slice(9,13),16))>>>8,i[5]=r&255,i[6]=(r=parseInt(n.slice(14,18),16))>>>8,i[7]=r&255,i[8]=(r=parseInt(n.slice(19,23),16))>>>8,i[9]=r&255,i[10]=(r=parseInt(n.slice(24,36),16))/1099511627776&255,i[11]=r/4294967296&255,i[12]=r>>>24&255,i[13]=r>>>16&255,i[14]=r>>>8&255,i[15]=r&255,i}var DB=Ekr;function wkr(n){n=unescape(encodeURIComponent(n));let r=[];for(let i=0;i<n.length;++i)r.push(n.charCodeAt(i));return r}var Akr="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Ikr="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function cUe(n,r,i){function a(l,p,_,b){var T;if(typeof l=="string"&&(l=wkr(l)),typeof p=="string"&&(p=DB(p)),((T=p)===null||T===void 0?void 0:T.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let E=new Uint8Array(16+l.length);if(E.set(p),E.set(l,p.length),E=i(E),E[6]=E[6]&15|r,E[8]=E[8]&63|128,_){b=b||0;for(let k=0;k<16;++k)_[b+k]=E[k];return _}return Lxe(E)}try{a.name=n}catch{}return a.DNS=Akr,a.URL=Ikr,a}var M2t=zl(require("crypto")),lUe={randomUUID:M2t.default.randomUUID};function kkr(n,r,i){if(lUe.randomUUID&&!r&&!n)return lUe.randomUUID();n=n||{};let a=n.random||(n.rng||aUe)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,r){i=i||0;for(let l=0;l<16;++l)r[i+l]=a[l];return r}return Lxe(a)}var xB=kkr;var L2t=zl(require("crypto"));function Pkr(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),L2t.default.createHash("sha1").update(n).digest()}var j2t=Pkr;var Nkr=cUe("v5",80,j2t),$L=Nkr;var Okr="4d2cacb5-5b53-4da4-b120-709089990e91",uUe=class{generateNew(){return xB()}generateNewPredictable(r){return $L(r,Okr)}validate(r){return s3(r)}parse(r){return DB(r)}},fUe=new uUe;var Mkr=(n,r)=>{let i=r===void 0?"string":r,a=Object.keys(n).map(l=>n[l]);if(i==="string")return a;if(i==="number")return a.map(l=>parseInt(l)).filter(l=>!isNaN(l));throw new Error(`result type "${r}" is not supported in EnumUtil.getAllValues`)},Rk={getAllValues:Mkr},q2t=Rk;var U2t=(p=>(p.Second="s",p.Minute="m",p.Hour="h",p.Day="d",p.Week="w",p))(U2t||{}),B2t=q2t.getAllValues(U2t,"string"),$2t=/^\d{1,10}[smhdw]$/,J2t=/^\d+$/,pUe=[{unit:"w",factor:1},{unit:"d",factor:7},{unit:"h",factor:24},{unit:"m",factor:60},{unit:"s",factor:60}],o3={isValidNonNegativeInteger:n=>J2t.test(n.trim()),isValidDuration:n=>$2t.test(n.trim()),toString:n=>n.unit?`${n.value}${n.unit}`:`${n.value}`,parse:n=>{let r=n.trim();if(J2t.test(r))return{value:parseInt(r,10)};zb.should($2t.test(r),`invalid input for duration: "${n}"`);let i=r[r.length-1];zb.should(B2t.includes(i),`invalid time unit in "${n}". Unit "${i}" should be one of ${B2t.join(", ")} `);let a=i;return{value:parseInt(r.substring(0,r.length-1)),unit:a}},toSeconds:n=>{if(!n.unit)return n.value;let r=pUe.findIndex(a=>a.unit===n.unit);zb.should(r>=0,`Cannot convert duration with time unit: ${n.unit}. No mapping was found`);let i=n.value;for(let a=r+1;a<pUe.length;a++)i=i*pUe[a].factor;return i}};var W2t="\\",dUe="/",V2t=[dUe,W2t],_Ue=class{constructor(){this._pathSeparator=typeof process<"u"&&process.platform==="win32"?W2t:dUe;this._pathSeparatorChanged=!1}get pathSeparator(){return this._pathSeparator}set pathSeparator(r){zb.should(!this._pathSeparatorChanged,`Path separator is already changed to ${this._pathSeparator}. For protection it can be set only once.`),zb.should(V2t.includes(r),`Cannot set pathSeparator to '${r}'. It is invalid. It should be one of: ${V2t.join(",")}`),this._pathSeparatorChanged=!0,this._pathSeparator=r}joinTwo(r,i){if(r==="")return i;if(i==="")return r;let a=r.endsWith(this.pathSeparator)?r.slice(void 0,r.length-1):r,l=i.startsWith(this.pathSeparator)?i.slice(1):i;return`${a}${this.pathSeparator}${l}`}join(...r){return zb.ensure(r.length>1,"Cannot join path for less than two paths"),r.slice(1).reduce((i,a)=>this.joinTwo(i,a),r[0])}areEqual(r,i){if(r===i)return!0;if(r===void 0||i===void 0)return!1;let a=r.startsWith(this.pathSeparator)?r.substring(1):r,l=i.startsWith(this.pathSeparator)?i.substring(1):i;return a.endsWith(this.pathSeparator)&&(a=a.substring(0,a.length-1)),l.endsWith(this.pathSeparator)&&(l=l.substring(0,l.length-1)),a===l}getExtensionFromPath(r){let i=r.lastIndexOf(this.pathSeparator),a=i===-1?0:i+1,l=r.substring(a),p=l.lastIndexOf(".");if(!(p===-1||p===l.length-1))return l.substring(p+1)}getFileNameFromPath(r){let i=r.lastIndexOf(this.pathSeparator);return i!==-1?r.substring(i+1):r}getFileNameFromPathWithoutExtension(r){let i=this.getFileNameFromPath(r),a=this.getExtensionFromPath(r);return a?i.replace("."+a,""):i}isFileOnRootLevel(r){let i=r.lastIndexOf(this.pathSeparator);return i===-1?!0:!r.substring(0,i).length}getPath(r,i){let a=this.pathSeparator===dUe,l=`${r}${i}`;return r.endsWith(this.pathSeparator)&&i.startsWith(this.pathSeparator)&&(l=`${r}${i.slice(1)}`),!r.endsWith(this.pathSeparator)&&!i.startsWith(this.pathSeparator)&&(l=`${r}${this.pathSeparator}${i}`),a&&!l.startsWith(this.pathSeparator)?`${this.pathSeparator}${l}`:l}getPathWithoutFileName(r){if(this.isFileOnRootLevel(r))return this.pathSeparator;let i=r.lastIndexOf(this.pathSeparator);return r.substring(0,i)}rewriteFolderPath(r,i){zb.ensure(r.startsWith(this.pathSeparator)&&r.endsWith(this.pathSeparator),"Path is not a folder path");let l=[...r.split(this.pathSeparator).filter(p=>p!=="").slice(0,-1),i];return`${this.pathSeparator}${l.join(this.pathSeparator)}${this.pathSeparator}`}getFolderPath(r,i){return`${r}${i}${this.pathSeparator}`}getFolders(r){let i=this.isFolderPath(r),a=r.split(this.pathSeparator).filter(l=>l!=="");return i?a:a.slice(0,-1)}isFolderPath(r){return r.endsWith(this.pathSeparator)}getParentFolderPath(r){let i=this.isFolderPath(r),a=this.getFolders(r);return a=i?a.slice(0,-1):a,`${a.join(this.pathSeparator)}${this.pathSeparator}`}},Na=new _Ue;function JL(n){return({unique_name:r,uniqueName:i})=>r===n||i===n}function jxe(n){return({id:r})=>r===n}var eh=n=>{if(n.length===0)return"";if(n.length===1)return`"${n[0]}"`;let r=n.slice(0,-1).join('", "'),i=n[n.length-1];return`"${r}" and "${i}"`};var qxe=zl(z2t(),1),G2t=Symbol.for("Dexie"),Bxe=globalThis[G2t]||(globalThis[G2t]=qxe.default);if(qxe.default.semVer!==Bxe.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${qxe.default.semVer} and ${Bxe.semVer}`);var{liveQuery:Son,mergeRanges:Don,rangesOverlap:xon,RangeSet:Ton,cmp:Con,Entity:Eon,PropModification:won,replacePrefix:Aon,add:Ion,remove:kon}=Bxe;var $xe=Bxe;var gUe=class extends $xe{constructor(r){super(r),this.version(1).stores({logs:`++id,
670
670
  timestamp,
671
671
  level,
672
- loggerName`})}},Lkr=new gUe("LogsDB");function Jxe(n){return n=n.replace(/^(https:\/\/|git@)/,""),n=n.replace(":","/"),n.replace(/\.git$/,"").toLowerCase()}var aQ=n=>n.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/--.*$/gm,"");var _A=n=>{let r=/(?<=\[Measures\]\.\[).+?(?=])/g;return aQ(n).match(r)||[]};var Goe=class{static firstDefined(...r){let i=r.find(a=>a==null?!1:typeof a=="string"?a!=="":!0);return zb.ensure(i,"Cannot get first defined value. All are undefined, null or empty string.")}};var jkr={maxAttempts:3,initialDelayMs:20,maxDelayMs:1e3,backoffMultiplier:2,shouldRetry:()=>!0},yUe=class{async execute(r,i={}){let a={...jkr,...i};zb.should(a.maxAttempts>0,"Execution aborted: maxAttempts is less than or equal to 0"),zb.should(a.initialDelayMs>=0,`Execution aborted: initialDelayMs (${a.initialDelayMs}) must be >= 0`),zb.should(a.maxDelayMs>=0,`Execution aborted: maxDelayMs (${a.maxDelayMs}) must be >= 0`),zb.should(a.backoffMultiplier>=1,`Execution aborted: backoffMultiplier (${a.backoffMultiplier}) must be >= 1`),zb.should(a.initialDelayMs<=a.maxDelayMs,`Execution aborted: initialDelayMs (${a.initialDelayMs}) must not exceed maxDelayMs (${a.maxDelayMs})`);let l=a.initialDelayMs;for(let p=1;p<=a.maxAttempts;p++)try{return await r()}catch(_){if(p===a.maxAttempts||!a.shouldRetry(_))throw _;await new Promise(b=>setTimeout(b,l)),l=Math.min(l*a.backoffMultiplier,a.maxDelayMs)}throw new Error("Retry loop exited without returning or throwing.")}},Fan=new yUe;var vUe=/\$\$?\{([a-zA-Z_][a-zA-Z0-9_]*)\}/g;function H2t(n,r){return n.replace(vUe,(i,a)=>i.startsWith("$$")?i.slice(1):r[a]??"")}function Uxe(n){for(let r of n.matchAll(vUe))if(!r[0].startsWith("$$"))return!0;return!1}function Q2t(n){let r=new Set;for(let i of n.matchAll(vUe)){let[a,l]=i;a.startsWith("$$")||r.add(l)}return[...r]}var nl=(j=>(j.Catalog="catalog",j.Model="model",j.ModelSettings="model_settings",j.GlobalSettings="global_settings",j.Dimension="dimension",j.Dataset="dataset",j.Metric="metric",j.MetricCalc="metric_calc",j.Connection="connection",j.RowSecurity="row_security",j.CompositeModel="composite_model",j))(nl||{});var qkr={connection:[{path:"unique_name",allowTemplate:!1},{path:"object_type",allowTemplate:!1},{path:"*",allowTemplate:!0}],dataset:[{path:"sql",allowTemplate:!0},{path:"dialects[*].sql",allowTemplate:!0},{path:"*",allowTemplate:!1}]};function Bkr(n,r){if(n==="*")return!0;let i="^"+n.replace(/\./g,"\\.").replace(/\[\*\]/g,"\\[\\d+\\]").replace(/\*/g,"[^.\\[\\]]+")+"$";return new RegExp(i).test(r)}function $kr(n,r){for(let i of r)if(Bkr(i.path,n))return i.allowTemplate;return!0}function Jkr(n,r){let a=Q2t(n).filter(l=>!(l in r));if(a.length)throw new Error(`The variable \${${a[0]}} is not defined in the .env file or the engine environment variables (sml.environment.variables). Please add ${a[0]}="your_value_here" to the .env file or configure it in the engine settings to resolve this issue.`)}function Vxe(n,r,i,a=""){if(!i)return n;let l=qkr[r]||[];if(typeof n=="string"){let p=Uxe(n);if(p&&!$kr(a,l))throw new Error(`Variables cannot be used in the "${a}" field. Please provide a fixed value.`);return p?(Jkr(n,i),H2t(n,i)):n}if(Array.isArray(n))return n.map((p,_)=>Vxe(p,r,i,`${a}[${_}]`));if(n&&typeof n=="object"){let p={};for(let _ in n)if(n.hasOwnProperty(_)){let b=a?`${a}.${_}`:_;p[_]=Vxe(n[_],r,i,b)}return p}return n}var bUe=["connection","dataset"];var Y2t=zl(Mse()),Hoe=class n{static create(){return new n}parse(r){return{...r,data:Y2t.parse(r.rawContent),compilationOutput:[]}}};var Qoe=class n{static create(){return new n}parse(r){return{...r,data:JSON.parse(r.rawContent),compilationOutput:[]}}};var UL=class n{static create(){return new n}parse(r){let i=Voe(r.rawContent,{schema:Uoe});return{...r,data:i,compilationOutput:[]}}};var Ukr={yaml:UL.create(),yml:UL.create(),json:Qoe.create(),env:Hoe.create()},TB=class n{constructor(r=Ukr){this.mappings=r}static create(){return new n}parseRawContent(r,i="yaml"){let a={rawContent:r,relativePath:`name.${i}`};return this.parse(a).data}parse(r){let i=Na.getExtensionFromPath(r.relativePath);return i?(this.mappings[i]||this.defaultParser()).parse(r):this.defaultParser().parse(r)}defaultParser(){return{parse(r){return{...r,data:r.rawContent,compilationOutput:[]}},parseRawContent(r){return r}}}};var Vkr=n=>n.trim()===""||n.trim().startsWith("#")?!0:/^[A-Za-z_]+[A-Za-z0-9_]*=(.*)$/.test(n),Yoe=class{getErrors(r){let i=[];return r.split(/\r?\n/).forEach((l,p)=>{Vkr(l)||i.push(`Invalid format at line ${p+1}: "${l}"`)}),i}};var Koe=class{getErrors(r){try{return JSON.parse(r),[]}catch(i){return typeof i=="string"?[i]:i instanceof Error?[i.message]:[`${i}`]}}};var cQ=class{getErrors(r){let i=[];try{zoe.load(r)}catch(a){a instanceof Woe?i.push(a.message):i.push(`Unknown yaml parsing error: ${Wd.getErrorMessage(a)}`)}return i}};var Wkr={yml:new cQ,yaml:new cQ,json:new Koe,env:new Yoe},Xoe=class{constructor(r=Wkr){this.mappings=r}getValidator(r){let i=this.getExtensionFromPath(r);return i?this.mappings[i]||this.dummyValidator():this.dummyValidator()}dummyValidator(){return{getErrors:()=>[]}}getExtensionFromPath(r){let i=r.lastIndexOf("/"),a=i===-1?0:i+1,l=r.substring(a),p=l.lastIndexOf(".");if(!(p===-1||p===l.length-1))return l.substring(p+1)}};var Mk=class{static traverse(r,i){r.files.forEach(i),r.folders.flatMap(a=>this.traverse(a,i))}};var SUe={unknownObjectTypeWarning:"Unknown object type. File will be skipped.",notSupportedObjectTypeError:n=>`Not supported object type ${n}`},CB=class{getType(r,i){let a=r.data;if(!a||!a.object_type){r.compilationOutput.push({message:SUe.unknownObjectTypeWarning,severity:"warning"}),i.file(r).addWarning(SUe.unknownObjectTypeWarning);return}if(!Object.values(nl).filter(p=>isNaN(Number(p))).includes(a.object_type)){i.file(r).addError(SUe.notSupportedObjectTypeError(a.object_type));return}return a.object_type}};var zkr=n=>No.hasProps("rawContent")&&(n.rawContent||"").length>0,Zoe=n=>({relativePath:n.relativePath,compilationOutput:[],origin:n.origin,type:"Unknown",data:n.data,rawContent:n.rawContent,packageName:n.packageName}),VL=class{constructor(r={}){this.compilerSettings=r.compilerSettings||{amlFileExtensions:["yaml","yml"]},this.fileTypeValidationFactory=r.fileTypeValidationFactory||new Xoe,this.yamlObjectTypeExtractor=r.yamlObjectTypeExtractor||new CB,this.fileParser=r.fileParser||new TB}parseFolderStructure(r,i,a){let l=r.files.find(E=>E.relativePath===r3.relativePath),p=l?this.parseFile(l,i):void 0,_=p?.data,b=a||_?{...a,..._}:void 0;l&&(r.files=r.files.filter(E=>E.relativePath!==r3.relativePath)??[]);let T=this.parseFolderStructureInternal(r,i,b);return p&&T.files.push(p),T}parseFolderStructureInternal(r,i,a,l=1){if(l>=50){let _=`Max folder depth exceed. Max folder depth is 50. Current folder path: ${r.path}`;throw i.global().addError(_),new n3(_)}let p={path:r.path,origin:r.origin,files:[],folders:[],packageName:r.packageName};return p.files=r.files.map(_=>this.parseFile(_,i,a)),p.folders=r.folders.map(_=>this.parseFolderStructureInternal(_,i,a,l+1)),p}getTextFile(r){return{...r,type:Zm.Text,data:void 0}}getEnvFile(r,i){return{...r,type:Zm.Environment,data:i}}parseFile(r,i,a){let l=[...this.compilerSettings.amlFileExtensions,ML,...OO];if(!this.hasValidExtension(l,r))return i.file(r).addInfo("File is not recognized as atscale file and will be skipped"),Zoe(r);let p=this.compilerSettings.amlFileExtensions.includes(Na.getExtensionFromPath(r.relativePath)||""),_=j1.isEnvFile(r);if(_&&!Na.isFileOnRootLevel(r.relativePath)&&i.file(r).addWarning("Environment files should be on root level"),zkr(r)){let T=this.fileTypeValidationFactory.getValidator(r.relativePath).getErrors(r.rawContent);if(T.length>0)return T.forEach(j=>{i.file(r).addWarning(j)}),_?this.getEnvFile(r):p?this.getTextFile(r):Zoe(r);let E={},k;try{E=this.fileParser.parse(r);let j=Na.getExtensionFromPath(r.relativePath)||"";k=OO.includes(j)?void 0:this.yamlObjectTypeExtractor.getType(E,i),E=this.handleEnvironmentVariableInParsedFile({file:E,objectType:k,environmentVariables:a,validatorOutput:i})}catch(j){return i.file(r).addError(`File content is invalid. It cannot be parsed. ${Wd.getErrorMessage(j)}`),_?this.getEnvFile(r):p?this.getTextFile(r):Zoe(r)}if(k){let j=Nxe(r.rawContent)||void 0;return{...r,type:k,data:E.data,rawContent:j?Oxe(r.rawContent):r.rawContent,headerComments:j}}else return _?this.getEnvFile(r,E.data):j1.isTextFile(r)||p?this.getTextFile(r):Zoe(r)}else return _?(i.file(r).addWarning("Environment file is empty"),this.getEnvFile(r)):j1.isTextFile(r)?this.getTextFile(r):(i.file(r).addInfo("File has no rawContent and will be skipped"),Zoe(r))}extractYamlFiles(r){let i=[];return Mk.traverse(r,a=>{if(j1.isYamlFile(a)&&this.hasValidExtension(this.compilerSettings.amlFileExtensions,a)){if(this.isFileTypeCatalog(a.type)&&a.origin!=="R")return;i.push(a)}}),i}hasValidExtension(r,i){let a=Na.getExtensionFromPath(i.relativePath);return!!a&&r.includes(a)}getYamlFilesWithValidObjectType(r,i){let a=[];return r.forEach(l=>{j1.isYamlFile(l)&&this.yamlObjectTypeExtractor.getType(l,i)&&a.push(l)}),a}isFileTypeCatalog(r){return r===Zm.Catalog}handleEnvironmentVariableInParsedFile({file:r,objectType:i,environmentVariables:a,validatorOutput:l}){if(!Uxe(r.rawContent))return r;if(i&&!bUe.includes(i))return l.file(r).addError(`Variable placeholders (e.g., \${VARIABLE_NAME}) were detected in a ${i} file. Variable replacement is only supported for the following file types: ${bUe.join(", ")}.`),r;if(!a)return l.file(r).addError("Referenced variables were detected, but no environment variables are configured. Please create a .env file or configure the engine environment variables (sml.environment.variables)."),r;let _=r.data;try{_=this.replaceVariablesInData(r.data,a)}catch(b){return l.file(r).addError(Wd.getErrorMessage(b)),r}return{...r,data:_}}replaceVariablesInData(r,i){return Vxe(r,r.object_type,i)}};var xC="package.yml";var Gkr=n=>`${n} is required`,DUe=class n{constructor(r){this.ErrorConstructor=r}forError(r){return new n(r)}should(r,i){if(!r)throw new this.ErrorConstructor(i)}exists(r,i){this.should(r!=null,i),typeof r=="number"&&this.should(!isNaN(r),i)}notEmpty(r,i){let a=r!=null&&r.trim()!=="";this.should(a,i)}allRequired(r){r.forEach(([i,a])=>{let l=Gkr(a);typeof i=="string"&&this.notEmpty(i,l),this.exists(i,l)})}ensure(r,i){if(this.exists(r,i),!r)throw new this.ErrorConstructor(i);return r}ensureType(r,i,a){if(i(r))return r;throw new this.ErrorConstructor(a)}},eae=new DUe(Error),n2=eae;var Hkr=function(n,r,i,a){function l(p){return p instanceof i?p:new i(function(_){_(p)})}return new(i||(i=Promise))(function(p,_){function b(k){try{E(a.next(k))}catch(j){_(j)}}function T(k){try{E(a.throw(k))}catch(j){_(j)}}function E(k){k.done?p(k.value):l(k.value).then(b,T)}E((a=a.apply(n,r||[])).next())})},Qkr=n=>n?n instanceof Error?n.message:typeof n=="string"?n:`${n}`:"unknown error",Lk={getErrorMessage(n,r){let i=Qkr(n);return r?.removeStartString&&i.startsWith(r.removeStartString)?i.substring(r.removeStartString.length).trim():i},getError(n){return new Error(this.getErrorMessage(n))},hasErrorCode:n=>{if(!n)return!1;let r=n.code;return r?typeof r=="string":!1},executeQueryOrThrow(n){return Hkr(this,void 0,void 0,function*(){try{return yield n()}catch(r){let i;if(r.response)try{i=(yield r.response.json()).message}catch(a){i=`Could not get json error. Error ${Lk.getErrorMessage(a)}. Original error: ${Lk.getErrorMessage(r)}`}else i=`Error: ${Lk.getErrorMessage(r)}`;throw new Error(i)}})}},Wxe=Lk;var K2t=function(n,r,i,a){function l(p){return p instanceof i?p:new i(function(_){_(p)})}return new(i||(i=Promise))(function(p,_){function b(k){try{E(a.next(k))}catch(j){_(j)}}function T(k){try{E(a.throw(k))}catch(j){_(j)}}function E(k){k.done?p(k.value):l(k.value).then(b,T)}E((a=a.apply(n,r||[])).next())})},xUe=class{wait(r=50){return K2t(this,void 0,void 0,function*(){return new Promise(i=>{setTimeout(()=>i(),r)})})}returnDelayed(r,i=300){return K2t(this,void 0,void 0,function*(){return yield this.wait(i),r})}},Hcn=new xUe;var Ykr={cloneFunctions:!1},lQ=class n{static deep(r,i={}){let a=Object.assign(Object.assign({},Ykr),i);if(r==null)return r;let l=typeof r=="function";if(!l&&!(typeof r=="object"))return r;if(l)return a.cloneFunctions?r:void 0;if(Array.isArray(r))return r.map(_=>n.deep(_,a));if(r instanceof Date)return new Date(r.getTime());{let _={},b=Object.keys(r);for(let T of b)_[T]=n.deep(r[T],a);return _}}static cleanEmptyProperties(r){let i={};for(let a in r){let l=r[a];l===""||l===void 0||l===null||(typeof l=="object"?i[a]=n.cleanEmptyProperties(l):i[a]=l)}return i}};var Kkr=/token/i,Xkr=/password/i,Zkr=/secret/i,X2t=[Kkr,Xkr,Zkr],TUe=class{constructor(){this.undefinedString="[undefined]",this.functionString="[function]",this.circularString="[Circular]",this.obfuscatedString="***"}obfuscate(r){return typeof r=="string"?r==null?this.obfuscatedString:r.length<=6?this.obfuscatedString:r.length<=9?`${this.obfuscatedString}${r.substring(r.length-3)}`:`${r.substring(0,3)}${this.obfuscatedString}${r.substring(r.length-3)}`:this.obfuscatedString}getMaxObjectDepthError(r){return`Max object depth (${r.maxObjectDepth}) exceeded. Current depth: ${r.currentDepth}`}obfuscateObject(r,i,a,l=1){if(l>i.maxObjectDepth)return this.getMaxObjectDepthError({maxObjectDepth:i.maxObjectDepth,currentDepth:l});if(r instanceof Date)return r.toISOString();if(r instanceof Map){let p={};for(let[_,b]of r.entries()){let T=typeof _=="string"?_:i.jsonSerialize(_);X2t.some(E=>E.test(T))?p[T]=this.obfuscate(b):p[T]=this.obfuscateObject(b,i,a,l+1)}return p}if(r instanceof Set)return Array.from(r).map(p=>this.obfuscateObject(p,i,a,l+1));if(typeof r=="bigint")return r.toString();if(r===void 0)return i.serializeUndefined?this.undefinedString:r;if(typeof r=="function")return i.serializeFunctions?this.functionString:r;if(typeof r=="symbol")return i.serializeSymbols?r.toString():r;if(Array.isArray(r))return r.map(p=>this.obfuscateObject(p,i,a,l+1));if(r!==null&&typeof r=="object"){if(a.has(r))return this.circularString;a.add(r);let p={};for(let[_,b]of Object.entries(r))_.toLowerCase()!=="prototype"&&(typeof b=="function"&&!i.serializeFunctions||(typeof b=="string"&&X2t.some(T=>T.test(_))?p[_]=this.obfuscate(b):p[_]=this.obfuscateObject(b,i,a,l+1)));return p}return r}safeToString(r,i){let l=Object.assign({serializeUndefined:!0,serializeFunctions:!1,serializeSymbols:!1,rethrowErrors:!1,maxObjectDepth:10,jsonSerialize:JSON.stringify},i??{});try{let p=new WeakSet,_=this.obfuscateObject(r,l,p);return l.jsonSerialize(_,null,l.space)}catch(p){let _=`Error serializing object: ${Wxe.getErrorMessage(p)}`;if(l.rethrowErrors)throw Error(_);return _}}},rln=new TUe;var ePr="4d2cacb5-5b53-4da4-b120-709089990e91",CUe=class{generateNew(){return xB()}generateNewPredictable(r){return $L(r,ePr)}validate(r){return s3(r)}parse(r){return DB(r)}},EUe=new CUe;var tPr=(n,r)=>{let i=r===void 0?"string":r,a=Object.keys(n).map(l=>n[l]);if(i==="string")return a;if(i==="number")return a.map(l=>parseInt(l)).filter(l=>!isNaN(l));throw new Error(`result type "${r}" is not supported in EnumUtil.getAllValues`)},rPr={getAllValues:tPr},Z2t=rPr;var WL;(function(n){n.Second="s",n.Minute="m",n.Hour="h",n.Day="d",n.Week="w"})(WL||(WL={}));var bln=Z2t.getAllValues(WL,"string");var Sln=[{unit:WL.Week,factor:1},{unit:WL.Day,factor:7},{unit:WL.Hour,factor:24},{unit:WL.Minute,factor:60},{unit:WL.Second,factor:60}];var twt="\\",wUe="/",ewt=[wUe,twt],AUe=class{constructor(){this._pathSeparator=typeof process<"u"&&process.platform==="win32"?twt:wUe,this._pathSeparatorChanged=!1}get pathSeparator(){return this._pathSeparator}set pathSeparator(r){n2.should(!this._pathSeparatorChanged,`Path separator is already changed to ${this._pathSeparator}. For protection it can be set only once.`),n2.should(ewt.includes(r),`Cannot set pathSeparator to '${r}'. It is invalid. It should be one of: ${ewt.join(",")}`),this._pathSeparatorChanged=!0,this._pathSeparator=r}joinTwo(r,i){if(r==="")return i;if(i==="")return r;let a=r.endsWith(this.pathSeparator)?r.slice(void 0,r.length-1):r,l=i.startsWith(this.pathSeparator)?i.slice(1):i;return`${a}${this.pathSeparator}${l}`}join(...r){return n2.ensure(r.length>1,"Cannot join path for less than two paths"),r.slice(1).reduce((i,a)=>this.joinTwo(i,a),r[0])}areEqual(r,i){if(r===i)return!0;if(r===void 0||i===void 0)return!1;let a=r.startsWith(this.pathSeparator)?r.substring(1):r,l=i.startsWith(this.pathSeparator)?i.substring(1):i;return a.endsWith(this.pathSeparator)&&(a=a.substring(0,a.length-1)),l.endsWith(this.pathSeparator)&&(l=l.substring(0,l.length-1)),a===l}getExtensionFromPath(r){let i=r.lastIndexOf(this.pathSeparator),a=i===-1?0:i+1,l=r.substring(a),p=l.lastIndexOf(".");if(!(p===-1||p===l.length-1))return l.substring(p+1)}getFileNameFromPath(r){let i=r.lastIndexOf(this.pathSeparator);return i!==-1?r.substring(i+1):r}getFileNameFromPathWithoutExtension(r){let i=this.getFileNameFromPath(r),a=this.getExtensionFromPath(r);return a?i.replace("."+a,""):i}isFileOnRootLevel(r){let i=r.lastIndexOf(this.pathSeparator);return i===-1?!0:!r.substring(0,i).length}getPath(r,i){let a=this.pathSeparator===wUe,l=`${r}${i}`;return r.endsWith(this.pathSeparator)&&i.startsWith(this.pathSeparator)&&(l=`${r}${i.slice(1)}`),!r.endsWith(this.pathSeparator)&&!i.startsWith(this.pathSeparator)&&(l=`${r}${this.pathSeparator}${i}`),a&&!l.startsWith(this.pathSeparator)?`${this.pathSeparator}${l}`:l}getPathWithoutFileName(r){if(this.isFileOnRootLevel(r))return this.pathSeparator;let i=r.lastIndexOf(this.pathSeparator);return r.substring(0,i)}rewriteFolderPath(r,i){n2.ensure(r.startsWith(this.pathSeparator)&&r.endsWith(this.pathSeparator),"Path is not a folder path");let l=[...r.split(this.pathSeparator).filter(p=>p!=="").slice(0,-1),i];return`${this.pathSeparator}${l.join(this.pathSeparator)}${this.pathSeparator}`}getFolderPath(r,i){return`${r}${i}${this.pathSeparator}`}getFolders(r){let i=this.isFolderPath(r),a=r.split(this.pathSeparator).filter(l=>l!=="");return i?a:a.slice(0,-1)}isFolderPath(r){return r.endsWith(this.pathSeparator)}getParentFolderPath(r){let i=this.isFolderPath(r),a=this.getFolders(r);return a=i?a.slice(0,-1):a,`${a.join(this.pathSeparator)}${this.pathSeparator}`}},nPr=new AUe;var rwt=n=>n.replace(/(['"\w])\s+(?=[A-Za-z_][A-Za-z0-9_]*=)/g,`$1
672
+ loggerName`})}},Lkr=new gUe("LogsDB");function Jxe(n){return n=n.replace(/^(https:\/\/|git@)/,""),n=n.replace(":","/"),n.replace(/\.git$/,"").toLowerCase()}var aQ=n=>n.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/--.*$/gm,"");var _A=n=>{let r=/(?<=\[Measures\]\.\[).+?(?=])/g;return aQ(n).match(r)||[]};var Goe=class{static firstDefined(...r){let i=r.find(a=>a==null?!1:typeof a=="string"?a!=="":!0);return zb.ensure(i,"Cannot get first defined value. All are undefined, null or empty string.")}};var jkr={maxAttempts:3,initialDelayMs:20,maxDelayMs:1e3,backoffMultiplier:2,shouldRetry:()=>!0},yUe=class{async execute(r,i={}){let a={...jkr,...i};zb.should(a.maxAttempts>0,"Execution aborted: maxAttempts is less than or equal to 0"),zb.should(a.initialDelayMs>=0,`Execution aborted: initialDelayMs (${a.initialDelayMs}) must be >= 0`),zb.should(a.maxDelayMs>=0,`Execution aborted: maxDelayMs (${a.maxDelayMs}) must be >= 0`),zb.should(a.backoffMultiplier>=1,`Execution aborted: backoffMultiplier (${a.backoffMultiplier}) must be >= 1`),zb.should(a.initialDelayMs<=a.maxDelayMs,`Execution aborted: initialDelayMs (${a.initialDelayMs}) must not exceed maxDelayMs (${a.maxDelayMs})`);let l=a.initialDelayMs;for(let p=1;p<=a.maxAttempts;p++)try{return await r()}catch(_){if(p===a.maxAttempts||!a.shouldRetry(_))throw _;await new Promise(b=>setTimeout(b,l)),l=Math.min(l*a.backoffMultiplier,a.maxDelayMs)}throw new Error("Retry loop exited without returning or throwing.")}},Fan=new yUe;var vUe=/\$\$?\{([a-zA-Z_][a-zA-Z0-9_]*)\}/g;function H2t(n,r){return n.replace(vUe,(i,a)=>i.startsWith("$$")?i.slice(1):r[a]??"")}function Uxe(n){for(let r of n.matchAll(vUe))if(!r[0].startsWith("$$"))return!0;return!1}function Q2t(n){let r=new Set;for(let i of n.matchAll(vUe)){let[a,l]=i;a.startsWith("$$")||r.add(l)}return[...r]}var nl=(j=>(j.Catalog="catalog",j.Model="model",j.ModelSettings="model_settings",j.GlobalSettings="global_settings",j.Dimension="dimension",j.Dataset="dataset",j.Metric="metric",j.MetricCalc="metric_calc",j.Connection="connection",j.RowSecurity="row_security",j.CompositeModel="composite_model",j))(nl||{});var qkr={connection:[{path:"unique_name",allowTemplate:!1},{path:"object_type",allowTemplate:!1},{path:"*",allowTemplate:!0}],dataset:[{path:"sql",allowTemplate:!0},{path:"dialects[*].sql",allowTemplate:!0},{path:"*",allowTemplate:!1}]};function Bkr(n,r){if(n==="*")return!0;let i="^"+n.replace(/\./g,"\\.").replace(/\[\*\]/g,"\\[\\d+\\]").replace(/\*/g,"[^.\\[\\]]+")+"$";return new RegExp(i).test(r)}function $kr(n,r){for(let i of r)if(Bkr(i.path,n))return i.allowTemplate;return!0}function Jkr(n,r){let a=Q2t(n).filter(l=>!(l in r));if(a.length)throw new Error(`The variable \${${a[0]}} is not defined in the .env file or the engine environment variables (sml.environment.variables). Please add ${a[0]}="your_value_here" to the .env file or configure it in the engine settings to resolve this issue.`)}function Vxe(n,r,i,a=""){if(!i)return n;let l=qkr[r]||[];if(typeof n=="string"){let p=Uxe(n);if(p&&!$kr(a,l))throw new Error(`Variables cannot be used in the "${a}" field. Please provide a fixed value.`);return p?(Jkr(n,i),H2t(n,i)):n}if(Array.isArray(n))return n.map((p,_)=>Vxe(p,r,i,`${a}[${_}]`));if(n&&typeof n=="object"){let p={};for(let _ in n)if(n.hasOwnProperty(_)){let b=a?`${a}.${_}`:_;p[_]=Vxe(n[_],r,i,b)}return p}return n}var bUe=["connection","dataset"];var Y2t=zl(Mse()),Hoe=class n{static create(){return new n}parse(r){return{...r,data:Y2t.parse(r.rawContent),compilationOutput:[]}}};var Qoe=class n{static create(){return new n}parse(r){return{...r,data:JSON.parse(r.rawContent),compilationOutput:[]}}};var UL=class n{static create(){return new n}parse(r){let i=Voe(r.rawContent,{schema:Uoe});return{...r,data:i,compilationOutput:[]}}};var Ukr={yaml:UL.create(),yml:UL.create(),json:Qoe.create(),env:Hoe.create()},TB=class n{constructor(r=Ukr){this.mappings=r}static create(){return new n}parseRawContent(r,i="yaml"){let a={rawContent:r,relativePath:`name.${i}`};return this.parse(a).data}parse(r){let i=Na.getExtensionFromPath(r.relativePath);return i?(this.mappings[i]||this.defaultParser()).parse(r):this.defaultParser().parse(r)}defaultParser(){return{parse(r){return{...r,data:r.rawContent,compilationOutput:[]}},parseRawContent(r){return r}}}};var Vkr=n=>n.trim()===""||n.trim().startsWith("#")?!0:/^[A-Za-z_]+[A-Za-z0-9_]*=(.*)$/.test(n),Yoe=class{getErrors(r){let i=[];return r.split(/\r?\n/).forEach((l,p)=>{Vkr(l)||i.push(`Invalid format at line ${p+1}: "${l}"`)}),i}};var Koe=class{getErrors(r){try{return JSON.parse(r),[]}catch(i){return typeof i=="string"?[i]:i instanceof Error?[i.message]:[`${i}`]}}};var cQ=class{getErrors(r){let i=[];try{zoe.load(r)}catch(a){a instanceof Woe?i.push(a.message):i.push(`Unknown yaml parsing error: ${Wd.getErrorMessage(a)}`)}return i}};var Wkr={yml:new cQ,yaml:new cQ,json:new Koe,env:new Yoe},Xoe=class{constructor(r=Wkr){this.mappings=r}getValidator(r){let i=this.getExtensionFromPath(r);return i?this.mappings[i]||this.dummyValidator():this.dummyValidator()}dummyValidator(){return{getErrors:()=>[]}}getExtensionFromPath(r){let i=r.lastIndexOf("/"),a=i===-1?0:i+1,l=r.substring(a),p=l.lastIndexOf(".");if(!(p===-1||p===l.length-1))return l.substring(p+1)}};var Mk=class{static traverse(r,i){r.files.forEach(i),r.folders.flatMap(a=>this.traverse(a,i))}};var SUe={unknownObjectTypeWarning:"Unknown object type. File will be skipped.",notSupportedObjectTypeError:n=>`Not supported object type ${n}`},CB=class{getType(r,i){let a=r.data;if(!a||!a.object_type){r.compilationOutput.push({message:SUe.unknownObjectTypeWarning,severity:"warning"}),i.file(r).addWarning(SUe.unknownObjectTypeWarning);return}if(!Object.values(nl).filter(p=>isNaN(Number(p))).includes(a.object_type)){i.file(r).addError(SUe.notSupportedObjectTypeError(a.object_type));return}return a.object_type}};var zkr=n=>No.hasProps("rawContent")&&(n.rawContent||"").length>0,Zoe=n=>({relativePath:n.relativePath,compilationOutput:[],origin:n.origin,type:"Unknown",data:n.data,rawContent:n.rawContent,packageName:n.packageName}),VL=class{constructor(r={}){this.compilerSettings=r.compilerSettings||{amlFileExtensions:["yaml","yml"]},this.fileTypeValidationFactory=r.fileTypeValidationFactory||new Xoe,this.yamlObjectTypeExtractor=r.yamlObjectTypeExtractor||new CB,this.fileParser=r.fileParser||new TB}parseFolderStructure(r,i,a){let l=r.files.find(E=>E.relativePath===r3.relativePath),p=l?this.parseFile(l,i):void 0,_=p?.data,b=a||_?{...a,..._}:void 0;l&&(r.files=r.files.filter(E=>E.relativePath!==r3.relativePath)??[]);let T=this.parseFolderStructureInternal(r,i,b);return p&&T.files.push(p),T}parseFolderStructureInternal(r,i,a,l=1){if(l>=50){let _=`Max folder depth exceed. Max folder depth is 50. Current folder path: ${r.path}`;throw i.global().addError(_),new n3(_)}let p={path:r.path,origin:r.origin,files:[],folders:[],packageName:r.packageName};return p.files=r.files.map(_=>this.parseFile(_,i,a)),p.folders=r.folders.map(_=>this.parseFolderStructureInternal(_,i,a,l+1)),p}getTextFile(r){return{...r,type:Zm.Text,data:void 0}}getEnvFile(r,i){return{...r,type:Zm.Environment,data:i}}parseFile(r,i,a){let l=[...this.compilerSettings.amlFileExtensions,ML,...OO];if(!this.hasValidExtension(l,r))return i.file(r).addInfo("File is not recognized as atscale file and will be skipped"),Zoe(r);let p=this.compilerSettings.amlFileExtensions.includes(Na.getExtensionFromPath(r.relativePath)||""),_=j1.isEnvFile(r);if(_&&!Na.isFileOnRootLevel(r.relativePath)&&i.file(r).addWarning("Environment files should be on root level"),zkr(r)){let T=this.fileTypeValidationFactory.getValidator(r.relativePath).getErrors(r.rawContent);if(T.length>0)return T.forEach(j=>{i.file(r).addWarning(j)}),_?this.getEnvFile(r):p?this.getTextFile(r):Zoe(r);let E={},k;try{E=this.fileParser.parse(r);let j=Na.getExtensionFromPath(r.relativePath)||"";k=OO.includes(j)?void 0:this.yamlObjectTypeExtractor.getType(E,i),E=this.handleEnvironmentVariableInParsedFile({file:E,objectType:k,environmentVariables:a,validatorOutput:i})}catch(j){return i.file(r).addError(`File content is invalid. It cannot be parsed. ${Wd.getErrorMessage(j)}`),_?this.getEnvFile(r):p?this.getTextFile(r):Zoe(r)}if(k){let j=Nxe(r.rawContent)||void 0;return{...r,type:k,data:E.data,rawContent:j?Oxe(r.rawContent):r.rawContent,headerComments:j}}else return _?this.getEnvFile(r,E.data):j1.isTextFile(r)||p?this.getTextFile(r):Zoe(r)}else return _?(i.file(r).addWarning("Environment file is empty"),this.getEnvFile(r)):j1.isTextFile(r)?this.getTextFile(r):(i.file(r).addInfo("File has no rawContent and will be skipped"),Zoe(r))}extractYamlFiles(r){let i=[];return Mk.traverse(r,a=>{if(j1.isYamlFile(a)&&this.hasValidExtension(this.compilerSettings.amlFileExtensions,a)){if(this.isFileTypeCatalog(a.type)&&a.origin!=="R")return;i.push(a)}}),i}hasValidExtension(r,i){let a=Na.getExtensionFromPath(i.relativePath);return!!a&&r.includes(a)}getYamlFilesWithValidObjectType(r,i){let a=[];return r.forEach(l=>{j1.isYamlFile(l)&&this.yamlObjectTypeExtractor.getType(l,i)&&a.push(l)}),a}isFileTypeCatalog(r){return r===Zm.Catalog}handleEnvironmentVariableInParsedFile({file:r,objectType:i,environmentVariables:a,validatorOutput:l}){if(!Uxe(r.rawContent))return r;if(i&&!bUe.includes(i))return l.file(r).addError(`Variable placeholders (e.g., \${VARIABLE_NAME}) were detected in a ${i} file. Variable replacement is only supported for the following file types: ${bUe.join(", ")}.`),r;if(!a)return l.file(r).addError("Referenced variables were detected, but no environment variables are configured. Please create a .env file or configure the engine environment variables (sml.environment.variables)."),r;let _=r.data;try{_=this.replaceVariablesInData(r.data,a)}catch(b){return l.file(r).addError(Wd.getErrorMessage(b)),r}return{...r,data:_}}replaceVariablesInData(r,i){return Vxe(r,r.object_type,i)}};var xC="package.yml";var Gkr=n=>`${n} is required`,DUe=class n{constructor(r){this.ErrorConstructor=r}forError(r){return new n(r)}should(r,i){if(!r)throw new this.ErrorConstructor(i)}exists(r,i){this.should(r!=null,i),typeof r=="number"&&this.should(!isNaN(r),i)}notEmpty(r,i){let a=r!=null&&r.trim()!=="";this.should(a,i)}allRequired(r){r.forEach(([i,a])=>{let l=Gkr(a);typeof i=="string"&&this.notEmpty(i,l),this.exists(i,l)})}ensure(r,i){if(this.exists(r,i),!r)throw new this.ErrorConstructor(i);return r}ensureType(r,i,a){if(i(r))return r;throw new this.ErrorConstructor(a)}},eae=new DUe(Error),n2=eae;var Hkr=function(n,r,i,a){function l(p){return p instanceof i?p:new i(function(_){_(p)})}return new(i||(i=Promise))(function(p,_){function b(k){try{E(a.next(k))}catch(j){_(j)}}function T(k){try{E(a.throw(k))}catch(j){_(j)}}function E(k){k.done?p(k.value):l(k.value).then(b,T)}E((a=a.apply(n,r||[])).next())})},Qkr=n=>n?n instanceof Error?n.message:typeof n=="string"?n:`${n}`:"unknown error",Lk={getErrorMessage(n,r){let i=Qkr(n);return r?.removeStartString&&i.startsWith(r.removeStartString)?i.substring(r.removeStartString.length).trim():i},getError(n){return new Error(this.getErrorMessage(n))},hasErrorCode:n=>{if(!n)return!1;let r=n.code;return r?typeof r=="string":!1},executeQueryOrThrow(n){var r;return Hkr(this,void 0,void 0,function*(){try{return yield n()}catch(i){let a;if(i.response)try{a=(yield i.response.json()).message}catch(p){a=`Could not get json error. Error ${Lk.getErrorMessage(p)}. Original error: ${Lk.getErrorMessage(i)}`}else a=`Error: ${Lk.getErrorMessage(i)}`;let l=new Error(a);throw l.status=(r=i.response)===null||r===void 0?void 0:r.status,l}})}},Wxe=Lk;var K2t=function(n,r,i,a){function l(p){return p instanceof i?p:new i(function(_){_(p)})}return new(i||(i=Promise))(function(p,_){function b(k){try{E(a.next(k))}catch(j){_(j)}}function T(k){try{E(a.throw(k))}catch(j){_(j)}}function E(k){k.done?p(k.value):l(k.value).then(b,T)}E((a=a.apply(n,r||[])).next())})},xUe=class{wait(r=50){return K2t(this,void 0,void 0,function*(){return new Promise(i=>{setTimeout(()=>i(),r)})})}returnDelayed(r,i=300){return K2t(this,void 0,void 0,function*(){return yield this.wait(i),r})}},Hcn=new xUe;var Ykr={cloneFunctions:!1},lQ=class n{static deep(r,i={}){let a=Object.assign(Object.assign({},Ykr),i);if(r==null)return r;let l=typeof r=="function";if(!l&&!(typeof r=="object"))return r;if(l)return a.cloneFunctions?r:void 0;if(Array.isArray(r))return r.map(_=>n.deep(_,a));if(r instanceof Date)return new Date(r.getTime());{let _={},b=Object.keys(r);for(let T of b)_[T]=n.deep(r[T],a);return _}}static cleanEmptyProperties(r){let i={};for(let a in r){let l=r[a];l===""||l===void 0||l===null||(typeof l=="object"?i[a]=n.cleanEmptyProperties(l):i[a]=l)}return i}};var Kkr=/token/i,Xkr=/password/i,Zkr=/secret/i,X2t=[Kkr,Xkr,Zkr],TUe=class{constructor(){this.undefinedString="[undefined]",this.functionString="[function]",this.circularString="[Circular]",this.obfuscatedString="***"}obfuscate(r){return typeof r=="string"?r==null?this.obfuscatedString:r.length<=6?this.obfuscatedString:r.length<=9?`${this.obfuscatedString}${r.substring(r.length-3)}`:`${r.substring(0,3)}${this.obfuscatedString}${r.substring(r.length-3)}`:this.obfuscatedString}getMaxObjectDepthError(r){return`Max object depth (${r.maxObjectDepth}) exceeded. Current depth: ${r.currentDepth}`}obfuscateObject(r,i,a,l=1){if(l>i.maxObjectDepth)return this.getMaxObjectDepthError({maxObjectDepth:i.maxObjectDepth,currentDepth:l});if(r instanceof Date)return r.toISOString();if(r instanceof Map){let p={};for(let[_,b]of r.entries()){let T=typeof _=="string"?_:i.jsonSerialize(_);X2t.some(E=>E.test(T))?p[T]=this.obfuscate(b):p[T]=this.obfuscateObject(b,i,a,l+1)}return p}if(r instanceof Set)return Array.from(r).map(p=>this.obfuscateObject(p,i,a,l+1));if(typeof r=="bigint")return r.toString();if(r===void 0)return i.serializeUndefined?this.undefinedString:r;if(typeof r=="function")return i.serializeFunctions?this.functionString:r;if(typeof r=="symbol")return i.serializeSymbols?r.toString():r;if(Array.isArray(r))return r.map(p=>this.obfuscateObject(p,i,a,l+1));if(r!==null&&typeof r=="object"){if(a.has(r))return this.circularString;a.add(r);let p={};for(let[_,b]of Object.entries(r))_.toLowerCase()!=="prototype"&&(typeof b=="function"&&!i.serializeFunctions||(typeof b=="string"&&X2t.some(T=>T.test(_))?p[_]=this.obfuscate(b):p[_]=this.obfuscateObject(b,i,a,l+1)));return p}return r}safeToString(r,i){let l=Object.assign({serializeUndefined:!0,serializeFunctions:!1,serializeSymbols:!1,rethrowErrors:!1,maxObjectDepth:10,jsonSerialize:JSON.stringify},i??{});try{let p=new WeakSet,_=this.obfuscateObject(r,l,p);return l.jsonSerialize(_,null,l.space)}catch(p){let _=`Error serializing object: ${Wxe.getErrorMessage(p)}`;if(l.rethrowErrors)throw Error(_);return _}}},rln=new TUe;var ePr="4d2cacb5-5b53-4da4-b120-709089990e91",CUe=class{generateNew(){return xB()}generateNewPredictable(r){return $L(r,ePr)}validate(r){return s3(r)}parse(r){return DB(r)}},EUe=new CUe;var tPr=(n,r)=>{let i=r===void 0?"string":r,a=Object.keys(n).map(l=>n[l]);if(i==="string")return a;if(i==="number")return a.map(l=>parseInt(l)).filter(l=>!isNaN(l));throw new Error(`result type "${r}" is not supported in EnumUtil.getAllValues`)},rPr={getAllValues:tPr},Z2t=rPr;var WL;(function(n){n.Second="s",n.Minute="m",n.Hour="h",n.Day="d",n.Week="w"})(WL||(WL={}));var bln=Z2t.getAllValues(WL,"string");var Sln=[{unit:WL.Week,factor:1},{unit:WL.Day,factor:7},{unit:WL.Hour,factor:24},{unit:WL.Minute,factor:60},{unit:WL.Second,factor:60}];var twt="\\",wUe="/",ewt=[wUe,twt],AUe=class{constructor(){this._pathSeparator=typeof process<"u"&&process.platform==="win32"?twt:wUe,this._pathSeparatorChanged=!1}get pathSeparator(){return this._pathSeparator}set pathSeparator(r){n2.should(!this._pathSeparatorChanged,`Path separator is already changed to ${this._pathSeparator}. For protection it can be set only once.`),n2.should(ewt.includes(r),`Cannot set pathSeparator to '${r}'. It is invalid. It should be one of: ${ewt.join(",")}`),this._pathSeparatorChanged=!0,this._pathSeparator=r}joinTwo(r,i){if(r==="")return i;if(i==="")return r;let a=r.endsWith(this.pathSeparator)?r.slice(void 0,r.length-1):r,l=i.startsWith(this.pathSeparator)?i.slice(1):i;return`${a}${this.pathSeparator}${l}`}join(...r){return n2.ensure(r.length>1,"Cannot join path for less than two paths"),r.slice(1).reduce((i,a)=>this.joinTwo(i,a),r[0])}areEqual(r,i){if(r===i)return!0;if(r===void 0||i===void 0)return!1;let a=r.startsWith(this.pathSeparator)?r.substring(1):r,l=i.startsWith(this.pathSeparator)?i.substring(1):i;return a.endsWith(this.pathSeparator)&&(a=a.substring(0,a.length-1)),l.endsWith(this.pathSeparator)&&(l=l.substring(0,l.length-1)),a===l}getExtensionFromPath(r){let i=r.lastIndexOf(this.pathSeparator),a=i===-1?0:i+1,l=r.substring(a),p=l.lastIndexOf(".");if(!(p===-1||p===l.length-1))return l.substring(p+1)}getFileNameFromPath(r){let i=r.lastIndexOf(this.pathSeparator);return i!==-1?r.substring(i+1):r}getFileNameFromPathWithoutExtension(r){let i=this.getFileNameFromPath(r),a=this.getExtensionFromPath(r);return a?i.replace("."+a,""):i}isFileOnRootLevel(r){let i=r.lastIndexOf(this.pathSeparator);return i===-1?!0:!r.substring(0,i).length}getPath(r,i){let a=this.pathSeparator===wUe,l=`${r}${i}`;return r.endsWith(this.pathSeparator)&&i.startsWith(this.pathSeparator)&&(l=`${r}${i.slice(1)}`),!r.endsWith(this.pathSeparator)&&!i.startsWith(this.pathSeparator)&&(l=`${r}${this.pathSeparator}${i}`),a&&!l.startsWith(this.pathSeparator)?`${this.pathSeparator}${l}`:l}getPathWithoutFileName(r){if(this.isFileOnRootLevel(r))return this.pathSeparator;let i=r.lastIndexOf(this.pathSeparator);return r.substring(0,i)}rewriteFolderPath(r,i){n2.ensure(r.startsWith(this.pathSeparator)&&r.endsWith(this.pathSeparator),"Path is not a folder path");let l=[...r.split(this.pathSeparator).filter(p=>p!=="").slice(0,-1),i];return`${this.pathSeparator}${l.join(this.pathSeparator)}${this.pathSeparator}`}getFolderPath(r,i){return`${r}${i}${this.pathSeparator}`}getFolders(r){let i=this.isFolderPath(r),a=r.split(this.pathSeparator).filter(l=>l!=="");return i?a:a.slice(0,-1)}isFolderPath(r){return r.endsWith(this.pathSeparator)}getParentFolderPath(r){let i=this.isFolderPath(r),a=this.getFolders(r);return a=i?a.slice(0,-1):a,`${a.join(this.pathSeparator)}${this.pathSeparator}`}},nPr=new AUe;var rwt=n=>n.replace(/(['"\w])\s+(?=[A-Za-z_][A-Za-z0-9_]*=)/g,`$1
673
673
  `);var IUe;(function(n){n.Info="Info",n.Warning="Warning",n.Error="Error"})(IUe||(IUe={}));var kUe=class extends $xe{constructor(r){super(r),this.version(1).stores({logs:`++id,
674
674
  timestamp,
675
675
  level,
@@ -118,5 +118,5 @@
118
118
  "strict": true
119
119
  }
120
120
  },
121
- "version": "2026.7.0-rc.32"
121
+ "version": "2026.7.0-rc.33"
122
122
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sml-cli",
3
3
  "description": "Semantic Modeling Language CLI",
4
- "version": "2026.7.0-rc.32",
4
+ "version": "2026.7.0-rc.33",
5
5
  "bin": {
6
6
  "sml-cli": "./bin/run.js"
7
7
  },