@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,78 @@
|
|
|
1
|
+
import{i as e,o as t,t as n}from"./rolldown-runtime-B8BYMn-z.js";import{_ as r,c as i,d as a,f as o,g as s,h as c,i as d,m as f,o as p,r as m,s as g,t as v,u as b}from"./vendor-NJP34MHU.js";import{A as x,E as w,I as T,L as E,M as D,S as A,_ as j,b as M,c as N,d as P,f as R,g as B,h as V,m as H,n as ee,t as U,v as G,x as K,y as J}from"./dist-CRJyslwo.js";import{t as te}from"./dist-BqwyxNP3.js";import{n as ne,r as ce,t as le}from"./lib--h_vArmx.js";import{t as ue}from"./dist--PmHUHDp.js";import{a as de,i as fe,n as pe,r as me}from"./dist-CxyFqsL2.js";import{t as he}from"./purify.es-CyDa74pG.js";H();var ge=20,_e=1,ve=1e6,ye=1e6,be=-7,xe=21,Se=!1,Ce=`[big.js] `,Ee=Ce+`Invalid `,De=Ee+`decimal places`,Ae=Ee+`rounding mode`,je=Ce+`Division by zero`,Y={},Me=void 0,Ne=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function _Big_(){function Big(e){var t=this;if(!(t instanceof Big))return e===Me&&arguments.length===0?_Big_():new Big(e);if(e instanceof Big)t.s=e.s,t.e=e.e,t.c=e.c.slice();else{if(typeof e!=`string`){if(Big.strict===!0&&typeof e!=`bigint`)throw TypeError(Ee+`value`);e=e===0&&1/e<0?`-0`:String(e)}parse$1(t,e)}t.constructor=Big}return Big.prototype=Y,Big.DP=ge,Big.RM=_e,Big.NE=be,Big.PE=xe,Big.strict=Se,Big.roundDown=0,Big.roundHalfUp=1,Big.roundHalfEven=2,Big.roundUp=3,Big}function parse$1(e,t){var n,r,i;if(!Ne.test(t))throw Error(Ee+`number`);for(e.s=t.charAt(0)==`-`?(t=t.slice(1),-1):1,(n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),i=t.length,r=0;r<i&&t.charAt(r)==`0`;)++r;if(r==i)e.c=[e.e=0];else{for(;i>0&&t.charAt(--i)==`0`;);for(e.e=n-r-1,e.c=[],n=0;r<=i;)e.c[n++]=+t.charAt(r++)}return e}e(parse$1,`parse`);function round(e,t,n,r){var i=e.c;if(n===Me&&(n=e.constructor.RM),n!==0&&n!==1&&n!==2&&n!==3)throw Error(Ae);if(t<1)r=n===3&&(r||!!i[0])||t===0&&(n===1&&i[0]>=5||n===2&&(i[0]>5||i[0]===5&&(r||i[1]!==Me))),i.length=1,r?(e.e=e.e-t+1,i[0]=1):i[0]=e.e=0;else if(t<i.length){if(r=n===1&&i[t]>=5||n===2&&(i[t]>5||i[t]===5&&(r||i[t+1]!==Me||i[t-1]&1))||n===3&&(r||!!i[0]),i.length=t,r){for(;++i[--t]>9;)if(i[t]=0,t===0){++e.e,i.unshift(1);break}}for(t=i.length;!i[--t];)i.pop()}return e}function stringify(e,t,n){var r=e.e,i=e.c.join(``),a=i.length;if(t)i=i.charAt(0)+(a>1?`.`+i.slice(1):``)+(r<0?`e`:`e+`)+r;else if(r<0){for(;++r;)i=`0`+i;i=`0.`+i}else if(r>0){if(++r>a)for(r-=a;r--;)i+=`0`;else r<a&&(i=i.slice(0,r)+`.`+i.slice(r))}else a>1&&(i=i.charAt(0)+`.`+i.slice(1));return e.s<0&&n?`-`+i:i}Y.abs=function(){var e=new this.constructor(this);return e.s=1,e},Y.cmp=function(e){var t,n=this,r=n.c,i=(e=new n.constructor(e)).c,a=n.s,o=e.s,s=n.e,c=e.e;if(!r[0]||!i[0])return r[0]?a:i[0]?-o:0;if(a!=o)return a;if(t=a<0,s!=c)return s>c^t?1:-1;for(o=(s=r.length)<(c=i.length)?s:c,a=-1;++a<o;)if(r[a]!=i[a])return r[a]>i[a]^t?1:-1;return s==c?0:s>c^t?1:-1},Y.div=function(e){var t=this,n=t.constructor,r=t.c,i=(e=new n(e)).c,a=t.s==e.s?1:-1,o=n.DP;if(o!==~~o||o<0||o>ve)throw Error(De);if(!i[0])throw Error(je);if(!r[0])return e.s=a,e.c=[e.e=0],e;var s,c,d,f,p,m=i.slice(),g=s=i.length,v=r.length,b=r.slice(0,s),x=b.length,w=e,T=w.c=[],E=0,D=o+(w.e=t.e-e.e)+1;for(w.s=a,a=D<0?0:D,m.unshift(0);x++<s;)b.push(0);do{for(d=0;d<10;d++){if(s!=(x=b.length))f=s>x?1:-1;else for(p=-1,f=0;++p<s;)if(i[p]!=b[p]){f=i[p]>b[p]?1:-1;break}if(f<0){for(c=x==s?i:m;x;){if(b[--x]<c[x]){for(p=x;p&&!b[--p];)b[p]=9;--b[p],b[x]+=10}b[x]-=c[x]}for(;!b[0];)b.shift()}else break}T[E++]=f?d:++d,b[0]&&f?b[x]=r[g]||0:b=[r[g]]}while((g++<v||b[0]!==Me)&&a--);return!T[0]&&E!=1&&(T.shift(),w.e--,D--),E>D&&round(w,D,n.RM,b[0]!==Me),w},Y.eq=function(e){return this.cmp(e)===0},Y.gt=function(e){return this.cmp(e)>0},Y.gte=function(e){return this.cmp(e)>-1},Y.lt=function(e){return this.cmp(e)<0},Y.lte=function(e){return this.cmp(e)<1},Y.minus=Y.sub=function(e){var t,n,r,i,a=this,o=a.constructor,s=a.s,c=(e=new o(e)).s;if(s!=c)return e.s=-c,a.plus(e);var d=a.c.slice(),f=a.e,p=e.c,m=e.e;if(!d[0]||!p[0])return p[0]?e.s=-c:d[0]?e=new o(a):e.s=1,e;if(s=f-m){for((i=s<0)?(s=-s,r=d):(m=f,r=p),r.reverse(),c=s;c--;)r.push(0);r.reverse()}else for(n=((i=d.length<p.length)?d:p).length,s=c=0;c<n;c++)if(d[c]!=p[c]){i=d[c]<p[c];break}if(i&&(r=d,d=p,p=r,e.s=-e.s),(c=(n=p.length)-(t=d.length))>0)for(;c--;)d[t++]=0;for(c=t;n>s;){if(d[--n]<p[n]){for(t=n;t&&!d[--t];)d[t]=9;--d[t],d[n]+=10}d[n]-=p[n]}for(;d[--c]===0;)d.pop();for(;d[0]===0;)d.shift(),--m;return d[0]||(e.s=1,d=[m=0]),e.c=d,e.e=m,e},Y.mod=function(e){var t,n=this,r=n.constructor,i=n.s,a=(e=new r(e)).s;if(!e.c[0])throw Error(je);return n.s=e.s=1,t=e.cmp(n)==1,n.s=i,e.s=a,t?new r(n):(i=r.DP,a=r.RM,r.DP=r.RM=0,n=n.div(e),r.DP=i,r.RM=a,this.minus(n.times(e)))},Y.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},Y.plus=Y.add=function(e){var t,n,r,i=this,a=i.constructor;if(e=new a(e),i.s!=e.s)return e.s=-e.s,i.minus(e);var o=i.e,s=i.c,c=e.e,d=e.c;if(!s[0]||!d[0])return d[0]||(s[0]?e=new a(i):e.s=i.s),e;if(s=s.slice(),t=o-c){for(t>0?(c=o,r=d):(t=-t,r=s),r.reverse();t--;)r.push(0);r.reverse()}for(s.length-d.length<0&&(r=d,d=s,s=r),t=d.length,n=0;t;s[t]%=10)n=(s[--t]=s[t]+d[t]+n)/10|0;for(n&&(s.unshift(n),++c),t=s.length;s[--t]===0;)s.pop();return e.c=s,e.e=c,e},Y.pow=function(e){var t=this,n=new t.constructor(`1`),r=n,i=e<0;if(e!==~~e||e<-1e6||e>ye)throw Error(Ee+`exponent`);for(i&&(e=-e);e&1&&(r=r.times(t)),e>>=1,e;)t=t.times(t);return i?n.div(r):r},Y.prec=function(e,t){if(e!==~~e||e<1||e>ve)throw Error(Ee+`precision`);return round(new this.constructor(this),e,t)},Y.round=function(e,t){if(e===Me)e=0;else if(e!==~~e||e<-1e6||e>ve)throw Error(De);return round(new this.constructor(this),e+this.e+1,t)},Y.sqrt=function(){var e,t,n,r=this,i=r.constructor,a=r.s,o=r.e,s=new i(`0.5`);if(!r.c[0])return new i(r);if(a<0)throw Error(Ce+`No square root`);a=Math.sqrt(+stringify(r,!0,!0)),a===0||a===1/0?(t=r.c.join(``),t.length+o&1||(t+=`0`),a=Math.sqrt(t),o=((o+1)/2|0)-(o<0||o&1),e=new i((a==1/0?`5e`:(a=a.toExponential()).slice(0,a.indexOf(`e`)+1))+o)):e=new i(a+``),o=e.e+(i.DP+=4);do n=e,e=s.times(n.plus(r.div(n)));while(n.c.slice(0,o).join(``)!==e.c.slice(0,o).join(``));return round(e,(i.DP-=4)+e.e+1,i.RM)},Y.times=Y.mul=function(e){var t,n=this,r=n.constructor,i=n.c,a=(e=new r(e)).c,o=i.length,s=a.length,c=n.e,d=e.e;if(e.s=n.s==e.s?1:-1,!i[0]||!a[0])return e.c=[e.e=0],e;for(e.e=c+d,o<s&&(t=i,i=a,a=t,d=o,o=s,s=d),t=Array(d=o+s);d--;)t[d]=0;for(c=s;c--;){for(s=0,d=o+c;d>c;)s=t[d]+a[c]*i[d-c-1]+s,t[d--]=s%10,s=s/10|0;t[d]=s}for(s?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},Y.toExponential=function(e,t){var n=this,r=n.c[0];if(e!==Me){if(e!==~~e||e<0||e>ve)throw Error(De);for(n=round(new n.constructor(n),++e,t);n.c.length<e;)n.c.push(0)}return stringify(n,!0,!!r)},Y.toFixed=function(e,t){var n=this,r=n.c[0];if(e!==Me){if(e!==~~e||e<0||e>ve)throw Error(De);for(n=round(new n.constructor(n),e+n.e+1,t),e=e+n.e+1;n.c.length<e;)n.c.push(0)}return stringify(n,!1,!!r)},Y.toJSON=Y.toString=function(){var e=this,t=e.constructor;return stringify(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},typeof Symbol<`u`&&(Y[Symbol.for(`nodejs.util.inspect.custom`)]=Y.toJSON),Y.toNumber=function(){var e=+stringify(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error(Ce+`Imprecise conversion`);return e},Y.toPrecision=function(e,t){var n=this,r=n.constructor,i=n.c[0];if(e!==Me){if(e!==~~e||e<1||e>ve)throw Error(Ee+`precision`);for(n=round(new r(n),e,t);n.c.length<e;)n.c.push(0)}return stringify(n,e<=n.e||n.e<=r.NE||n.e>=r.PE,!!i)},Y.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error(Ce+`valueOf disallowed`);return stringify(e,e.e<=t.NE||e.e>=t.PE,!0)};var Pe=_Big_(),Fe=n(((e,t)=>{function listCacheClear(){this.__data__=[],this.size=0}t.exports=listCacheClear})),Ie=n(((e,t)=>{function eq(e,t){return e===t||e!==e&&t!==t}t.exports=eq})),Le=n(((e,t)=>{var n=Ie();function assocIndexOf(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=assocIndexOf})),ze=n(((e,t)=>{var n=Le(),r=Array.prototype.splice;function listCacheDelete(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=listCacheDelete})),Be=n(((e,t)=>{var n=Le();function listCacheGet(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=listCacheGet})),Ve=n(((e,t)=>{var n=Le();function listCacheHas(e){return n(this.__data__,e)>-1}t.exports=listCacheHas})),He=n(((e,t)=>{var n=Le();function listCacheSet(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=listCacheSet})),Ue=n(((e,t)=>{var n=Fe(),r=ze(),i=Be(),a=Ve(),o=He();function ListCache(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ListCache.prototype.clear=n,ListCache.prototype.delete=r,ListCache.prototype.get=i,ListCache.prototype.has=a,ListCache.prototype.set=o,t.exports=ListCache})),We=n(((e,t)=>{var n=Ue();function stackClear(){this.__data__=new n,this.size=0}t.exports=stackClear})),Ge=n(((e,t)=>{function stackDelete(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=stackDelete})),Ke=n(((e,t)=>{function stackGet(e){return this.__data__.get(e)}t.exports=stackGet})),qe=n(((e,t)=>{function stackHas(e){return this.__data__.has(e)}t.exports=stackHas})),Je=n(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),Ye=n(((e,t)=>{var n=Je(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),Xe=n(((e,t)=>{t.exports=Ye().Symbol})),Ze=n(((e,t)=>{var n=Xe(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function getRawTag(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=getRawTag})),Qe=n(((e,t)=>{var n=Object.prototype.toString;function objectToString(e){return n.call(e)}t.exports=objectToString})),$e=n(((e,t)=>{var n=Xe(),r=Ze(),i=Qe(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function baseGetTag(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=baseGetTag})),et=n(((e,t)=>{function isObject(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=isObject})),tt=n(((e,t)=>{var n=$e(),r=et(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function isFunction(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=isFunction})),nt=n(((e,t)=>{t.exports=Ye()[`__core-js_shared__`]})),rt=n(((e,t)=>{var n=nt(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function isMasked(e){return!!r&&r in e}t.exports=isMasked})),it=n(((e,t)=>{var n=Function.prototype.toString;function toSource(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=toSource})),at=n(((e,t)=>{var n=tt(),r=rt(),i=et(),a=it(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,f=c.toString,p=d.hasOwnProperty,m=RegExp(`^`+f.call(p).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function baseIsNative(e){return!i(e)||r(e)?!1:(n(e)?m:s).test(a(e))}t.exports=baseIsNative})),ot=n(((e,t)=>{function getValue(e,t){return e?.[t]}t.exports=getValue})),st=n(((e,t)=>{var n=at(),r=ot();function getNative(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=getNative})),ct=n(((e,t)=>{t.exports=st()(Ye(),`Map`)})),lt=n(((e,t)=>{t.exports=st()(Object,`create`)})),ut=n(((e,t)=>{var n=lt();function hashClear(){this.__data__=n?n(null):{},this.size=0}t.exports=hashClear})),dt=n(((e,t)=>{function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=hashDelete})),ft=n(((e,t)=>{var n=lt(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function hashGet(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=hashGet})),pt=n(((e,t)=>{var n=lt(),r=Object.prototype.hasOwnProperty;function hashHas(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=hashHas})),mt=n(((e,t)=>{var n=lt(),r=`__lodash_hash_undefined__`;function hashSet(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=hashSet})),ht=n(((e,t)=>{var n=ut(),r=dt(),i=ft(),a=pt(),o=mt();function Hash(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hash.prototype.clear=n,Hash.prototype.delete=r,Hash.prototype.get=i,Hash.prototype.has=a,Hash.prototype.set=o,t.exports=Hash})),gt=n(((e,t)=>{var n=ht(),r=Ue(),i=ct();function mapCacheClear(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=mapCacheClear})),_t=n(((e,t)=>{function isKeyable(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=isKeyable})),vt=n(((e,t)=>{var n=_t();function getMapData(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=getMapData})),bt=n(((e,t)=>{var n=vt();function mapCacheDelete(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=mapCacheDelete})),xt=n(((e,t)=>{var n=vt();function mapCacheGet(e){return n(this,e).get(e)}t.exports=mapCacheGet})),St=n(((e,t)=>{var n=vt();function mapCacheHas(e){return n(this,e).has(e)}t.exports=mapCacheHas})),Ct=n(((e,t)=>{var n=vt();function mapCacheSet(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=mapCacheSet})),wt=n(((e,t)=>{var n=gt(),r=bt(),i=xt(),a=St(),o=Ct();function MapCache(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}MapCache.prototype.clear=n,MapCache.prototype.delete=r,MapCache.prototype.get=i,MapCache.prototype.has=a,MapCache.prototype.set=o,t.exports=MapCache})),Tt=n(((e,t)=>{var n=Ue(),r=ct(),i=wt(),a=200;function stackSet(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=stackSet})),Et=n(((e,t)=>{var n=Ue(),r=We(),i=Ge(),a=Ke(),o=qe(),s=Tt();function Stack(e){var t=this.__data__=new n(e);this.size=t.size}Stack.prototype.clear=r,Stack.prototype.delete=i,Stack.prototype.get=a,Stack.prototype.has=o,Stack.prototype.set=s,t.exports=Stack})),Dt=n(((e,t)=>{function setCacheAdd(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=setCacheAdd})),Ot=n(((e,t)=>{function setCacheHas(e){return this.__data__.has(e)}t.exports=setCacheHas})),kt=n(((e,t)=>{var n=wt(),r=Dt(),i=Ot();function SetCache(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=r,SetCache.prototype.has=i,t.exports=SetCache})),At=n(((e,t)=>{function arraySome(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=arraySome})),jt=n(((e,t)=>{function cacheHas(e,t){return e.has(t)}t.exports=cacheHas})),Mt=n(((e,t)=>{var n=kt(),r=At(),i=jt(),a=1,o=2;function equalArrays(e,t,s,c,d,f){var p=s&a,m=e.length,g=t.length;if(m!=g&&!(p&&g>m))return!1;var v=f.get(e),b=f.get(t);if(v&&b)return v==t&&b==e;var x=-1,w=!0,T=s&o?new n:void 0;for(f.set(e,t),f.set(t,e);++x<m;){var E=e[x],D=t[x];if(c)var A=p?c(D,E,x,t,e,f):c(E,D,x,e,t,f);if(A!==void 0){if(A)continue;w=!1;break}if(T){if(!r(t,function(e,t){if(!i(T,t)&&(E===e||d(E,e,s,c,f)))return T.push(t)})){w=!1;break}}else if(!(E===D||d(E,D,s,c,f))){w=!1;break}}return f.delete(e),f.delete(t),w}t.exports=equalArrays})),Nt=n(((e,t)=>{t.exports=Ye().Uint8Array})),Ft=n(((e,t)=>{function mapToArray(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=mapToArray})),It=n(((e,t)=>{function setToArray(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=setToArray})),Lt=n(((e,t)=>{var n=Xe(),r=Nt(),i=Ie(),a=Mt(),o=Ft(),s=It(),c=1,d=2,f=`[object Boolean]`,p=`[object Date]`,m=`[object Error]`,g=`[object Map]`,v=`[object Number]`,b=`[object RegExp]`,x=`[object Set]`,w=`[object String]`,T=`[object Symbol]`,E=`[object ArrayBuffer]`,D=`[object DataView]`,A=n?n.prototype:void 0,j=A?A.valueOf:void 0;function equalByTag(e,t,n,A,M,N,P){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!N(new r(e),new r(t)));case f:case p:case v:return i(+e,+t);case m:return e.name==t.name&&e.message==t.message;case b:case w:return e==t+``;case g:var R=o;case x:var B=A&c;if(R||=s,e.size!=t.size&&!B)return!1;var V=P.get(e);if(V)return V==t;A|=d,P.set(e,t);var H=a(R(e),R(t),A,M,N,P);return P.delete(e),H;case T:if(j)return j.call(e)==j.call(t)}return!1}t.exports=equalByTag})),Rt=n(((e,t)=>{function arrayPush(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=arrayPush})),zt=n(((e,t)=>{t.exports=Array.isArray})),Bt=n(((e,t)=>{var n=Rt(),r=zt();function baseGetAllKeys(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=baseGetAllKeys})),Vt=n(((e,t)=>{function arrayFilter(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=arrayFilter})),Ht=n(((e,t)=>{function stubArray(){return[]}t.exports=stubArray})),Ut=n(((e,t)=>{var n=Vt(),r=Ht(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Wt=n(((e,t)=>{function baseTimes(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=baseTimes})),Gt=n(((e,t)=>{function isObjectLike(e){return typeof e==`object`&&!!e}t.exports=isObjectLike})),Kt=n(((e,t)=>{var n=$e(),r=Gt(),i=`[object Arguments]`;function baseIsArguments(e){return r(e)&&n(e)==i}t.exports=baseIsArguments})),qt=n(((e,t)=>{var n=Kt(),r=Gt(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Jt=n(((e,t)=>{function stubFalse(){return!1}t.exports=stubFalse})),Yt=n(((e,t)=>{var n=Ye(),r=Jt(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Xt=n(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=isIndex})),Zt=n(((e,t)=>{function isLength(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=isLength})),Qt=n(((e,t)=>{var n=$e(),r=Zt(),i=Gt(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,d=`[object Error]`,f=`[object Function]`,p=`[object Map]`,m=`[object Number]`,g=`[object Object]`,v=`[object RegExp]`,b=`[object Set]`,x=`[object String]`,w=`[object WeakMap]`,T=`[object ArrayBuffer]`,E=`[object DataView]`,D=`[object Float32Array]`,A=`[object Float64Array]`,j=`[object Int8Array]`,M=`[object Int16Array]`,N=`[object Int32Array]`,P=`[object Uint8Array]`,R=`[object Uint8ClampedArray]`,B=`[object Uint16Array]`,V=`[object Uint32Array]`,H={};H[D]=H[A]=H[j]=H[M]=H[N]=H[P]=H[R]=H[B]=H[V]=!0,H[a]=H[o]=H[T]=H[s]=H[E]=H[c]=H[d]=H[f]=H[p]=H[m]=H[g]=H[v]=H[b]=H[x]=H[w]=!1;function baseIsTypedArray(e){return i(e)&&r(e.length)&&!!H[n(e)]}t.exports=baseIsTypedArray})),$t=n(((e,t)=>{function baseUnary(e){return function(t){return e(t)}}t.exports=baseUnary})),en=n(((e,t)=>{var n=Je(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),tn=n(((e,t)=>{var n=Qt(),r=$t(),i=en(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),nn=n(((e,t)=>{var n=Wt(),r=qt(),i=zt(),a=Yt(),o=Xt(),s=tn(),c=Object.prototype.hasOwnProperty;function arrayLikeKeys(e,t){var d=i(e),f=!d&&r(e),p=!d&&!f&&a(e),m=!d&&!f&&!p&&s(e),g=d||f||p||m,v=g?n(e.length,String):[],b=v.length;for(var x in e)(t||c.call(e,x))&&!(g&&(x==`length`||p&&(x==`offset`||x==`parent`)||m&&(x==`buffer`||x==`byteLength`||x==`byteOffset`)||o(x,b)))&&v.push(x);return v}t.exports=arrayLikeKeys})),rn=n(((e,t)=>{var n=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=isPrototype})),an=n(((e,t)=>{function overArg(e,t){return function(n){return e(t(n))}}t.exports=overArg})),on=n(((e,t)=>{t.exports=an()(Object.keys,Object)})),sn=n(((e,t)=>{var n=rn(),r=on(),i=Object.prototype.hasOwnProperty;function baseKeys(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=baseKeys})),cn=n(((e,t)=>{var n=tt(),r=Zt();function isArrayLike(e){return e!=null&&r(e.length)&&!n(e)}t.exports=isArrayLike})),ln=n(((e,t)=>{var n=nn(),r=sn(),i=cn();function keys(e){return i(e)?n(e):r(e)}t.exports=keys})),un=n(((e,t)=>{var n=Bt(),r=Ut(),i=ln();function getAllKeys(e){return n(e,i,r)}t.exports=getAllKeys})),dn=n(((e,t)=>{var n=un(),r=1,i=Object.prototype.hasOwnProperty;function equalObjects(e,t,a,o,s,c){var d=a&r,f=n(e),p=f.length;if(p!=n(t).length&&!d)return!1;for(var m=p;m--;){var g=f[m];if(!(d?g in t:i.call(t,g)))return!1}var v=c.get(e),b=c.get(t);if(v&&b)return v==t&&b==e;var x=!0;c.set(e,t),c.set(t,e);for(var w=d;++m<p;){g=f[m];var T=e[g],E=t[g];if(o)var D=d?o(E,T,g,t,e,c):o(T,E,g,e,t,c);if(!(D===void 0?T===E||s(T,E,a,o,c):D)){x=!1;break}w||=g==`constructor`}if(x&&!w){var A=e.constructor,j=t.constructor;A!=j&&`constructor`in e&&`constructor`in t&&!(typeof A==`function`&&A instanceof A&&typeof j==`function`&&j instanceof j)&&(x=!1)}return c.delete(e),c.delete(t),x}t.exports=equalObjects})),fn=n(((e,t)=>{t.exports=st()(Ye(),`DataView`)})),pn=n(((e,t)=>{t.exports=st()(Ye(),`Promise`)})),mn=n(((e,t)=>{t.exports=st()(Ye(),`Set`)})),hn=n(((e,t)=>{t.exports=st()(Ye(),`WeakMap`)})),gn=n(((e,t)=>{var n=fn(),r=ct(),i=pn(),a=mn(),o=hn(),s=$e(),c=it(),d=`[object Map]`,f=`[object Object]`,p=`[object Promise]`,m=`[object Set]`,g=`[object WeakMap]`,v=`[object DataView]`,b=c(n),x=c(r),w=c(i),T=c(a),E=c(o),getTag=s;(n&&getTag(new n(new ArrayBuffer(1)))!=v||r&&getTag(new r)!=d||i&&getTag(i.resolve())!=p||a&&getTag(new a)!=m||o&&getTag(new o)!=g)&&(getTag=function(e){var t=s(e),n=t==f?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case b:return v;case x:return d;case w:return p;case T:return m;case E:return g}return t}),t.exports=getTag})),_n=n(((e,t)=>{var n=Et(),r=Mt(),i=Lt(),a=dn(),o=gn(),s=zt(),c=Yt(),d=tn(),f=1,p=`[object Arguments]`,m=`[object Array]`,g=`[object Object]`,v=Object.prototype.hasOwnProperty;function baseIsEqualDeep(e,t,b,x,w,T){var E=s(e),D=s(t),A=E?m:o(e),j=D?m:o(t);A=A==p?g:A,j=j==p?g:j;var M=A==g,N=j==g,P=A==j;if(P&&c(e)){if(!c(t))return!1;E=!0,M=!1}if(P&&!M)return T||=new n,E||d(e)?r(e,t,b,x,w,T):i(e,t,A,b,x,w,T);if(!(b&f)){var R=M&&v.call(e,`__wrapped__`),B=N&&v.call(t,`__wrapped__`);if(R||B){var V=R?e.value():e,H=B?t.value():t;return T||=new n,w(V,H,b,x,T)}}return P?(T||=new n,a(e,t,b,x,w,T)):!1}t.exports=baseIsEqualDeep})),vn=n(((e,t)=>{var n=_n(),r=Gt();function baseIsEqual(e,t,i,a,o){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,i,a,baseIsEqual,o)}t.exports=baseIsEqual})),yn=n(((e,t)=>{var n=vn();function isEqual(e,t){return n(e,t)}t.exports=isEqual})),X=t(ce()),bn=t(yn()),LuxonError=class extends Error{},InvalidDateTimeError=class extends LuxonError{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},InvalidIntervalError=class extends LuxonError{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},InvalidDurationError=class extends LuxonError{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},ConflictingSpecificationError=class extends LuxonError{},InvalidUnitError=class extends LuxonError{constructor(e){super(`Invalid unit ${e}`)}},InvalidArgumentError=class extends LuxonError{},ZoneIsAbstractError=class extends LuxonError{constructor(){super(`Zone is an abstract class`)}},Z=`numeric`,xn=`short`,Sn=`long`,Cn={year:Z,month:Z,day:Z},wn={year:Z,month:xn,day:Z},Tn={year:Z,month:xn,day:Z,weekday:xn},En={year:Z,month:Sn,day:Z},Dn={year:Z,month:Sn,day:Z,weekday:Sn},On={hour:Z,minute:Z},kn={hour:Z,minute:Z,second:Z},An={hour:Z,minute:Z,second:Z,timeZoneName:xn},jn={hour:Z,minute:Z,second:Z,timeZoneName:Sn},Mn={hour:Z,minute:Z,hourCycle:`h23`},Nn={hour:Z,minute:Z,second:Z,hourCycle:`h23`},Pn={hour:Z,minute:Z,second:Z,hourCycle:`h23`,timeZoneName:xn},Fn={hour:Z,minute:Z,second:Z,hourCycle:`h23`,timeZoneName:Sn},In={year:Z,month:Z,day:Z,hour:Z,minute:Z},Ln={year:Z,month:Z,day:Z,hour:Z,minute:Z,second:Z},Rn={year:Z,month:xn,day:Z,hour:Z,minute:Z},zn={year:Z,month:xn,day:Z,hour:Z,minute:Z,second:Z},Bn={year:Z,month:xn,day:Z,weekday:xn,hour:Z,minute:Z},Vn={year:Z,month:Sn,day:Z,hour:Z,minute:Z,timeZoneName:xn},Hn={year:Z,month:Sn,day:Z,hour:Z,minute:Z,second:Z,timeZoneName:xn},Un={year:Z,month:Sn,day:Z,weekday:Sn,hour:Z,minute:Z,timeZoneName:Sn},Wn={year:Z,month:Sn,day:Z,weekday:Sn,hour:Z,minute:Z,second:Z,timeZoneName:Sn},Zone=class{get type(){throw new ZoneIsAbstractError}get name(){throw new ZoneIsAbstractError}get ianaName(){return this.name}get isUniversal(){throw new ZoneIsAbstractError}offsetName(e,t){throw new ZoneIsAbstractError}formatOffset(e,t){throw new ZoneIsAbstractError}offset(e){throw new ZoneIsAbstractError}equals(e){throw new ZoneIsAbstractError}get isValid(){throw new ZoneIsAbstractError}},Gn=null,Kn=class SystemZone extends Zone{static get instance(){return Gn===null&&(Gn=new SystemZone),Gn}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return parseZoneInfo(e,t,n)}formatOffset(e,t){return formatOffset(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},qn=new Map;function makeDTF(e){let t=qn.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),qn.set(e,t)),t}var Jn={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function hackyOffset(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,d]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,d]}function partsOffset(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=Jn[t];t===`era`?r[a]=i:isUndefined(a)||(r[a]=parseInt(i,10))}return r}var Yn=new Map,Xn=class IANAZone extends Zone{static create(e){let t=Yn.get(e);return t===void 0&&Yn.set(e,t=new IANAZone(e)),t}static resetCache(){Yn.clear(),qn.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=IANAZone.isValidZone(e)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return parseZoneInfo(e,t,n,this.name)}formatOffset(e,t){return formatOffset(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=makeDTF(this.name),[r,i,a,o,s,c,d]=n.formatToParts?partsOffset(n,t):hackyOffset(n,t);o===`BC`&&(r=-Math.abs(r)+1);let f=objToLocalTS({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:d,millisecond:0}),p=+t,m=p%1e3;return p-=m>=0?m:1e3+m,(f-p)/6e4}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},Zn={};function getCachedLF(e,t={}){let n=JSON.stringify([e,t]),r=Zn[n];return r||(r=new Intl.ListFormat(e,t),Zn[n]=r),r}var Qn=new Map;function getCachedDTF(e,t={}){let n=JSON.stringify([e,t]),r=Qn.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),Qn.set(n,r)),r}var $n=new Map;function getCachedINF(e,t={}){let n=JSON.stringify([e,t]),r=$n.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),$n.set(n,r)),r}var er=new Map;function getCachedRTF(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=er.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),er.set(i,a)),a}var tr=null;function systemLocale(){return tr||(tr=new Intl.DateTimeFormat().resolvedOptions().locale,tr)}var nr=new Map;function getCachedIntResolvedOptions(e){let t=nr.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),nr.set(e,t)),t}var rr=new Map;function getCachedWeekInfo(e){let t=rr.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...ir,...t}),rr.set(e,t)}return t}function parseLocaleString(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=getCachedDTF(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=getCachedDTF(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function intlConfigString(e,t,n){return(n||t)&&(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function mapMonths(e){let t=[];for(let n=1;n<=12;n++){let r=$.utc(2009,n,1);t.push(e(r))}return t}function mapWeekdays(e){let t=[];for(let n=1;n<=7;n++){let r=$.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function supportsFastNumbers(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||getCachedIntResolvedOptions(e.locale).numberingSystem===`latn`}var PolyNumberFormatter=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}return padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)}},PolyDateFormatter=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&Xn.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=getCachedDTF(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},PolyRelFormatter=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},ir={firstDay:1,minimalDays:4,weekend:[6,7]},Q=class Locale{static fromOpts(e){return Locale.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){let a=e||Settings.defaultLocale,o=a||(i?`en-US`:systemLocale()),s=t||Settings.defaultNumberingSystem,c=n||Settings.defaultOutputCalendar,d=validateWeekSettings(r)||Settings.defaultWeekSettings;return new Locale(o,s,c,d,a)}static resetCache(){tr=null,Qn.clear(),$n.clear(),er.clear(),nr.clear(),rr.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return Locale.create(e,t,n,r)}constructor(e,t,n,r,i){let[a,o,s]=parseLocaleString(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=supportsFastNumbers(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Locale.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,validateWeekSettings(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return listStuff(this,e,months,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=mapMonths(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return listStuff(this,e,weekdays,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=mapWeekdays(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return listStuff(this,void 0,()=>Er,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[$.utc(2016,11,13,9),$.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return listStuff(this,e,eras,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[$.utc(-40,1,1),$.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new PolyNumberFormatter(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new PolyDateFormatter(e,this.intl,t)}relFormatter(e={}){return new PolyRelFormatter(this.intl,this.isEnglish(),e)}listFormatter(e={}){return getCachedLF(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||getCachedIntResolvedOptions(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:hasLocaleWeekInfo()?getCachedWeekInfo(this.locale):ir}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},ar=null,or=class FixedOffsetZone extends Zone{static get utcInstance(){return ar===null&&(ar=new FixedOffsetZone(0)),ar}static instance(e){return e===0?FixedOffsetZone.utcInstance:new FixedOffsetZone(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new FixedOffsetZone(signedOffset(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${formatOffset(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${formatOffset(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return formatOffset(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},InvalidZone=class extends Zone{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function normalizeZone(e,t){if(isUndefined(e)||e===null)return t;if(e instanceof Zone)return e;if(isString(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?Kn.instance:n===`utc`||n===`gmt`?or.utcInstance:or.parseSpecifier(n)||Xn.create(e)}return isNumber(e)?or.instance(e):typeof e==`object`&&`offset`in e&&typeof e.offset==`function`?e:new InvalidZone(e)}var sr={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},cr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},lr=sr.hanidec.replace(/[\[|\]]/g,``).split(``);function parseDigits(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(sr.hanidec)!==-1)t+=lr.indexOf(e[n]);else for(let e in cr){let[n,i]=cr[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}var ur=new Map;function resetDigitRegexCache(){ur.clear()}function digitRegex({numberingSystem:e},t=``){let n=e||`latn`,r=ur.get(n);r===void 0&&(r=new Map,ur.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${sr[n]}${t}`),r.set(t,i)),i}var now=()=>Date.now(),dr=`system`,fr=null,pr=null,mr=null,hr=60,gr,_r=null,Settings=class{static get now(){return now}static set now(e){now=e}static set defaultZone(e){dr=e}static get defaultZone(){return normalizeZone(dr,Kn.instance)}static get defaultLocale(){return fr}static set defaultLocale(e){fr=e}static get defaultNumberingSystem(){return pr}static set defaultNumberingSystem(e){pr=e}static get defaultOutputCalendar(){return mr}static set defaultOutputCalendar(e){mr=e}static get defaultWeekSettings(){return _r}static set defaultWeekSettings(e){_r=validateWeekSettings(e)}static get twoDigitCutoffYear(){return hr}static set twoDigitCutoffYear(e){hr=e%100}static get throwOnInvalid(){return gr}static set throwOnInvalid(e){gr=e}static resetCaches(){Q.resetCache(),Xn.resetCache(),$.resetCache(),resetDigitRegexCache()}},Invalid=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},vr=[0,31,59,90,120,151,181,212,243,273,304,334],yr=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function dayOfWeek(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?yr:vr)[t-1]}function uncomputeOrdinal(e,t){let n=isLeapYear(e)?yr:vr,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function isoWeekdayToLocal(e,t){return(e-t+7)%7+1}function gregorianToWeek(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=computeOrdinal(r,i,a),s=isoWeekdayToLocal(dayOfWeek(r,i,a),n),c=Math.floor((o-s+14-t)/7),d;return c<1?(d=r-1,c=weeksInWeekYear(d,t,n)):c>weeksInWeekYear(r,t,n)?(d=r+1,c=1):d=r,{weekYear:d,weekNumber:c,weekday:s,...timeObject(e)}}function weekToGregorian(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=isoWeekdayToLocal(dayOfWeek(r,1,t),n),s=daysInYear(r),c=i*7+a-o-7+t,d;c<1?(d=r-1,c+=daysInYear(d)):c>s?(d=r+1,c-=daysInYear(r)):d=r;let{month:f,day:p}=uncomputeOrdinal(d,c);return{year:d,month:f,day:p,...timeObject(e)}}function gregorianToOrdinal(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:computeOrdinal(t,n,r),...timeObject(e)}}function ordinalToGregorian(e){let{year:t,ordinal:n}=e,{month:r,day:i}=uncomputeOrdinal(t,n);return{year:t,month:r,day:i,...timeObject(e)}}function usesLocalWeekValues(e,t){if(!isUndefined(e.localWeekday)||!isUndefined(e.localWeekNumber)||!isUndefined(e.localWeekYear)){if(!isUndefined(e.weekday)||!isUndefined(e.weekNumber)||!isUndefined(e.weekYear))throw new ConflictingSpecificationError(`Cannot mix locale-based week fields with ISO-based week fields`);return isUndefined(e.localWeekday)||(e.weekday=e.localWeekday),isUndefined(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),isUndefined(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function hasInvalidWeekData(e,t=4,n=1){let r=isInteger(e.weekYear),i=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear,t,n)),a=integerBetween(e.weekday,1,7);return r?i?!a&&unitOutOfRange(`weekday`,e.weekday):unitOutOfRange(`week`,e.weekNumber):unitOutOfRange(`weekYear`,e.weekYear)}function hasInvalidOrdinalData(e){let t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange(`ordinal`,e.ordinal):unitOutOfRange(`year`,e.year)}function hasInvalidGregorianData(e){let t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!r&&unitOutOfRange(`day`,e.day):unitOutOfRange(`month`,e.month):unitOutOfRange(`year`,e.year)}function hasInvalidTimeData(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=integerBetween(t,0,23)||t===24&&n===0&&r===0&&i===0,o=integerBetween(n,0,59),s=integerBetween(r,0,59),c=integerBetween(i,0,999);return a?o?s?!c&&unitOutOfRange(`millisecond`,i):unitOutOfRange(`second`,r):unitOutOfRange(`minute`,n):unitOutOfRange(`hour`,t)}function isUndefined(e){return e===void 0}function isNumber(e){return typeof e==`number`}function isInteger(e){return typeof e==`number`&&e%1==0}function isString(e){return typeof e==`string`}function isDate(e){return Object.prototype.toString.call(e)===`[object Date]`}function hasRelative(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function hasLocaleWeekInfo(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function pick(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function validateWeekSettings(e){if(e==null)return null;if(typeof e!=`object`)throw new InvalidArgumentError(`Week settings must be an object`);if(!integerBetween(e.firstDay,1,7)||!integerBetween(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!integerBetween(e,1,7)))throw new InvalidArgumentError(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function integerBetween(e,t,n){return isInteger(e)&&e>=t&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function parseInteger(e){if(!(isUndefined(e)||e===null||e===``))return parseInt(e,10)}function parseFloating(e){if(!(isUndefined(e)||e===null||e===``))return parseFloat(e)}function parseMillis(e){if(!(isUndefined(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function roundTo(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){let n=floorMod(t-1,12)+1,r=e+(t-n)/12;return n===2?isLeapYear(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function firstWeekOffset(e,t,n){return-isoWeekdayToLocal(dayOfWeek(e,1,t),n)+t-1}function weeksInWeekYear(e,t=4,n=1){let r=firstWeekOffset(e,t,n),i=firstWeekOffset(e+1,t,n);return(daysInYear(e)-r+i)/7}function untruncateYear(e){return e>99?e:e>Settings.twoDigitCutoffYear?1900+e:2e3+e}function parseZoneInfo(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function signedOffset(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function asNumber(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new InvalidArgumentError(`Invalid unit value ${e}`);return t}function normalizeObject(e,t){let n={};for(let r in e)if(hasOwnProperty(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=asNumber(i)}return n}function formatOffset(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${padStart(n,2)}:${padStart(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${padStart(n,2)}${padStart(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function timeObject(e){return pick(e,[`hour`,`minute`,`second`,`millisecond`])}var br=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],xr=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Sr=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function months(e){switch(e){case`narrow`:return[...Sr];case`short`:return[...xr];case`long`:return[...br];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}var Cr=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],wr=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],Tr=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function weekdays(e){switch(e){case`narrow`:return[...Tr];case`short`:return[...wr];case`long`:return[...Cr];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var Er=[`AM`,`PM`],Dr=[`Before Christ`,`Anno Domini`],Or=[`BC`,`AD`],kr=[`B`,`A`];function eras(e){switch(e){case`narrow`:return[...kr];case`short`:return[...Or];case`long`:return[...Dr];default:return null}}function meridiemForDateTime(e){return Er[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,d=i[e],f=r?c?d[1]:d[2]||d[1]:c?i[e][0]:e;return o?`${s} ${f} ago`:`in ${s} ${f}`}function stringifyTokens(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var Ar={D:Cn,DD:wn,DDD:En,DDDD:Dn,t:On,tt:kn,ttt:An,tttt:jn,T:Mn,TT:Nn,TTT:Pn,TTTT:Fn,f:In,ff:Rn,fff:Vn,ffff:Un,F:Ln,FF:zn,FFF:Hn,FFFF:Wn},jr=class Formatter{static create(e,t={}){return new Formatter(e,t)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Ar[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return padStart(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){let n=this.loc.listingMode()===`en`,r=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,string=(t,n)=>this.loc.extract(e,t,n),formatOffset=t=>e.isOffsetFixed&&e.offset===0&&t.allowZ?`Z`:e.isValid?e.zone.formatOffset(e.ts,t.format):``,meridiem=()=>n?meridiemForDateTime(e):string({hour:`numeric`,hourCycle:`h12`},`dayperiod`),month=(t,r)=>n?monthForDateTime(e,t):string(r?{month:t}:{month:t,day:`numeric`},`month`),weekday=(t,r)=>n?weekdayForDateTime(e,t):string(r?{weekday:t}:{weekday:t,month:`long`,day:`numeric`},`weekday`),maybeMacro=t=>{let n=Formatter.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},era=t=>n?eraForDateTime(e,t):string({era:t},`era`),tokenToString=t=>{switch(t){case`S`:return this.num(e.millisecond);case`u`:case`SSS`:return this.num(e.millisecond,3);case`s`:return this.num(e.second);case`ss`:return this.num(e.second,2);case`uu`:return this.num(Math.floor(e.millisecond/10),2);case`uuu`:return this.num(Math.floor(e.millisecond/100));case`m`:return this.num(e.minute);case`mm`:return this.num(e.minute,2);case`h`:return this.num(e.hour%12==0?12:e.hour%12);case`hh`:return this.num(e.hour%12==0?12:e.hour%12,2);case`H`:return this.num(e.hour);case`HH`:return this.num(e.hour,2);case`Z`:return formatOffset({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return formatOffset({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return formatOffset({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return e.zone.offsetName(e.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return e.zone.offsetName(e.ts,{format:`long`,locale:this.loc.locale});case`z`:return e.zoneName;case`a`:return meridiem();case`d`:return r?string({day:`numeric`},`day`):this.num(e.day);case`dd`:return r?string({day:`2-digit`},`day`):this.num(e.day,2);case`c`:return this.num(e.weekday);case`ccc`:return weekday(`short`,!0);case`cccc`:return weekday(`long`,!0);case`ccccc`:return weekday(`narrow`,!0);case`E`:return this.num(e.weekday);case`EEE`:return weekday(`short`,!1);case`EEEE`:return weekday(`long`,!1);case`EEEEE`:return weekday(`narrow`,!1);case`L`:return r?string({month:`numeric`,day:`numeric`},`month`):this.num(e.month);case`LL`:return r?string({month:`2-digit`,day:`numeric`},`month`):this.num(e.month,2);case`LLL`:return month(`short`,!0);case`LLLL`:return month(`long`,!0);case`LLLLL`:return month(`narrow`,!0);case`M`:return r?string({month:`numeric`},`month`):this.num(e.month);case`MM`:return r?string({month:`2-digit`},`month`):this.num(e.month,2);case`MMM`:return month(`short`,!1);case`MMMM`:return month(`long`,!1);case`MMMMM`:return month(`narrow`,!1);case`y`:return r?string({year:`numeric`},`year`):this.num(e.year);case`yy`:return r?string({year:`2-digit`},`year`):this.num(e.year.toString().slice(-2),2);case`yyyy`:return r?string({year:`numeric`},`year`):this.num(e.year,4);case`yyyyyy`:return r?string({year:`numeric`},`year`):this.num(e.year,6);case`G`:return era(`short`);case`GG`:return era(`long`);case`GGGGG`:return era(`narrow`);case`kk`:return this.num(e.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(e.weekYear,4);case`W`:return this.num(e.weekNumber);case`WW`:return this.num(e.weekNumber,2);case`n`:return this.num(e.localWeekNumber);case`nn`:return this.num(e.localWeekNumber,2);case`ii`:return this.num(e.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(e.localWeekYear,4);case`o`:return this.num(e.ordinal);case`ooo`:return this.num(e.ordinal,3);case`q`:return this.num(e.quarter);case`qq`:return this.num(e.quarter,2);case`X`:return this.num(Math.floor(e.ts/1e3));case`x`:return this.num(e.ts);default:return maybeMacro(t)}};return stringifyTokens(Formatter.parseFormat(t),tokenToString)}formatDurationFromString(e,t){let n=this.opts.signMode===`negativeLargestOnly`?-1:1,tokenToField=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},tokenToString=(e,t)=>r=>{let i=tokenToField(r);if(i){let a=t.isNegativeDuration&&i!==t.largestUnit?n:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&i!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(i)*a,r.length,o)}return r},r=Formatter.parseFormat(t),i=r.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),a=e.shiftTo(...i.map(tokenToField).filter(e=>e));return stringifyTokens(r,tokenToString(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}},Mr=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function combineRegexes(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function combineExtractors(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function parse(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function simpleParse(...e){return(t,n)=>{let r={},i=0;for(;i<e.length;i++)r[e[i]]=parseInteger(t[n+i]);return[r,null,n+i]}}var Nr=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Pr=`(?:${Nr.source}?(?:\\[(${Mr.source})\\])?)?`,Fr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ir=RegExp(`${Fr.source}${Pr}`),Lr=RegExp(`(?:[Tt]${Ir.source})?`),Rr=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,zr=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Br=/(\d{4})-?(\d{3})/,Vr=simpleParse(`weekYear`,`weekNumber`,`weekDay`),Hr=simpleParse(`year`,`ordinal`),Ur=/(\d{4})-(\d\d)-(\d\d)/,Wr=RegExp(`${Fr.source} ?(?:${Nr.source}|(${Mr.source}))?`),Gr=RegExp(`(?: ${Wr.source})?`);function int$1(e,t,n){let r=e[t];return isUndefined(r)?n:parseInteger(r)}e(int$1,`int`);function extractISOYmd(e,t){return[{year:int$1(e,t),month:int$1(e,t+1,1),day:int$1(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int$1(e,t,0),minutes:int$1(e,t+1,0),seconds:int$1(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){let n=!e[t]&&!e[t+1],r=signedOffset(e[t+1],e[t+2]);return[{},n?null:or.instance(r),t+3]}function extractIANAZone(e,t){return[{},e[t]?Xn.create(e[t]):null,t+1]}var Kr=RegExp(`^T?${Fr.source}$`),qr=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function extractISODuration(e){let[t,n,r,i,a,o,s,c,d]=e,f=t[0]===`-`,p=c&&c[0]===`-`,maybeNegate=(e,t=!1)=>e!==void 0&&(t||e&&f)?-e:e;return[{years:maybeNegate(parseFloating(n)),months:maybeNegate(parseFloating(r)),weeks:maybeNegate(parseFloating(i)),days:maybeNegate(parseFloating(a)),hours:maybeNegate(parseFloating(o)),minutes:maybeNegate(parseFloating(s)),seconds:maybeNegate(parseFloating(c),c===`-0`),milliseconds:maybeNegate(parseMillis(d),p)}]}var Jr={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,r,i,a,o){let s={year:t.length===2?untruncateYear(parseInteger(t)):parseInteger(t),month:xr.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(a)};return o&&(s.second=parseInteger(o)),e&&(s.weekday=e.length>3?Cr.indexOf(e)+1:wr.indexOf(e)+1),s}var Yr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){let[,t,n,r,i,a,o,s,c,d,f,p]=e,m=fromStrings(t,i,r,n,a,o,s),g;return g=c?Jr[c]:d?0:signedOffset(f,p),[m,new or(g)]}function preprocessRFC2822(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var Xr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Zr=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Qr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){let[,t,n,r,i,a,o,s]=e;return[fromStrings(t,i,r,n,a,o,s),or.utcInstance]}function extractASCII(e){let[,t,n,r,i,a,o,s]=e;return[fromStrings(t,s,n,r,i,a,o),or.utcInstance]}var $r=combineRegexes(Rr,Lr),ei=combineRegexes(zr,Lr),ti=combineRegexes(Br,Lr),ni=combineRegexes(Ir),ri=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),ii=combineExtractors(Vr,extractISOTime,extractISOOffset,extractIANAZone),ai=combineExtractors(Hr,extractISOTime,extractISOOffset,extractIANAZone),oi=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseISODate(e){return parse(e,[$r,ri],[ei,ii],[ti,ai],[ni,oi])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[Yr,extractRFC2822])}function parseHTTPDate(e){return parse(e,[Xr,extractRFC1123Or850],[Zr,extractRFC1123Or850],[Qr,extractASCII])}function parseISODuration(e){return parse(e,[qr,extractISODuration])}var si=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[Kr,si])}var ci=combineRegexes(Ur,Gr),li=combineRegexes(Wr),ui=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[ci,ri],[li,ui])}var di=`Invalid Duration`,fi={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},pi={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...fi},mi=146097/400,hi=146097/4800,gi={years:{quarters:4,months:12,weeks:mi/7,days:mi,hours:mi*24,minutes:mi*24*60,seconds:mi*24*60*60,milliseconds:mi*24*60*60*1e3},quarters:{months:3,weeks:mi/28,days:mi/4,hours:mi*24/4,minutes:mi*24*60/4,seconds:mi*24*60*60/4,milliseconds:mi*24*60*60*1e3/4},months:{weeks:hi/7,days:hi,hours:hi*24,minutes:hi*24*60,seconds:hi*24*60*60,milliseconds:hi*24*60*60*1e3},...fi},_i=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],vi=_i.slice(0).reverse();function clone$1(e,t,n=!1){return new yi({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function durationToMillis(e,t){let n=t.milliseconds??0;for(let r of vi.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function normalizeValues(e,t){let n=durationToMillis(e,t)<0?-1:1;_i.reduceRight((r,i)=>{if(isUndefined(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),_i.reduce((n,r)=>{if(isUndefined(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function removeZeroes(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var yi=class Duration{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?gi:pi;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Q.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Duration.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(typeof e!=`object`||!e)throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${e===null?`null`:typeof e}`);return new Duration({values:normalizeObject(e,Duration.normalizeUnit),loc:Q.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if(typeof e==`object`)return Duration.fromObject(e);throw new InvalidArgumentError(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[n]=parseISODuration(e);return n?Duration.fromObject(n,t):Duration.invalid(`unparsable`,`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[n]=parseISOTimeOnly(e);return n?Duration.fromObject(n,t):Duration.invalid(`unparsable`,`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new InvalidArgumentError(`need to specify a reason the Duration is invalid`);let n=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(n);return new Duration({invalid:n})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new InvalidUnitError(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?jr.create(this.loc,n).formatDurationFromString(this,e):di}toHuman(e={}){if(!this.isValid)return di;let t=e.showZeros!==!1,n=_i.map(n=>{let r=this.values[n];return isUndefined(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},$.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?durationToMillis(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=Duration.fromDurationLike(e),n={};for(let e of _i)(hasOwnProperty(t.values,e)||hasOwnProperty(this.values,e))&&(n[e]=t.get(e)+this.get(e));return clone$1(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let t=Duration.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=asNumber(e(this.values[n],n));return clone$1(this,{values:t},!0)}get(e){return this[Duration.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,...normalizeObject(e,Duration.normalizeUnit)};return clone$1(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return clone$1(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return normalizeValues(this.matrix,e),clone$1(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=removeZeroes(this.normalize().shiftToAll().toObject());return clone$1(this,{values:e},!0)}shiftTo(...e){if(!this.isValid||e.length===0)return this;e=e.map(e=>Duration.normalizeUnit(e));let t={},n={},r=this.toObject(),i;for(let a of _i)if(e.indexOf(a)>=0){i=a;let e=0;for(let t in n)e+=this.matrix[t][a]*n[t],n[t]=0;isNumber(r[a])&&(e+=r[a]);let o=Math.trunc(e);t[a]=o,n[a]=(e*1e3-o*1e3)/1e3}else isNumber(r[a])&&(n[a]=r[a]);for(let e in n)n[e]!==0&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return normalizeValues(this.matrix,t),clone$1(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return clone$1(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=removeZeroes(this.values);return clone$1(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function eq(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let t of _i)if(!eq(this.values[t],e.values[t]))return!1;return!0}},bi=`Invalid Interval`;function validateStartEnd(e,t){return!e||!e.isValid?xi.invalid(`missing or invalid start`):!t||!t.isValid?xi.invalid(`missing or invalid end`):t<e?xi.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var xi=class Interval{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new InvalidArgumentError(`need to specify a reason the Interval is invalid`);let n=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(n);return new Interval({invalid:n})}static fromDateTimes(e,t){let n=friendlyDateTime(e),r=friendlyDateTime(t);return validateStartEnd(n,r)??new Interval({start:n,end:r})}static after(e,t){let n=yi.fromDurationLike(t),r=friendlyDateTime(e);return Interval.fromDateTimes(r,r.plus(n))}static before(e,t){let n=yi.fromDurationLike(t),r=friendlyDateTime(e);return Interval.fromDateTimes(r.minus(n),r)}static fromISO(e,t){let[n,r]=(e||``).split(`/`,2);if(n&&r){let e,i;try{e=$.fromISO(n,t),i=e.isValid}catch{i=!1}let a,o;try{a=$.fromISO(r,t),o=a.isValid}catch{o=!1}if(i&&o)return Interval.fromDateTimes(e,a);if(i){let n=yi.fromISO(r,t);if(n.isValid)return Interval.after(e,n)}else if(o){let e=yi.fromISO(n,t);if(e.isValid)return Interval.before(a,e)}}return Interval.invalid(`unparsable`,`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?Interval.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(friendlyDateTime).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[],{s:r}=this,i=0;for(;r<this.e;){let e=t[i]||this.e,a=+e>+this.e?this.e:e;n.push(Interval.fromDateTimes(r,a)),r=a,i+=1}return n}splitBy(e){let t=yi.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as(`milliseconds`)===0)return[];let{s:n}=this,r=1,i,a=[];for(;n<this.e;){let e=this.start.plus(t.mapUnits(e=>e*r));i=+e>+this.e?this.e:e,a.push(Interval.fromDateTimes(n,i)),n=i,r+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Interval.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Interval.fromDateTimes(t,n)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0,r=[],i=e.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),a=Array.prototype.concat(...i).sort((e,t)=>e.time-t.time);for(let e of a)n+=e.type===`s`?1:-1,n===1?t=e.time:(t&&+t!=+e.time&&r.push(Interval.fromDateTimes(t,e.time)),t=null);return Interval.merge(r)}difference(...e){return Interval.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:bi}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Cn,t={}){return this.isValid?jr.create(this.s.loc.clone(t),e).formatInterval(this):bi}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:bi}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:bi}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:bi}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:bi}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):yi.invalid(this.invalidReason)}mapEndpoints(e){return Interval.fromDateTimes(e(this.s),e(this.e))}},Info=class{static hasDST(e=Settings.defaultZone){let t=$.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Xn.isValidZone(e)}static normalizeZone(e){return normalizeZone(e,Settings.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Q.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Q.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Q.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||Q.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||Q.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||Q.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||Q.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Q.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return Q.create(t,null,`gregory`).eras(e)}static features(){return{relative:hasRelative(),localeWeek:hasLocaleWeekInfo()}}};function dayDiff(e,t){let utcDayStart=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),n=utcDayStart(t)-utcDayStart(e);return Math.floor(yi.fromMillis(n).as(`days`))}function highOrderDiffs(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=dayDiff(e,t);return(n-n%7)/7}],[`days`,dayDiff]],i={},a=e,o,s;for(let[c,d]of r)n.indexOf(c)>=0&&(o=c,i[c]=d(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function diff(e,t,n,r){let[i,a,o,s]=highOrderDiffs(e,t,n),c=t-i,d=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);d.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let f=yi.fromObject(a,r);return d.length>0?yi.fromMillis(c,r).shiftTo(...d).plus(f):f}var Si=`missing Intl.DateTimeFormat.formatToParts support`;function intUnit(e,t=e=>e){return{regex:e,deser:([e])=>t(parseDigits(e))}}var Ci=`[ \xA0]`,wi=new RegExp(Ci,`g`);function fixListRegex(e){return e.replace(/\./g,`\\.?`).replace(wi,Ci)}function stripInsensitivities(e){return e.replace(/\./g,``).replace(wi,` `).toLowerCase()}function oneOf(e,t){return e===null?null:{regex:RegExp(e.map(fixListRegex).join(`|`)),deser:([n])=>e.findIndex(e=>stripInsensitivities(n)===stripInsensitivities(e))+t}}function offset(e,t){return{regex:e,deser:([,e,t])=>signedOffset(e,t),groups:t}}function simple(e){return{regex:e,deser:([e])=>e}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function unitForToken(e,t){let n=digitRegex(t),r=digitRegex(t,`{2}`),i=digitRegex(t,`{3}`),a=digitRegex(t,`{4}`),o=digitRegex(t,`{6}`),s=digitRegex(t,`{1,2}`),c=digitRegex(t,`{1,3}`),d=digitRegex(t,`{1,6}`),f=digitRegex(t,`{1,9}`),p=digitRegex(t,`{2,4}`),m=digitRegex(t,`{4,6}`),literal=e=>({regex:RegExp(escapeToken(e.val)),deser:([e])=>e,literal:!0}),unitate=g=>{if(e.literal)return literal(g);switch(g.val){case`G`:return oneOf(t.eras(`short`),0);case`GG`:return oneOf(t.eras(`long`),0);case`y`:return intUnit(d);case`yy`:return intUnit(p,untruncateYear);case`yyyy`:return intUnit(a);case`yyyyy`:return intUnit(m);case`yyyyyy`:return intUnit(o);case`M`:return intUnit(s);case`MM`:return intUnit(r);case`MMM`:return oneOf(t.months(`short`,!0),1);case`MMMM`:return oneOf(t.months(`long`,!0),1);case`L`:return intUnit(s);case`LL`:return intUnit(r);case`LLL`:return oneOf(t.months(`short`,!1),1);case`LLLL`:return oneOf(t.months(`long`,!1),1);case`d`:return intUnit(s);case`dd`:return intUnit(r);case`o`:return intUnit(c);case`ooo`:return intUnit(i);case`HH`:return intUnit(r);case`H`:return intUnit(s);case`hh`:return intUnit(r);case`h`:return intUnit(s);case`mm`:return intUnit(r);case`m`:return intUnit(s);case`q`:return intUnit(s);case`qq`:return intUnit(r);case`s`:return intUnit(s);case`ss`:return intUnit(r);case`S`:return intUnit(c);case`SSS`:return intUnit(i);case`u`:return simple(f);case`uu`:return simple(s);case`uuu`:return intUnit(n);case`a`:return oneOf(t.meridiems(),0);case`kkkk`:return intUnit(a);case`kk`:return intUnit(p,untruncateYear);case`W`:return intUnit(s);case`WW`:return intUnit(r);case`E`:case`c`:return intUnit(n);case`EEE`:return oneOf(t.weekdays(`short`,!1),1);case`EEEE`:return oneOf(t.weekdays(`long`,!1),1);case`ccc`:return oneOf(t.weekdays(`short`,!0),1);case`cccc`:return oneOf(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return offset(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return offset(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return simple(/[a-z_+-/]{1,256}?/i);case` `:return simple(/[^\S\n\r]/);default:return literal(g)}},g=unitate(e)||{invalidReason:Si};return g.token=e,g}var Ti={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}};function tokenForPart(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=Ti[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function buildRegex(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function match(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(hasOwnProperty(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}return[r,{}]}function dateTimeFromMatches(e){let toField=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},t=null,n;return isUndefined(e.z)||(t=Xn.create(e.z)),isUndefined(e.Z)||(t||=new or(e.Z),n=e.Z),isUndefined(e.q)||(e.M=(e.q-1)*3+1),isUndefined(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),isUndefined(e.u)||(e.S=parseMillis(e.u)),[Object.keys(e).reduce((t,n)=>{let r=toField(n);return r&&(t[r]=e[n]),t},{}),t,n]}var Ei=null;function getDummyDateTime(){return Ei||=$.fromMillis(1555555555555),Ei}function maybeExpandMacroToken(e,t){if(e.literal)return e;let n=formatOptsToTokens(jr.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function expandMacroTokens(e,t){return Array.prototype.concat(...e.map(e=>maybeExpandMacroToken(e,t)))}var TokenParser=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=expandMacroTokens(jr.parseFormat(t),e),this.units=this.tokens.map(t=>unitForToken(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=buildRegex(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=match(e,this.regex,this.handlers),[r,i,a]=n?dateTimeFromMatches(n):[null,null,void 0];if(hasOwnProperty(n,`a`)&&hasOwnProperty(n,`H`))throw new ConflictingSpecificationError(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:a}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function explainFromTokens(e,t,n){return new TokenParser(e,n).explainFromTokens(t)}function parseFromTokens(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=explainFromTokens(e,t,n);return[r,i,a,o]}function formatOptsToTokens(e,t){if(!e)return null;let n=jr.create(t,e).dtFormatter(getDummyDateTime()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>tokenForPart(t,e,i))}var Di=`Invalid DateTime`,Oi=864e13;function unsupportedZone(e){return new Invalid(`unsupported zone`,`the zone "${e.name}" is not supported`)}function possiblyCachedWeekData(e){return e.weekData===null&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function possiblyCachedLocalWeekData(e){return e.localWeekData===null&&(e.localWeekData=gregorianToWeek(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function clone$2(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new $({...n,...t,old:n})}e(clone$2,`clone`);function fixOffset(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function tsToObj(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=yi.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=fixOffset(objToLocalTS(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function parseDataToDateTime(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=$.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}return $.invalid(new Invalid(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function toTechFormat(e,t,n=!0){return e.isValid?jr.create(Q.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toISODate(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=padStart(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=padStart(e.c.month),n===`month`)return i;i+=`-`}else if(i+=padStart(e.c.month),n===`month`)return i;return i+=padStart(e.c.day),i}function toISOTime(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=padStart(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=padStart(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=padStart(e.c.second))}else{if(c+=padStart(e.c.minute),o===`minute`)break;s&&(c+=padStart(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=padStart(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=padStart(Math.trunc(-e.o/60)),c+=`:`,c+=padStart(Math.trunc(-e.o%60))):(c+=`+`,c+=padStart(Math.trunc(e.o/60)),c+=`:`,c+=padStart(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ki={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Ai={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ji={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Mi=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Ni=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],Pi=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function normalizeUnit(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new InvalidUnitError(e);return t}function normalizeUnitWithLocalWeeks(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return normalizeUnit(e)}}function guessOffsetForZone(e){if(Fi===void 0&&(Fi=Settings.now()),e.type!==`iana`)return e.offset(Fi);let t=e.name,n=Ii.get(t);return n===void 0&&(n=e.offset(Fi),Ii.set(t,n)),n}function quickDT(e,t){let n=normalizeZone(t.zone,Settings.defaultZone);if(!n.isValid)return $.invalid(unsupportedZone(n));let r=Q.fromObject(t),i,a;if(isUndefined(e.year))i=Settings.now();else{for(let t of Mi)isUndefined(e[t])&&(e[t]=ki[t]);let t=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(t)return $.invalid(t);let r=guessOffsetForZone(n);[i,a]=objToTS(e,r,n)}return new $({ts:i,zone:n,loc:r,o:a})}function diffRelative(e,t,n){let r=isUndefined(n.round)?!0:n.round,i=isUndefined(n.rounding)?`trunc`:n.rounding,format=(e,a)=>(e=roundTo(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),differ=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return format(differ(n.unit),n.unit);for(let e of n.units){let t=differ(e);if(Math.abs(t)>=1)return format(t,e)}return format(e>t?-0:0,n.units[n.units.length-1])}function lastOpts(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}var Fi,Ii=new Map,$=class DateTime{constructor(e){let t=e.zone||Settings.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Invalid(`invalid input`):null)||(t.isValid?null:unsupportedZone(t));this.ts=isUndefined(e.ts)?Settings.now():e.ts;let r=null,i=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=isNumber(e.o)&&!e.old?e.o:t.offset(this.ts);r=tsToObj(this.ts,a),n=Number.isNaN(r.year)?new Invalid(`invalid input`):null,r=n?null:r,i=n?null:a}}this._zone=t,this.loc=e.loc||Q.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new DateTime({})}static local(){let[e,t]=lastOpts(arguments),[n,r,i,a,o,s,c]=t;return quickDT({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=lastOpts(arguments),[n,r,i,a,o,s,c]=t;return e.zone=or.utcInstance,quickDT({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(e,t={}){let n=isDate(e)?e.valueOf():NaN;if(Number.isNaN(n))return DateTime.invalid(`invalid input`);let r=normalizeZone(t.zone,Settings.defaultZone);return r.isValid?new DateTime({ts:n,zone:r,loc:Q.fromObject(t)}):DateTime.invalid(unsupportedZone(r))}static fromMillis(e,t={}){if(!isNumber(e))throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`);return e<-864e13||e>Oi?DateTime.invalid(`Timestamp out of range`):new DateTime({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Q.fromObject(t)})}static fromSeconds(e,t={}){if(isNumber(e))return new DateTime({ts:e*1e3,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Q.fromObject(t)});throw new InvalidArgumentError(`fromSeconds requires a numerical input`)}static fromObject(e,t={}){e||={};let n=normalizeZone(t.zone,Settings.defaultZone);if(!n.isValid)return DateTime.invalid(unsupportedZone(n));let r=Q.fromObject(t),i=normalizeObject(e,normalizeUnitWithLocalWeeks),{minDaysInFirstWeek:a,startOfWeek:o}=usesLocalWeekValues(i,r),s=Settings.now(),c=isUndefined(t.specificOffset)?n.offset(s):t.specificOffset,d=!isUndefined(i.ordinal),f=!isUndefined(i.year),p=!isUndefined(i.month)||!isUndefined(i.day),m=f||p,g=i.weekYear||i.weekNumber;if((m||d)&&g)throw new ConflictingSpecificationError(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(p&&d)throw new ConflictingSpecificationError(`Can't mix ordinal dates with month/day`);let v=g||i.weekday&&!m,b,x,w=tsToObj(s,c);v?(b=Ni,x=Ai,w=gregorianToWeek(w,a,o)):d?(b=Pi,x=ji,w=gregorianToOrdinal(w)):(b=Mi,x=ki);let T=!1;for(let e of b){let t=i[e];isUndefined(t)?i[e]=T?x[e]:w[e]:T=!0}let E=(v?hasInvalidWeekData(i,a,o):d?hasInvalidOrdinalData(i):hasInvalidGregorianData(i))||hasInvalidTimeData(i);if(E)return DateTime.invalid(E);let[D,A]=objToTS(v?weekToGregorian(i,a,o):d?ordinalToGregorian(i):i,c,n),j=new DateTime({ts:D,zone:n,o:A,loc:r});return i.weekday&&m&&e.weekday!==j.weekday?DateTime.invalid(`mismatched weekday`,`you can't specify both a weekday of ${i.weekday} and a date of ${j.toISO()}`):j.isValid?j:DateTime.invalid(j.invalid)}static fromISO(e,t={}){let[n,r]=parseISODate(e);return parseDataToDateTime(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=parseRFC2822Date(e);return parseDataToDateTime(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=parseHTTPDate(e);return parseDataToDateTime(n,r,t,`HTTP`,t)}static fromFormat(e,t,n={}){if(isUndefined(e)||isUndefined(t))throw new InvalidArgumentError(`fromFormat requires an input string and a format`);let{locale:r=null,numberingSystem:i=null}=n,[a,o,s,c]=parseFromTokens(Q.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t);return c?DateTime.invalid(c):parseDataToDateTime(a,o,n,`format ${t}`,e,s)}static fromString(e,t,n={}){return DateTime.fromFormat(e,t,n)}static fromSQL(e,t={}){let[n,r]=parseSQL(e);return parseDataToDateTime(n,r,t,`SQL`,e)}static invalid(e,t=null){if(!e)throw new InvalidArgumentError(`need to specify a reason the DateTime is invalid`);let n=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(n);return new DateTime({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=formatOptsToTokens(e,Q.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return expandMacroTokens(jr.parseFormat(e),Q.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){Fi=void 0,Ii.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}get weekNumber(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}get weekday(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?possiblyCachedLocalWeekData(this).weekday:NaN}get localWeekNumber(){return this.isValid?possiblyCachedLocalWeekData(this).weekNumber:NaN}get localWeekYear(){return this.isValid?possiblyCachedLocalWeekData(this).weekYear:NaN}get ordinal(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}get monthShort(){return this.isValid?Info.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Info.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Info.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Info.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=objToLocalTS(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,d=tsToObj(s,a),f=tsToObj(c,o);return d.hour===f.hour&&d.minute===f.minute&&d.second===f.second&&d.millisecond===f.millisecond?[clone$2(this,{ts:s}),clone$2(this,{ts:c})]:[this]}get isInLeapYear(){return isLeapYear(this.year)}get daysInMonth(){return daysInMonth(this.year,this.month)}get daysInYear(){return this.isValid?daysInYear(this.year):NaN}get weeksInWeekYear(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?weeksInWeekYear(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=jr.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(or.instance(e),t)}toLocal(){return this.setZone(Settings.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=normalizeZone(e,Settings.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){let t=e.offset(this.ts),n=this.toObject();[r]=objToTS(n,t,e)}return clone$2(this,{ts:r,zone:e})}return DateTime.invalid(unsupportedZone(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return clone$2(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=normalizeObject(e,normalizeUnitWithLocalWeeks),{minDaysInFirstWeek:n,startOfWeek:r}=usesLocalWeekValues(t,this.loc),i=!isUndefined(t.weekYear)||!isUndefined(t.weekNumber)||!isUndefined(t.weekday),a=!isUndefined(t.ordinal),o=!isUndefined(t.year),s=!isUndefined(t.month)||!isUndefined(t.day),c=o||s,d=t.weekYear||t.weekNumber;if((c||a)&&d)throw new ConflictingSpecificationError(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(s&&a)throw new ConflictingSpecificationError(`Can't mix ordinal dates with month/day`);let f;i?f=weekToGregorian({...gregorianToWeek(this.c,n,r),...t},n,r):isUndefined(t.ordinal)?(f={...this.toObject(),...t},isUndefined(t.day)&&(f.day=Math.min(daysInMonth(f.year,f.month),f.day))):f=ordinalToGregorian({...gregorianToOrdinal(this.c),...t});let[p,m]=objToTS(f,this.o,this.zone);return clone$2(this,{ts:p,o:m})}plus(e){if(!this.isValid)return this;let t=yi.fromDurationLike(e);return clone$2(this,adjustTime(this,t))}minus(e){if(!this.isValid)return this;let t=yi.fromDurationLike(e).negate();return clone$2(this,adjustTime(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=yi.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0}if(r===`weeks`){if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1}return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?jr.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Di}toLocaleString(e=Cn,t={}){return this.isValid?jr.create(this.loc.clone(t),e).formatDateTime(this):Di}toLocaleParts(e={}){return this.isValid?jr.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=normalizeUnit(a);let o=e===`extended`,s=toISODate(this,o,a);return Mi.indexOf(a)>=3&&(s+=`T`),s+=toISOTime(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?toISODate(this,e===`extended`,normalizeUnit(t)):null}toISOWeekDate(){return toTechFormat(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=normalizeUnit(o),(r&&Mi.indexOf(o)>=3?`T`:``)+toISOTime(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return toTechFormat(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return toTechFormat(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?toISODate(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),toTechFormat(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Di}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return yi.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=maybeArray(t).map(yi.normalizeUnit),a=e.valueOf()>this.valueOf(),o=diff(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(e=`milliseconds`,t={}){return this.diff(DateTime.now(),e,t)}until(e){return this.isValid?xi.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let t=e.base||DateTime.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),diffRelative(t,this.plus(n),{...e,numeric:`always`,units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?diffRelative(e.base||DateTime.fromObject({},{zone:this.zone}),this,{...e,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...e){if(!e.every(DateTime.isDateTime))throw new InvalidArgumentError(`min requires all arguments be DateTimes`);return bestBy(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(DateTime.isDateTime))throw new InvalidArgumentError(`max requires all arguments be DateTimes`);return bestBy(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return explainFromTokens(Q.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return DateTime.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new TokenParser(Q.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(e,t,n={}){if(isUndefined(e)||isUndefined(t))throw new InvalidArgumentError(`fromFormatParser requires an input string and a format parser`);let{locale:r=null,numberingSystem:i=null}=n,a=Q.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!a.equals(t.locale))throw new InvalidArgumentError(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);let{result:o,zone:s,specificOffset:c,invalidReason:d}=t.explainFromTokens(e);return d?DateTime.invalid(d):parseDataToDateTime(o,s,n,`format ${t.format}`,e,c)}static get DATE_SHORT(){return Cn}static get DATE_MED(){return wn}static get DATE_MED_WITH_WEEKDAY(){return Tn}static get DATE_FULL(){return En}static get DATE_HUGE(){return Dn}static get TIME_SIMPLE(){return On}static get TIME_WITH_SECONDS(){return kn}static get TIME_WITH_SHORT_OFFSET(){return An}static get TIME_WITH_LONG_OFFSET(){return jn}static get TIME_24_SIMPLE(){return Mn}static get TIME_24_WITH_SECONDS(){return Nn}static get TIME_24_WITH_SHORT_OFFSET(){return Pn}static get TIME_24_WITH_LONG_OFFSET(){return Fn}static get DATETIME_SHORT(){return In}static get DATETIME_SHORT_WITH_SECONDS(){return Ln}static get DATETIME_MED(){return Rn}static get DATETIME_MED_WITH_SECONDS(){return zn}static get DATETIME_MED_WITH_WEEKDAY(){return Bn}static get DATETIME_FULL(){return Vn}static get DATETIME_FULL_WITH_SECONDS(){return Hn}static get DATETIME_HUGE(){return Un}static get DATETIME_HUGE_WITH_SECONDS(){return Wn}};function friendlyDateTime(e){if($.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return $.fromJSDate(e);if(e&&typeof e==`object`)return $.fromObject(e);throw new InvalidArgumentError(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var Li=[`onChange`,`onClose`,`onDayCreate`,`onDestroy`,`onKeyDown`,`onMonthChange`,`onOpen`,`onParseConfig`,`onReady`,`onValueUpdate`,`onYearChange`,`onPreCalendarPosition`],Ri={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:`F j, Y`,altInput:!1,altInputClass:`form-control input`,animate:typeof window==`object`&&window.navigator.userAgent.indexOf(`MSIE`)===-1,ariaDateFormat:`F j, Y`,autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:`, `,dateFormat:`Y-m-d`,defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console<`u`&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:`default`,minuteIncrement:5,mode:`single`,monthSelectorType:`dropdown`,nextArrow:`<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>`,noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:`auto`,positionElement:void 0,prevArrow:`<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>`,shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},zi={weekdays:{shorthand:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],longhand:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},months:{shorthand:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],longhand:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return`th`;switch(t%10){case 1:return`st`;case 2:return`nd`;case 3:return`rd`;default:return`th`}},rangeSeparator:` to `,weekAbbreviation:`Wk`,scrollTitle:`Scroll to increment`,toggleTitle:`Click to toggle`,amPM:[`AM`,`PM`],yearAriaLabel:`Year`,monthAriaLabel:`Month`,hourAriaLabel:`Hour`,minuteAriaLabel:`Minute`,time_24hr:!1},pad=function(e,t){return t===void 0&&(t=2),(`000`+e).slice(t*-1)},int=function(e){return+(e===!0)};function debounce(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var arrayify=function(e){return e instanceof Array?e:[e]};function toggleClass(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function createElement(e,t,n){var r=window.document.createElement(e);return t||=``,n||=``,r.className=t,n!==void 0&&(r.textContent=n),r}function clearNode(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function findParent(e,t){if(t(e))return e;if(e.parentNode)return findParent(e.parentNode,t)}function createNumberInput(e,t){var n=createElement(`div`,`numInputWrapper`),r=createElement(`input`,`numInput `+e),i=createElement(`span`,`arrowUp`),a=createElement(`span`,`arrowDown`);if(navigator.userAgent.indexOf(`MSIE 9.0`)===-1?r.type=`number`:(r.type=`text`,r.pattern=`\\d*`),t!==void 0)for(var o in t)r.setAttribute(o,t[o]);return n.appendChild(r),n.appendChild(i),n.appendChild(a),n}function getEventTarget(e){try{return typeof e.composedPath==`function`?e.composedPath()[0]:e.target}catch{return e.target}}var doNothing=function(){},monthToStr=function(e,t,n){return n.months[t?`shorthand`:`longhand`][e]},Bi={D:doNothing,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*int(new RegExp(n.amPM[1],`i`).test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:doNothing,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:doNothing,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Vi={D:``,F:``,G:`(\\d\\d|\\d)`,H:`(\\d\\d|\\d)`,J:`(\\d\\d|\\d)\\w+`,K:``,M:``,S:`(\\d\\d|\\d)`,U:`(.+)`,W:`(\\d\\d|\\d)`,Y:`(\\d{4})`,Z:`(.+)`,d:`(\\d\\d|\\d)`,h:`(\\d\\d|\\d)`,i:`(\\d\\d|\\d)`,j:`(\\d\\d|\\d)`,l:``,m:`(\\d\\d|\\d)`,n:`(\\d\\d|\\d)`,s:`(\\d\\d|\\d)`,u:`(.+)`,w:`(\\d\\d|\\d)`,y:`(\\d{2})`},Hi={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[Hi.w(e,t,n)]},F:function(e,t,n){return monthToStr(Hi.n(e,t,n)-1,!1,t)},G:function(e,t,n){return pad(Hi.h(e,t,n))},H:function(e){return pad(e.getHours())},J:function(e,t){return t.ordinal===void 0?e.getDate():e.getDate()+t.ordinal(e.getDate())},K:function(e,t){return t.amPM[int(e.getHours()>11)]},M:function(e,t){return monthToStr(e.getMonth(),!0,t)},S:function(e){return pad(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return pad(e.getFullYear(),4)},d:function(e){return pad(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return pad(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return pad(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},createDateFormatter=function(e){var t=e.config,n=t===void 0?Ri:t,r=e.l10n,i=r===void 0?zi:r,a=e.isMobile,o=a!==void 0&&a;return function(e,t,r){var a=r||i;return n.formatDate!==void 0&&!o?n.formatDate(e,t,a):t.split(``).map(function(t,r,i){return Hi[t]&&i[r-1]!==`\\`?Hi[t](e,a,n):t===`\\`?``:t}).join(``)}},createDateParser=function(e){var t=e.config,n=t===void 0?Ri:t,r=e.l10n,i=r===void 0?zi:r;return function(e,t,r,a){if(e===0||e){var o=a||i,s,c=e;if(e instanceof Date)s=new Date(e.getTime());else if(typeof e!=`string`&&e.toFixed!==void 0)s=new Date(e);else if(typeof e==`string`){var d=t||(n||Ri).dateFormat,f=String(e).trim();if(f===`today`)s=new Date,r=!0;else if(n&&n.parseDate)s=n.parseDate(e,d);else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else{for(var p=void 0,m=[],g=0,v=0,b=``;g<d.length;g++){var x=d[g],w=x===`\\`,T=d[g-1]===`\\`||w;if(Vi[x]&&!T){b+=Vi[x];var E=new RegExp(b).exec(e);E&&(p=!0)&&m[x===`Y`?`unshift`:`push`]({fn:Bi[x],val:E[++v]})}else w||(b+=`.`)}s=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),m.forEach(function(e){var t=e.fn,n=e.val;return s=t(s,n,o)||s}),s=p?s:void 0}}if(!(s instanceof Date&&!isNaN(s.getTime())))n.errorHandler(Error(`Invalid date provided: `+c));else return r===!0&&s.setHours(0,0,0,0),s}}};function compareDates(e,t,n){return n===void 0&&(n=!0),n===!1?e.getTime()-t.getTime():new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0)}var isBetween=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},calculateSecondsSinceMidnight=function(e,t,n){return e*3600+t*60+n},parseSeconds=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},Ui={DAY:864e5};function getDefaultHours(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),a=e.minDate.getMinutes(),o=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<a&&(n=a),t===i&&n===a&&r<o&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),c=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(c,n)),t===s&&n===c&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!=`function`&&(Object.assign=function(e){var t=[...arguments].slice(1);if(!e)throw TypeError(`Cannot convert undefined or null to object`);for(var _loop_1=function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})},n=0,r=t;n<r.length;n++){var i=r[n];_loop_1(i)}return e});var __assign=function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)},__spreadArrays=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},Wi=300;function FlatpickrInstance(e,t){var n={config:__assign(__assign({},Ri),flatpickr.defaultConfig),l10n:zi};n.parseDate=createDateParser({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=bind,n._setHoursFromDate=setHoursFromDate,n._positionCalendar=positionCalendar,n.changeMonth=changeMonth,n.changeYear=changeYear,n.clear=clear,n.close=close,n.onMouseOver=onMouseOver,n._createElement=createElement,n.createDay=createDay,n.destroy=destroy,n.isEnabled=isEnabled,n.jumpToDate=jumpToDate,n.updateValue=updateValue,n.open=open,n.redraw=redraw,n.set=set,n.setDate=setDate,n.toggle=toggle;function setupHelperFunctions(){n.utils={getDaysInMonth:function(e,t){return e===void 0&&(e=n.currentMonth),t===void 0&&(t=n.currentYear),e===1&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]}}}function init(){n.element=n.input=e,n.isOpen=!1,parseConfig(),setupLocale(),setupInputs(),setupDates(),setupHelperFunctions(),n.isMobile||build(),bindEvents(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&setHoursFromDate(n.config.noCalendar?n.latestSelectedDateObj:void 0),updateValue(!1)),setCalendarWidth();var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&t&&positionCalendar(),triggerEvent(`onReady`)}function getClosestActiveElement(){return(n.calendarContainer?.getRootNode()).activeElement||document.activeElement}function bindToInstance(e){return e.bind(n)}function setCalendarWidth(){var e=n.config;(e.weekNumbers!==!1||e.showMonths!==1)&&e.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility=`hidden`,n.calendarContainer.style.display=`block`),n.daysContainer!==void 0){var t=(n.days.offsetWidth+1)*e.showMonths;n.daysContainer.style.width=t+`px`,n.calendarContainer.style.width=t+(n.weekWrapper===void 0?0:n.weekWrapper.offsetWidth)+`px`,n.calendarContainer.style.removeProperty(`visibility`),n.calendarContainer.style.removeProperty(`display`)}})}function updateTime(e){if(n.selectedDates.length===0){var t=n.config.minDate===void 0||compareDates(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),r=getDefaultHours(n.config);t.setHours(r.hours,r.minutes,r.seconds,t.getMilliseconds()),n.selectedDates=[t],n.latestSelectedDateObj=t}e!==void 0&&e.type!==`blur`&&timeWrapper(e);var i=n._input.value;setHoursFromInputs(),updateValue(),n._input.value!==i&&n._debouncedChange()}function ampm2military(e,t){return e%12+12*int(t===n.l10n.amPM[1])}function military2ampm(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function setHoursFromInputs(){if(n.hourElement!==void 0&&n.minuteElement!==void 0){var e=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(n.minuteElement.value,10)||0)%60,r=n.secondElement===void 0?0:(parseInt(n.secondElement.value,10)||0)%60;n.amPM!==void 0&&(e=ampm2military(e,n.amPM.textContent));var i=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&compareDates(n.latestSelectedDateObj,n.config.minDate,!0)===0,a=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&compareDates(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var o=calculateSecondsSinceMidnight(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),s=calculateSecondsSinceMidnight(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),c=calculateSecondsSinceMidnight(e,t,r);if(c>s&&c<o){var d=parseSeconds(o);e=d[0],t=d[1],r=d[2]}}else{if(a){var f=n.config.maxTime===void 0?n.config.maxDate:n.config.maxTime;e=Math.min(e,f.getHours()),e===f.getHours()&&(t=Math.min(t,f.getMinutes())),t===f.getMinutes()&&(r=Math.min(r,f.getSeconds()))}if(i){var p=n.config.minTime===void 0?n.config.minDate:n.config.minTime;e=Math.max(e,p.getHours()),e===p.getHours()&&t<p.getMinutes()&&(t=p.getMinutes()),t===p.getMinutes()&&(r=Math.max(r,p.getSeconds()))}}setHours(e,t,r)}}function setHoursFromDate(e){var t=e||n.latestSelectedDateObj;t&&t instanceof Date&&setHours(t.getHours(),t.getMinutes(),t.getSeconds())}function setHours(e,t,r){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(e%24,t,r||0,0),n.hourElement&&n.minuteElement&&!n.isMobile&&(n.hourElement.value=pad(n.config.time_24hr?e:(12+e)%12+12*int(e%12==0)),n.minuteElement.value=pad(t),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[int(e>=12)]),n.secondElement!==void 0&&(n.secondElement.value=pad(r)))}function onYearInput(e){var t=getEventTarget(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||e.key===`Enter`&&!/[^\d]/.test(n.toString()))&&changeYear(n)}function bind(e,t,r,i){if(t instanceof Array)return t.forEach(function(t){return bind(e,t,r,i)});if(e instanceof Array)return e.forEach(function(e){return bind(e,t,r,i)});e.addEventListener(t,r,i),n._handlers.push({remove:function(){return e.removeEventListener(t,r,i)}})}function triggerChange(){triggerEvent(`onChange`)}function bindEvents(){if(n.config.wrap&&[`open`,`close`,`toggle`,`clear`].forEach(function(e){Array.prototype.forEach.call(n.element.querySelectorAll(`[data-`+e+`]`),function(t){return bind(t,`click`,n[e])})}),n.isMobile)setupMobile();else{var e=debounce(onResize,50);if(n._debouncedChange=debounce(triggerChange,Wi),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&bind(n.daysContainer,`mouseover`,function(e){n.config.mode===`range`&&onMouseOver(getEventTarget(e))}),bind(n._input,`keydown`,onKeyDown),n.calendarContainer!==void 0&&bind(n.calendarContainer,`keydown`,onKeyDown),!n.config.inline&&!n.config.static&&bind(window,`resize`,e),window.ontouchstart===void 0?bind(window.document,`mousedown`,documentClick):bind(window.document,`touchstart`,documentClick),bind(window.document,`focus`,documentClick,{capture:!0}),n.config.clickOpens===!0&&(bind(n._input,`focus`,n.open),bind(n._input,`click`,n.open)),n.daysContainer!==void 0&&(bind(n.monthNav,`click`,onMonthNavClick),bind(n.monthNav,[`keyup`,`increment`],onYearInput),bind(n.daysContainer,`click`,selectDate)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var selText=function(e){return getEventTarget(e).select()};bind(n.timeContainer,[`increment`],updateTime),bind(n.timeContainer,`blur`,updateTime,{capture:!0}),bind(n.timeContainer,`click`,timeIncrement),bind([n.hourElement,n.minuteElement],[`focus`,`click`],selText),n.secondElement!==void 0&&bind(n.secondElement,`focus`,function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&bind(n.amPM,`click`,function(e){updateTime(e)})}n.config.allowInput&&bind(n._input,`blur`,onBlur)}}function jumpToDate(e,t){var r=e===void 0?n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now):n.parseDate(e),i=n.currentYear,a=n.currentMonth;try{r!==void 0&&(n.currentYear=r.getFullYear(),n.currentMonth=r.getMonth())}catch(e){e.message=`Invalid date supplied: `+r,n.config.errorHandler(e)}t&&n.currentYear!==i&&(triggerEvent(`onYearChange`),buildMonthSwitch()),t&&(n.currentYear!==i||n.currentMonth!==a)&&triggerEvent(`onMonthChange`),n.redraw()}function timeIncrement(e){var t=getEventTarget(e);~t.className.indexOf(`arrow`)&&incrementNumInput(e,t.classList.contains(`arrowUp`)?1:-1)}function incrementNumInput(e,t,n){var r=e&&getEventTarget(e),i=n||r&&r.parentNode&&r.parentNode.firstChild,a=createEvent(`increment`);a.delta=t,i&&i.dispatchEvent(a)}function build(){var e=window.document.createDocumentFragment();if(n.calendarContainer=createElement(`div`,`flatpickr-calendar`),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild(buildMonthNav()),n.innerContainer=createElement(`div`,`flatpickr-innerContainer`),n.config.weekNumbers){var t=buildWeeks(),r=t.weekWrapper,i=t.weekNumbers;n.innerContainer.appendChild(r),n.weekNumbers=i,n.weekWrapper=r}n.rContainer=createElement(`div`,`flatpickr-rContainer`),n.rContainer.appendChild(buildWeekdays()),n.daysContainer||(n.daysContainer=createElement(`div`,`flatpickr-days`),n.daysContainer.tabIndex=-1),buildDays(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(buildTime()),toggleClass(n.calendarContainer,`rangeMode`,n.config.mode===`range`),toggleClass(n.calendarContainer,`animate`,n.config.animate===!0),toggleClass(n.calendarContainer,`multiMonth`,n.config.showMonths>1),n.calendarContainer.appendChild(e);var a=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?`inline`:`static`),n.config.inline&&(!a&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var o=createElement(`div`,`flatpickr-wrapper`);n.element.parentNode&&n.element.parentNode.insertBefore(o,n.element),o.appendChild(n.element),n.altInput&&o.appendChild(n.altInput),o.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo===void 0?window.document.body:n.config.appendTo).appendChild(n.calendarContainer)}function createDay(e,t,r,i){var a=isEnabled(t,!0),o=createElement(`span`,e,t.getDate().toString());return o.dateObj=t,o.$i=i,o.setAttribute(`aria-label`,n.formatDate(t,n.config.ariaDateFormat)),e.indexOf(`hidden`)===-1&&compareDates(t,n.now)===0&&(n.todayDateElem=o,o.classList.add(`today`),o.setAttribute(`aria-current`,`date`)),a?(o.tabIndex=-1,isDateSelected(t)&&(o.classList.add(`selected`),n.selectedDateElem=o,n.config.mode===`range`&&(toggleClass(o,`startRange`,n.selectedDates[0]&&compareDates(t,n.selectedDates[0],!0)===0),toggleClass(o,`endRange`,n.selectedDates[1]&&compareDates(t,n.selectedDates[1],!0)===0),e===`nextMonthDay`&&o.classList.add(`inRange`)))):o.classList.add(`flatpickr-disabled`),n.config.mode===`range`&&isDateInRange(t)&&!isDateSelected(t)&&o.classList.add(`inRange`),n.weekNumbers&&n.config.showMonths===1&&e!==`prevMonthDay`&&i%7==6&&n.weekNumbers.insertAdjacentHTML(`beforeend`,`<span class='flatpickr-day'>`+n.config.getWeek(t)+`</span>`),triggerEvent(`onDayCreate`,o),o}function focusOnDayElem(e){e.focus(),n.config.mode===`range`&&onMouseOver(e)}function getFirstAvailableDay(e){for(var t=e>0?0:n.config.showMonths-1,r=e>0?n.config.showMonths:-1,i=t;i!=r;i+=e)for(var a=n.daysContainer.children[i],o=e>0?0:a.children.length-1,s=e>0?a.children.length:-1,c=o;c!=s;c+=e){var d=a.children[c];if(d.className.indexOf(`hidden`)===-1&&isEnabled(d.dateObj))return d}}function getNextAvailableDay(e,t){for(var r=e.className.indexOf(`Month`)===-1?e.dateObj.getMonth():n.currentMonth,i=t>0?n.config.showMonths:-1,a=t>0?1:-1,o=r-n.currentMonth;o!=i;o+=a)for(var s=n.daysContainer.children[o],c=r-n.currentMonth===o?e.$i+t:t<0?s.children.length-1:0,d=s.children.length,f=c;f>=0&&f<d&&f!=(t>0?d:-1);f+=a){var p=s.children[f];if(p.className.indexOf(`hidden`)===-1&&isEnabled(p.dateObj)&&Math.abs(e.$i-f)>=Math.abs(t))return focusOnDayElem(p)}n.changeMonth(a),focusOnDay(getFirstAvailableDay(a),0)}function focusOnDay(e,t){var r=getClosestActiveElement(),i=isInView(r||document.body),a=e===void 0?i?r:n.selectedDateElem!==void 0&&isInView(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&isInView(n.todayDateElem)?n.todayDateElem:getFirstAvailableDay(t>0?1:-1):e;a===void 0?n._input.focus():i?getNextAvailableDay(a,t):focusOnDayElem(a)}function buildMonthDays(e,t){for(var r=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,i=n.utils.getDaysInMonth((t-1+12)%12,e),a=n.utils.getDaysInMonth(t,e),o=window.document.createDocumentFragment(),s=n.config.showMonths>1,c=s?`prevMonthDay hidden`:`prevMonthDay`,d=s?`nextMonthDay hidden`:`nextMonthDay`,f=i+1-r,p=0;f<=i;f++,p++)o.appendChild(createDay(`flatpickr-day `+c,new Date(e,t-1,f),f,p));for(f=1;f<=a;f++,p++)o.appendChild(createDay(`flatpickr-day`,new Date(e,t,f),f,p));for(var m=a+1;m<=42-r&&(n.config.showMonths===1||p%7!=0);m++,p++)o.appendChild(createDay(`flatpickr-day `+d,new Date(e,t+1,m%a),m,p));var g=createElement(`div`,`dayContainer`);return g.appendChild(o),g}function buildDays(){if(n.daysContainer!==void 0){clearNode(n.daysContainer),n.weekNumbers&&clearNode(n.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<n.config.showMonths;t++){var r=new Date(n.currentYear,n.currentMonth,1);r.setMonth(n.currentMonth+t),e.appendChild(buildMonthDays(r.getFullYear(),r.getMonth()))}n.daysContainer.appendChild(e),n.days=n.daysContainer.firstChild,n.config.mode===`range`&&n.selectedDates.length===1&&onMouseOver()}}function buildMonthSwitch(){if(!(n.config.showMonths>1||n.config.monthSelectorType!==`dropdown`)){var shouldBuildMonth=function(e){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&e<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&e>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML=``;for(var e=0;e<12;e++)if(shouldBuildMonth(e)){var t=createElement(`option`,`flatpickr-monthDropdown-month`);t.value=new Date(n.currentYear,e).getMonth().toString(),t.textContent=monthToStr(e,n.config.shorthandCurrentMonth,n.l10n),t.tabIndex=-1,n.currentMonth===e&&(t.selected=!0),n.monthsDropdownContainer.appendChild(t)}}}function buildMonth(){var e=createElement(`div`,`flatpickr-month`),t=window.document.createDocumentFragment(),r;n.config.showMonths>1||n.config.monthSelectorType===`static`?r=createElement(`span`,`cur-month`):(n.monthsDropdownContainer=createElement(`select`,`flatpickr-monthDropdown-months`),n.monthsDropdownContainer.setAttribute(`aria-label`,n.l10n.monthAriaLabel),bind(n.monthsDropdownContainer,`change`,function(e){var t=getEventTarget(e),r=parseInt(t.value,10);n.changeMonth(r-n.currentMonth),triggerEvent(`onMonthChange`)}),buildMonthSwitch(),r=n.monthsDropdownContainer);var i=createNumberInput(`cur-year`,{tabindex:`-1`}),a=i.getElementsByTagName(`input`)[0];a.setAttribute(`aria-label`,n.l10n.yearAriaLabel),n.config.minDate&&a.setAttribute(`min`,n.config.minDate.getFullYear().toString()),n.config.maxDate&&(a.setAttribute(`max`,n.config.maxDate.getFullYear().toString()),a.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var o=createElement(`div`,`flatpickr-current-month`);return o.appendChild(r),o.appendChild(i),t.appendChild(o),e.appendChild(t),{container:e,yearElement:a,monthElement:r}}function buildMonths(){clearNode(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var e=n.config.showMonths;e--;){var t=buildMonth();n.yearElements.push(t.yearElement),n.monthElements.push(t.monthElement),n.monthNav.appendChild(t.container)}n.monthNav.appendChild(n.nextMonthNav)}function buildMonthNav(){return n.monthNav=createElement(`div`,`flatpickr-months`),n.yearElements=[],n.monthElements=[],n.prevMonthNav=createElement(`span`,`flatpickr-prev-month`),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=createElement(`span`,`flatpickr-next-month`),n.nextMonthNav.innerHTML=n.config.nextArrow,buildMonths(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(e){n.__hidePrevMonthArrow!==e&&(toggleClass(n.prevMonthNav,`flatpickr-disabled`,e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(e){n.__hideNextMonthArrow!==e&&(toggleClass(n.nextMonthNav,`flatpickr-disabled`,e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],updateNavigationCurrentMonth(),n.monthNav}function buildTime(){n.calendarContainer.classList.add(`hasTime`),n.config.noCalendar&&n.calendarContainer.classList.add(`noCalendar`);var e=getDefaultHours(n.config);n.timeContainer=createElement(`div`,`flatpickr-time`),n.timeContainer.tabIndex=-1;var t=createElement(`span`,`flatpickr-time-separator`,`:`),r=createNumberInput(`flatpickr-hour`,{"aria-label":n.l10n.hourAriaLabel});n.hourElement=r.getElementsByTagName(`input`)[0];var i=createNumberInput(`flatpickr-minute`,{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=i.getElementsByTagName(`input`)[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=pad(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:military2ampm(e.hours)),n.minuteElement.value=pad(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute(`step`,n.config.hourIncrement.toString()),n.minuteElement.setAttribute(`step`,n.config.minuteIncrement.toString()),n.hourElement.setAttribute(`min`,n.config.time_24hr?`0`:`1`),n.hourElement.setAttribute(`max`,n.config.time_24hr?`23`:`12`),n.hourElement.setAttribute(`maxlength`,`2`),n.minuteElement.setAttribute(`min`,`0`),n.minuteElement.setAttribute(`max`,`59`),n.minuteElement.setAttribute(`maxlength`,`2`),n.timeContainer.appendChild(r),n.timeContainer.appendChild(t),n.timeContainer.appendChild(i),n.config.time_24hr&&n.timeContainer.classList.add(`time24hr`),n.config.enableSeconds){n.timeContainer.classList.add(`hasSeconds`);var a=createNumberInput(`flatpickr-second`);n.secondElement=a.getElementsByTagName(`input`)[0],n.secondElement.value=pad(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute(`step`,n.minuteElement.getAttribute(`step`)),n.secondElement.setAttribute(`min`,`0`),n.secondElement.setAttribute(`max`,`59`),n.secondElement.setAttribute(`maxlength`,`2`),n.timeContainer.appendChild(createElement(`span`,`flatpickr-time-separator`,`:`)),n.timeContainer.appendChild(a)}return n.config.time_24hr||(n.amPM=createElement(`span`,`flatpickr-am-pm`,n.l10n.amPM[int((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function buildWeekdays(){n.weekdayContainer?clearNode(n.weekdayContainer):n.weekdayContainer=createElement(`div`,`flatpickr-weekdays`);for(var e=n.config.showMonths;e--;){var t=createElement(`div`,`flatpickr-weekdaycontainer`);n.weekdayContainer.appendChild(t)}return updateWeekdays(),n.weekdayContainer}function updateWeekdays(){if(n.weekdayContainer){var e=n.l10n.firstDayOfWeek,t=__spreadArrays(n.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=__spreadArrays(t.splice(e,t.length),t.splice(0,e)));for(var r=n.config.showMonths;r--;)n.weekdayContainer.children[r].innerHTML=`
|
|
2
|
+
<span class='flatpickr-weekday'>
|
|
3
|
+
`+t.join(`</span><span class='flatpickr-weekday'>`)+`
|
|
4
|
+
</span>
|
|
5
|
+
`}}function buildWeeks(){n.calendarContainer.classList.add(`hasWeeks`);var e=createElement(`div`,`flatpickr-weekwrapper`);e.appendChild(createElement(`span`,`flatpickr-weekday`,n.l10n.weekAbbreviation));var t=createElement(`div`,`flatpickr-weeks`);return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}function changeMonth(e,t){t===void 0&&(t=!0);var r=t?e:e-n.currentMonth;r<0&&n._hidePrevMonthArrow===!0||r>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=r,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,triggerEvent(`onYearChange`),buildMonthSwitch()),buildDays(),triggerEvent(`onMonthChange`),updateNavigationCurrentMonth())}function clear(e,t){if(e===void 0&&(e=!0),t===void 0&&(t=!0),n.input.value=``,n.altInput!==void 0&&(n.altInput.value=``),n.mobileInput!==void 0&&(n.mobileInput.value=``),n.selectedDates=[],n.latestSelectedDateObj=void 0,t===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var r=getDefaultHours(n.config),i=r.hours,a=r.minutes,o=r.seconds;setHours(i,a,o)}n.redraw(),e&&triggerEvent(`onChange`)}function close(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove(`open`),n._input!==void 0&&n._input.classList.remove(`active`)),triggerEvent(`onClose`)}function destroy(){n.config!==void 0&&triggerEvent(`onDestroy`);for(var e=n._handlers.length;e--;)n._handlers[e].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode){if(n.config.static&&n.calendarContainer.parentNode){var t=n.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer)}n.altInput&&(n.input.type=`text`,n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove(`flatpickr-input`),n.input.removeAttribute(`readonly`)),`_showTimeInput.latestSelectedDateObj._hideNextMonthArrow._hidePrevMonthArrow.__hideNextMonthArrow.__hidePrevMonthArrow.isMobile.isOpen.selectedDateElem.minDateHasTime.maxDateHasTime.days.daysContainer._input._positionElement.innerContainer.rContainer.monthNav.todayDateElem.calendarContainer.weekdayContainer.prevMonthNav.nextMonthNav.monthsDropdownContainer.currentMonthElement.currentYearElement.navigationCurrentMonth.selectedDateElem.config`.split(`.`).forEach(function(e){try{delete n[e]}catch{}})}function isCalendarElem(e){return n.calendarContainer.contains(e)}function documentClick(e){if(n.isOpen&&!n.config.inline){var t=getEventTarget(e),r=isCalendarElem(t),i=!(t===n.input||t===n.altInput||n.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(n.input)||~e.path.indexOf(n.altInput)))&&!r&&!isCalendarElem(e.relatedTarget),a=!n.config.ignoredFocusElements.some(function(e){return e.contains(t)});i&&a&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==``&&n.input.value!==void 0&&updateTime(),n.close(),n.config&&n.config.mode===`range`&&n.selectedDates.length===1&&n.clear(!1))}}function changeYear(e){if(!(!e||n.config.minDate&&e<n.config.minDate.getFullYear()||n.config.maxDate&&e>n.config.maxDate.getFullYear())){var t=e,r=n.currentYear!==t;n.currentYear=t||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),r&&(n.redraw(),triggerEvent(`onYearChange`),buildMonthSwitch())}}function isEnabled(e,t){t===void 0&&(t=!0);var r=n.parseDate(e,void 0,t);if(n.config.minDate&&r&&compareDates(r,n.config.minDate,t===void 0?!n.minDateHasTime:t)<0||n.config.maxDate&&r&&compareDates(r,n.config.maxDate,t===void 0?!n.maxDateHasTime:t)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(r===void 0)return!1;for(var i=!!n.config.enable,a=n.config.enable??n.config.disable,o=0,s=void 0;o<a.length;o++){if(s=a[o],typeof s==`function`&&s(r)||s instanceof Date&&r!==void 0&&s.getTime()===r.getTime())return i;if(typeof s==`string`){var c=n.parseDate(s,void 0,!0);return c&&c.getTime()===r.getTime()?i:!i}if(typeof s==`object`&&r!==void 0&&s.from&&s.to&&r.getTime()>=s.from.getTime()&&r.getTime()<=s.to.getTime())return i}return!i}function isInView(e){return n.daysContainer!==void 0&&e.className.indexOf(`hidden`)===-1&&e.className.indexOf(`flatpickr-disabled`)===-1&&n.daysContainer.contains(e)}function onBlur(e){var t=e.target===n._input,r=n._input.value.trimEnd()!==getDateStr();t&&r&&!(e.relatedTarget&&isCalendarElem(e.relatedTarget))&&n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function onKeyDown(t){var r=getEventTarget(t),i=n.config.wrap?e.contains(r):r===n._input,a=n.config.allowInput,o=n.isOpen&&(!a||!i),s=n.config.inline&&i&&!a;if(t.keyCode===13&&i){if(a)return n.setDate(n._input.value,!0,r===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),r.blur();n.open()}else if(isCalendarElem(r)||o||s){var c=!!n.timeContainer&&n.timeContainer.contains(r);switch(t.keyCode){case 13:c?(t.preventDefault(),updateTime(),focusAndClose()):selectDate(t);break;case 27:t.preventDefault(),focusAndClose();break;case 8:case 46:i&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(!c&&!i){t.preventDefault();var d=getClosestActiveElement();if(n.daysContainer!==void 0&&(a===!1||d&&isInView(d))){var f=t.keyCode===39?1:-1;t.ctrlKey?(t.stopPropagation(),changeMonth(f),focusOnDay(getFirstAvailableDay(1),0)):focusOnDay(void 0,f)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:t.preventDefault();var p=t.keyCode===40?1:-1;n.daysContainer&&r.$i!==void 0||r===n.input||r===n.altInput?t.ctrlKey?(t.stopPropagation(),changeYear(n.currentYear-p),focusOnDay(getFirstAvailableDay(1),0)):c||focusOnDay(void 0,p*7):r===n.currentYearElement?changeYear(n.currentYear-p):n.config.enableTime&&(!c&&n.hourElement&&n.hourElement.focus(),updateTime(t),n._debouncedChange());break;case 9:if(c){var m=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(e){return e}),g=m.indexOf(r);if(g!==-1){var v=m[g+(t.shiftKey?-1:1)];t.preventDefault(),(v||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(r)&&t.shiftKey&&(t.preventDefault(),n._input.focus())}}if(n.amPM!==void 0&&r===n.amPM)switch(t.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],setHoursFromInputs(),updateValue();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],setHoursFromInputs(),updateValue()}(i||isCalendarElem(r))&&triggerEvent(`onKeyDown`,t)}function onMouseOver(e,t){if(t===void 0&&(t=`flatpickr-day`),!(n.selectedDates.length!==1||e&&(!e.classList.contains(t)||e.classList.contains(`flatpickr-disabled`)))){for(var r=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),i=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),a=Math.min(r,n.selectedDates[0].getTime()),o=Math.max(r,n.selectedDates[0].getTime()),s=!1,c=0,d=0,f=a;f<o;f+=Ui.DAY)isEnabled(new Date(f),!0)||(s||=f>a&&f<o,f<i&&(!c||f>c)?c=f:f>i&&(!d||f<d)&&(d=f));Array.from(n.rContainer.querySelectorAll(`*:nth-child(-n+`+n.config.showMonths+`) > .`+t)).forEach(function(t){var a=t.dateObj.getTime(),o=c>0&&a<c||d>0&&a>d;o?(t.classList.add(`notAllowed`),[`inRange`,`startRange`,`endRange`].forEach(function(e){t.classList.remove(e)})):(!s||o)&&([`startRange`,`inRange`,`endRange`,`notAllowed`].forEach(function(e){t.classList.remove(e)}),e!==void 0&&(e.classList.add(r<=n.selectedDates[0].getTime()?`startRange`:`endRange`),i<r&&a===i?t.classList.add(`startRange`):i>r&&a===i&&t.classList.add(`endRange`),a>=c&&(d===0||a<=d)&&isBetween(a,i,r)&&t.classList.add(`inRange`)))})}}function onResize(){n.isOpen&&!n.config.static&&!n.config.inline&&positionCalendar()}function open(e,t){if(t===void 0&&(t=n._positionElement),n.isMobile===!0){if(e){e.preventDefault();var r=getEventTarget(e);r&&r.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),triggerEvent(`onOpen`)}else if(!(n._input.disabled||n.config.inline)){var i=n.isOpen;n.isOpen=!0,i||(n.calendarContainer.classList.add(`open`),n._input.classList.add(`active`),triggerEvent(`onOpen`),positionCalendar(t)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(e===void 0||!n.timeContainer.contains(e.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}}function minMaxDateSetter(e){return function(t){var r=n.config[`_`+e+`Date`]=n.parseDate(t,n.config.dateFormat),i=n.config[`_`+(e===`min`?`max`:`min`)+`Date`];r!==void 0&&(n[e===`min`?`minDateHasTime`:`maxDateHasTime`]=r.getHours()>0||r.getMinutes()>0||r.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(e){return isEnabled(e)}),!n.selectedDates.length&&e===`min`&&setHoursFromDate(r),updateValue()),n.daysContainer&&(redraw(),r===void 0?n.currentYearElement.removeAttribute(e):n.currentYearElement[e]=r.getFullYear().toString(),n.currentYearElement.disabled=!!i&&r!==void 0&&i.getFullYear()===r.getFullYear())}}function parseConfig(){var r=[`wrap`,`weekNumbers`,`allowInput`,`allowInvalidPreload`,`clickOpens`,`time_24hr`,`enableTime`,`noCalendar`,`altInput`,`shorthandCurrentMonth`,`inline`,`static`,`enableSeconds`,`disableMobile`],i=__assign(__assign({},JSON.parse(JSON.stringify(e.dataset||{}))),t),a={};n.config.parseDate=i.parseDate,n.config.formatDate=i.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(e){n.config._enable=parseDateRules(e)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(e){n.config._disable=parseDateRules(e)}});var o=i.mode===`time`;if(!i.dateFormat&&(i.enableTime||o)){var s=flatpickr.defaultConfig.dateFormat||Ri.dateFormat;a.dateFormat=i.noCalendar||o?`H:i`+(i.enableSeconds?`:S`:``):s+` H:i`+(i.enableSeconds?`:S`:``)}if(i.altInput&&(i.enableTime||o)&&!i.altFormat){var c=flatpickr.defaultConfig.altFormat||Ri.altFormat;a.altFormat=i.noCalendar||o?`h:i`+(i.enableSeconds?`:S K`:` K`):c+(` h:i`+(i.enableSeconds?`:S`:``)+` K`)}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:minMaxDateSetter(`min`)}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:minMaxDateSetter(`max`)});var minMaxTimeSetter=function(e){return function(t){n.config[e===`min`?`_minTime`:`_maxTime`]=n.parseDate(t,`H:i:S`)}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:minMaxTimeSetter(`min`)}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:minMaxTimeSetter(`max`)}),i.mode===`time`&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,a,i);for(var d=0;d<r.length;d++)n.config[r[d]]=n.config[r[d]]===!0||n.config[r[d]]===`true`;Li.filter(function(e){return n.config[e]!==void 0}).forEach(function(e){n.config[e]=arrayify(n.config[e]||[]).map(bindToInstance)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode===`single`&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var d=0;d<n.config.plugins.length;d++){var f=n.config.plugins[d](n)||{};for(var p in f)Li.indexOf(p)>-1?n.config[p]=arrayify(f[p]).map(bindToInstance).concat(n.config[p]):i[p]===void 0&&(n.config[p]=f[p])}i.altInputClass||(n.config.altInputClass=getInputElem().className+` `+n.config.altInputClass),triggerEvent(`onParseConfig`)}function getInputElem(){return n.config.wrap?e.querySelector(`[data-input]`):e}function setupLocale(){typeof n.config.locale!=`object`&&flatpickr.l10ns[n.config.locale]===void 0&&n.config.errorHandler(Error(`flatpickr: invalid locale `+n.config.locale)),n.l10n=__assign(__assign({},flatpickr.l10ns.default),typeof n.config.locale==`object`?n.config.locale:n.config.locale==="default"?void 0:flatpickr.l10ns[n.config.locale]),Vi.D=`(`+n.l10n.weekdays.shorthand.join(`|`)+`)`,Vi.l=`(`+n.l10n.weekdays.longhand.join(`|`)+`)`,Vi.M=`(`+n.l10n.months.shorthand.join(`|`)+`)`,Vi.F=`(`+n.l10n.months.longhand.join(`|`)+`)`,Vi.K=`(`+n.l10n.amPM[0]+`|`+n.l10n.amPM[1]+`|`+n.l10n.amPM[0].toLowerCase()+`|`+n.l10n.amPM[1].toLowerCase()+`)`,__assign(__assign({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr===void 0&&flatpickr.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=createDateFormatter(n),n.parseDate=createDateParser({config:n.config,l10n:n.l10n})}function positionCalendar(e){if(typeof n.config.position==`function`)n.config.position(n,e);else if(n.calendarContainer!==void 0){triggerEvent(`onPreCalendarPosition`);var t=e||n._positionElement,r=Array.prototype.reduce.call(n.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),i=n.calendarContainer.offsetWidth,a=n.config.position.split(` `),o=a[0],s=a.length>1?a[1]:null,c=t.getBoundingClientRect(),d=window.innerHeight-c.bottom,f=o===`above`||o!==`below`&&d<r&&c.top>r,p=window.pageYOffset+c.top+(f?-r-2:t.offsetHeight+2);if(toggleClass(n.calendarContainer,`arrowTop`,!f),toggleClass(n.calendarContainer,`arrowBottom`,f),!n.config.inline){var m=window.pageXOffset+c.left,g=!1,v=!1;s===`center`?(m-=(i-c.width)/2,g=!0):s===`right`&&(m-=i-c.width,v=!0),toggleClass(n.calendarContainer,`arrowLeft`,!g&&!v),toggleClass(n.calendarContainer,`arrowCenter`,g),toggleClass(n.calendarContainer,`arrowRight`,v);var b=window.document.body.offsetWidth-(window.pageXOffset+c.right),x=m+i>window.document.body.offsetWidth,w=b+i>window.document.body.offsetWidth;if(toggleClass(n.calendarContainer,`rightMost`,x),!n.config.static){if(n.calendarContainer.style.top=p+`px`,!x)n.calendarContainer.style.left=m+`px`,n.calendarContainer.style.right=`auto`;else if(!w)n.calendarContainer.style.left=`auto`,n.calendarContainer.style.right=b+`px`;else{var T=getDocumentStyleSheet();if(T===void 0)return;var E=window.document.body.offsetWidth,D=Math.max(0,E/2-i/2),A=`.flatpickr-calendar.centerMost:before`,j=`.flatpickr-calendar.centerMost:after`,M=T.cssRules.length,N=`{left:`+c.left+`px;right:auto;}`;toggleClass(n.calendarContainer,`rightMost`,!1),toggleClass(n.calendarContainer,`centerMost`,!0),T.insertRule(A+`,`+j+N,M),n.calendarContainer.style.left=D+`px`,n.calendarContainer.style.right=`auto`}}}}}function getDocumentStyleSheet(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];if(n.cssRules){try{n.cssRules}catch{continue}e=n;break}}return e??createStyleSheet()}function createStyleSheet(){var e=document.createElement(`style`);return document.head.appendChild(e),e.sheet}function redraw(){n.config.noCalendar||n.isMobile||(buildMonthSwitch(),updateNavigationCurrentMonth(),buildDays())}function focusAndClose(){n._input.focus(),window.navigator.userAgent.indexOf(`MSIE`)!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function selectDate(e){e.preventDefault(),e.stopPropagation();var isSelectable=function(e){return e.classList&&e.classList.contains(`flatpickr-day`)&&!e.classList.contains(`flatpickr-disabled`)&&!e.classList.contains(`notAllowed`)},t=findParent(getEventTarget(e),isSelectable);if(t!==void 0){var r=t,i=n.latestSelectedDateObj=new Date(r.dateObj.getTime()),a=(i.getMonth()<n.currentMonth||i.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!==`range`;if(n.selectedDateElem=r,n.config.mode===`single`)n.selectedDates=[i];else if(n.config.mode===`multiple`){var o=isDateSelected(i);o?n.selectedDates.splice(parseInt(o),1):n.selectedDates.push(i)}else n.config.mode===`range`&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=i,n.selectedDates.push(i),compareDates(i,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(setHoursFromInputs(),a){var s=n.currentYear!==i.getFullYear();n.currentYear=i.getFullYear(),n.currentMonth=i.getMonth(),s&&(triggerEvent(`onYearChange`),buildMonthSwitch()),triggerEvent(`onMonthChange`)}if(updateNavigationCurrentMonth(),buildDays(),updateValue(),!a&&n.config.mode!==`range`&&n.config.showMonths===1?focusOnDayElem(r):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var c=n.config.mode===`single`&&!n.config.enableTime,d=n.config.mode===`range`&&n.selectedDates.length===2&&!n.config.enableTime;(c||d)&&focusAndClose()}triggerChange()}}var r={locale:[setupLocale,updateWeekdays],showMonths:[buildMonths,setCalendarWidth,buildWeekdays],minDate:[jumpToDate],maxDate:[jumpToDate],positionElement:[updatePositionElement],clickOpens:[function(){n.config.clickOpens===!0?(bind(n._input,`focus`,n.open),bind(n._input,`click`,n.open)):(n._input.removeEventListener(`focus`,n.open),n._input.removeEventListener(`click`,n.open))}]};function set(e,t){if(typeof e==`object`&&e)for(var i in Object.assign(n.config,e),e)r[i]!==void 0&&r[i].forEach(function(e){return e()});else n.config[e]=t,r[e]===void 0?Li.indexOf(e)>-1&&(n.config[e]=arrayify(t)):r[e].forEach(function(e){return e()});n.redraw(),updateValue(!0)}function setSelectedDate(e,t){var r=[];if(e instanceof Array)r=e.map(function(e){return n.parseDate(e,t)});else if(e instanceof Date||typeof e==`number`)r=[n.parseDate(e,t)];else if(typeof e==`string`)switch(n.config.mode){case`single`:case`time`:r=[n.parseDate(e,t)];break;case`multiple`:r=e.split(n.config.conjunction).map(function(e){return n.parseDate(e,t)});break;case`range`:r=e.split(n.l10n.rangeSeparator).map(function(e){return n.parseDate(e,t)})}else n.config.errorHandler(Error(`Invalid date supplied: `+JSON.stringify(e)));n.selectedDates=n.config.allowInvalidPreload?r:r.filter(function(e){return e instanceof Date&&isEnabled(e,!1)}),n.config.mode===`range`&&n.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function setDate(e,t,r){if(t===void 0&&(t=!1),r===void 0&&(r=n.config.dateFormat),e!==0&&!e||e instanceof Array&&e.length===0)return n.clear(t);setSelectedDate(e,r),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),jumpToDate(void 0,t),setHoursFromDate(),n.selectedDates.length===0&&n.clear(!1),updateValue(t),t&&triggerEvent(`onChange`)}function parseDateRules(e){return e.slice().map(function(e){return typeof e==`string`||typeof e==`number`||e instanceof Date?n.parseDate(e,void 0,!0):e&&typeof e==`object`&&e.from&&e.to?{from:n.parseDate(e.from,void 0),to:n.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function setupDates(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var e=n.config.defaultDate||((n.input.nodeName===`INPUT`||n.input.nodeName===`TEXTAREA`)&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);e&&setSelectedDate(e,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,`H:i`)),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,`H:i`)),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function setupInputs(){n.input=getInputElem(),n.input?(n.input._type=n.input.type,n.input.type=`text`,n.input.classList.add(`flatpickr-input`),n._input=n.input,n.config.altInput&&(n.altInput=createElement(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type=`text`,n.input.setAttribute(`type`,`hidden`),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute(`readonly`,`readonly`),updatePositionElement()):n.config.errorHandler(Error(`Invalid input element specified`))}function updatePositionElement(){n._positionElement=n.config.positionElement||n._input}function setupMobile(){var e=n.config.enableTime?n.config.noCalendar?`time`:`datetime-local`:`date`;n.mobileInput=createElement(`input`,n.input.className+` flatpickr-mobile`),n.mobileInput.tabIndex=1,n.mobileInput.type=e,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=e===`datetime-local`?`Y-m-d\\TH:i:S`:e===`date`?`Y-m-d`:`H:i:S`,n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,`Y-m-d`)),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,`Y-m-d`)),n.input.getAttribute(`step`)&&(n.mobileInput.step=String(n.input.getAttribute(`step`))),n.input.type=`hidden`,n.altInput!==void 0&&(n.altInput.type=`hidden`);try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch{}bind(n.mobileInput,`change`,function(e){n.setDate(getEventTarget(e).value,!1,n.mobileFormatStr),triggerEvent(`onChange`),triggerEvent(`onClose`)})}function toggle(e){if(n.isOpen===!0)return n.close();n.open(e)}function triggerEvent(e,t){if(n.config!==void 0){var r=n.config[e];if(r!==void 0&&r.length>0)for(var i=0;r[i]&&i<r.length;i++)r[i](n.selectedDates,n.input.value,n,t);e===`onChange`&&(n.input.dispatchEvent(createEvent(`change`)),n.input.dispatchEvent(createEvent(`input`)))}}function createEvent(e){var t=document.createEvent(`Event`);return t.initEvent(e,!0,!0),t}function isDateSelected(e){for(var t=0;t<n.selectedDates.length;t++){var r=n.selectedDates[t];if(r instanceof Date&&compareDates(r,e)===0)return``+t}return!1}function isDateInRange(e){return n.config.mode!==`range`||n.selectedDates.length<2?!1:compareDates(e,n.selectedDates[0])>=0&&compareDates(e,n.selectedDates[1])<=0}function updateNavigationCurrentMonth(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(e,t){var r=new Date(n.currentYear,n.currentMonth,1);r.setMonth(n.currentMonth+t),n.config.showMonths>1||n.config.monthSelectorType===`static`?n.monthElements[t].textContent=monthToStr(r.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+` `:n.monthsDropdownContainer.value=r.getMonth().toString(),e.value=r.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function getDateStr(e){var t=e||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(e){return n.formatDate(e,t)}).filter(function(e,t,r){return n.config.mode!==`range`||n.config.enableTime||r.indexOf(e)===t}).join(n.config.mode===`range`?n.l10n.rangeSeparator:n.config.conjunction)}function updateValue(e){e===void 0&&(e=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj===void 0?``:n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr)),n.input.value=getDateStr(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=getDateStr(n.config.altFormat)),e!==!1&&triggerEvent(`onValueUpdate`)}function onMonthNavClick(e){var t=getEventTarget(e),r=n.prevMonthNav.contains(t),i=n.nextMonthNav.contains(t);r||i?changeMonth(r?-1:1):n.yearElements.indexOf(t)>=0?t.select():t.classList.contains(`arrowUp`)?n.changeYear(n.currentYear+1):t.classList.contains(`arrowDown`)&&n.changeYear(n.currentYear-1)}function timeWrapper(e){e.preventDefault();var t=e.type===`keydown`,r=getEventTarget(e),i=r;n.amPM!==void 0&&r===n.amPM&&(n.amPM.textContent=n.l10n.amPM[int(n.amPM.textContent===n.l10n.amPM[0])]);var a=parseFloat(i.getAttribute(`min`)),o=parseFloat(i.getAttribute(`max`)),s=parseFloat(i.getAttribute(`step`)),c=parseInt(i.value,10),d=c+s*(e.delta||(t?e.which===38?1:-1:0));if(i.value!==void 0&&i.value.length===2){var f=i===n.hourElement,p=i===n.minuteElement;d<a?(d=o+d+int(!f)+(int(f)&&int(!n.amPM)),p&&incrementNumInput(void 0,-1,n.hourElement)):d>o&&(d=i===n.hourElement?d-o-int(!n.amPM):a,p&&incrementNumInput(void 0,1,n.hourElement)),n.amPM&&f&&(s===1?d+c===23:Math.abs(d-c)>s)&&(n.amPM.textContent=n.l10n.amPM[int(n.amPM.textContent===n.l10n.amPM[0])]),i.value=pad(d)}}return init(),n}function _flatpickr(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var a=n[i];try{if(a.getAttribute(`data-fp-omit`)!==null)continue;a._flatpickr!==void 0&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=FlatpickrInstance(a,t||{}),r.push(a._flatpickr)}catch(e){console.error(e)}}return r.length===1?r[0]:r}typeof HTMLElement<`u`&&typeof HTMLCollection<`u`&&typeof NodeList<`u`&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return _flatpickr(this,e)},HTMLElement.prototype.flatpickr=function(e){return _flatpickr([this],e)});var flatpickr=function(e,t){return typeof e==`string`?_flatpickr(window.document.querySelectorAll(e),t):e instanceof Node?_flatpickr([e],t):_flatpickr(e,t)};flatpickr.defaultConfig={},flatpickr.l10ns={en:__assign({},zi),default:__assign({},zi)},flatpickr.localize=function(e){flatpickr.l10ns.default=__assign(__assign({},flatpickr.l10ns.default),e)},flatpickr.setDefaults=function(e){flatpickr.defaultConfig=__assign(__assign({},flatpickr.defaultConfig),e)},flatpickr.parseDate=createDateParser({}),flatpickr.formatDate=createDateFormatter({}),flatpickr.compareDates=compareDates,typeof jQuery<`u`&&jQuery.fn!==void 0&&(jQuery.fn.flatpickr=function(e){return _flatpickr(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e==`string`?parseInt(e,10):e))},typeof window<`u`&&(window.flatpickr=flatpickr);function parseToSimpleTree(e){let t=ne.parse(e);return le(t,e)}var evaluate=(e,t={},n={})=>{let{debug:r=!1,strict:i=!1,buildDebugString=e=>`{{ ${e.message.toLowerCase()} }}`,sanitizer:a}=n,o=parseToSimpleTree(e);return buildNodeEvaluator({debug:r,strict:i,buildDebugString,sanitizer:a})(o,enhanceContext(t,null))},buildNodeEvaluator=e=>{let{debug:t,strict:n,buildDebugString:r,sanitizer:i}=e,errorHandler=e=>{if(t&&r)return r(e);throw e},evaluateNodeValue=(e,t={})=>{switch(e.name){case`SimpleTextBlock`:return e.content;case`Insert`:{let n=e.children[0].content;try{let{value:e}=pe(`string(${n})`,t);return i?i(e):e}catch{return errorHandler(Error(`FEEL expression ${n} couldn't be evaluated`))}}case`EmptyInsert`:return``;case`Feel`:case`FeelBlock`:{let n=e.content;try{let{value:e}=pe(`string(${n})`,t);return i?i(e):e}catch{return errorHandler(Error(`FEEL expression ${n} couldn't be evaluated`))}}case`Feelers`:return e.children.map(e=>evaluateNode(e,t)).join(``);case`ConditionalSpanner`:{let r=e.children[0].content,i;try{let{value:e}=pe(r,t);i=e}catch{return errorHandler(Error(`FEEL expression ${r} couldn't be evaluated`))}if(n&&typeof i!=`boolean`)return errorHandler(Error(`FEEL expression ${r} expected to evaluate to a boolean`));if(i){let n=e.children.slice(1,e.children.length-1).map(e=>evaluateNode(e,t)).join(``);return n+(e.children[e.children.length-1].name.endsWith(`Nl`)&&!n.endsWith(`
|
|
6
|
+
`)?`
|
|
7
|
+
`:``)}return``}case`LoopSpanner`:{let r=e.children[0].content,i;try{let{value:e}=pe(r,t);i=e}catch{return errorHandler(Error(`FEEL expression ${r} couldn't be evaluated`))}if(!Array.isArray(i)){if(n)return errorHandler(Error(`FEEL expression ${r} expected to evaluate to an array`));i=i==null?[]:[i]}let a=e.children.slice(1,e.children.length-1),evaluateChildren=(e,t)=>{let n=enhanceContext(e,t);return a.map(e=>evaluateNode(e,n)).join(``)},o=i.map(e=>evaluateChildren(e,t)).join(``);return o+(e.children[e.children.length-1].name.endsWith(`Nl`)&&!o.endsWith(`
|
|
8
|
+
`)?`
|
|
9
|
+
`:``)}}},evaluateNode=(e,t={})=>{try{return evaluateNodeValue(e,t)}catch(e){return errorHandler(e)}};return evaluateNode},enhanceContext=(e,t)=>typeof e==`object`?{this:e,parent:t,...e,_this_:e,_parent_:t}:{this:e,parent:t,_this_:e,_parent_:t};function I(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gi=I();function W(e){Gi=e}var Ki={exec:()=>null};function C(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function h(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Ji.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var qi=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Ji={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:C(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:C(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:C(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:C(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:C(e=>RegExp(`^ {0,${e}}(?:</?(?:${la})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:C(e=>RegExp(`^ {0,${e}}>`))},Yi=/^(?:[ \t]*(?:\n|$))+/,Xi=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Zi=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$i=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ea=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ta=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,na=h(ta).replace(/bull/g,ea).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),ra=h(ta).replace(/bull/g,ea).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ia=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,aa=/^[^\n]+/,oa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sa=h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,oa).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ca=h(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ea).getRegex(),la=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,ua=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,da=h(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,ua).replace(`tag`,la).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ke=e=>h(ia).replace(`hr`,Qi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,la).getRegex(),fa=ke(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),pa=ke(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ma={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,pa).getRegex(),code:Xi,def:sa,fences:Zi,heading:$i,hr:Qi,html:da,lheading:na,list:ca,newline:Yi,paragraph:fa,table:Ki,text:aa},ha=h(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Qi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,la).getRegex(),ga={...ma,lheading:ra,table:ha,paragraph:h(ia).replace(`hr`,Qi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,ha).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,la).getRegex()},_a={...ma,html:h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,ua).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ki,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(ia).replace(`hr`,Qi).replace(`heading`,` *#{1,6} *[^
|
|
10
|
+
]`).replace(`lheading`,na).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},va=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ya=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ba=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,xa=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Sa=/[\p{P}\p{S}]/u,Ca=/[\s\p{P}\p{S}]/u,wa=/[^\s\p{P}\p{S}]/u,Ta=h(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Ca).getRegex(),Ea=/[\p{Pi}\p{Ps}"']/u,Da=/(?!~)[\p{P}\p{S}]/u,Oa=/(?!~)[\s\p{P}\p{S}]/u,ka=/(?:[^\s\p{P}\p{S}]|~)/u,Aa=h(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,qi?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),ja=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ma=h(ja,`u`).replace(/punct/g,Sa).getRegex(),Na=h(ja,`u`).replace(/punct/g,Da).getRegex(),Pa=h(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Ea).replace(/punct/g,Sa).getRegex(),Fa=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Ia=h(Fa,`gu`).replace(/notPunctSpace/g,wa).replace(/punctSpace/g,Ca).replace(/punct/g,Sa).getRegex(),La=h(Fa,`gu`).replace(/notPunctSpace/g,ka).replace(/punctSpace/g,Oa).replace(/punct/g,Da).getRegex(),Ra=h(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,wa).replace(/punctSpace/g,Ca).replace(/punct/g,Sa).getRegex(),za=h(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,wa).replace(/punctSpace/g,Ca).replace(/punct/g,Sa).getRegex(),Ba=h(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,wa).replace(/punctSpace/g,Ca).replace(/punct/g,Sa).getRegex(),Va=h(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Sa).getRegex(),Ha=h(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,wa).replace(/punctSpace/g,Ca).replace(/punct/g,Sa).getRegex(),Ua=h(/\\(punct)/,`gu`).replace(/punct/g,Sa).getRegex(),Wa=h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ga=h(ua).replace(`(?:-->|$)`,`-->`).getRegex(),Ka=h(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Ga).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qa=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Ja=h(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,qa).getRegex(),Ya=h(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,Ja).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Xa=h(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Ja).replace(`ref`,oa).getRegex(),Za=h(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,oa).getRegex(),Qa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,$a=h(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,qa).getRegex(),eo=h(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,h(/^!?\[(label)\]\[(ref)\]/).replace(`label`,$a).replace(`ref`,Qa).getRegex()).replace(`nolink`,h(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Qa).getRegex()).getRegex(),to=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,no=h(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),ro={_backpedal:Ki,anyPunctuation:Ua,autolink:Wa,blockSkip:Aa,br:ba,code:ya,del:Ki,delLDelim:Ki,delRDelim:Ki,emStrongLDelim:Ma,emStrongRDelimAst:Ia,emStrongRDelimUnd:za,escape:va,link:Ya,nolink:Za,punctuation:Ta,reflink:Xa,reflinkSearch:eo,tag:Ka,text:xa,url:Ki},io={...ro,emStrongLDelim:Pa,emStrongRDelimAst:Ra,emStrongRDelimUnd:Ba,link:h(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Ja).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Ja).getRegex()},ao={...ro,emStrongRDelimAst:La,emStrongLDelim:Na,delLDelim:Va,delRDelim:Ha,url:h(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,no).replace(`protocol`,to).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:h(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,to).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},oo={...ao,br:h(ba).replace(`{2,}`,`*`).getRegex(),text:h(ao.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},so={normal:ma,gfm:ga,pedantic:_a},co={normal:ro,gfm:ao,breaks:oo,pedantic:io},lo={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Re=e=>lo[e];function O(e,t){if(t){if(Ji.escapeTest.test(e))return e.replace(Ji.escapeReplace,Re)}else if(Ji.escapeTestNoEncode.test(e))return e.replace(Ji.escapeReplaceNoEncode,Re);return e}function Te(e){return e.replace(Ji.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function re(e){try{e=encodeURI(e).replace(Ji.percentDecode,`%`)}catch{return null}return e}function se(e,t){let n=e.replace(Ji.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Ji.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(Ji.slashPipe,`|`);return n}function L(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function ie(e){let t=e.split(`
|
|
11
|
+
`),n=t.length-1;for(;n>=0&&Ji.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
12
|
+
`)}function q(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function oe(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function ae(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Oe(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let d=r.state.linkEmitted,f=r.state.inRawBlock;r.state.linkEmitted=!1;let p=r.inlineTokens(s),m=r.state.linkEmitted;if(r.state.linkEmitted=d,r.state.inLink=!1,!c){if(m){r.state.inRawBlock=f;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:p}}function Pt(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
13
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
14
|
+
`)}function we(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var y=class{options;rules;lexer;constructor(e){this.options=e||Gi}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:ie(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Pt(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=L(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:L(t[0],`
|
|
15
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:L(t[0],`
|
|
16
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=L(t[0],`
|
|
17
|
+
`).split(`
|
|
18
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
19
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
20
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
21
|
+
${s}`:s,r=r?`${r}
|
|
22
|
+
${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=d,e.length===0)break;let f=i.at(-1);if(f?.type===`code`)break;if(f?.type===`blockquote`){let t=f,a=e.join(`
|
|
23
|
+
`),o=t.raw+`
|
|
24
|
+
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),d=c?c.split(`
|
|
25
|
+
`).length:0,p=d?e.slice(0,-d):e;p.length>0&&(n=`${n}
|
|
26
|
+
${p.join(`
|
|
27
|
+
`)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(f?.type===`list`){let t=f,a=t.raw+`
|
|
28
|
+
`+e.join(`
|
|
29
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-f.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
30
|
+
`)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
31
|
+
`,1)[0],d=t[1].length,f=this.options.pedantic?ae(c,d):c.replace(this.rules.other.leadingSpaceTab,e=>ae(e,d)),p=e.split(`
|
|
32
|
+
`,1)[0],m=!f.trim(),g=0;if(this.options.pedantic?(g=2,s=f.trimStart()):m?g=d+1:(g=f.search(this.rules.other.nonSpaceChar),g=g>4?1:g,s=f.slice(g),g+=d),m&&this.rules.other.blankLine.test(p)&&(r+=p+`
|
|
33
|
+
`,e=e.substring(p.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(g),n=this.rules.other.hrRegex(g),i=this.rules.other.fencesBeginRegex(g),a=this.rules.other.headingBeginRegex(g),o=this.rules.other.htmlBeginRegex(g),c=this.rules.other.blockquoteBeginRegex(g);for(;e;){let d=e.split(`
|
|
34
|
+
`,1)[0],v;if(p=d,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting,` `),v=p):v=p.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(p)||a.test(p)||o.test(p)||c.test(p)||t.test(p)||n.test(p))break;if(v.search(this.rules.other.nonSpaceChar)>=g||!p.trim())s+=`
|
|
35
|
+
`+v.slice(g);else{if(m||f.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(f)||a.test(f)||n.test(f))break;s+=`
|
|
36
|
+
`+p}m=!p.trim(),r+=d+`
|
|
37
|
+
`,e=e.substring(d.length+1),f=v.slice(g)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=ie(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&oe(t[2],`()`)!==-1)return;let e=q(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:L(t[0],`
|
|
38
|
+
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=se(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
39
|
+
`):[],a={type:`table`,raw:L(t[0],`
|
|
40
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(se(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:L(t[0],`
|
|
41
|
+
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
42
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&we(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=L(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=oe(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),Oe(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&we(e,n[1],r,this.rules))return;let i=t[q((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Oe(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,d=r[0][0],f=n===d,p=d===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,t=t.slice(-1*e.length+i);(r=p.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(f)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let d=n.slice(2,-2);return{type:`strong`,raw:n,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:Te(t[0]),escaped:e}}}},uo=class l{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Gi,this.options.tokenizer=this.options.tokenizer||new y,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:Ji,block:so.normal,inline:co.normal};this.options.pedantic?(t.block=so.pedantic,t.inline=co.pedantic):this.options.gfm&&(t.block=so.gfm,t.inline=this.options.breaks?co.breaks:co.gfm),this.tokenizer.rules=t}static get rules(){return{block:so,inline:co}}static lex(e,t){return new l(t).lex(e)}static lexInline(e,t){return new l(t).inlineTokens(e)}lex(e){e=e.replace(Ji.carriageReturn,`
|
|
43
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Ji.tabCharGlobal,` `).replace(Ji.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
44
|
+
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
45
|
+
`)?``:`
|
|
46
|
+
`)+i.raw,n.text+=`
|
|
47
|
+
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if((i=this.tokenizer.fences(e))||(i=this.tokenizer.heading(e))||(i=this.tokenizer.hr(e))||(i=this.tokenizer.blockquote(e))||(i=this.tokenizer.list(e))||(i=this.tokenizer.html(e))){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
48
|
+
`)?``:`
|
|
49
|
+
`)+i.raw,n.text+=`
|
|
50
|
+
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if((i=this.tokenizer.table(e))||(i=this.tokenizer.lheading(e))){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
51
|
+
`)?``:`
|
|
52
|
+
`)+i.raw,r.text+=`
|
|
53
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length)}else if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
54
|
+
`)?``:`
|
|
55
|
+
`)+i.raw,n.text+=`
|
|
56
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,q(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,u=t=>{let n=t.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,q(t.slice(n+1,-1))))return t;if(n>1&&t.charAt(0)!==`!`){let r=t.slice(1,n-1);if(this.linkInText(r))return`[`+r.replace(e,u)+`][`+`a`.repeat(t.length-n-2)+`]`}return`[`+`a`.repeat(t.length-2)+`]`};n=n.replace(e,u)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if((o=this.tokenizer.emStrong(e,n,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,n,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},S=class{options;parser;constructor(e){this.options=e||Gi}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Ji.notSpaceStart)?.[0],i=e?e.replace(Ji.endingNewline,``)+`
|
|
57
|
+
`:``;return r?`<pre><code class="language-`+O(r)+`">`+(n?i:O(i,!0))+`</code></pre>
|
|
58
|
+
`:`<pre><code>`+(n?i:O(i,!0))+`</code></pre>
|
|
59
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
60
|
+
${this.parser.parse(e)}</blockquote>
|
|
61
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
62
|
+
`}hr(e){return`<hr>
|
|
63
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
64
|
+
`+r+`</`+i+`>
|
|
65
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
66
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
67
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
68
|
+
<thead>
|
|
69
|
+
`+t+`</thead>
|
|
70
|
+
`+r+`</table>
|
|
71
|
+
`}tablerow({text:e}){return`<tr>
|
|
72
|
+
${e}</tr>
|
|
73
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
74
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${O(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?O(n,!0):this.parser.parseInline(r),o=re(e);if(o===null)return a;e=O(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+O(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=re(e);if(i===null)return O(n);e=i;let a=`<img src="${O(e)}" alt="${O(n)}"`;return t&&(a+=` title="${O(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:O(e.text)}},z=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},fo=class l{options;renderer;textRenderer;constructor(e){this.options=e||Gi,this.options.renderer=this.options.renderer||new S,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new z}static parse(e,t){return new l(t).parse(e)}static parseInline(e,t){return new l(t).parseInline(e)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},_=class{options;block;constructor(e){this.options=e||Gi}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?uo.lex:uo.lexInline}provideParser(e=this.block){return e?fo.parse:fo.parseInline}},F=class{defaults=I();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=fo;Renderer=S;TextRenderer=z;Lexer=uo;Tokenizer=y;Hooks=_;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new S(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new y(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new _;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=_.passThroughHooks.has(n)?e=>{if(this.defaults.async&&_.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return uo.lex(e,t??this.defaults)}parser(e,t){return fo.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?uo.lex:uo.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?fo.parse:fo.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?uo.lex:uo.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?fo.parse:fo.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
75
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+O(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},po=new F;function k(e,t){return po.parse(e,t)}k.options=k.setOptions=function(e){return po.setOptions(e),k.defaults=po.defaults,W(k.defaults),k},k.getDefaults=I,k.defaults=Gi;function yt(...e){return po.use(...e),k.defaults=po.defaults,W(k.defaults),k}k.use=yt,k.walkTokens=function(e,t){return po.walkTokens(e,t)},k.parseInline=po.parseInline,k.Parser=fo,k.parser=fo.parse,k.Renderer=S,k.TextRenderer=z,k.Lexer=uo,k.lexer=uo.lex,k.Tokenizer=y,k.Hooks=_,k.parse=k,k.options,k.setOptions,k.walkTokens,k.parseInline,fo.parse,uo.lex;function translate(e,t){return t||={},e.replace(/{([^}]+)}/g,function(e,n){return t[n]||`{`+n+`}`})}var mo={translate:[`value`,translate]},getFlavouredFeelVariableNames=(e,t=`expression`,n={})=>{let{depth:r=0,specialDepthAccessors:i={}}=n;if(![`expression`,`unaryTest`].includes(t))return[];let a=function _unfoldVariables(e){if(e.name===`PathExpression`){let t=_linearizePathExpression(e)[0];return t.name===`Context`?_unfoldVariables(t):Object.keys(i).length===0?r===0?[_getVariableNameAtPathIndex(e,0)]:[]:Array.from(_smartExtractVariableNames(e,r,i))}if(r===0&&e.name===`VariableName`)return[_cleanupVariableName(e.variableName)];if(e.name===`FunctionInvocation`)return e.children.filter(e=>e.name!==`VariableName`).reduce((e,t)=>e.concat(_unfoldVariables(t)),[]);if(e.name===`Type`)return[];if(e.name===`QuantifiedExpression`||e.name===`ForExpression`){let t=_collectBoundVariableNames(e);return e.children.reduce((e,t)=>e.concat(_unfoldVariables(t)),[]).filter(e=>!t.includes(e))}if(e.children){let t=e.children.reduce((e,t)=>e.concat(_unfoldVariables(t)),[]);return e.name===`FilterContext`?t.filter(e=>e!==`item`):t}return[]}(_buildSimpleFeelStructureTree(t===`expression`?me(e,{},void 0):fe(e,{},void 0),e));return[...new Set(a)]},_getVariableNameAtPathIndex=(e,t)=>_linearizePathExpression(e)[t].variableName||null,_smartExtractVariableNames=(e,t,n)=>{let r=[{previous:null,current:t-1}],i=new Set,a=_linearizePathExpression(e);for(let e=0;e<a.length;e++){let t=a[e].variableName;r=t in n?n[t].reduce((e,t)=>[...e,...r.map(e=>({previous:e.current,current:e.current+t}))],[]).filter(e=>e.current>=-1):r.map(e=>({previous:e.current,current:e.current+1})),r.some(e=>e.previous===-1&&e.current===0)&&i.add(t)}return new Set(i)},_linearizePathExpression=e=>{let t=e,n=[];for(;t.name===`PathExpression`;)n.push(t.children[t.children.length-1]),t=t.children[0];return n.push(t),n.reverse()},_buildSimpleFeelStructureTree=(e,t)=>{let n=[{children:[]}];return e.iterate({enter:e=>{let r={name:e.type.name,children:[]};e.type.name===`VariableName`&&(r.variableName=t.slice(e.from,e.to)),[`Name`,`PathName`].includes(e.type.name)&&(r.variableName=t.slice(e.from,e.to)),n.push(r)},leave:()=>{let e=n.pop();n[n.length-1].children.push(e)}}),_extractFilterExpressions(n[0].children[0])},_extractFilterExpressions=e=>{let t={name:`Root`,children:[e]},iterate=e=>{if(e.children)for(let n=0;n<e.children.length;n++)if(e.children[n].name===`FilterExpression`){let r=e.children[n].children[0],i=e.children[n].children[2];e.children[n]=r;let a={name:`FilterContext`,children:[i]};t.children.push(a),iterate(i)}else iterate(e.children[n])};return iterate(e),t},ho=[`not`],_cleanupVariableName=e=>{for(let t of ho)if(e.endsWith(` `+t))return e.slice(0,-(t.length+1));return e},_collectBoundVariableNames=e=>{let t=[],collect=e=>{if(e.name===`InExpression`){let n=e.children.find(e=>e.name===`Name`);n&&n.variableName&&t.push(n.variableName)}e.children&&e.children.forEach(collect)};return collect(e),t},FeelExpressionLanguage=class{constructor(e){this._eventBus=e}isExpression(e){return K(e)&&e.startsWith(`=`)}getVariableNames(e,t={}){let{type:n=`expression`}=t;if(!this.isExpression(e))return[];if(![`unaryTest`,`expression`].includes(n))throw Error(`Unknown expression type: `+n);return getFlavouredFeelVariableNames(e,n)}evaluate(e,t={}){if(!this.isExpression(e))return null;try{let{value:n}=pe(e.slice(1),t);return n}catch(e){return this._eventBus.fire(`error`,{error:e}),null}}evaluateUnaryTest(e,t={}){if(!this.isExpression(e))return null;try{let{value:n}=de(e.slice(1),t);return n}catch(e){return this._eventBus.fire(`error`,{error:e}),null}}};FeelExpressionLanguage.$inject=[`eventBus`];var FeelersTemplating=class{constructor(){}isTemplate(e){return K(e)&&(e.startsWith(`=`)||/{{.*?}}/.test(e))}getVariableNames(e){if(!this.isTemplate(e))return[];let t=this._extractExpressionsWithDepth(e),n={parent:[-1,1],_parent_:[-1],this:[0,1],_this_:[0]};return t.reduce((e,{expression:t,depth:r})=>e.concat(getFlavouredFeelVariableNames(t,`expression`,{depth:r,specialDepthAccessors:n})),[])}evaluate(e,t={},n={}){let{debug:r=!1,strict:i=!1,buildDebugString=e=>` {{⚠}} `,sanitizer=e=>e}=n;return evaluate(e,t,{debug:r,strict:i,buildDebugString,sanitizer})}_extractExpressionsWithDepth(e){return function _traverse(e,t=0){if([`Feel`,`FeelBlock`].includes(e.name))return[{depth:t,expression:e.content}];if(e.name===`LoopSpanner`){let n=e.children[0].content,r=e.children.slice(1).reduce((e,n)=>e.concat(_traverse(n,t+1)),[]);return[{depth:t,expression:n},...r]}return e.children.reduce((e,n)=>e.concat(_traverse(n,t)),[])}(parseToSimpleTree(e))}};FeelersTemplating.$inject=[];var go=1440,_o={DATE:`date`,TIME:`time`,DATETIME:`datetime`},vo={UTC_OFFSET:`utc_offset`,UTC_NORMALIZED:`utc_normalized`,NO_TIMEZONE:`no_timezone`},yo={[_o.DATE]:`Date`,[_o.TIME]:`Time`,[_o.DATETIME]:`Date & Time`},bo={[vo.UTC_OFFSET]:`UTC offset`,[vo.UTC_NORMALIZED]:`UTC normalized`,[vo.NO_TIMEZONE]:`No timezone`},xo=[`subtype`],So=[`dateLabel`],Co=[`disallowPassedDates`],wo=[`timeLabel`],To=[`use24h`],Eo=[`timeInterval`],Do=[`timeSerializingFormat`],Oo={STATIC:`static`,INPUT:`input`,EXPRESSION:`expression`},ko=Oo.STATIC,Ao={[Oo.STATIC]:`Static`,[Oo.INPUT]:`Input data`,[Oo.EXPRESSION]:`Expression`},jo={[Oo.STATIC]:[`values`],[Oo.INPUT]:[`valuesKey`],[Oo.EXPRESSION]:[`valuesExpression`]},Mo={[Oo.STATIC]:[{label:`Value`,value:`value`}],[Oo.INPUT]:``,[Oo.EXPRESSION]:`=`};function getOptionsSource(e){for(let t of Object.values(Oo))if(P(e,jo[t])!==void 0)return t;return ko}var No=`sandbox`,Po=`allow`,Fo=[{attribute:No,directive:`allow-scripts`,property:`allowScripts`,label:`Script execution`},{attribute:No,directive:`allow-same-origin`,property:`allowSameOrigin`,label:`Allow same origin`},{attribute:Po,directive:`fullscreen`,property:`fullscreen`,label:`Open in fullscreen`},{attribute:Po,directive:`geolocation`,property:`geolocation`,label:`Geolocation`},{attribute:Po,directive:`camera`,property:`camera`,label:`Camera access`},{attribute:Po,directive:`microphone`,property:`microphone`,label:`Microphone access`},{attribute:No,directive:`allow-forms`,property:`allowForms`,label:`Forms submission`},{attribute:No,directive:`allow-modals`,property:`allowModals`,label:`Open modal windows`},{attribute:No,directive:`allow-popups`,property:`allowPopups`,label:`Open popups`},{attribute:No,directive:`allow-top-navigation`,property:`allowTopNavigation`,label:`Top level navigation`},{attribute:No,directive:`allow-storage-access-by-user-activation`,property:`allowStorageAccessByUserActivation`,label:`Storage access by user`}],Io=`# Text`;function createInjector(e){let t=new ue(e);return t.init(),t}function createFormContainer(e=`fjs`){let t=document.createElement(`div`);return t.classList.add(`${e}-container`,`bio-theme-parent`),t}function formFieldClasses(e,{errors:t=[],disabled:n=!1,readonly:r=!1}={}){if(!e)throw Error(`type required`);return(0,X.default)(`fjs-form-field`,`fjs-form-field-${e}`,{"fjs-has-errors":t.length>0,"fjs-disabled":n,"fjs-readonly":r})}function gridColumnClasses(e){let{layout:t={}}=e,{columns:n}=t;return(0,X.default)(`fjs-layout-column`,`cds--col${n?`-lg-`+n:``}`,`cds--col-sm-16`,`cds--col-md-16`)}function textToLabel(e){if(typeof e!=`string`)return null;for(let t of e.split(`
|
|
76
|
+
`)){let e=t.trim();if(e!==``)return e}return null}function prefixId(e,t,n){let r=`fjs-form`;return t&&(r+=`-${t}`),r+=`-${e}`,Object.values(n||{}).forEach(e=>{r+=`_${e}`}),r}function getSimpleOptionsData(e,t){let{valuesExpression:n,valuesKey:r,values:i}=e;return n?null:r?P(t,[r]):i}function normalizeOptionsData(e){return e.filter(_isAllowedValue).map(_normalizeOption).filter(e=>!G(e))}function createEmptyOptions(e={}){let t={};return!e.valuesKey&&!e.valuesExpression&&(t.values=[{label:`Value`,value:`value`}]),{...t,...e}}function _normalizeOption(e){if(_isAllowedPrimitive(e))return{value:e,label:`${e}`};if(M(e)){let t=_isValidLabel(e.label);if(!t&&_isAllowedPrimitive(e.value))return{value:e.value,label:`${e.value}`};if(t&&_isAllowedValue(e.value))return e}return null}function _isAllowedPrimitive(e){return[`number`,`string`,`boolean`].includes(typeof e)&&(e||e===0||e===!1)}function _isValidLabel(e){return e&&K(e)}function _isAllowedValue(e){return M(e)?Object.keys(e).length>0:_isAllowedPrimitive(e)}var Lo=s({Empty:e=>null,Hidden:e=>null,Children:e=>m(`div`,{class:e.class,style:e.style,children:e.children}),Element:e=>m(`div`,{class:e.class,style:e.style,children:e.children}),Row:e=>m(`div`,{class:e.class,style:e.style,children:e.children}),Column:e=>e.field.type==="default"?e.children:m(`div`,{class:e.class,style:e.style,children:e.children}),hoverInfo:{cleanup:()=>{}},applyVisibilityConditions:!0}),Ro=s({data:null,this:null,parent:null,i:null});function getService(e,t){}var zo=s({getService,formId:null});function useService(e,t){let{getService:n}=o(zo);return n(e,t)}function clone(e,t){return JSON.parse(JSON.stringify(e,t))}function runRecursively(e,t){(e.components||[]).forEach((e,n)=>{runRecursively(e,t)}),t(e)}function pruneAt(e,t){if(!t.length)return e;let cloneContainer=e=>Array.isArray(e)?e.slice():{...e},n=[cloneContainer(e)];for(let r=0;r<t.length-1;r++){let i=n[r][t[r]];if(typeof i!=`object`||!i)return e;let a=cloneContainer(i);n[r][t[r]]=a,n.push(a)}delete n[n.length-1][t[t.length-1]];for(let e=n.length-1;e>0&&Object.values(n[e]).every(e=>e==null);e--)delete n[e-1][t[e-1]];return n[0]}function wrapObjectKeysWithUnderscores(e){let t={};for(let[n,r]of Object.entries(e))t[`_${n}_`]=r;return t}function buildExpressionContext(e){let{data:t,...n}=e;return{...n,...t,...wrapObjectKeysWithUnderscores(n)}}function runExpressionEvaluation(e,t,n){return e.isExpression(t)?e.evaluate(t,buildExpressionContext(n)):t}function runUnaryTestEvaluation(e,t,n){return e.evaluateUnaryTest(t,buildExpressionContext(n))}function useExpressionEvaluation(e){let t=useService(`expressionLanguage`),n=o(Ro);return p(()=>runExpressionEvaluation(t,e,n),[t,n,e])}function useDeepCompareMemoize(e){let t=d();return(0,bn.default)(e,t.current)||(t.current=e),t.current}var Bo={LOADED:`loaded`,ERROR:`error`};function useOptionsAsync(e){let{valuesExpression:t,valuesKey:n,values:r}=e,i=useService(`form`)._getState().initialData,a=useDeepCompareMemoize(useExpressionEvaluation(t)||[]);return p(()=>{let e=[];if(n!==void 0){let t=(i||{})[n];t&&Array.isArray(t)&&(e=t)}else if(r!==void 0)e=Array.isArray(r)?r:[];else if(t&&a&&Array.isArray(a))e=a;else return buildErrorState(`No options source defined in the form definition`);return buildLoadedState(normalizeOptionsData(e))},[n,r,i,t,a])}var buildErrorState=e=>({options:[],error:e,loadState:Bo.ERROR}),buildLoadedState=e=>({options:e,error:void 0,loadState:Bo.LOADED}),useDangerousHTMLWrapper=e=>{let{html:t,transform=e=>e,sanitize:n=!0,sanitizeStyleTags:r=!0}=e,i=p(()=>n?he.sanitize(t,getDOMPurifyConfig(r)):t,[t,n,r]);return{__html:p(()=>transform(i),[i,transform])}},getDOMPurifyConfig=e=>({FORCE_BODY:!0,FORBID_TAGS:e?[`style`]:[]});function useSecurityAttributesMap(e){let t=useDeepCompareMemoize(e);return[p(()=>Fo.filter(({attribute:e})=>e===No).filter(({property:e})=>P(t,[e],!1)).map(({directive:e})=>e).join(` `),[t]),p(()=>Fo.filter(({attribute:e})=>e!==No).filter(({property:e})=>P(t,[e],!1)).map(({directive:e})=>e).join(`; `),[t])]}function useGetLabelCorrelation(e){let t=p(()=>Object.assign({},...e.map(e=>({[_getValueHash(e.value)]:e.label}))),[e]);return a(e=>t[_getValueHash(e)],[t])}var _getValueHash=e=>M(e)?JSON.stringify(e):e;function wrapCSSStyles(e,t){return e.querySelectorAll(`style`).forEach(e=>{e.textContent=extractTopLevelRules(e.textContent).map(e=>{let{selector:n,styles:r}=splitRule(e);return`${scopeSelector(n,t)} ${r}`}).join(` `)}),e}function extractTopLevelRules(e){let t=0,n=0,r=0,i=[];for(;t<e.length;)e[t]===`{`&&r++,e[t]===`}`&&(r--,r===0&&(i.push(e.substring(n,t+1)),n=t+1)),t++;return i.map(e=>e.trim())}function splitRule(e){let t=e.indexOf(`{`);return{selector:e.substring(0,t),styles:e.substring(t)}}function scopeSelector(e,t){return e.split(`,`).map(e=>`${t} ${e.trim()}`).join(`, `)}function getScrollContainer(e){for(;e&&e!==document.body&&e!==document.documentElement;){if(_isElementScrollable(e))return e;e=e.parentElement}return _isElementScrollable(document.body)?document.body:_isElementScrollable(document.documentElement)?document.documentElement:null}function _isElementScrollable(e){let t=window.getComputedStyle(e),n=t.overflowY||t.overflow;return(n===`auto`||n===`scroll`)&&e.scrollHeight>e.clientHeight}var Vo={},Ho=[];function useScrollIntoView(e,t,n,r){let i=n||Vo,a=r||Ho;b(()=>{if(D(a,e=>!e.current)||!e.current)return;for(let e=0;e<a.length;e++)a[e].current=!1;let t=e.current,n=getScrollContainer(t);if(!n)return;let r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),{align:s=`center`,offset:c=0,behavior:d=`auto`,scrollIfVisible:f=!1}=i;if(!f&&r.top>=o.top&&r.bottom<=o.bottom)return;let p=_getTopOffset(t,n,{align:s,offset:c});n.scroll({top:p,behavior:d})},t)}function _getTopOffset(e,t,n){let r=e.getBoundingClientRect(),i=t.getBoundingClientRect();return n.align===`top`?r.top-i.top+t.scrollTop-n.offset:n.align===`bottom`?r.bottom-i.top-t.clientHeight+t.scrollTop+n.offset:n.align===`center`?r.top-i.top-t.clientHeight/2+t.scrollTop+r.height/2+n.offset:0}function useBooleanExpressionEvaluation(e){let t=useService(`expressionLanguage`),n=o(Ro);return p(()=>{let r=runExpressionEvaluation(t,e,n);return typeof r==`boolean`&&r},[t,n,e])}function useUnaryTestEvaluation(e){let t=useService(`expressionLanguage`),n=o(Ro);return p(()=>runUnaryTestEvaluation(t,e,n),[t,n,e])}function useFilteredFormData(){let{initialData:e,data:t}=useService(`form`)._getState(),n=useService(`conditionChecker`,!1);return p(()=>{let r=n?n.applyConditions(t,t):t;return w(clone(e||{}),r)},[n,t,e])}function useKeyDownAction(e,t,n=window){function downHandler({key:n}){n===e&&t()}b(()=>(n.addEventListener(`keydown`,downHandler),()=>{n.removeEventListener(`keydown`,downHandler)}))}function useReadonly(e,t={}){let n=useService(`expressionLanguage`),{readonly:r}=e,i=n&&n.isExpression(r),a=useUnaryTestEvaluation(i?r:void 0);return t.readOnly?!0:i?a===!0:r||!1}function usePrevious(e,t=null){let n=d(t);return b(()=>n.current=e,[e]),n.current}function useFlushDebounce(e){let t=d(null),n=d(null),r=useService(`config`,!1),i=r&&r.debounce,o=i!==!1&&i!==0,s=typeof i==`number`?i:300;return[a((...r)=>{o?(n.current=r,t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{e(...n.current),n.current=null},s)):e(...r)},[e,s,o]),a(()=>{t.current&&=(clearTimeout(t.current),n.current!==null&&(e(...n.current),n.current=null),null)},[e])]}function useTemplateEvaluation(e,t={}){let n=useService(`templating`),r=o(Ro);return p(()=>n&&n.isTemplate(e)?n.evaluate(e,buildExpressionContext(r),t):e,[n,e,r,t])}function useSingleLineTemplateEvaluation(e,t={}){let n=useTemplateEvaluation(e,t);return p(()=>n&&n.split(`
|
|
77
|
+
`)[0],[n])}var Uo=new KeyboardEvent(`keydown`,{code:`Enter`,key:`Enter`,charCode:13,keyCode:13,bubbles:!0});function focusRelevantFlatpickerDay(e){if(!e)return;!e.isOpen&&e.open();let t=e.calendarContainer,n=t.querySelector(`.flatpickr-day.selected`)||t.querySelector(`.flatpickr-day.today`)||t.querySelector(`.flatpickr-day`);n&&n.focus()}function formatTime(e,t){if(t===null)return null;let n=t%1440,r=t%60,i=Math.floor(n/60);if(e)return _getZeroPaddedString(i)+`:`+_getZeroPaddedString(r);i=i%12||12;let a=n>=720;return _getZeroPaddedString(i)+`:`+_getZeroPaddedString(r)+` `+(a?`PM`:`AM`)}function parseInputTime(e){let t=e.toLowerCase();if(t.includes(`am`)||t.includes(`pm`)){let e=t.includes(`pm`),n=t.match(/\d+/g),r=parseInt(n&&n[0]),i=parseInt(n&&n[1])||0;return!(J(r)&&r>=1&&r<=12)||!(i>=0&&i<=59)?null:(r%12+(e?12:0))*60+i}{let e=t.match(/\d+/g),n=parseInt(e&&e[0]),r=parseInt(e&&e[1]),i=J(n)&&n>=0&&n<=23,a=J(r)&&r>=0&&r<=59;return!i||!a?null:n*60+r}}function serializeTime(e,t,n){if(n===vo.UTC_NORMALIZED){let n=(e+t+go)%go;return _getZeroPaddedString(Math.floor(n/60))+`:`+_getZeroPaddedString(n%60)+`Z`}return _getZeroPaddedString(Math.floor(e/60))+`:`+_getZeroPaddedString(e%60)+(n===vo.UTC_OFFSET?formatTimezoneOffset(t):``)}function parseIsoTime(e){if(!e)return null;let parseBasicMinutes=e=>{let t=e.split(`:`),n=parseInt(t[0]),r=t.length>1?parseInt(t[1]):0;return isNaN(n)||n<0||n>24||isNaN(r)||r<0||r>60?null:n*60+r},t=new Date().getTimezoneOffset();if(e.includes(`Z`)){e=e.replace(`Z`,``);let n=parseBasicMinutes(e);return n===null?null:(n-t+go)%go}if(e.includes(`+`)){let[n,r]=e.split(`+`),i=parseBasicMinutes(n),a=parseBasicMinutes(r);return i===null||a===null?null:(a=-a,(i+a-t+go)%go)}if(e.includes(`-`)){let[n,r]=e.split(`-`),i=parseBasicMinutes(n),a=parseBasicMinutes(r);return i===null||a===null?null:(i+a-t+go)%go}return parseBasicMinutes(e)}function serializeDate(e){return $.fromJSDate(e).toISODate()}function isDateTimeInputInformationSufficient(e){if(!e||typeof e!=`string`)return!1;let t=e.split(`T`);return t.length==2&&t[0].split(`-`).length==3}function isDateInputInformationMatching(e){return!(!e||typeof e!=`string`||e.includes(`T`)||e.split(`-`).length!=3)}function serializeDateTime(e,t,n){let r=new Date;if(r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(Math.floor(t/60),t%60,0,0),n===vo.UTC_NORMALIZED){let e=r.getTimezoneOffset(),n=t+e<0?-1:+(t+e>1440);r.setHours(r.getHours()+n*24)}return serializeDate(r)+`T`+serializeTime(t,r.getTimezoneOffset(),n)}function formatTimezoneOffset(e){return _getSignedPaddedHours(e)+`:`+_getZeroPaddedString(Math.abs(e%60))}function isInvalidDateString(e){return isNaN(new Date(Date.parse(e)).getTime())}function getNullDateTime(){return{date:new Date(Date.parse(null)),time:null}}function isValidDate(e){return e&&!isNaN(e.getTime())}function isValidTime(e){return!isNaN(parseInt(e))}function _getSignedPaddedHours(e){return e>0?`-`+_getZeroPaddedString(Math.floor(e/60)):`+`+_getZeroPaddedString(Math.floor((0-e)/60))}function _getZeroPaddedString(e){return e.toString().padStart(2,`0`)}var Wo=/^(https?|data):.*/i,Go=/^(https):\/\/*/i;function sanitizeDateTimePickerValue(e){let{formField:t,value:n}=e,{subtype:r}=t;return typeof n!=`string`||r===_o.DATE&&(isInvalidDateString(n)||!isDateInputInformationMatching(n))||r===_o.TIME&&parseIsoTime(n)===null||r===_o.DATETIME&&(isInvalidDateString(n)||!isDateTimeInputInformationSufficient(n))?null:n}function hasEqualValue(e,t){return Array.isArray(t)?t.some(t=>(0,bn.default)(e,t)):!1}function sanitizeSingleSelectValue(e){let{formField:t,data:n,value:r}=e,{valuesExpression:i}=t;try{return i||hasEqualValue(r,normalizeOptionsData(getSimpleOptionsData(t,n)).map(e=>e.value))?r:null}catch{return null}}function sanitizeMultiSelectValue(e){let{formField:t,data:n,value:r}=e,{valuesExpression:i}=t;try{if(i)return r;let e=normalizeOptionsData(getSimpleOptionsData(t,n)).map(e=>e.value);return r.filter(t=>hasEqualValue(t,e))}catch{return[]}}function sanitizeImageSource(e){return Wo.test(e)?e:``}function sanitizeIFrameSource(e){return Go.test(e)?e:``}function escapeHTML(e){let t={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"{":`{`,"}":`}`,":":`:`,";":`;`};return e.replace(/[&<>"'{};:]/g,e=>t[e])}function useCleanupSingleSelectValue(e){let{field:t,options:n,loadState:r,onChange:i,value:a}=e;b(()=>{if(r!==Bo.LOADED)return;let e=n.map(e=>e.value);a&&!hasEqualValue(a,e)&&i({field:t,value:null})},[t,n,i,a,r])}function useCleanupMultiSelectValue(e){let{field:t,options:n,loadState:r,onChange:i,values:a}=e,o=useDeepCompareMemoize(a||[]);b(()=>{if(r!==Bo.LOADED)return;let e=n.map(e=>e.value);o.some(t=>!hasEqualValue(t,e))&&i({field:t,value:o.filter(t=>hasEqualValue(t,e))})},[t,n,i,o,r])}var Ko=`button`;function Button(e){let{disabled:t,onFocus:n,onBlur:r,field:i}=e,{action:a=`submit`}=i,o=useSingleLineTemplateEvaluation(i.label||``,{debug:!0});return m(`div`,{class:formFieldClasses(Ko),children:m(`button`,{class:`fjs-button`,type:a,disabled:t,onFocus:()=>n&&n(),onBlur:()=>r&&r(),children:o})})}Button.config={type:Ko,keyed:!1,name:`Button`,group:`action`,create:(e={})=>({label:`Button`,action:`submit`,...e})};function Description(e){let{description:t,id:n}=e,r=useSingleLineTemplateEvaluation(t||``,{debug:!0});return r?m(`div`,{id:n,class:`fjs-form-field-description`,children:r}):null}function Errors(e){let{errors:t,id:n}=e;return t.length?m(`div`,{class:`fjs-form-field-error`,"aria-live":`polite`,id:n,children:m(`ul`,{children:t.map((e,t)=>m(`li`,{children:e},t))})}):null}function Label(e){let{id:t,htmlFor:n,label:r,collapseOnEmpty:i=!0,required:a=!1}=e,o=useSingleLineTemplateEvaluation(r||``,{debug:!0});return m(`label`,{id:t,htmlFor:n,class:(0,X.default)(`fjs-form-field-label`,{"fjs-incollapsible-label":!i},e.class),children:[e.children,m(`span`,{class:`fjs-label-content`,children:[o,a&&m(`span`,{class:`fjs-asterix`,"aria-hidden":!0,children:`*`})]})]})}var qo=`checkbox`;function Checkbox(e){let{disabled:t,errors:n=[],domId:r,onBlur:i,onFocus:a,field:o,readonly:s,value:c=!1}=e,{description:d,label:f,validate:p={}}=o,{required:g}=p,onChange=({target:t})=>{e.onChange({value:t.checked})},v=`${r}-description`,b=`${r}-error-message`;return m(`div`,{class:(0,X.default)(formFieldClasses(qo,{errors:n,disabled:t,readonly:s}),{"fjs-checked":c}),children:[m(`div`,{class:`fjs-inline-label`,children:[m(`input`,{checked:c,class:`fjs-input`,disabled:t,readOnly:s,id:r,type:`checkbox`,onChange,onBlur:()=>i&&i(),onFocus:()=>a&&a(),required:g,"aria-invalid":n.length>0,"aria-describedby":[v,b].join(` `)}),m(Label,{htmlFor:r,label:f,required:g})]}),m(Description,{id:v,description:d}),m(Errors,{id:b,errors:n})]})}Checkbox.config={type:qo,keyed:!0,name:`Checkbox`,group:`selection`,emptyValue:!1,sanitizeValue:({value:e})=>e===!0,create:(e={})=>({label:`Checkbox`,...e})};var Jo=`checklist`;function Checklist(e){let{disabled:t,errors:n=[],domId:r,onBlur:i,onFocus:a,field:o,readonly:s,value:c=[]}=e,{description:f,label:p,validate:g={}}=o,v=d(),{required:b}=g,toggleCheckbox=t=>{let n=hasEqualValue(t,c)?c.filter(e=>!(0,bn.default)(e,t)):[...c,t];e.onChange({value:n})},onCheckboxBlur=e=>{v.current.contains(e.relatedTarget)||i&&i()},onCheckboxFocus=e=>{v.current.contains(e.relatedTarget)||a&&a()},{loadState:x,options:w}=useOptionsAsync(o);useCleanupMultiSelectValue({field:o,loadState:x,options:w,values:c,onChange:e.onChange});let T=`${r}-description`,E=`${r}-error-message`;return m(`div`,{class:(0,X.default)(formFieldClasses(Jo,{errors:n,disabled:t,readonly:s})),ref:v,children:[m(Label,{label:p,required:b}),x==Bo.LOADED&&w.map((e,i)=>{let a=`${r}-${i}`,o=hasEqualValue(e.value,c);return m(`div`,{className:(0,X.default)(`fjs-inline-label`,{"fjs-checked":o}),children:[m(`input`,{checked:o,class:`fjs-input`,disabled:t,readOnly:s,id:a,type:`checkbox`,onClick:()=>toggleCheckbox(e.value),onBlur:onCheckboxBlur,onFocus:onCheckboxFocus,required:b,"aria-invalid":n.length>0,"aria-describedby":[T,E].join(` `)}),m(Label,{htmlFor:a,label:e.label,required:!1})]},e.value)}),m(Description,{id:T,description:f}),m(Errors,{id:E,errors:n})]})}Checklist.config={type:Jo,keyed:!0,name:`Checkbox group`,group:`selection`,emptyValue:[],sanitizeValue:sanitizeMultiSelectValue,create:(e={})=>({label:`Checkbox group`,...createEmptyOptions(e)})};var noop$1=()=>!1,Yo=new te([32,36,1]);function FormField(e){let t=d(Yo.next()),{field:n,indexes:r,onChange:s}=e,c=useService(`formFields`),f=useService(`viewerCommands`,!1),g=useService(`formFieldInstanceRegistry`,!1),v=useService(`pathRegistry`),x=useService(`eventBus`),{initialData:w,data:T,errors:E,properties:D}=useService(`form`)._getState(),{Element:A,Hidden:j,Column:M,applyVisibilityConditions:N}=o(Lo),{formId:R}=o(zo),[B,V]=i(!!f),H=c.get(n.type);if(!H)throw Error(`cannot render field <${n.type}>`);let ee=H.config,U=o(Ro),G=p(()=>v.getValuePath(n,{indexes:r}),[n,r,v]),K=p(()=>P(w,G),[w,G]),J=useReadonly(n,D),te=P(T,G),ne=!D.readOnly&&(D.disabled||n.disabled||!1),ce=useUnaryTestEvaluation(n.conditional&&n.conditional.hide||null),le=N?ce:null,ue=p(()=>g?g.syncInstance(t.current,{id:n.id,expressionContextInfo:U,valuePath:G,value:te,indexes:r,hidden:le}):null,[g,n.id,U,G,te,r,le]),de=ue?g.get(ue):null;b(()=>{let e=t.current;if(g)return()=>g.cleanupInstance(e)},[g]),b(()=>{if(!f)return;let resetValidation=()=>{V(!0)};return x.on(`import.done`,resetValidation),x.on(`reset`,resetValidation),()=>{x.off(`import.done`,resetValidation),x.off(`reset`,resetValidation)}},[x,f]),b(()=>{let e=K&&!(0,bn.default)(K,[]);B&&e&&de&&(V(!1),f.updateFieldInstanceValidation(de,K))},[de,B,K,f]);let fe=a(()=>{let e=P(T,G);B&&(V(!1),f.updateFieldInstanceValidation(de,e)),x.fire(`formField.blur`,{formField:n})},[T,x,n,de,B,G,f]),pe=a(()=>{x.fire(`formField.focus`,{formField:n})},[x,n]),me=a(e=>{V(!1),s({field:n,indexes:r,fieldInstance:de,...e})},[s,n,de,r]);if(le)return m(j,{field:n});let he=`${prefixId(n.id,R,r)}`,ge=P(E,[n.id,...Object.values(r||{})])||[],_e=m(H,{...e,disabled:ne,errors:ge,domId:he,onChange:ne||J?noop$1:me,onBlur:ne||J?noop$1:fe,onFocus:ne||J?noop$1:pe,readonly:J,value:te,fieldInstance:de});return ee.escapeGridRender?_e:m(M,{field:n,class:gridColumnClasses(n),children:m(A,{class:`fjs-element`,field:n,children:_e})})}function ChildrenRenderer(e){let{Children:t}=o(Lo),{field:n,Empty:r}=e,{id:i}=n,a=useService(`repeatRenderManager`,!1),s=a&&a.isFieldRepeating(i),c=a.Repeater,d=a.RepeatFooter;return s?m(RepeatChildrenRenderer,{...e,ChildrenRoot:t,Empty:r,Repeater:c,RepeatFooter:d,repeatRenderManager:a}):m(SimpleChildrenRenderer,{...e,ChildrenRoot:t,Empty:r})}function SimpleChildrenRenderer(e){let{ChildrenRoot:t,Empty:n,field:r}=e,{components:i=[]}=r,a=!i.length;return m(t,{class:`fjs-vertical-layout fjs-children cds--grid cds--grid--condensed`,field:r,children:[m(RowsRenderer,{...e}),a?m(n,{field:r}):null]})}function RepeatChildrenRenderer(e){let{ChildrenRoot:t,repeatRenderManager:n,Empty:r,field:a,...o}=e,{components:s=[]}=a,d=i({isCollapsed:!0}),f=n.Repeater,p=n.RepeatFooter;return m(c,{children:[m(t,{class:`fjs-vertical-layout fjs-children cds--grid cds--grid--condensed`,field:a,children:[f?m(f,{...o,useSharedState:d,field:a,RowsRenderer}):m(RowsRenderer,{...o,field:a}),s.length?null:m(r,{field:a})]}),p?m(p,{...o,useSharedState:d,field:a}):null]})}function RowsRenderer(e){let{field:t,indexes:n}=e,{id:i,verticalAlignment:a=`start`}=t,s=useService(`formLayouter`),d=useService(`formFieldRegistry`),f=s.getRows(i),{Row:p}=o(Lo);return m(c,{children:[` `,f.map(t=>{let{components:i=[]}=t;return i.length?m(p,{row:t,class:`fjs-layout-row cds--row`,style:{alignItems:a},children:i.map(t=>{let i=d.get(t);return i?r(FormField,{...e,key:t,field:i,indexes:n}):null})},t.id):null}),` `]})}function Default(e){let{Empty:t}=o(Lo),n={...e,Empty:t};return m(ChildrenRenderer,{...n})}Default.config={type:`default`,keyed:!1,label:null,group:null,create:(e={})=>({components:[],...e}),getSubheading:e=>e.id};var Xo;function _extends$A(){return _extends$A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$A.apply(null,arguments)}var Zo=function SvgCalendar(e){return r(`svg`,_extends$A({xmlns:`http://www.w3.org/2000/svg`,width:14,height:15,fill:`none`,viewBox:`0 0 28 30`},e),Xo||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M19 2H9V0H7v2H2a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-5V0h-2zM7 7V4H2v5h24V4h-5v3h-2V4H9v3zm-5 4v17h24V11z`,clipRule:`evenodd`}))};function getLocaleDateFormat(e=`default`){return new Intl.DateTimeFormat(e).formatToParts(new Date(Date.UTC(2020,5,5))).map(e=>{let t=e.value.length;switch(e.type){case`day`:return`d`.repeat(t);case`month`:return`M`.repeat(t);case`year`:return`y`.repeat(t);default:return e.value}}).join(``)}function getLocaleReadableDateFormat(e){let t=getLocaleDateFormat(e).toLowerCase();return t.includes(`mm`)||(t=t.replace(`m`,`mm`)),t.includes(`dd`)||(t=t.replace(`d`,`dd`)),t}function getLocaleDateFlatpickrConfig(e){return flatpickerizeDateFormat(getLocaleDateFormat(e))}function flatpickerizeDateFormat(e){let t={day:e.includes(`dd`),month:e.includes(`MM`),year:e.includes(`yyyy`)};return e=t.day?e.replace(`dd`,`d`):e.replace(`d`,`j`),e=t.month?e.replace(`MM`,`m`):e.replace(`M`,`n`),e=t.year?e.replace(`yyyy`,`Y`):e.replace(`yy`,`y`),e}function InputAdorner(e){let{pre:t,post:n,rootRef:r,inputRef:i,children:a,disabled:o,readonly:s,hasErrors:c}=e,onAdornmentClick=()=>i&&i.current&&i.current.focus();return m(`div`,{class:(0,X.default)(`fjs-input-group`,{"fjs-disabled":o,"fjs-readonly":s},{hasErrors:c}),ref:r,children:[t&&m(`span`,{class:`fjs-input-adornment border-right border-radius-left`,onClick:onAdornmentClick,children:[` `,K(t)?m(`span`,{class:`fjs-input-adornment-text`,children:t}):t,` `]}),a,n&&m(`span`,{class:`fjs-input-adornment border-left border-radius-right`,onClick:onAdornmentClick,children:[` `,K(n)?m(`span`,{class:`fjs-input-adornment-text`,children:n}):n,` `]})]})}function Datepicker(e){let{label:t,domId:n,collapseLabelOnEmpty:r,onDateTimeBlur:o,onDateTimeFocus:s,required:c,disabled:f,disallowPassedDates:p,date:g,readonly:v,setDate:x}=e,w=d(),T=d(),[E,D]=i(null),[A,j]=i(!1),[M,N]=i(!1),P=useDeepCompareMemoize(g);b(()=>{E&&E.config&&(E.setDate(P,!0),j(!1))},[E,P]),b(()=>{M&&(focusRelevantFlatpickerDay(E),N(!1))},[E,M]),b(()=>{let e={allowInput:!0,dateFormat:getLocaleDateFlatpickrConfig(),static:!0,clickOpens:!1,minDate:p?`today`:`01/01/1900`,errorHandler:()=>{}},t=flatpickr(w.current,e);D(t);let onCalendarFocusOut=e=>{!t.calendarContainer.contains(e.relatedTarget)&&e.relatedTarget!=w.current&&t.close()},onCalendarMouseDown=e=>{e.target.classList.contains(`flatpickr-day`)&&j(!1)};return t.config.onOpen=[()=>t.calendarContainer.addEventListener(`focusout`,onCalendarFocusOut),()=>t.calendarContainer.addEventListener(`mousedown`,onCalendarMouseDown)],t.config.onClose=[()=>t.calendarContainer.removeEventListener(`focusout`,onCalendarFocusOut),()=>t.calendarContainer.removeEventListener(`mousedown`,onCalendarMouseDown)],()=>{t.destroy()}},[p]),b(()=>{E&&E.config&&(E.config.onChange=[e=>x(new Date(e)),()=>j(!1)])},[E,x]);let R=a(e=>{E&&(e.code===`Escape`&&E.close(),e.code===`ArrowDown`&&(A?(w.current.dispatchEvent(Uo),j(!1),N(!0)):focusRelevantFlatpickerDay(E),e.preventDefault()),e.code===`Enter`&&j(!1))},[E,A]),B=a(e=>{!E||T.current.contains(e.relatedTarget)||v||(E.open(),s(e))},[E,v,s]),V=a(e=>{e.relatedTarget&&e.relatedTarget.classList.contains(`flatpickr-day`)||(A&&(w.current.dispatchEvent(Uo),j(!1)),o(e))},[A,o]);return m(`div`,{class:`fjs-datetime-subsection`,children:[m(Label,{htmlFor:n,label:t,collapseOnEmpty:r,required:c}),m(InputAdorner,{pre:m(Zo,{}),disabled:f,readonly:v,rootRef:T,inputRef:w,children:m(`div`,{class:`fjs-datepicker`,style:{width:`100%`},children:m(`input`,{ref:w,type:`text`,id:n,class:`fjs-input`,disabled:f,readOnly:v,placeholder:getLocaleReadableDateFormat(),autoComplete:`off`,onFocus:B,onBlur:V,onKeyDown:R,onMouseDown:()=>!E.isOpen&&!v&&E.open(),onInput:()=>j(!0),"data-input":!0,"aria-describedby":e[`aria-describedby`]})})})]})}var Qo,$o;function _extends$z(){return _extends$z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$z.apply(null,arguments)}var es=function SvgClock(e){return r(`svg`,_extends$z({xmlns:`http://www.w3.org/2000/svg`,width:16,height:16,fill:`none`,viewBox:`0 0 28 29`},e),Qo||=r(`path`,{fill:`currentColor`,d:`M13 14.41 18.59 20 20 18.59l-5-5.01V5h-2z`}),$o||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M6.222 25.64A14 14 0 1 0 21.778 2.36 14 14 0 0 0 6.222 25.64M7.333 4.023a12 12 0 1 1 13.334 19.955A12 12 0 0 1 7.333 4.022Z`,clipRule:`evenodd`}))},DEFAULT_LABEL_GETTER=e=>e,NOOP=()=>{};function DropdownList(e){let{listenerElement:t=window,values:n=[],getLabel:r=DEFAULT_LABEL_GETTER,onValueSelected:o=NOOP,height:s=235,emptyListMessage:c=`No results`,initialFocusIndex:f=0}=e,[g,v]=i(!1),[x,w]=i(f),[T,E]=i(!1),D=d(),A=d(),j=p(()=>n.length?n[x]:null,[x,n]),M=a(e=>{w(t=>Math.min(Math.max(0,t+e),n.length-1))},[n.length]);b(()=>{x!==0&&(!x||!n.length?w(0):x>=n.length&&w(n.length-1))},[x,n.length]),useKeyDownAction(`ArrowUp`,()=>{n.length&&(M(-1),v(!1))},t),useKeyDownAction(`ArrowDown`,()=>{n.length&&(M(1),v(!1))},t),useKeyDownAction(`Enter`,()=>{j&&o(j)},t),b(()=>{let e=D.current.children;if(e.length&&!g){let t=e[x];t&&t.scrollIntoView({block:`nearest`,inline:`nearest`})}},[x,g]),b(()=>{E(!0)},[]);let onMouseMovedInKeyboardMode=(e,t)=>{(!A.current||A.current.x!==e.screenX&&A.current.y!==e.screenY)&&(A.current={x:e.screenX,y:e.screenY},v(!0),w(t))};return m(`div`,{ref:D,tabIndex:-1,class:`fjs-dropdownlist`,onMouseDown:e=>e.preventDefault(),style:{maxHeight:s,scrollBehavior:T?`smooth`:`auto`},children:[n.length>0&&n.map((e,t)=>m(`div`,{class:(0,X.default)(`fjs-dropdownlist-item`,{focused:x===t}),onMouseMove:g?void 0:e=>onMouseMovedInKeyboardMode(e,t),onMouseEnter:g?()=>w(t):void 0,onMouseDown:t=>o(e),children:r(e)},e.value)),!n.length&&m(`div`,{class:`fjs-dropdownlist-empty`,children:c})]})}function Timepicker(e){let{label:t,collapseLabelOnEmpty:n,onDateTimeBlur:r,onDateTimeFocus:o,domId:s,required:c,disabled:f,readonly:g,use24h:v=!1,timeInterval:x,time:w,setTime:T}=e,E=p(()=>[1,5,10,15,30,60].includes(x)?x:15,[x]),D=d(),[A,j]=i(!1),M=p(()=>E!==1,[E]),[N,P]=i(``);b(()=>{if(w===null){P(``);return}let e=w-w%E;P(formatTime(v,e)),e!=w&&T(e)},[w,T,v,E]);let R=a(e=>{let t=e||N;if(!t){T(null);return}let n=parseInputTime(t);if(!J(n)){P(``),T(null);return}let r=n-n%E;P(formatTime(v,r)),T(r)},[N,E,v,T]),B=p(()=>{let e=Math.floor(1440/E);return[...Array(e).keys()].map(e=>formatTime(v,e*E))},[E,v]),V=p(()=>{if(!B||!E)return null;if(w)return w/E;let e=parseInputTime(N);return e?(e-e%E)/E:Math.floor(B.length/2)},[N,w,E,B]),onInputKeyDown=e=>{switch(e.key){case`ArrowUp`:e.preventDefault();break;case`ArrowDown`:M&&j(!0),e.preventDefault();break;case`Escape`:M&&j(!1);break;case`Enter`:!A&&R()}},onInputBlur=e=>{j(!1),R(),r(e)},onInputFocus=e=>{o(e),!g&&M&&j(!0)},onDropdownValueSelected=e=>{j(!1),R(e)};return m(`div`,{class:`fjs-datetime-subsection`,children:[m(Label,{htmlFor:s,label:t,collapseOnEmpty:n,required:c}),m(InputAdorner,{pre:m(es,{}),inputRef:D,disabled:f,readonly:g,children:m(`div`,{class:`fjs-timepicker fjs-timepicker-anchor`,children:[m(`input`,{ref:D,type:`text`,id:s,class:`fjs-input`,value:N,disabled:f,readOnly:g,placeholder:v?`hh:mm`:`hh:mm --`,autoComplete:`off`,onInput:e=>{P(e.target.value),M&&j(!1)},onBlur:onInputBlur,onFocus:onInputFocus,onClick:()=>!g&&M&&j(!0),onKeyDown:onInputKeyDown,"data-input":!0,"aria-describedby":e[`aria-describedby`]}),A&&m(DropdownList,{values:B,height:150,onValueSelected:onDropdownValueSelected,listenerElement:D.current,initialFocusIndex:V})]})})]})}var ts=`datetime`;function Datetime(e){let{disabled:t,errors:n=[],domId:r,onBlur:s,onFocus:c,field:f,onChange:g,readonly:v,value:x=``}=e,{description:w,id:T,dateLabel:E,timeLabel:D,validate:A={},subtype:j,use24h:M,disallowPassedDates:N,timeInterval:P,timeSerializingFormat:R}=f,{required:B}=A,{formId:V}=o(zo),H=useService(`translate`),ee=d(),[U,G]=i(getNullDateTime()),[K,J]=i(null),te=p(()=>j===_o.DATE||j===_o.DATETIME,[j]),ne=p(()=>j===_o.TIME||j===_o.DATETIME,[j]),ce=a(e=>{e.relatedTarget&&ee.current.contains(e.relatedTarget)||s&&s()},[s]),le=a(e=>{e.relatedTarget&&ee.current.contains(e.relatedTarget)||c&&c()},[c]);b(()=>{let{date:e,time:t}=getNullDateTime();switch(j){case _o.DATE:e=typeof x==`string`?$.fromISO(x).toJSDate():new Date(NaN);break;case _o.TIME:t=parseIsoTime(x);break;case _o.DATETIME:e=new Date(Date.parse(x)),t=isValidDate(e)?60*e.getHours()+e.getMinutes():null}G({date:e,time:t})},[j,x]);let ue=a(({date:e,time:t})=>{let n=null;j===_o.DATE&&isValidDate(e)?n=serializeDate(e):j===_o.TIME&&isValidTime(t)?n=serializeTime(t,new Date().getTimezoneOffset(),R):j===_o.DATETIME&&isValidDate(e)&&isValidTime(t)&&(n=serializeDateTime(e,t,R)),x!==n&&g({value:n,field:f})},[x,f,g,j,R]);b(()=>{if(K){if(K.refreshOnly)ue(U);else{let e={...U,...K};G(e),ue(e)}J(null)}},[ue,U,K]),b(()=>{J({refreshOnly:!0})},[R]);let de=p(()=>B||j!==_o.DATETIME?n:isValidDate(U.date)&&!isValidTime(U.time)||!isValidDate(U.date)&&isValidTime(U.time)?[H(`Date and time must both be entered.`),...n]:n,[B,j,U,n,H]),fe=a(e=>{J(t=>t?{...t,date:e}:{date:e})},[]),pe=a(e=>{J(t=>t?{...t,time:e}:{time:e})},[]),me=de.length===0?void 0:`${prefixId(T,V)}-error-message`,he=`${prefixId(T,V)}-description`,ge={label:E,collapseLabelOnEmpty:!D,onDateTimeBlur:ce,onDateTimeFocus:le,domId:`${r}-date`,required:B,disabled:t,disallowPassedDates:N,date:U.date,readonly:v,setDate:fe,"aria-describedby":[he,me].join(` `)},_e={label:D,collapseLabelOnEmpty:!E,onDateTimeBlur:ce,onDateTimeFocus:le,domId:`${r}-time`,required:B,disabled:t,readonly:v,use24h:M,timeInterval:P,time:U.time,setTime:pe,"aria-describedby":[he,me].join(` `)};return m(`div`,{class:formFieldClasses(ts,{errors:de,disabled:t,readonly:v}),children:[m(`div`,{class:(0,X.default)(`fjs-vertical-group`),ref:ee,children:[te&&m(Datepicker,{...ge}),ne&&te&&m(`div`,{class:`fjs-datetime-separator`}),ne&&m(Timepicker,{..._e})]}),m(Description,{id:he,description:w}),m(Errors,{errors:de,id:me})]})}Datetime.config={type:ts,keyed:!0,name:`Date time`,group:`basic-input`,emptyValue:null,sanitizeValue:sanitizeDateTimePickerValue,create:(e={},t)=>{let n={};return x(n,xo,_o.DATE),t&&x(n,So,`Date`),{...n,...e}},getSubheading:e=>e.dateLabel||e.timeLabel};function Group(e){let{field:t,domId:n}=e,{label:r,type:i,showOutline:a}=t,{Empty:s}=o(Lo),c={...e,Empty:s};return m(`div`,{className:(0,X.default)(formFieldClasses(i),`fjs-form-field-grouplike`,{"fjs-outlined":a}),role:`group`,"aria-labelledby":n,children:[m(Label,{id:n,label:r}),m(ChildrenRenderer,{...c})]})}Group.config={type:`group`,pathed:!0,name:`Group`,group:`container`,create:(e={})=>({label:`Group`,components:[],showOutline:!0,...e})};var ns=`iframe`,rs=300;function IFrame(e){let{field:t,disabled:n,readonly:r,domId:a}=e,{height:o=rs,label:s,url:c,security:d={}}=t,f=useSingleLineTemplateEvaluation(c,{debug:!0}),g=p(()=>sanitizeIFrameSource(f),[f]),v=useSingleLineTemplateEvaluation(s,{debug:!0}),x=useService(`translate`),[w,T]=useSecurityAttributesMap(d),[E,D]=i(0);return b(()=>{D(e=>e+1)},[w,T]),m(`div`,{class:formFieldClasses(ns,{disabled:n,readonly:r}),children:[m(Label,{htmlFor:a,label:v}),!f&&m(IFramePlaceholder,{text:x(`No content to show.`)}),f&&g&&m(`iframe`,{src:g,title:v,height:o,class:`fjs-iframe`,id:a,sandbox:w,allow:T},`iframe-`+E),f&&!g&&m(IFramePlaceholder,{text:x(`External content couldn't be loaded.`)})]})}function IFramePlaceholder(e){let{text:t=`iFrame`}=e;return m(`div`,{class:`fjs-iframe-placeholder`,children:m(`p`,{class:`fjs-iframe-placeholder-text`,children:t})})}IFrame.config={type:ns,keyed:!1,name:`iFrame`,group:`container`,create:(e={})=>({label:`iFrame`,security:{allowScripts:!0},...e})};var is;function _extends$y(){return _extends$y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$y.apply(null,arguments)}var as=function SvgButton(e){return r(`svg`,_extends$y({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),is||=r(`path`,{fillRule:`evenodd`,d:`M45 17a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V20a3 3 0 0 1 3-3zm-9 8.889H18v2.222h18z`}))},os;function _extends$x(){return _extends$x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$x.apply(null,arguments)}var ss=function SvgCheckbox(e){return r(`svg`,_extends$x({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),os||=r(`path`,{d:`M34 18H20a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V20a2 2 0 0 0-2-2m-9 14-5-5 1.41-1.41L25 29.17l7.59-7.59L34 23z`}))},cs;function _extends$w(){return _extends$w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$w.apply(null,arguments)}var ls=function SvgChecklist(e){return r(`svg`,_extends$w({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),cs||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M14.35 24.75H19v4.65h-4.65zm-1.414-1.414a2 2 0 0 1 1.414-.586H19a2 2 0 0 1 2 2v4.65a2 2 0 0 1-2 2h-4.65a2 2 0 0 1-2-2v-4.65a2 2 0 0 1 .586-1.414M14.35 37.05H19v4.65h-4.65zm-1.414-1.414a2 2 0 0 1 1.414-.586H19a2 2 0 0 1 2 2v4.65a2 2 0 0 1-2 2h-4.65a2 2 0 0 1-2-2v-4.65a2 2 0 0 1 .586-1.414M14.35 12.45H19v4.65h-4.65zm-1.414-1.414a2 2 0 0 1 1.414-.586H19a2 2 0 0 1 2 2v4.65a2 2 0 0 1-2 2h-4.65a2 2 0 0 1-2-2v-4.65a2 2 0 0 1 .586-1.414m12.007 14.977a1 1 0 0 0-.293.707v.65a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-.65a1 1 0 0 0-1-1h-15a1 1 0 0 0-.707.293m0 12.3a1 1 0 0 0-.293.707v.65a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-.65a1 1 0 0 0-1-1h-15a1 1 0 0 0-.707.293m0-24.6a1 1 0 0 0-.293.707v.65a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-.65a1 1 0 0 0-1-1h-15a1 1 0 0 0-.707.293`,clipRule:`evenodd`}))},us,ds,fs;function _extends$v(){return _extends$v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$v.apply(null,arguments)}var ps=function SvgDatetime(e){return r(`svg`,_extends$v({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),us||=r(`path`,{fillRule:`evenodd`,d:`M37.908 13.418h-5.004v-2.354h-1.766v2.354H21.13v-2.354h-1.766v2.354H14.36a2.07 2.07 0 0 0-2.06 2.06v23.549a2.07 2.07 0 0 0 2.06 2.06h6.77v-1.766h-6.358a.707.707 0 0 1-.706-.706V15.89c0-.39.316-.707.706-.707h4.592v2.355h1.766v-2.355h10.008v2.355h1.766v-2.355h4.592a.71.71 0 0 1 .707.707v6.358h1.765v-6.77c0-1.133-.927-2.06-2.06-2.06`}),ds||=r(`path`,{d:`m35.13 37.603 1.237-1.237-3.468-3.475v-5.926h-1.754v6.654l3.984 3.984Z`}),fs||=r(`path`,{fillRule:`evenodd`,d:`M23.08 36.962a9.678 9.678 0 1 0 17.883-7.408 9.678 9.678 0 0 0-17.882 7.408Zm4.54-10.292a7.924 7.924 0 1 1 8.805 13.177A7.924 7.924 0 0 1 27.62 26.67`}))},ms,hs;function _extends$u(){return _extends$u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$u.apply(null,arguments)}var gs=function SvgTaglist(e){return r(`svg`,_extends$u({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),ms||=r(`path`,{fillRule:`evenodd`,d:`M45 16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3zm0 2H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V19a1 1 0 0 0-1-1`}),hs||=r(`path`,{d:`M11 22a1 1 0 0 1 1-1h19a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H12a1 1 0 0 1-1-1z`}))},_s,vs,ys;function _extends$t(){return _extends$t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$t.apply(null,arguments)}var bs=function SvgForm(e){return r(`svg`,_extends$t({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54},e),_s||=r(`rect`,{width:24,height:4,x:15,y:17,rx:1}),vs||=r(`rect`,{width:24,height:4,x:15,y:25,rx:1}),ys||=r(`rect`,{width:13,height:4,x:15,y:33,rx:1}))},xs;function _extends$s(){return _extends$s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$s.apply(null,arguments)}var Ss=function SvgGroup(e){return r(`svg`,_extends$s({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),xs||=r(`path`,{fill:`#000`,fillRule:`evenodd`,d:`M4.05 42.132v1.164c0 .693.604 1.254 1.35 1.254h1.35v-2.507h-2.7v.09Zm0-2.328h2.7v-2.328h-2.7zm0-4.656h2.7V32.82h-2.7zm0-4.656h2.7v-2.328h-2.7zm0-4.656h2.7v-2.328h-2.7zm0-4.656h2.7v-2.328h-2.7zm0-4.656h2.7v-2.328h-2.7zm0-4.656v.09h2.7V9.45H5.4c-.746 0-1.35.561-1.35 1.254zm5.4-2.418v2.507h2.7V9.45zm5.4 0v2.507h2.7V9.45zm5.4 0v2.507h2.7V9.45zm5.4 0v2.507h2.7V9.45zm5.4 0v2.507h2.7V9.45zm5.4 0v2.507h2.7V9.45zm5.4 0v2.507h2.7V9.45zm5.4 0v2.507h2.7v-1.253c0-.693-.604-1.254-1.35-1.254zm2.7 4.746h-2.7v2.328h2.7zm0 4.656h-2.7v2.328h2.7zm0 4.656h-2.7v2.328h2.7zm0 4.656h-2.7v2.328h2.7zm0 4.656h-2.7v2.328h2.7zm0 4.656h-2.7v2.328h2.7zm0 4.656v-.09h-2.7v2.508h1.35c.746 0 1.35-.561 1.35-1.254zm-5.4 2.418v-2.507h-2.7v2.507zm-5.4 0v-2.507h-2.7v2.507zm-5.4 0v-2.507h-2.7v2.507zm-5.4 0v-2.507h-2.7v2.507zm-5.4 0v-2.507h-2.7v2.507zm-5.4 0v-2.507h-2.7v2.507zm-5.4 0v-2.507h-2.7v2.507z`,clipRule:`evenodd`}))},Cs;function _extends$r(){return _extends$r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$r.apply(null,arguments)}var ws=function SvgNumber(e){return r(`svg`,_extends$r({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),Cs||=r(`path`,{fillRule:`evenodd`,d:`M45 16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3zm0 2H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V19a1 1 0 0 0-1-1M35 28.444h7l-3.5 4zM35 26h7l-3.5-4z`}))},Ts;function _extends$q(){return _extends$q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$q.apply(null,arguments)}var Es=function SvgRadio(e){return r(`svg`,_extends$q({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),Ts||=r(`path`,{d:`M27 22c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10m0 18a8 8 0 1 1 0-16 8 8 0 1 1 0 16`}))},Ds;function _extends$p(){return _extends$p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$p.apply(null,arguments)}var Os=function SvgSelect(e){return r(`svg`,_extends$p({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),Ds||=r(`path`,{fillRule:`evenodd`,d:`M45 16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3zm0 2H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V19a1 1 0 0 0-1-1m-12 7h9l-4.5 6z`}))},ks;function _extends$o(){return _extends$o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$o.apply(null,arguments)}var As=function SvgSeparator(e){return r(`svg`,_extends$o({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),ks||=r(`path`,{fill:`currentColor`,d:`M26.293 16.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L27 18.414l-3.293 3.293a1 1 0 0 1-1.414-1.414zM9 26h36v2H9zm13.293 7.707 4 4a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L27 35.586l-3.293-3.293a1 1 0 0 0-1.414 1.414`}))},js;function _extends$n(){return _extends$n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$n.apply(null,arguments)}var Ms=function SvgSpacer(e){return r(`svg`,_extends$n({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),js||=r(`path`,{fill:`currentColor`,d:`M9 15v2h36v-2zm0 22v2h36v-2zm17.293-17.707a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L27 21.414l-3.293 3.293a1 1 0 0 1-1.414-1.414zm-4 11.414 4 4a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L27 32.586l-3.293-3.293a1 1 0 0 0-1.414 1.414`}))},Ns;function _extends$m(){return _extends$m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$m.apply(null,arguments)}var Ps=function SvgDynamicList(e){return r(`svg`,_extends$m({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),Ns||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M2.7 43.296v1.254c0 .746.604 1.35 1.35 1.35h1.275v-1.795q.074.211.075.445v-1.254h-.075V43.2H4.05c.177 0 .347.034.502.096zm2.7-2.507v-2.507H2.7v2.507zm0-5.014v-2.507H2.7v2.507zm0-5.014v-2.507H2.7v2.507zm0-5.015V23.24H2.7v2.507h2.7Zm0-5.014v-2.507H2.7v2.507zm0-5.014V13.21H2.7v2.507zm-2.7-5.014h1.852a1.4 1.4 0 0 1-.502.096h1.275v-.096H5.4V9.45q0 .235-.075.445V8.1H4.05A1.35 1.35 0 0 0 2.7 9.45zm5.175.096h2.55V8.1h-2.55zm5.1 0h2.55V8.1h-2.55zm5.1 0h2.55V8.1h-2.55zm5.1 0h2.55V8.1h-2.55zm5.1 0h2.55V8.1h-2.55zm5.1 0h2.55V8.1h-2.55zm5.1 0h2.55V8.1h-2.55zm5.1 0h2.55V8.1h-2.55zm5.1-2.7v1.795a1.4 1.4 0 0 1-.075-.445v1.254h.075v.096h1.275a1.4 1.4 0 0 1-.502-.096H51.3V9.45a1.35 1.35 0 0 0-1.35-1.35zm-.075 5.11v2.508h2.7V13.21zm0 5.015v2.507h2.7v-2.507zm0 5.014v2.507h2.7V23.24zm0 5.015v2.507h2.7v-2.507zm0 5.014v2.507h2.7v-2.507zm0 5.014v2.507h2.7v-2.507zm2.7 5.014h-1.852a1.4 1.4 0 0 1 .502-.096h-1.275v.096H48.6v1.254q0-.235.075-.445V45.9h1.275a1.35 1.35 0 0 0 1.35-1.35zm-5.175-.096h-2.55v2.7h2.55zm-5.1 0h-2.55v2.7h2.55zm-5.1 0h-2.55v2.7h2.55zm-5.1 0h-2.55v2.7h2.55zm-5.1 0h-2.55v2.7h2.55zm-5.1 0h-2.55v2.7h2.55zm-5.1 0h-2.55v2.7h2.55zm-5.1 0h-2.55v2.7h2.55zM16.2 17.55a4.05 4.05 0 0 1 4.05 4.05v1.35A4.05 4.05 0 0 1 16.2 27h-1.35a4.05 4.05 0 0 1-4.05-4.05V21.6a4.05 4.05 0 0 1 4.05-4.05zm0 2.7h-1.35a1.35 1.35 0 0 0-1.35 1.35v1.35c0 .746.604 1.35 1.35 1.35h1.35a1.35 1.35 0 0 0 1.35-1.35V21.6a1.35 1.35 0 0 0-1.35-1.35m27 1.35a4.05 4.05 0 0 0-4.05-4.05H29.7a4.05 4.05 0 0 0-4.05 4.05v1.35A4.05 4.05 0 0 0 29.7 27h9.45a4.05 4.05 0 0 0 4.05-4.05zm-13.5-1.35h9.45c.746 0 1.35.604 1.35 1.35v1.35a1.35 1.35 0 0 1-1.35 1.35H29.7a1.35 1.35 0 0 1-1.35-1.35V21.6c0-.746.604-1.35 1.35-1.35M43.2 37.8a4.05 4.05 0 0 0-4.05-4.05H29.7a4.05 4.05 0 0 0-4.05 4.05v1.35h2.7V37.8c0-.746.604-1.35 1.35-1.35h9.45c.746 0 1.35.604 1.35 1.35v1.35h2.7zm-27-4.05a4.05 4.05 0 0 1 4.05 4.05v1.35h-2.7V37.8a1.35 1.35 0 0 0-1.35-1.35h-1.35a1.35 1.35 0 0 0-1.35 1.35v1.35h-2.7V37.8a4.05 4.05 0 0 1 4.05-4.05z`,clipRule:`evenodd`}))},Fs;function _extends$l(){return _extends$l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$l.apply(null,arguments)}var Is=function SvgText(e){return r(`svg`,_extends$l({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),Fs||=r(`path`,{d:`M20.58 33.77h-3l-1.18-3.08H11l-1.1 3.08H7l5.27-13.54h2.89zm-5-5.36-1.86-5-1.83 5zM22 20.23h5.41a15.5 15.5 0 0 1 2.4.14 3.4 3.4 0 0 1 1.41.55 3.5 3.5 0 0 1 1 1.14 3 3 0 0 1 .42 1.58 3.26 3.26 0 0 1-1.91 2.94 3.63 3.63 0 0 1 1.91 1.22 3.28 3.28 0 0 1 .66 2 4 4 0 0 1-.43 1.8 3.6 3.6 0 0 1-1.09 1.4 3.9 3.9 0 0 1-1.83.65q-.69.07-3.3.09H22zm2.73 2.25v3.13h3.8a1.8 1.8 0 0 0 1.1-.49 1.4 1.4 0 0 0 .41-1 1.5 1.5 0 0 0-.35-1 1.54 1.54 0 0 0-1-.48c-.27 0-1.05-.05-2.34-.05zm0 5.39v3.62h2.57a11.5 11.5 0 0 0 1.88-.09 1.65 1.65 0 0 0 1-.54 1.6 1.6 0 0 0 .38-1.14 1.75 1.75 0 0 0-.29-1 1.7 1.7 0 0 0-.86-.62 9.3 9.3 0 0 0-2.41-.23zm19.62.92 2.65.84a5.94 5.94 0 0 1-2 3.29A5.74 5.74 0 0 1 41.38 34a5.87 5.87 0 0 1-4.44-1.84 7.1 7.1 0 0 1-1.73-5A7.43 7.43 0 0 1 37 21.87 6 6 0 0 1 41.54 20a5.64 5.64 0 0 1 4 1.47A5.33 5.33 0 0 1 47 24l-2.7.65a2.8 2.8 0 0 0-2.86-2.27A3.09 3.09 0 0 0 39 23.42a5.3 5.3 0 0 0-.93 3.5 5.62 5.62 0 0 0 .93 3.65 3 3 0 0 0 2.4 1.09 2.72 2.72 0 0 0 1.82-.66 4 4 0 0 0 1.13-2.21`}))},Ls;function _extends$k(){return _extends$k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$k.apply(null,arguments)}var Rs=function SvgHtml(e){return r(`svg`,_extends$k({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),Ls||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M47.008 12.15c1.625 0 2.942 1.36 2.942 3.039v23.622c0 1.678-1.317 3.039-2.942 3.039H6.992c-1.625 0-2.942-1.36-2.942-3.039V15.189c0-1.678 1.317-3.039 2.942-3.039zm0 2.026H6.992c-.542 0-.98.454-.98 1.013V16.2h-.004v2.7h.003v19.911c0 .56.44 1.013.98 1.013h40.017c.542 0 .98-.453.98-1.013V18.9h.005v-2.7h-.004v-1.011c0-.56-.44-1.013-.98-1.013M14.934 26.055v-3.78h2.194v9.45h-2.194v-3.78h-3.29v3.78H9.45v-9.45h2.194v3.78zm4.388-1.89h2.194v7.56h2.193v-7.56h2.194v-1.89h-6.581zm14.26-1.89h2.193v9.45h-2.194V25.11l-1.645 3.78-1.645-3.78v6.615h-2.194v-9.45h2.194l1.645 3.78zm4.387 0h2.194v7.56h4.387v1.89h-6.581z`,clipRule:`evenodd`}))},zs;function _extends$j(){return _extends$j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$j.apply(null,arguments)}var Bs=function SvgExpressionField(e){return r(`svg`,_extends$j({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),zs||=r(`path`,{fill:`currentcolor`,fillRule:`evenodd`,d:`M12.78 16.2v6.75c0 1.619-.635 3.059-1.618 4.05.983.991 1.618 2.431 1.618 4.05v6.75h3.51v2.7h-3.51c-1.289 0-2.34-1.213-2.34-2.7v-6.75c0-1.487-1.051-2.7-2.34-2.7v-2.7c1.289 0 2.34-1.213 2.34-2.7V16.2c0-1.487 1.051-2.7 2.34-2.7h3.51v2.7zm30.78 0v6.75c0 1.487 1.051 2.7 2.34 2.7v2.7c-1.289 0-2.34 1.213-2.34 2.7v6.75c0 1.487-1.051 2.7-2.34 2.7h-3.51v-2.7h3.51v-6.75c0-1.619.635-3.059 1.618-4.05-.983-.991-1.618-2.431-1.618-4.05V16.2h-3.51v-2.7h3.51c1.289 0 2.34 1.213 2.34 2.7M21.8 34.531q.7-.569.959-1.758l1.788-8.34h1.585l.387-1.828h-1.585l.405-1.878h1.585l.387-1.827H25.69q-1.271 0-1.972.569-.681.569-.94 1.758l-.294 1.378H21.34l-.387 1.827h1.142l-1.898 8.841h-1.585l-.387 1.827h1.622q1.272 0 1.953-.569m7.248-7.686-3.797 4.808h2.599l2.12-3.016h.22l.885 3.016h2.599l-1.677-4.36 3.778-4.688h-2.599l-2.12 2.947h-.22l-.885-2.947h-2.599z`,clipRule:`evenodd`}))},Vs;function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$i.apply(null,arguments)}var Hs=function SvgTextfield(e){return r(`svg`,_extends$i({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),Vs||=r(`path`,{fillRule:`evenodd`,d:`M45 16a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3zm0 2H9a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V19a1 1 0 0 0-1-1m-32 4v10h-2V22z`}))},Us;function _extends$h(){return _extends$h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$h.apply(null,arguments)}var Ws=function SvgTextarea(e){return r(`svg`,_extends$h({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),Us||=r(`path`,{fillRule:`evenodd`,d:`M45 13a3 3 0 0 1 3 3v22a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V16a3 3 0 0 1 3-3zm0 2H9a1 1 0 0 0-1 1v22a1 1 0 0 0 1 1h36a1 1 0 0 0 1-1V16a1 1 0 0 0-1-1m-1.136 15.5.849.849-6.364 6.364-.849-.849zm.264 3.5.849.849-2.828 2.828-.849-.849zM13 19v10h-2V19z`}))},Gs;function _extends$g(){return _extends$g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$g.apply(null,arguments)}var Ks=function SvgIFrame(e){return r(`svg`,_extends$g({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),Gs||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M45.658 9.45c1.625 0 2.942 1.36 2.942 3.039V22.95h-1.961v-4.383H7.36V41.51c0 .56.44 1.013.98 1.013H27v2.026H8.342c-1.625 0-2.942-1.36-2.942-3.039V12.489c0-1.678 1.317-3.039 2.942-3.039zm0 2.026H8.342c-.542 0-.98.454-.98 1.013v4.052h39.277v-4.052c0-.56-.44-1.013-.98-1.013ZM31.05 35.775A8.77 8.77 0 0 1 39.825 27a8.77 8.77 0 0 1 8.775 8.775 8.77 8.77 0 0 1-8.775 8.775 8.77 8.77 0 0 1-8.775-8.775m12.388-.516h3.097c-.206-2.581-1.858-4.646-4.026-5.678.62 1.548.93 3.613.93 5.678Zm-5.162 2.065c.207 3.303 1.136 4.955 1.549 5.161.413-.206 1.239-1.858 1.445-5.161zm1.446-8.26c-.31.207-1.342 2.272-1.446 6.195h2.994c-.103-3.923-1.135-5.988-1.548-6.194Zm-3.51 6.195c.103-2.065.31-4.13.929-5.678-2.168 1.032-3.82 3.097-4.026 5.678zm0 2.065h-2.89c.515 2.064 1.96 3.82 3.819 4.645-.516-1.342-.826-2.994-.93-4.645Zm7.226 0q-.155 2.632-.929 4.645c1.858-.826 3.304-2.58 3.923-4.645z`,clipRule:`evenodd`}))},qs,Js;function _extends$f(){return _extends$f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$f.apply(null,arguments)}var Ys=function SvgImage(e){return r(`svg`,_extends$f({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`currentcolor`},e),qs||=r(`path`,{fillRule:`evenodd`,d:`M34.636 21.91A3.818 3.818 0 1 1 27 21.908a3.818 3.818 0 0 1 7.636 0Zm-2 0A1.818 1.818 0 1 1 29 21.908a1.818 1.818 0 0 1 3.636 0Z`,clipRule:`evenodd`}),Js||=r(`path`,{fillRule:`evenodd`,d:`M15 13a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V15a2 2 0 0 0-2-2zm24 2H15v12.45l4.71-4.709a1.91 1.91 0 0 1 2.702 0l6.695 6.695 2.656-1.77a1.91 1.91 0 0 1 2.411.239L39 32.73zM15 39v-8.754a1 1 0 0 0 .168-.135l5.893-5.893 6.684 6.685a1.91 1.91 0 0 0 2.41.238l2.657-1.77 6.02 6.02q.078.077.168.135V39z`,clipRule:`evenodd`}))},Xs;function _extends$e(){return _extends$e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$e.apply(null,arguments)}var Zs=function SvgTable(e){return r(`svg`,_extends$e({xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 54 54`},e),Xs||=r(`path`,{fill:`currentcolor`,fillRule:`evenodd`,d:`M42.545 12.273A2.455 2.455 0 0 1 45 14.727v24.546a2.455 2.455 0 0 1-2.455 2.454h-31.09A2.455 2.455 0 0 1 9 39.273V14.727a2.455 2.455 0 0 1 2.455-2.454zM27.818 40.09h14.727a.82.82 0 0 0 .819-.818v-4.91H27.818Zm-1.636-5.727v5.727H11.455a.82.82 0 0 1-.819-.818v-4.91zm1.636-1.637h15.546V27H27.818ZM26.182 27v5.727H10.636V27zm1.636-1.636h15.546v-5.728H27.818Zm-1.636-5.728v5.728H10.636v-5.728z`,clipRule:`evenodd`}))},Qs;function _extends$d(){return _extends$d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$d.apply(null,arguments)}var $s=function SvgFilePicker(e){return r(`svg`,_extends$d({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),Qs||=r(`path`,{fill:`currentcolor`,fillRule:`evenodd`,d:`M17.55 41.175H27v2.362h-9.45a2.37 2.37 0 0 1-2.363-2.362v-28.35a2.37 2.37 0 0 1 2.363-2.363h11.813a1.07 1.07 0 0 1 .826.355l8.27 8.269a1.07 1.07 0 0 1 .353.826v5.907H36.45v-3.544h-7.088A2.37 2.37 0 0 1 27 19.912v-7.087h-9.45zm18.427-21.263-6.614-6.615v6.615zm4.253 18.664 3.308 3.308-1.654 1.653-3.308-3.307a6.35 6.35 0 0 1-3.307.945c-3.308 0-5.906-2.599-5.906-5.906 0-3.308 2.598-5.907 5.906-5.907s5.906 2.6 5.906 5.907a6.35 6.35 0 0 1-.945 3.307m-4.961-6.851c-2.008 0-3.544 1.536-3.544 3.544s1.536 3.543 3.544 3.543 3.544-1.535 3.544-3.543-1.536-3.544-3.544-3.544`,clipRule:`evenodd`}))},ec;function _extends$c(){return _extends$c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$c.apply(null,arguments)}var tc=function SvgDocumentPreview(e){return r(`svg`,_extends$c({xmlns:`http://www.w3.org/2000/svg`,width:54,height:54,fill:`none`},e),ec||=r(`path`,{fill:`currentcolor`,fillRule:`evenodd`,d:`M17.55 41.175h6.75v2.363h-6.75a2.37 2.37 0 0 1-2.363-2.363v-28.35a2.37 2.37 0 0 1 2.363-2.362h11.813a1.07 1.07 0 0 1 .826.354l8.27 8.269a1.07 1.07 0 0 1 .353.827v7.256H36.45v-4.894h-7.088A2.37 2.37 0 0 1 27 19.913v-7.088h-9.45zm18.427-21.262-6.614-6.616v6.616zm-2.212 10.564-.015-.001h-.015a8.86 8.86 0 0 0-7.926 5.656l-.003.008a.9.9 0 0 0 0 .62l.003.008a8.85 8.85 0 0 0 7.926 5.655l.015.001h.015a8.86 8.86 0 0 0 7.926-5.656l.003-.008a.9.9 0 0 0 0-.62l-.003-.008a8.85 8.85 0 0 0-7.926-5.655M33.75 40.6c-2.456 0-5.088-1.802-6.107-4.151 1.019-2.349 3.651-4.151 6.107-4.151s5.088 1.802 6.107 4.151c-1.019 2.349-3.65 4.151-6.107 4.151m0-7.593a3.443 3.443 0 1 0 0 6.885 3.443 3.443 0 0 0 0-6.886Zm-.316 1.853a1.62 1.62 0 1 1 .632 3.178 1.62 1.62 0 0 1-.632-3.178`,clipRule:`evenodd`}))},iconsByType=e=>({button:as,checkbox:ss,checklist:ls,columns:Ss,datetime:ps,group:Ss,iframe:Ks,image:Ys,number:ws,expression:Bs,radio:Es,select:Os,separator:As,spacer:Ms,dynamiclist:Ps,taglist:gs,text:Is,html:Rs,textfield:Hs,textarea:Ws,table:Zs,filepicker:$s,documentPreview:tc,default:bs})[e],nc=`image`;function Image(e){let{field:t}=e,{alt:n,id:r,source:i}=t,a=iconsByType(t.type),s=useSingleLineTemplateEvaluation(i,{debug:!0}),c=p(()=>sanitizeImageSource(s),[s]),d=useSingleLineTemplateEvaluation(n,{debug:!0}),{formId:f}=o(zo);return m(`div`,{class:formFieldClasses(nc),children:[c&&m(`div`,{class:`fjs-image-container`,children:m(`img`,{alt:d,src:c,class:`fjs-image`,id:prefixId(r,f)})}),!c&&m(`div`,{class:`fjs-image-placeholder`,children:m(`span`,{class:`fjs-image-placeholder-inner`,children:m(a,{alt:`This is an image placeholder`,width:`32`,height:`32`,viewBox:`0 0 56 56`})})})]})}Image.config={type:nc,keyed:!1,name:`Image view`,group:`presentation`,create:(e={})=>e,getSubheading:e=>e.alt};function TemplatedInputAdorner(e){let{pre:t,post:n}=e,r=useSingleLineTemplateEvaluation(t,{debug:!0}),i=useSingleLineTemplateEvaluation(n,{debug:!0});return m(InputAdorner,{...e,pre:r,post:i})}var rc;function _extends$b(){return _extends$b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$b.apply(null,arguments)}var ic=function SvgAngelDown(e){return r(`svg`,_extends$b({xmlns:`http://www.w3.org/2000/svg`,width:8,height:8},e),rc||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,stroke:`currentColor`,strokeWidth:.5,d:`M7.75 1.336 4 6.125.258 1.335 0 1.54l4 5.125L8 1.54Zm0 0`,clipRule:`evenodd`}))},ac;function _extends$a(){return _extends$a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$a.apply(null,arguments)}var oc=function SvgAngelUp(e){return r(`svg`,_extends$a({xmlns:`http://www.w3.org/2000/svg`,width:8,height:8},e),ac||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,stroke:`currentColor`,strokeWidth:.5,d:`M7.75 6.664 4 1.875.258 6.665 0 6.46l4-5.125L8 6.46Zm0 0`,clipRule:`evenodd`}))};function countDecimals(e){let t=Pe(e);return t.toString()===t.toFixed(0)?0:t.toFixed().split(`.`)[1].length||0}function isValidNumber(e){return(typeof e==`number`||typeof e==`string`)&&e!==``&&!isNaN(Number(e))}function willKeyProduceValidNumber(e,t,n,r,i){if(t===`NaN`)return!1;t=t.replace(`,`,`.`);let a=!t.includes(`.`)&&(e===`.`||e===`,`),o=!t.includes(`-`)&&e===`-`&&n===0,s=/^[0-9]$/i.test(e),c=t===void 0?-1:t.indexOf(`.`),d=typeof i==`number`&&r===0&&c!==-1&&t.includes(`.`)&&t.split(`.`)[1].length>=i&&n>c;return(s||i!==0&&a||o)&&!d}function isNullEquivalentValue(e){return e==null||e===``}function serializeToInputString(e){return e==null||typeof e!=`string`&&typeof e!=`number`?``:e.toString()}var sc=`number`;function Numberfield(e){let{disabled:t,errors:n=[],domId:r,onBlur:o,onFocus:s,field:c,value:f,readonly:g}=e,{description:v,label:b,appearance:x={},validate:w={},decimalDigits:T,increment:E}=c,{prefixAdorner:D,suffixAdorner:A}=x,{required:j}=w,M=useService(`translate`),N=d(),[P,R]=i(f),[B,V]=i(f),H=a(e=>Numberfield.config.sanitizeValue({value:e,formField:c}),[c]),[ee,U]=useFlushDebounce(e.onChange);usePrevious(f)!==P&&ee({field:c,value:P});let onInputBlur=()=>{U&&U(),o&&o()},onInputFocus=()=>{s&&s()},G=a(e=>{isNullEquivalentValue(e)?(V(``),R(null)):(e=e.replaceAll(`,`,`.`),e===`-`?V(`-`):isNaN(Number(e))?(V(`NaN`),R(null)):(V(e),R(H(e))))},[H]),K=usePrevious(f)!=f,J=H(f)===H(P);K&&!J&&G(serializeToInputString(f));let te=p(()=>Pe(E||(T?`1e-${T}`:`1`)),[T,E]),increment=()=>{if(g)return;let e=isValidNumber(P)?Pe(P):Pe(0),t=e.minus(e.mod(te));G(t.plus(te).toFixed())},decrement=()=>{if(g)return;let e=isValidNumber(P)?Pe(P):Pe(0);if(e.mod(te).cmp(0)===0)G(e.minus(te).toFixed());else{let t=e.minus(e.mod(te));G(t.toFixed())}},onKeyDown=e=>{B===`NaN`&&(e.code===`Backspace`||e.code===`Delete`)?(G(``),e.preventDefault()):e.code===`ArrowUp`?(increment(),e.preventDefault()):e.code===`ArrowDown`?(decrement(),e.preventDefault()):e.code===`Enter`&&U&&U()},onKeyPress=e=>{let t=N.current.selectionStart,n=N.current.selectionStart-N.current.selectionEnd,r=N.current.value;willKeyProduceValidNumber(e.key,r,t,n,T)||e.preventDefault()},ne=`${r}-description`,ce=`${r}-error-message`;return m(`div`,{class:formFieldClasses(sc,{errors:n,disabled:t,readonly:g}),children:[m(Label,{htmlFor:r,label:b,required:j}),m(TemplatedInputAdorner,{disabled:t,readonly:g,pre:D,post:A,children:m(`div`,{class:(0,X.default)(`fjs-vertical-group`,{"fjs-disabled":t,"fjs-readonly":g},{hasErrors:n.length}),children:[m(`input`,{ref:N,class:`fjs-input`,disabled:t,readOnly:g,id:r,onKeyDown,onKeyPress,onBlur:onInputBlur,onFocus:onInputFocus,onInput:e=>G(e.target.value,!0),onPaste:e=>B===`NaN`&&e.preventDefault(),type:`text`,autoComplete:`off`,step:te,value:B,"aria-describedby":[ne,ce].join(` `),required:j,"aria-invalid":n.length>0}),m(`div`,{class:(0,X.default)(`fjs-number-arrow-container`,{"fjs-disabled":t,"fjs-readonly":g}),children:[m(`button`,{type:`button`,class:`fjs-number-arrow-up`,"aria-label":M(`Increment`),onClick:()=>increment(),tabIndex:-1,children:m(oc,{})}),m(`div`,{class:`fjs-number-arrow-separator`}),m(`button`,{type:`button`,class:`fjs-number-arrow-down`,"aria-label":M(`Decrement`),onClick:()=>decrement(),tabIndex:-1,children:m(ic,{})})]})]})}),m(Description,{id:ne,description:v}),m(Errors,{id:ce,errors:n})]})}Numberfield.config={type:sc,keyed:!0,name:`Number`,group:`basic-input`,emptyValue:null,sanitizeValue:({value:e,formField:t})=>isNullEquivalentValue(e)||!isValidNumber(e)?null:t.serializeToString?e.toString():Number(e),create:(e={})=>({label:`Number`,...e})};var cc=`radio`;function Radio(e){let{disabled:t,errors:n=[],domId:r,onBlur:i,onFocus:a,field:o,readonly:s,value:c}=e,{description:f,label:p,validate:g={}}=o,v=d(),{required:b}=g,onChange=t=>{e.onChange({value:t})},onRadioBlur=e=>{v.current.contains(e.relatedTarget)||i&&i()},onRadioFocus=e=>{v.current.contains(e.relatedTarget)||a&&a()},{loadState:x,options:w}=useOptionsAsync(o);useCleanupSingleSelectValue({field:o,loadState:x,options:w,value:c,onChange:e.onChange});let T=`${r}-description`,E=`${r}-error-message`;return m(`div`,{class:formFieldClasses(cc,{errors:n,disabled:t,readonly:s}),ref:v,children:[m(Label,{label:p,required:b}),x==Bo.LOADED&&w.map((e,i)=>{let a=`${r}-${i}`,o=(0,bn.default)(e.value,c);return m(`div`,{className:(0,X.default)(`fjs-inline-label`,{"fjs-checked":o}),children:[m(`input`,{checked:o,class:`fjs-input`,disabled:t,readOnly:s,name:r,id:a,type:`radio`,onClick:()=>onChange(e.value),onBlur:onRadioBlur,onFocus:onRadioFocus,"aria-describedby":[T,E].join(` `),required:b,"aria-invalid":n.length>0}),m(Label,{htmlFor:a,label:e.label,class:(0,X.default)({"fjs-checked":o}),required:!1})]},e.value)}),m(Description,{id:T,description:f}),m(Errors,{id:E,errors:n})]})}Radio.config={type:cc,keyed:!0,name:`Radio group`,group:`selection`,emptyValue:null,sanitizeValue:sanitizeSingleSelectValue,create:(e={})=>({label:`Radio group`,...createEmptyOptions(e)})};var lc;function _extends$9(){return _extends$9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$9.apply(null,arguments)}var uc=function SvgXMark(e){return r(`svg`,_extends$9({xmlns:`http://www.w3.org/2000/svg`,width:8,height:8},e),lc||=r(`path`,{fill:`currentColor`,fillRule:`evenodd`,stroke:`currentColor`,strokeWidth:.5,d:`M4 3.766 7.43.336l.234.234L4.234 4l3.43 3.43-.234.234L4 4.234.57 7.664.336 7.43 3.766 4 .336.57.57.336Zm0 0`,clipRule:`evenodd`}))};function SearchableSelect(e){let{domId:t,disabled:n,errors:r,onBlur:o,onFocus:s,field:f,readonly:g,value:v}=e,[x,w]=i(``),[T,E]=i(!1),[D,A]=i(!0),[j,M]=i(!1),N=d(),P=useService(`eventBus`),R=useService(`translate`),{loadState:V,options:H}=useOptionsAsync(f);useCleanupSingleSelectValue({field:f,loadState:V,options:H,value:v,onChange:e.onChange});let ee=useGetLabelCorrelation(H),U=p(()=>B(v)?ee(v):void 0,[v,ee]);b(()=>{w(U||``)},[U]);let G=p(()=>V===Bo.LOADED?!x||!D?H:H.filter(e=>e.label&&e.value&&e.label.toLowerCase().includes(x.toLowerCase())):[],[x,V,H,D]),K=a(t=>{w(t&&t.label||``),e.onChange({value:t?.value??null})},[e]),J=p(()=>{let e={};return e.componentReady=!n&&!g&&V===Bo.LOADED,e.displayCross=e.componentReady&&v!=null,e.displayDropdown=!n&&!g&&T&&!j,e},[n,T,j,V,g,v]),te=a(e=>{M(!1),E(!T);let t=N.current;T?t.blur():t.focus(),e.preventDefault()},[T]),onInputChange=({target:e})=>{M(!1),E(!0),A(!0),w(e.value||``),P.fire(`formField.search`,{formField:f,value:e.value||``})},ne=a(e=>{switch(e.key){case`ArrowUp`:e.preventDefault();break;case`ArrowDown`:T||(E(!0),A(!1)),e.preventDefault();break;case`Escape`:M(!0);break;case`Enter`:j&&M(!1)}},[T,j]),ce=a(()=>{M(!1),E(!0),A(!1)},[]),le=a(()=>{M(!1),E(!0),s&&s()},[s]),ue=a(()=>{E(!1),w(U||``),o&&o()},[o,U]);return m(c,{children:[m(`div`,{class:(0,X.default)(`fjs-input-group`,{disabled:n,readonly:g},{hasErrors:r.length}),children:[m(`input`,{disabled:n,readOnly:g,class:`fjs-input`,ref:N,id:t,onChange:onInputChange,type:`text`,value:x,placeholder:R(`Search`),autoComplete:`off`,onKeyDown:ne,onMouseDown:ce,onFocus:le,onBlur:ue,"aria-describedby":e[`aria-describedby`]}),J.displayCross&&m(`span`,{class:`fjs-select-cross`,onMouseDown:e=>{K(null),e.preventDefault()},children:[m(uc,{}),` `]}),m(`span`,{class:`fjs-select-arrow`,onMouseDown:e=>te(e),children:J.displayDropdown?m(oc,{}):m(ic,{})})]}),m(`div`,{class:`fjs-select-anchor`,children:J.displayDropdown&&m(DropdownList,{values:G,getLabel:e=>e.label,onValueSelected:e=>{K(e),E(!1)},listenerElement:N.current})})]})}function SimpleSelect(e){let{domId:t,disabled:n,errors:r,onBlur:o,onFocus:s,field:f,readonly:g,value:v}=e,b=useService(`translate`),[x,w]=i(!1),T=d(),E=d(),{loadState:D,options:A}=useOptionsAsync(f);useCleanupSingleSelectValue({field:f,loadState:D,options:A,value:v,onChange:e.onChange});let j=useGetLabelCorrelation(A),M=p(()=>B(v)?j(v):void 0,[v,j]),P=a(t=>{e.onChange({value:t?.value??null})},[e]),R=p(()=>{let e={};return e.componentReady=!n&&!g&&D===Bo.LOADED,e.displayCross=e.componentReady&&v!=null,e.displayDropdown=!n&&!g&&x,e},[n,x,D,g,v]),V=a(e=>{let t=E.current;!n&&t&&(w(!x),x?t.blur():t.focus(),e.preventDefault())},[n,x]),H=p(()=>v&&N(A,e=>e.value===v)||0,[A,v]),ee=a(()=>{g||(w(!0),s&&s())},[s,g]),U=a(()=>{g||(w(!1),o&&o())},[o,g]);return m(c,{children:[m(`div`,{ref:T,class:(0,X.default)(`fjs-input-group`,{disabled:n,readonly:g},{hasErrors:r.length}),onFocus:ee,onBlur:U,onMouseDown:V,children:[m(`div`,{class:(0,X.default)(`fjs-select-display`,{"fjs-select-placeholder":!v}),id:`${t}-display`,children:M||b(`Select`)}),!n&&m(`input`,{ref:E,id:t,class:`fjs-select-hidden-input`,value:M,onFocus:ee,onBlur:U,"aria-describedby":e[`aria-describedby`]}),R.displayCross&&m(`span`,{class:`fjs-select-cross`,onMouseDown:e=>{P(null),e.stopPropagation()},children:m(uc,{})}),m(`span`,{class:`fjs-select-arrow`,children:R.displayDropdown?m(oc,{}):m(ic,{})})]}),m(`div`,{class:`fjs-select-anchor`,children:R.displayDropdown&&m(DropdownList,{values:A,getLabel:e=>e.label,initialFocusIndex:H,onValueSelected:e=>{P(e),w(!1)},listenerElement:T.current})})]})}var dc=`select`;function Select(e){let{disabled:t,errors:n=[],domId:r,onBlur:i,onFocus:a,field:o,onChange:s,readonly:c,value:d}=e,{description:f,label:p,searchable:g=!1,validate:v={}}=o,{required:b}=v,x=`${r}-description`,w=`${r}-error-message`,T={domId:r,disabled:t,errors:n,onBlur:i,onFocus:a,field:o,value:d,onChange:s,readonly:c,required:b,"aria-invalid":n.length>0,"aria-describedby":[x,w].join(` `)};return m(`div`,{class:formFieldClasses(dc,{errors:n,disabled:t,readonly:c}),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation())},children:[m(Label,{htmlFor:r,label:p,required:b}),m(g?SearchableSelect:SimpleSelect,{...T}),m(Description,{id:x,description:f}),m(Errors,{id:w,errors:n})]})}Select.config={type:dc,keyed:!0,name:`Select`,group:`selection`,emptyValue:null,sanitizeValue:sanitizeSingleSelectValue,create:(e={})=>({label:`Select`,...createEmptyOptions(e)})};var fc=`separator`;function Separator(){return m(`div`,{class:formFieldClasses(fc),children:m(`hr`,{})})}Separator.config={type:fc,keyed:!1,name:`Separator`,group:`presentation`,create:(e={})=>({...e})};var pc=`spacer`;function Spacer(e){let{field:t}=e,{height:n=60}=t;return m(`div`,{class:formFieldClasses(pc),style:{height:n}})}Spacer.config={type:pc,keyed:!1,name:`Spacer`,group:`presentation`,create:(e={})=>({height:60,...e})};function DynamicList(e){let{field:t,domId:n,readonly:r}=e,{label:i,type:a,showOutline:s}=t,{Empty:c}=o(Lo),d={...e,Empty:c};return m(`div`,{className:(0,X.default)(formFieldClasses(a,{readonly:r}),`fjs-form-field-grouplike`,{"fjs-outlined":s}),role:`group`,"aria-labelledby":n,children:[m(Label,{id:n,label:i}),m(ChildrenRenderer,{...d})]})}DynamicList.config={type:`dynamiclist`,pathed:!0,repeatable:!0,name:`Dynamic list`,group:`container`,create:(e={})=>({label:`Dynamic list`,components:[],showOutline:!0,isRepeating:!0,allowAddRemove:!0,defaultRepetitions:1,...e})};function SkipLink(e){let{className:t,label:n,onSkip:r}=e,i=a(e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),r())},[r]);return m(`a`,{href:`#`,class:(0,X.default)(`fjs-skip-link`,t),onKeyDown:i,children:n})}var mc=`taglist`;function Taglist(e){let{disabled:t,errors:n=[],onFocus:r,domId:a,onBlur:o,field:s,readonly:c,value:f}=e,{description:g,label:v,validate:b={}}=s,{required:x}=b,[w,T]=i(``),[E,D]=i(!1),[A,j]=i(!1),M=d(),N=d(),P=useService(`eventBus`),R=useService(`translate`),{loadState:B,options:V}=useOptionsAsync(s),H=useDeepCompareMemoize(f||[]);useCleanupMultiSelectValue({field:s,loadState:B,options:V,values:H,onChange:e.onChange});let ee=useGetLabelCorrelation(V),U=p(()=>V.length>H.length,[V.length,H.length]),G=p(()=>{if(B!==Bo.LOADED)return[];let isValidFilteredOption=e=>e.label.toLowerCase().includes(w.toLowerCase())&&!hasEqualValue(e.value,H);return V.filter(isValidFilteredOption)},[w,V,H,B]),selectValue=t=>{T(``),H.at(-1)!==t&&e.onChange({value:[...H,t]})},deselectValue=t=>{let n=H.filter(e=>!(0,bn.default)(e,t));e.onChange({value:n})},onInputChange=({target:e})=>{j(!1),T(e.value||``),P.fire(`formField.search`,{formField:s,value:e.value||``})},onInputKeyDown=e=>{switch(e.key){case`ArrowUp`:case`ArrowDown`:e.preventDefault();break;case`Backspace`:!w&&H.length&&deselectValue(H[H.length-1]);break;case`Escape`:j(!0);break;case`Enter`:A&&j(!1)}},onElementBlur=e=>{M.current.contains(e.relatedTarget)||o&&o()},onElementFocus=e=>{M.current.contains(e.relatedTarget)||r&&r()},onInputBlur=e=>{c||(D(!1),T(``)),onElementBlur(e)},onInputFocus=e=>{c||D(!0),onElementFocus(e)},onTagRemoveClick=(e,t)=>{let{target:n}=e;deselectValue(t),n.closest(`.fjs-taglist-tag`).nextSibling||N.current.focus()},onSkipToSearch=()=>{N.current.focus()},K=p(()=>!t&&B===Bo.LOADED&&E&&!A,[t,E,A,B]),J=`${a}-description`,te=`${a}-error-message`;return m(`div`,{ref:M,class:formFieldClasses(mc,{errors:n,disabled:t,readonly:c}),onKeyDown:e=>{e.key===`Enter`&&(e.stopPropagation(),e.preventDefault())},children:[m(Label,{label:v,required:x,htmlFor:a}),!t&&!c&&!!H.length&&m(SkipLink,{className:`fjs-taglist-skip-link`,label:R(`Skip to search`),onSkip:onSkipToSearch}),m(`div`,{class:(0,X.default)(`fjs-taglist`,{"fjs-disabled":t,"fjs-readonly":c}),children:[B===Bo.LOADED&&m(`div`,{class:`fjs-taglist-tags`,children:H.map(e=>m(`div`,{class:(0,X.default)(`fjs-taglist-tag`,{"fjs-disabled":t,"fjs-readonly":c}),onMouseDown:e=>e.preventDefault(),children:[m(`span`,{class:`fjs-taglist-tag-label`,children:ee(e)}),!t&&!c&&m(`button`,{type:`button`,title:R(`Remove tag`),class:`fjs-taglist-tag-remove`,onFocus:onElementFocus,onBlur:onElementBlur,onClick:t=>onTagRemoveClick(t,e),children:m(uc,{})})]},e))}),m(`input`,{disabled:t,readOnly:c,class:`fjs-taglist-input`,ref:N,id:a,onChange:onInputChange,type:`text`,value:w,placeholder:t||c?void 0:R(`Search`),autoComplete:`off`,onKeyDown:onInputKeyDown,onMouseDown:()=>j(!1),onFocus:onInputFocus,onBlur:onInputBlur,"aria-describedby":[J,te].join(` `),required:x,"aria-invalid":n.length>0})]}),m(`div`,{class:`fjs-taglist-anchor`,children:K&&m(DropdownList,{values:G,getLabel:e=>e.label,onValueSelected:e=>selectValue(e.value),emptyListMessage:R(U?`No results`:`All values selected`),listenerElement:N.current})}),m(Description,{id:J,description:g}),m(Errors,{id:te,errors:n})]})}Taglist.config={type:mc,keyed:!0,name:`Tag list`,group:`selection`,emptyValue:[],sanitizeValue:sanitizeMultiSelectValue,create:(e={})=>({label:`Tag list`,...createEmptyOptions(e)})};var hc=3,gc=1,_c=`h1.h2.h3.h4.h5.h6.span.em.a.p.div.ul.ol.li.hr.blockquote.img.pre.code.br.strong.table.thead.tbody.tr.th.td`.split(`.`),vc=[`align`,`alt`,`class`,`href`,`id`,`name`,`rel`,`target`,`src`],yc=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,bc=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,xc=document.createElement(`form`);function sanitizeHTML(e){let t=new DOMParser().parseFromString(`<!DOCTYPE html>\n<html><body><div>${e}`,`text/html`);t.normalize();let n=t.body.firstChild;return n?(sanitizeNode(n),n.innerHTML):``}function sanitizeNode(e){if(e.nodeType===hc)return;if(e.nodeType!==gc)return e.remove();let t=e.tagName.toLowerCase();if(!_c.includes(t))return e.remove();let n=e.attributes;for(let r=n.length;r--;){let i=n[r],a=i.name,o=a.toLowerCase(),s=i.value.trim();e.removeAttribute(a),isValidAttribute(t,o,s)&&e.setAttribute(a,s)}t===`a`&&e.getAttribute(`target`)===`_blank`&&e.getAttribute(`rel`)!==`noopener`&&e.setAttribute(`rel`,`noopener`);for(let t=e.childNodes.length;t--;)sanitizeNode(e.childNodes[t])}function isValidAttribute(e,t,n){return!(!vc.includes(t)||(t===`id`||t===`name`)&&(n in document||n in xc)||t===`target`&&n!==`_blank`||t===`href`&&!yc.test(n.replace(bc,``)))}var Sc=`text`;function Text(e){let{textLinkTarget:t}=useService(`form`)._getState().properties,{field:n,disableLinks:r}=e,{text:i=``,strict:o=!1}=n,s=useService(`markdownRenderer`),c=useTemplateEvaluation(i,{debug:!0,strict:o}),d=useDangerousHTMLWrapper({html:p(()=>s.render(c),[s,c]),transform:a(e=>{let n=sanitizeHTML(e),i=document.createElement(`div`);return i.innerHTML=n,i.querySelectorAll(`a`).forEach(e=>{r&&(e.setAttribute(`class`,`fjs-disabled-link`),e.setAttribute(`tabIndex`,`-1`)),t&&e.setAttribute(`target`,t)}),i.innerHTML},[r,t]),sanitize:!1,sanitizeStyleTags:!1});return m(`div`,{class:formFieldClasses(Sc),dangerouslySetInnerHTML:d})}Text.config={type:Sc,keyed:!1,name:`Text view`,group:`presentation`,create:(e={})=>({text:Io,...e}),getSubheading:e=>{textToLabel(e.text)}};var Cc=`html`;function Html(e){let{textLinkTarget:t}=useService(`form`)._getState().properties,{field:n,disableLinks:r,domId:i}=e,{content:o=``,strict:s=!1}=n,c=`${i}-style-scope`,d=useDangerousHTMLWrapper({html:useTemplateEvaluation(o,{debug:!0,strict:s,sanitizer:escapeHTML}),transform:a(e=>{let n=document.createElement(`div`);return n.innerHTML=e,n.querySelectorAll(`a`).forEach(e=>{r&&(e.setAttribute(`class`,`fjs-disabled-link`),e.setAttribute(`tabIndex`,`-1`)),t&&e.setAttribute(`target`,t)}),wrapCSSStyles(n,`.${c}`),n.innerHTML},[r,c,t]),sanitize:!0,sanitizeStyleTags:!1});return m(`div`,{class:(0,X.default)(formFieldClasses(Cc),c),dangerouslySetInnerHTML:d})}Html.config={type:Cc,keyed:!1,name:`HTML view`,group:`presentation`,create:(e={})=>({content:``,...e})};var wc=`expression`;function ExpressionField(e){let{field:t,onChange:n,value:r}=e,{computeOn:i,expression:o}=t,s=useDeepCompareMemoize(useExpressionEvaluation(o)),c=useService(`eventBus`),d=useService(`expressionLoopPreventer`),f=a(()=>{n&&n({field:t,value:s,shouldNotRecompute:!0})},[t,s,n]);return b(()=>{i===`change`&&!(0,bn.default)(s,r)&&d.registerExpressionExecution(this)&&f()}),b(()=>{if(i===`presubmit`)return c.on(`presubmit`,f),()=>c.off(`presubmit`,f)},[i,f,c]),null}ExpressionField.config={type:wc,name:`Expression`,group:`basic-input`,keyed:!0,emptyValue:null,escapeGridRender:!0,create:(e={})=>({computeOn:`change`,...e})};var Tc=`textfield`;function Textfield(e){let{disabled:t,errors:n=[],domId:r,onBlur:i,onFocus:a,field:o,readonly:s,value:c=``}=e,{description:d,label:f,appearance:p={},validate:g={}}=o,{prefixAdorner:v,suffixAdorner:b}=p,{required:x}=g,[w,T]=useFlushDebounce(({target:t})=>{e.onChange({value:t.value})}),onInputChange=e=>{w({target:e.target})},onInputBlur=()=>{T&&T(),i&&i()},onInputFocus=()=>{a&&a()},onKeyDown=e=>{e.code===`Enter`&&T&&T()},E=`${r}-description`,D=`${r}-error-message`;return m(`div`,{class:formFieldClasses(Tc,{errors:n,disabled:t,readonly:s}),children:[m(Label,{htmlFor:r,label:f,required:x}),m(TemplatedInputAdorner,{disabled:t,readonly:s,pre:v,post:b,children:m(`input`,{class:`fjs-input`,disabled:t,readOnly:s,id:r,onInput:onInputChange,onBlur:onInputBlur,onFocus:onInputFocus,onKeyDown,type:`text`,value:c,"aria-describedby":[E,D].join(` `),required:x,"aria-invalid":n.length>0})}),m(Description,{id:E,description:d}),m(Errors,{id:D,errors:n})]})}Textfield.config={type:Tc,keyed:!0,name:`Text field`,group:`basic-input`,emptyValue:``,sanitizeValue:({value:e})=>V(e)||M(e)||G(e)?``:typeof e==`string`?e.replace(/[\r\n\t]/g,` `):String(e),create:(e={})=>({label:`Text field`,...e})};var Ec=`textarea`;function Textarea(e){let{disabled:t,errors:n=[],domId:r,onBlur:i,onFocus:a,field:o,readonly:s,value:c=``}=e,{description:f,label:p,validate:v={}}=o,{required:x}=v,w=d(),[T,E]=useFlushDebounce(({target:t})=>{e.onChange({value:t.value})}),onInputBlur=()=>{E&&E(),i&&i()},onInputFocus=()=>{a&&a()},onInputChange=e=>{T({target:e.target}),autoSizeTextarea(w.current)};g(()=>{autoSizeTextarea(w.current)},[c]),b(()=>{autoSizeTextarea(w.current)},[]);let D=`${r}-description`,A=`${r}-error-message`;return m(`div`,{class:formFieldClasses(Ec,{errors:n,disabled:t,readonly:s}),children:[m(Label,{htmlFor:r,label:p,required:x}),m(`textarea`,{class:`fjs-textarea`,disabled:t,readOnly:s,id:r,onInput:onInputChange,onBlur:onInputBlur,onFocus:onInputFocus,value:c,ref:w,"aria-describedby":[D,A].join(` `),required:x,"aria-invalid":n.length>0}),m(Description,{id:D,description:f}),m(Errors,{id:A,errors:n})]})}Textarea.config={type:Ec,keyed:!0,name:`Text area`,group:`basic-input`,emptyValue:``,sanitizeValue:({value:e})=>V(e)||M(e)||G(e)?``:String(e),create:(e={})=>({label:`Text area`,...e})};var autoSizeTextarea=e=>{e.style.height=`0px`;let t=window.getComputedStyle(e),heightFromLines=()=>{let n=parseInt(t.getPropertyValue(`line-height`).replace(`px`,``))||0;return(e.value?e.value.toString().split(`
|
|
78
|
+
`).length:0)*n},n=parseInt(t.getPropertyValue(`border-top-width`))+parseInt(t.getPropertyValue(`padding-top`))+(e.scrollHeight||heightFromLines())+parseInt(t.getPropertyValue(`padding-bottom`))+parseInt(t.getPropertyValue(`border-bottom-width`)),r=Math.max(Math.min(n||0,350),75);e.style.height=`${r}px`,e.style.overflow=n>350?`visible`:`hidden`},Dc;function _extends$8(){return _extends$8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$8.apply(null,arguments)}var Oc=function SvgArrowDown(e){return r(`svg`,_extends$8({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`},e),Dc||=r(`path`,{fill:`currentcolor`,d:`M24.59 16.59 17 24.17V4h-2v20.17l-7.59-7.58L6 18l10 10 10-10z`}))},kc;function _extends$7(){return _extends$7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$7.apply(null,arguments)}var Ac=function SvgArrowUp(e){return r(`svg`,_extends$7({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`},e),kc||=r(`path`,{fill:`currentcolor`,d:`M16 4 6 14l1.41 1.41L15 7.83V28h2V7.83l7.59 7.58L26 14z`}))},jc;function _extends$6(){return _extends$6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$6.apply(null,arguments)}var Mc=function SvgCaretLeft(e){return r(`svg`,_extends$6({xmlns:`http://www.w3.org/2000/svg`,xmlSpace:`preserve`,viewBox:`0 0 32 32`},e),jc||=r(`path`,{fill:`currentcolor`,d:`m20 24-10-8 10-8z`}))},Nc;function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$5.apply(null,arguments)}var Pc=function SvgCaretRight(e){return r(`svg`,_extends$5({xmlns:`http://www.w3.org/2000/svg`,xmlSpace:`preserve`,viewBox:`0 0 32 32`},e),Nc||=r(`path`,{fill:`currentcolor`,d:`m12 8 10 8-10 8z`}))},Fc=`table`;function Table(e){let{field:t}=e,{columns:n=[],columnsExpression:r,dataSource:a=``,rowCount:o,id:s,label:d}=t,[f,p]=i(null),g=useEvaluatedColumns(r||``,n),v=g.map(({key:e})=>e),x=useExpressionEvaluation(a),w=Array.isArray(x)?x.filter(e=>!G(e)||typeof e!=`object`):[],T=f===null?w:sortByColumn(w,f.key,f.direction),E=J(o)?chunk(T,o):[T],[D,A]=i(0),j=E[D]||[],M=useService(`translate`);b(()=>{A(0)},[o,f]);function toggleSortBy(e){p(t=>t===null||t.key!==e?{key:e,direction:`asc`}:t.direction===`desc`?null:{key:e,direction:`desc`})}return m(`div`,{class:formFieldClasses(Fc),children:[m(Label,{htmlFor:prefixId(s),label:d}),m(`div`,{class:(0,X.default)(`fjs-table-middle-container`,{"fjs-table-empty":g.length===0}),children:[g.length===0?M(`Nothing to show.`):m(`div`,{class:`fjs-table-inner-container`,children:m(`table`,{class:`fjs-table`,id:prefixId(s),children:[m(`thead`,{class:`fjs-table-head`,children:m(`tr`,{class:`fjs-table-tr`,children:g.map(({key:e,label:t})=>{let n=t||e;return m(`th`,{tabIndex:0,class:`fjs-table-th`,onClick:()=>{toggleSortBy(e)},onKeyDown:t=>{[`Enter`,`Space`].includes(t.code)&&toggleSortBy(e)},"aria-label":getHeaderAriaLabel(f,e,n,M),children:m(`span`,{class:`fjs-table-th-label`,children:[n,f!==null&&f.key===e?m(c,{children:f.direction===`asc`?m(Ac,{class:`fjs-table-sort-icon-asc`}):m(Oc,{class:`fjs-table-sort-icon-desc`})}):null]})},e)})})}),j.length===0?m(`tbody`,{class:`fjs-table-body`,children:m(`tr`,{class:`fjs-table-tr`,children:m(`td`,{class:`fjs-table-td`,colSpan:g.length,children:M(`Nothing to show.`)})})}):m(`tbody`,{class:`fjs-table-body`,children:j.map((e,t)=>m(`tr`,{class:`fjs-table-tr`,children:v.map(t=>m(`td`,{class:`fjs-table-td`,children:serializeCellData(e[t])},t))},t))})]})}),J(o)&&E.length>1&&g.length>0?m(`nav`,{class:`fjs-table-nav`,children:[m(`span`,{class:`fjs-table-nav-label`,children:M(`{page} of {total}`,{page:(D+1).toString(),total:E.length.toString()})}),m(`button`,{type:`button`,class:`fjs-table-nav-button`,onClick:()=>{A(e=>Math.max(e-1,0))},disabled:D===0,"aria-label":M(`Previous page`),children:m(Mc,{})}),m(`button`,{type:`button`,class:`fjs-table-nav-button`,onClick:()=>{A(e=>Math.min(e+1,E.length-1))},disabled:D>=E.length-1,"aria-label":M(`Next page`),children:m(Pc,{})})]}):null]})]})}Table.config={type:Fc,keyed:!1,name:`Table`,group:`presentation`,create:(e={})=>{let{id:t,columnsExpression:n,columns:r,rowCount:i,...a}=e;return B(t)&&J(i)&&(a.rowCount=i),K(n)?{...a,id:t,columnsExpression:n}:Array.isArray(r)&&r.every(isColumn)?{...a,id:t,columns:r}:{...a,label:`Table`,rowCount:10,columns:[{label:`ID`,key:`id`},{label:`Name`,key:`name`},{label:`Date`,key:`date`}]}},generateInitialDemoData:e=>{let t=[{id:1,name:`John Doe`,date:`31.01.2023`},{id:2,name:`Erika Muller`,date:`20.02.2023`},{id:3,name:`Dominic Leaf`,date:`11.03.2023`}],n=Object.keys(t[0]),{columns:r,id:i,dataSource:a}=e;if(Array.isArray(r)&&r.length!==0&&a===`=${i}`&&r.map(({key:e})=>e).every(e=>n.includes(e)))return t}};function useEvaluatedColumns(e,t){let n=useExpressionEvaluation(e||``);return Array.isArray(n)&&n.every(isColumn)?n:t}function isColumn(e){return M(e)&&K(e.label)&&K(e.key)}function chunk(e,t){return e.reduce((e,n,r)=>(r%t===0?e.push([n]):e[e.length-1].push(n),e),[])}function sortByColumn(e,t,n){return[...e].sort((e,r)=>!M(e)||!M(r)?0:n===`asc`?e[t]>r[t]?1:-1:e[t]<r[t]?1:-1)}function getHeaderAriaLabel(e,t,n,r){return e===null||e.key!==t?r(`Click to sort by {value} descending`,{value:n}):e.direction===`asc`?r(`Click to remove sorting`):r(`Click to sort by {value} ascending`,{value:n})}function serializeCellData(e){return typeof e==`object`&&e?JSON.stringify(e):e==null?``:`${e}`}var Ic=`files::`,Lc=`filepicker`,Rc=new te,zc=[];function FilePicker(e){let t=d(null),n=useService(`fileRegistry`,!1),{field:r,onChange:i,domId:a,errors:o=[],disabled:s,readonly:c,value:f=``}=e,{label:p,multiple:g=!1,accept:v=``,validate:x={}}=r,w=useSingleLineTemplateEvaluation(v,{debug:!0}),T=useBooleanExpressionEvaluation(g),E=`${a}-error-message`,D=n===null?zc:n.getFiles(f),A=useService(`translate`);b(()=>{f&&n!==null&&!n.hasKey(f)&&i({value:null})},[n,f,i,D.length]),b(()=>{let e=new DataTransfer;D.forEach(t=>e.items.add(t)),t.current.files=e.files},[D]);let onFileChange=e=>{let t=e.target;if((t.files===null||t.files.length===0)&&f!==``){n.deleteFiles(f),i({value:null});return}let r=Array.from(t.files),a=f||Rc.nextPrefixed(Ic);n.setFiles(a,r),i({value:a})},j=s||c||n===null;return m(`div`,{className:formFieldClasses(Lc,{errors:o,disabled:s,readonly:c}),children:[m(Label,{htmlFor:a,label:p,required:x.required}),m(`input`,{type:`file`,className:`fjs-hidden`,ref:t,id:a,name:a,disabled:j,multiple:T||void 0,accept:w||void 0,onChange:onFileChange,required:x.required}),m(`div`,{className:`fjs-filepicker-container`,children:[m(`button`,{type:`button`,disabled:j,className:`fjs-button fjs-filepicker-button`,onClick:()=>{t.current.click()},children:`Browse`}),m(`span`,{className:`fjs-form-field-label`,children:getSelectedFilesLabel(D,A)})]}),m(Errors,{id:E,errors:o})]})}FilePicker.config={type:`filepicker`,keyed:!0,label:`File picker`,group:`basic-input`,emptyValue:null,create:(e={})=>({...e})};function getSelectedFilesLabel(e,t){return e.length===0?t(`No files selected`):e.length===1?e[0].name:t(`{value} files selected`,{value:e.length.toString()})}var Bc;function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$4.apply(null,arguments)}var Vc=function SvgDownload(e){return r(`svg`,_extends$4({xmlns:`http://www.w3.org/2000/svg`,width:16,height:16},e),Bc||=r(`path`,{fill:`currentColor`,d:`M13 12v2H3v-2H2v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2zm0-5-.705-.705-3.795 3.79V1h-1v9.085l-3.795-3.79L3 7l5 5z`}),r(`path`,{d:`M0 0h16v16H0z`,style:{fill:`none`}}))},Hc=`documentPreview`;function DocumentPreview(e){let t=useService(`documentEndpointBuilder`,!1),{field:n,domId:r}=e,{dataSource:i,maxHeight:a,label:o}=n,s=`${r}-error-message`,c=useValidDocumentData(i||``),d=useSingleLineTemplateEvaluation(o,{debug:!0}),f=useService(`translate`);return m(`div`,{class:formFieldClasses(Hc),children:[m(Label,{htmlFor:r,label:d}),m(`div`,{class:`fjs-${Hc}-document-container`,id:r,children:c.map((e,n)=>{let i=tryCatch(()=>t?.buildUrl?.(e))??e.endpoint;return isValidDocumentEndpoint(i)?m(DocumentRenderer,{documentMetadata:e,documentEndpointBuilder:t,endpoint:i,maxHeight:a,domId:`${r}-${n}`},e.documentId):null})}),m(Errors,{id:s,errors:getErrors({dataSource:i},f)})]})}DocumentPreview.config={type:Hc,keyed:!1,group:`presentation`,name:`Document preview`,create:(e={})=>({label:`Document preview`,...e})};function getErrors(e,t){let{dataSource:n}=e,r=[];return(!K(n)||n.length<1)&&r.push(t(`Document reference is not defined.`)),r}function isValidDocumentEndpoint(e){return typeof e==`string`&&URL.canParse(e)}function isValidDocument(e){return typeof e==`object`&&!!e&&`documentId`in e&&`metadata`in e&&typeof e.metadata==`object`&&`fileName`in e.metadata}function useValidDocumentData(e){let t=useExpressionEvaluation(e);return Array.isArray(t)?t.filter(isValidDocument):[]}function PdfRenderer(e){let{url:t,onError:n,errorMessageId:r,requestInit:a}=e,[o,s]=i(null),[d,f]=i(!1),p=useService(`translate`);return b(()=>{let e=null,fetchPdf=async()=>{try{let r=await fetch(t,a);if(!r.ok){f(!0),n();return}let i=new Blob([await r.arrayBuffer()],{type:`application/pdf`});e=URL.createObjectURL(i),s(e)}catch{f(!0),n()}};return fetchPdf(),()=>{e&&URL.revokeObjectURL(e)}},[t,n,a]),m(c,{children:[o===null?null:m(`embed`,{src:o,type:`application/pdf`,class:`fjs-${Hc}-pdf-viewer`}),d?m(Errors,{id:r,errors:[p(`Unable to download document`)]}):null]})}function ImageRenderer(e){let{url:t,alt:n,onError:r,requestInit:a}=e,[o,s]=i(null);return b(()=>{let e=null,fetchImage=async()=>{try{let n=await fetch(t,a);if(!n.ok){r();return}let i=await n.blob();e=URL.createObjectURL(i),s(e)}catch{r()}};return fetchImage(),()=>{e&&URL.revokeObjectURL(e)}},[t,r,a]),o===null?null:m(`img`,{src:o,alt:n,class:`fjs-${Hc}-image`})}function DocumentRenderer(e){let{documentMetadata:t,documentEndpointBuilder:n,endpoint:r,maxHeight:o,domId:s}=e,{metadata:c}=t,[f,g]=i(!1),v=d(null),b=useInViewport(v),x=a(()=>g(!0),[]),w=p(()=>getDocumentRequestInit(n,t),[n,t]),T=useService(`translate`),E=`fjs-${Hc}-single-document-container`,D=`${s}-error-message`,A=T(`Unable to download document`),j=typeof c.contentType==`string`;return j&&c.contentType.toLowerCase().startsWith(`image/`)&&b?m(`div`,{class:E,style:{maxHeight:o},"aria-describedby":f?D:void 0,children:[m(ImageRenderer,{url:r,alt:c.fileName,requestInit:w,onError:x}),m(DownloadButton,{endpoint:r,fileName:c.fileName,requestInit:w,onDownloadError:x}),f?m(Errors,{id:D,errors:[A]}):null]}):j&&c.contentType.toLowerCase()===`application/pdf`&&b?m(`div`,{class:E,style:{maxHeight:o},"aria-describedby":f?D:void 0,children:m(PdfRenderer,{url:r,fileName:c.fileName,requestInit:w,onError:x,errorMessageId:D})}):m(`div`,{class:(0,X.default)(`fjs-${Hc}-non-preview-item`,`fjs-${Hc}-single-document-container`),ref:v,"aria-describedby":f?D:void 0,children:[m(`div`,{children:[m(`div`,{class:`fjs-document-preview-title`,children:c.fileName}),f?m(Errors,{id:D,errors:[A]}):null]}),m(DownloadButton,{endpoint:r,fileName:c.fileName,requestInit:w,onDownloadError:x})]})}function DownloadButton(e){let{endpoint:t,fileName:n,onDownloadError:r,requestInit:i}=e,a=useService(`translate`),handleDownload=async()=>{try{let e=await fetch(t,i);if(!e.ok){r();return}let a=await e.blob(),o=window.URL.createObjectURL(a),s=document.createElement(`a`);s.href=o,s.download=n,s.click(),window.URL.revokeObjectURL(o)}catch{r()}};return m(`button`,{type:`button`,onClick:handleDownload,class:(0,X.default)(`fjs-${Hc}-download-button`),"aria-label":a(`Download {fileName}`,{fileName:n}),children:m(Vc,{})})}function useInViewport(e){let[t,n]=i(!1);return b(()=>{let t=e.current;if(!t)return;let r=new IntersectionObserver(([e])=>{e.isIntersecting&&n(!0)},{threshold:0});return r.observe(t),()=>{t&&r.unobserve(t)}},[e]),t}function getDocumentRequestInit(e,t){let n=tryCatch(()=>e?.buildRequestInit?.(t));return typeof n==`object`&&n?n:void 0}var tryCatch=e=>{try{return e()}catch(e){return console.error(e),null}};function Logo(){return m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 14.02 5.57`,width:`53`,height:`21`,style:`vertical-align:middle`,children:[m(`path`,{fill:`currentColor`,d:`M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z`}),m(`path`,{fill:`currentColor`,d:`M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z`})]})}function Lightbox(e){let{open:t}=e;return t?m(`div`,{class:`fjs-powered-by-lightbox`,style:`z-index: 100; position: fixed; top: 0; left: 0;right: 0; bottom: 0`,children:[m(`div`,{class:`backdrop`,style:`width: 100%; height: 100%; background: rgba(40 40 40 / 20%)`,onClick:e.onBackdropClick}),m(`div`,{class:`notice`,style:`position: absolute; left: 50%; top: 40%; transform: translate(-50%); width: 260px; padding: 10px; background: white; box-shadow: 0 1px 4px rgba(0 0 0 / 30%); font-family: Helvetica, Arial, sans-serif; font-size: 14px; display: flex; line-height: 1.3`,children:[m(`a`,{href:`https://bpmn.io`,target:`_blank`,rel:`noopener noreferrer`,style:`margin: 15px 20px 15px 10px; align-self: center; color: #404040`,children:m(Logo,{})}),m(`span`,{children:[`Web-based tooling for BPMN, DMN, and forms powered by`,` `,m(`a`,{href:`https://bpmn.io`,target:`_blank`,rel:`noopener noreferrer`,children:`bpmn.io`}),`.`]})]})]}):null}function Link(e){return m(`div`,{class:`fjs-powered-by fjs-form-field`,style:`text-align: right`,children:m(`a`,{href:`https://bpmn.io`,target:`_blank`,rel:`noopener noreferrer`,class:`fjs-powered-by-link`,title:`Powered by bpmn.io`,style:`color: #404040`,onClick:e.onClick,children:m(Logo,{})})})}function PoweredBy(e){let[t,n]=i(!1);function toggleOpen(e){return t=>{t.preventDefault(),n(e)}}return m(c,{children:[v(m(Lightbox,{open:t,onBackdropClick:toggleOpen(!1)}),document.body),m(Link,{onClick:toggleOpen(!0)})]})}var noop=()=>{};function FormComponent(e){let{schema:t,properties:n}=useService(`form`)._getState(),{ariaLabel:r}=n,{onSubmit:i=noop,onReset:a=noop,onChange:o=noop}=e,handleSubmit=e=>{e.preventDefault(),i()},handleReset=e=>{e.preventDefault(),a()},s=useFilteredFormData(),c=p(()=>({data:s,parent:null,this:s,i:[]}),[s]);return m(`form`,{class:`fjs-form`,onSubmit:handleSubmit,onReset:handleReset,"aria-label":r,noValidate:!0,children:[m(Ro.Provider,{value:c,children:m(FormField,{field:t,onChange:o})}),m(PoweredBy,{})]})}var Uc=[Textfield,Textarea,Numberfield,Datetime,ExpressionField,FilePicker,Checkbox,Checklist,Radio,Select,Taglist,Text,Image,Table,Html,DocumentPreview,Spacer,Separator,Group,DynamicList,IFrame,Button,Default],FormFields=class{constructor(){this._formFields={},Uc.forEach(e=>{this.register(e.config.type,e)})}register(e,t){this._formFields[e]=t}get(e){return this._formFields[e]}},Wc=[`alt`,`appearance.prefixAdorner`,`appearance.suffixAdorner`,`conditional.hide`,`description`,`label`,`source`,`readonly`,`text`,`validate.min`,`validate.max`,`validate.minLength`,`validate.maxLength`,`valuesExpression`,`url`,`dataSource`,`columnsExpression`,`expression`,`multiple`,`accept`,`title`],Gc=[`alt`,`appearance.prefixAdorner`,`appearance.suffixAdorner`,`description`,`label`,`source`,`text`,`content`,`url`,`title`];function getSchemaVariables(e,t={}){let{formFields:n=new FormFields,expressionLanguage:r=new FeelExpressionLanguage(null),templating:i=new FeelersTemplating,inputs:a=!0,outputs:o=!0}=t;if(!e.components)return[];let getAllComponents=e=>{let t=[];return e.components&&e.components.forEach(e=>{t.push(e),t.push(...getAllComponents(e))}),t},s=getAllComponents(e).reduce((e,t)=>{let{valuesKey:n}=t;return a&&(n&&(e=[...e,n]),Wc.forEach(n=>{let i=P(t,n.split(`.`));if(i&&r.isExpression(i)){let t=r.getVariableNames(i,{type:`expression`});e=[...e,...t]}}),Gc.forEach(n=>{let a=P(t,n.split(`.`));if(a&&!r.isExpression(a)&&i.isTemplate(a)){let t=i.getVariableNames(a);e=[...e,...t]}})),e.filter(e=>typeof e==`string`)},[]),getBindingVariables=e=>{let t=[],r=n.get(e.type);return r&&r.config.keyed&&e.key?[e.key.split(`.`)[0]]:r&&r.config.pathed&&e.path?[e.path.split(`.`)[0]]:(e.components&&e.components.forEach(e=>{t.push(...getBindingVariables(e))}),t)};return(a||o)&&s.push(...getBindingVariables(e)),Array.from(new Set(s))}var getAncestryList=(e,t)=>{let n=[],r=t.get(e);for(;r;)n.push(r.id),r=t.get(r._parent);return n},ConditionChecker=class{constructor(e,t,n,r){this._formFieldRegistry=e,this._pathRegistry=t,this._expressionLanguage=n,this._eventBus=r}applyConditions(e,t={},n={}){let r=clone(e),{getFilterPath=(e,t)=>this._pathRegistry.getValuePath(e,{indexes:t})}=n,_applyConditionsWithinScope=(e,n,i=!1)=>{let{indexes:a={},expressionIndexes:o=[],scopeData:s=t,parentScopeData:c=null}=n;this._pathRegistry.executeRecursivelyOnFields(e,({field:e,isClosed:n,isRepeatable:d,context:f})=>{let{conditional:p,components:m,id:g}=e,v=buildExpressionContext({this:s,data:t,i:o,parent:c});if(f.isHidden=i||f.isHidden||p&&this._checkHideCondition(p,v),d&&!f.isHidden){f.preventRecursion=!0;let n=this._pathRegistry.getValuePath(e,{indexes:a}),r=P(t,n);if(!Array.isArray(r)||!r.length||!Array.isArray(m)||!m.length)return;for(let e=0;e<r.length;e++){let t={indexes:{...a,[g]:e},expressionIndexes:[...o,e+1],scopeData:r[e],parentScopeData:s};m.forEach(e=>{_applyConditionsWithinScope(e,t,f.isHidden)})}}f.isHidden&&d&&(f.preventRecursion=!0,this._eventBus.fire(`conditionChecker.remove`,{item:{[e.key]:P(r,getFilterPath(e,a))}}),this._cleanlyClearDataAtPath(getFilterPath(e,a),r)),f.isHidden&&n&&(this._eventBus.fire(`conditionChecker.remove`,{item:{[e.key]:P(r,getFilterPath(e,a))}}),this._cleanlyClearDataAtPath(getFilterPath(e,a),r))})},i=this._formFieldRegistry.getForm();if(!i)throw Error(`form field registry has no form`);return _applyConditionsWithinScope(i,{scopeData:t}),r}check(e,t={}){return this._expressionLanguage.evaluateUnaryTest(e,t)}_checkHideCondition(e,t){return e.hide?this.check(e.hide,t)===!0:!1}_cleanlyClearDataAtPath(e,t){let n=[...e],r=!1;do{x(t,n,void 0),n.pop();let e=P(t,n);r=!!n.length&&(this._isEmptyObject(e)||this._isEmptyArray(e))}while(r)}_isEmptyObject(e){return M(e)&&!E(e).length}_isEmptyArray(e){return Array.isArray(e)&&(!e.length||e.every(e=>e===void 0))}};ConditionChecker.$inject=[`formFieldRegistry`,`pathRegistry`,`expressionLanguage`,`eventBus`];var Kc={__init__:[`expressionLanguage`,`templating`,`conditionChecker`],expressionLanguage:[`type`,FeelExpressionLanguage],templating:[`type`,FeelersTemplating],conditionChecker:[`type`,ConditionChecker]},ExpressionLoopPreventer=class{constructor(e){this._computedExpressions=[],e.on(`field.updated`,({shouldNotRecompute:e})=>{e||this.reset()}),e.on(`import.done`,this.reset.bind(this)),e.on(`reset`,this.reset.bind(this))}registerExpressionExecution(e){return!this._computedExpressions.includes(e)&&(this._computedExpressions.push(e),!0)}reset(){this._computedExpressions=[]}};ExpressionLoopPreventer.$inject=[`eventBus`];var qc={__init__:[`expressionLoopPreventer`],expressionLoopPreventer:[`type`,ExpressionLoopPreventer]},MarkdownRenderer=class{render(e){return k.parse(e,{gfm:!0,breaks:!0})}};MarkdownRenderer.$inject=[];var Jc={__init__:[`markdownRenderer`],markdownRenderer:[`type`,MarkdownRenderer]};function CommandStack(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on([`diagram.destroy`,`diagram.clear`],function(){this.clear(!1)},this)}CommandStack.$inject=[`eventBus`,`injector`],CommandStack.prototype.execute=function(e,t){if(!e)throw Error(`command required`);this._currentExecution.trigger=`execute`;let n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction()},CommandStack.prototype.canExecute=function(e,t){let n={command:e,context:t},r=this._getHandler(e),i=this._fire(e,`canExecute`,n);if(i===void 0){if(!r)return!1;r.canExecute&&(i=r.canExecute(t))}return i},CommandStack.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,e!==!1&&this._fire(`changed`,{trigger:`clear`})},CommandStack.prototype.undo=function(){let e=this._getUndoAction(),t;if(e){for(this._currentExecution.trigger=`undo`,this._pushAction(e);e&&(this._internalUndo(e),t=this._getUndoAction(),t&&t.id===e.id);)e=t;this._popAction()}},CommandStack.prototype.redo=function(){let e=this._getRedoAction(),t;if(e){for(this._currentExecution.trigger=`redo`,this._pushAction(e);e&&(this._internalExecute(e,!0),t=this._getRedoAction(),t&&t.id===e.id);)e=t;this._popAction()}},CommandStack.prototype.register=function(e,t){this._setHandler(e,t)},CommandStack.prototype.registerHandler=function(e,t){if(!e||!t)throw Error(`command and handlerCls must be defined`);let n=this._injector.instantiate(t);this.register(e,n)},CommandStack.prototype.canUndo=function(){return!!this._getUndoAction()},CommandStack.prototype.canRedo=function(){return!!this._getRedoAction()},CommandStack.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},CommandStack.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},CommandStack.prototype._internalUndo=function(e){let t=e.command,n=e.context,r=this._getHandler(t);this._atomicDo(()=>{this._fire(t,`revert`,e),r.revert&&this._markDirty(r.revert(n)),this._revertedAction(e),this._fire(t,`reverted`,e)})},CommandStack.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);let r=t?[e+`.`+t,t]:[e],i;n=this._eventBus.createEvent(n);for(let e of r)if(i=this._eventBus.fire(`commandStack.`+e,n),n.cancelBubble)break;return i},CommandStack.prototype._createId=function(){return this._uid++},CommandStack.prototype._atomicDo=function(e){let t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},CommandStack.prototype._internalExecute=function(e,t){let n=e.command,r=e.context,i=this._getHandler(n);if(!i)throw Error(`no command handler registered for <`+n+`>`);this._pushAction(e),t||(this._fire(n,`preExecute`,e),i.preExecute&&i.preExecute(r),this._fire(n,`preExecuted`,e)),this._atomicDo(()=>{this._fire(n,`execute`,e),i.execute&&this._markDirty(i.execute(r)),this._executedAction(e,t),this._fire(n,`executed`,e)}),t||(this._fire(n,`postExecute`,e),i.postExecute&&i.postExecute(r),this._fire(n,`postExecuted`,e)),this._popAction()},CommandStack.prototype._pushAction=function(e){let t=this._currentExecution,n=t.actions,r=n[0];if(t.atomic)throw Error(`illegal invocation in <execute> or <revert> phase (action: `+e.command+`)`);e.id||=r&&r.id||this._createId(),n.push(e)},CommandStack.prototype._popAction=function(){let e=this._currentExecution,t=e.trigger,n=e.actions,r=e.dirty;n.pop(),n.length||(this._eventBus.fire(`elements.changed`,{elements:T(`id`,r.reverse())}),r.length=0,this._fire(`changed`,{trigger:t}),e.trigger=null)},CommandStack.prototype._markDirty=function(e){let t=this._currentExecution;e&&(e=V(e)?e:[e],t.dirty=t.dirty.concat(e))},CommandStack.prototype._executedAction=function(e,t){let n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},CommandStack.prototype._revertedAction=function(e){this._stackIdx--},CommandStack.prototype._getHandler=function(e){return this._handlerMap[e]},CommandStack.prototype._setHandler=function(e,t){if(!e||!t)throw Error(`command and handler required`);if(this._handlerMap[e])throw Error(`overriding handler for command <`+e+`>`);this._handlerMap[e]=t};var Yc={commandStack:[`type`,CommandStack]},UpdateFieldValidationHandler=class{constructor(e,t){this._form=e,this._validator=t}execute(e){let{field:t,value:n,indexes:r}=e,{errors:i}=this._form._getState();e.oldErrors=clone(i);let a=this._validator.validateField(t,n),o=x(i,[t.id,...Object.values(r||{})],a.length?a:void 0);this._form._setState({errors:o})}revert(e){this._form._setState({errors:e.oldErrors})}};UpdateFieldValidationHandler.$inject=[`form`,`validator`];var UpdateFieldInstanceValidationHandler=class{constructor(e,t){this._form=e,this._validator=t}execute(e){let{fieldInstance:t,value:n}=e,{id:r,indexes:i}=t,{errors:a}=this._form._getState();e.oldErrors=clone(a);let o=this._validator.validateFieldInstance(t,n),s=[r,...Object.values(i||{})],c;o.length?(x(a,s,o),c=a):c=pruneAt(a,s),this._form._setState({errors:c})}revert(e){this._form._setState({errors:e.oldErrors})}};UpdateFieldInstanceValidationHandler.$inject=[`form`,`validator`];var ViewerCommands=class{constructor(e,t){this._commandStack=e,t.on(`form.init`,()=>{this.registerHandlers()})}registerHandlers(){Object.entries(this.getHandlers()).forEach(([e,t])=>{this._commandStack.registerHandler(e,t)})}getHandlers(){return{"formField.validation.update":UpdateFieldValidationHandler,"formFieldInstance.validation.update":UpdateFieldInstanceValidationHandler}}updateFieldValidation(e,t,n){let r={field:e,value:t,indexes:n};this._commandStack.execute(`formField.validation.update`,r)}updateFieldInstanceValidation(e,t){let n={fieldInstance:e,value:t};this._commandStack.execute(`formFieldInstance.validation.update`,n)}};ViewerCommands.$inject=[`commandStack`,`eventBus`];var Xc={__depends__:[Yc],__init__:[`viewerCommands`],viewerCommands:[`type`,ViewerCommands]},Zc;function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$3.apply(null,arguments)}var Qc=function SvgExpand(e){return r(`svg`,_extends$3({xmlns:`http://www.w3.org/2000/svg`,width:16,height:16,fill:`none`},e),Zc||=r(`path`,{fill:`currentColor`,d:`M2 9h5.5v3.086l-1.293-1.293-.707.707L8 14l2.5-2.5-.707-.707L8.5 12.086V9H14V8H2zm11-7H3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1m0 3H3V3h10z`}))},$c;function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$2.apply(null,arguments)}var el=function SvgCollapse(e){return r(`svg`,_extends$2({xmlns:`http://www.w3.org/2000/svg`,width:16,height:16,fill:`none`},e),$c||=r(`path`,{fill:`currentColor`,d:`M13 10H3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1m0 3H3v-2h10zM8.5 3.914l1.293 1.293.707-.707L8 2 5.5 4.5l.707.707L7.5 3.914V7H2v1h12V7H8.5z`}))},tl,nl;function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$1.apply(null,arguments)}var rl=function SvgAdd(e){return r(`svg`,_extends$1({xmlns:`http://www.w3.org/2000/svg`,width:16,height:16,fill:`none`},e),tl||=r(`path`,{fill:`currentColor`,d:`M8 2c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6 2.7-6 6-6m0-1C4.15 1 1 4.15 1 8s3.15 7 7 7 7-3.15 7-7-3.15-7-7-7`}),nl||=r(`path`,{fill:`currentColor`,d:`M12 7.5H8.5V4h-1v3.5H4v1h3.5V12h1V8.5H12z`}))},il;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(null,arguments)}var al=function SvgDelete(e){return r(`svg`,_extends({xmlns:`http://www.w3.org/2000/svg`,width:16,height:16,fill:`none`},e),il||=r(`path`,{fill:`currentColor`,d:`m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z`}))},RepeatRenderManager=class{constructor(e,t,n,r,i){this._form=e,this._formFields=t,this._formFieldRegistry=n,this._pathRegistry=r,this._eventBus=i,this.Repeater=this.Repeater.bind(this),this.RepeatFooter=this.RepeatFooter.bind(this)}isFieldRepeating(e){if(!e)return!1;let t=this._formFieldRegistry.get(e);return this._formFields.get(t.type).config.repeatable&&t.isRepeating}Repeater(e){let{RowsRenderer:t,indexes:n,useSharedState:r,...i}=e,[a]=r,{data:s}=this._form._getState(),d=e.field,f=this._pathRegistry.getValuePath(d,{indexes:n}),p=P(s,f)||[],g=this._getNonCollapsedItems(d),v=!d.disableCollapse&&p.length>g&&a.isCollapsed,b=d.components&&d.components.length>0,x=d.allowAddRemove&&b,onDeleteItem=t=>{let r=p.slice(),i=r.splice(t,1)[0];this._eventBus.fire(`repeatRenderManager.remove`,{dataPath:f,index:t,item:i}),e.onChange({field:d,value:r,indexes:n})},w=o(Ro);return m(c,{children:p.map((e,r)=>m(`div`,{class:(0,X.default)({"fjs-repeat-row-collapsed":v?r>=g:!1}),children:m(RepetitionScaffold,{itemIndex:r,itemValue:e,parentExpressionContextInfo:w,repeaterField:d,RowsRenderer:t,indexes:n,onDeleteItem,showRemove:x,...i})},r))})}RepeatFooter(e){let t=d(null),{useSharedState:n,indexes:r,field:i,readonly:a,disabled:o}=e,[s,f]=n,{data:p}=this._form._getState(),g=useService(`translate`),v=this._pathRegistry.getValuePath(i,{indexes:r}),b=P(p,v)||[],x=this._getNonCollapsedItems(i),w=!i.disableCollapse&&b.length>x,T=w&&s.isCollapsed,E=i.components&&i.components.length>0,D=i.allowAddRemove&&E,toggle=()=>{f(e=>({...e,isCollapsed:!T}))},A=d(!1),onAddItem=()=>{let t=b.slice(),n=this._form._getInitializedFieldData(this._form._getState().data,{container:i,indexes:{...r,[i.id]:t.length}});t.push(n),A.current=!0,this._eventBus.fire(`repeatRenderManager.add`,{dataPath:v,index:t.length-1,item:n}),e.onChange({value:t}),f(e=>({...e,isCollapsed:!1}))};return useScrollIntoView(t,[b.length],{align:`bottom`,behavior:`auto`,offset:20},[A]),m(`div`,{className:(0,X.default)(`fjs-repeat-render-footer`,{"fjs-remove-allowed":i.allowAddRemove}),children:[D?m(`button`,{type:`button`,disabled:o||a,class:`fjs-repeat-render-add`,ref:t,onClick:onAddItem,children:m(c,{children:[m(rl,{}),` `,g(`Add new`)]})}):null,w?m(`button`,{type:`button`,class:`fjs-repeat-render-collapse`,onClick:toggle,children:T?m(c,{children:[m(Qc,{}),` `,g(`Expand all ({value})`,{value:b.length-1})]}):m(c,{children:[m(el,{}),` `,g(`Collapse`)]})}):null]})}_getNonCollapsedItems(e){let{nonCollapsedItems:t}=e;return t||5}},RepetitionScaffold=e=>{let{itemIndex:t,itemValue:n,parentExpressionContextInfo:r,repeaterField:i,RowsRenderer:a,indexes:o,onDeleteItem:s,showRemove:c,...d}=e,f=useService(`translate`),g=p(()=>({...d,indexes:{...o||{},[i.id]:t}}),[t,o,i.id,d]),v=p(()=>({data:r.data,this:n,parent:buildExpressionContext({...r,data:r.this}),i:[...r.i,t+1]}),[t,r,n]);return c?m(`div`,{class:`fjs-repeat-row-container`,children:[m(`div`,{class:`fjs-repeat-row-rows`,children:m(Ro.Provider,{value:v,children:m(a,{...g})})}),m(`button`,{type:`button`,class:`fjs-repeat-row-remove`,"aria-label":f(`Remove list item {index}`,{index:t+1}),onClick:()=>s(t),children:m(`div`,{class:`fjs-repeat-row-remove-icon-container`,children:m(al,{})})})]}):m(Ro.Provider,{value:v,children:m(a,{...g})})};RepeatRenderManager.$inject=[`form`,`formFields`,`formFieldRegistry`,`pathRegistry`,`eventBus`];var ol={__init__:[`repeatRenderManager`],repeatRenderManager:[`type`,RepeatRenderManager]},sl=`__fn`,cl=1e3,ll=Array.prototype.slice;function EventBus(){this._listeners={},this.on(`diagram.destroy`,1,this._destroy,this)}EventBus.prototype.on=function(e,t,n,r){if(e=V(e)?e:[e],j(t)&&(r=n,n=t,t=cl),!J(t))throw Error(`priority must be a number`);var i=n;r&&(i=ee(n,r),i[sl]=n[sl]||n);var a=this;e.forEach(function(e){a._addListener(e,{priority:t,callback:i,next:null})})},EventBus.prototype.once=function(e,t,n,r){var i=this;if(j(t)&&(r=n,n=t,t=cl),!J(t))throw Error(`priority must be a number`);function wrappedCallback(){wrappedCallback.__isTomb=!0;var t=n.apply(r,arguments);return i.off(e,wrappedCallback),t}wrappedCallback[sl]=n,this.on(e,t,wrappedCallback)},EventBus.prototype.off=function(e,t){e=V(e)?e:[e];var n=this;e.forEach(function(e){n._removeListener(e,t)})},EventBus.prototype.createEvent=function(e){var t=new InternalEvent;return t.init(e),t},EventBus.prototype.fire=function(e,t){var n,r,i,a=ll.call(arguments);if(typeof e==`object`&&(t=e,e=t.type),!e)throw Error(`no event type specified`);if(r=this._listeners[e],r){n=t instanceof InternalEvent?t:this.createEvent(t),a[0]=n;var o=n.type;e!==o&&(n.type=e);try{i=this._invokeListeners(n,a,r)}finally{e!==o&&(n.type=o)}return i===void 0&&n.defaultPrevented&&(i=!1),i}},EventBus.prototype.handleError=function(e){return this.fire(`error`,{error:e})===!1},EventBus.prototype._destroy=function(){this._listeners={}},EventBus.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},EventBus.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=invokeFunction(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error(`unhandled error in event listener`,e),e}return r},EventBus.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n)this._setListeners(e,t);else{for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t}},EventBus.prototype._getListeners=function(e){return this._listeners[e]},EventBus.prototype._setListeners=function(e,t){this._listeners[e]=t},EventBus.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,a;if(!t)this._setListeners(e,null);else for(;n;)r=n.next,a=n.callback,(a===t||a[sl]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function InternalEvent(){}InternalEvent.prototype.stopPropagation=function(){this.cancelBubble=!0},InternalEvent.prototype.preventDefault=function(){this.defaultPrevented=!0},InternalEvent.prototype.init=function(e){U(this,e||{})};function invokeFunction(e,t){return e.apply(null,t)}var ul=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,dl=/(\+|00)(297|93|244|1264|358|355|376|971|54|374|1684|1268|61|43|994|257|32|229|226|880|359|973|1242|387|590|375|501|1441|591|55|1246|673|975|267|236|1|61|41|56|86|225|237|243|242|682|57|269|238|506|53|5999|61|1345|357|420|49|253|1767|45|1809|1829|1849|213|593|20|291|212|34|372|251|358|679|500|33|298|691|241|44|995|44|233|350|224|590|220|245|240|30|1473|299|502|594|1671|592|852|504|385|509|36|62|44|91|246|353|98|964|354|972|39|1876|44|962|81|76|77|254|996|855|686|1869|82|383|965|856|961|231|218|1758|423|94|266|370|352|371|853|590|212|377|373|261|960|52|692|389|223|356|95|382|976|1670|258|222|1664|596|230|265|60|262|264|687|227|672|234|505|683|31|47|977|674|64|968|92|507|64|51|63|680|675|48|1787|1939|850|351|595|970|689|974|262|40|7|250|966|249|221|65|500|4779|677|232|503|378|252|508|381|211|239|597|421|386|46|268|1721|248|963|1649|235|228|66|992|690|993|670|676|1868|216|90|688|886|255|256|380|598|1|998|3906698|379|1784|58|1284|1340|84|678|681|685|967|27|260|263)(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\d{4,20}$/,fl=[`min`,`max`,`minLength`,`maxLength`],Validator=class{constructor(e,t,n,r,i){this._expressionLanguage=e,this._conditionChecker=t,this._form=n,this._formFieldRegistry=r,this._translate=i}validateField(e,t){let{type:n,validate:r}=e,i=[];if(n===`number`&&(i=[...i,...runNumberValidation(e,t,this._translate)]),!r)return i;let a=oldEvaluateFEELValues(r,this._expressionLanguage,this._conditionChecker,this._form);return i=[...i,...runPresetValidation(e,a,t,this._translate)],i}validateFieldInstance(e,t){let{id:n,expressionContextInfo:r}=e,i=this._formFieldRegistry.get(n);if(!i)return[];let{type:a,validate:o}=i,s=[];if(a===`number`&&(s=[...s,...runNumberValidation(i,t,this._translate)]),!o)return s;let c=evaluateFEELValues(o,this._expressionLanguage,r);return s=[...s,...runPresetValidation(i,c,t,this._translate)],s}};Validator.$inject=[`expressionLanguage`,`conditionChecker`,`form`,`formFieldRegistry`,`translate`];function runNumberValidation(e,t,n){let{decimalDigits:r,increment:i}=e,a=[];if(t===`NaN`)a.push(n(`Value is not a number.`));else if(t&&(r>=0&&countDecimals(t)>r&&(r===0?a.push(n(`Value is expected to be an integer.`)):r===1?a.push(n(`Value is expected to have at most 1 decimal digit.`)):a.push(n(`Value is expected to have at most {value} decimal digits.`,{value:r.toString()}))),i)){let e=Pe(t),r=Pe(i),o=e.mod(r);if(o.cmp(0)!==0){let t=e.minus(o),i=t.plus(r);a.push(n(`Please select a valid value, the two nearest valid values are {previousValue} and {nextValue}.`,{previousValue:t,nextValue:i}))}}return a}function runPresetValidation(e,t,n,r){let i=[];if(t.pattern&&n&&!new RegExp(t.pattern).test(n)&&i.push(t.patternErrorMessage||r(`Field must match pattern {value}.`,{value:t.pattern})),t.required){let t=e.type===`checkbox`&&n===!1,a=G(n)||n===``,o=Array.isArray(n)&&n.length===0;(t||a||o)&&i.push(r(`Field is required.`))}if(`min`in t&&(n||n===0))try{Pe(n).lt(Pe(t.min))&&i.push(r(`Field must have minimum value of {value}.`,{value:t.min.toString()}))}catch{i.push(r(`Min validation value is not a valid number.`))}if(`max`in t&&(n||n===0))try{Pe(n).gt(Pe(t.max))&&i.push(r(`Field must have maximum value of {value}.`,{value:t.max.toString()}))}catch{i.push(r(`Max validation value is not a valid number.`))}return`minLength`in t&&n&&n.trim().length<t.minLength&&i.push(r(`Field must have minimum length of {value}.`,{value:t.minLength.toString()})),`maxLength`in t&&n&&n.trim().length>t.maxLength&&i.push(r(`Field must have maximum length of {value}.`,{value:t.maxLength.toString()})),`validationType`in t&&n&&t.validationType===`phone`&&!dl.test(n)&&i.push(r(`Field must be a valid international phone number. (e.g. +4930664040900)`)),`validationType`in t&&n&&t.validationType===`email`&&!ul.test(n)&&i.push(r(`Field must be a valid email.`)),i}function evaluateFEELValues(e,t,n){let r={...e};return fl.forEach(e=>{let i=e.split(`.`),a=runExpressionEvaluation(t,P(r,i),n);x(r,i,a===null?void 0:a)}),r}function oldEvaluateFEELValues(e,t,n,r){let i={...e};return fl.forEach(e=>{let a=e.split(`.`),o=P(i,a);if(!t||!t.isExpression(o))return o;let{initialData:s,data:c}=r._getState(),d=n?n.applyConditions(c,c):c,f={...s,...d},p=t.evaluate(o,f);p&&x(i,a,p)}),i}var Importer=class{constructor(e,t,n,r){this._formFieldRegistry=e,this._pathRegistry=t,this._fieldFactory=n,this._formLayouter=r}importSchema(e){let t=[];try{this._cleanup();let n=this.importFormField(clone(e));return this._formLayouter.calculateLayout(clone(n)),{schema:n,warnings:t}}catch(e){throw this._cleanup(),e.warnings=t,e}}_cleanup(){this._formLayouter.clear(),this._formFieldRegistry.clear(),this._pathRegistry.clear()}importFormField(e,t,n){let{components:r}=e,i,a;t&&(i=this._formFieldRegistry.get(t)),a=i?[...i._path,`components`,n]:[];let o=this._fieldFactory.create({...e,_path:a,_parent:t},!1);return this._formFieldRegistry.add(o),r&&(o.components=this.importFormFields(r,o.id)),o}importFormFields(e,t){return e.map((e,n)=>this.importFormField(e,t,n))}};Importer.$inject=[`formFieldRegistry`,`pathRegistry`,`fieldFactory`,`formLayouter`];var FieldFactory=class{constructor(e,t,n,r){this._formFieldRegistry=e,this._pathRegistry=t,this._formFields=n,this._translate=r}create(e,t=!0){let{id:n,type:r,key:i,path:a,_parent:o}=e,s=this._formFields.get(r);if(!s)throw Error(`form field of type <${r}> not supported`);let{config:c}=s;if(!c)throw Error(`form field of type <${r}> has no config`);if(n&&this._formFieldRegistry._ids.assigned(n))throw Error(`form field with id <${n}> already exists`);let d=o&&this._formFieldRegistry.get(o),f=d&&this._pathRegistry.getValuePath(d)||[],p=getAncestryList(o,this._formFieldRegistry);if(c.keyed&&i&&!this._pathRegistry.canClaimPath([...f,...i.split(`.`)],{isClosed:!0,knownAncestorIds:p}))throw Error(this._translate(`binding path '{value}' is already claimed`,{value:[...f,i].join(`.`)}));if(c.pathed&&a&&!this._pathRegistry.canClaimPath([...f,...a.split(`.`)],{isRepeatable:c.repeatable,knownAncestorIds:p}))throw Error(this._translate(`binding path '{value}' is already claimed`,{value:[...f,...a.split(`.`)].join(`.`)}));let m=c.create({...c.label?{label:c.label}:{},...e},t);return this._ensureId(m),c.keyed&&(this._ensureKey(m),this._pathRegistry.claimPath(this._pathRegistry.getValuePath(m),{isClosed:!0,claimerId:m.id,knownAncestorIds:getAncestryList(o,this._formFieldRegistry)})),c.pathed&&(c.repeatable&&this._enforceDefaultPath(m),this._pathRegistry.claimPath(this._pathRegistry.getValuePath(m),{isRepeatable:c.repeatable,claimerId:m.id,knownAncestorIds:getAncestryList(o,this._formFieldRegistry)})),m}_ensureId(e){if(e.id){this._formFieldRegistry._ids.claim(e.id,e);return}let t=`Field`;e.type==="default"&&(t=`Form`),e.id=this._formFieldRegistry._ids.nextPrefixed(`${t}_`,e)}_ensureKey(e){e.key||=this._getUniqueKeyPath(e)}_enforceDefaultPath(e){e.path||=this._getUniqueKeyPath(e)}_getUniqueKeyPath(e){let t,n=this._formFieldRegistry.get(e._parent);do t=Math.random().toString(36).substring(7);while(n&&n.components.some(e=>e.key===t));return`${e.type}_${t}`}};FieldFactory.$inject=[`formFieldRegistry`,`pathRegistry`,`formFields`,`translate`];var PathRegistry=class{constructor(e,t,n){this._formFieldRegistry=e,this._formFields=t,this._injector=n,this._dataPaths=[]}canClaimPath(e,t={}){let{isClosed:n=!1,isRepeatable:r=!1,skipAncestryCheck:i=!1,claimerId:a=null,knownAncestorIds:o=[]}=t,s={children:this._dataPaths};for(let t of e){if(s=_getNextSegment(s,t),!s)return!0;if(s.isRepeatable&&!i){if(!(a||o.length))throw Error(`cannot claim a path that contains a repeater without specifying a claimerId or knownAncestorIds`);if(!(o.includes(s.repeaterId)||a&&getAncestryList(a,this._formFieldRegistry).includes(s.repeaterId)))return!1}if(s.children===null)return!1}return!(n||r)}claimPath(e,t={}){let{isClosed:n=!1,isRepeatable:r=!1,claimerId:i=null,knownAncestorIds:a=[]}=t;if(!this.canClaimPath(e,{isClosed:n,isRepeatable:r,claimerId:i,knownAncestorIds:a}))throw Error(`cannot claim path '${e.join(`.`)}'`);let o={children:this._dataPaths};for(let t of e){let e=_getNextSegment(o,t);e?e.claimCount++:(e={segment:t,claimCount:1,children:[]},o.children.push(e)),o=e}n&&(o.children=null),r&&(o.isRepeatable=!0,o.repeaterId=i)}unclaimPath(e){let t={children:this._dataPaths};for(let n of e){let r=_getNextSegment(t,n);if(!r)throw Error(`no open path found for '${e.join(`.`)}'`);t=r}t={children:this._dataPaths};for(let n of e){let e=_getNextSegment(t,n);if(e.claimCount--,e.claimCount===0){t.children.splice(t.children.indexOf(e),1);break}t=e}}executeRecursivelyOnFields(e,t,n={}){let r=!0,i=this._formFields.get(e.type).config;if(i.keyed){let i=t({field:e,isClosed:!0,isRepeatable:!1,context:n});return r&&i}if(i.pathed){let a=t({field:e,isClosed:!1,isRepeatable:i.repeatable,context:n});r&&=a}if(r===!1||n.preventRecursion)return r;if(Array.isArray(e.components))for(let i of e.components){let e=this.executeRecursivelyOnFields(i,t,clone(n));if(r&&=e,r===!1)return r}return r}getValuePath(e,t={}){let{replacements:n={},indexes:r=null,cutoffNode:i=null}=t,a=[],o=Object.prototype.hasOwnProperty.call(n,e.id),s=this._formFields.get(e.type).config;if(o){let t=n[e.id];if(t==null||t===``)a=[];else if(typeof t==`string`)a=t.split(`.`);else if(Array.isArray(t))a=t;else throw Error(`replacements for field ${e.id} must be a string, array or null/undefined`)}else s.keyed?a=e.key.split(`.`):s.pathed&&e.path&&(a=e.path.split(`.`));if(r&&(a=this._addIndexes(a,e,r)),e._parent&&e._parent!==i){let n=this._formFieldRegistry.get(e._parent);return[...this.getValuePath(n,t)||[],...a]}return a}clear(){this._dataPaths=[]}_addIndexes(e,t,n){let r=this._injector.get(`repeatRenderManager`,!1);return r&&r.isFieldRepeating(t._parent)?[n[t._parent],...e]:e}},_getNextSegment=(e,t)=>V(e.children)&&e.children.find(e=>e.segment===t)||null;PathRegistry.$inject=[`formFieldRegistry`,`formFields`,`injector`];var FormLayouter=class{constructor(e){this._rows=[],this._ids=new te([32,36,1]),this._eventBus=e}addRow(e,t){let n=this._rows.find(t=>t.formFieldId===e);n||(n={formFieldId:e,rows:[]},this._rows.push(n)),n.rows.push(t)}getRow(e){return allRows(this._rows).find(t=>t.id===e)}getRowForField(e){return allRows(this._rows).find(t=>{let{components:n}=t;return n.includes(e.id)})}getRows(e){let t=this._rows.find(t=>e===t.formFieldId);return t?t.rows:[]}nextRowId(){return this._ids.nextPrefixed(`Row_`)}calculateLayout(e){let{type:t,components:n}=e;if(![`default`,`group`,`dynamiclist`].includes(t)||!n)return;let r=groupByRow(n,this._ids);Object.entries(r).forEach(([t,n])=>{this.addRow(e.id,{id:t,components:n.map(e=>e.id)})}),n.forEach(e=>this.calculateLayout(e)),this._eventBus.fire(`form.layoutCalculated`,{rows:this._rows})}clear(){this._rows=[],this._ids.clear(),this._eventBus.fire(`form.layoutCleared`)}};FormLayouter.$inject=[`eventBus`];function groupByRow(e,t){return R(e,e=>{let{layout:n}=e;return!n||!n.row?t.nextPrefixed(`Row_`):n.row})}function allRows(e){return e.map(e=>e.rows).flat()}var FormFieldRegistry=class{constructor(e){this._eventBus=e,this._formFields={},e.on(`form.clear`,()=>this.clear()),this._ids=new te([32,36,1])}add(e){let{id:t}=e;if(this._formFields[t])throw Error(`form field with ID ${t} already exists`);this._eventBus.fire(`formField.add`,{formField:e}),this._formFields[t]=e}remove(e){let{id:t}=e;this._formFields[t]&&(this._eventBus.fire(`formField.remove`,{formField:e}),delete this._formFields[t])}get(e){return this._formFields[e]}getAll(){return Object.values(this._formFields)}getForm(){return this.getAll().find(e=>e.type==="default")}forEach(e){this.getAll().forEach(t=>e(t))}clear(){this._formFields={},this._ids.clear()}};FormFieldRegistry.$inject=[`eventBus`];var FormFieldInstanceRegistry=class{constructor(e,t,n){this._eventBus=e,this._formFieldRegistry=t,this._formFields=n,this._formFieldInstances={},e.on(`form.clear`,()=>this.clear())}syncInstance(e,t){let{hidden:n,...r}=t,i=!n,a=this._formFieldInstances[e];return i&&!a?(this._formFieldInstances[e]={instanceId:e,...r},this._eventBus.fire(`formFieldInstance.added`,{instanceId:e})):!i&&a?(delete this._formFieldInstances[e],this._eventBus.fire(`formFieldInstance.removed`,{instanceId:e})):i&&a&&Object.keys(r).some(t=>this._formFieldInstances[e][t]!==r[t])&&(this._formFieldInstances[e]={instanceId:e,...r},this._eventBus.fire(`formFieldInstance.changed`,{instanceId:e})),e}cleanupInstance(e){this._formFieldInstances[e]&&(delete this._formFieldInstances[e],this._eventBus.fire(`formFieldInstance.removed`,{instanceId:e}))}get(e){return this._formFieldInstances[e]}getAll(){return Object.values(this._formFieldInstances)}getAllKeyed(){return this.getAll().filter(({id:e})=>{let t=this._formFieldRegistry.get(e);if(!t)return!1;let{type:n}=t,{config:r}=this._formFields.get(n);return r.keyed})}clear(){this._formFieldInstances={}}};FormFieldInstanceRegistry.$inject=[`eventBus`,`formFieldRegistry`,`formFields`];function Renderer(e,t,n,r){let App=()=>{let[e,o]=i(n._getState()),s={getService(e,t=!0){return r.get(e,t)},formId:n._id};t.on(`changed`,e=>{o(e)});let c=a(e=>n._update(e),[]),{properties:d}=e,{readOnly:f}=d,p=a(()=>{f||n.submit()},[f]),g=a(()=>n.reset(),[]),{schema:v}=e;return v?m(zo.Provider,{value:s,children:m(FormComponent,{onChange:c,onSubmit:p,onReset:g})}):null},{container:o}=e;t.on(`form.init`,()=>{f(m(App,{}),o)}),t.on(`form.destroy`,()=>{f(null,o)})}Renderer.$inject=[`config.renderer`,`eventBus`,`form`,`injector`];var extractFileReferencesFromRemovedData=e=>{let t=[];return e===null||Object.values(e).forEach(e=>{e!==null&&(typeof e==`object`?t.push(...extractFileReferencesFromRemovedData(e)):Array.isArray(e)?t.push(...e.map(extractFileReferencesFromRemovedData).flat()):typeof e==`string`&&e.startsWith(Ic)&&t.push(e))}),t},pl=Symbol(`fileRegistry`),ml=Symbol(`eventBus`),hl=Symbol(`formFieldRegistry`),gl=Symbol(`formFieldInstanceRegistry`),_l=[],FileRegistry=class{constructor(e,t,n){this[pl]=new Map,this[ml]=e,this[hl]=t,this[gl]=n;let removeFileHandler=({item:e})=>{extractFileReferencesFromRemovedData(e).forEach(e=>{this.deleteFiles(e)})};e.on(`form.clear`,()=>this.clear()),e.on(`conditionChecker.remove`,removeFileHandler),e.on(`repeatRenderManager.remove`,removeFileHandler)}setFiles(e,t){this[pl].set(e,t)}getFiles(e){return this[pl].get(e)||_l}getKeys(){return Array.from(this[pl].keys())}hasKey(e){return this[pl].has(e)}deleteFiles(e){this[pl].delete(e)}getAllFiles(){return new Map(this[pl])}clear(){this[pl].clear()}};FileRegistry.$inject=[`eventBus`,`formFieldRegistry`,`formFieldInstanceRegistry`];var vl={__depends__:[{__init__:[`formFields`,`renderer`],formFields:[`type`,FormFields],renderer:[`type`,Renderer],fileRegistry:[`type`,FileRegistry]}],eventBus:[`type`,EventBus],importer:[`type`,Importer],fieldFactory:[`type`,FieldFactory],formFieldRegistry:[`type`,FormFieldRegistry],formFieldInstanceRegistry:[`type`,FormFieldInstanceRegistry],pathRegistry:[`type`,PathRegistry],formLayouter:[`type`,FormLayouter],validator:[`type`,Validator]},yl=new te([32,36,1]),Form=class{constructor(e={}){this.on=this._onEvent,this._id=yl.next(),this._container=createFormContainer();let{container:t,injector:n=this._createInjector(e,this._container),properties:r={}}=e;this._state={initialData:null,data:null,properties:r,errors:{},schema:null},this.get=n.get,this.invoke=n.invoke,this.get(`eventBus`).fire(`form.init`),t&&this.attachTo(t)}clear(){this._emit(`diagram.clear`),this._emit(`form.clear`)}destroy(){this.get(`eventBus`).fire(`form.destroy`),this.get(`eventBus`).fire(`diagram.destroy`),this._detach(!1)}importSchema(e,t={}){return new Promise((n,r)=>{try{this.clear();let{schema:r,warnings:i}=this.get(`importer`).importSchema(e),a=this._getInitializedFieldData(clone(t));return this._setState({data:a,errors:{},schema:r,initialData:clone(a)}),this._emit(`import.done`,{warnings:i}),n({warnings:i})}catch(e){return this._emit(`import.done`,{error:e,warnings:e.warnings||[]}),r(e)}})}submit(){let{properties:e}=this._getState();if(e.readOnly||e.disabled)throw Error(`form is read-only`);this._emit(`presubmit`);let t={data:this._getSubmitData(),errors:this.validate(),files:this.get(`fileRegistry`).getAllFiles()};return this._emit(`submit`,t),t}reset(){this._emit(`reset`),this._setState({data:clone(this._state.initialData),errors:{}})}validate(){let e=this.get(`formFieldRegistry`),t=this.get(`formFieldInstanceRegistry`),n=this.get(`validator`),{data:r}=this._getState(),i={},getErrorPath=(e,t)=>[e,...Object.values(t||{})];return t.getAllKeyed().forEach(t=>{let{id:a,valuePath:o,indexes:s}=t,c=e.get(a);if(c.disabled)return;let d=P(r,o),f=n.validateFieldInstance(t,d);f.length&&x(i,getErrorPath(c.id,s),f)}),this._setState({errors:i}),i}attachTo(e){if(!e)throw Error(`parentNode required`);this.detach(),K(e)&&(e=document.querySelector(e));let t=this._container;e.appendChild(t),this._emit(`attach`)}detach(){this._detach()}_detach(e=!0){let t=this._container,n=t.parentNode;n&&(e&&this._emit(`detach`),n.removeChild(t))}setProperty(e,t){let n=x(this._getState().properties,[e],t);this._setState({properties:n})}off(e,t){this.get(`eventBus`).off(e,t)}_createInjector(e,t){let{modules:n=this._getModules(),additionalModules:r=[],...i}=e;return createInjector([{config:[`value`,{...i,renderer:{container:t}}]},{form:[`value`,this]},mo,vl,...n,...r])}_emit(e,t){this.get(`eventBus`).fire(e,t)}_update(e){let{fieldInstance:t,value:n}=e,{id:r,valuePath:i,indexes:a}=t,{data:o,errors:s}=this._getState(),c=this.get(`validator`).validateFieldInstance(t,n);x(o,i,n);let d=[r,...Object.values(a||{})],f;c.length?(x(s,d,c),f=s):f=pruneAt(s,d),this._emit(`field.updated`,e),this._setState({data:clone(o),errors:clone(f)})}_getState(){return this._state}_setState(e){this._state={...this._state,...e},this._emit(`changed`,this._getState())}_getModules(){return[Kc,qc,Jc,Xc,ol]}_onEvent(e,t,n){this.get(`eventBus`).on(e,t,n)}_getSubmitData(){let e=this.get(`formFieldRegistry`),t=this.get(`formFieldInstanceRegistry`),n=this._getState().data,r={};return t.getAllKeyed().forEach(t=>{let{id:i,valuePath:a}=t,{disabled:o}=e.get(i);if(o)return;let s=P(n,a);x(r,a,s)}),r}_getInitializedFieldData(e,t={}){let n=this.get(`formFieldRegistry`),r=this.get(`formFields`),i=this.get(`pathRegistry`);function initializeFieldDataRecursively(t,n,a){let{defaultValue:o,type:s,isRepeating:c}=n,{config:d}=r.get(s),f=i.getValuePath(n,{indexes:a}),p=P(e,f);if(d.keyed){!A(p)&&d.sanitizeValue&&(p=d.sanitizeValue({formField:n,data:e,value:p}));let r=A(p)?A(o)?d.emptyValue:o:p;x(t,f,r)}if(Array.isArray(n.components)){if(d.repeatable&&c){if((!p||!Array.isArray(p))&&(p=Array(A(n.defaultRepetitions)?1:n.defaultRepetitions).fill().map(e=>({}))||[]),p=p.map(e=>M(e)?e:{}),x(t,f,p),!A(a[n.id])){n.components.forEach(e=>initializeFieldDataRecursively(t,e,{...a}));return}p.forEach((e,r)=>{n.components.forEach(e=>initializeFieldDataRecursively(t,e,{...a,[n.id]:r}))})}else n.components.forEach(e=>initializeFieldDataRecursively(t,e,a))}}let a=t.container||n.getForm(),o=t.indexes||{},s=i.getValuePath(a,{indexes:o})||[],c=A(o[a.id])?s:[...s,o[a.id]],d=clone(e);return initializeFieldDataRecursively(d,a,o),P(d,c,{})}};export{wo as A,getAncestryList as B,Mo as C,Fo as D,PathRegistry as E,Table as F,runRecursively as G,getSchemaVariables as H,Text as I,sanitizeImageSource as K,clone as L,vo as M,Do as N,Io as O,To as P,createFormContainer as R,Oo as S,jo as T,getScrollContainer as U,getOptionsSource as V,iconsByType as W,Html as _,So as a,Label as b,FeelExpressionLanguage as c,FormComponent as d,zo as f,Lo as g,FormLayouter as h,Co as i,bo as j,Eo as k,FieldFactory as l,FormFields as m,yo as n,DocumentPreview as o,FormFieldRegistry as p,Pe as q,xo as r,ExpressionField as s,_o as t,Form as u,IFrame as v,Ao as w,Jc as x,Importer as y,createInjector as z};
|