@kern0x1b/penstock-cli 0.0.0-stage → 26.10.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.
- package/THIRD-PARTY-NOTICES.md +1646 -0
- package/dist/arial-metrics.json +1 -0
- package/dist/grammars/tree-sitter-c-sharp.wasm +0 -0
- package/dist/grammars/tree-sitter-go.wasm +0 -0
- package/dist/grammars/tree-sitter-groovy.wasm +0 -0
- package/dist/grammars/tree-sitter-java.wasm +0 -0
- package/dist/grammars/tree-sitter-javascript.wasm +0 -0
- package/dist/grammars/tree-sitter-kotlin.wasm +0 -0
- package/dist/grammars/tree-sitter-python.wasm +0 -0
- package/dist/grammars/tree-sitter-scala.wasm +0 -0
- package/dist/grammars/tree-sitter-typescript.wasm +0 -0
- package/dist/grammars/web-tree-sitter.wasm +0 -0
- package/dist/licensing.json +17 -0
- package/dist/penstock.js +2102 -0
- package/dist/syntax-worker.js +5 -0
- package/dist/web/assets/AgentSettings-B_c5K0Hd.js +1 -0
- package/dist/web/assets/AgentsDialog-BtgwT_49.js +1 -0
- package/dist/web/assets/BpmnCanvas-BeOwGJEV.js +1905 -0
- package/dist/web/assets/BpmnDocument-DioCJiv7.js +24 -0
- package/dist/web/assets/ConflictDialog-B9V39KUg.js +1 -0
- package/dist/web/assets/DiffDocument-t0gjzCba.js +1 -0
- package/dist/web/assets/DmnDocument-ChFDTt1F.js +41 -0
- package/dist/web/assets/DmnDocument-VhMjHTN6.css +1 -0
- package/dist/web/assets/FormDocument-TEeVD6T7.js +32 -0
- package/dist/web/assets/FormDocument-URLcKn84.css +1 -0
- package/dist/web/assets/FormStepView-DLNQ8jVN.js +1 -0
- package/dist/web/assets/GraphAwareLayoutService-DFtkFUrn.js +21 -0
- package/dist/web/assets/NewFileDialog-BPBljAGC.js +34 -0
- package/dist/web/assets/QuickOpen-DOe23FAR.js +1 -0
- package/dist/web/assets/ScriptPane-DzBYUW23.js +2 -0
- package/dist/web/assets/ScriptRunDialog-BtLkIreU.js +1 -0
- package/dist/web/assets/SettingsDialog-YoMl6NJ1.js +1 -0
- package/dist/web/assets/ShortcutsDialog-D0_aCcNe.js +1 -0
- package/dist/web/assets/SourceDocument-p3iREvQI.js +1 -0
- package/dist/web/assets/TextDocument-DWg1EqKB.js +1 -0
- package/dist/web/assets/UnreadableFileLayer-ep6zQMtt.js +1 -0
- package/dist/web/assets/UploadDialog-ZOy1owan.js +1 -0
- package/dist/web/assets/Viewer-C7pbHtwq.js +4 -0
- package/dist/web/assets/apply-B8eZkNJ6.js +1 -0
- package/dist/web/assets/array-move-Bc4mVEdq.js +1 -0
- package/dist/web/assets/bpmn-0HrGCizt.svg +228 -0
- package/dist/web/assets/bpmn-Cyvp-fAH.eot +0 -0
- package/dist/web/assets/bpmnTheme-CebWk9Ei.js +1683 -0
- package/dist/web/assets/bridgeInstance-DzSjLJAc.js +600 -0
- package/dist/web/assets/clike-DaHM3zHz.js +1 -0
- package/dist/web/assets/colors-dark-C7vOziWz.css +1 -0
- package/dist/web/assets/colors-dracula-CXhMcc1Z.css +1 -0
- package/dist/web/assets/colors-light-CyT40N4M.css +1 -0
- package/dist/web/assets/de-DG3quwSS.js +1 -0
- package/dist/web/assets/dialog-Cn1DzN2I.js +1 -0
- package/dist/web/assets/diff-DMf6xJj1.js +1 -0
- package/dist/web/assets/dist--ADMeFWW.js +57 -0
- package/dist/web/assets/dist--PmHUHDp.js +1 -0
- package/dist/web/assets/dist-2wOiLlcG.js +1 -0
- package/dist/web/assets/dist-BYu4mHLv.js +23 -0
- package/dist/web/assets/dist-BaWEbDAw.js +1 -0
- package/dist/web/assets/dist-BnLLb41E.js +2 -0
- package/dist/web/assets/dist-BqwyxNP3.js +1 -0
- package/dist/web/assets/dist-BxuUJA8B.js +1 -0
- package/dist/web/assets/dist-CHkSydPE.js +1 -0
- package/dist/web/assets/dist-CHluRwHI.js +2 -0
- package/dist/web/assets/dist-CRJyslwo.js +1 -0
- package/dist/web/assets/dist-CxyFqsL2.js +6 -0
- package/dist/web/assets/dist-D0cjZCsW.js +13 -0
- package/dist/web/assets/dist-DBnQKg4d.js +1 -0
- package/dist/web/assets/dist-DIdDTNn9.js +2 -0
- package/dist/web/assets/dist-DXXc07IK.js +1 -0
- package/dist/web/assets/dist-DgvQWhKm.js +6 -0
- package/dist/web/assets/dist-DlbES2QN.js +1 -0
- package/dist/web/assets/dist-Dup2uTdL.js +6 -0
- package/dist/web/assets/dist-TNwbKIWT.js +1 -0
- package/dist/web/assets/dist-f4FXNtig.js +1 -0
- package/dist/web/assets/dist-zHmj1-pd.js +5 -0
- package/dist/web/assets/dmn-2EwrEScy.eot +0 -0
- package/dist/web/assets/dmn-eH1_eUsy.svg +90 -0
- package/dist/web/assets/dockLayout-CxOMo-Nl.js +1 -0
- package/dist/web/assets/documentBridge-BXU6mgKl.js +240 -0
- package/dist/web/assets/documents-XvKodSic.js +1 -0
- package/dist/web/assets/duplicate-CKn70NtG.js +342 -0
- package/dist/web/assets/ed25519-DTYhEcYX.js +1 -0
- package/dist/web/assets/engine-BPUfS3r2.js +1 -0
- package/dist/web/assets/engines-BaW52xZ_.js +5 -0
- package/dist/web/assets/es-PcpRjhXP.js +1 -0
- package/dist/web/assets/files-Chpd_QD0.js +1 -0
- package/dist/web/assets/formChecks-TAsEqw2_.js +1 -0
- package/dist/web/assets/fr-BQIO41QS.js +1 -0
- package/dist/web/assets/frontend-By89859W.js +1 -0
- package/dist/web/assets/go-C1TRUqzB.js +1 -0
- package/dist/web/assets/groovy-C2AgVf_z.js +1 -0
- package/dist/web/assets/html2canvas-DEOnTJc-.js +5 -0
- package/dist/web/assets/httpHost-DPT9cNRG.js +1 -0
- package/dist/web/assets/index.es-DXehkcd9.js +4 -0
- package/dist/web/assets/index.es-fKIKPRSg.js +78 -0
- package/dist/web/assets/index.esm-CTLpq4ik.js +3 -0
- package/dist/web/assets/intelligence-_ijxuAw5.js +3 -0
- package/dist/web/assets/ja-CJkgGd9w.js +1 -0
- package/dist/web/assets/jspdf.es.min-DXxYWA_o.js +79 -0
- package/dist/web/assets/ko-BaifpU2V.js +1 -0
- package/dist/web/assets/lib--h_vArmx.js +1 -0
- package/dist/web/assets/libavoid-BRQRZjmQ.wasm +0 -0
- package/dist/web/assets/libavoid.wasm +0 -0
- package/dist/web/assets/platform-_nC9EyYA.js +2 -0
- package/dist/web/assets/preferences-Cfvg8oqM.js +1 -0
- package/dist/web/assets/preload-helper-VRuDKI9K.js +1 -0
- package/dist/web/assets/properties-C3HzGRE2.js +1 -0
- package/dist/web/assets/pt-BR-DkBw_2Tc.js +1 -0
- package/dist/web/assets/purify.es-CyDa74pG.js +3 -0
- package/dist/web/assets/python-CvnBFxgv.js +1 -0
- package/dist/web/assets/resource/ArchitectsDaughter-OFL.txt +93 -0
- package/dist/web/assets/resource/ArchitectsDaughter-Regular.ttf +0 -0
- package/dist/web/assets/resource/JetBrainsMono-Italic.woff2 +0 -0
- package/dist/web/assets/resource/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/web/assets/resource/JetBrainsMono-OFL.txt +52 -0
- package/dist/web/assets/resource/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/web/assets/resource/JetBrainsMono-SemiBold.woff2 +0 -0
- package/dist/web/assets/rolldown-runtime-B8BYMn-z.js +1 -0
- package/dist/web/assets/ru-DhjXKaLT.js +1 -0
- package/dist/web/assets/run-CgRiIIgd.js +1 -0
- package/dist/web/assets/samples-CeaUa4Fn.js +1 -0
- package/dist/web/assets/shortcut-DONH578b.js +1 -0
- package/dist/web/assets/source-frame-C6KIof5s.js +2 -0
- package/dist/web/assets/stackblur-es-Djj-lnDR.js +2 -0
- package/dist/web/assets/syntax-DBcQvmbn.js +6 -0
- package/dist/web/assets/testCaseRuns-Bw2AfAfR.js +1 -0
- package/dist/web/assets/translator-Dt_jCGPm.js +1 -0
- package/dist/web/assets/typing-CXvbBSPr.js +1 -0
- package/dist/web/assets/ui-DDJuNJWb.js +1 -0
- package/dist/web/assets/useTrace-Rwk8eJY1.js +1 -0
- package/dist/web/assets/vendor-NJP34MHU.js +1 -0
- package/dist/web/assets/web-C3yK7kgI.js +148 -0
- package/dist/web/assets/web-CSZhWpVp.css +1 -0
- package/dist/web/assets/zh-tAs09DKy.js +1 -0
- package/dist/web/icon.svg +9 -0
- package/dist/web/index.html +63 -0
- package/dist/web/manifest.webmanifest +14 -0
- package/dist/wrapper/penstockw +68 -0
- package/dist/wrapper/penstockw.cmd +55 -0
- package/package.json +42 -4
- package/README.md +0 -3
|
@@ -0,0 +1,1683 @@
|
|
|
1
|
+
import{i as e,n as t,r as n}from"./rolldown-runtime-B8BYMn-z.js";import{i as r}from"./translator-Dt_jCGPm.js";import"./frontend-By89859W.js";import{t as i}from"./bridgeInstance-DzSjLJAc.js";import{m as a,p as o,v as s}from"./dist-CRJyslwo.js";import"./platform-_nC9EyYA.js";import{n as c}from"./lib--h_vArmx.js";import{rn as l}from"./Viewer-C7pbHtwq.js";import{_ as u,a as d,i as f,s as p,v as m}from"./dist-CHluRwHI.js";import{a as h,n as g,r as _,t as v}from"./dist-TNwbKIWT.js";import{$ as y,I as b,M as x,N as S,Q as C,St as w,T,Tt as E,_ as ee,gt as D,ht as O,l as te,o as ne,pt as re,r as ie,st as ae,t as oe,tt as se,vt as ce,y as le}from"./dist-D0cjZCsW.js";import{i as ue,o as de,p as fe,r as pe}from"./dist-DlbES2QN.js";import{i as me,n as he,r as ge,t as _e}from"./dist-f4FXNtig.js";import{a as ve,r as ye,t as be}from"./dist-CHkSydPE.js";import{l as xe,n as Se}from"./dist-Dup2uTdL.js";import{a as Ce,i as we,n as Te,r as Ee}from"./dist-zHmj1-pd.js";var ApiClient=class{bridge;bpmn;file;constructor(e=i()){this.bridge=e,this.bpmn=new BpmnApi(e),this.file=new FileApi(e)}dispose(){this.bridge.dispose()}},BpmnApi=class{bridge;constructor(e){this.bridge=e}getConfig=()=>this.bridge.getConfig();getPreviewDiff=()=>this.bridge.getPreviewDiff();saveProjectConfig=e=>this.bridge.saveConfig(e);getBpmnXml=()=>this.bridge.getBpmnXml();saveBpmnXml=e=>this.bridge.saveBpmnXml(e);getClipboard=()=>this.bridge.getClipboard();saveClipboard=e=>this.bridge.saveClipboard(e);openScriptFile=(e,t,n,r,i,a)=>this.bridge.openScriptFile(e,t,n,r,i,a);reportScriptSlot=(e,t)=>this.bridge.reportScriptSlot(e,t)},FileApi=class{bridge;constructor(e){this.bridge=e}readFile=e=>this.bridge.readFile(e);saveFile=(e,t,n)=>this.bridge.saveFile(e,t,n);chooseFile=(e,t)=>this.bridge.chooseFile(e,t);exportSvg=e=>this.bridge.exportSvg(e);exportPng=e=>this.bridge.exportPng(e);exportPdf=e=>this.bridge.exportPdf(e);exportFile=async(e,t,n)=>{let i=await this.bridge.chooseFile(e,{title:r(`app.export.asFormat`,{format:e.toUpperCase()}),mode:`save`});i&&await this.bridge.saveFile(i,t,n)}},De;function getApiClient(){return De||=new ApiClient,De}var Oe=n({getCoerced:()=>getCoerced,getCompatible:()=>getCompatible,isCompatible:()=>isCompatible,isSatisfied:()=>isSatisfied});function requireConstants(){return Ae||(Ae=1,ke={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}),ke}function requireDebug(){return Me||(Me=1,je=typeof process==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}),je}function requireRe(){return Ne||(Ne=1,(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=requireConstants(),a=requireDebug();t=e.exports={};let o=t.re=[],s=t.safeRe=[],c=t.src=[],l=t.safeSrc=[],u=t.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],makeSafeRegex=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},createToken=(e,t,n)=>{let r=makeSafeRegex(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};createToken(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),createToken(`NUMERICIDENTIFIERLOOSE`,`\\d+`),createToken(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),createToken(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),createToken(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),createToken(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),createToken(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),createToken(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),createToken(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),createToken(`BUILDIDENTIFIER`,`${f}+`),createToken(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),createToken(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),createToken(`FULL`,`^${c[u.FULLPLAIN]}$`),createToken(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),createToken(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),createToken(`GTLT`,`((?:<|>)?=?)`),createToken(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),createToken(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),createToken(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),createToken(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),createToken(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),createToken(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),createToken(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),createToken(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),createToken(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),createToken(`COERCERTL`,c[u.COERCE],!0),createToken(`COERCERTLFULL`,c[u.COERCEFULL],!0),createToken(`LONETILDE`,`(?:~>?)`),createToken(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace=`$1~`,createToken(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),createToken(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),createToken(`LONECARET`,`(?:\\^)`),createToken(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),t.caretTrimReplace=`$1^`,createToken(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),createToken(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),createToken(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),createToken(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),createToken(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=`$1$2$3`,createToken(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),createToken(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),createToken(`STAR`,`(<|>)?=?\\s*\\*`),createToken(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),createToken(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})(k,k.exports)),k.exports}function requireParseOptions(){if(Fe)return Pe;Fe=1;let e=Object.freeze({loose:!0}),t=Object.freeze({}),parseOptions=n=>n?typeof n==`object`?n:e:t;return Pe=parseOptions,Pe}function requireIdentifiers(){if(Ie)return A;Ie=1;let e=/^[0-9]+$/,compareIdentifiers=(t,n)=>{if(typeof t==`number`&&typeof n==`number`)return t===n?0:t<n?-1:1;let r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers(t,e);return A={compareIdentifiers,rcompareIdentifiers},A}function requireSemver$1(){if(Le)return j;Le=1;let e=requireDebug(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=requireConstants(),{safeRe:r,t:i}=requireRe(),a=requireParseOptions(),{compareIdentifiers:o}=requireIdentifiers();class SemVer{constructor(o,s){if(s=a(s),o instanceof SemVer){if(o.loose===!!s.loose&&o.includePrerelease===!!s.includePrerelease)return o;o=o.version}else if(typeof o!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw TypeError(`version is longer than ${t} characters`);e(`SemVer`,o,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;let c=o.trim().match(s.loose?r[i.LOOSE]:r[i.FULL]);if(!c)throw TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>n||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>n||this.patch<0)throw TypeError(`Invalid patch version`);this.prerelease=c[4]?c[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<n)return t}return e}):[],this.build=c[5]?c[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(e(`SemVer.compare`,this.version,this.options,t),!(t instanceof SemVer)){if(typeof t==`string`&&t===this.version)return 0;t=new SemVer(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof SemVer||(e=new SemVer(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(t){if(t instanceof SemVer||(t=new SemVer(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],i=t.prerelease[n];if(e(`prerelease compare`,n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return o(r,i)}while(++n)}compareBuild(t){t instanceof SemVer||(t=new SemVer(t,this.options));let n=0;do{let r=this.build[n],i=t.build[n];if(e(`build compare`,n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return o(r,i)}while(++n)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),o(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}return j=SemVer,j}function requireParse(){if(Re)return M;Re=1;let e=requireSemver$1(),parse=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}};return M=parse,M}function requireValid$1(){if(Be)return ze;Be=1;let e=requireParse(),valid=(t,n)=>{let r=e(t,n);return r?r.version:null};return ze=valid,ze}function requireClean(){if(He)return Ve;He=1;let e=requireParse(),clean=(t,n)=>{let r=e(t.trim().replace(/^[=v]+/,``),n);return r?r.version:null};return Ve=clean,Ve}function requireInc(){if(We)return Ue;We=1;let e=requireSemver$1(),inc=(t,n,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,a).version}catch{return null}};return Ue=inc,Ue}function requireDiff(){if(Ke)return Ge;Ke=1;let e=requireParse(),diff=(t,n)=>{let r=e(t,null,!0),i=e(n,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`};return Ge=diff,Ge}function requireMajor(){if(Je)return qe;Je=1;let e=requireSemver$1(),major=(t,n)=>new e(t,n).major;return qe=major,qe}function requireMinor(){if(Xe)return Ye;Xe=1;let e=requireSemver$1(),minor=(t,n)=>new e(t,n).minor;return Ye=minor,Ye}function requirePatch(){if(Qe)return Ze;Qe=1;let e=requireSemver$1(),patch=(t,n)=>new e(t,n).patch;return Ze=patch,Ze}function requirePrerelease(){if(et)return $e;et=1;let e=requireParse(),prerelease=(t,n)=>{let r=e(t,n);return r&&r.prerelease.length?r.prerelease:null};return $e=prerelease,$e}function requireCompare(){if(nt)return tt;nt=1;let e=requireSemver$1(),compare=(t,n,r)=>new e(t,r).compare(new e(n,r));return tt=compare,tt}function requireRcompare(){if(it)return rt;it=1;let e=requireCompare(),rcompare=(t,n,r)=>e(n,t,r);return rt=rcompare,rt}function requireCompareLoose(){if(ot)return at;ot=1;let e=requireCompare(),compareLoose=(t,n)=>e(t,n,!0);return at=compareLoose,at}function requireCompareBuild(){if(ct)return st;ct=1;let e=requireSemver$1(),compareBuild=(t,n,r)=>{let i=new e(t,r),a=new e(n,r);return i.compare(a)||i.compareBuild(a)};return st=compareBuild,st}function requireSort(){if(dt)return ut;dt=1;let e=requireCompareBuild(),sort=(t,n)=>t.sort((t,r)=>e(t,r,n));return ut=sort,ut}function requireRsort(){if(pt)return ft;pt=1;let e=requireCompareBuild(),rsort=(t,n)=>t.sort((t,r)=>e(r,t,n));return ft=rsort,ft}function requireGt(){if(ht)return mt;ht=1;let e=requireCompare(),gt=(t,n,r)=>e(t,n,r)>0;return mt=gt,mt}function requireLt(){if(vt)return _t;vt=1;let e=requireCompare(),lt=(t,n,r)=>e(t,n,r)<0;return _t=lt,_t}function requireEq(){if(bt)return yt;bt=1;let e=requireCompare(),eq=(t,n,r)=>e(t,n,r)===0;return yt=eq,yt}function requireNeq(){if(St)return xt;St=1;let e=requireCompare(),neq=(t,n,r)=>e(t,n,r)!==0;return xt=neq,xt}function requireGte(){if(wt)return Ct;wt=1;let e=requireCompare(),gte=(t,n,r)=>e(t,n,r)>=0;return Ct=gte,Ct}function requireLte(){if(Et)return Tt;Et=1;let e=requireCompare(),lte=(t,n,r)=>e(t,n,r)<=0;return Tt=lte,Tt}function requireCmp(){if(Ot)return Dt;Ot=1;let e=requireEq(),t=requireNeq(),n=requireGt(),r=requireGte(),i=requireLt(),a=requireLte(),cmp=(o,s,c,l)=>{switch(s){case`===`:return typeof o==`object`&&(o=o.version),typeof c==`object`&&(c=c.version),o===c;case`!==`:return typeof o==`object`&&(o=o.version),typeof c==`object`&&(c=c.version),o!==c;case``:case`=`:case`==`:return e(o,c,l);case`!=`:return t(o,c,l);case`>`:return n(o,c,l);case`>=`:return r(o,c,l);case`<`:return i(o,c,l);case`<=`:return a(o,c,l);default:throw TypeError(`Invalid operator: ${s}`)}};return Dt=cmp,Dt}function requireCoerce(){if(At)return kt;At=1;let e=requireSemver$1(),t=requireParse(),{safeRe:n,t:r}=requireRe(),coerce=(i,a)=>{if(i instanceof e)return i;if(typeof i==`number`&&(i=String(i)),typeof i!=`string`)return null;a||={};let o=null;if(!a.rtl)o=i.match(a.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);else{let e=a.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL],t;for(;(t=e.exec(i))&&(!o||o.index+o[0].length!==i.length);)(!o||t.index+t[0].length!==o.index+o[0].length)&&(o=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}if(o===null)return null;let s=o[2],c=o[3]||`0`,l=o[4]||`0`,u=a.includePrerelease&&o[5]?`-${o[5]}`:``,d=a.includePrerelease&&o[6]?`+${o[6]}`:``;return t(`${s}.${c}.${l}${u}${d}`,a)};return kt=coerce,kt}function requireLrucache(){if(Mt)return jt;Mt=1;class LRUCache{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}return jt=LRUCache,jt}function requireRange(){if(Pt)return Nt;Pt=1;let e=/\s+/g;class Range{constructor(t,i){if(i=n(i),t instanceof Range)return t.loose===!!i.loose&&t.includePrerelease===!!i.includePrerelease?t:new Range(t.raw,i);if(t instanceof r)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=t.trim().replace(e,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!isNullSet(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&isAny(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&d)|(this.options.loose&&f))+`:`+e,a=t.get(n);if(a)return a;let p=this.options.loose,m=p?o[s.HYPHENRANGELOOSE]:o[s.HYPHENRANGE];e=e.replace(m,hyphenReplace(this.options.includePrerelease)),i(`hyphen replace`,e),e=e.replace(o[s.COMPARATORTRIM],c),i(`comparator trim`,e),e=e.replace(o[s.TILDETRIM],l),i(`tilde trim`,e),e=e.replace(o[s.CARETTRIM],u),i(`caret trim`,e);let h=e.split(` `).map(e=>parseComparator(e,this.options)).join(` `).split(/\s+/).map(e=>replaceGTE0(e,this.options));p&&(h=h.filter(e=>(i(`loose invalid filter`,e,this.options),!!e.match(o[s.COMPARATORLOOSE])))),i(`range list`,h);let g=new Map,_=h.map(e=>new r(e,this.options));for(let e of _){if(isNullSet(e))return[e];g.set(e.value,e)}g.size>1&&g.has(``)&&g.delete(``);let v=[...g.values()];return t.set(n,v),v}intersects(e,t){if(!(e instanceof Range))throw TypeError(`a Range is required`);return this.set.some(n=>isSatisfiable(n,t)&&e.set.some(e=>isSatisfiable(e,t)&&n.every(n=>e.every(e=>n.intersects(e,t)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new a(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}Nt=Range;let t=new(requireLrucache()),n=requireParseOptions(),r=requireComparator(),i=requireDebug(),a=requireSemver$1(),{safeRe:o,t:s,comparatorTrimReplace:c,tildeTrimReplace:l,caretTrimReplace:u}=requireRe(),{FLAG_INCLUDE_PRERELEASE:d,FLAG_LOOSE:f}=requireConstants(),isNullSet=e=>e.value===`<0.0.0-0`,isAny=e=>e.value===``,isSatisfiable=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},parseComparator=(e,t)=>(e=e.replace(o[s.BUILD],``),i(`comp`,e,t),e=replaceCarets(e,t),i(`caret`,e),e=replaceTildes(e,t),i(`tildes`,e),e=replaceXRanges(e,t),i(`xrange`,e),e=replaceStars(e,t),i(`stars`,e),e),isX=e=>!e||e.toLowerCase()===`x`||e===`*`,replaceTildes=(e,t)=>e.trim().split(/\s+/).map(e=>replaceTilde(e,t)).join(` `),replaceTilde=(e,t)=>{let n=t.loose?o[s.TILDELOOSE]:o[s.TILDE];return e.replace(n,(t,n,r,a,o)=>{i(`tilde`,e,t,n,r,a,o);let s;return isX(n)?s=``:isX(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:isX(a)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(i(`replaceTilde pr`,o),s=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,i(`tilde return`,s),s})},replaceCarets=(e,t)=>e.trim().split(/\s+/).map(e=>replaceCaret(e,t)).join(` `),replaceCaret=(e,t)=>{i(`caret`,e,t);let n=t.loose?o[s.CARETLOOSE]:o[s.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,a,o,s)=>{i(`caret`,e,t,n,a,o,s);let c;return isX(n)?c=``:isX(a)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:isX(o)?c=n===`0`?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:s?(i(`replaceCaret pr`,s),c=n===`0`?a===`0`?`>=${n}.${a}.${o}-${s} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${s} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${s} <${+n+1}.0.0-0`):(i(`no pr`),c=n===`0`?a===`0`?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),i(`caret return`,c),c})},replaceXRanges=(e,t)=>(i(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>replaceXRange(e,t)).join(` `)),replaceXRange=(e,t)=>{e=e.trim();let n=t.loose?o[s.XRANGELOOSE]:o[s.XRANGE];return e.replace(n,(n,r,a,o,s,c)=>{i(`xRange`,e,n,r,a,o,s,c);let l=isX(a),u=l||isX(o),d=u||isX(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(o=0),s=0,r===`>`?(r=`>=`,u?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):r===`<=`&&(r=`<`,u?a=+a+1:o=+o+1),r===`<`&&(c=`-0`),n=`${r+a}.${o}.${s}${c}`):u?n=`>=${a}.0.0${c} <${+a+1}.0.0-0`:d&&(n=`>=${a}.${o}.0${c} <${a}.${+o+1}.0-0`),i(`xRange return`,n),n})},replaceStars=(e,t)=>(i(`replaceStars`,e,t),e.trim().replace(o[s.STAR],``)),replaceGTE0=(e,t)=>(i(`replaceGTE0`,e,t),e.trim().replace(o[t.includePrerelease?s.GTE0PRE:s.GTE0],``)),hyphenReplace=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=isX(r)?``:isX(i)?`>=${r}.0.0${e?`-0`:``}`:isX(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=isX(l)?``:isX(u)?`<${+l+1}.0.0-0`:isX(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),testSet=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(i(e[n].semver),e[n].semver!==r.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return Nt}function requireComparator(){if(It)return Ft;It=1;let e=Symbol(`SemVer ANY`);class Comparator{static get ANY(){return e}constructor(n,r){if(r=t(r),n instanceof Comparator){if(n.loose===!!r.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(` `),a(`comparator`,n,r),this.options=r,this.loose=!!r.loose,this.parse(n),this.value=this.semver===e?``:this.operator+this.semver.version,a(`comp`,this)}parse(t){let i=this.options.loose?n[r.COMPARATORLOOSE]:n[r.COMPARATOR],a=t.match(i);if(!a)throw TypeError(`Invalid comparator: ${t}`);this.operator=a[1]===void 0?``:a[1],this.operator===`=`&&(this.operator=``),this.semver=a[2]?new o(a[2],this.options.loose):e}toString(){return this.value}test(t){if(a(`Comparator.test`,t,this.options.loose),this.semver===e||t===e)return!0;if(typeof t==`string`)try{t=new o(t,this.options)}catch{return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof Comparator))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new s(e.value,n).test(this.value):e.operator===``?e.value===``||new s(this.value,n).test(e.semver):(n=t(n),n.includePrerelease&&(this.value===`<0.0.0-0`||e.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||e.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&e.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&e.operator.startsWith(`<`)||this.semver.version===e.semver.version&&this.operator.includes(`=`)&&e.operator.includes(`=`)||i(this.semver,`<`,e.semver,n)&&this.operator.startsWith(`>`)&&e.operator.startsWith(`<`)||i(this.semver,`>`,e.semver,n)&&this.operator.startsWith(`<`)&&e.operator.startsWith(`>`)))}}Ft=Comparator;let t=requireParseOptions(),{safeRe:n,t:r}=requireRe(),i=requireCmp(),a=requireDebug(),o=requireSemver$1(),s=requireRange();return Ft}function requireSatisfies(){if(Rt)return Lt;Rt=1;let e=requireRange(),satisfies=(t,n,r)=>{try{n=new e(n,r)}catch{return!1}return n.test(t)};return Lt=satisfies,Lt}function requireToComparators(){if(Bt)return zt;Bt=1;let e=requireRange(),toComparators=(t,n)=>new e(t,n).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `));return zt=toComparators,zt}function requireMaxSatisfying(){if(Ht)return Vt;Ht=1;let e=requireSemver$1(),t=requireRange(),maxSatisfying=(n,r,i)=>{let a=null,o=null,s=null;try{s=new t(r,i)}catch{return null}return n.forEach(t=>{s.test(t)&&(!a||o.compare(t)===-1)&&(a=t,o=new e(a,i))}),a};return Vt=maxSatisfying,Vt}function requireMinSatisfying(){if(Wt)return Ut;Wt=1;let e=requireSemver$1(),t=requireRange(),minSatisfying=(n,r,i)=>{let a=null,o=null,s=null;try{s=new t(r,i)}catch{return null}return n.forEach(t=>{s.test(t)&&(!a||o.compare(t)===1)&&(a=t,o=new e(a,i))}),a};return Ut=minSatisfying,Ut}function requireMinVersion(){if(Kt)return Gt;Kt=1;let e=requireSemver$1(),t=requireRange(),n=requireGt(),minVersion=(r,i)=>{r=new t(r,i);let a=new e(`0.0.0`);if(r.test(a)||(a=new e(`0.0.0-0`),r.test(a)))return a;a=null;for(let t=0;t<r.set.length;++t){let i=r.set[t],o=null;i.forEach(t=>{let r=new e(t.semver.version);switch(t.operator){case`>`:r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case``:case`>=`:(!o||n(r,o))&&(o=r);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${t.operator}`)}}),o&&(!a||n(a,o))&&(a=o)}return a&&r.test(a)?a:null};return Gt=minVersion,Gt}function requireValid(){if(Jt)return qt;Jt=1;let e=requireRange(),validRange=(t,n)=>{try{return new e(t,n).range||`*`}catch{return null}};return qt=validRange,qt}function requireOutside(){if(Xt)return Yt;Xt=1;let e=requireSemver$1(),t=requireComparator(),{ANY:n}=t,r=requireRange(),i=requireSatisfies(),a=requireGt(),o=requireLt(),s=requireLte(),c=requireGte(),outside=(l,u,d,f)=>{l=new e(l,f),u=new r(u,f);let p,m,h,g,_;switch(d){case`>`:p=a,m=s,h=o,g=`>`,_=`>=`;break;case`<`:p=o,m=c,h=a,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(i(l,u,f))return!1;for(let e=0;e<u.set.length;++e){let r=u.set[e],i=null,a=null;if(r.forEach(e=>{e.semver===n&&(e=new t(`>=0.0.0`)),i||=e,a||=e,p(e.semver,i.semver,f)?i=e:h(e.semver,a.semver,f)&&(a=e)}),i.operator===g||i.operator===_||(!a.operator||a.operator===g)&&m(l,a.semver)||a.operator===_&&h(l,a.semver))return!1}return!0};return Yt=outside,Yt}function requireGtr(){if(Qt)return Zt;Qt=1;let e=requireOutside(),gtr=(t,n,r)=>e(t,n,`>`,r);return Zt=gtr,Zt}function requireLtr(){if(en)return $t;en=1;let e=requireOutside(),ltr=(t,n,r)=>e(t,n,`<`,r);return $t=ltr,$t}function requireIntersects(){if(nn)return tn;nn=1;let e=requireRange(),intersects=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r));return tn=intersects,tn}function requireSimplify(){if(rn)return simplify;rn=1;let e=requireSatisfies(),t=requireCompare();return simplify=(n,r,i)=>{let a=[],o=null,s=null,c=n.sort((e,n)=>t(e,n,i));for(let t of c)e(t,r,i)?(s=t,o||=t):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof r.raw==`string`?r.raw:String(r);return u.length<d.length?u:r},simplify}function requireSubset(){if(on)return an;on=1;let e=requireRange(),t=requireComparator(),{ANY:n}=t,r=requireSatisfies(),i=requireCompare(),subset=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;OUTER:for(let e of t.set){for(let t of n.set){let n=simpleSubset(e,t,r);if(i||=n!==null,n)continue OUTER}if(i)return!1}return!0},a=[new t(`>=0.0.0-0`)],o=[new t(`>=0.0.0`)],simpleSubset=(e,t,s)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===n){if(t.length===1&&t[0].semver===n)return!0;e=s.includePrerelease?a:o}if(t.length===1&&t[0].semver===n){if(s.includePrerelease)return!0;t=o}let c=new Set,l,u;for(let t of e)t.operator===`>`||t.operator===`>=`?l=higherGT(l,t,s):t.operator===`<`||t.operator===`<=`?u=lowerLT(u,t,s):c.add(t.semver);if(c.size>1)return null;let d;if(l&&u&&(d=i(l.semver,u.semver,s),d>0||d===0&&(l.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of c){if(l&&!r(e,String(l),s)||u&&!r(e,String(u),s))return null;for(let n of t)if(!r(e,String(n),s))return!1;return!0}let f,p,m,h,g=u&&!s.includePrerelease&&u.semver.prerelease.length?u.semver:!1,_=l&&!s.includePrerelease&&l.semver.prerelease.length?l.semver:!1;g&&g.prerelease.length===1&&u.operator===`<`&&g.prerelease[0]===0&&(g=!1);for(let e of t){if(h=h||e.operator===`>`||e.operator===`>=`,m=m||e.operator===`<`||e.operator===`<=`,l){if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),e.operator===`>`||e.operator===`>=`){if(f=higherGT(l,e,s),f===e&&f!==l)return!1}else if(l.operator===`>=`&&!r(l.semver,String(e),s))return!1}if(u){if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),e.operator===`<`||e.operator===`<=`){if(p=lowerLT(u,e,s),p===e&&p!==u)return!1}else if(u.operator===`<=`&&!r(u.semver,String(e),s))return!1}if(!e.operator&&(u||l)&&d!==0)return!1}return!(l&&m&&!u&&d!==0||u&&h&&!l&&d!==0||_||g)},higherGT=(e,t,n)=>{if(!e)return t;let r=i(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},lowerLT=(e,t,n)=>{if(!e)return t;let r=i(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};return an=subset,an}function requireSemver(){if(cn)return sn;cn=1;let e=requireRe(),t=requireConstants(),n=requireSemver$1(),r=requireIdentifiers();return sn={parse:requireParse(),valid:requireValid$1(),clean:requireClean(),inc:requireInc(),diff:requireDiff(),major:requireMajor(),minor:requireMinor(),patch:requirePatch(),prerelease:requirePrerelease(),compare:requireCompare(),rcompare:requireRcompare(),compareLoose:requireCompareLoose(),compareBuild:requireCompareBuild(),sort:requireSort(),rsort:requireRsort(),gt:requireGt(),lt:requireLt(),eq:requireEq(),neq:requireNeq(),gte:requireGte(),lte:requireLte(),cmp:requireCmp(),coerce:requireCoerce(),Comparator:requireComparator(),Range:requireRange(),satisfies:requireSatisfies(),toComparators:requireToComparators(),maxSatisfying:requireMaxSatisfying(),minSatisfying:requireMinSatisfying(),minVersion:requireMinVersion(),validRange:requireValid(),outside:requireOutside(),gtr:requireGtr(),ltr:requireLtr(),intersects:requireIntersects(),simplifyRange:requireSimplify(),subset:requireSubset(),SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},sn}function isCompatible(e,t){for(let[n,r]of Object.entries(e)){let e=t[n];if(e&&isSatisfied(r,e)===!1)return!1}return!0}function getCompatible(e,t){let n={};for(let[r,i]of Object.entries(e)){let e=t[r];e&&isSatisfied(i,e)===!0&&(n[r]=e)}return n}function getCoerced(e){let t={};for(let[n,r]of Object.entries(e)){let e=N.coerce(r);e&&(t[n]=e.version)}return t}function isSatisfied(e,t){if(!N.validRange(e))return null;let n=N.coerce(t);return n?N.satisfies(n,e):null}var k,ke,Ae,je,Me,Ne,Pe,Fe,A,Ie,j,Le,M,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,ut,dt,ft,pt,mt,ht,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,simplify,rn,an,on,sn,cn,N,ln=t((()=>{k={exports:{}},N=requireSemver()}));u();function lintEmptyInserts(e){let t=[];return e.iterate({enter:e=>{e.type.name===`EmptyInsert`&&t.push({from:e.from,to:e.to,severity:`warning`,message:`this insert is empty and will be ignored`,type:`emptyInsert`})}}),t}h(),a(),f();var un=124,dn=125,fn=126,pn=127,mn=131,hn=4,gn=134,_n=7,vn=8,yn=9,bn=10,xn=140,Sn=21,Cn=141,wn=25,Tn=142,En=29,Dn=39,On=43,kn=145,An=146,jn=147,Mn=148,Nn=49,Pn=70,Fn=154,In=71,Ln=73,Rn=155,zn=75,Bn=156,Vn=79,Hn=161,Un=82,Wn=83,Gn=84,Kn=168,qn=92,Jn=93,Yn=170,Xn=100,Zn=172,Qn=101,$n=103,er=104,tr=typeof process<`u`&&/\bfparse(:dbg)?\b/.test({}.LOG),nr=typeof process<`u`&&/\bfparse:dbg\b/.test({}.LOG),P=typeof process<`u`&&/\bcontext\b/.test({}.LOG),rr=[9,11,12,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],ir=chars$1(`
|
|
2
|
+
\r`),ar=42,or=chars$1(`'./-+*^`);function chars$1(e){return Array.from(e).map(e=>e.charCodeAt(0))}e(chars$1,`chars`);function isStartChar$1(e){return e===63||e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=55296&&e<=56319||e>=56320&&e<=57343}e(isStartChar$1,`isStartChar`);function isAdditional$1(e){return or.includes(e)}e(isAdditional$1,`isAdditional`);function isPartChar$1(e){return e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256}e(isPartChar$1,`isPartChar`);function isSpace$1(e){return rr.includes(e)}e(isSpace$1,`isSpace`);function indent$1(e,t){return t.concat(e.split(/\n/g).join(`
|
|
3
|
+
`+t))}e(indent$1,`indent`);function parseAdditionalSymbol$1(e,t=0){let n=e.peek(t);return n===ar&&e.peek(t+1)===ar?{offset:2,token:`**`}:isAdditional$1(n)?{offset:1,token:String.fromCharCode(n)}:null}e(parseAdditionalSymbol$1,`parseAdditionalSymbol`);function parseIdentifier$1(e,t=0,n=!1){for(let r=!1,i=[],a=0;;a++){let o=e.peek(t+a);if(isStartChar$1(o)||(r||n)&&isPartChar$1(o))r||=!0,i.push(o);else return i.length?{token:String.fromCharCode(...i),offset:a}:null}}e(parseIdentifier$1,`parseIdentifier`);function parseSpaces$1(e,t){for(let n=!1,r=0;;r++)if(isSpace$1(e.peek(t+r)))n||=!0;else return n?{token:` `,offset:r}:null}e(parseSpaces$1,`parseSpaces`);function parseName$1(e,t){let{keys:n,prefixes:r}=t.contextCache(),i=t.tokens;for(let t=0,a=[],o=null;;){let s=i.length+a.length>0,c=a.length>0,l=parseIdentifier$1(e,t,s)||s&&parseAdditionalSymbol$1(e,t)||c&&parseSpaces$1(e,t);if(!l)return o;let{token:u,offset:d}=l;if(t+=d,u===` `)continue;a=[...a,u];let f=[...i,...a].join(` `);if(n.has(f)){let e=a[0];o={token:e,offset:e.length,term:fn}}if(!r.has(f)){if(mr.some(e=>e===f)){let e=a[0];o={token:e,offset:e.length,term:dn}}if(!mr.some(e=>e.startsWith(f)))return o}}}e(parseName$1,`parseName`);var sr={[dn]:`identifier`,[fn]:`nameIdentifier`},cr=new g((e,t)=>{nr&&console.log(`%s: T <identifier | nameIdentifier>`,e.pos);let n=parseName$1(e,t.context),r=t.context.tokens,i=n||parseIdentifier$1(e,0,r.length>0);i&&(e.advance(i.offset),e.acceptToken(n?n.term:dn),tr&&console.log(`%s: MATCH <%s> <%s>`,e.pos,n?sr[n.term]:`identifier`,i.token))},{contextual:!0}),lr=new g((e,t)=>{nr&&console.log(`%s: T <propertyIdentifier>`,e.pos);let n=t.context.tokens,r=parseIdentifier$1(e,0,n.length>0);r&&(e.advance(r.offset),e.acceptToken(un),tr&&console.log(`%s: MATCH <propertyIdentifier> <%s>`,e.pos,r.token))}),ur=new g((e,t)=>{nr&&console.log(`%s: T <insertSemi>`,e.pos);let n,r=!1;for(n=0;;n++){let t=e.peek(n);if(!rr.includes(t)){ir.includes(t)&&(r=!0);break}}if(r){let t=parseIdentifier$1(e,n+1);if(parseSpaces$1(e,n+1)||t&&/^(then|else|return|satisfies)$/.test(t.token))return;tr&&console.log(`%s: MATCH <insertSemi>`,e.pos),e.acceptToken(pn)}}),dr={[Bn]:`FunctionInvocation`,[Rn]:`FilterExpression`,[Fn]:`PathExpression`},fr={[Zn]:`Context`,[Yn]:`FunctionDefinition`,[gn]:`ForExpression`,[Kn]:`List`,[Cn]:`IfExpression`,[Tn]:`QuantifiedExpression`},pr={[Xn]:`Context`,[Jn]:`FunctionDefinition`,[hn]:`ForExpression`,[qn]:`List`,[Sn]:`IfExpression`,[wn]:`QuantifiedExpression`,[Pn]:`PathExpression`,[zn]:`FunctionInvocation`,[Ln]:`FilterExpression`,[On]:`ArithmeticExpression`},I=class ValueProducer$1{static{e(this,`ValueProducer`)}constructor(e){this.fn=e}get(e){return this.fn(e)}static of(e){return new ValueProducer$1(e)}},mr=Object.keys({"date and time":1,date:1,time:1,duration:1});function getPrefixes$1(e){let t=[];for(let n=1;n<=e.length;n++)t.push(e.substring(0,n));return t}e(getPrefixes$1,`getPrefixes`);function cacheKey$1(e,t){let n=normalizeContextKey$1(e),r=getPrefixes$1(n);t.keys.add(n);for(let e of r)t.prefixes.add(e);return t.originalMap.set(n,e),t}e(cacheKey$1,`cacheKey`);function computeContextCache$1(e){let t=createContextCache$1();for(let n of e.getKeys())cacheKey$1(n,t);return t}e(computeContextCache$1,`computeContextCache`);function createContextCache$1(e){return{keys:new Set(e?.keys),prefixes:new Set(e?.prefixes),originalMap:new Map(e?.originalMap)}}e(createContextCache$1,`createContextCache`);var VariableContext$1=class{static{e(this,`VariableContext`)}constructor(e={}){this.value=e}getKeys(){return Object.keys(this.value)}get(e){let t=this.value[e],n=this.constructor;return n.isAtomic(t)?t:n.of(t)}set(e,t){let n=this.constructor;return new n({...this.value,[e]:t})}merge(e){let t=this.constructor;return new t(t.__merge(this.value,e))}static isAtomic(e){return e==null||e instanceof this||e instanceof I||typeof e!=`object`}static of(...e){let t=e.reduce((e,t)=>this.__merge(e,t),{});return new this(t)}static __unwrap(e){return e?e instanceof this?e.value:this.isAtomic(e)?{}:e:{}}static __merge(e,t){let n=Object.assign({},this.__unwrap(e));for(let[e,r]of Object.entries(this.__unwrap(t)))n[e]=r instanceof I?r:o(n,e)?this.__merge(n[e],r):r;return n}},hr=class Variables$1{static{e(this,`Variables`)}constructor({name:e=`Expressions`,tokens:t=[],children:n=[],parent:r=null,context:i,value:a,raw:o,__cache:s}){this.name=e,this.tokens=t,this.children=n,this.parent=r,this.context=i,this.value=a,this.raw=o,this.__cache=s}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get cache(){let e=this.root;return e.__cache||=new WeakMap,e.__cache}enterScope(e){let t=this.of({name:e,parent:this});return P&&console.log(`[%s] enter`,t.path,t.context),t}exitScope(e){return this.parent?(P&&console.log(`[%s] exit %o
|
|
4
|
+
%s`,this.path,this.context,indent$1(e,` `)),this.parent.pushChild(this)):(P&&console.log(`[%s] NO exit %o
|
|
5
|
+
%s`,this.path,this.context,indent$1(e,` `)),this)}token(e){return P&&console.log(`[%s] token <%s> + <%s>`,this.path,this.tokens.join(` `),e),this.assign({tokens:[...this.tokens,e]})}literal(e){return P&&console.log(`[%s] literal %o`,this.path,e),this.pushChild(this.of({name:`Literal`,value:e}))}computedValue(){for(let e=this;;e=last$1(e.children)){if(!e)return null;if(!s(e.value))return e.value}}contextCache(){let e=this.cache.get(this.context);return e||(e=computeContextCache$1(this.context),this.cache.set(this.context,e)),e}get path(){return this.parent?.path?.concat(` > `,this.name)||this.name}get(e){let t=e&&normalizeContextKey$1(e),n=this.contextCache().originalMap.get(t);if(n===void 0)return;let r=this.context.get(n);return r instanceof I?r.get(this):r}resolveName(e){let t=this.tokens.join(` `),n=this.assign({tokens:[]}),r=this.of({name:e,parent:n,value:this.get(t),raw:t});return P&&console.log(`[%s] resolve %s <%s=%s>`,e,r.path,t,r.value),n.pushChild(r)}pushChild(e){if(!e)return this;let t=this.assign({children:[...this.children,e]});return e.parent=t,t}pushChildren(e){let t=this;for(let n of e)t=t.pushChild(n);return t}declareName(){if(this.tokens.length===0)throw Error(`no tokens to declare name`);let e=this.tokens.join(` `);return P&&console.log(`[%s] declareName <%s>`,this.path,e),this.assign({tokens:[]}).pushChild(this.of({name:`Name`,value:e}))}define(e,t){if(typeof e!=`string`)return P&&console.log(`[%s] no define <%s=%s>`,this.path,e,t),this;P&&console.log(`[%s] define <%s=%s>`,this.path,e,t);let n=this.context,r=n.set(e,t),i=cacheKey$1(e,createContextCache$1(this.cache.get(n)||computeContextCache$1(n)));return this.cache.set(r,i),this.assign({context:r})}assign(e={}){return Variables$1.of({...this,...e})}of(e={}){let t={context:this.context,parent:this.parent};return Variables$1.of({...t,...e})}static of(e){let{name:t,tokens:n=[],children:r=[],parent:i=null,context:a,value:o,raw:s,__cache:c}=e;if(!a)throw Error(`must provide <context>`);return new Variables$1({name:t,tokens:[...n],children:[...r],context:a,parent:i,value:o,raw:s,__cache:c})}};function normalizeContextKey$1(e){return e.replace(/\s*([./\-'+]|\*\*?)\s*/g,` $1 `).replace(/\s{2,}/g,` `).trim()}e(normalizeContextKey$1,`normalizeContextKey`);function wrap$1(e,t,n){let r=e.children.filter(e=>e.name!==t),i=e.children.filter(e=>e.name===t),a=r[0],o=r[Math.max(1,r.length-1)],s=a?.computedValue(),c=o?.computedValue()??null;return e.assign({children:i}).enterScope(t).pushChildren(r).exitScope(n).define(s,c)}e(wrap$1,`wrap`);function trackVariables$1(e={},t=VariableContext$1){let n=hr.of({context:t.of(e)});return new v({start:n,reduce(e,n,r,i){if(n===Sn){let[n,r]=e.children.slice(-2);e=e.assign({value:t.of(n?.computedValue(),r?.computedValue())})}if(n===qn&&(e=e.assign({value:t.of(...e.children.map(e=>e?.computedValue()))})),n===Ln){let[t,n]=e.children.slice(-2);e=e.assign({value:t?.computedValue()})}if(n===zn){let[n,...r]=e.children;e=n?.raw===`get value`?getContextValue$1(e,r):e.assign({value:n?.computedValue()||t.of(void 0)})}let a=fr[n];if(a)return e.enterScope(a);let o=dr[n];if(o){let{children:r,context:i}=e,a=r.slice(0,-1),s=last$1(r),c=null;return n===Fn&&(c=t.of(s?.computedValue())),n===Rn&&(c=t.of(i,s?.computedValue()).set(`item`,s?.computedValue())),e.assign({children:a}).enterScope(o).pushChild(s).assign({context:c||i})}let s=i.read(i.pos,r.pos);if(pr[n])return e.exitScope(s);if(n===Qn){let n=e.children.filter(e=>e.name!==`ContextEntry`),r=n[0],i=last$1(n);return wrap$1(e,`ContextEntry`,s).assign({value:t.of(e.value).set(r?.computedValue(),i?.computedValue())})}if(n===_n||n===En)return wrap$1(e,`InExpression`,s);if(n===xn)return e.define(`partial`,I.of(e=>last$1(e.children)?.computedValue()));if(n===Vn){let t=last$1(e.children).computedValue();return e.define(t,1)}if(n===kn||n===An||n===jn){let t=e.children.slice(0,-1),n=last$1(e.children);return e.assign({children:t}).enterScope(`ArithmeticExpression`).pushChild(n)}if(n===Mn)return e.enterScope(`ArithmeticExpression`);if(n===yn||n===bn||n===er)return e.token(s);if(n===Wn)return e.literal(s.replace(/^"|"$/g,``).replace(/\\(["\\])/g,`$1`));if(n===Gn)return e.literal(s===`true`);if(n===Un)return e.literal(parseFloat(s));if(n===Hn)return e.literal(null);if(n===Nn)return e.resolveName(`VariableName`);if(n===In)return e.resolveName(`PathName`);if(n===vn||n===$n)return e.declareName();if((n===mn||n===Dn)&&e.tokens.length>0)throw Error(`uncleared name`);if(n===mn){let t=e;for(;t.parent;)t=t.exitScope(s);return t}return e}})}e(trackVariables$1,`trackVariables`);var gr=trackVariables$1({});function getContextValue$1(e,t){if(!t.length||(t[0].name===`Name`&&(t=extractNamedArgs$1(t,[`m`,`key`])),t.length!==2))return e.assign({value:null});let[n,r]=t,i=r?.computedValue(),a=n?.computedValue();return!a||typeof a!=`object`||typeof i!=`string`?e.assign({value:null}):e.assign({value:[normalizeContextKey$1(i),i].reduce((e,t)=>a.get(t)||e,null)})}e(getContextValue$1,`getContextValue`);function extractNamedArgs$1(e,t){let n={};for(let t=0;t<e.length;t+=2){let[r,i]=e.slice(t,t+2);n[r.value]=i}return t.map(e=>n[e])}e(extractNamedArgs$1,`extractNamedArgs`);function last$1(e){return e[e.length-1]}e(last$1,`last`);var _r=d({StringLiteral:p.string,NumericLiteral:p.number,BooleanLiteral:p.bool,"AtLiteral!":p.special(p.string),CompareOp:p.compareOperator,ArithOp:p.arithmeticOperator,"for if then else some every return":p.controlKeyword,"in instance of and or satisfies between as":p.operatorKeyword,function:p.definitionKeyword,"Type/...":p.typeName,"Wildcard!":p.modifier,null:p.null,LineComment:p.lineComment,BlockComment:p.blockComment,"VariableName!":p.variableName,'"?"':p.self,"DateTimeConstructor! SpecialFunctionName!":p.standard(p.function(p.variableName)),"FunctionInvocation/VariableName!":p.function(p.variableName),"Name!":p.definition(p.variableName),"Key/Name! ContextEntryType/Name!":p.definition(p.propertyName),"PathExpression/PathName!":p.propertyName,"FormalParameter/ParameterName!":p.function(p.definition(p.variableName)),"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace,".":p.derefOperator,", ;":p.separator,"..":p.punctuation}),vr={__proto__:null,for:10,in:34,return:40,if:44,then:46,else:48,some:52,every:54,satisfies:60,or:64,and:68,between:76,instance:90,of:93,days:105,time:107,duration:109,years:111,months:113,date:115,list:121,context:127,function:134,null:162,true:332,false:332,"?":176,external:192,not:217},yr=_.deserialize({version:14,states:"CvO`QYOOO`QYOOO$yQYOOOOQU'#Ce'#CeO%TQYO'#C`O&^QYO'#FTOOQQ'#Ff'#FfO&hQYO'#FfO`QYO'#DXOOQU'#Eq'#EqO(_Q^O'#D_OOQU'#D`'#D`OOQU'#D_'#D_OOQO'#Fn'#FnO*[QWO'#DyOOQQ'#EQ'#EQOOQQ'#ER'#EROOQQ'#ES'#ESO*aOWO'#EVO*[QWO'#ETOOQQ'#ET'#ETOOQQ'#Ft'#FtOOQQ'#Fr'#FrOOQQ'#Fz'#FzOOQQ'#EX'#EXO`QYO'#EZOOQQ'#FV'#FVO*iQ^O'#FVO,`QYO'#E[O,gQWO'#E]OOQP'#GO'#GOO,lQXO'#EdOOQQ'#F{'#F{OOQQ'#FU'#FUQOQWOOOOQQ'#FW'#FWOOQQ'#F_'#F_O`QYO'#CqOOQQ'#F`'#F`O%TQYO'#CuO,zQYO'#DzOOQQ'#Fs'#FsO-PQYO'#EUOOQO'#EU'#EUO`QYO'#EYO`QYO'#EXOOQO'#F|'#F|Q-XQWOOO-^QYO'#DTO.TQWO'#FbOOQO'#DV'#DVO.`QYO'#FfO.gQWOOO/^QYO'#CdO/kQYO'#FYOOQQ'#Cc'#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#h#i#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!Z!cT!Q!t!v#P#W#X#h#i#j#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!kWOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR&U%lT&Y%m&s!_!eT!Q!n!t!v#P#W#X#h#i#j#k#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!_!gT!Q!n!t!v#P#W#X#h#i#j#k#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!k^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yQ!q^R!scR#{!pQ!wlR#|!p!kfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%y!klOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%y!kmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR$V!x!koOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR#Oo",nodeNames:`⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier . ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext .. return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression PathName ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not`,maxTerm:174,context:gr,nodeProps:[[`group`,-17,4,21,25,31,33,35,43,44,70,73,75,88,89,91,92,93,100,`Expr`,49,`Expr Expr`,-5,81,82,83,84,85,`Expr Literal`],[`closedBy`,40,`)`,74,`]`,99,`}`],[`openedBy`,42,`(`,72,`[`,98,`{`]],propSources:[_r],skippedNodes:[0,1,2],repeatNodeCount:14,tokenData:".v~RvXY#iYZ$^Z[#i]^$^pq#iqr$crs$nwx(Wxy(]yz(bz{(g{|(t|}(y}!O)O!O!P)]!P!Q*g!Q![,b![!],y!]!^-O!^!_-T!_!`$i!`!a-d!b!c-n!}#O-s#P#Q-x#Q#R(o#S#T-}#o#p.l#q#r.q$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#u~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#v~~$fP!_!`$i~$nOt~~$qXOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q<%lO$n~%aVOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t<%lO%^~%{O$j~~&ORO;'S%^;'S;=`&X;=`O%^~&[WOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t;=`<%l%^<%lO%^~&wP;=`<%l%^~'RO$j~$k~~'URO;'S$n;'S;=`'_;=`O$n~'bYOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q;=`<%l$n<%lO$n~(TP;=`<%l$n~(]O#}~~(bOx~~(gOz~~(lP_~z{(o~(tO`~~(yO]~~)OO$P~R)TP[P!`!a)WQ)]O$_Q~)bQZ~!O!P)h!Q![)m~)mOc~~)rR$i~!Q![)m!g!h){#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dP$i~!Q![*_~*lQ^~z{*r!P!Q+y~*uTOz*rz{+U{;'S*r;'S;=`+s<%lO*r~+XVOz*rz{+U{!P*r!P!Q+n!Q;'S*r;'S;=`+s<%lO*r~+sOQ~~+vP;=`<%l*r~,OSP~OY+yZ;'S+y;'S;=`,[<%lO+y~,_P;=`<%l+y~,gS$i~!O!P,s!Q![,b!g!h){#X#Y){~,vP!Q![)m~-OO$]~~-TO$t~R-[P!_QuP!_!`-_P-dOuPR-kP![QuP!_!`-_~-sO$m~~-xO!l~~-}O!j~~.QTO#S-}#S#T.a#T;'S-};'S;=`.f<%lO-}~.fO$Z~~.iP;=`<%l-}~.qO#V~~.vO#U~",tokenizers:[lr,cr,ur,0,1],topRules:{Expression:[0,3],Expressions:[1,105],UnaryTests:[2,106]},dialects:{camunda:2657},dynamicPrecedences:{33:-1,70:1,75:-1,77:-1},specialized:[{term:125,get:e=>vr[e]||-1}],tokenPrec:2660});function stripBackticks(e){return e.replace(/^`|`$/g,``)}function nodeText(e,t){return stripBackticks(t.substring(e.from,e.to))}function isInScope(e,t){return t.some(t=>t.has(e))}function withScope(e,t,n){let r=new Set(t);e.push(r);let i=n(r);return e.pop(),i}function forEachChild(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling}function collectPathParts(e,t){let n=[];return forEachChild(e,e=>{e.name===`PathExpression`?n.push(...collectPathParts(e,t)):(e.name===`VariableName`||e.name===`PathName`)&&n.push(nodeText(e,t))}),n}function getFilterBase(e){let t=e.firstChild;return t?t.name===`FilterExpression`?t:t.name===`PathExpression`?getFilterBase(t):null:null}function hasContextBase(e){let t=e.firstChild;return t?t.name===`Context`||t.name===`PathExpression`&&hasContextBase(t):!1}function extractContextKeys(e,t){let n=[];return forEachChild(e,e=>{if(e.name===`ContextEntry`){let r=e.getChild(`Key`)?.getChild(`Name`);r&&n.push(nodeText(r,t))}}),n}function collectIterationVariables(e,t){let n=[],r=e.getChild(`InExpressions`);return r&&forEachChild(r,e=>{if(e.name===`InExpression`){let r=e.getChild(`Name`)?.getChild(`Identifier`);r&&n.push(t.substring(r.from,r.to))}}),n}function collectFunctionParameters(e,t){let n=[],r=e.getChild(`FormalParameters`);return r&&forEachChild(r,e=>{if(e.name===`FormalParameter`){let r=e.getChild(`ParameterName`)?.getChild(`Name`)?.getChild(`Identifier`);r&&n.push(t.substring(r.from,r.to))}}),n}function findVariable(e,t){return e.find(e=>e.name===t)}function findOrCreateVariable(e,t){let n=findVariable(e,t);return n||(n={name:t},e.push(n)),n}function buildNestedEntries(e,t){let n=findOrCreateVariable(e,t[0]);if(t.length<=1||(n.type||(n.type=`Context`,n.entries=n.entries||[]),n.type!==`Context`))return;let r=n.entries;for(let e=1;e<t.length;e++){let n=t[e],i=e===t.length-1,a=findVariable(r,n);a?!i&&!a.type&&(a.type=`Context`,a.entries=a.entries||[]):(a=i?{name:n}:{name:n,type:`Context`,entries:[]},r.push(a)),i||(a.entries=a.entries||[],r=a.entries)}}function sortEntries(e){if(e.entries){e.entries.sort((e,t)=>e.name.localeCompare(t.name));for(let t of e.entries)sortEntries(t)}}var br=new Set([`for`,`return`,`some`,`every`,`InExpressions`,`satisfies`]);function extractInputNames(e,t,n){let r=new Set,i=[new Set];function isExternal(e,t){return!isInScope(e,i)&&!n.has(e)&&(t===`none`||e!==`item`)}let collectInputs=(e,n=`none`)=>{let{name:a}=e;if(!e.type.isError){if(a===`FunctionInvocation`){let i=e.getChild(`VariableName`);if(i){let e=nodeText(i,t);isExternal(e,n)&&r.add(e)}forEachChild(e,e=>{e.name!==`VariableName`&&e.name!==`(`&&e.name!==`)`&&collectInputs(e,n)})}else if(a===`PathExpression`){let i=getFilterBase(e);if(hasContextBase(e))forEachChild(e,e=>collectInputs(e,n));else if(i)collectInputs(i,n);else{let i=collectPathParts(e,t);i.length>0&&isExternal(i[0],n)&&r.add(i.join(`.`))}}else if(a===`VariableName`&&e.parent?.name!==`PathExpression`&&e.parent?.name!==`FunctionInvocation`){let i=nodeText(e,t),a=n===`variable-list`&&i!==`item`;isExternal(i,n)&&!a&&r.add(i)}else if(a===`Context`&&e.parent?.name!==`List`)withScope(i,[],r=>{forEachChild(e,e=>{if(e.name===`ContextEntry`){forEachChild(e,e=>{e.name!==`Key`&&collectInputs(e,n)});let i=e.getChild(`Key`)?.getChild(`Name`);i&&r.add(nodeText(i,t))}})});else if(a===`FilterExpression`){let n=`none`,r=[`item`],a=e.getChild(`List`);a?(forEachChild(a,e=>{e.name===`Context`&&r.push(...extractContextKeys(e,t))}),n=`list-literal`):forEachChild(e,e=>{e.name===`VariableName`&&(collectInputs(e,`none`),n=`variable-list`)}),withScope(i,r,()=>{forEachChild(e,e=>{(e.name===`Comparison`||e.name===`Expression`)&&collectInputs(e,n)})})}else if(a===`ForExpression`||a===`QuantifiedExpression`){let r=collectIterationVariables(e,t),a=e.getChild(`InExpressions`);a&&forEachChild(a,e=>{e.name===`InExpression`&&forEachChild(e,e=>{e.name!==`Name`&&e.name!==`in`&&e.name!==`Identifier`&&collectInputs(e,n)})}),withScope(i,r,()=>{forEachChild(e,e=>{br.has(e.name)||collectInputs(e,`none`)})})}else if(a===`FunctionDefinition`){let n=collectFunctionParameters(e,t);withScope(i,n,()=>{let t=e.getChild(`FunctionBody`);t&&collectInputs(t,`none`)})}else forEachChild(e,e=>collectInputs(e,n))}};return collectInputs(e),Array.from(r).sort()}function initializeInputVariables(e){let t=[];for(let n of e)buildNestedEntries(t,n.split(`.`));return t}function checkLiteralsInNode(e){let t=!1,n=!1;return forEachChild(e,e=>{if(e.name===`StringLiteral`)t=!0;else if(e.name===`NumericLiteral`)n=!0;else if(e.name===`ArithmeticExpression`){let r=checkLiteralsInNode(e);t||=r.hasString,n||=r.hasNumber}}),{hasString:t,hasNumber:n}}function inferTypeForVariablesInNode(e,t,n,r,i){if(e.name===`VariableName`&&e.parent?.name!==`PathExpression`){let a=nodeText(e,t),o=findVariable(n,a);!isInScope(a,r)&&o&&!o.type&&(o.type=i)}else if(e.name===`PathExpression`){let a=collectPathParts(e,t);if(a.length>0){let e=a[0],t=findVariable(n,e);!isInScope(e,r)&&t&&!t.type&&(t.type=i)}}else forEachChild(e,e=>{inferTypeForVariablesInNode(e,t,n,r,i)})}function trackFilterItemProperties(e,t,n,r,i){let a=n?findVariable(r,n):null;if(!a)return;let visit=e=>{if(a.type===`List`){if(e.name===`PathExpression`){let n=collectPathParts(e,t);if(n.length>1&&n[0]===`item`){let e=a.entries||[];for(let t=1;t<n.length;t++)findVariable(e,n[t])||e.push({name:n[t]});a.entries=e}}else if(e.name===`VariableName`){let n=nodeText(e,t);if(!isInScope(n,i)&&n!==`item`&&e.parent?.name!==`PathExpression`){let e=a.entries||[];findVariable(e,n)||e.push({name:n}),a.entries=e}}forEachChild(e,visit)}};visit(e)}function inferTypeFromComparison(e,t,n,r,i){if(e.name!==`VariableName`)return;let a=nodeText(e,n),o=findVariable(r,a);if(isInScope(a,i)||!o||o.type)return;let s={NumericLiteral:`Number`,StringLiteral:`String`,BooleanLiteral:`Boolean`}[t.name];s&&(o.type=s)}function inferTypes(e,t,n,r,i=`none`){let{name:a}=e;if(a===`PathExpression`){let a=e.firstChild;if(a?.name===`Context`||a?.name===`PathExpression`||a?.name===`FilterExpression`){inferTypes(a,t,n,r,i);return}let o=collectPathParts(e,t);if(o.length>0){let e=o[0];!isInScope(e,r)&&(i===`none`||e!==`item`)&&findVariable(n,e)&&buildNestedEntries(n,o)}}else if(a===`Context`&&e.parent?.name!==`List`)withScope(r,[],a=>{forEachChild(e,e=>{if(e.name===`ContextEntry`){forEachChild(e,e=>{e.name!==`Key`&&inferTypes(e,t,n,r,i)});let o=e.getChild(`Key`)?.getChild(`Name`);o&&a.add(nodeText(o,t))}})});else if(a===`FilterExpression`){let i=`none`,a=null,o=[`item`],s=e.getChild(`List`);s?(forEachChild(s,e=>{e.name===`Context`&&o.push(...extractContextKeys(e,t))}),i=`list-literal`):forEachChild(e,e=>{if(e.name===`VariableName`){a=nodeText(e,t);let o=findVariable(n,a);!isInScope(a,r)&&o&&(o.type||=`List`),i=`variable-list`}}),withScope(r,o,()=>{forEachChild(e,e=>{(e.name===`Comparison`||e.name===`Expression`)&&(trackFilterItemProperties(e,t,a,n,r),inferTypes(e,t,n,r,i))})})}else{if(a===`Comparison`){let i=[];forEachChild(e,e=>{e.name!==`CompareOp`&&i.push(e)}),i.length===2&&(inferTypeFromComparison(i[0],i[1],t,n,r),inferTypeFromComparison(i[1],i[0],t,n,r))}if(a===`ArithmeticExpression`){let{hasString:a,hasNumber:o}=checkLiteralsInNode(e),s=a&&!o?`String`:!a&&o?`Number`:null;s&&inferTypeForVariablesInNode(e,t,n,r,s),forEachChild(e,e=>{[`ArithmeticExpression`,`ArithOp`,`NumericLiteral`,`StringLiteral`].includes(e.name)||inferTypes(e,t,n,r,i)})}else if(a===`ForExpression`||a===`QuantifiedExpression`){let a=collectIterationVariables(e,t),o=e.getChild(`InExpressions`);o&&forEachChild(o,e=>{e.name===`InExpression`&&forEachChild(e,e=>{[`Name`,`in`,`Identifier`].includes(e.name)||inferTypes(e,t,n,r,i)})}),withScope(r,a,()=>{forEachChild(e,e=>{br.has(e.name)||inferTypes(e,t,n,r,`none`)})})}else a===`FunctionDefinition`?withScope(r,collectFunctionParameters(e,t),()=>{let i=e.getChild(`FunctionBody`);i&&inferTypes(i,t,n,r,`none`)}):forEachChild(e,e=>{inferTypes(e,t,n,r,i)})}}function analyzeForInputs(e,t,n){let r=initializeInputVariables(extractInputNames(e,t,n));inferTypes(e,t,r,[new Set]);for(let e of r)sortEntries(e);return r.sort((e,t)=>e.name.localeCompare(t.name)),r}var xr=new Set([`for`,`return`,`some`,`every`,`InExpressions`,`satisfies`]);function analyzeForFunctions(e,t,n){let r=[],i=[],recordInvocation=e=>{let a=nodeText(e,t),o=!isInScope(a,i)&&n.has(a)?`builtin`:`user`,{from:s,to:c}=e;r.push({name:a,type:o,from:s,to:c})},walk=e=>{let{name:n}=e;if(n===`Context`)withScope(i,[],n=>{forEachChild(e,e=>{if(e.name!==`ContextEntry`)return;forEachChild(e,e=>{e.name!==`Key`&&walk(e)});let r=e.getChild(`Key`)?.getChild(`Name`);r&&n.add(nodeText(r,t))})});else if(n===`FunctionDefinition`){let n=collectFunctionParameters(e,t);withScope(i,n,()=>{let t=e.getChild(`FunctionBody`);t&&walk(t)})}else if(n===`ForExpression`||n===`QuantifiedExpression`){let n=e.getChild(`InExpressions`);n&&forEachChild(n,e=>{e.name===`InExpression`&&forEachChild(e,e=>{e.name!==`Name`&&e.name!==`in`&&e.name!==`Identifier`&&walk(e)})}),withScope(i,collectIterationVariables(e,t),()=>{forEachChild(e,e=>{xr.has(e.name)||walk(e)})})}else{if(n===`FunctionInvocation`){let t=e.getChild(`VariableName`);t&&recordInvocation(t)}forEachChild(e,walk)}};return walk(e),r.sort((e,t)=>e.from-t.from)}function analyzeForValidity(e){return!containsErrorNodes(e)}function containsErrorNodes(e){if(e.type.isError)return!0;let t=e.firstChild;for(;t;){if(containsErrorNodes(t))return!0;t=t.nextSibling}return!1}function createContext$1(e){return e.reduce((e,t)=>(e[t.name]=()=>{},e),{})}e(createContext$1,`createContext`);var FeelAnalyzer=class{constructor(e={}){this.builtinNames=new Set(e.builtins?.map(e=>e.name)??[]);let t={top:e.dialect===`unaryTests`?`UnaryTests`:`Expression`,dialect:e.parserDialect};e.reservedNameBuiltins&&e.reservedNameBuiltins.length>0&&(t.contextTracker=trackVariables$1(createContext$1(e.reservedNameBuiltins))),this.parser=yr.configure(t)}analyzeExpression(e){let t=this.parser.parse(e);return this.analyzeTree(t,e)}analyzeTree(e,t){let n=e.topNode;return{valid:analyzeForValidity(n),inputs:analyzeForInputs(n,t,this.builtinNames),functions:analyzeForFunctions(n,t,this.builtinNames)}}};ln();function lintSyntax(e){let t=[];return e.iterate({enter:e=>{let n=e.node;if(!n.type.isError)return;let r=n.parent,i=getNextNode(n),a={from:n.from,to:n.to,severity:`error`,type:`Syntax Error`};n.from===n.to?i?(a.message=`Unrecognized token <${i.name}> in <${r.name}>`,a.to=i.to):a.message=`Incomplete <${(r.enterUnfinishedNodesBefore(n.to)||r).name}>`:a.message=`Unrecognized token in <${r.name}>`,t.push(a)}}),t}function getNextNode(e){return e?e.nextSibling||getNextNode(e.parent):null}var Sr=`first-item`,Cr={create(e){return{enter(t){if(t.name!==`FilterExpression`)return;let n=e.readContent(t.from,t.to);if(zeroIndexPattern().test(n)){let{from:r,to:i}=t;e.report({from:r,to:i,message:`First item is accessed via [1]`,severity:`warning`,type:Sr,actions:[{name:`fix`,apply(t,a=r,o=i){e.updateContent(a,o,n.replace(zeroIndexPattern(),`[1]`))}}]})}}}}};function zeroIndexPattern(){return/\[\s*0\s*\]$/}var wr=[Cr];function lintRules(e){let{readContent:t,syntaxTree:n,updateContent:r}=e,i=[],a={readContent:t,report:e=>{i.push(e)},updateContent:r},o=wr.map(e=>e.create(a));return n.iterate({enter:e=>{for(let t of o)t.enter&&t.enter(e)},leave:e=>{for(let t of o)t.leave&&t.leave(e)}}),i}var Tr=`compatibility`;function lintCompatibility(e={}){let{syntaxTree:t,expression:n,engines:r,builtins:i=[]}=e;if(!r||!Object.keys(r).length||!i.length)return[];let a=getUnavailableBuiltins(i,r);if(!a.size)return[];let{valid:o,functions:s=[]}=new FeelAnalyzer({builtins:i}).analyzeTree(t,n);return o?s.reduce((e,t)=>{if(t.type!==`builtin`)return e;let n=a.get(t.name);return n&&e.push({from:t.from,to:t.to,severity:`warning`,type:Tr,message:`Function '${t.name}' requires ${formatEngines(n.engines)}`}),e},[]):[]}function getUnavailableBuiltins(e,t){let n=new Map;for(let r of e)r.engines&&!isCompatible(r.engines,t)&&n.set(r.name,r);return n}function formatEngines(e){return Object.entries(e).map(([e,t])=>`${capitalize(e)} ${t}`).join(`, `)}function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function lintAll$1(e){return[...lintSyntax(e.syntaxTree),...lintRules(e),...lintCompatibility(e)]}e(lintAll$1,`lintAll`);var cmFeelLinter=({builtins:e=[],engines:t}={})=>n=>n.state.doc.length===0?[]:lintAll$1({syntaxTree:S(n.state),expression:n.state.doc.toString(),builtins:e,engines:t,readContent:(e,t)=>n.state.sliceDoc(e,t),updateContent:(e,t,r)=>n.dispatch({changes:{from:e,to:t,insert:r}})}).map(e=>({...e,source:e.type}));function lintAll(e){return[...lintEmptyInserts(e)]}function cmFeelersLinter(){let e=cmFeelLinter();return t=>{let n=e(t);if(t.state.doc.length===0)return[];let r=lintAll(S(t.state));return[...n,...r.map(e=>({...e,source:`feelers linter`}))]}}var Er=ye(cmFeelersLinter());h(),a(),f();var Dr=124,L=125,Or=126,kr=127,Ar=131,jr=4,Mr=134,Nr=7,Pr=8,Fr=9,Ir=10,Lr=140,Rr=21,zr=141,Br=25,Vr=142,Hr=29,Ur=39,Wr=43,Gr=145,Kr=146,qr=147,Jr=148,Yr=49,Xr=70,Zr=154,Qr=71,$r=73,ei=155,ti=75,ni=156,ri=79,ii=161,ai=82,oi=83,si=84,ci=168,li=92,ui=93,di=170,fi=100,pi=172,mi=101,hi=103,gi=104,_i=typeof process<`u`&&/\bfparse(:dbg)?\b/.test({}.LOG),vi=typeof process<`u`&&/\bfparse:dbg\b/.test({}.LOG),R=typeof process<`u`&&/\bcontext\b/.test({}.LOG),yi=[9,11,12,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],bi=chars(`
|
|
6
|
+
\r`),xi=42,Si=chars(`'./-+*^`);function chars(e){return Array.from(e).map(e=>e.charCodeAt(0))}function isStartChar(e){return e===63||e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=55296&&e<=56319||e>=56320&&e<=57343}function isAdditional(e){return Si.includes(e)}function isPartChar(e){return e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256}function isSpace(e){return yi.includes(e)}function indent(e,t){return t.concat(e.split(/\n/g).join(`
|
|
7
|
+
`+t))}function parseAdditionalSymbol(e,t=0){let n=e.peek(t);return n===xi&&e.peek(t+1)===xi?{offset:2,token:`**`}:isAdditional(n)?{offset:1,token:String.fromCharCode(n)}:null}function parseIdentifier(e,t=0,n=!1){for(let r=!1,i=[],a=0;;a++){let o=e.peek(t+a);if(isStartChar(o)||(r||n)&&isPartChar(o))r||=!0,i.push(o);else return i.length?{token:String.fromCharCode(...i),offset:a}:null}}function parseSpaces(e,t){for(let n=!1,r=0;;r++)if(isSpace(e.peek(t+r)))n||=!0;else return n?{token:` `,offset:r}:null}function parseName(e,t){let{keys:n,prefixes:r}=t.contextCache(),i=t.tokens;for(let t=0,a=[],o=null;;){let s=i.length+a.length>0,c=a.length>0,l=parseIdentifier(e,t,s)||s&&parseAdditionalSymbol(e,t)||c&&parseSpaces(e,t);if(!l)return o;let{token:u,offset:d}=l;if(t+=d,u===` `)continue;a=[...a,u];let f=[...i,...a].join(` `);if(n.has(f)){let e=a[0];o={token:e,offset:e.length,term:Or}}if(!r.has(f)){if(Ai.some(e=>e===f)){let e=a[0];o={token:e,offset:e.length,term:L}}if(!Ai.some(e=>e.startsWith(f)))return o}}}var Ci={[L]:`identifier`,[Or]:`nameIdentifier`},wi=new g((e,t)=>{vi&&console.log(`%s: T <identifier | nameIdentifier>`,e.pos);let n=parseName(e,t.context),r=t.context.tokens,i=n||parseIdentifier(e,0,r.length>0);i&&(e.advance(i.offset),e.acceptToken(n?n.term:L),_i&&console.log(`%s: MATCH <%s> <%s>`,e.pos,n?Ci[n.term]:`identifier`,i.token))},{contextual:!0}),Ti=new g((e,t)=>{vi&&console.log(`%s: T <propertyIdentifier>`,e.pos);let n=t.context.tokens,r=parseIdentifier(e,0,n.length>0);r&&(e.advance(r.offset),e.acceptToken(Dr),_i&&console.log(`%s: MATCH <propertyIdentifier> <%s>`,e.pos,r.token))}),Ei=new g((e,t)=>{vi&&console.log(`%s: T <insertSemi>`,e.pos);let n,r=!1;for(n=0;;n++){let t=e.peek(n);if(!yi.includes(t)){bi.includes(t)&&(r=!0);break}}if(r){let t=parseIdentifier(e,n+1);if(parseSpaces(e,n+1)||t&&/^(then|else|return|satisfies)$/.test(t.token))return;_i&&console.log(`%s: MATCH <insertSemi>`,e.pos),e.acceptToken(kr)}}),Di={[ni]:`FunctionInvocation`,[ei]:`FilterExpression`,[Zr]:`PathExpression`},Oi={[pi]:`Context`,[di]:`FunctionDefinition`,[Mr]:`ForExpression`,[ci]:`List`,[zr]:`IfExpression`,[Vr]:`QuantifiedExpression`},ki={[fi]:`Context`,[ui]:`FunctionDefinition`,[jr]:`ForExpression`,[li]:`List`,[Rr]:`IfExpression`,[Br]:`QuantifiedExpression`,[Xr]:`PathExpression`,[ti]:`FunctionInvocation`,[$r]:`FilterExpression`,[Wr]:`ArithmeticExpression`},z=class ValueProducer{constructor(e){this.fn=e}get(e){return this.fn(e)}static of(e){return new ValueProducer(e)}},Ai=Object.keys({"date and time":1,date:1,time:1,duration:1});function getPrefixes(e){let t=[];for(let n=1;n<=e.length;n++)t.push(e.substring(0,n));return t}function cacheKey(e,t){let n=normalizeContextKey(e),r=getPrefixes(n);t.keys.add(n);for(let e of r)t.prefixes.add(e);return t.originalMap.set(n,e),t}function computeContextCache(e){let t=createContextCache();for(let n of e.getKeys())cacheKey(n,t);return t}function createContextCache(e){return{keys:new Set(e?.keys),prefixes:new Set(e?.prefixes),originalMap:new Map(e?.originalMap)}}var VariableContext=class{constructor(e={}){this.value=e}getKeys(){return Object.keys(this.value)}get(e){let t=this.value[e],n=this.constructor;return n.isAtomic(t)?t:n.of(t)}set(e,t){let n=this.constructor;return new n({...this.value,[e]:t})}merge(e){let t=this.constructor;return new t(t.__merge(this.value,e))}static isAtomic(e){return e==null||e instanceof this||e instanceof z||typeof e!=`object`}static of(...e){let t=e.reduce((e,t)=>this.__merge(e,t),{});return new this(t)}static __unwrap(e){return e?e instanceof this?e.value:this.isAtomic(e)?{}:e:{}}static __merge(e,t){let n=Object.assign({},this.__unwrap(e));for(let[e,r]of Object.entries(this.__unwrap(t)))n[e]=r instanceof z?r:o(n,e)?this.__merge(n[e],r):r;return n}},ji=class Variables{constructor({name:e=`Expressions`,tokens:t=[],children:n=[],parent:r=null,context:i,value:a,raw:o,__cache:s}){this.name=e,this.tokens=t,this.children=n,this.parent=r,this.context=i,this.value=a,this.raw=o,this.__cache=s}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get cache(){let e=this.root;return e.__cache||=new WeakMap,e.__cache}enterScope(e){let t=this.of({name:e,parent:this});return R&&console.log(`[%s] enter`,t.path,t.context),t}exitScope(e){return this.parent?(R&&console.log(`[%s] exit %o
|
|
8
|
+
%s`,this.path,this.context,indent(e,` `)),this.parent.pushChild(this)):(R&&console.log(`[%s] NO exit %o
|
|
9
|
+
%s`,this.path,this.context,indent(e,` `)),this)}token(e){return R&&console.log(`[%s] token <%s> + <%s>`,this.path,this.tokens.join(` `),e),this.assign({tokens:[...this.tokens,e]})}literal(e){return R&&console.log(`[%s] literal %o`,this.path,e),this.pushChild(this.of({name:`Literal`,value:e}))}computedValue(){for(let e=this;;e=last(e.children)){if(!e)return null;if(!s(e.value))return e.value}}contextCache(){let e=this.cache.get(this.context);return e||(e=computeContextCache(this.context),this.cache.set(this.context,e)),e}get path(){return this.parent?.path?.concat(` > `,this.name)||this.name}get(e){let t=e&&normalizeContextKey(e),n=this.contextCache().originalMap.get(t);if(n===void 0)return;let r=this.context.get(n);return r instanceof z?r.get(this):r}resolveName(e){let t=this.tokens.join(` `),n=this.assign({tokens:[]}),r=this.of({name:e,parent:n,value:this.get(t),raw:t});return R&&console.log(`[%s] resolve %s <%s=%s>`,e,r.path,t,r.value),n.pushChild(r)}pushChild(e){if(!e)return this;let t=this.assign({children:[...this.children,e]});return e.parent=t,t}pushChildren(e){let t=this;for(let n of e)t=t.pushChild(n);return t}declareName(){if(this.tokens.length===0)throw Error(`no tokens to declare name`);let e=this.tokens.join(` `);return R&&console.log(`[%s] declareName <%s>`,this.path,e),this.assign({tokens:[]}).pushChild(this.of({name:`Name`,value:e}))}define(e,t){if(typeof e!=`string`)return R&&console.log(`[%s] no define <%s=%s>`,this.path,e,t),this;R&&console.log(`[%s] define <%s=%s>`,this.path,e,t);let n=this.context,r=n.set(e,t),i=cacheKey(e,createContextCache(this.cache.get(n)||computeContextCache(n)));return this.cache.set(r,i),this.assign({context:r})}assign(e={}){return Variables.of({...this,...e})}of(e={}){let t={context:this.context,parent:this.parent};return Variables.of({...t,...e})}static of(e){let{name:t,tokens:n=[],children:r=[],parent:i=null,context:a,value:o,raw:s,__cache:c}=e;if(!a)throw Error(`must provide <context>`);return new Variables({name:t,tokens:[...n],children:[...r],context:a,parent:i,value:o,raw:s,__cache:c})}};function normalizeContextKey(e){return e.replace(/\s*([./\-'+]|\*\*?)\s*/g,` $1 `).replace(/\s{2,}/g,` `).trim()}function wrap(e,t,n){let r=e.children.filter(e=>e.name!==t),i=e.children.filter(e=>e.name===t),a=r[0],o=r[Math.max(1,r.length-1)],s=a?.computedValue(),c=o?.computedValue()??null;return e.assign({children:i}).enterScope(t).pushChildren(r).exitScope(n).define(s,c)}function trackVariables(e={},t=VariableContext){let n=ji.of({context:t.of(e)});return new v({start:n,reduce(e,n,r,i){if(n===Rr){let[n,r]=e.children.slice(-2);e=e.assign({value:t.of(n?.computedValue(),r?.computedValue())})}if(n===li&&(e=e.assign({value:t.of(...e.children.map(e=>e?.computedValue()))})),n===$r){let[t,n]=e.children.slice(-2);e=e.assign({value:t?.computedValue()})}if(n===ti){let[n,...r]=e.children;e=n?.raw===`get value`?getContextValue(e,r):e.assign({value:n?.computedValue()||t.of(void 0)})}let a=Oi[n];if(a)return e.enterScope(a);let o=Di[n];if(o){let{children:r,context:i}=e,a=r.slice(0,-1),s=last(r),c=null;return n===Zr&&(c=t.of(s?.computedValue())),n===ei&&(c=t.of(i,s?.computedValue()).set(`item`,s?.computedValue())),e.assign({children:a}).enterScope(o).pushChild(s).assign({context:c||i})}let s=i.read(i.pos,r.pos);if(ki[n])return e.exitScope(s);if(n===mi){let n=e.children.filter(e=>e.name!==`ContextEntry`),r=n[0],i=last(n);return wrap(e,`ContextEntry`,s).assign({value:t.of(e.value).set(r?.computedValue(),i?.computedValue())})}if(n===Nr||n===Hr)return wrap(e,`InExpression`,s);if(n===Lr)return e.define(`partial`,z.of(e=>last(e.children)?.computedValue()));if(n===ri){let t=last(e.children).computedValue();return e.define(t,1)}if(n===Gr||n===Kr||n===qr){let t=e.children.slice(0,-1),n=last(e.children);return e.assign({children:t}).enterScope(`ArithmeticExpression`).pushChild(n)}if(n===Jr)return e.enterScope(`ArithmeticExpression`);if(n===Fr||n===Ir||n===gi)return e.token(s);if(n===oi)return e.literal(s.replace(/^"|"$/g,``).replace(/\\(["\\])/g,`$1`));if(n===si)return e.literal(s===`true`);if(n===ai)return e.literal(parseFloat(s));if(n===ii)return e.literal(null);if(n===Yr)return e.resolveName(`VariableName`);if(n===Qr)return e.resolveName(`PathName`);if(n===Pr||n===hi)return e.declareName();if((n===Ar||n===Ur)&&e.tokens.length>0)throw Error(`uncleared name`);if(n===Ar){let t=e;for(;t.parent;)t=t.exitScope(s);return t}return e}})}var Mi=trackVariables({});function getContextValue(e,t){if(!t.length||(t[0].name===`Name`&&(t=extractNamedArgs(t,[`m`,`key`])),t.length!==2))return e.assign({value:null});let[n,r]=t,i=r?.computedValue(),a=n?.computedValue();return!a||typeof a!=`object`||typeof i!=`string`?e.assign({value:null}):e.assign({value:[normalizeContextKey(i),i].reduce((e,t)=>a.get(t)||e,null)})}function extractNamedArgs(e,t){let n={};for(let t=0;t<e.length;t+=2){let[r,i]=e.slice(t,t+2);n[r.value]=i}return t.map(e=>n[e])}function last(e){return e[e.length-1]}var Ni=d({StringLiteral:p.string,NumericLiteral:p.number,BooleanLiteral:p.bool,"AtLiteral!":p.special(p.string),CompareOp:p.compareOperator,ArithOp:p.arithmeticOperator,"for if then else some every return":p.controlKeyword,"in instance of and or satisfies between as":p.operatorKeyword,function:p.definitionKeyword,"Type/...":p.typeName,"Wildcard!":p.modifier,null:p.null,LineComment:p.lineComment,BlockComment:p.blockComment,"VariableName!":p.variableName,'"?"':p.self,"DateTimeConstructor! SpecialFunctionName!":p.standard(p.function(p.variableName)),"FunctionInvocation/VariableName!":p.function(p.variableName),"Name!":p.definition(p.variableName),"Key/Name! ContextEntryType/Name!":p.definition(p.propertyName),"PathExpression/PathName!":p.propertyName,"FormalParameter/ParameterName!":p.function(p.definition(p.variableName)),"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace,".":p.derefOperator,", ;":p.separator,"..":p.punctuation}),Pi={__proto__:null,for:10,in:34,return:40,if:44,then:46,else:48,some:52,every:54,satisfies:60,or:64,and:68,between:76,instance:90,of:93,days:105,time:107,duration:109,years:111,months:113,date:115,list:121,context:127,function:134,null:162,true:332,false:332,"?":176,external:192,not:217},Fi=_.deserialize({version:14,states:"CvO`QYOOO`QYOOO$yQYOOOOQU'#Ce'#CeO%TQYO'#C`O&^QYO'#FTOOQQ'#Ff'#FfO&hQYO'#FfO`QYO'#DXOOQU'#Eq'#EqO(_Q^O'#D_OOQU'#D`'#D`OOQU'#D_'#D_OOQO'#Fn'#FnO*[QWO'#DyOOQQ'#EQ'#EQOOQQ'#ER'#EROOQQ'#ES'#ESO*aOWO'#EVO*[QWO'#ETOOQQ'#ET'#ETOOQQ'#Ft'#FtOOQQ'#Fr'#FrOOQQ'#Fz'#FzOOQQ'#EX'#EXO`QYO'#EZOOQQ'#FV'#FVO*iQ^O'#FVO,`QYO'#E[O,gQWO'#E]OOQP'#GO'#GOO,lQXO'#EdOOQQ'#F{'#F{OOQQ'#FU'#FUQOQWOOOOQQ'#FW'#FWOOQQ'#F_'#F_O`QYO'#CqOOQQ'#F`'#F`O%TQYO'#CuO,zQYO'#DzO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wOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR#SwV!SQ#^#s!V!aT!Q!t!v#P#W#X#h#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!X!bT!Q!t!v#P#W#X#h#i#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!Z!cT!Q!t!v#P#W#X#h#i#j#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!kWOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR&U%lT&Y%m&s!_!eT!Q!n!t!v#P#W#X#h#i#j#k#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!_!gT!Q!n!t!v#P#W#X#h#i#j#k#o#p#q#r#w$k$o$r%R%S%Z%^%a%d%n%v%z&]!k^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yQ!q^R!scR#{!pQ!wlR#|!p!kfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%y!klOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%y!kmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR$V!x!koOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Y#[#^#b#f#s$P$Q$Z$_$b$q$}%X%c%x%yR#Oo",nodeNames:`⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier . ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext .. return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression PathName ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not`,maxTerm:174,context:Mi,nodeProps:[[`group`,-17,4,21,25,31,33,35,43,44,70,73,75,88,89,91,92,93,100,`Expr`,49,`Expr Expr`,-5,81,82,83,84,85,`Expr Literal`],[`closedBy`,40,`)`,74,`]`,99,`}`],[`openedBy`,42,`(`,72,`[`,98,`{`]],propSources:[Ni],skippedNodes:[0,1,2],repeatNodeCount:14,tokenData:".v~RvXY#iYZ$^Z[#i]^$^pq#iqr$crs$nwx(Wxy(]yz(bz{(g{|(t|}(y}!O)O!O!P)]!P!Q*g!Q![,b![!],y!]!^-O!^!_-T!_!`$i!`!a-d!b!c-n!}#O-s#P#Q-x#Q#R(o#S#T-}#o#p.l#q#r.q$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#u~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#v~~$fP!_!`$i~$nOt~~$qXOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q<%lO$n~%aVOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t<%lO%^~%{O$j~~&ORO;'S%^;'S;=`&X;=`O%^~&[WOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`&t;=`<%l%^<%lO%^~&wP;=`<%l%^~'RO$j~$k~~'URO;'S$n;'S;=`'_;=`O$n~'bYOY$nYZ%^Zr$nrs&zs#O$n#O#P'R#P;'S$n;'S;=`(Q;=`<%l$n<%lO$n~(TP;=`<%l$n~(]O#}~~(bOx~~(gOz~~(lP_~z{(o~(tO`~~(yO]~~)OO$P~R)TP[P!`!a)WQ)]O$_Q~)bQZ~!O!P)h!Q![)m~)mOc~~)rR$i~!Q![)m!g!h){#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dP$i~!Q![*_~*lQ^~z{*r!P!Q+y~*uTOz*rz{+U{;'S*r;'S;=`+s<%lO*r~+XVOz*rz{+U{!P*r!P!Q+n!Q;'S*r;'S;=`+s<%lO*r~+sOQ~~+vP;=`<%l*r~,OSP~OY+yZ;'S+y;'S;=`,[<%lO+y~,_P;=`<%l+y~,gS$i~!O!P,s!Q![,b!g!h){#X#Y){~,vP!Q![)m~-OO$]~~-TO$t~R-[P!_QuP!_!`-_P-dOuPR-kP![QuP!_!`-_~-sO$m~~-xO!l~~-}O!j~~.QTO#S-}#S#T.a#T;'S-};'S;=`.f<%lO-}~.fO$Z~~.iP;=`<%l-}~.qO#V~~.vO#U~",tokenizers:[Ti,wi,Ei,0,1],topRules:{Expression:[0,3],Expressions:[1,105],UnaryTests:[2,106]},dialects:{camunda:2657},dynamicPrecedences:{33:-1,70:1,75:-1,77:-1},specialized:[{term:125,get:e=>Pi[e]||-1}],tokenPrec:2660}),Ii={ConditionalSpanner:ee,LoopSpanner:ee};function createMixedLanguage(e=void 0){let t=c.configure({wrap:m(t=>t.name==`Feel`||t.name==`FeelBlock`?{parser:Fi}:e&&t.name==`SimpleTextBlock`?{parser:e}:null),props:[le.add(Ii)]});return ie.define({parser:t})}function feelersLanguage(e){return new ne(createMixedLanguage(e),[])}f();var Li=x(oe.define([{tag:[p.keyword,p.controlKeyword,p.operatorKeyword,p.definitionKeyword,p.typeName],color:`var(--theme-syntax-pink)`},{tag:[p.string,p.special(p.string)],color:`color-mix(in srgb, var(--theme-syntax-green) 85%, var(--theme-fg-primary))`},{tag:[p.number,p.bool,p.null],color:`var(--theme-syntax-cyan)`},{tag:[p.arithmeticOperator,p.compareOperator,p.logicOperator],color:`var(--theme-fg-secondary)`},{tag:[p.function(p.variableName),p.function(p.propertyName),p.function(p.special(p.variableName))],color:`var(--theme-syntax-orange)`},{tag:[p.lineComment,p.blockComment],color:`var(--theme-fg-tertiary)`,fontStyle:`italic`},{tag:p.invalid,color:`var(--theme-error-text)`}])),Ri=[b.theme({"&":{color:`var(--theme-fg-primary)`,backgroundColor:`transparent`},".cm-content":{caretColor:`var(--theme-fg-primary)`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--theme-fg-primary)`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground":{backgroundColor:`var(--theme-bg-selected)`},".cm-placeholder":{color:`var(--theme-fg-tertiary)`},".cm-lintRange-error":{backgroundImage:`none`,textDecoration:`underline wavy var(--theme-error)`},".cm-lintRange-warning":{backgroundImage:`none`,textDecoration:`underline wavy var(--theme-warning)`},".cm-lintRange-active":{backgroundColor:`var(--theme-bg-selected)`},".cm-lintPoint-error":{"&:after":{borderBottomColor:`var(--theme-error)`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`var(--theme-warning)`}},".cm-tooltip":{backgroundColor:`var(--theme-bg-primary)`,color:`var(--theme-fg-primary)`,border:`1px solid var(--theme-border-primary)`,borderRadius:`8px`,boxShadow:`var(--theme-shadow-popup)`},".cm-tooltip-autocomplete > ul":{fontFamily:`var(--font-family-mono)`,maxHeight:`240px`},".cm-tooltip-autocomplete ul li":{color:`var(--theme-fg-primary)`,borderRadius:`4px`,padding:`4px 8px`},".cm-tooltip-autocomplete ul li[aria-selected]":{backgroundColor:`var(--theme-bg-selected)`,color:`var(--theme-fg-primary)`},".cm-completionMatchedText":{textDecoration:`none`,fontWeight:`600`,color:`var(--theme-link)`},".cm-completionDetail":{color:`var(--theme-fg-secondary)`,fontStyle:`normal`},".cm-completionIcon":{color:`var(--theme-fg-secondary)`},".cm-completionInfo":{backgroundColor:`var(--theme-bg-primary)`,color:`var(--theme-fg-secondary)`,borderLeft:`1px solid var(--theme-border-primary)`},".cm-diagnostic":{borderLeft:`2px solid var(--theme-border-secondary)`,padding:`4px 8px`,color:`var(--theme-fg-primary)`},".cm-diagnostic-error":{borderLeftColor:`var(--theme-error-border)`},".cm-diagnostic-warning":{borderLeftColor:`var(--theme-warning-border)`}}),Li],zi=Ri;function mitt_default(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}e(mitt_default,`default`),u();var Bi=xe.configure({wrap:m(e=>e.name===`HTMLTag`||e.name===`HTMLBlock`?{parser:Se}:null)});function FeelersEditor({container:e,tooltipContainer:t,hostLanguage:n,hostLanguageParser:r,onChange:i=()=>{},onKeyDown:a=()=>{},onLint:o=()=>{},contentAttributes:s={},readOnly:c=!1,value:l=``,enableGutters:u=!1,singleLine:d=!1,lineWrap:f=!1,darkMode:p=!1}){this._events=mitt_default(),this.on(`lint`,({diagnostics:e})=>o(e));let m=b.updateListener.of(e=>{e.docChanged&&i(e.state.doc.toString())}),h=b.updateListener.of(e=>{let t=e.transactions.flatMap(e=>e.effects).filter(e=>e.is(ve));if(!t.length)return;let n=t.flatMap(e=>e.value);this._events.emit(`lint`,{diagnostics:n})}),g=b.contentAttributes.of(s),_=b.domEventHandlers({keydown:a});typeof t==`string`&&(t=document.querySelector(t)||void 0);let v=t,x=v?ae({tooltipSpace:function(){return v.getBoundingClientRect()}}):[],_getHostLanguageParser=e=>{switch(e){case`markdown`:return Bi;default:return}},S=feelersLanguage(r||n&&_getHostLanguageParser(n)||void 0),w=[te(),m,g,ue(),T(),_,C.of([..._e]),S,Er,h,x,p?zi:Ri,...u?[y()]:[],...d?[O.transactionFilter.of(e=>e.newDoc.lines>1?[]:e)]:[],...f?[b.lineWrapping]:[]];return c&&w.push(b.editable.of(!1)),d&&l&&(l=l.toString().split(`
|
|
10
|
+
`)[0]),this._cmEditor=new b({state:O.create({doc:l,extensions:w}),parent:e}),this}FeelersEditor.prototype.setValue=function(e){this._cmEditor.dispatch({changes:{from:0,to:this._cmEditor.state.doc.length,insert:e}})},FeelersEditor.prototype.focus=function(e){let t=this._cmEditor;if(t.contentDOM.focus(),t.focus(),typeof e==`number`){let n=t.state.doc.length;t.dispatch({selection:{anchor:e<=n?e:n}})}},FeelersEditor.prototype.getSelection=function(){return this._cmEditor.state.selection},FeelersEditor.prototype.on=function(e,t){this._events.on(e,t)},FeelersEditor.prototype.off=function(e,t){this._events.off(e,t)};var Vi=[{name:`not`,type:`function`,params:[{name:`negand`}],info:`<p>Returns the logical negation of the given value.</p>
|
|
11
|
+
<p><strong>Function signature</strong></p>
|
|
12
|
+
<pre><code class="language-feel">not(negand: boolean): boolean
|
|
13
|
+
</code></pre>
|
|
14
|
+
<p><strong>Examples</strong></p>
|
|
15
|
+
<pre><code class="language-feel">not(true)
|
|
16
|
+
// false
|
|
17
|
+
|
|
18
|
+
not(null)
|
|
19
|
+
// null
|
|
20
|
+
</code></pre>
|
|
21
|
+
`},{name:`get value`,type:`function`,params:[{name:`context`},{name:`key`}],info:`<p>Returns the value of the context entry with the given key.</p>
|
|
22
|
+
<p><strong>Function signature</strong></p>
|
|
23
|
+
<pre><code class="language-feel">get value(context: context, key: string): Any
|
|
24
|
+
</code></pre>
|
|
25
|
+
<p><strong>Examples</strong></p>
|
|
26
|
+
<pre><code class="language-feel">get value({foo: 123}, "foo")
|
|
27
|
+
// 123
|
|
28
|
+
|
|
29
|
+
get value({a: 1}, "b")
|
|
30
|
+
// null
|
|
31
|
+
</code></pre>
|
|
32
|
+
`},{name:`get entries`,type:`function`,params:[{name:`context`}],info:`<p>Returns the entries of the context as a list of key-value-pairs.</p>
|
|
33
|
+
<p><strong>Function signature</strong></p>
|
|
34
|
+
<pre><code class="language-feel">get entries(context: context): list<context>
|
|
35
|
+
</code></pre>
|
|
36
|
+
<p>The return value is a list of contexts. Each context contains two entries for "key" and "value".</p>
|
|
37
|
+
<p><strong>Examples</strong></p>
|
|
38
|
+
<pre><code class="language-feel">get entries({foo: 123})
|
|
39
|
+
// [{key: "foo", value: 123}]
|
|
40
|
+
</code></pre>
|
|
41
|
+
`},{name:`context put`,type:`function`,params:[{name:`context`},{name:`keys`},{name:`value`}],info:`<p>Adds a new entry with the given value to the context. The path of the entry is defined by the keys. Returns a new context that includes the entry.</p>
|
|
42
|
+
<p>If <code>keys</code> contains the keys <code>[k1, k2]</code> then it adds the nested entry <code>k1.k2 = value</code> to the context.</p>
|
|
43
|
+
<p>If an entry for the same keys already exists in the context, it overrides the value.</p>
|
|
44
|
+
<p>If <code>keys</code> are empty, it returns <code>null</code>.</p>
|
|
45
|
+
<p><strong>Function signature</strong></p>
|
|
46
|
+
<pre><code class="language-feel">context put(context: context, keys: list<string>, value: Any): context
|
|
47
|
+
</code></pre>
|
|
48
|
+
<p><strong>Examples</strong></p>
|
|
49
|
+
<pre><code class="language-feel">context put({x:1}, ["y"], 2)
|
|
50
|
+
// {x:1, y:2}
|
|
51
|
+
|
|
52
|
+
context put({x:1, y: {z:0}}, ["y", "z"], 2)
|
|
53
|
+
// {x:1, y: {z:2}}
|
|
54
|
+
|
|
55
|
+
context put({x:1}, ["y", "z"], 2)
|
|
56
|
+
// {x:1, y: {z:2}}
|
|
57
|
+
</code></pre>
|
|
58
|
+
`},{name:`string`,type:`function`,params:[{name:`from`}],info:`<p>Returns the given value as a string representation.</p>
|
|
59
|
+
<p><strong>Function signature</strong></p>
|
|
60
|
+
<pre><code class="language-feel">string(from: Any): string
|
|
61
|
+
</code></pre>
|
|
62
|
+
<p><strong>Examples</strong></p>
|
|
63
|
+
<pre><code class="language-feel">string(1.1)
|
|
64
|
+
// "1.1"
|
|
65
|
+
|
|
66
|
+
string(date("2012-12-25"))
|
|
67
|
+
// "2012-12-25"
|
|
68
|
+
</code></pre>
|
|
69
|
+
`},{name:`number`,type:`function`,params:[{name:`from`}],info:`<p>Parses the given string to a number.</p>
|
|
70
|
+
<p>Returns <code>null</code> if the string is not a number.</p>
|
|
71
|
+
<p><strong>Function signature</strong></p>
|
|
72
|
+
<pre><code class="language-feel">number(from: string): number
|
|
73
|
+
</code></pre>
|
|
74
|
+
<p><strong>Examples</strong></p>
|
|
75
|
+
<pre><code class="language-feel">number("1500.5")
|
|
76
|
+
// 1500.5
|
|
77
|
+
</code></pre>
|
|
78
|
+
`},{name:`number`,type:`function`,params:[{name:`from`},{name:`grouping separator`}],info:`<p>Parses the given string to a number using the specified grouping separator.</p>
|
|
79
|
+
<p>Returns <code>null</code> if the string is not a number.</p>
|
|
80
|
+
<p><strong>Function signature</strong></p>
|
|
81
|
+
<pre><code class="language-feel">number(from: string, grouping separator: string): number
|
|
82
|
+
</code></pre>
|
|
83
|
+
<p><strong>Examples</strong></p>
|
|
84
|
+
<pre><code class="language-feel">number("1,500", ",")
|
|
85
|
+
// 1500
|
|
86
|
+
</code></pre>
|
|
87
|
+
`},{name:`number`,type:`function`,params:[{name:`from`},{name:`grouping separator`},{name:`decimal separator`}],info:`<p>Parses the given string to a number using the specified grouping and decimal separators.</p>
|
|
88
|
+
<p>Returns <code>null</code> if the string is not a number.</p>
|
|
89
|
+
<p><strong>Function signature</strong></p>
|
|
90
|
+
<pre><code class="language-feel">number(from: string, grouping separator: string, decimal separator: string): number
|
|
91
|
+
</code></pre>
|
|
92
|
+
<p><strong>Examples</strong></p>
|
|
93
|
+
<pre><code class="language-feel">number("1 500.5", " ", ".")
|
|
94
|
+
// 1500.5
|
|
95
|
+
</code></pre>
|
|
96
|
+
`},{name:`context`,type:`function`,params:[{name:`entries`}],info:`<p>Constructs a context of the given list of key-value pairs. It is the reverse function to <a href="https://docs.camunda.io/docs/components/modeler/feel/builtin-functions/feel-built-in-functions-context#get-entriescontext">get entries()</a>.</p>
|
|
97
|
+
<p>Each key-value pair must be a context with two entries: <code>key</code> and <code>value</code>. The entry with name <code>key</code> must have a value of the type <code>string</code>.</p>
|
|
98
|
+
<p>It might override context entries if the keys are equal. The entries are overridden in the same order as the contexts in the given list.</p>
|
|
99
|
+
<p>Returns <code>null</code> if one of the entries is not a context or if a context doesn't contain the required entries.</p>
|
|
100
|
+
<p><strong>Function signature</strong></p>
|
|
101
|
+
<pre><code class="language-feel">context(entries: list<context>): context
|
|
102
|
+
</code></pre>
|
|
103
|
+
<p><strong>Examples</strong></p>
|
|
104
|
+
<pre><code class="language-feel">context([{"key":"a", "value":1}, {"key":"b", "value":2}])
|
|
105
|
+
// {a:1, b:2}
|
|
106
|
+
</code></pre>
|
|
107
|
+
`},{name:`date`,type:`function`,params:[{name:`from`}],info:`<p>Returns a date from the given value.</p>
|
|
108
|
+
<p>Returns <code>null</code> if the string is not a valid calendar date. For example, <code>"2024-06-31"</code> is invalid because June has
|
|
109
|
+
only 30 days.</p>
|
|
110
|
+
<p><strong>Function signature</strong></p>
|
|
111
|
+
<pre><code class="language-feel">date(from: string): date
|
|
112
|
+
</code></pre>
|
|
113
|
+
<p>Parses the given string into a date.</p>
|
|
114
|
+
<pre><code class="language-feel">date(from: date and time): date
|
|
115
|
+
</code></pre>
|
|
116
|
+
<p>Extracts the date component from the given date and time.</p>
|
|
117
|
+
<p><strong>Examples</strong></p>
|
|
118
|
+
<pre><code class="language-feel">date("2018-04-29")
|
|
119
|
+
// date("2018-04-29")
|
|
120
|
+
|
|
121
|
+
date(date and time("2012-12-25T11:00:00"))
|
|
122
|
+
// date("2012-12-25")
|
|
123
|
+
</code></pre>
|
|
124
|
+
`},{name:`date`,type:`function`,params:[{name:`year`},{name:`month`},{name:`day`}],info:`<p>Returns a date from the given components.</p>
|
|
125
|
+
<p>Returns <code>null</code> if the components don't represent a valid calendar date. For example, <code>2024,6,31</code> is invalid because
|
|
126
|
+
June has only 30 days.</p>
|
|
127
|
+
<p><strong>Function signature</strong></p>
|
|
128
|
+
<pre><code class="language-feel">date(year: number, month: number, day: number): date
|
|
129
|
+
</code></pre>
|
|
130
|
+
<p><strong>Examples</strong></p>
|
|
131
|
+
<pre><code class="language-feel">date(2012, 12, 25)
|
|
132
|
+
// date("2012-12-25")
|
|
133
|
+
</code></pre>
|
|
134
|
+
`},{name:`time`,type:`function`,params:[{name:`from`}],info:`<p>Returns a time from the given value.</p>
|
|
135
|
+
<p><strong>Function signature</strong></p>
|
|
136
|
+
<pre><code class="language-feel">time(from: string): time
|
|
137
|
+
</code></pre>
|
|
138
|
+
<p>Parses the given string into a time.</p>
|
|
139
|
+
<pre><code class="language-feel">time(from: date and time): time
|
|
140
|
+
</code></pre>
|
|
141
|
+
<p>Extracts the time component from the given date and time.</p>
|
|
142
|
+
<p><strong>Examples</strong></p>
|
|
143
|
+
<pre><code class="language-feel">time("12:00:00")
|
|
144
|
+
// time("12:00:00")
|
|
145
|
+
|
|
146
|
+
time(date and time("2012-12-25T11:00:00"))
|
|
147
|
+
// time("11:00:00")
|
|
148
|
+
</code></pre>
|
|
149
|
+
`},{name:`time`,type:`function`,params:[{name:`hour`},{name:`minute`},{name:`second`}],info:`<p>Returns a time from the given components.</p>
|
|
150
|
+
<p><strong>Function signature</strong></p>
|
|
151
|
+
<pre><code class="language-feel">time(hour: number, minute: number, second: number): time
|
|
152
|
+
</code></pre>
|
|
153
|
+
<p><strong>Examples</strong></p>
|
|
154
|
+
<pre><code class="language-feel">time(23, 59, 0)
|
|
155
|
+
// time("23:59:00")
|
|
156
|
+
</code></pre>
|
|
157
|
+
`},{name:`time`,type:`function`,params:[{name:`hour`},{name:`minute`},{name:`second`},{name:`offset`}],info:`<p>Returns a time from the given components, including a timezone offset.</p>
|
|
158
|
+
<p><strong>Function signature</strong></p>
|
|
159
|
+
<pre><code class="language-feel">time(hour: number, minute: number, second: number, offset: days and time duration): time
|
|
160
|
+
</code></pre>
|
|
161
|
+
<p><strong>Examples</strong></p>
|
|
162
|
+
<pre><code class="language-feel">time(14, 30, 0, duration("PT1H"))
|
|
163
|
+
// time("14:30:00+01:00")
|
|
164
|
+
</code></pre>
|
|
165
|
+
`},{name:`date and time`,type:`function`,params:[{name:`from`}],info:`<p>Parses the given string into a date and time. The function supports strings in the format <code>YYYY-MM-DDThh:mm:ss</code> with
|
|
166
|
+
optional timezone information either as offset (e.g., <code>+01:00</code> or <code>Z</code>), as IANA timezone ID (e.g., <code>@Europe/Berlin</code>), or
|
|
167
|
+
as a combination of both (e.g., <code>+01:00[Europe/Berlin]</code>).</p>
|
|
168
|
+
<p>Returns <code>null</code> if the string is not a valid calendar date. For example, <code>"2024-06-31T10:00:00"</code> is invalid because
|
|
169
|
+
June has only 30 days.</p>
|
|
170
|
+
<p><strong>Function signature</strong></p>
|
|
171
|
+
<pre><code class="language-feel">date and time(from: string): date and time
|
|
172
|
+
</code></pre>
|
|
173
|
+
<p><strong>Examples</strong></p>
|
|
174
|
+
<pre><code class="language-feel">date and time("2018-04-29T09:30:00")
|
|
175
|
+
// date and time("2018-04-29T09:30:00")
|
|
176
|
+
|
|
177
|
+
date and time("2018-04-29T09:30:00+02:00")
|
|
178
|
+
// date and time("2018-04-29T09:30:00+02:00")
|
|
179
|
+
|
|
180
|
+
date and time("2018-04-29T09:30:00@Europe/Berlin")
|
|
181
|
+
// date and time("2018-04-29T09:30:00@Europe/Berlin")
|
|
182
|
+
|
|
183
|
+
date and time("2018-04-29T09:30:00+02:00[Europe/Berlin]")
|
|
184
|
+
// date and time("2018-04-29T09:30:00@Europe/Berlin")
|
|
185
|
+
</code></pre>
|
|
186
|
+
`},{name:`date and time`,type:`function`,params:[{name:`date`},{name:`time`}],info:`<p>Returns a date and time from the given components.</p>
|
|
187
|
+
<p><strong>Function signature</strong></p>
|
|
188
|
+
<pre><code class="language-feel">date and time(date: date, time: time): date and time
|
|
189
|
+
</code></pre>
|
|
190
|
+
<pre><code class="language-feel">date and time(date: date and time, time: time): date and time
|
|
191
|
+
</code></pre>
|
|
192
|
+
<p>Returns a date and time value that consists of the date component of <code>date</code> combined with <code>time</code>.</p>
|
|
193
|
+
<p><strong>Examples</strong></p>
|
|
194
|
+
<pre><code class="language-feel">date and time(date("2012-12-24"),time("T23:59:00"))
|
|
195
|
+
// date and time("2012-12-24T23:59:00")
|
|
196
|
+
|
|
197
|
+
date and time(date and time("2012-12-25T11:00:00"),time("T23:59:00"))
|
|
198
|
+
// date and time("2012-12-25T23:59:00")
|
|
199
|
+
</code></pre>
|
|
200
|
+
`},{name:`duration`,type:`function`,params:[{name:`from`}],info:`<p>Parses the given string into a duration. The duration is either a days and time duration or a years and months duration.</p>
|
|
201
|
+
<p><strong>Function signature</strong></p>
|
|
202
|
+
<pre><code class="language-feel">duration(from: string): days and time duration
|
|
203
|
+
</code></pre>
|
|
204
|
+
<pre><code class="language-feel">duration(from: string): years and months duration
|
|
205
|
+
</code></pre>
|
|
206
|
+
<p><strong>Examples</strong></p>
|
|
207
|
+
<pre><code class="language-feel">duration("P5D")
|
|
208
|
+
// duration("P5D")
|
|
209
|
+
|
|
210
|
+
duration("P32Y")
|
|
211
|
+
// duration("P32Y")
|
|
212
|
+
</code></pre>
|
|
213
|
+
`},{name:`years and months duration`,type:`function`,params:[{name:`from`},{name:`to`}],info:`<p>Returns the years and months duration between <code>from</code> and <code>to</code>.</p>
|
|
214
|
+
<p><strong>Function signature</strong></p>
|
|
215
|
+
<pre><code class="language-feel">years and months duration(from: date, to: date): years and months duration
|
|
216
|
+
</code></pre>
|
|
217
|
+
<p><strong>Examples</strong></p>
|
|
218
|
+
<pre><code class="language-feel">years and months duration(date("2011-12-22"), date("2013-08-24"))
|
|
219
|
+
// duration("P1Y8M")
|
|
220
|
+
</code></pre>
|
|
221
|
+
`},{name:`from json`,type:`function`,params:[{name:`value`}],info:`<p>Parses a JSON string into a FEEL value. The function converts JSON primitives, objects, and arrays into their corresponding FEEL types.</p>
|
|
222
|
+
<p>Returns <code>null</code> if the string is not a valid JSON value.</p>
|
|
223
|
+
<p><strong>Function signature</strong></p>
|
|
224
|
+
<pre><code class="language-feel">from json(value: string): Any
|
|
225
|
+
</code></pre>
|
|
226
|
+
<p><strong>Examples</strong></p>
|
|
227
|
+
<pre><code class="language-feel">from json("{\\"a\\": 1, \\"b\\": 2}")
|
|
228
|
+
// {a: 1, b: 2}
|
|
229
|
+
|
|
230
|
+
from json("true")
|
|
231
|
+
// true
|
|
232
|
+
|
|
233
|
+
from json("\\"2023-06-14\\"")
|
|
234
|
+
// "2023-06-14"
|
|
235
|
+
</code></pre>
|
|
236
|
+
`,engines:{camunda:`>=8.9`}},{name:`to json`,type:`function`,params:[{name:`value`}],info:`<p>Converts a FEEL value into a JSON string. The function converts FEEL primitives, contexts, and lists into their
|
|
237
|
+
corresponding JSON types. Temporal values are converted to their ISO 8601 string representation, including timezone
|
|
238
|
+
information for date and time values (format: <code>2025-11-24T10:00:00+01:00[Europe/Berlin]</code>).</p>
|
|
239
|
+
<p><strong>Function signature</strong></p>
|
|
240
|
+
<pre><code class="language-feel">to json(value: Any): string
|
|
241
|
+
</code></pre>
|
|
242
|
+
<p><strong>Examples</strong></p>
|
|
243
|
+
<pre><code class="language-feel">to json({a: 1, b: 2})
|
|
244
|
+
// "{\\"a\\":1,\\"b\\":2}"
|
|
245
|
+
|
|
246
|
+
to json(true)
|
|
247
|
+
// "true"
|
|
248
|
+
|
|
249
|
+
to json(@"2023-06-14")
|
|
250
|
+
// "\\"2023-06-14\\""
|
|
251
|
+
|
|
252
|
+
to json(@"2025-11-24T10:00:00@Europe/Berlin")
|
|
253
|
+
// "\\"2025-11-24T10:00:00+01:00[Europe/Berlin]\\""
|
|
254
|
+
|
|
255
|
+
to json(@"P3Y")
|
|
256
|
+
// "\\"P3Y\\""
|
|
257
|
+
</code></pre>
|
|
258
|
+
`,engines:{camunda:`>=8.9`}},{name:`list contains`,type:`function`,params:[{name:`list`},{name:`element`}],info:`<p>Returns <code>true</code> if the given list contains the element. Otherwise, returns <code>false</code>.</p>
|
|
259
|
+
<p><strong>Function signature</strong></p>
|
|
260
|
+
<pre><code class="language-feel">list contains(list: list, element: Any): boolean
|
|
261
|
+
</code></pre>
|
|
262
|
+
<p><strong>Examples</strong></p>
|
|
263
|
+
<pre><code class="language-feel">list contains([1,2,3], 2)
|
|
264
|
+
// true
|
|
265
|
+
</code></pre>
|
|
266
|
+
`},{name:`count`,type:`function`,params:[{name:`list`}],info:`<p>Returns the number of elements of the given list.</p>
|
|
267
|
+
<p><strong>Function signature</strong></p>
|
|
268
|
+
<pre><code class="language-feel">count(list: list): number
|
|
269
|
+
</code></pre>
|
|
270
|
+
<p><strong>Examples</strong></p>
|
|
271
|
+
<pre><code class="language-feel">count([1,2,3])
|
|
272
|
+
// 3
|
|
273
|
+
</code></pre>
|
|
274
|
+
`},{name:`min`,type:`function`,params:[{name:`list`}],info:`<p>Returns the minimum of the given list.</p>
|
|
275
|
+
<p><strong>Function signature</strong></p>
|
|
276
|
+
<pre><code class="language-feel">min(list: list): Any
|
|
277
|
+
</code></pre>
|
|
278
|
+
<p>All elements in <code>list</code> should have the same type and be comparable.</p>
|
|
279
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
280
|
+
<p><strong>Examples</strong></p>
|
|
281
|
+
<pre><code class="language-feel">min([1,2,3])
|
|
282
|
+
// 1
|
|
283
|
+
|
|
284
|
+
min(1,2,3)
|
|
285
|
+
// 1
|
|
286
|
+
</code></pre>
|
|
287
|
+
`},{name:`max`,type:`function`,params:[{name:`list`}],info:`<p>Returns the maximum of the given list.</p>
|
|
288
|
+
<p><strong>Function signature</strong></p>
|
|
289
|
+
<pre><code class="language-feel">max(list: list): Any
|
|
290
|
+
</code></pre>
|
|
291
|
+
<p>All elements in <code>list</code> should have the same type and be comparable.</p>
|
|
292
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
293
|
+
<p><strong>Examples</strong></p>
|
|
294
|
+
<pre><code class="language-feel">max([1,2,3])
|
|
295
|
+
// 3
|
|
296
|
+
|
|
297
|
+
max(1,2,3)
|
|
298
|
+
// 3
|
|
299
|
+
</code></pre>
|
|
300
|
+
`},{name:`sum`,type:`function`,params:[{name:`list`}],info:`<p>Returns the sum of the given list of numbers.</p>
|
|
301
|
+
<p><strong>Function signature</strong></p>
|
|
302
|
+
<pre><code class="language-feel">sum(list: list<number>): number
|
|
303
|
+
</code></pre>
|
|
304
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
305
|
+
<p><strong>Examples</strong></p>
|
|
306
|
+
<pre><code class="language-feel">sum([1,2,3])
|
|
307
|
+
// 6
|
|
308
|
+
|
|
309
|
+
sum(1,2,3)
|
|
310
|
+
// 6
|
|
311
|
+
</code></pre>
|
|
312
|
+
`},{name:`product`,type:`function`,params:[{name:`list`}],info:`<p>Returns the product of the given list of numbers.</p>
|
|
313
|
+
<p><strong>Function signature</strong></p>
|
|
314
|
+
<pre><code class="language-feel">product(list: list<number>): number
|
|
315
|
+
</code></pre>
|
|
316
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
317
|
+
<p><strong>Examples</strong></p>
|
|
318
|
+
<pre><code class="language-feel">product([2, 3, 4])
|
|
319
|
+
// 24
|
|
320
|
+
|
|
321
|
+
product(2, 3, 4)
|
|
322
|
+
// 24
|
|
323
|
+
</code></pre>
|
|
324
|
+
`},{name:`mean`,type:`function`,params:[{name:`list`}],info:`<p>Returns the arithmetic mean (i.e. average) of the given list of numbers.</p>
|
|
325
|
+
<p><strong>Function signature</strong></p>
|
|
326
|
+
<pre><code class="language-feel">mean(list: list<number>): number
|
|
327
|
+
</code></pre>
|
|
328
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
329
|
+
<p><strong>Examples</strong></p>
|
|
330
|
+
<pre><code class="language-feel">mean([1,2,3])
|
|
331
|
+
// 2
|
|
332
|
+
|
|
333
|
+
mean(1,2,3)
|
|
334
|
+
// 2
|
|
335
|
+
</code></pre>
|
|
336
|
+
`},{name:`median`,type:`function`,params:[{name:`list`}],info:`<p>Returns the median element of the given list of numbers.</p>
|
|
337
|
+
<p><strong>Function signature</strong></p>
|
|
338
|
+
<pre><code class="language-feel">median(list: list<number>): number
|
|
339
|
+
</code></pre>
|
|
340
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
341
|
+
<p><strong>Examples</strong></p>
|
|
342
|
+
<pre><code class="language-feel">median(8, 2, 5, 3, 4)
|
|
343
|
+
// 4
|
|
344
|
+
|
|
345
|
+
median([6, 1, 2, 3])
|
|
346
|
+
// 2.5
|
|
347
|
+
</code></pre>
|
|
348
|
+
`},{name:`stddev`,type:`function`,params:[{name:`list`}],info:`<p>Returns the standard deviation of the given list of numbers.</p>
|
|
349
|
+
<p><strong>Function signature</strong></p>
|
|
350
|
+
<pre><code class="language-feel">stddev(list: list<number>): number
|
|
351
|
+
</code></pre>
|
|
352
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
353
|
+
<p><strong>Examples</strong></p>
|
|
354
|
+
<pre><code class="language-feel">stddev(2, 4, 7, 5)
|
|
355
|
+
// 2.0816659994661326
|
|
356
|
+
|
|
357
|
+
stddev([2, 4, 7, 5])
|
|
358
|
+
// 2.0816659994661326
|
|
359
|
+
</code></pre>
|
|
360
|
+
`},{name:`mode`,type:`function`,params:[{name:`list`}],info:`<p>Returns the mode of the given list of numbers.</p>
|
|
361
|
+
<p><strong>Function signature</strong></p>
|
|
362
|
+
<pre><code class="language-feel">mode(list: list<number>): number
|
|
363
|
+
</code></pre>
|
|
364
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
365
|
+
<p><strong>Examples</strong></p>
|
|
366
|
+
<pre><code class="language-feel">mode(6, 3, 9, 6, 6)
|
|
367
|
+
// [6]
|
|
368
|
+
|
|
369
|
+
mode([6, 1, 9, 6, 1])
|
|
370
|
+
// [1, 6]
|
|
371
|
+
</code></pre>
|
|
372
|
+
`},{name:`all`,type:`function`,params:[{name:`list`}],info:`<p>Returns <code>false</code> if any element of the given list is <code>false</code>. Otherwise, returns <code>true</code>.</p>
|
|
373
|
+
<p>If the given list is empty, it returns <code>true</code>.</p>
|
|
374
|
+
<p><strong>Function signature</strong></p>
|
|
375
|
+
<pre><code class="language-feel">all(list: list<boolean>): boolean
|
|
376
|
+
</code></pre>
|
|
377
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
378
|
+
<p><strong>Examples</strong></p>
|
|
379
|
+
<pre><code class="language-feel">all([true,false])
|
|
380
|
+
// false
|
|
381
|
+
|
|
382
|
+
all(false,null,true)
|
|
383
|
+
// false
|
|
384
|
+
</code></pre>
|
|
385
|
+
<p>:::info
|
|
386
|
+
The function <code>all()</code> replaced the previous function <code>and()</code>. The previous function is deprecated and
|
|
387
|
+
should not be used anymore.
|
|
388
|
+
:::</p>
|
|
389
|
+
`},{name:`any`,type:`function`,params:[{name:`list`}],info:`<p>Returns <code>true</code> if any element of the given list is <code>true</code>. Otherwise, returns <code>false</code>.</p>
|
|
390
|
+
<p>If the given list is empty, it returns <code>false</code>.</p>
|
|
391
|
+
<p><strong>Function signature</strong></p>
|
|
392
|
+
<pre><code class="language-feel">any(list: list<boolean>): boolean
|
|
393
|
+
</code></pre>
|
|
394
|
+
<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>
|
|
395
|
+
<p><strong>Examples</strong></p>
|
|
396
|
+
<pre><code class="language-feel">any([false,true])
|
|
397
|
+
// true
|
|
398
|
+
|
|
399
|
+
any(false,null,true)
|
|
400
|
+
// true
|
|
401
|
+
</code></pre>
|
|
402
|
+
<p>:::info
|
|
403
|
+
The function <code>any()</code> replaced the previous function <code>or()</code>. The previous function is deprecated and
|
|
404
|
+
should not be used anymore.
|
|
405
|
+
:::</p>
|
|
406
|
+
`},{name:`sublist`,type:`function`,params:[{name:`list`},{name:`start position`}],info:`<p>Returns a partial list of the given value starting at <code>start position</code>.</p>
|
|
407
|
+
<p><strong>Function signature</strong></p>
|
|
408
|
+
<pre><code class="language-feel">sublist(list: list, start position: number): list
|
|
409
|
+
</code></pre>
|
|
410
|
+
<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
|
|
411
|
+
<p><strong>Examples</strong></p>
|
|
412
|
+
<pre><code class="language-feel">sublist([1,2,3], 2)
|
|
413
|
+
// [2,3]
|
|
414
|
+
</code></pre>
|
|
415
|
+
`},{name:`sublist`,type:`function`,params:[{name:`list`},{name:`start position`},{name:`length`}],info:`<p>Returns a partial list of the given value starting at <code>start position</code>.</p>
|
|
416
|
+
<p><strong>Function signature</strong></p>
|
|
417
|
+
<pre><code class="language-feel">sublist(list: list, start position: number, length: number): list
|
|
418
|
+
</code></pre>
|
|
419
|
+
<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
|
|
420
|
+
<p><strong>Examples</strong></p>
|
|
421
|
+
<pre><code class="language-feel">sublist([1,2,3], 1, 2)
|
|
422
|
+
// [1,2]
|
|
423
|
+
</code></pre>
|
|
424
|
+
`},{name:`append`,type:`function`,params:[{name:`list`},{name:`items`}],info:`<p>Returns the given list with all <code>items</code> appended.</p>
|
|
425
|
+
<p><strong>Function signature</strong></p>
|
|
426
|
+
<pre><code class="language-feel">append(list: list, items: Any): list
|
|
427
|
+
</code></pre>
|
|
428
|
+
<p>The parameter <code>items</code> can be a single element or a sequence of elements.</p>
|
|
429
|
+
<p><strong>Examples</strong></p>
|
|
430
|
+
<pre><code class="language-feel">append([1], 2, 3)
|
|
431
|
+
// [1,2,3]
|
|
432
|
+
</code></pre>
|
|
433
|
+
`},{name:`concatenate`,type:`function`,params:[{name:`lists`}],info:`<p>Returns a list that includes all elements of the given lists.</p>
|
|
434
|
+
<p><strong>Function signature</strong></p>
|
|
435
|
+
<pre><code class="language-feel">concatenate(lists: list): list
|
|
436
|
+
</code></pre>
|
|
437
|
+
<p>The parameter <code>lists</code> is a sequence of lists.</p>
|
|
438
|
+
<p><strong>Examples</strong></p>
|
|
439
|
+
<pre><code class="language-feel">concatenate([1,2],[3])
|
|
440
|
+
// [1,2,3]
|
|
441
|
+
|
|
442
|
+
concatenate([1],[2],[3])
|
|
443
|
+
// [1,2,3]
|
|
444
|
+
</code></pre>
|
|
445
|
+
`},{name:`insert before`,type:`function`,params:[{name:`list`},{name:`position`},{name:`newItem`}],info:`<p>Returns the given list with <code>newItem</code> inserted at <code>position</code>.</p>
|
|
446
|
+
<p><strong>Function signature</strong></p>
|
|
447
|
+
<pre><code class="language-feel">insert before(list: list, position: number, newItem: Any): list
|
|
448
|
+
</code></pre>
|
|
449
|
+
<p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
|
|
450
|
+
<p><strong>Examples</strong></p>
|
|
451
|
+
<pre><code class="language-feel">insert before([1,3],1,2)
|
|
452
|
+
// [2,1,3]
|
|
453
|
+
</code></pre>
|
|
454
|
+
`},{name:`remove`,type:`function`,params:[{name:`list`},{name:`position`}],info:`<p>Returns the given list without the element at <code>position</code>.</p>
|
|
455
|
+
<p><strong>Function signature</strong></p>
|
|
456
|
+
<pre><code class="language-feel">remove(list: list, position: number): list
|
|
457
|
+
</code></pre>
|
|
458
|
+
<p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
|
|
459
|
+
<p><strong>Examples</strong></p>
|
|
460
|
+
<pre><code class="language-feel">remove([1,2,3], 2)
|
|
461
|
+
// [1,3]
|
|
462
|
+
</code></pre>
|
|
463
|
+
`},{name:`reverse`,type:`function`,params:[{name:`list`}],info:`<p>Returns the given list in revered order.</p>
|
|
464
|
+
<p><strong>Function signature</strong></p>
|
|
465
|
+
<pre><code class="language-feel">reverse(list: list): list
|
|
466
|
+
</code></pre>
|
|
467
|
+
<p><strong>Examples</strong></p>
|
|
468
|
+
<pre><code class="language-feel">reverse([1,2,3])
|
|
469
|
+
// [3,2,1]
|
|
470
|
+
</code></pre>
|
|
471
|
+
`},{name:`index of`,type:`function`,params:[{name:`list`},{name:`match`}],info:`<p>Returns an ascending list of positions containing <code>match</code>.</p>
|
|
472
|
+
<p><strong>Function signature</strong></p>
|
|
473
|
+
<pre><code class="language-feel">index of(list: list, match: Any): list<number>
|
|
474
|
+
</code></pre>
|
|
475
|
+
<p><strong>Examples</strong></p>
|
|
476
|
+
<pre><code class="language-feel">index of([1,2,3,2],2)
|
|
477
|
+
// [2,4]
|
|
478
|
+
</code></pre>
|
|
479
|
+
`},{name:`union`,type:`function`,params:[{name:`list`}],info:`<p>Returns a list that includes all elements of the given lists without duplicates.</p>
|
|
480
|
+
<p><strong>Function signature</strong></p>
|
|
481
|
+
<pre><code class="language-feel">union(list: list): list
|
|
482
|
+
</code></pre>
|
|
483
|
+
<p>The parameter <code>list</code> is a sequence of lists.</p>
|
|
484
|
+
<p><strong>Examples</strong></p>
|
|
485
|
+
<pre><code class="language-feel">union([1,2],[2,3])
|
|
486
|
+
// [1,2,3]
|
|
487
|
+
</code></pre>
|
|
488
|
+
`},{name:`distinct values`,type:`function`,params:[{name:`list`}],info:`<p>Returns the given list without duplicates.</p>
|
|
489
|
+
<p><strong>Function signature</strong></p>
|
|
490
|
+
<pre><code class="language-feel">distinct values(list: list): list
|
|
491
|
+
</code></pre>
|
|
492
|
+
<p><strong>Examples</strong></p>
|
|
493
|
+
<pre><code class="language-feel">distinct values([1,2,3,2,1])
|
|
494
|
+
// [1,2,3]
|
|
495
|
+
</code></pre>
|
|
496
|
+
`},{name:`flatten`,type:`function`,params:[{name:`list`}],info:`<p>Returns a list that includes all elements of the given list without nested lists.</p>
|
|
497
|
+
<p><strong>Function signature</strong></p>
|
|
498
|
+
<pre><code class="language-feel">flatten(list: list): list
|
|
499
|
+
</code></pre>
|
|
500
|
+
<p><strong>Examples</strong></p>
|
|
501
|
+
<pre><code class="language-feel">flatten([[1,2],[[3]], 4])
|
|
502
|
+
// [1,2,3,4]
|
|
503
|
+
</code></pre>
|
|
504
|
+
`},{name:`sort`,type:`function`,params:[{name:`list`},{name:`precedes`}],info:`<p>Returns the given list sorted by the <code>precedes</code> function.</p>
|
|
505
|
+
<p><strong>Function signature</strong></p>
|
|
506
|
+
<pre><code class="language-feel">sort(list: list, precedes: function<(Any, Any) -> boolean>): list
|
|
507
|
+
</code></pre>
|
|
508
|
+
<p><strong>Examples</strong></p>
|
|
509
|
+
<pre><code class="language-feel">sort(list: [3,1,4,5,2], precedes: function(x,y) x < y)
|
|
510
|
+
// [1,2,3,4,5]
|
|
511
|
+
</code></pre>
|
|
512
|
+
`},{name:`string join`,type:`function`,params:[{name:`list`}],info:`<p>Joins a list of strings into a single string. This is similar to
|
|
513
|
+
Java's <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>
|
|
514
|
+
function.</p>
|
|
515
|
+
<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is
|
|
516
|
+
neither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>
|
|
517
|
+
<p><strong>Function signature</strong></p>
|
|
518
|
+
<pre><code class="language-feel">string join(list: list<string>): string
|
|
519
|
+
</code></pre>
|
|
520
|
+
<p><strong>Examples</strong></p>
|
|
521
|
+
<pre><code class="language-feel">string join(["a","b","c"])
|
|
522
|
+
// "abc"
|
|
523
|
+
|
|
524
|
+
string join(["a",null,"c"])
|
|
525
|
+
// "ac"
|
|
526
|
+
|
|
527
|
+
string join([])
|
|
528
|
+
// ""
|
|
529
|
+
</code></pre>
|
|
530
|
+
`},{name:`string join`,type:`function`,params:[{name:`list`},{name:`delimiter`}],info:`<p>Joins a list of strings into a single string. This is similar to
|
|
531
|
+
Java's <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>
|
|
532
|
+
function.</p>
|
|
533
|
+
<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is
|
|
534
|
+
neither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>
|
|
535
|
+
<p>The resulting string contains a <code>delimiter</code> between each element.</p>
|
|
536
|
+
<p><strong>Function signature</strong></p>
|
|
537
|
+
<pre><code class="language-feel">string join(list: list<string>, delimiter: string): string
|
|
538
|
+
</code></pre>
|
|
539
|
+
<p><strong>Examples</strong></p>
|
|
540
|
+
<pre><code class="language-feel">string join(["a"], "X")
|
|
541
|
+
// "a"
|
|
542
|
+
|
|
543
|
+
string join(["a","b","c"], ", ")
|
|
544
|
+
// "a, b, c"
|
|
545
|
+
</code></pre>
|
|
546
|
+
`},{name:`decimal`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value at the given scale.</p>
|
|
547
|
+
<p><strong>Function signature</strong></p>
|
|
548
|
+
<pre><code class="language-feel">decimal(n: number, scale: number): number
|
|
549
|
+
</code></pre>
|
|
550
|
+
<p><strong>Examples</strong></p>
|
|
551
|
+
<pre><code class="language-feel">decimal(1/3, 2)
|
|
552
|
+
// .33
|
|
553
|
+
|
|
554
|
+
decimal(1.5, 0)
|
|
555
|
+
// 2
|
|
556
|
+
</code></pre>
|
|
557
|
+
`},{name:`floor`,type:`function`,params:[{name:`n`}],info:`<p>Rounds the given value with rounding mode flooring.</p>
|
|
558
|
+
<p><strong>Function signature</strong></p>
|
|
559
|
+
<pre><code class="language-feel">floor(n: number): number
|
|
560
|
+
</code></pre>
|
|
561
|
+
<p><strong>Examples</strong></p>
|
|
562
|
+
<pre><code class="language-feel">floor(1.5)
|
|
563
|
+
// 1
|
|
564
|
+
|
|
565
|
+
floor(-1.5)
|
|
566
|
+
// -2
|
|
567
|
+
</code></pre>
|
|
568
|
+
`},{name:`floor`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with rounding mode flooring at the given scale.</p>
|
|
569
|
+
<p><strong>Function signature</strong></p>
|
|
570
|
+
<pre><code class="language-feel">floor(n: number, scale: number): number
|
|
571
|
+
</code></pre>
|
|
572
|
+
<p><strong>Examples</strong></p>
|
|
573
|
+
<pre><code class="language-feel">floor(-1.56, 1)
|
|
574
|
+
// -1.6
|
|
575
|
+
</code></pre>
|
|
576
|
+
`},{name:`ceiling`,type:`function`,params:[{name:`n`}],info:`<p>Rounds the given value with rounding mode ceiling.</p>
|
|
577
|
+
<p><strong>Function signature</strong></p>
|
|
578
|
+
<pre><code class="language-feel">ceiling(n: number): number
|
|
579
|
+
</code></pre>
|
|
580
|
+
<p><strong>Examples</strong></p>
|
|
581
|
+
<pre><code class="language-feel">ceiling(1.5)
|
|
582
|
+
// 2
|
|
583
|
+
|
|
584
|
+
ceiling(-1.5)
|
|
585
|
+
// -1
|
|
586
|
+
</code></pre>
|
|
587
|
+
`},{name:`ceiling`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with rounding mode ceiling at the given scale.</p>
|
|
588
|
+
<p><strong>Function signature</strong></p>
|
|
589
|
+
<pre><code class="language-feel">ceiling(n: number, scale: number): number
|
|
590
|
+
</code></pre>
|
|
591
|
+
<p><strong>Examples</strong></p>
|
|
592
|
+
<pre><code class="language-feel">ceiling(-1.56, 1)
|
|
593
|
+
// -1.5
|
|
594
|
+
</code></pre>
|
|
595
|
+
`},{name:`round up`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with the rounding mode round-up at the given scale.</p>
|
|
596
|
+
<p><strong>Function signature</strong></p>
|
|
597
|
+
<pre><code class="language-feel">round up(n: number, scale: number): number
|
|
598
|
+
</code></pre>
|
|
599
|
+
<p><strong>Examples</strong></p>
|
|
600
|
+
<pre><code class="language-feel">round up(5.5)
|
|
601
|
+
// 6
|
|
602
|
+
|
|
603
|
+
round up(-5.5)
|
|
604
|
+
// -6
|
|
605
|
+
|
|
606
|
+
round up(1.121, 2)
|
|
607
|
+
// 1.13
|
|
608
|
+
|
|
609
|
+
round up(-1.126, 2)
|
|
610
|
+
// -1.13
|
|
611
|
+
</code></pre>
|
|
612
|
+
`},{name:`round down`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with the rounding mode round-down at the given scale.</p>
|
|
613
|
+
<p><strong>Function signature</strong></p>
|
|
614
|
+
<pre><code class="language-feel">round down(n: number, scale: number): number
|
|
615
|
+
</code></pre>
|
|
616
|
+
<p><strong>Examples</strong></p>
|
|
617
|
+
<pre><code class="language-feel">round down(5.5, 0)
|
|
618
|
+
// 5
|
|
619
|
+
|
|
620
|
+
round down (-5.5, 0)
|
|
621
|
+
// -5
|
|
622
|
+
|
|
623
|
+
round down (1.121, 2)
|
|
624
|
+
// 1.12
|
|
625
|
+
|
|
626
|
+
round down (-1.126, 2)
|
|
627
|
+
// -1.12
|
|
628
|
+
</code></pre>
|
|
629
|
+
`},{name:`round half up`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with the rounding mode round-half-up at the given scale.</p>
|
|
630
|
+
<p><strong>Function signature</strong></p>
|
|
631
|
+
<pre><code class="language-feel">round half up(n: number, scale: number): number
|
|
632
|
+
</code></pre>
|
|
633
|
+
<p><strong>Examples</strong></p>
|
|
634
|
+
<pre><code class="language-feel">round half up(5.5, 0)
|
|
635
|
+
// 6
|
|
636
|
+
|
|
637
|
+
round half up(-5.5, 0)
|
|
638
|
+
// -6
|
|
639
|
+
|
|
640
|
+
round half up(1.121, 2)
|
|
641
|
+
// 1.12
|
|
642
|
+
|
|
643
|
+
round half up(-1.126, 2)
|
|
644
|
+
// -1.13
|
|
645
|
+
</code></pre>
|
|
646
|
+
`},{name:`round half down`,type:`function`,params:[{name:`n`},{name:`scale`}],info:`<p>Rounds the given value with the rounding mode round-half-down at the given scale.</p>
|
|
647
|
+
<p><strong>Function signature</strong></p>
|
|
648
|
+
<pre><code class="language-feel">round half down(n: number, scale: number): number
|
|
649
|
+
</code></pre>
|
|
650
|
+
<p><strong>Examples</strong></p>
|
|
651
|
+
<pre><code class="language-feel">round half down (5.5, 0)
|
|
652
|
+
// 5
|
|
653
|
+
|
|
654
|
+
round half down (-5.5, 0)
|
|
655
|
+
// -5
|
|
656
|
+
|
|
657
|
+
round half down (1.121, 2)
|
|
658
|
+
// 1.12
|
|
659
|
+
|
|
660
|
+
round half down (-1.126, 2)
|
|
661
|
+
// -1.13
|
|
662
|
+
</code></pre>
|
|
663
|
+
`},{name:`abs`,type:`function`,params:[{name:`number`}],info:`<p>Returns the absolute value of the given numeric value.</p>
|
|
664
|
+
<p><strong>Function signature</strong></p>
|
|
665
|
+
<pre><code class="language-feel">abs(number: number): number
|
|
666
|
+
</code></pre>
|
|
667
|
+
<p><strong>Examples</strong></p>
|
|
668
|
+
<pre><code class="language-feel">abs(10)
|
|
669
|
+
// 10
|
|
670
|
+
|
|
671
|
+
abs(-10)
|
|
672
|
+
// 10
|
|
673
|
+
</code></pre>
|
|
674
|
+
`},{name:`modulo`,type:`function`,params:[{name:`dividend`},{name:`divisor`}],info:`<p>Returns the remainder of the division of dividend by divisor.</p>
|
|
675
|
+
<p><strong>Function signature</strong></p>
|
|
676
|
+
<pre><code class="language-feel">modulo(dividend: number, divisor: number): number
|
|
677
|
+
</code></pre>
|
|
678
|
+
<p><strong>Examples</strong></p>
|
|
679
|
+
<pre><code class="language-feel">modulo(12, 5)
|
|
680
|
+
// 2
|
|
681
|
+
</code></pre>
|
|
682
|
+
`},{name:`sqrt`,type:`function`,params:[{name:`number`}],info:`<p>Returns the square root of the given value.</p>
|
|
683
|
+
<p><strong>Function signature</strong></p>
|
|
684
|
+
<pre><code class="language-feel">sqrt(number: number): number
|
|
685
|
+
</code></pre>
|
|
686
|
+
<p><strong>Examples</strong></p>
|
|
687
|
+
<pre><code class="language-feel">sqrt(16)
|
|
688
|
+
// 4
|
|
689
|
+
</code></pre>
|
|
690
|
+
`},{name:`log`,type:`function`,params:[{name:`number`}],info:`<p>Returns the natural logarithm (base e) of the given value.</p>
|
|
691
|
+
<p><strong>Function signature</strong></p>
|
|
692
|
+
<pre><code class="language-feel">log(number: number): number
|
|
693
|
+
</code></pre>
|
|
694
|
+
<p><strong>Examples</strong></p>
|
|
695
|
+
<pre><code class="language-feel">log(10)
|
|
696
|
+
// 2.302585092994046
|
|
697
|
+
</code></pre>
|
|
698
|
+
`},{name:`exp`,type:`function`,params:[{name:`number`}],info:`<p>Returns the Euler’s number e raised to the power of the given number .</p>
|
|
699
|
+
<p><strong>Function signature</strong></p>
|
|
700
|
+
<pre><code class="language-feel">exp(number: number): number
|
|
701
|
+
</code></pre>
|
|
702
|
+
<p><strong>Examples</strong></p>
|
|
703
|
+
<pre><code class="language-feel">exp(5)
|
|
704
|
+
// 148.4131591025766
|
|
705
|
+
</code></pre>
|
|
706
|
+
`},{name:`odd`,type:`function`,params:[{name:`number`}],info:`<p>Returns <code>true</code> if the given value is odd. Otherwise, returns <code>false</code>.</p>
|
|
707
|
+
<p><strong>Function signature</strong></p>
|
|
708
|
+
<pre><code class="language-feel">odd(number: number): boolean
|
|
709
|
+
</code></pre>
|
|
710
|
+
<p><strong>Examples</strong></p>
|
|
711
|
+
<pre><code class="language-feel">odd(5)
|
|
712
|
+
// true
|
|
713
|
+
|
|
714
|
+
odd(2)
|
|
715
|
+
// false
|
|
716
|
+
</code></pre>
|
|
717
|
+
`},{name:`even`,type:`function`,params:[{name:`number`}],info:`<p>Returns <code>true</code> if the given is even. Otherwise, returns <code>false</code>.</p>
|
|
718
|
+
<p><strong>Function signature</strong></p>
|
|
719
|
+
<pre><code class="language-feel">even(number: number): boolean
|
|
720
|
+
</code></pre>
|
|
721
|
+
<p><strong>Examples</strong></p>
|
|
722
|
+
<pre><code class="language-feel">even(5)
|
|
723
|
+
// false
|
|
724
|
+
|
|
725
|
+
even(2)
|
|
726
|
+
// true
|
|
727
|
+
</code></pre>
|
|
728
|
+
`},{name:`before`,type:`function`,params:[{name:`point1`},{name:`point2`}],info:`<p><strong>Function signature</strong></p>
|
|
729
|
+
<pre><code class="language-feel">before(point1: Any, point2: Any): boolean
|
|
730
|
+
</code></pre>
|
|
731
|
+
<p><strong>Examples</strong></p>
|
|
732
|
+
<pre><code class="language-feel">before(1, 10)
|
|
733
|
+
// true
|
|
734
|
+
|
|
735
|
+
before(10, 1)
|
|
736
|
+
// false
|
|
737
|
+
</code></pre>
|
|
738
|
+
`},{name:`before`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
|
|
739
|
+
<pre><code class="language-feel">before(range: range, point: Any): boolean
|
|
740
|
+
</code></pre>
|
|
741
|
+
<p><strong>Examples</strong></p>
|
|
742
|
+
<pre><code class="language-feel">before([1..5], 10)
|
|
743
|
+
// true
|
|
744
|
+
</code></pre>
|
|
745
|
+
`},{name:`before`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
|
|
746
|
+
<pre><code class="language-feel">before(point: Any, range: range): boolean
|
|
747
|
+
</code></pre>
|
|
748
|
+
<p><strong>Examples</strong></p>
|
|
749
|
+
<pre><code class="language-feel">before(1, [2..5])
|
|
750
|
+
// true
|
|
751
|
+
</code></pre>
|
|
752
|
+
`},{name:`before`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
753
|
+
<pre><code class="language-feel">before(range1: range, range2: range): boolean
|
|
754
|
+
</code></pre>
|
|
755
|
+
<p><strong>Examples</strong></p>
|
|
756
|
+
<pre><code class="language-feel">before([1..5], [6..10])
|
|
757
|
+
// true
|
|
758
|
+
|
|
759
|
+
before([1..5),[5..10])
|
|
760
|
+
// true
|
|
761
|
+
</code></pre>
|
|
762
|
+
`},{name:`after`,type:`function`,params:[{name:`point1`},{name:`point2`}],info:`<p><strong>Function signature</strong></p>
|
|
763
|
+
<pre><code class="language-feel">after(point1: Any, point2: Any): boolean
|
|
764
|
+
</code></pre>
|
|
765
|
+
<p><strong>Examples</strong></p>
|
|
766
|
+
<pre><code class="language-feel">after(10, 1)
|
|
767
|
+
// true
|
|
768
|
+
|
|
769
|
+
after(1, 10)
|
|
770
|
+
// false
|
|
771
|
+
</code></pre>
|
|
772
|
+
`},{name:`after`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
|
|
773
|
+
<pre><code class="language-feel">after(range: range, point: Any): boolean
|
|
774
|
+
</code></pre>
|
|
775
|
+
<p><strong>Examples</strong></p>
|
|
776
|
+
<pre><code class="language-feel">after([1..5], 10)
|
|
777
|
+
// false
|
|
778
|
+
</code></pre>
|
|
779
|
+
`},{name:`after`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
|
|
780
|
+
<pre><code class="language-feel">after(point: Any, range: range): boolean
|
|
781
|
+
</code></pre>
|
|
782
|
+
<p><strong>Examples</strong></p>
|
|
783
|
+
<pre><code class="language-feel">after(12, [2..5])
|
|
784
|
+
// true
|
|
785
|
+
</code></pre>
|
|
786
|
+
`},{name:`after`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
787
|
+
<pre><code class="language-feel">after(range1: range, range2: range): boolean
|
|
788
|
+
</code></pre>
|
|
789
|
+
<p><strong>Examples</strong></p>
|
|
790
|
+
<pre><code class="language-feel">after([6..10], [1..5])
|
|
791
|
+
// true
|
|
792
|
+
|
|
793
|
+
after([5..10], [1..5))
|
|
794
|
+
// true
|
|
795
|
+
</code></pre>
|
|
796
|
+
`},{name:`meets`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
797
|
+
<pre><code class="language-feel">meets(range1: range, range2: range): boolean
|
|
798
|
+
</code></pre>
|
|
799
|
+
<p><strong>Examples</strong></p>
|
|
800
|
+
<pre><code class="language-feel">meets([1..5], [5..10])
|
|
801
|
+
// true
|
|
802
|
+
|
|
803
|
+
meets([1..3], [4..6])
|
|
804
|
+
// false
|
|
805
|
+
|
|
806
|
+
meets([1..3], [3..5])
|
|
807
|
+
// true
|
|
808
|
+
|
|
809
|
+
meets([1..5], (5..8])
|
|
810
|
+
// false
|
|
811
|
+
</code></pre>
|
|
812
|
+
`},{name:`met by`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
813
|
+
<pre><code class="language-feel">met by(range1: range, range2: range): boolean
|
|
814
|
+
</code></pre>
|
|
815
|
+
<p><strong>Examples</strong></p>
|
|
816
|
+
<pre><code class="language-feel">met by([5..10], [1..5])
|
|
817
|
+
// true
|
|
818
|
+
|
|
819
|
+
met by([3..4], [1..2])
|
|
820
|
+
// false
|
|
821
|
+
|
|
822
|
+
met by([3..5], [1..3])
|
|
823
|
+
// true
|
|
824
|
+
|
|
825
|
+
met by((5..8], [1..5))
|
|
826
|
+
// false
|
|
827
|
+
|
|
828
|
+
met by([5..10], [1..5))
|
|
829
|
+
// false
|
|
830
|
+
</code></pre>
|
|
831
|
+
`},{name:`overlaps`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
832
|
+
<pre><code class="language-feel">overlaps(range1: range, range2: range): boolean
|
|
833
|
+
</code></pre>
|
|
834
|
+
<p><strong>Examples</strong></p>
|
|
835
|
+
<pre><code class="language-feel">overlaps([5..10], [1..6])
|
|
836
|
+
// true
|
|
837
|
+
|
|
838
|
+
overlaps((3..7], [1..4])
|
|
839
|
+
// true
|
|
840
|
+
|
|
841
|
+
overlaps([1..3], (3..6])
|
|
842
|
+
// false
|
|
843
|
+
|
|
844
|
+
overlaps((5..8], [1..5))
|
|
845
|
+
// false
|
|
846
|
+
|
|
847
|
+
overlaps([4..10], [1..5))
|
|
848
|
+
// true
|
|
849
|
+
</code></pre>
|
|
850
|
+
`},{name:`overlaps before`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
851
|
+
<pre><code class="language-feel">overlaps before(range1: range, range2: range): boolean
|
|
852
|
+
</code></pre>
|
|
853
|
+
<p><strong>Examples</strong></p>
|
|
854
|
+
<pre><code class="language-feel">overlaps before([1..5], [4..10])
|
|
855
|
+
// true
|
|
856
|
+
|
|
857
|
+
overlaps before([3..4], [1..2])
|
|
858
|
+
// false
|
|
859
|
+
|
|
860
|
+
overlaps before([1..3], (3..5])
|
|
861
|
+
// false
|
|
862
|
+
|
|
863
|
+
overlaps before([1..5), (3..8])
|
|
864
|
+
// true
|
|
865
|
+
|
|
866
|
+
overlaps before([1..5), [5..10])
|
|
867
|
+
// false
|
|
868
|
+
</code></pre>
|
|
869
|
+
`},{name:`overlaps after`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
870
|
+
<pre><code class="language-feel">overlaps after(range1: range, range2: range): boolean
|
|
871
|
+
</code></pre>
|
|
872
|
+
<p><strong>Examples</strong></p>
|
|
873
|
+
<pre><code class="language-feel">overlaps after([4..10], [1..5])
|
|
874
|
+
// true
|
|
875
|
+
|
|
876
|
+
overlaps after([3..4], [1..2])
|
|
877
|
+
// false
|
|
878
|
+
|
|
879
|
+
overlaps after([3..5], [1..3))
|
|
880
|
+
// false
|
|
881
|
+
|
|
882
|
+
overlaps after((5..8], [1..5))
|
|
883
|
+
// false
|
|
884
|
+
|
|
885
|
+
overlaps after([4..10], [1..5))
|
|
886
|
+
// true
|
|
887
|
+
</code></pre>
|
|
888
|
+
`},{name:`finishes`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
|
|
889
|
+
<pre><code class="language-feel">finishes(point: Any, range: range): boolean
|
|
890
|
+
</code></pre>
|
|
891
|
+
<p><strong>Examples</strong></p>
|
|
892
|
+
<pre><code class="language-feel">finishes(5, [1..5])
|
|
893
|
+
// true
|
|
894
|
+
|
|
895
|
+
finishes(10, [1..7])
|
|
896
|
+
// false
|
|
897
|
+
</code></pre>
|
|
898
|
+
`},{name:`finishes`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
899
|
+
<pre><code class="language-feel">finishes(range1: range, range2: range): boolean
|
|
900
|
+
</code></pre>
|
|
901
|
+
<p><strong>Examples</strong></p>
|
|
902
|
+
<pre><code class="language-feel">finishes([3..5], [1..5])
|
|
903
|
+
// true
|
|
904
|
+
|
|
905
|
+
finishes((1..5], [1..5))
|
|
906
|
+
// false
|
|
907
|
+
|
|
908
|
+
finishes([5..10], [1..10))
|
|
909
|
+
// false
|
|
910
|
+
</code></pre>
|
|
911
|
+
`},{name:`finished by`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
|
|
912
|
+
<pre><code class="language-feel">finished by(range: range, point: Any): boolean
|
|
913
|
+
</code></pre>
|
|
914
|
+
<p><strong>Examples</strong></p>
|
|
915
|
+
<pre><code class="language-feel">finished by([5..10], 10)
|
|
916
|
+
// true
|
|
917
|
+
|
|
918
|
+
finished by([3..4], 2)
|
|
919
|
+
// false
|
|
920
|
+
</code></pre>
|
|
921
|
+
`},{name:`finished by`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
922
|
+
<pre><code class="language-feel">finished by(range1: range, range2: range): boolean
|
|
923
|
+
</code></pre>
|
|
924
|
+
<p><strong>Examples</strong></p>
|
|
925
|
+
<pre><code class="language-feel">finished by([1..5], [3..5])
|
|
926
|
+
// true
|
|
927
|
+
|
|
928
|
+
finished by((5..8], [1..5))
|
|
929
|
+
// false
|
|
930
|
+
|
|
931
|
+
finished by([5..10], (1..10))
|
|
932
|
+
// false
|
|
933
|
+
</code></pre>
|
|
934
|
+
`},{name:`includes`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
|
|
935
|
+
<pre><code class="language-feel">includes(range: range, point: Any): boolean
|
|
936
|
+
</code></pre>
|
|
937
|
+
<p><strong>Examples</strong></p>
|
|
938
|
+
<pre><code class="language-feel">includes([5..10], 6)
|
|
939
|
+
// true
|
|
940
|
+
|
|
941
|
+
includes([3..4], 5)
|
|
942
|
+
// false
|
|
943
|
+
</code></pre>
|
|
944
|
+
`},{name:`includes`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
945
|
+
<pre><code class="language-feel">includes(range1: range, range2: range): boolean
|
|
946
|
+
</code></pre>
|
|
947
|
+
<p><strong>Examples</strong></p>
|
|
948
|
+
<pre><code class="language-feel">includes([1..10], [4..6])
|
|
949
|
+
// true
|
|
950
|
+
|
|
951
|
+
includes((5..8], [1..5))
|
|
952
|
+
// false
|
|
953
|
+
|
|
954
|
+
includes([1..10], [1..5))
|
|
955
|
+
// true
|
|
956
|
+
</code></pre>
|
|
957
|
+
`},{name:`during`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
|
|
958
|
+
<pre><code class="language-feel">during(point: Any, range: range): boolean
|
|
959
|
+
</code></pre>
|
|
960
|
+
<p><strong>Examples</strong></p>
|
|
961
|
+
<pre><code class="language-feel">during(5, [1..10])
|
|
962
|
+
// true
|
|
963
|
+
|
|
964
|
+
during(12, [1..10])
|
|
965
|
+
// false
|
|
966
|
+
|
|
967
|
+
during(1, (1..10])
|
|
968
|
+
// false
|
|
969
|
+
</code></pre>
|
|
970
|
+
`},{name:`during`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
971
|
+
<pre><code class="language-feel">during(range1: range, range2: range): boolean
|
|
972
|
+
</code></pre>
|
|
973
|
+
<p><strong>Examples</strong></p>
|
|
974
|
+
<pre><code class="language-feel">during([4..6], [1..10))
|
|
975
|
+
// true
|
|
976
|
+
|
|
977
|
+
during((1..5], (1..10])
|
|
978
|
+
// true
|
|
979
|
+
</code></pre>
|
|
980
|
+
`},{name:`starts`,type:`function`,params:[{name:`point`},{name:`range`}],info:`<p><strong>Function signature</strong></p>
|
|
981
|
+
<pre><code class="language-feel">starts(point: Any, range: range): boolean
|
|
982
|
+
</code></pre>
|
|
983
|
+
<p><strong>Examples</strong></p>
|
|
984
|
+
<pre><code class="language-feel">starts(1, [1..5])
|
|
985
|
+
// true
|
|
986
|
+
|
|
987
|
+
starts(1, (1..8])
|
|
988
|
+
// false
|
|
989
|
+
</code></pre>
|
|
990
|
+
`},{name:`starts`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
991
|
+
<pre><code class="language-feel">starts(range1: range, range2: range): boolean
|
|
992
|
+
</code></pre>
|
|
993
|
+
<p><strong>Examples</strong></p>
|
|
994
|
+
<pre><code class="language-feel">starts((1..5], [1..5])
|
|
995
|
+
// false
|
|
996
|
+
|
|
997
|
+
starts([1..10], [1..5])
|
|
998
|
+
// false
|
|
999
|
+
|
|
1000
|
+
starts((1..5), (1..10))
|
|
1001
|
+
// true
|
|
1002
|
+
</code></pre>
|
|
1003
|
+
`},{name:`started by`,type:`function`,params:[{name:`range`},{name:`point`}],info:`<p><strong>Function signature</strong></p>
|
|
1004
|
+
<pre><code class="language-feel">started by(range: range, point: Any): boolean
|
|
1005
|
+
</code></pre>
|
|
1006
|
+
<p><strong>Examples</strong></p>
|
|
1007
|
+
<pre><code class="language-feel">started by([1..10], 1)
|
|
1008
|
+
// true
|
|
1009
|
+
|
|
1010
|
+
started by((1..10], 1)
|
|
1011
|
+
// false
|
|
1012
|
+
</code></pre>
|
|
1013
|
+
`},{name:`started by`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
1014
|
+
<pre><code class="language-feel">started by(range1: range, range2: range): boolean
|
|
1015
|
+
</code></pre>
|
|
1016
|
+
<p><strong>Examples</strong></p>
|
|
1017
|
+
<pre><code class="language-feel">started by([1..10], [1..5])
|
|
1018
|
+
// true
|
|
1019
|
+
|
|
1020
|
+
started by((1..10], [1..5))
|
|
1021
|
+
// false
|
|
1022
|
+
|
|
1023
|
+
started by([1..10], [1..10))
|
|
1024
|
+
// true
|
|
1025
|
+
</code></pre>
|
|
1026
|
+
`},{name:`coincides`,type:`function`,params:[{name:`point1`},{name:`point2`}],info:`<p><strong>Function signature</strong></p>
|
|
1027
|
+
<pre><code class="language-feel">coincides(point1: Any, point2: Any): boolean
|
|
1028
|
+
</code></pre>
|
|
1029
|
+
<p><strong>Examples</strong></p>
|
|
1030
|
+
<pre><code class="language-feel">coincides(5, 5)
|
|
1031
|
+
// true
|
|
1032
|
+
|
|
1033
|
+
coincides(3, 4)
|
|
1034
|
+
// false
|
|
1035
|
+
</code></pre>
|
|
1036
|
+
`},{name:`coincides`,type:`function`,params:[{name:`range1`},{name:`range2`}],info:`<p><strong>Function signature</strong></p>
|
|
1037
|
+
<pre><code class="language-feel">coincides(range1: range, range2: range): boolean
|
|
1038
|
+
</code></pre>
|
|
1039
|
+
<p><strong>Examples</strong></p>
|
|
1040
|
+
<pre><code class="language-feel">coincides([1..5], [1..5])
|
|
1041
|
+
// true
|
|
1042
|
+
|
|
1043
|
+
coincides((1..5], [1..5))
|
|
1044
|
+
// false
|
|
1045
|
+
|
|
1046
|
+
coincides([1..5], [2..6])
|
|
1047
|
+
// false
|
|
1048
|
+
</code></pre>
|
|
1049
|
+
`},{name:`substring`,type:`function`,params:[{name:`string`},{name:`start position`}],info:`<p>Returns a substring of the given value starting at <code>start position</code>.</p>
|
|
1050
|
+
<p><strong>Function signature</strong></p>
|
|
1051
|
+
<pre><code class="language-feel">substring(string: string, start position: number): string
|
|
1052
|
+
</code></pre>
|
|
1053
|
+
<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
|
|
1054
|
+
<p><strong>Examples</strong></p>
|
|
1055
|
+
<pre><code class="language-feel">substring("foobar", 3)
|
|
1056
|
+
// "obar"
|
|
1057
|
+
|
|
1058
|
+
substring("foobar", -2)
|
|
1059
|
+
// "ar"
|
|
1060
|
+
</code></pre>
|
|
1061
|
+
`},{name:`substring`,type:`function`,params:[{name:`string`},{name:`start position`},{name:`length`}],info:`<p>Returns a substring of the given value, starting at <code>start position</code> with the given <code>length</code>. If <code>length</code> is greater than
|
|
1062
|
+
the remaining characters of the value, it returns all characters from <code>start position</code> until the end.</p>
|
|
1063
|
+
<p><strong>Function signature</strong></p>
|
|
1064
|
+
<pre><code class="language-feel">substring(string: string, start position: number, length: number): string
|
|
1065
|
+
</code></pre>
|
|
1066
|
+
<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>
|
|
1067
|
+
<p><strong>Examples</strong></p>
|
|
1068
|
+
<pre><code class="language-feel">substring("foobar", 3, 3)
|
|
1069
|
+
// "oba"
|
|
1070
|
+
|
|
1071
|
+
substring("foobar", -3, 2)
|
|
1072
|
+
// "ba"
|
|
1073
|
+
|
|
1074
|
+
substring("foobar", 3, 10)
|
|
1075
|
+
// "obar"
|
|
1076
|
+
</code></pre>
|
|
1077
|
+
`},{name:`string length`,type:`function`,params:[{name:`string`}],info:`<p>Returns the number of characters in the given value.</p>
|
|
1078
|
+
<p><strong>Function signature</strong></p>
|
|
1079
|
+
<pre><code class="language-feel">string length(string: string): number
|
|
1080
|
+
</code></pre>
|
|
1081
|
+
<p><strong>Examples</strong></p>
|
|
1082
|
+
<pre><code class="language-feel">string length("foo")
|
|
1083
|
+
// 3
|
|
1084
|
+
</code></pre>
|
|
1085
|
+
`},{name:`upper case`,type:`function`,params:[{name:`string`}],info:`<p>Returns the given value with all characters are uppercase.</p>
|
|
1086
|
+
<p><strong>Function signature</strong></p>
|
|
1087
|
+
<pre><code class="language-feel">upper case(string: string): string
|
|
1088
|
+
</code></pre>
|
|
1089
|
+
<p><strong>Examples</strong></p>
|
|
1090
|
+
<pre><code class="language-feel">upper case("aBc4")
|
|
1091
|
+
// "ABC4"
|
|
1092
|
+
</code></pre>
|
|
1093
|
+
`},{name:`lower case`,type:`function`,params:[{name:`string`}],info:`<p>Returns the given value with all characters are lowercase.</p>
|
|
1094
|
+
<p><strong>Function signature</strong></p>
|
|
1095
|
+
<pre><code class="language-feel">lower case(string: string): string
|
|
1096
|
+
</code></pre>
|
|
1097
|
+
<p><strong>Examples</strong></p>
|
|
1098
|
+
<pre><code class="language-feel">lower case("aBc4")
|
|
1099
|
+
// "abc4"
|
|
1100
|
+
</code></pre>
|
|
1101
|
+
`},{name:`substring before`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns a substring of the given value that contains all characters before <code>match</code>.</p>
|
|
1102
|
+
<p><strong>Function signature</strong></p>
|
|
1103
|
+
<pre><code class="language-feel">substring before(string: string, match: string): string
|
|
1104
|
+
</code></pre>
|
|
1105
|
+
<p><strong>Examples</strong></p>
|
|
1106
|
+
<pre><code class="language-feel">substring before("foobar", "bar")
|
|
1107
|
+
// "foo"
|
|
1108
|
+
</code></pre>
|
|
1109
|
+
`},{name:`substring after`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns a substring of the given value that contains all characters after <code>match</code>.</p>
|
|
1110
|
+
<p><strong>Function signature</strong></p>
|
|
1111
|
+
<pre><code class="language-feel">substring after(string: string, match: string): string
|
|
1112
|
+
</code></pre>
|
|
1113
|
+
<p><strong>Examples</strong></p>
|
|
1114
|
+
<pre><code class="language-feel">substring after("foobar", "ob")
|
|
1115
|
+
// "ar"
|
|
1116
|
+
</code></pre>
|
|
1117
|
+
`},{name:`contains`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns <code>true</code> if the given value contains the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>
|
|
1118
|
+
<p><strong>Function signature</strong></p>
|
|
1119
|
+
<pre><code class="language-feel">contains(string: string, match: string): boolean
|
|
1120
|
+
</code></pre>
|
|
1121
|
+
<p><strong>Examples</strong></p>
|
|
1122
|
+
<pre><code class="language-feel">contains("foobar", "of")
|
|
1123
|
+
// false
|
|
1124
|
+
</code></pre>
|
|
1125
|
+
`},{name:`starts with`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns <code>true</code> if the given value starts with the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>
|
|
1126
|
+
<p><strong>Function signature</strong></p>
|
|
1127
|
+
<pre><code class="language-feel">starts with(string: string, match: string): boolean
|
|
1128
|
+
</code></pre>
|
|
1129
|
+
<p><strong>Examples</strong></p>
|
|
1130
|
+
<pre><code class="language-feel">starts with("foobar", "fo")
|
|
1131
|
+
// true
|
|
1132
|
+
</code></pre>
|
|
1133
|
+
`},{name:`ends with`,type:`function`,params:[{name:`string`},{name:`match`}],info:`<p>Returns <code>true</code> if the given value ends with the substring <code>match</code>. Otherwise, returns <code>false</code>.</p>
|
|
1134
|
+
<p><strong>Function signature</strong></p>
|
|
1135
|
+
<pre><code class="language-feel">ends with(string: string, match: string): boolean
|
|
1136
|
+
</code></pre>
|
|
1137
|
+
<p><strong>Examples</strong></p>
|
|
1138
|
+
<pre><code class="language-feel">ends with("foobar", "r")
|
|
1139
|
+
// true
|
|
1140
|
+
</code></pre>
|
|
1141
|
+
`},{name:`matches`,type:`function`,params:[{name:`input`},{name:`pattern`}],info:`<p>Returns <code>true</code> if the given value matches the <code>pattern</code>. Otherwise, returns <code>false</code>.</p>
|
|
1142
|
+
<p><strong>Function signature</strong></p>
|
|
1143
|
+
<pre><code class="language-feel">matches(input: string, pattern: string): boolean
|
|
1144
|
+
</code></pre>
|
|
1145
|
+
<p>The <code>pattern</code> is a string that contains a regular expression.</p>
|
|
1146
|
+
<p><strong>Examples</strong></p>
|
|
1147
|
+
<pre><code class="language-feel">matches("foobar", "^fo*bar")
|
|
1148
|
+
// true
|
|
1149
|
+
</code></pre>
|
|
1150
|
+
`},{name:`matches`,type:`function`,params:[{name:`input`},{name:`pattern`},{name:`flags`}],info:`<p>Returns <code>true</code> if the given value matches the <code>pattern</code>. Otherwise, returns <code>false</code>.</p>
|
|
1151
|
+
<p><strong>Function signature</strong></p>
|
|
1152
|
+
<pre><code class="language-feel">matches(input: string, pattern: string, flags: string): boolean
|
|
1153
|
+
</code></pre>
|
|
1154
|
+
<p>The <code>pattern</code> is a string that contains a regular expression.</p>
|
|
1155
|
+
<p>The <code>flags</code> can contain one or more of the following characters:</p>
|
|
1156
|
+
<ul>
|
|
1157
|
+
<li><code>s</code> (dot-all)</li>
|
|
1158
|
+
<li><code>m</code> (multi-line)</li>
|
|
1159
|
+
<li><code>i</code> (case insensitive)</li>
|
|
1160
|
+
<li><code>x</code> (comments)</li>
|
|
1161
|
+
</ul>
|
|
1162
|
+
<p><strong>Examples</strong></p>
|
|
1163
|
+
<pre><code class="language-feel">matches("FooBar", "foo", "i")
|
|
1164
|
+
// true
|
|
1165
|
+
</code></pre>
|
|
1166
|
+
`},{name:`replace`,type:`function`,params:[{name:`input`},{name:`pattern`},{name:`replacement`}],info:`<p>Returns the resulting string after replacing all occurrences of <code>pattern</code> with <code>replacement</code>.</p>
|
|
1167
|
+
<p><strong>Function signature</strong></p>
|
|
1168
|
+
<pre><code class="language-feel">replace(input: string, pattern: string, replacement: string): string
|
|
1169
|
+
</code></pre>
|
|
1170
|
+
<p>The <code>pattern</code> is a string that contains a regular expression.</p>
|
|
1171
|
+
<p>The <code>replacement</code> can access the match groups by using <code>$</code> and the number of the group, for example,
|
|
1172
|
+
<code>$1</code> to access the first group.</p>
|
|
1173
|
+
<p><strong>Examples</strong></p>
|
|
1174
|
+
<pre><code class="language-feel">replace("abcd", "(ab)|(a)", "[1=$1][2=$2]")
|
|
1175
|
+
// "[1=ab][2=]cd"
|
|
1176
|
+
|
|
1177
|
+
replace("0123456789", "(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3")
|
|
1178
|
+
// "(012) 345-6789"
|
|
1179
|
+
</code></pre>
|
|
1180
|
+
`},{name:`replace`,type:`function`,params:[{name:`input`},{name:`pattern`},{name:`replacement`},{name:`flags`}],info:`<p>Returns the resulting string after replacing all occurrences of <code>pattern</code> with <code>replacement</code>.</p>
|
|
1181
|
+
<p><strong>Function signature</strong></p>
|
|
1182
|
+
<pre><code class="language-feel">replace(input: string, pattern: string, replacement: string, flags: string): string
|
|
1183
|
+
</code></pre>
|
|
1184
|
+
<p>The <code>pattern</code> is a string that contains a regular expression.</p>
|
|
1185
|
+
<p>The <code>replacement</code> can access the match groups by using <code>$</code> and the number of the group, for example,
|
|
1186
|
+
<code>$1</code> to access the first group.</p>
|
|
1187
|
+
<p>The <code>flags</code> can contain one or more of the following characters:</p>
|
|
1188
|
+
<ul>
|
|
1189
|
+
<li><code>s</code> (dot-all)</li>
|
|
1190
|
+
<li><code>m</code> (multi-line)</li>
|
|
1191
|
+
<li><code>i</code> (case insensitive)</li>
|
|
1192
|
+
<li><code>x</code> (comments)</li>
|
|
1193
|
+
</ul>
|
|
1194
|
+
<p><strong>Examples</strong></p>
|
|
1195
|
+
<pre><code class="language-feel">replace("How do you feel?", "Feel", "FEEL", "i")
|
|
1196
|
+
// "How do you FEEL?"
|
|
1197
|
+
</code></pre>
|
|
1198
|
+
`},{name:`split`,type:`function`,params:[{name:`string`},{name:`delimiter`}],info:`<p>Splits the given value into a list of substrings, breaking at each occurrence of the <code>delimiter</code> pattern.</p>
|
|
1199
|
+
<p><strong>Function signature</strong></p>
|
|
1200
|
+
<pre><code class="language-feel">split(string: string, delimiter: string): list<string>
|
|
1201
|
+
</code></pre>
|
|
1202
|
+
<p>The <code>delimiter</code> is a string that contains a regular expression.</p>
|
|
1203
|
+
<p><strong>Examples</strong></p>
|
|
1204
|
+
<pre><code class="language-feel">split("John Doe", "\\s" )
|
|
1205
|
+
// ["John", "Doe"]
|
|
1206
|
+
|
|
1207
|
+
split("a;b;c;;", ";")
|
|
1208
|
+
// ["a", "b", "c", "", ""]
|
|
1209
|
+
</code></pre>
|
|
1210
|
+
`},{name:`now`,type:`function`,params:[],info:`<p>Returns the current date and time including the timezone.</p>
|
|
1211
|
+
<p><strong>Function signature</strong></p>
|
|
1212
|
+
<pre><code class="language-feel">now(): date and time
|
|
1213
|
+
</code></pre>
|
|
1214
|
+
<p><strong>Examples</strong></p>
|
|
1215
|
+
<pre><code class="language-feel">now()
|
|
1216
|
+
// date and time("2020-07-31T14:27:30@Europe/Berlin")
|
|
1217
|
+
</code></pre>
|
|
1218
|
+
`},{name:`today`,type:`function`,params:[],info:`<p>Returns the current date.</p>
|
|
1219
|
+
<p><strong>Function signature</strong></p>
|
|
1220
|
+
<pre><code class="language-feel">today(): date
|
|
1221
|
+
</code></pre>
|
|
1222
|
+
<p><strong>Examples</strong></p>
|
|
1223
|
+
<pre><code class="language-feel">today()
|
|
1224
|
+
// date("2020-07-31")
|
|
1225
|
+
</code></pre>
|
|
1226
|
+
`},{name:`day of week`,type:`function`,params:[{name:`date`}],info:`<p>Returns the day of the week according to the Gregorian calendar. Note that it always returns the English name of the day.</p>
|
|
1227
|
+
<p><strong>Function signature</strong></p>
|
|
1228
|
+
<pre><code class="language-feel">day of week(date: date): string
|
|
1229
|
+
</code></pre>
|
|
1230
|
+
<pre><code class="language-feel">day of week(date: date and time): string
|
|
1231
|
+
</code></pre>
|
|
1232
|
+
<p><strong>Examples</strong></p>
|
|
1233
|
+
<pre><code class="language-feel">day of week(date("2019-09-17"))
|
|
1234
|
+
// "Tuesday"
|
|
1235
|
+
|
|
1236
|
+
day of week(date and time("2019-09-17T12:00:00"))
|
|
1237
|
+
// "Tuesday"
|
|
1238
|
+
</code></pre>
|
|
1239
|
+
`},{name:`day of year`,type:`function`,params:[{name:`date`}],info:`<p>Returns the Gregorian number of the day within the year.</p>
|
|
1240
|
+
<p><strong>Function signature</strong></p>
|
|
1241
|
+
<pre><code class="language-feel">day of year(date: date): number
|
|
1242
|
+
</code></pre>
|
|
1243
|
+
<pre><code class="language-feel">day of year(date: date and time): number
|
|
1244
|
+
</code></pre>
|
|
1245
|
+
<p><strong>Examples</strong></p>
|
|
1246
|
+
<pre><code class="language-feel">day of year(date("2019-09-17"))
|
|
1247
|
+
// 260
|
|
1248
|
+
|
|
1249
|
+
day of year(date and time("2019-09-17T12:00:00"))
|
|
1250
|
+
// 260
|
|
1251
|
+
</code></pre>
|
|
1252
|
+
`},{name:`week of year`,type:`function`,params:[{name:`date`}],info:`<p>Returns the Gregorian number of the week within the year, according to ISO 8601.</p>
|
|
1253
|
+
<p><strong>Function signature</strong></p>
|
|
1254
|
+
<pre><code class="language-feel">week of year(date: date): number
|
|
1255
|
+
</code></pre>
|
|
1256
|
+
<pre><code class="language-feel">week of year(date: date and time): number
|
|
1257
|
+
</code></pre>
|
|
1258
|
+
<p><strong>Examples</strong></p>
|
|
1259
|
+
<pre><code class="language-feel">week of year(date("2019-09-17"))
|
|
1260
|
+
// 38
|
|
1261
|
+
|
|
1262
|
+
week of year(date and time("2019-09-17T12:00:00"))
|
|
1263
|
+
// 38
|
|
1264
|
+
</code></pre>
|
|
1265
|
+
`},{name:`month of year`,type:`function`,params:[{name:`date`}],info:`<p>Returns the month of the year according to the Gregorian calendar. Note that it always returns the English name of the month.</p>
|
|
1266
|
+
<p><strong>Function signature</strong></p>
|
|
1267
|
+
<pre><code class="language-feel">month of year(date: date): string
|
|
1268
|
+
</code></pre>
|
|
1269
|
+
<pre><code class="language-feel">month of year(date: date and time): string
|
|
1270
|
+
</code></pre>
|
|
1271
|
+
<p><strong>Examples</strong></p>
|
|
1272
|
+
<pre><code class="language-feel">month of year(date("2019-09-17"))
|
|
1273
|
+
// "September"
|
|
1274
|
+
|
|
1275
|
+
month of year(date and time("2019-09-17T12:00:00"))
|
|
1276
|
+
// "September"
|
|
1277
|
+
</code></pre>
|
|
1278
|
+
`},{name:`abs`,type:`function`,params:[{name:`n`}],info:`<p>Returns the absolute value of a given duration.</p>
|
|
1279
|
+
<p><strong>Function signature</strong></p>
|
|
1280
|
+
<pre><code class="language-feel">abs(n: days and time duration): days and time duration
|
|
1281
|
+
</code></pre>
|
|
1282
|
+
<pre><code class="language-feel">abs(n: years and months duration): years and months duration
|
|
1283
|
+
</code></pre>
|
|
1284
|
+
<p><strong>Examples</strong></p>
|
|
1285
|
+
<pre><code class="language-feel">abs(duration("-PT5H"))
|
|
1286
|
+
// "duration("PT5H")"
|
|
1287
|
+
|
|
1288
|
+
abs(duration("PT5H"))
|
|
1289
|
+
// "duration("PT5H")"
|
|
1290
|
+
|
|
1291
|
+
abs(duration("-P2M"))
|
|
1292
|
+
// duration("P2M")
|
|
1293
|
+
</code></pre>
|
|
1294
|
+
`}],Hi=[{name:`fromAi`,type:`function`,params:[{name:`value`}],info:`<p><em>Camunda Extension</em></p>
|
|
1295
|
+
<p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.<parameterName></code> (for example, <code>toolCall.userId</code>).</p>
|
|
1296
|
+
<ul>
|
|
1297
|
+
<li>The purpose of this function is solely to tag the value as being generated by an AI integration.</li>
|
|
1298
|
+
<li>The actual handling is not performed by the FEEL engine, but by a custom integration such as a connector or a job worker.</li>
|
|
1299
|
+
</ul>
|
|
1300
|
+
<p>The main use case of this function is for <a href="https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent-tool-definitions">tool definitions</a> used by the <a href="https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent">AI Agent connector</a>.</p>
|
|
1301
|
+
<p>See the following function overloads for additional function parameters.</p>
|
|
1302
|
+
<p><strong>Function signature</strong></p>
|
|
1303
|
+
<pre><code class="language-feel">fromAi(value: Any): Any
|
|
1304
|
+
</code></pre>
|
|
1305
|
+
<p><strong>Examples</strong></p>
|
|
1306
|
+
<pre><code class="language-feel">fromAi(toolCall.searchQuery)
|
|
1307
|
+
// toolCall.searchQuery contents
|
|
1308
|
+
|
|
1309
|
+
fromAi(toolCall.userId)
|
|
1310
|
+
// toolCall.userId contents
|
|
1311
|
+
</code></pre>
|
|
1312
|
+
`,engines:{camunda:`>=8.8`}},{name:`fromAi`,type:`function`,params:[{name:`value`},{name:`description`}],info:`<p><em>Camunda Extension</em></p>
|
|
1313
|
+
<p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.<parameterName></code> (for example, <code>toolCall.userId</code>).</p>
|
|
1314
|
+
<p>In addition to the previous overload, it also accepts an optional <code>description</code> parameter to provide a textual description of the value. The description must be <code>null</code> or a string constant.</p>
|
|
1315
|
+
<p><strong>Function signature</strong></p>
|
|
1316
|
+
<pre><code class="language-feel">fromAi(value: Any, description: string): Any
|
|
1317
|
+
</code></pre>
|
|
1318
|
+
<p><strong>Examples</strong></p>
|
|
1319
|
+
<pre><code class="language-feel">fromAi(toolCall.searchQuery, "The search query used to find the best match.")
|
|
1320
|
+
// toolCall.searchQuery contents
|
|
1321
|
+
|
|
1322
|
+
fromAi(toolCall.searchQuery, null)
|
|
1323
|
+
// toolCall.searchQuery contents
|
|
1324
|
+
</code></pre>
|
|
1325
|
+
`,engines:{camunda:`>=8.8`}},{name:`fromAi`,type:`function`,params:[{name:`value`},{name:`description`},{name:`type`}],info:`<p><em>Camunda Extension</em></p>
|
|
1326
|
+
<p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.<parameterName></code> (for example, <code>toolCall.userId</code>).</p>
|
|
1327
|
+
<p>In addition to the previous overload, it also accepts an optional <code>type</code> parameter to provide type information about the value. The type must be <code>null</code> or a string constant.</p>
|
|
1328
|
+
<p><strong>Function signature</strong></p>
|
|
1329
|
+
<pre><code class="language-feel">fromAi(value: Any, description: string, type: string): Any
|
|
1330
|
+
</code></pre>
|
|
1331
|
+
<p><strong>Examples</strong></p>
|
|
1332
|
+
<pre><code class="language-feel">fromAi(toolCall.searchQuery, "The search query used to find the best match.", "string")
|
|
1333
|
+
// toolCall.searchQuery contents
|
|
1334
|
+
|
|
1335
|
+
fromAi(toolCall.userId, "The user's ID", "number")
|
|
1336
|
+
// toolCall.userId contents
|
|
1337
|
+
|
|
1338
|
+
fromAi(toolCall.userId, null, "number")
|
|
1339
|
+
// toolCall.userId contents
|
|
1340
|
+
|
|
1341
|
+
fromAi(value: toolCall.userId, type: "number")
|
|
1342
|
+
// toolCall.userId contents
|
|
1343
|
+
</code></pre>
|
|
1344
|
+
`,engines:{camunda:`>=8.8`}},{name:`fromAi`,type:`function`,params:[{name:`value`},{name:`description`},{name:`type`},{name:`schema`}],info:`<p><em>Camunda Extension</em></p>
|
|
1345
|
+
<p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.<parameterName></code> (for example, <code>toolCall.userId</code>).</p>
|
|
1346
|
+
<p>In addition to the previous overload, it also accepts an optional <code>schema</code> parameter to provide a (partial) <a href="https://json-schema.org/">JSON schema</a> for the value.</p>
|
|
1347
|
+
<ul>
|
|
1348
|
+
<li>The schema must be <code>null</code> or a context (map) containing only constant values. For example, function calls within the schema are not supported.</li>
|
|
1349
|
+
<li>The schema is not validated by the FEEL engine but might be by a custom integration consuming the information.</li>
|
|
1350
|
+
<li>From the engine side it is possible to specify both a <code>type</code> and a <code>schema</code>, and it depends on the integration as to which value takes precedence. The <a href="https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent">AI Agent connector</a> will override any type specified in the schema if the <code>type</code> parameter is also provided.</li>
|
|
1351
|
+
</ul>
|
|
1352
|
+
<p><strong>Function signature</strong></p>
|
|
1353
|
+
<pre><code class="language-feel">fromAi(value: Any, description: string, type: string, schema: context): Any
|
|
1354
|
+
</code></pre>
|
|
1355
|
+
<p><strong>Examples</strong></p>
|
|
1356
|
+
<pre><code class="language-feel">fromAi(toolCall.documentType, "The document type to provide", "string", {
|
|
1357
|
+
enum: ["invoice", "receipt", "contract"]
|
|
1358
|
+
})
|
|
1359
|
+
// toolCall.documentType contents
|
|
1360
|
+
|
|
1361
|
+
fromAi(value: toolCall.documentType, description: "The document type to provide", schema: {
|
|
1362
|
+
type: "string",
|
|
1363
|
+
enum: ["invoice", "receipt", "contract"]
|
|
1364
|
+
})
|
|
1365
|
+
// toolCall.documentType contents
|
|
1366
|
+
|
|
1367
|
+
fromAi(toolCall.tags, "Tags to apply to the blog post", "array", {
|
|
1368
|
+
items: {
|
|
1369
|
+
type: "string"
|
|
1370
|
+
}
|
|
1371
|
+
})
|
|
1372
|
+
// toolCall.tags contents
|
|
1373
|
+
</code></pre>
|
|
1374
|
+
`,engines:{camunda:`>=8.8`}},{name:`fromAi`,type:`function`,params:[{name:`value`},{name:`description`},{name:`type`},{name:`schema`},{name:`options`}],info:`<p><em>Camunda Extension</em></p>
|
|
1375
|
+
<p>Returns the unmodified <code>value</code> parameter, which must be a FEEL variable reference in the form <code>toolCall.<parameterName></code> (for example, <code>toolCall.userId</code>).</p>
|
|
1376
|
+
<p>In addition to the previous overload, it also accepts an optional <code>options</code> parameter to provide additional options for the integration handling the value definition.</p>
|
|
1377
|
+
<ul>
|
|
1378
|
+
<li>The options parameter must be <code>null</code> or a context (map) containing only constant values. For example, function calls within options are not supported.</li>
|
|
1379
|
+
</ul>
|
|
1380
|
+
<p><strong>Function signature</strong></p>
|
|
1381
|
+
<pre><code class="language-feel">fromAi(value: Any, description: string, type: string, schema: context, options: context): Any
|
|
1382
|
+
</code></pre>
|
|
1383
|
+
<p><strong>Examples</strong></p>
|
|
1384
|
+
<pre><code class="language-feel">fromAi(toolCall.documentType, "The document type to provide", "string", null, {
|
|
1385
|
+
required: false
|
|
1386
|
+
})
|
|
1387
|
+
// toolCall.documentType contents
|
|
1388
|
+
|
|
1389
|
+
fromAi(value: toolCall.documentType, options: {
|
|
1390
|
+
required: false
|
|
1391
|
+
})
|
|
1392
|
+
// toolCall.documentType contents
|
|
1393
|
+
</code></pre>
|
|
1394
|
+
`,engines:{camunda:`>=8.8`}},{name:`is defined`,type:`function`,params:[{name:`value`}],info:`<p><em>Camunda Extension</em></p>
|
|
1395
|
+
<p>Checks if a given value is not <code>null</code>. If the value is <code>null</code> then the function returns <code>false</code>.
|
|
1396
|
+
Otherwise, the function returns <code>true</code>.</p>
|
|
1397
|
+
<p>The function requires one argument. Calling <code>is defined()</code> without an argument is invalid.</p>
|
|
1398
|
+
<p><strong>Function signature</strong></p>
|
|
1399
|
+
<pre><code class="language-feel">is defined(value: Any): boolean
|
|
1400
|
+
</code></pre>
|
|
1401
|
+
<p><strong>Examples</strong></p>
|
|
1402
|
+
<pre><code class="language-feel">is defined(1)
|
|
1403
|
+
// true
|
|
1404
|
+
|
|
1405
|
+
is defined(null)
|
|
1406
|
+
// false
|
|
1407
|
+
|
|
1408
|
+
is defined(x)
|
|
1409
|
+
// false - if no variable "x" exists
|
|
1410
|
+
|
|
1411
|
+
is defined(x.y)
|
|
1412
|
+
// false - if no variable "x" exists or it doesn't have a property "y"
|
|
1413
|
+
|
|
1414
|
+
is defined()
|
|
1415
|
+
// error - expected one argument
|
|
1416
|
+
</code></pre>
|
|
1417
|
+
<p>:::caution Breaking change</p>
|
|
1418
|
+
<p>This function worked differently in previous versions. It returned <code>true</code> if the value was <code>null</code>.
|
|
1419
|
+
Since this version, the function returns <code>false</code> if the value is <code>null</code>.</p>
|
|
1420
|
+
<p>:::</p>
|
|
1421
|
+
`},{name:`get or else`,type:`function`,params:[{name:`value`},{name:`default`}],info:`<p><em>Camunda Extension</em></p>
|
|
1422
|
+
<p>Return the provided value parameter if not <code>null</code>, otherwise return the default parameter</p>
|
|
1423
|
+
<p><strong>Function signature</strong></p>
|
|
1424
|
+
<pre><code class="language-feel">get or else(value: Any, default: Any): Any
|
|
1425
|
+
</code></pre>
|
|
1426
|
+
<p><strong>Examples</strong></p>
|
|
1427
|
+
<pre><code class="language-feel">get or else("this", "default")
|
|
1428
|
+
// "this"
|
|
1429
|
+
|
|
1430
|
+
get or else(null, "default")
|
|
1431
|
+
// "default"
|
|
1432
|
+
|
|
1433
|
+
get or else(null, null)
|
|
1434
|
+
// null
|
|
1435
|
+
</code></pre>
|
|
1436
|
+
`,engines:{camunda:`>=8.3`}},{name:`assert`,type:`function`,params:[{name:`value`},{name:`condition`}],info:`<p><em>Camunda Extension</em></p>
|
|
1437
|
+
<p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.
|
|
1438
|
+
Otherwise, the evaluation fails with an error.</p>
|
|
1439
|
+
<p><strong>Function signature</strong></p>
|
|
1440
|
+
<pre><code class="language-feel">assert(value: Any, condition: Any)
|
|
1441
|
+
</code></pre>
|
|
1442
|
+
<p><strong>Examples</strong></p>
|
|
1443
|
+
<pre><code class="language-feel">assert(x, x != null)
|
|
1444
|
+
// "value" - if x is "value"
|
|
1445
|
+
// error - if x is null or doesn't exist
|
|
1446
|
+
|
|
1447
|
+
assert(x, x >= 0)
|
|
1448
|
+
// 4 - if x is 4
|
|
1449
|
+
// error - if x is less than zero
|
|
1450
|
+
</code></pre>
|
|
1451
|
+
`,engines:{camunda:`>=8.3`}},{name:`assert`,type:`function`,params:[{name:`value`},{name:`condition`},{name:`cause`}],info:`<p><em>Camunda Extension</em></p>
|
|
1452
|
+
<p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.
|
|
1453
|
+
Otherwise, the evaluation fails with an error containing the given message.</p>
|
|
1454
|
+
<p><strong>Function signature</strong></p>
|
|
1455
|
+
<pre><code class="language-feel">assert(value: Any, condition: Any, cause: String)
|
|
1456
|
+
</code></pre>
|
|
1457
|
+
<p><strong>Examples</strong></p>
|
|
1458
|
+
<pre><code class="language-feel">assert(x, x != null, "'x' should not be null")
|
|
1459
|
+
// "value" - if x is "value"
|
|
1460
|
+
// error('x' should not be null) - if x is null or doesn't exist
|
|
1461
|
+
|
|
1462
|
+
assert(x, x >= 0, "'x' should be positive")
|
|
1463
|
+
// 4 - if x is 4
|
|
1464
|
+
// error('x' should be positive) - if x is less than zero
|
|
1465
|
+
</code></pre>
|
|
1466
|
+
`,engines:{camunda:`>=8.3`}},{name:`get value`,type:`function`,params:[{name:`context`},{name:`keys`}],info:`<p><em>Camunda Extension</em></p>
|
|
1467
|
+
<p>Returns the value of the context entry for a context path defined by the given keys.</p>
|
|
1468
|
+
<p>If <code>keys</code> contains the keys <code>[k1, k2]</code> then it returns the value at the nested entry <code>k1.k2</code> of the context.</p>
|
|
1469
|
+
<p>If <code>keys</code> are empty or the nested entry defined by the keys doesn't exist in the context, it returns <code>null</code>.</p>
|
|
1470
|
+
<p><strong>Function signature</strong></p>
|
|
1471
|
+
<pre><code class="language-feel">get value(context: context, keys: list<string>): Any
|
|
1472
|
+
</code></pre>
|
|
1473
|
+
<p><strong>Examples</strong></p>
|
|
1474
|
+
<pre><code class="language-feel">get value({x:1, y: {z:0}}, ["y", "z"])
|
|
1475
|
+
// 0
|
|
1476
|
+
|
|
1477
|
+
get value({x: {y: {z:0}}}, ["x", "y"])
|
|
1478
|
+
// {z:0}
|
|
1479
|
+
|
|
1480
|
+
get value({a: {b: 3}}, ["b"])
|
|
1481
|
+
// null
|
|
1482
|
+
</code></pre>
|
|
1483
|
+
`},{name:`context put`,type:`function`,params:[{name:`context`},{name:`key`},{name:`value`}],info:`<p>Adds a new entry with the given key and value to the context. Returns a new context that includes the entry.</p>
|
|
1484
|
+
<p>If an entry for the same key already exists in the context, it overrides the value.</p>
|
|
1485
|
+
<p><strong>Function signature</strong></p>
|
|
1486
|
+
<pre><code class="language-feel">context put(context: context, key: string, value: Any): context
|
|
1487
|
+
</code></pre>
|
|
1488
|
+
<p><strong>Examples</strong></p>
|
|
1489
|
+
<pre><code class="language-feel">context put({x:1}, "y", 2)
|
|
1490
|
+
// {x:1, y:2}
|
|
1491
|
+
</code></pre>
|
|
1492
|
+
<p>:::info
|
|
1493
|
+
The function <code>context put()</code> replaced the previous function <code>put()</code> (Camunda Extension). The
|
|
1494
|
+
previous function is deprecated and should not be used anymore.
|
|
1495
|
+
:::</p>
|
|
1496
|
+
`},{name:`context merge`,type:`function`,params:[{name:`contexts`}],info:`<p>Union the given contexts. Returns a new context that includes all entries of the given contexts.</p>
|
|
1497
|
+
<p>If an entry for the same key already exists in a context, it overrides the value. The entries are overridden in the same order as in the list of contexts.</p>
|
|
1498
|
+
<p><strong>Function signature</strong></p>
|
|
1499
|
+
<pre><code class="language-feel">context merge(contexts: list<context>): context
|
|
1500
|
+
</code></pre>
|
|
1501
|
+
<p><strong>Examples</strong></p>
|
|
1502
|
+
<pre><code class="language-feel">context merge([{x:1}, {y:2}])
|
|
1503
|
+
// {x:1, y:2}
|
|
1504
|
+
|
|
1505
|
+
context merge([{x:1, y: 0}, {y:2}])
|
|
1506
|
+
// {x:1, y:2}
|
|
1507
|
+
</code></pre>
|
|
1508
|
+
<p>:::info
|
|
1509
|
+
The function <code>context merge()</code> replaced the previous function <code>put all()</code> (Camunda Extension). The
|
|
1510
|
+
previous function is deprecated and should not be used anymore.
|
|
1511
|
+
:::</p>
|
|
1512
|
+
`,engines:{camunda:`>=8.2`}},{name:`date and time`,type:`function`,params:[{name:`date`},{name:`timezone`}],info:`<p><em>Camunda Extension</em></p>
|
|
1513
|
+
<p>Returns the given date and time value at the given timezone.</p>
|
|
1514
|
+
<p>If <code>date</code> has a different timezone than <code>timezone</code> then it adjusts the time to match the local time of <code>timezone</code>.</p>
|
|
1515
|
+
<p><strong>Function signature</strong></p>
|
|
1516
|
+
<pre><code class="language-feel">date and time(date: date and time, timezone: string): date and time
|
|
1517
|
+
</code></pre>
|
|
1518
|
+
<p><strong>Examples</strong></p>
|
|
1519
|
+
<pre><code class="language-feel">date and time(@"2020-07-31T14:27:30@Europe/Berlin", "America/Los_Angeles")
|
|
1520
|
+
// date and time("2020-07-31T05:27:30@America/Los_Angeles")
|
|
1521
|
+
|
|
1522
|
+
date and time(@"2020-07-31T14:27:30", "Z")
|
|
1523
|
+
// date and time("2020-07-31T12:27:30Z")
|
|
1524
|
+
</code></pre>
|
|
1525
|
+
`},{name:`duplicate values`,type:`function`,params:[{name:`list`}],info:`<p><em>Camunda Extension</em></p>
|
|
1526
|
+
<p>Returns all duplicate values of the given list.</p>
|
|
1527
|
+
<p><strong>Function signature</strong></p>
|
|
1528
|
+
<pre><code class="language-feel">duplicate values(list: list): list
|
|
1529
|
+
</code></pre>
|
|
1530
|
+
<p><strong>Examples</strong></p>
|
|
1531
|
+
<pre><code class="language-feel">duplicate values([1,2,3,2,1])
|
|
1532
|
+
// [1,2]
|
|
1533
|
+
</code></pre>
|
|
1534
|
+
`,engines:{camunda:`>=8.3`}},{name:`string join`,type:`function`,params:[{name:`list`},{name:`delimiter`},{name:`prefix`},{name:`suffix`}],info:`<p><em>Camunda Extension</em></p>
|
|
1535
|
+
<p>Joins a list of strings into a single string. This is similar to
|
|
1536
|
+
Java's <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">joining</a>
|
|
1537
|
+
function.</p>
|
|
1538
|
+
<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is
|
|
1539
|
+
neither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>
|
|
1540
|
+
<p>The resulting string starts with <code>prefix</code>, contains a <code>delimiter</code> between each element, and ends
|
|
1541
|
+
with <code>suffix</code>.</p>
|
|
1542
|
+
<p><strong>Function signature</strong></p>
|
|
1543
|
+
<pre><code class="language-feel">string join(list: list<string>, delimiter: string, prefix: string, suffix: string): string
|
|
1544
|
+
</code></pre>
|
|
1545
|
+
<p><strong>Examples</strong></p>
|
|
1546
|
+
<pre><code class="language-feel">string join(["a","b","c"], ", ", "[", "]")
|
|
1547
|
+
// "[a, b, c]"
|
|
1548
|
+
</code></pre>
|
|
1549
|
+
`},{name:`is empty`,type:`function`,params:[{name:`list`}],info:`<p><em>Camunda Extension</em></p>
|
|
1550
|
+
<p>Returns <code>true</code> if the given list is empty. Otherwise, returns <code>false</code>.</p>
|
|
1551
|
+
<p><strong>Function signature</strong></p>
|
|
1552
|
+
<pre><code class="language-feel">is empty(list: list): boolean
|
|
1553
|
+
</code></pre>
|
|
1554
|
+
<p><strong>Examples</strong></p>
|
|
1555
|
+
<pre><code class="language-feel">is empty([])
|
|
1556
|
+
// true
|
|
1557
|
+
|
|
1558
|
+
is empty([1,2,3])
|
|
1559
|
+
// false
|
|
1560
|
+
</code></pre>
|
|
1561
|
+
`,engines:{camunda:`>=8.6`}},{name:`partition`,type:`function`,params:[{name:`list`},{name:`size`}],info:`<p><em>Camunda Extension</em></p>
|
|
1562
|
+
<p>Returns consecutive sublists of a list, each of the same size (the final list may be smaller).</p>
|
|
1563
|
+
<p>If <code>size</code> is less than <code>0</code>, it returns <code>null</code>.</p>
|
|
1564
|
+
<p><strong>Function signature</strong></p>
|
|
1565
|
+
<pre><code class="language-feel">partition(list: list, size: number): list
|
|
1566
|
+
</code></pre>
|
|
1567
|
+
<p><strong>Examples</strong></p>
|
|
1568
|
+
<pre><code class="language-feel">partition([1,2,3,4,5], 2)
|
|
1569
|
+
// [[1,2], [3,4], [5]]
|
|
1570
|
+
|
|
1571
|
+
partition([], 2)
|
|
1572
|
+
// []
|
|
1573
|
+
|
|
1574
|
+
partition([1,2], 0)
|
|
1575
|
+
// null
|
|
1576
|
+
</code></pre>
|
|
1577
|
+
`,engines:{camunda:`>=8.7`}},{name:`random number`,type:`function`,params:[],info:`<p><em>Camunda Extension</em></p>
|
|
1578
|
+
<p>Returns a random number between <code>0</code> and <code>1</code>.</p>
|
|
1579
|
+
<p><strong>Function signature</strong></p>
|
|
1580
|
+
<pre><code class="language-feel">random number(): number
|
|
1581
|
+
</code></pre>
|
|
1582
|
+
<p><strong>Examples</strong></p>
|
|
1583
|
+
<pre><code class="language-feel">random number()
|
|
1584
|
+
// 0.9701618132579795
|
|
1585
|
+
</code></pre>
|
|
1586
|
+
`,engines:{camunda:`>=8.2`}},{name:`extract`,type:`function`,params:[{name:`string`},{name:`pattern`}],info:`<p><em>Camunda Extension</em></p>
|
|
1587
|
+
<p>Returns all matches of the pattern in the given string. Returns an empty list if the pattern doesn't
|
|
1588
|
+
match.</p>
|
|
1589
|
+
<p><strong>Function signature</strong></p>
|
|
1590
|
+
<pre><code class="language-feel">extract(string: string, pattern: string): list<string>
|
|
1591
|
+
</code></pre>
|
|
1592
|
+
<p>The <code>pattern</code> is a string that contains a regular expression.</p>
|
|
1593
|
+
<p><strong>Examples</strong></p>
|
|
1594
|
+
<pre><code class="language-feel">extract("references are 1234, 1256, 1378", "12[0-9]*")
|
|
1595
|
+
// ["1234","1256"]
|
|
1596
|
+
</code></pre>
|
|
1597
|
+
`},{name:`trim`,type:`function`,params:[{name:`string`}],info:`<p><em>Camunda Extension</em></p>
|
|
1598
|
+
<p>Returns the given string without leading and trailing spaces.</p>
|
|
1599
|
+
<p><strong>Function signature</strong></p>
|
|
1600
|
+
<pre><code class="language-feel">trim(string: string): string
|
|
1601
|
+
</code></pre>
|
|
1602
|
+
<p><strong>Examples</strong></p>
|
|
1603
|
+
<pre><code class="language-feel">trim(" hello world ")
|
|
1604
|
+
// "hello world"
|
|
1605
|
+
|
|
1606
|
+
trim("hello world ")
|
|
1607
|
+
// "hello world"
|
|
1608
|
+
</code></pre>
|
|
1609
|
+
`,engines:{camunda:`>=8.6`}},{name:`uuid`,type:`function`,params:[],info:`<p><em>Camunda Extension</em></p>
|
|
1610
|
+
<p>Returns a UUID (Universally Unique Identifier) with 36 characters.</p>
|
|
1611
|
+
<p><strong>Function signature</strong></p>
|
|
1612
|
+
<pre><code class="language-feel">uuid(): string
|
|
1613
|
+
</code></pre>
|
|
1614
|
+
<p><strong>Examples</strong></p>
|
|
1615
|
+
<pre><code class="language-feel">uuid()
|
|
1616
|
+
// "7793aab1-d761-4d38-916b-b7270e309894"
|
|
1617
|
+
</code></pre>
|
|
1618
|
+
`,engines:{camunda:`>=8.6`}},{name:`to base64`,type:`function`,params:[{name:`value`}],info:`<p><em>Camunda Extension</em></p>
|
|
1619
|
+
<p>Returns the given string encoded in Base64 format.</p>
|
|
1620
|
+
<p><strong>Function signature</strong></p>
|
|
1621
|
+
<pre><code class="language-feel">to base64(value: string): string
|
|
1622
|
+
</code></pre>
|
|
1623
|
+
<p><strong>Examples</strong></p>
|
|
1624
|
+
<pre><code class="language-feel">to base64("FEEL")
|
|
1625
|
+
// "RkVFTA=="
|
|
1626
|
+
</code></pre>
|
|
1627
|
+
`,engines:{camunda:`>=8.6`}},{name:`from base64`,type:`function`,params:[{name:`value`}],info:`<p><em>Camunda Extension</em></p>
|
|
1628
|
+
<p>Returns the given Base64 encoded string decoded to a plain string.</p>
|
|
1629
|
+
<p><strong>Function signature</strong></p>
|
|
1630
|
+
<pre><code class="language-feel">from base64(value: string): string
|
|
1631
|
+
</code></pre>
|
|
1632
|
+
<p><strong>Examples</strong></p>
|
|
1633
|
+
<pre><code class="language-feel">from base64("RkVFTA==")
|
|
1634
|
+
// "FEEL"
|
|
1635
|
+
</code></pre>
|
|
1636
|
+
`,engines:{camunda:`>=8.9`}},{name:`is blank`,type:`function`,params:[{name:`string`}],info:`<p><em>Camunda Extension</em></p>
|
|
1637
|
+
<p>Returns <code>true</code> if the given string is blank (empty or contains only whitespaces).</p>
|
|
1638
|
+
<p><strong>Function signature</strong></p>
|
|
1639
|
+
<pre><code class="language-feel">is blank(string: string): boolean
|
|
1640
|
+
</code></pre>
|
|
1641
|
+
<p><strong>Examples</strong></p>
|
|
1642
|
+
<pre><code class="language-feel">is blank("")
|
|
1643
|
+
// true
|
|
1644
|
+
|
|
1645
|
+
is blank(" ")
|
|
1646
|
+
// true
|
|
1647
|
+
|
|
1648
|
+
is blank("hello world")
|
|
1649
|
+
// false
|
|
1650
|
+
</code></pre>
|
|
1651
|
+
`,engines:{camunda:`>=8.8`}},{name:`last day of month`,type:`function`,params:[{name:`date`}],info:`<p><em>Camunda Extension</em></p>
|
|
1652
|
+
<p>Takes the month of the given date or date-time value and returns the last day of this month.</p>
|
|
1653
|
+
<p><strong>Function signature</strong></p>
|
|
1654
|
+
<pre><code class="language-feel">last day of month(date: date): date
|
|
1655
|
+
</code></pre>
|
|
1656
|
+
<pre><code class="language-feel">last day of month(date: date and time): date
|
|
1657
|
+
</code></pre>
|
|
1658
|
+
<p><strong>Examples</strong></p>
|
|
1659
|
+
<pre><code class="language-feel">last day of month(date("2022-10-01"))
|
|
1660
|
+
// date("2022-10-31"))
|
|
1661
|
+
|
|
1662
|
+
last day of month(date and time("2022-10-16T12:00:00"))
|
|
1663
|
+
// date("2022-10-31"))
|
|
1664
|
+
</code></pre>
|
|
1665
|
+
`,engines:{camunda:`>=8.2`}}],Ui=[...Vi,...Hi],Wi=[{name:`get or else`,type:`function`,params:[{name:`value`},{name:`default`}],info:`<p><em>Camunda Extension</em></p>
|
|
1666
|
+
<p>Return the provided value parameter if not <code>null</code>, otherwise return the default parameter</p>
|
|
1667
|
+
<p><strong>Function signature</strong></p>
|
|
1668
|
+
<pre><code class="language-feel">get or else(value: Any, default: Any): Any
|
|
1669
|
+
</code></pre>
|
|
1670
|
+
<p><strong>Examples</strong></p>
|
|
1671
|
+
<pre><code class="language-feel">get or else("this", "default")
|
|
1672
|
+
// "this"
|
|
1673
|
+
|
|
1674
|
+
get or else(null, "default")
|
|
1675
|
+
// "default"
|
|
1676
|
+
|
|
1677
|
+
get or else(null, null)
|
|
1678
|
+
// null
|
|
1679
|
+
</code></pre>
|
|
1680
|
+
`,engines:{camunda:`>=8.3`}}];ln();var Gi=[b.theme({"& .cm-content":{padding:`0px`},"& .cm-line":{padding:`0px`},"&.cm-editor.cm-focused":{outline:`none`},"& .cm-completionInfo":{whiteSpace:`pre-wrap`,overflow:`hidden`,textOverflow:`ellipsis`},"&.cm-editor":{height:`100%`},"& .cm-completionInfo > *":{whiteSpace:`normal`},"& .cm-completionInfo ul":{margin:0,paddingLeft:`15px`},"& .cm-completionInfo pre":{marginBottom:0,whiteSpace:`pre-wrap`},"& .cm-completionInfo p":{marginTop:0},"& .cm-completionInfo p:not(:last-of-type)":{marginBottom:0}}),Ri];function _isEmpty(e){return e&&e.from===e.to}function isEmpty(e,t){let n=e.nextSibling;return _isEmpty(e)||n&&n.from===t&&_isEmpty(n)}function isVariableName(e){return e&&e.parent&&e.parent.name===`VariableName`}function isPathExpression(e){return e?e.name===`PathExpression`||isPathExpression(e.parent):!1}function pathExpressionCompletion({variables:e}){return t=>{let n=S(t.state).resolve(t.pos,-1);if(!isPathExpression(n))return null;let r=findPathExpression(n),i=n===r||n.name===`.`?t.pos:n.from,a=getPath(r,t),o=e;for(var s=0;s<a.length-1;s++){var c=o.find(e=>e.name===a[s].name);if(!c||c.isList!==`optional`&&!!c.isList!==a[s].isList)return null;o=c.entries}return o?{from:i,options:o.map(e=>({label:e.name,type:`variable`,info:e.info,detail:e.detail}))}:null}}function findPathExpression(e){for(;e;){if(e.name===`PathExpression`)return e;e=e.parent}}function getPath(e,t){let n=[];for(let r=e.firstChild;r;r=r.nextSibling)r.name!==`.`&&(r.name===`PathExpression`?n.push(...getPath(r,t)):r.name===`FilterExpression`?n.push(...getFilter(r,t)):n.push({name:getNodeContent(r,t),isList:!1}));return n}function getFilter(e,t){let n=e.firstChild;if(n.name===`PathExpression`){let e=getPath(n,t),r=e[e.length-1];return r.isList=!0,e}return[{name:getNodeContent(n,t),isList:!0}]}function getNodeContent(e,t){return t.state.sliceDoc(e.from,e.to)}function variableCompletion({variables:e=[],builtins:t=[]}){let n=getVariableSuggestions(e,t),r=/^[\w ]*$/;return n.length?e=>{let{pos:t,state:i}=e,a=S(i).resolve(t,-1);if(isEmpty(a,t))return isPathExpression(a)?null:e.explicit?{from:t,options:n,validFor:r}:null;if(!isVariableName(a)||isPathExpression(a))return null;let o=typeof e.matchBefore==`function`?e.matchBefore(/\w[\w ]*$/):null;return{from:o?o.from:a.from,options:n,validFor:r}}:e=>null}function getVariableSuggestions(e,t){return[].concat(e.map(e=>createVariableSuggestion(e)),t.map(e=>createVariableSuggestion(e)))}function createVariableSuggestion(e,t){return e.type===`function`?createFunctionVariable(e,t):{label:e.name,type:`variable`,info:e.info,detail:e.detail,boost:t}}function createFunctionVariable(e,t){let{name:n,info:r,detail:i,params:a=[]}=e,o=a.map(({name:e,type:t},n)=>({name:e||`param ${n+1}`,type:t})),s=`${n}(${o.map(e=>"${"+e.name+`}`).join(`, `)})`,c=`${n}(${o.map(({name:e,type:t})=>t?`${e}: ${t}`:e).join(`, `)})`;return fe(s,{label:c,type:`function`,info:r,detail:i,boost:t})}function snippetCompletions(){return we(Ce)}function completions({variables:e=[],builtins:t=[]}){return[pathExpressionCompletion({variables:e}),variableCompletion({variables:e,builtins:t}),snippetCompletions(),...Ee]}function language(e){return Te(e)}function createContext(e){return e.slice().reverse().reduce((e,t)=>(e[t.name]=()=>{},e),{})}function lintExtension({builtins:e=[],engines:t}={}){return ye(cmFeelLinter({builtins:e,engines:t}))}var Ki=D.define(),qi=D.define(),Ji=D.define(),Yi=D.define(),Xi=D.define();function configure({dialect:e=`expression`,parserDialect:t,variables:n=[],builtins:r=[],engines:i,completions:a}){let o=createContext([...n,...r]),s=a??completions({builtins:availableBuiltins(r,i),variables:n});return[Ji.of(e),Ki.of(r),qi.of(n),Yi.of(t),Xi.of(i),language({dialect:e,parserDialect:t,context:o,completions:s}),lintExtension({builtins:r,engines:i})]}function availableBuiltins(e,t){return!t||!Object.keys(t).length?e:e.filter(e=>!e.engines||isCompatible(e.engines,t))}function get(e){return{builtins:e.facet(Ki)[0],variables:e.facet(qi)[0],dialect:e.facet(Ji)[0],parserDialect:e.facet(Yi)[0],engines:e.facet(Xi)[0]}}var Zi=Ui.map(e=>({...e,info:()=>l(e.info)})),Qi=new re,$i=new re;function FeelEditor({extensions:e=[],dialect:t=`expression`,parserDialect:n,container:r,contentAttributes:i={},tooltipContainer:a,onChange:o=()=>{},onKeyDown:s=()=>{},onLint:c=()=>{},placeholder:l=``,readOnly:u=!1,value:d=``,builtins:f=Zi,variables:p=[],engines:m}){this._events=mitt_default();let h=b.updateListener.of(e=>{e.docChanged&&o(e.state.doc.toString())}),g=b.updateListener.of(e=>{let t=e.transactions.flatMap(e=>e.effects).filter(e=>e.is(ve));if(!t.length)return;let n=t.flatMap(e=>e.value);this._events.emit(`lint`,{diagnostics:n})}),_=b.domEventObservers({keydown:s});typeof a==`string`&&(a=document.querySelector(a));let v=a?ae({tooltipSpace:function(){return a.getBoundingClientRect()}}):[],y=[pe(),Qi.of(configure({dialect:t,builtins:f,variables:p,parserDialect:n,engines:m})),te(),T(),ue(),b.contentAttributes.of(i),h,_,C.of([..._e]),g,v,$i.of(se(l)),Gi,...e];return u&&y.push(b.editable.of(!1)),this.on(`lint`,({diagnostics:e})=>c(e)),this._cmEditor=new b({state:O.create({doc:d,extensions:y}),parent:r}),this}FeelEditor.prototype.setValue=function(e){this._cmEditor.dispatch({changes:{from:0,to:this._cmEditor.state.doc.length,insert:e}})},FeelEditor.prototype.focus=function(e){let t=this._cmEditor;if(t.contentDOM.focus(),t.focus(),typeof e==`number`){let n=t.state.doc.length;t.dispatch({selection:{anchor:e<=n?e:n}})}},FeelEditor.prototype.on=function(e,t){this._events.on(e,t)},FeelEditor.prototype.off=function(e,t){this._events.off(e,t)},FeelEditor.prototype.getSelection=function(){return this._cmEditor.state.selection},FeelEditor.prototype.setVariables=function(e){let t=get(this._cmEditor.state);this._cmEditor.dispatch({effects:[Qi.reconfigure(configure({...t,variables:e}))]})},FeelEditor.prototype.setEngines=function(e){let t=get(this._cmEditor.state);this._cmEditor.dispatch({effects:[Qi.reconfigure(configure({...t,engines:e}))]}),be(this._cmEditor)},FeelEditor.prototype.setPlaceholder=function(e){this._cmEditor.dispatch({effects:$i.reconfigure(se(e))})};var ea=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],B=ea.join(`,`),ta=typeof Element>`u`,V=ta?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,H=!ta&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},U=function isInert(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):U(e.parentNode))},na=function isContentEditable(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},ra=function getCandidates(e,t,n){if(U(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&V.call(e,B)&&r.unshift(e),r=r.filter(n),r},W=function getCandidatesIteratively(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!U(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=W(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{V.call(a,B)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!U(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=W(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},ia=function hasTabIndex(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},G=function getTabIndex(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||na(e))&&!ia(e)?0:e.tabIndex},aa=function getSortOrderTabIndex(e,t){var n=G(e);return n<0&&t&&!ia(e)?0:n},oa=function sortOrderedTabbables(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},sa=function isInput(e){return e.tagName===`INPUT`},ca=function isHiddenInput(e){return sa(e)&&e.type===`hidden`},la=function isDetailsWithSummary(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},ua=function getCheckedRadio(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},da=function isTabbableRadio(e){if(!e.name)return!0;var t=e.form||H(e),n=function queryRadios(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=ua(r,e.form);return!i||i===e},fa=function isRadio(e){return sa(e)&&e.type===`radio`},pa=function isNonTabbableRadio(e){return fa(e)&&!da(e)},ma=function isNodeAttached(e){var t=e&&H(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=H(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},ha=function isZeroArea(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},ga=function isHidden(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=V.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(V.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=H(e);if(s&&!s.shadowRoot&&r(s)===!0)return ha(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(ma(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return ha(e);return!1},_a=function isDisabledFromFieldset(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return V.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},K=function isNodeMatchingSelectorFocusable(e,t){return!(t.disabled||ca(t)||ga(t,e)||la(t)||_a(t))},va=function isNodeMatchingSelectorTabbable(e,t){return!(pa(t)||G(t)<0||!K(e,t))},ya=function isShadowRootTabbable(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},ba=function sortByOrder(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=aa(a,i),s=i?ba(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(oa).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},xa=function tabbable(e,t){return t||={},ba(t.getShadowRoot?W([e],t.includeContainer,{filter:va.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ya}):ra(e,t.includeContainer,va.bind(null,t)))},Sa=function focusable(e,t){return t||={},t.getShadowRoot?W([e],t.includeContainer,{filter:K.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):ra(e,t.includeContainer,K.bind(null,t))},q=function isTabbable(e,t){if(t||={},!e)throw Error(`No node provided`);return V.call(e,B)!==!1&&va(t,e)},Ca=ea.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),wa=function isFocusable(e,t){if(t||={},!e)throw Error(`No node provided`);return V.call(e,Ca)!==!1&&K(t,e)};function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t){n&&(e=n);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1681
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||n.return==null||n.return()}finally{if(o)throw i}}}}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _iterableToArray(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _nonIterableSpread(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1682
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _toPrimitive(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,`string`);return typeof t==`symbol`?t:t+``}function _unsupportedIterableToArray(e,t){if(e){if(typeof e==`string`)return _arrayLikeToArray(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}var J={getActiveTrap:function getActiveTrap(e){return e?.length>0?e[e.length-1]:null},activateTrap:function activateTrap(e,t){t!==J.getActiveTrap(e)&&J.pauseTrap(e);var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function deactivateTrap(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),J.unpauseTrap(e)},pauseTrap:function pauseTrap(e){J.getActiveTrap(e)?._setPausedState(!0)},unpauseTrap:function unpauseTrap(e){var t=J.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},Ta=function isSelectableInput(e){return e.tagName&&e.tagName.toLowerCase()===`input`&&typeof e.select==`function`},Ea=function isEscapeEvent(e){return e?.key===`Escape`||e?.key===`Esc`||e?.keyCode===27},Y=function isTabEvent(e){return e?.key===`Tab`||e?.keyCode===9},Da=function isKeyForward(e){return Y(e)&&!e.shiftKey},Oa=function isKeyBackward(e){return Y(e)&&e.shiftKey},ka=function delay(e){return setTimeout(e,0)},X=function valueOrHandler(e){var t=[...arguments].slice(1);return typeof e==`function`?e.apply(void 0,t):e},Z=function getActualTarget(e){return e.target.shadowRoot&&typeof e.composedPath==`function`?e.composedPath()[0]:e.target},Aa=[],ja=function createFocusTrap(e,t){var n=t?.document||document,r=t?.trapStack||Aa,i=_objectSpread2({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:Da,isKeyBackward:Oa},t),a={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,s=function getOption(e,t,n){return e&&e[t]!==void 0?e[t]:i[n||t]},c=function findContainerIndex(e,t){var n=typeof t?.composedPath==`function`?t.composedPath():void 0;return a.containerGroups.findIndex(function(t){var r=t.container,i=t.tabbableNodes;return r.contains(e)||n?.includes(r)||i.find(function(t){return t===e})})},l=function getNodeForOption(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.hasFallback,a=r!==void 0&&r,o=t.params,s=o===void 0?[]:o,c=i[e];if(typeof c==`function`&&(c=c.apply(void 0,_toConsumableArray(s))),c===!0&&(c=void 0),!c){if(c===void 0||c===!1)return c;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}var l=c;if(typeof c==`string`){try{l=n.querySelector(c)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!l&&!a)throw Error(`\`${e}\` as selector refers to no known node`)}return l},u=function getActiveElement(e){var t=e.activeElement;return t?t.shadowRoot&&t.shadowRoot.activeElement!==null?u(t.shadowRoot):t:null},d=function getInitialFocusNode(){var e=l(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!wa(e,i.tabbableOptions)){var t=u(n);if(c(t)>=0)e=t;else{var r=a.tabbableGroups[0];e=r&&r.firstTabbableNode||l(`fallbackFocus`)}}else e===null&&(e=l(`fallbackFocus`));if(!e)throw Error(`Your focus-trap needs to have at least one focusable element`);return e},f=function updateTabbableNodes(){if(a.containerGroups=a.containers.map(function(e){var t=xa(e,i.tabbableOptions),n=Sa(e,i.tabbableOptions),r=t.length>0?t[0]:void 0,a=t.length>0?t[t.length-1]:void 0,o=n.find(function(e){return q(e)}),s=n.slice().reverse().find(function(e){return q(e)});return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:!!t.find(function(e){return G(e)>0}),firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function nextTabbableNode(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=t.indexOf(e);return i<0?r?n.slice(n.indexOf(e)+1).find(function(e){return q(e)}):n.slice(0,n.indexOf(e)).reverse().find(function(e){return q(e)}):t[i+(r?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!l(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(a.containerGroups.find(function(e){return e.posTabIndexesFound})&&a.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)},p=function tryFocus(e){e!==!1&&e!==u(document)&&(!e||!e.focus?p(d()):(e.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=e,Ta(e)&&e.select()))},m=function getReturnFocusNode(e){var t=l(`setReturnFocus`,{params:[e]});return t||t!==!1&&e},h=function findNextNavNode(e){var t=e.target,n=e.event,r=e.isBackward,o=r!==void 0&&r;t||=Z(n),f();var s=null;if(a.tabbableGroups.length>0){var u=c(t,n),d=u>=0?a.containerGroups[u]:void 0;if(u<0)s=o?a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:a.tabbableGroups[0].firstTabbableNode;else if(o){var p=a.tabbableGroups.findIndex(function(e){var n=e.firstTabbableNode;return t===n});if(p<0&&(d.container===t||wa(t,i.tabbableOptions)&&!q(t,i.tabbableOptions)&&!d.nextTabbableNode(t,!1))&&(p=u),p>=0){var m=p===0?a.tabbableGroups.length-1:p-1,h=a.tabbableGroups[m];s=G(t)>=0?h.lastTabbableNode:h.lastDomTabbableNode}else Y(n)||(s=d.nextTabbableNode(t,!1))}else{var g=a.tabbableGroups.findIndex(function(e){var n=e.lastTabbableNode;return t===n});if(g<0&&(d.container===t||wa(t,i.tabbableOptions)&&!q(t,i.tabbableOptions)&&!d.nextTabbableNode(t))&&(g=u),g>=0){var _=g===a.tabbableGroups.length-1?0:g+1,v=a.tabbableGroups[_];s=G(t)>=0?v.firstTabbableNode:v.firstDomTabbableNode}else Y(n)||(s=d.nextTabbableNode(t))}}else s=l(`fallbackFocus`);return s},g=function checkPointerDown(e){c(Z(e),e)>=0||(X(i.clickOutsideDeactivates,e)?o.deactivate({returnFocus:i.returnFocusOnDeactivate}):X(i.allowOutsideClick,e)||e.preventDefault())},_=function checkFocusIn(e){var t=Z(e),n=c(t,e)>=0;if(n||t instanceof Document)n&&(a.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();var r,o=!0;if(a.mostRecentlyFocusedNode){if(G(a.mostRecentlyFocusedNode)>0){var s=c(a.mostRecentlyFocusedNode),l=a.containerGroups[s].tabbableNodes;if(l.length>0){var u=l.findIndex(function(e){return e===a.mostRecentlyFocusedNode});u>=0&&(i.isKeyForward(a.recentNavEvent)?u+1<l.length&&(r=l[u+1],o=!1):u-1>=0&&(r=l[u-1],o=!1))}}else a.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return G(e)>0})})||(o=!1)}else o=!1;o&&(r=h({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p(r||a.mostRecentlyFocusedNode||d())}a.recentNavEvent=void 0},v=function checkKeyNav(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.recentNavEvent=e;var n=h({event:e,isBackward:t});n&&(Y(e)&&e.preventDefault(),p(n))},y=function checkTabKey(e){(i.isKeyForward(e)||i.isKeyBackward(e))&&v(e,i.isKeyBackward(e))},b=function checkEscapeKey(e){Ea(e)&&X(i.escapeDeactivates,e)!==!1&&(e.preventDefault(),o.deactivate())},x=function checkClick(e){c(Z(e),e)>=0||X(i.clickOutsideDeactivates,e)||X(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},S=function addListeners(){if(a.active){J.activateTrap(r,o);var e;return i.delayInitialFocus?e=new Promise(function(e){a.delayInitialFocusTimer=ka(function(){p(d()),e()})}):p(d()),n.addEventListener(`focusin`,_,!0),n.addEventListener(`mousedown`,g,{capture:!0,passive:!1}),n.addEventListener(`touchstart`,g,{capture:!0,passive:!1}),n.addEventListener(`click`,x,{capture:!0,passive:!1}),n.addEventListener(`keydown`,y,{capture:!0,passive:!1}),n.addEventListener(`keydown`,b),e}},C=function collectAdjacentElements(e){a.active&&!a.paused&&o._setSubtreeIsolation(!1),a.adjacentElements.clear(),a.alreadySilent.clear();var t=new Set,n=new Set,r=_createForOfIteratorHelper(e),i;try{for(r.s();!(i=r.n()).done;){var s=i.value;t.add(s);for(var c=typeof ShadowRoot<`u`&&s.getRootNode()instanceof ShadowRoot,l=s;l;){t.add(l);var u=l.parentElement,d=[];u?d=u.children:!u&&c&&(d=l.getRootNode().children,u=l.getRootNode().host,c=typeof ShadowRoot<`u`&&u.getRootNode()instanceof ShadowRoot);var f=_createForOfIteratorHelper(d),p;try{for(f.s();!(p=f.n()).done;){var m=p.value;n.add(m)}}catch(e){f.e(e)}finally{f.f()}l=u}}}catch(e){r.e(e)}finally{r.f()}t.forEach(function(e){n.delete(e)}),a.adjacentElements=n},w=function removeListeners(){if(a.active)return n.removeEventListener(`focusin`,_,!0),n.removeEventListener(`mousedown`,g,!0),n.removeEventListener(`touchstart`,g,!0),n.removeEventListener(`click`,x,!0),n.removeEventListener(`keydown`,y,!0),n.removeEventListener(`keydown`,b),o},T=typeof window<`u`&&`MutationObserver`in window?new MutationObserver(function checkDomRemoval(e){var t=a.mostRecentlyFocusedNode;t&&e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===t||typeof e.contains==`function`&&e.contains(t)})})&&a.containers.some(function(e){return e?.isConnected})&&(f(),p(d()))}):void 0,E=function updateObservedNodes(){T&&(T.disconnect(),a.active&&!a.paused&&a.containers.map(function(e){T.observe(e,{subtree:!0,childList:!0})}))};return o={get active(){return a.active},get paused(){return a.paused},activate:function activate(e){if(a.active)return this;var t=s(e,`onActivate`),i=s(e,`onPostActivate`),c=s(e,`checkCanFocusTrap`),l=J.getActiveTrap(r),d=!1;if(l&&!l.paused){var p;(p=l._setSubtreeIsolation)==null||p.call(l,!1),d=!0}try{c||f(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=u(n),t?.({trap:o});var m=function finishActivation(){c&&f();var e=function afterListeners(){o._setSubtreeIsolation(!0),E(),i?.({trap:o})},t=S();t?t.then(e):e()};if(c)return c(a.containers.concat()).then(m,m),this;m()}catch(e){if(l===J.getActiveTrap(r)&&d){var h;(h=l._setSubtreeIsolation)==null||h.call(l,!0)}throw e}return this},deactivate:function deactivate(e){if(!a.active)return this;var t=_objectSpread2({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,a.paused||o._setSubtreeIsolation(!1),a.alreadySilent.clear(),w(),a.active=!1,a.paused=!1,E(),J.deactivateTrap(r,o);var n=s(t,`onDeactivate`),c=s(t,`onPostDeactivate`),l=s(t,`checkCanReturnFocus`),u=s(t,`delayReturnFocus`),d=s(t,`returnFocus`,`returnFocusOnDeactivate`);n?.({trap:o});var f=function completeDeactivation(){d&&p(m(a.nodeFocusedBeforeActivation)),c?.({trap:o})},h=function finishDeactivation(){u&&d?ka(f):f()};return d&&l?(l(m(a.nodeFocusedBeforeActivation)).then(h,h),this):(h(),this)},pause:function pause(e){return a.active?(a.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function unpause(e){return!a.active||(a.manuallyPaused=!1,r[r.length-1]!==this)?this:this._setPausedState(!1,e)},updateContainerElements:function updateContainerElements(e){return a.containers=[].concat(e).filter(Boolean).map(function(e){return typeof e==`string`?n.querySelector(e):e}),i.isolateSubtrees&&C(a.containers),a.active&&(f(),a.paused||o._setSubtreeIsolation(!0)),E(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function value(){return a.manuallyPaused}},_setPausedState:{value:function value(e,t){if(a.paused===e)return this;if(a.paused=e,e){var n=s(t,`onPause`),r=s(t,`onPostPause`);n?.({trap:o}),w(),o._setSubtreeIsolation(!1),E(),r?.({trap:o})}else{var i=s(t,`onUnpause`),c=s(t,`onPostUnpause`);i?.({trap:o}),(function finishUnpause(){f();var e=function afterListeners(){o._setSubtreeIsolation(!0),E(),c?.({trap:o})},t=S();t?t.then(e):e()})()}return this}},_setSubtreeIsolation:{value:function value(e){i.isolateSubtrees&&a.adjacentElements.forEach(function(t){if(e)switch(i.isolateSubtrees){case`aria-hidden`:(t.ariaHidden===`true`||t.getAttribute(`aria-hidden`)?.toLowerCase()===`true`)&&a.alreadySilent.add(t),t.setAttribute(`aria-hidden`,`true`);break;default:(t.inert||t.hasAttribute(`inert`))&&a.alreadySilent.add(t),t.setAttribute(`inert`,!0)}else if(!a.alreadySilent.has(t))switch(i.isolateSubtrees){case`aria-hidden`:t.removeAttribute(`aria-hidden`);break;default:t.removeAttribute(`inert`)}})}}}),o.updateContainerElements(e),o},Ma=[`input`,`delete`,`move`],Na=[`z`,`y`],Pa=O.transactionExtender.of(e=>e.docChanged&&!Ma.some(t=>e.isUserEvent(t))?{annotations:E.addToHistory.of(!1)}:null),Fa=ce.high(b.domEventHandlers({keydown:e=>((e.ctrlKey||e.metaKey)&&Na.includes(e.key.toLowerCase())&&e.stopPropagation(),!1)}));function feelHistory(){return[he(),C.of(me),Fa,Pa]}function hasHistory(e){return e.state.field(ge,!1)!==void 0}function attachHistory(e){hasHistory(e)||e.dispatch({effects:w.appendConfig.of(feelHistory())})}var Ia=!1;function installFeelBehaviour(){if(Ia)return;Ia=!0;let e=FeelEditor.prototype.setVariables;FeelEditor.prototype.setVariables=function setStableVariables(t){let n=t.map(e=>e.name).join(`
|
|
1683
|
+
`);this.names!==n&&(this.names=n,e.call(this,t))},document.addEventListener(`focusin`,e=>{let t=e.target?.closest?.(`.cm-editor`),n=t?b.findFromDOM(t):null;n&&attachHistory(n)}),document.addEventListener(`keydown`,e=>{if(e.key===`Tab`)for(let e of document.querySelectorAll(`.cm-tooltip-autocomplete`)){let t=e.closest(`.cm-editor`),n=t?b.findFromDOM(t):null;n&&de(n)}},!0)}var La=`<rect x="5.5" y="4.5" width="5" height="7" rx="1"/><path d="M1.5 2H3V6H5.5M1.5 14H3V10H5.5M10.5 6H13V2H14.5M10.5 10H13V14H14.5"/>`,Ra=`<svg class="trace-icon" viewBox="0 0 16 16" width="22" height="22" stroke="currentColor" fill="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${La}</svg>`,za=new Set([`bpmn:EndEvent`,`bpmn:TerminateEndEvent`,`bpmn:MessageEndEvent`,`bpmn:EscalationEndEvent`,`bpmn:ErrorEndEvent`,`bpmn:CancelEndEvent`,`bpmn:CompensateEndEvent`,`bpmn:SignalEndEvent`]),Ba=new Set([`bpmn:StartEvent`,`bpmn:MessageStartEvent`,`bpmn:TimerStartEvent`,`bpmn:SignalStartEvent`,`bpmn:ErrorStartEvent`,`bpmn:EscalationStartEvent`,`bpmn:ConditionalStartEvent`,`bpmn:LinkStartEvent`]),Va=new Set([`bpmn:Process`,`bpmn:SubProcess`,`bpmn:Transaction`,`bpmn:AdHocSubProcess`]),Ha=new Set([`bpmn:SequenceFlow`,`bpmn:MessageFlow`,`bpmn:Association`,`bpmn:DataAssociation`]);function words(e){let t=e.replace(/^[a-z]+:/,``),n=`app.element.kind.${t[0].toLowerCase()}${t.slice(1)}`,i=r(n);return i===n?t.replace(/([a-z])([A-Z])/g,`$1 $2`).toLowerCase():i}function labelOf(e){let t=e?.name?.replace(/\s+/g,` `).trim();return t?`"${t}"`:r(`app.rules.theKindOf`,{kind:e?words(e.$type):r(`app.rules.compat.element`)})}function containersOf(e){let t=[],n=new Set,add=e=>{e&&!n.has(e)&&(n.add(e),t.push(e))};for(let t of e.rootElements??[])if(t.$type===`bpmn:Process`&&add(t),t.$type===`bpmn:Collaboration`)for(let e of t.participants??[])add(e.processRef);for(let e=0;e<t.length;e+=1)for(let n of t[e].flowElements??[])Va.has(n.$type)&&add(n);return t}function bpmnGraph(e,t){let n=e,r=new Map,i=[],link=(e,t,n)=>{e?.id&&t?.id&&i.push({from:e.id,to:t.id,flow:n})};for(let e of containersOf(n??{$type:`bpmn:Definitions`})){for(let t of e.flowElements??[])t.id&&!Ha.has(t.$type)&&r.set(t.id,t);for(let t of e.flowElements??[])t.$type===`bpmn:SequenceFlow`&&link(t.sourceRef,t.targetRef,t.id??null),t.$type===`bpmn:BoundaryEvent`&&link(t.attachedToRef,t,null),t.$type===`bpmn:SubProcess`&&t.triggeredByEvent&&link(e,t,null)}if(t)for(let e of n?.rootElements??[])for(let t of e.messageFlows??[])link(t.sourceRef,t.targetRef,t.id??null);let a=new Map,o=new Map;for(let e of i)r.has(e.from)&&r.has(e.to)&&(o.set(e.from,[...o.get(e.from)??[],e]),a.set(e.to,[...a.get(e.to)??[],e]));return{nodes:r,incoming:a,outgoing:o}}function bpmnSide(e,t,n,r){let i=n===`incoming`?e.incoming:e.outgoing,other=e=>n===`incoming`?e.from:e.to,a=new Set([t]),o=new Set,s=[],reach=e=>{for(let t of i.get(e)??[]){t.flow&&o.add(t.flow);let e=other(t);a.has(e)||(a.add(e),s.push(e))}};reach(t);for(let t=0;t<s.length;t+=1)r.has(e.nodes.get(s[t])?.$type??``)||reach(s[t]);return{nodes:s,flows:[...o]}}function traceBpmnPaths(e,t,n={}){let r=bpmnGraph(e,n.followMessages===!0);if(!r.nodes.has(t))return null;let i=bpmnSide(r,t,`incoming`,Ba),a=bpmnSide(r,t,`outgoing`,za);return{origin:t,originLabel:labelOf(r.nodes.get(t)),before:i.nodes,after:a.nodes,beforeFlows:i.flows,afterFlows:a.flows}}function dmnNodesOf(e,t){let visit=e=>{if(e&&e.id&&!t.has(e.id)){t.set(e.id,e);for(let t of e.childDecisions??[])visit(t)}};for(let t of e.rootElements??[])visit(t)}function dmnSide(e,t,n){let other=e=>n===`up`?e.from:e.to,r=new Set([t]),i=new Set,a=[],reach=t=>{for(let o of e.get(t)??[]){(n===`up`?o.to===t:o.from===t)&&i.add(o);let e=other(o);r.has(e)||(r.add(e),a.push(e))}};reach(t);for(let e=0;e<a.length;e+=1)reach(a[e]);return{nodes:a,edges:[...i]}}function traceDmnPaths(e,t){let n=e??{$type:`dmn:Definitions`},r=new Map;if(dmnNodesOf(n,r),!r.has(t))return null;let i=new Map,a=new Map;for(let e of r.values())if(e.id)for(let t of e.requires??[]){let n=t.requiredInput??t.requiredDecision,o=typeof n==`string`?n:n?.id;if(!o||!r.has(o)||!e.id)continue;let s={from:o,to:e.id};i.set(s.to,[...i.get(s.to)??[],s]),a.set(s.from,[...a.get(s.from)??[],s])}let o=dmnSide(i,t,`up`),s=dmnSide(a,t,`down`);return{origin:t,originLabel:labelOf(r.get(t)),before:o.nodes,after:s.nodes,beforeEdges:o.edges,afterEdges:s.edges}}var Ua=`penstock-trace-before`,Wa=`penstock-trace-after`,Ga=`penstock-trace-origin`,Ka=`penstock-trace-dim`,qa=`penstock-trace-label`,Ja=`penstock-trace-label-dim`,Ya=[Ua,Wa,Ga,Ka,qa,Ja],Xa=new Set([`bpmn:SubProcess`,`bpmn:Transaction`,`bpmn:AdHocSubProcess`]),Za=/Task$|Event$|Gateway$|Activity$/;function isBpmnFlowNode(e){return e?.$type?typeof e.$instanceOf==`function`?e.$instanceOf(`bpmn:FlowNode`):Za.test(e.$type)||Xa.has(e.$type):!1}function isDmnDecision(e){return e?.$type===`dmn:Decision`}function isTraceable(e,t,n){if(!t)return!1;let r=e?.get?.(`elementRegistry`,!1)?.get?.(t);return!!r?.businessObject&&n(r.businessObject)}function bpmnTraceOf(e,t,n){return!t||!isTraceable(e,t,isBpmnFlowNode)?null:traceBpmnPaths(e.getDefinitions?.(),t,{followMessages:n})}function rootsOf(e){let t=e,n=t?.rootElements??t?.drgElement?.rootElements;return Array.isArray(n)&&n.length>0?{$type:`dmn:Definitions`,rootElements:n}:null}function drdOf(e){let t=new Map;return e?.forEach(e=>{let n=e?.businessObject;n?.id&&!t.has(n.id)&&t.set(n.id,{$type:n.$type??``,id:n.id,...n.name?{name:n.name}:{}})}),e?.forEach(e=>{let n=e?.businessObject?.$type===`dmn:InformationRequirement`,r=e?.source?.businessObject?.id,i=e?.target?.businessObject?.id;if(!n||!r||!i)return;let a=t.get(i);a&&t.has(r)&&(a.requires=[...a.requires??[],{requiredInput:{id:r}}])}),{$type:`dmn:Definitions`,rootElements:[...t.values()]}}function dmnTraceOf(e,t,n){if(!n)return null;let r=t?.get?.(`elementRegistry`,!1)?.get?.(n);return isDmnDecision(r?.businessObject)?traceDmnPaths(rootsOf(e)??drdOf(t?.get?.(`elementRegistry`,!1)),n):null}var Qa={before:Ua,after:Wa,origin:Ga,dim:Ka};function clearTrace(e,t){t.forEach(t=>{for(let n of Ya)e.hasMarker?.(t,n)!==!1&&e.removeMarker(t,n)})}function paintTrace(e,t,n){clearTrace(e,t),t.forEach(t=>{if(!t.parent)return;let r=t.labelTarget,i=n(r||t);i&&e.addMarker(t,r?i===`dim`?Ja:qa:Qa[i])})}function bpmnToneOf(e){let t=new Set(e.before),n=new Set(e.after),r=new Set([...e.beforeFlows,...e.afterFlows]),i=new Set(e.afterFlows);return a=>{let o=a.id;return o?r.has(o)?i.has(o)?`after`:`before`:o===e.origin?`origin`:n.has(o)?`after`:t.has(o)?`before`:`dim`:null}}function dmnToneOf(e){let t=new Set(e.before),n=new Set(e.after),edgeKey=(e,t)=>`${e}>${t}`,r=new Set(e.beforeEdges.map(e=>edgeKey(e.from,e.to))),i=new Set(e.afterEdges.map(e=>edgeKey(e.from,e.to)));return a=>{let o=a.id;if(!o)return null;let s=a.source?.id,c=a.target?.id;if(s&&c){let e=edgeKey(s,c);return i.has(e)?`after`:r.has(e)?`before`:`dim`}return o===e.origin?`origin`:n.has(o)?`after`:t.has(o)?`before`:`dim`}}var Q=`http://www.w3.org/2000/svg`,$a=[[`before`,`--theme-trace-before`],[`after`,`--theme-trace-after`],[`dim`,`--theme-trace-dim-stroke`]];function traceArrowOf(e){return`penstock-trace-arrow-${e}`}function arrowMarker(e,t,n){let r=e.createElementNS(Q,`marker`);r.setAttribute(`id`,traceArrowOf(t)),r.setAttribute(`viewBox`,`0 0 20 20`),r.setAttribute(`refX`,`11`),r.setAttribute(`refY`,`10`),r.setAttribute(`markerWidth`,`20`),r.setAttribute(`markerHeight`,`20`),r.setAttribute(`markerUnits`,`userSpaceOnUse`),r.setAttribute(`orient`,`auto`);let i=e.createElementNS(Q,`path`);return i.setAttribute(`d`,`M 1 5 L 11 10 L 1 15 Z`),i.setAttribute(`style`,`stroke-width: 1px; stroke-linecap: round; stroke-dasharray: 10000, 1; fill: var(${n}); stroke: none;`),r.appendChild(i),r}function ensureTraceArrows(e){let t=(e?.get?.(`canvas`,!1)?.getContainer?.())?.querySelector?.(`svg`),n=t?.querySelector?.(`defs`)??t?.ownerDocument?.createElementNS?.(Q,`defs`);if(t&&n){n.parentNode||t.appendChild(n);for(let[e,r]of $a)n.querySelector(`#${traceArrowOf(e)}`)||n.appendChild(arrowMarker(t.ownerDocument,e,r))}}function traceTally(e,t,n){return r(`app.tracePaths.tracingBeforeAfter`,{label:e,before:t,after:n})}function canvasOf(e){let t=e?.get?.(`canvas`,!1),n=e?.get?.(`elementRegistry`,!1);return t&&n?{canvas:t,registry:n}:null}function clearTraceOn(e){let t=canvasOf(e);t&&clearTrace(t.canvas,t.registry)}function bpmnTraceReading(e,t,n){let r=bpmnTraceOf(e,t,n);return r?{label:r.originLabel,before:r.before.length,after:r.after.length}:null}function dmnTraceReading(e,t,n){let r=dmnTraceOf(e,t,n);return r?{label:r.originLabel,before:r.before.length,after:r.after.length}:null}var $=null;function paintBpmnTrace(e,t,n){let r=canvasOf(e);if(!r)return;let i=t?bpmnTraceOf(e,t,n):null;i?(paintTrace(r.canvas,r.registry,bpmnToneOf(i)),$={viewer:e,paint:e=>paintBpmnTrace(e,t,n)}):(clearTrace(r.canvas,r.registry),$=null)}function paintDmnTrace(e,t,n){let r=canvasOf(t);if(!r)return;ensureTraceArrows(t);let i=n?dmnTraceOf(e,t,n):null;i?(paintTrace(r.canvas,r.registry,dmnToneOf(i)),$={viewer:t,paint:t=>paintDmnTrace(e,t,n)}):(clearTrace(r.canvas,r.registry),$=null)}async function withoutTrace(e,t){if(!e)return t();let n=$&&$.viewer===e?$:null;clearTraceOn(e);try{return await t()}finally{n?.paint(e)}}var eo={light:{defaultFillColor:`#ffffff`,defaultStrokeColor:`#3c3f41`},dark:{defaultFillColor:`#191a1c`,defaultStrokeColor:`#afb1b3`},dracula:{defaultFillColor:`#262936`,defaultStrokeColor:`#cfcdcd`}},to={defaultStyle:{fontFamily:`Arial, sans-serif`,fontWeight:`normal`,fontSize:12,lineHeight:1.2},externalStyle:{fontFamily:`Arial, sans-serif`,fontSize:12,lineHeight:1.2}},no={defaultStyle:{fontFamily:`'Architects Daughter', Arial`,fontWeight:`normal`,fontSize:13,lineHeight:1.2},externalStyle:{fontSize:13,lineHeight:1.2}};export{Oe as C,isSatisfied as D,ln as E,ApiClient as O,FeelersEditor as S,getCompatible as T,feelHistory as _,clearTraceOn as a,Ui as b,isDmnDecision as c,paintDmnTrace as d,traceTally as f,installFeelBehaviour as g,Ra as h,bpmnTraceReading as i,getApiClient as k,isTraceable as l,La as m,no as n,dmnTraceReading as o,withoutTrace as p,eo as r,isBpmnFlowNode as s,to as t,paintBpmnTrace as u,ja as v,getCoerced as w,Wi as x,FeelEditor as y};
|