@supersoniks/concorde 4.9.98-visual-stack.2 → 4.9.98-visual-stack.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-3d.bundle.js +1 -1
  3. package/concorde-3d.es.js +1 -1
  4. package/concorde-core.bundle.js +2 -2
  5. package/concorde-core.es.js +7 -2
  6. package/concorde-hugging-face-infer.bundle.js +1 -1
  7. package/concorde-hugging-face-infer.es.js +1 -1
  8. package/concorde-interactive.bundle.js +38 -43
  9. package/concorde-interactive.es.js +157 -146
  10. package/concorde-shader.bundle.js +1 -1
  11. package/concorde-shader.es.js +1 -1
  12. package/concorde-webgpu.bundle.js +1 -1
  13. package/concorde-webgpu.es.js +1 -1
  14. package/dist/concorde-3d.bundle.js +1 -1
  15. package/dist/concorde-3d.es.js +1 -1
  16. package/dist/concorde-core.bundle.js +2 -2
  17. package/dist/concorde-core.es.js +7 -2
  18. package/dist/concorde-hugging-face-infer.bundle.js +1 -1
  19. package/dist/concorde-hugging-face-infer.es.js +1 -1
  20. package/dist/concorde-interactive.bundle.js +38 -43
  21. package/dist/concorde-interactive.es.js +157 -146
  22. package/dist/concorde-shader.bundle.js +1 -1
  23. package/dist/concorde-shader.es.js +1 -1
  24. package/dist/concorde-webgpu.bundle.js +1 -1
  25. package/dist/concorde-webgpu.es.js +1 -1
  26. package/dist/js/core/components/functional/interactive/gesture.js +19 -6
  27. package/dist/js/core/components/functional/interactive/gesture.js.map +1 -1
  28. package/dist/js/core/components/functional/interactive/store.js +11 -3
  29. package/dist/js/core/components/functional/interactive/store.js.map +1 -1
  30. package/dist/js/core/mixins/Subscriber.js +6 -1
  31. package/dist/js/core/mixins/Subscriber.js.map +1 -1
  32. package/dist/types/core/components/functional/interactive/gesture.d.ts +2 -0
  33. package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -1
  34. package/dist/types/core/components/functional/interactive/store.d.ts +2 -0
  35. package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -1
  36. package/dist/types/core/mixins/Subscriber.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/src/core/components/functional/interactive/gesture.ts +20 -6
  39. package/src/core/components/functional/interactive/store.ts +9 -3
  40. package/src/core/mixins/Subscriber.ts +5 -1
  41. package/src/docs/_getting-started/cdn-addons.md +1 -0
  42. package/src/docs/navigation/navigation.ts +4 -0
  43. package/src/docs/search/docs-search.json +2513 -710
@@ -10,13 +10,13 @@
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const dr=globalThis,Ns=dr.trustedTypes,Xr=Ns?Ns.createPolicy("lit-html",{createHTML:r=>r}):void 0,Qr="$lit$",Ft=`lit$${Math.random().toFixed(9).slice(2)}$`,en="?"+Ft,Ei=`<${en}>`,Bt=document,gs=()=>Bt.createComment(""),vs=r=>r===null||typeof r!="object"&&typeof r!="function",pr=Array.isArray,Pi=r=>pr(r)||typeof r?.[Symbol.iterator]=="function",gr=`[
13
+ */const dr=globalThis,Ns=dr.trustedTypes,Xr=Ns?Ns.createPolicy("lit-html",{createHTML:r=>r}):void 0,Qr="$lit$",Mt=`lit$${Math.random().toFixed(9).slice(2)}$`,en="?"+Mt,Ei=`<${en}>`,Bt=document,gs=()=>Bt.createComment(""),vs=r=>r===null||typeof r!="object"&&typeof r!="function",pr=Array.isArray,Pi=r=>pr(r)||typeof r?.[Symbol.iterator]=="function",gr=`[
14
14
  \f\r]`,ms=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tn=/-->/g,sn=/>/g,Ht=RegExp(`>|${gr}(?:([^\\s"'>=/]+)(${gr}*=${gr}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),rn=/'/g,nn=/"/g,on=/^(?:script|style|textarea|title)$/i,Ti=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),qe=Ti(1),yt=Symbol.for("lit-noChange"),be=Symbol.for("lit-nothing"),an=new WeakMap,Vt=Bt.createTreeWalker(Bt,129);function ln(r,e){if(!pr(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xr!==void 0?Xr.createHTML(e):e}const $i=(r,e)=>{const t=r.length-1,s=[];let n,a=e===2?"<svg>":e===3?"<math>":"",o=ms;for(let h=0;h<t;h++){const d=r[h];let C,$,k=-1,w=0;for(;w<d.length&&(o.lastIndex=w,$=o.exec(d),$!==null);)w=o.lastIndex,o===ms?$[1]==="!--"?o=tn:$[1]!==void 0?o=sn:$[2]!==void 0?(on.test($[2])&&(n=RegExp("</"+$[2],"g")),o=Ht):$[3]!==void 0&&(o=Ht):o===Ht?$[0]===">"?(o=n??ms,k=-1):$[1]===void 0?k=-2:(k=o.lastIndex-$[2].length,C=$[1],o=$[3]===void 0?Ht:$[3]==='"'?nn:rn):o===nn||o===rn?o=Ht:o===tn||o===sn?o=ms:(o=Ht,n=void 0);const E=o===Ht&&r[h+1].startsWith("/>")?" ":"";a+=o===ms?d+Ei:k>=0?(s.push(C),d.slice(0,k)+Qr+d.slice(k)+Ft+E):d+Ft+(k===-2?h:E)}return[ln(r,a+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let vr=class gi{constructor({strings:e,_$litType$:t},s){let n;this.parts=[];let a=0,o=0;const h=e.length-1,d=this.parts,[C,$]=$i(e,t);if(this.el=gi.createElement(C,s),Vt.currentNode=this.el.content,t===2||t===3){const k=this.el.content.firstChild;k.replaceWith(...k.childNodes)}for(;(n=Vt.nextNode())!==null&&d.length<h;){if(n.nodeType===1){if(n.hasAttributes())for(const k of n.getAttributeNames())if(k.endsWith(Qr)){const w=$[o++],E=n.getAttribute(k).split(Ft),O=/([.?@])?(.*)/.exec(w);d.push({type:1,index:a,name:O[2],strings:E,ctor:O[1]==="."?Oi:O[1]==="?"?Li:O[1]==="@"?Fi:Us}),n.removeAttribute(k)}else k.startsWith(Ft)&&(d.push({type:6,index:a}),n.removeAttribute(k));if(on.test(n.tagName)){const k=n.textContent.split(Ft),w=k.length-1;if(w>0){n.textContent=Ns?Ns.emptyScript:"";for(let E=0;E<w;E++)n.append(k[E],gs()),Vt.nextNode(),d.push({type:2,index:++a});n.append(k[w],gs())}}}else if(n.nodeType===8)if(n.data===en)d.push({type:2,index:a});else{let k=-1;for(;(k=n.data.indexOf(Ft,k+1))!==-1;)d.push({type:7,index:a}),k+=Ft.length-1}a++}}static createElement(e,t){const s=Bt.createElement("template");return s.innerHTML=e,s}};function ns(r,e,t=r,s){if(e===yt)return e;let n=s!==void 0?t._$Co?.[s]:t._$Cl;const a=vs(e)?void 0:e._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(r),n._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=n:t._$Cl=n),n!==void 0&&(e=ns(r,n._$AS(r,e.values),n,s)),e}let Di=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,n=(e?.creationScope??Bt).importNode(t,!0);Vt.currentNode=n;let a=Vt.nextNode(),o=0,h=0,d=s[0];for(;d!==void 0;){if(o===d.index){let C;d.type===2?C=new is(a,a.nextSibling,this,e):d.type===1?C=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(C=new Mi(a,this,e)),this._$AV.push(C),d=s[++h]}o!==d?.index&&(a=Vt.nextNode(),o++)}return Vt.currentNode=Bt,n}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class is{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,n){this.type=2,this._$AH=be,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ns(this,e,t),vs(e)?e===be||e==null||e===""?(this._$AH!==be&&this._$AR(),this._$AH=be):e!==this._$AH&&e!==yt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Pi(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==be&&vs(this._$AH)?this._$AA.nextSibling.data=e:this.T(Bt.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=vr.createElement(ln(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(t);else{const a=new Di(n,this),o=a.u(this.options);a.p(t),this.T(o),this._$AH=a}}_$AC(e){let t=an.get(e.strings);return t===void 0&&an.set(e.strings,t=new vr(e)),t}k(e){pr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,n=0;for(const a of e)n===t.length?t.push(s=new is(this.O(gs()),this.O(gs()),this,this.options)):s=t[n],s._$AI(a),n++;n<t.length&&(this._$AR(s&&s._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Us{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,n,a){this.type=1,this._$AH=be,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=a,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=be}_$AI(e,t=this,s,n){const a=this.strings;let o=!1;if(a===void 0)e=ns(this,e,t,0),o=!vs(e)||e!==this._$AH&&e!==yt,o&&(this._$AH=e);else{const h=e;let d,C;for(e=a[0],d=0;d<a.length-1;d++)C=ns(this,h[s+d],t,d),C===yt&&(C=this._$AH[d]),o||=!vs(C)||C!==this._$AH[d],C===be?e=be:e!==be&&(e+=(C??"")+a[d+1]),this._$AH[d]=C}o&&!n&&this.j(e)}j(e){e===be?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Oi extends Us{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===be?void 0:e}}class Li extends Us{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==be)}}class Fi extends Us{constructor(e,t,s,n,a){super(e,t,s,n,a),this.type=5}_$AI(e,t=this){if((e=ns(this,e,t,0)??be)===yt)return;const s=this._$AH,n=e===be&&s!==be||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==be&&(s===be||n);n&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Mi{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){ns(this,e)}}const Ri={I:is},Ii=dr.litHtmlPolyfillSupport;Ii?.(vr,is),(dr.litHtmlVersions??=[]).push("3.3.1");const Ni=(r,e,t)=>{const s=t?.renderBefore??e;let n=s._$litPart$;if(n===void 0){const a=t?.renderBefore??null;s._$litPart$=n=new is(e.insertBefore(gs(),a),a,void 0,t??{})}return n._$AI(r),n};/**
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),rn=/'/g,nn=/"/g,on=/^(?:script|style|textarea|title)$/i,Ti=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),qe=Ti(1),bt=Symbol.for("lit-noChange"),be=Symbol.for("lit-nothing"),an=new WeakMap,Vt=Bt.createTreeWalker(Bt,129);function ln(r,e){if(!pr(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xr!==void 0?Xr.createHTML(e):e}const $i=(r,e)=>{const t=r.length-1,s=[];let n,a=e===2?"<svg>":e===3?"<math>":"",o=ms;for(let h=0;h<t;h++){const d=r[h];let C,$,k=-1,w=0;for(;w<d.length&&(o.lastIndex=w,$=o.exec(d),$!==null);)w=o.lastIndex,o===ms?$[1]==="!--"?o=tn:$[1]!==void 0?o=sn:$[2]!==void 0?(on.test($[2])&&(n=RegExp("</"+$[2],"g")),o=Ht):$[3]!==void 0&&(o=Ht):o===Ht?$[0]===">"?(o=n??ms,k=-1):$[1]===void 0?k=-2:(k=o.lastIndex-$[2].length,C=$[1],o=$[3]===void 0?Ht:$[3]==='"'?nn:rn):o===nn||o===rn?o=Ht:o===tn||o===sn?o=ms:(o=Ht,n=void 0);const E=o===Ht&&r[h+1].startsWith("/>")?" ":"";a+=o===ms?d+Ei:k>=0?(s.push(C),d.slice(0,k)+Qr+d.slice(k)+Mt+E):d+Mt+(k===-2?h:E)}return[ln(r,a+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let vr=class gi{constructor({strings:e,_$litType$:t},s){let n;this.parts=[];let a=0,o=0;const h=e.length-1,d=this.parts,[C,$]=$i(e,t);if(this.el=gi.createElement(C,s),Vt.currentNode=this.el.content,t===2||t===3){const k=this.el.content.firstChild;k.replaceWith(...k.childNodes)}for(;(n=Vt.nextNode())!==null&&d.length<h;){if(n.nodeType===1){if(n.hasAttributes())for(const k of n.getAttributeNames())if(k.endsWith(Qr)){const w=$[o++],E=n.getAttribute(k).split(Mt),L=/([.?@])?(.*)/.exec(w);d.push({type:1,index:a,name:L[2],strings:E,ctor:L[1]==="."?Oi:L[1]==="?"?Li:L[1]==="@"?Fi:Us}),n.removeAttribute(k)}else k.startsWith(Mt)&&(d.push({type:6,index:a}),n.removeAttribute(k));if(on.test(n.tagName)){const k=n.textContent.split(Mt),w=k.length-1;if(w>0){n.textContent=Ns?Ns.emptyScript:"";for(let E=0;E<w;E++)n.append(k[E],gs()),Vt.nextNode(),d.push({type:2,index:++a});n.append(k[w],gs())}}}else if(n.nodeType===8)if(n.data===en)d.push({type:2,index:a});else{let k=-1;for(;(k=n.data.indexOf(Mt,k+1))!==-1;)d.push({type:7,index:a}),k+=Mt.length-1}a++}}static createElement(e,t){const s=Bt.createElement("template");return s.innerHTML=e,s}};function ns(r,e,t=r,s){if(e===bt)return e;let n=s!==void 0?t._$Co?.[s]:t._$Cl;const a=vs(e)?void 0:e._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(r),n._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=n:t._$Cl=n),n!==void 0&&(e=ns(r,n._$AS(r,e.values),n,s)),e}let Di=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,n=(e?.creationScope??Bt).importNode(t,!0);Vt.currentNode=n;let a=Vt.nextNode(),o=0,h=0,d=s[0];for(;d!==void 0;){if(o===d.index){let C;d.type===2?C=new is(a,a.nextSibling,this,e):d.type===1?C=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(C=new Mi(a,this,e)),this._$AV.push(C),d=s[++h]}o!==d?.index&&(a=Vt.nextNode(),o++)}return Vt.currentNode=Bt,n}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class is{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,n){this.type=2,this._$AH=be,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ns(this,e,t),vs(e)?e===be||e==null||e===""?(this._$AH!==be&&this._$AR(),this._$AH=be):e!==this._$AH&&e!==bt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Pi(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==be&&vs(this._$AH)?this._$AA.nextSibling.data=e:this.T(Bt.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=vr.createElement(ln(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(t);else{const a=new Di(n,this),o=a.u(this.options);a.p(t),this.T(o),this._$AH=a}}_$AC(e){let t=an.get(e.strings);return t===void 0&&an.set(e.strings,t=new vr(e)),t}k(e){pr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,n=0;for(const a of e)n===t.length?t.push(s=new is(this.O(gs()),this.O(gs()),this,this.options)):s=t[n],s._$AI(a),n++;n<t.length&&(this._$AR(s&&s._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Us{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,n,a){this.type=1,this._$AH=be,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=a,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=be}_$AI(e,t=this,s,n){const a=this.strings;let o=!1;if(a===void 0)e=ns(this,e,t,0),o=!vs(e)||e!==this._$AH&&e!==bt,o&&(this._$AH=e);else{const h=e;let d,C;for(e=a[0],d=0;d<a.length-1;d++)C=ns(this,h[s+d],t,d),C===bt&&(C=this._$AH[d]),o||=!vs(C)||C!==this._$AH[d],C===be?e=be:e!==be&&(e+=(C??"")+a[d+1]),this._$AH[d]=C}o&&!n&&this.j(e)}j(e){e===be?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Oi extends Us{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===be?void 0:e}}class Li extends Us{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==be)}}class Fi extends Us{constructor(e,t,s,n,a){super(e,t,s,n,a),this.type=5}_$AI(e,t=this){if((e=ns(this,e,t,0)??be)===bt)return;const s=this._$AH,n=e===be&&s!==be||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==be&&(s===be||n);n&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Mi{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){ns(this,e)}}const Ri={I:is},Ii=dr.litHtmlPolyfillSupport;Ii?.(vr,is),(dr.litHtmlVersions??=[]).push("3.3.1");const Ni=(r,e,t)=>{const s=t?.renderBefore??e;let n=s._$litPart$;if(n===void 0){const a=t?.renderBefore??null;s._$litPart$=n=new is(e.insertBefore(gs(),a),a,void 0,t??{})}return n._$AI(r),n};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const mr=globalThis;let We=class extends rs{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ni(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return yt}};We._$litElement$=!0,We.finalized=!0,mr.litElementHydrateSupport?.({LitElement:We});const Ui=mr.litElementPolyfillSupport;Ui?.({LitElement:We}),(mr.litElementVersions??=[]).push("4.2.1");/**
19
+ */const mr=globalThis;let We=class extends rs{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ni(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return bt}};We._$litElement$=!0,We.finalized=!0,mr.litElementHydrateSupport?.({LitElement:We});const Ui=mr.litElementPolyfillSupport;Ui?.({LitElement:We}),(mr.litElementVersions??=[]).push("4.2.1");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
@@ -24,11 +24,11 @@
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const ji={attribute:!0,type:String,converter:Is,reflect:!1,hasChanged:fr},zi=(r=ji,e,t)=>{const{kind:s,metadata:n}=t;let a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),a.set(t.name,r),s==="accessor"){const{name:o}=t;return{set(h){const d=e.get.call(this);e.set.call(this,h),this.requestUpdate(o,d,r)},init(h){return h!==void 0&&this.C(o,void 0,r,h),h}}}if(s==="setter"){const{name:o}=t;return function(h){const d=this[o];e.call(this,h),this.requestUpdate(o,d,r)}}throw Error("Unsupported decorator location: "+s)};function L(r){return(e,t)=>typeof t=="object"?zi(r,e,t):((s,n,a)=>{const o=n.hasOwnProperty(a);return n.constructor.createProperty(a,s),o?Object.getOwnPropertyDescriptor(n,a):void 0})(r,e,t)}/**
27
+ */const ji={attribute:!0,type:String,converter:Is,reflect:!1,hasChanged:fr},zi=(r=ji,e,t)=>{const{kind:s,metadata:n}=t;let a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),a.set(t.name,r),s==="accessor"){const{name:o}=t;return{set(h){const d=e.get.call(this);e.set.call(this,h),this.requestUpdate(o,d,r)},init(h){return h!==void 0&&this.C(o,void 0,r,h),h}}}if(s==="setter"){const{name:o}=t;return function(h){const d=this[o];e.call(this,h),this.requestUpdate(o,d,r)}}throw Error("Unsupported decorator location: "+s)};function O(r){return(e,t)=>typeof t=="object"?zi(r,e,t):((s,n,a)=>{const o=n.hasOwnProperty(a);return n.constructor.createProperty(a,s),o?Object.getOwnPropertyDescriptor(n,a):void 0})(r,e,t)}/**
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */function ft(r){return L({...r,state:!0,attribute:!1})}/**
31
+ */function ft(r){return O({...r,state:!0,attribute:!1})}/**
32
32
  * @license
33
33
  * Copyright 2017 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
@@ -40,14 +40,14 @@
40
40
  * @license
41
41
  * Copyright 2021 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */function un(r){return(e,t)=>{const{slot:s,selector:n}=r??{},a="slot"+(s?`[name=${s}]`:":not([name])");return cn(e,t,{get(){const o=this.renderRoot?.querySelector(a),h=o?.assignedElements(r)??[];return n===void 0?h:h.filter((d=>d.matches(n)))}})}}var hn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function js(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var yr={exports:{}},dn;function Bi(){return dn||(dn=1,(function(r,e){(function(t){r.exports=t()})(function(){return(function(){function t(s,n,a){function o(C,$){if(!n[C]){if(!s[C]){var k=typeof js=="function"&&js;if(!$&&k)return k(C,!0);if(h)return h(C,!0);var w=new Error("Cannot find module '"+C+"'");throw w.code="MODULE_NOT_FOUND",w}var E=n[C]={exports:{}};s[C][0].call(E.exports,function(O){var R=s[C][1][O];return o(R||O)},E,E.exports,t,s,n,a)}return n[C].exports}for(var h=typeof js=="function"&&js,d=0;d<a.length;d++)o(a[d]);return o}return t})()({1:[function(t,s,n){const a=t("./utils"),o=(function(){const h=a.stringToArray,d=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],C=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],$=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],k=["Thousand","Million","Billion","Trillion"];function w(S,D){var P=function(q,j,F){var B="";if(q<=19)B=(j?" and ":"")+(F?C[q]:d[q]);else if(q<100){const fe=Math.floor(q/10),le=q%10;B=(j?" and ":"")+$[fe-2],le>0?B+="-"+P(le,!1,F):F&&(B=B.substring(0,B.length-1)+"ieth")}else if(q<1e3){const fe=Math.floor(q/100),le=q%100;B=(j?", ":"")+d[fe]+" Hundred",le>0?B+=P(le,!0,F):F&&(B+="th")}else{var Y=Math.floor(Math.log10(q)/3);Y>k.length&&(Y=k.length);const fe=Math.pow(10,Y*3),le=Math.floor(q/fe),Q=q-le*fe;B=(j?", ":"")+P(le,!1,!1)+" "+k[Y-1],Q>0?B+=P(Q,!0,F):F&&(B+="th")}return B},I=P(S,!1,D);return I}const E=Object.create(null);d.forEach(function(S,D){E[S.toLowerCase()]=D}),C.forEach(function(S,D){E[S.toLowerCase()]=D}),$.forEach(function(S,D){const P=S.toLowerCase();E[P]=(D+2)*10,E[P.substring(0,S.length-1)+"ieth"]=E[P]}),E.hundredth=100,k.forEach(function(S,D){const P=S.toLowerCase(),I=Math.pow(10,(D+1)*3);E[P]=I,E[P+"th"]=I});function O(S){const P=S.split(/,\s|\sand\s|[\s\\-]/).map(j=>E[j]);let I=[0];return P.forEach(j=>{if(j<100){let F=I.pop();F>=1e3&&(I.push(F),F=0),I.push(F+j)}else I.push(I.pop()*j)}),I.reduce((j,F)=>j+F,0)}const R=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],X={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function Z(S){for(var D=0;D<R.length;D++){const P=R[D];if(S>=P[0])return P[1]+Z(S-P[0])}return""}function A(S){for(var D=0,P=1,I=S.length-1;I>=0;I--){const q=S[I],j=X[q];j<P?D-=j:(P=j,D+=j)}return D}function m(S,D){for(var P=[],I=D.charCodeAt(0);S>0;)P.unshift(String.fromCharCode((S-1)%26+I)),S=Math.floor((S-1)/26);return P.join("")}function M(S,D){for(var P=D.charCodeAt(0),I=0,q=0;q<S.length;q++)I+=(S.charCodeAt(S.length-q-1)-P+1)*Math.pow(26,q);return I}function _(S,D){if(typeof S>"u")return;S=Math.floor(S);const P=oe(D);return N(S,P)}const T={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},V={UPPER:"upper",LOWER:"lower",TITLE:"title"};function N(S,D){let P;const I=S<0;switch(S=Math.abs(S),D.primary){case T.LETTERS:P=m(S,D.case===V.UPPER?"A":"a");break;case T.ROMAN:P=Z(S),D.case===V.UPPER&&(P=P.toUpperCase());break;case T.WORDS:P=w(S,D.ordinal),D.case===V.UPPER?P=P.toUpperCase():D.case===V.LOWER&&(P=P.toLowerCase());break;case T.DECIMAL:P=""+S;var q=D.mandatoryDigits-P.length;if(q>0){var j=new Array(q+1).join("0");P=j+P}if(D.zeroCode!==48&&(P=h(P).map(fe=>String.fromCodePoint(fe.codePointAt(0)+D.zeroCode-48)).join("")),D.regular){const fe=Math.floor((P.length-1)/D.groupingSeparators.position);for(let le=fe;le>0;le--){const Q=P.length-le*D.groupingSeparators.position;P=P.substr(0,Q)+D.groupingSeparators.character+P.substr(Q)}}else D.groupingSeparators.reverse().forEach(fe=>{const le=P.length-fe.position;P=P.substr(0,le)+fe.character+P.substr(le)});if(D.ordinal){var F={1:"st",2:"nd",3:"rd"},B=P[P.length-1],Y=F[B];(!Y||P.length>1&&P[P.length-2]==="1")&&(Y="th"),P=P+Y}break;case T.SEQUENCE:throw{code:"D3130",value:D.token}}return I&&(P="-"+P),P}const ee=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function oe(S){const D={type:"integer",primary:T.DECIMAL,case:V.LOWER,ordinal:!1};let P,I;const q=S.lastIndexOf(";");switch(q===-1?P=S:(P=S.substring(0,q),I=S.substring(q+1),I[0]==="o"&&(D.ordinal=!0)),P){case"A":D.case=V.UPPER;case"a":D.primary=T.LETTERS;break;case"I":D.case=V.UPPER;case"i":D.primary=T.ROMAN;break;case"W":D.case=V.UPPER,D.primary=T.WORDS;break;case"Ww":D.case=V.TITLE,D.primary=T.WORDS;break;case"w":D.primary=T.WORDS;break;default:{let j=null,F=0,B=0,Y=[],fe=0;if(h(P).map(Q=>Q.codePointAt(0)).reverse().forEach(Q=>{let K=!1;for(let ue=0;ue<ee.length;ue++){const J=ee[ue];if(Q>=J&&Q<=J+9){if(K=!0,F++,fe++,j===null)j=J;else if(J!==j)throw{code:"D3131"};break}}K||(Q===35?(fe++,B++):Y.push({position:fe,character:String.fromCodePoint(Q)}))}),F>0){D.primary=T.DECIMAL,D.zeroCode=j,D.mandatoryDigits=F,D.optionalDigits=B;const K=function(ue){if(ue.length===0)return 0;const J=ue[0].character;for(let Ie=1;Ie<ue.length;Ie++)if(ue[Ie].character!==J)return 0;const He=ue.map(Ie=>Ie.position),ut=function(Ie,Ke){return Ke===0?Ie:ut(Ke,Ie%Ke)},Ye=He.reduce(ut);for(let Ie=1;Ie<=He.length;Ie++)if(He.indexOf(Ie*Ye)===-1)return 0;return Ye}(Y);K>0?(D.regular=!0,D.groupingSeparators={position:K,character:Y[0].character}):(D.regular=!1,D.groupingSeparators=Y)}else D.primary=T.SEQUENCE,D.token=P}}return D}const Se={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function ve(S){var D=[];const P={type:"datetime",parts:D},I=function(K,ue){if(ue>K){let J=S.substring(K,ue);J=J.split("]]").join("]"),D.push({type:"literal",value:J})}};for(var q=0,j=0;j<S.length;){if(S.charAt(j)==="["){if(S.charAt(j+1)==="["){I(q,j),D.push({type:"literal",value:"["}),j+=2,q=j;continue}if(I(q,j),q=j,j=S.indexOf("]",q),j===-1)throw{code:"D3135"};let K=S.substring(q+1,j);K=K.split(/\s+/).join("");var F={type:"marker",component:K.charAt(0)},B=K.lastIndexOf(","),Y;if(B!==-1){const ue=K.substring(B+1),J=ue.indexOf("-");let He,ut;const Ye=function(Ke){if(!(typeof Ke>"u"||Ke==="*"))return parseInt(Ke)};J===-1?He=ue:(He=ue.substring(0,J),ut=ue.substring(J+1));const Ie={min:Ye(He),max:Ye(ut)};F.width=Ie,Y=K.substring(1,B)}else Y=K.substring(1);if(Y.length===1)F.presentation1=Y;else if(Y.length>1){var fe=Y.charAt(Y.length-1);"atco".indexOf(fe)!==-1?(F.presentation2=fe,fe==="o"&&(F.ordinal=!0),F.presentation1=Y.substring(0,Y.length-1)):F.presentation1=Y}else F.presentation1=Se[F.component];if(typeof F.presentation1>"u")throw{code:"D3132",value:F.component};if(F.presentation1[0]==="n")F.names=V.LOWER;else if(F.presentation1[0]==="N")F.presentation1[1]==="n"?F.names=V.TITLE:F.names=V.UPPER;else if("YMDdFWwXxHhmsf".indexOf(F.component)!==-1){var le=F.presentation1;if(F.presentation2&&(le+=";"+F.presentation2),F.integerFormat=oe(le),F.width&&F.width.min!==void 0&&F.integerFormat.mandatoryDigits<F.width.min&&(F.integerFormat.mandatoryDigits=F.width.min),F.component==="Y")if(F.n=-1,F.width&&F.width.max!==void 0)F.n=F.width.max,F.integerFormat.mandatoryDigits=F.n;else{var Q=F.integerFormat.mandatoryDigits+F.integerFormat.optionalDigits;Q>=2&&(F.n=Q)}const ue=D[D.length-1];ue&&ue.integerFormat&&(ue.integerFormat.parseWidth=ue.integerFormat.mandatoryDigits)}(F.component==="Z"||F.component==="z")&&(F.integerFormat=oe(F.presentation1)),D.push(F),q=j+1}j++}return I(q,j),P}const pe=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Le=["January","February","March","April","May","June","July","August","September","October","November","December"],nt=1e3*60*60*24,ce=function(S){const D=Date.UTC(S.year,S.month);var P=new Date(D).getUTCDay();return P===0&&(P=7),P>4?D+(8-P)*nt:D-(P-1)*nt},ge=function(S,D){return{year:S,month:D,nextMonth:function(){return D===11?ge(S+1,0):ge(S,D+1)},previousMonth:function(){return D===0?ge(S-1,11):ge(S,D-1)},nextYear:function(){return ge(S+1,D)},previousYear:function(){return ge(S-1,D)}}},tt=function(S,D){return(D-S)/(nt*7)+1},re=(S,D)=>{let P;switch(D){case"Y":P=S.getUTCFullYear();break;case"M":P=S.getUTCMonth()+1;break;case"D":P=S.getUTCDate();break;case"d":{const I=Date.UTC(S.getUTCFullYear(),S.getUTCMonth(),S.getUTCDate()),q=Date.UTC(S.getUTCFullYear(),0);P=(I-q)/nt+1;break}case"F":P=S.getUTCDay(),P===0&&(P=7);break;case"W":{const I=ge(S.getUTCFullYear(),0),q=ce(I),j=Date.UTC(I.year,S.getUTCMonth(),S.getUTCDate());let F=tt(q,j);if(F>52){const B=ce(I.nextYear());j>=B&&(F=1)}else if(F<1){const B=ce(I.previousYear());F=tt(B,j)}P=Math.floor(F);break}case"w":{const I=ge(S.getUTCFullYear(),S.getUTCMonth()),q=ce(I),j=Date.UTC(I.year,I.month,S.getUTCDate());let F=tt(q,j);if(F>4){const B=ce(I.nextMonth());j>=B&&(F=1)}else if(F<1){const B=ce(I.previousMonth());F=tt(B,j)}P=Math.floor(F);break}case"X":{const I=ge(S.getUTCFullYear(),0),q=ce(I),j=ce(I.nextYear()),F=S.getTime();F<q?P=I.year-1:F>=j?P=I.year+1:P=I.year;break}case"x":{const I=ge(S.getUTCFullYear(),S.getUTCMonth()),q=ce(I),j=I.nextMonth(),F=ce(j),B=S.getTime();B<q?P=I.previousMonth().month+1:B>=F?P=j.month+1:P=I.month+1;break}case"H":P=S.getUTCHours();break;case"h":P=S.getUTCHours(),P=P%12,P===0&&(P=12);break;case"P":P=S.getUTCHours()>=12?"pm":"am";break;case"m":P=S.getUTCMinutes();break;case"s":P=S.getUTCSeconds();break;case"f":P=S.getUTCMilliseconds();break;case"Z":case"z":break;case"C":P="ISO";break;case"E":P="ISO";break}return P};let Fe=null;function kt(S,D,P){var I=0,q=0;if(typeof P<"u"){const le=parseInt(P);I=Math.floor(le/100),q=le%100}var j=function(le,Q){var K=re(le,Q.component);if("YMDdFWwXxHhms".indexOf(Q.component)!==-1)if(Q.component==="Y"&&Q.n!==-1&&(K=K%Math.pow(10,Q.n)),Q.names){if(Q.component==="M"||Q.component==="x")K=Le[K-1];else if(Q.component==="F")K=pe[K];else throw{code:"D3133",value:Q.component};Q.names===V.UPPER?K=K.toUpperCase():Q.names===V.LOWER&&(K=K.toLowerCase()),Q.width&&K.length>Q.width.max&&(K=K.substring(0,Q.width.max))}else K=N(K,Q.integerFormat);else if(Q.component==="f")K=N(K,Q.integerFormat);else if(Q.component==="Z"||Q.component==="z"){const ue=I*100+q;if(Q.integerFormat.regular)K=N(ue,Q.integerFormat);else{const J=Q.integerFormat.mandatoryDigits;if(J===1||J===2)K=N(I,Q.integerFormat),q!==0&&(K+=":"+_(q,"00"));else if(J===3||J===4)K=N(ue,Q.integerFormat);else throw{code:"D3134",value:J}}ue>=0&&(K="+"+K),Q.component==="z"&&(K="GMT"+K),ue===0&&Q.presentation2==="t"&&(K="Z")}else Q.component==="P"&&Q.names===V.UPPER&&(K=K.toUpperCase());return K};let F;typeof D>"u"?(Fe===null&&(Fe=ve("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),F=Fe):F=ve(D);const B=(60*I+q)*60*1e3,Y=new Date(S+B);let fe="";return F.parts.forEach(function(le){le.type==="literal"?fe+=le.value:fe+=j(Y,le)}),fe}function p(S){var D=Object.create(null);if(S.type==="datetime")D.type="datetime",D.parts=S.parts.map(function(P){var I=Object.create(null);if(P.type==="literal")I.regex=P.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(P.component==="Z"||P.component==="z"){let j;Array.isArray(P.integerFormat.groupingSeparators)||(j=P.integerFormat.groupingSeparators),I.regex="",P.component==="z"&&(I.regex="GMT"),I.regex+="[-+][0-9]+",j&&(I.regex+=j.character+"[0-9]+"),I.parse=function(F){P.component==="z"&&(F=F.substring(3));let B=0,Y=0;return j?(B=Number.parseInt(F.substring(0,F.indexOf(j.character))),Y=Number.parseInt(F.substring(F.indexOf(j.character)+1))):F.length-1<=2?B=Number.parseInt(F):(B=Number.parseInt(F.substring(0,3)),Y=Number.parseInt(F.substring(3))),B*60+Y}}else if(P.component==="f")I.regex="[0-9]+",I.parse=function(j){return parseFloat("0."+j.substring(0,3))*1e3};else if(P.integerFormat)I=p(P.integerFormat);else{I.regex="[a-zA-Z]+";var q=Object.create(null);if(P.component==="M"||P.component==="x")Le.forEach(function(j,F){P.width&&P.width.max?q[j.substring(0,P.width.max)]=F+1:q[j]=F+1});else if(P.component==="F")pe.forEach(function(j,F){F>0&&(P.width&&P.width.max?q[j.substring(0,P.width.max)]=F:q[j]=F)});else if(P.component==="P")q={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:P.component};I.parse=function(j){return q[j]}}return I.component=P.component,I});else{D.type="integer";const P=S.case===V.UPPER;switch(S.primary){case T.LETTERS:D.regex=P?"[A-Z]+":"[a-z]+",D.parse=function(I){return M(I,P?"A":"a")};break;case T.ROMAN:D.regex=P?"[MDCLXVI]+":"[mdclxvi]+",D.parse=function(I){return A(P?I:I.toUpperCase())};break;case T.WORDS:D.regex="(?:"+a.keys(E).concat("and","[\\-, ]").join("|")+")+",D.parse=function(I){return O(I.toLowerCase())};break;case T.DECIMAL:D.regex="[0-9]",S.parseWidth?D.regex+=`{${S.parseWidth}}`:D.regex+="+",S.ordinal&&(D.regex+="(?:th|st|nd|rd)"),D.parse=function(I){let q=I;return S.ordinal&&(q=I.substring(0,I.length-2)),S.regular?q=q.split(",").join(""):S.groupingSeparators.forEach(j=>{q=q.split(j.character).join("")}),S.zeroCode!==48&&(q=q.split("").map(j=>String.fromCodePoint(j.codePointAt(0)-S.zeroCode+48)).join("")),parseInt(q)};break;case T.SEQUENCE:throw{code:"D3130",value:S.token}}}return D}function b(S,D){if(typeof S>"u")return;const P=oe(D);return p(P).parse(S)}function W(S,D){const P=ve(D),I=p(P),q="^"+I.parts.map(Y=>"("+Y.regex+")").join("")+"$";var F=new RegExp(q,"i").exec(S);if(F!==null){const J=Object.create(null);for(let c=1;c<F.length;c++){const f=I.parts[c-1];f.parse&&(J[f.component]=f.parse(F[c]))}if(Object.getOwnPropertyNames(J).length===0)return;let He=0;const ut=c=>{He<<=1,He+=c?1:0},Ye=c=>!(~c&He)&&!!(c&He);"YXMxWwdD".split("").forEach(c=>ut(J[c]));const Ke=!Ye(161)&&Ye(130),Dt=Ye(84),us=!Dt&&Ye(72);He=0,"PHhmsf".split("").forEach(c=>ut(J[c]));const H=!Ye(23)&&Ye(47),vt=(Ke?"YD":Dt?"XxwF":us?"XWF":"YMD")+(H?"Phmsf":"Hmsf"),Ds=this.environment.timestamp;let St=!1,Qt=!1;if(vt.split("").forEach(c=>{if(typeof J[c]>"u")St?(J[c]="MDd".indexOf(c)!==-1?1:0,Qt=!0):J[c]=re(Ds,c);else if(St=!0,Qt)throw{code:"D3136"}}),J.M>0?J.M-=1:J.M=0,Ke){const c=Date.UTC(J.Y,0),f=(J.d-1)*1e3*60*60*24,g=new Date(c+f);J.M=g.getUTCMonth(),J.D=g.getUTCDate()}if(Dt)throw{code:"D3136"};if(us)throw{code:"D3136"};H&&(J.H=J.h===12?0:J.h,J.P===1&&(J.H+=12));var B=Date.UTC(J.Y,J.M,J.D,J.H,J.m,J.s,J.f);return(J.Z||J.z)&&(B-=(J.Z||J.z)*60*1e3),B}}var he=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function xe(S,D){if(!(typeof S>"u"))if(typeof D>"u"){if(!he.test(S))throw{stack:new Error().stack,code:"D3110",value:S};return Date.parse(S)}else return W.call(this,S,D)}function _e(S,D,P){if(!(typeof S>"u"))return kt.call(this,S,D,P)}return{formatInteger:_,parseInteger:b,fromMillis:_e,toMillis:xe}})();s.exports=o},{"./utils":6}],2:[function(t,s,n){(function(a){(function(){var o=t("./utils");const h=(()=>{var d=o.isNumeric,C=o.isArrayOfStrings,$=o.isArrayOfNumbers,k=o.isSequence,w=o.isFunction,E=o.isLambda,O=o.isPromise,R=o.getFunctionArity,X=o.isDeepEqual,Z=o.stringToArray;function A(i){if(!(typeof i>"u")){var l=0;return i.forEach(function(u){l+=u}),l}}function m(i){return typeof i>"u"?0:i.length}function M(i){if(!(typeof i>"u"||i.length===0))return Math.max.apply(Math,i)}function _(i){if(!(typeof i>"u"||i.length===0))return Math.min.apply(Math,i)}function T(i){if(!(typeof i>"u"||i.length===0)){var l=0;return i.forEach(function(u){l+=u}),l/i.length}}function V(i,l=!1){if(!(typeof i>"u")){var u;if(typeof i=="string")u=i;else if(w(i))u="";else{if(typeof i=="number"&&!isFinite(i))throw{code:"D3001",value:i,stack:new Error().stack};var y=l?2:0;Array.isArray(i)&&i.outerWrapper&&(i=i[0]),u=JSON.stringify(i,function(v,x){return typeof x<"u"&&x!==null&&d(x)?x.toPrecision&&!Number.isInteger(x)?Number(x.toPrecision(15)):x:x&&w(x)?"":x},y)}return u}}function N(i,l,u){if(!(typeof i>"u")){var y=Z(i),v=y.length;if(v+l<0&&(l=0),typeof u<"u"){if(u<=0)return"";var x=l>=0?l+u:v+l+u;return y.slice(l,x).join("")}return y.slice(l).join("")}}function ee(i,l){if(!(typeof i>"u")){var u=i.indexOf(l);return u>-1?i.substr(0,u):i}}function oe(i,l){if(!(typeof i>"u")){var u=i.indexOf(l);return u>-1?i.substr(u+l.length):i}}function Se(i){if(!(typeof i>"u"))return i.toLowerCase()}function ve(i){if(!(typeof i>"u"))return i.toUpperCase()}function pe(i){if(!(typeof i>"u"))return Z(i).length}function Le(i){if(!(typeof i>"u")){var l=i.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function nt(i,l,u){if(!(typeof i>"u")){(typeof u>"u"||u.length===0)&&(u=" ");var y;l=Math.trunc(l);var v=Math.abs(l)-pe(i);if(v>0){var x=new Array(v+1).join(u);u.length>1&&(x=N(x,0,v)),l>0?y=i+x:y=x+i}else y=i;return y}}async function ce(i,l){var u=i.apply(this,[l]);if(O(u)&&(u=await u),u&&!(typeof u.start=="number"||u.end==="number"||Array.isArray(u.groups)||w(u.next)))throw{code:"T1010",stack:new Error().stack};return u}async function ge(i,l){if(!(typeof i>"u"||typeof l>"u")){var u;if(typeof l=="string")u=i.indexOf(l)!==-1;else{var y=await ce(l,i);u=typeof y<"u"}return u}}async function tt(i,l,u){if(!(typeof i>"u")){if(u<0)throw{stack:new Error().stack,value:u,code:"D3040",index:3};var y=this.createSequence();if(typeof u>"u"||u>0){var v=0,x=await ce(l,i);if(typeof x<"u")for(;typeof x<"u"&&(typeof u>"u"||v<u);)y.push({match:x.match,index:x.start,groups:x.groups}),x=await ce(x.next),v++}return y}}async function re(i,l,u,y){if(!(typeof i>"u")){var v=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(y<0)throw{code:"D3011",stack:new Error().stack,value:y,index:4};var x;typeof u=="string"?x=function(Te){for(var Ne="",ye=0,Me=u.indexOf("$",ye);Me!==-1&&ye<u.length;){Ne+=u.substring(ye,Me),ye=Me+1;var ht=u.charAt(ye);if(ht==="$")Ne+="$",ye++;else if(ht==="0")Ne+=Te.match,ye++;else{var Je;if(Te.groups.length===0?Je=1:Je=Math.floor(Math.log(Te.groups.length)*Math.LOG10E)+1,Me=parseInt(u.substring(ye,ye+Je),10),Je>1&&Me>Te.groups.length&&(Me=parseInt(u.substring(ye,ye+Je-1),10)),isNaN(Me))Ne+="$";else{if(Te.groups.length>0){var xt=Te.groups[Me-1];typeof xt<"u"&&(Ne+=xt)}ye+=Me.toString().length}}Me=u.indexOf("$",ye)}return Ne+=u.substring(ye),Ne}:x=u;var U="",z=0;if(typeof y>"u"||y>0){var ne=0;if(typeof l=="string"){for(var G=i.indexOf(l,z);G!==-1&&(typeof y>"u"||ne<y);)U+=i.substring(z,G),U+=u,z=G+l.length,ne++,G=i.indexOf(l,z);U+=i.substring(z)}else{var Ae=await ce(l,i);if(typeof Ae<"u"){for(;typeof Ae<"u"&&(typeof y>"u"||ne<y);){U+=i.substring(z,Ae.start);var Pe=x.apply(v,[Ae]);if(O(Pe)&&(Pe=await Pe),typeof Pe=="string")U+=Pe;else throw{code:"D3012",stack:new Error().stack,value:Pe};z=Ae.start+Ae.match.length,ne++,Ae=await ce(Ae.next)}U+=i.substring(z)}else U=i}}else U=i;return U}}function Fe(i){if(!(typeof i>"u")){var l=typeof window<"u"?window.btoa:function(u){return new a.Buffer.from(u,"binary").toString("base64")};return l(i)}}function kt(i){if(!(typeof i>"u")){var l=typeof window<"u"?window.atob:function(u){return new a.Buffer.from(u,"base64").toString("binary")};return l(i)}}function p(i){if(!(typeof i>"u")){var l;try{l=encodeURIComponent(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"encodeUrlComponent"}}return l}}function b(i){if(!(typeof i>"u")){var l;try{l=encodeURI(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"encodeUrl"}}return l}}function W(i){if(!(typeof i>"u")){var l;try{l=decodeURIComponent(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"decodeUrlComponent"}}return l}}function he(i){if(!(typeof i>"u")){var l;try{l=decodeURI(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"decodeUrl"}}return l}}async function xe(i,l,u){if(!(typeof i>"u")){if(u<0)throw{code:"D3020",stack:new Error().stack,value:u,index:3};var y=[];if(typeof u>"u"||u>0)if(typeof l=="string")y=i.split(l,u);else{var v=0,x=await ce(l,i);if(typeof x<"u"){for(var U=0;typeof x<"u"&&(typeof u>"u"||v<u);)y.push(i.substring(U,x.start)),U=x.end,x=await ce(x.next),v++;(typeof u>"u"||v<u)&&y.push(i.substring(U))}else y.push(i)}return y}}function _e(i,l){if(!(typeof i>"u"))return typeof l>"u"&&(l=""),i.join(l)}function S(i,l,u){if(!(typeof i>"u")){var y={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},v=y;typeof u<"u"&&o.keys(u).forEach(function(te){v[te]=u[te]});for(var x=[],U=v["zero-digit"].charCodeAt(0),z=U;z<U+10;z++)x.push(String.fromCharCode(z));var ne=x.concat([v["decimal-separator"],v["exponent-separator"],v["grouping-separator"],v.digit,v["pattern-separator"]]),G=l.split(v["pattern-separator"]);if(G.length>2)throw{code:"D3080",stack:new Error().stack};var Ae=function(te){var Oe=(function(){for(var ze,ot=0;ot<te.length;ot++)if(ze=te.charAt(ot),ne.indexOf(ze)!==-1&&ze!==v["exponent-separator"])return te.substring(0,ot);return""})(),Xe=(function(){for(var ze,ot=te.length-1;ot>=0;ot--)if(ze=te.charAt(ot),ne.indexOf(ze)!==-1&&ze!==v["exponent-separator"])return te.substring(ot+1);return""})(),$e=te.substring(Oe.length,te.length-Xe.length),st,qt,rt,es,it=te.indexOf(v["exponent-separator"],Oe.length);it===-1||it>te.length-Xe.length?(st=$e,qt=void 0):(st=$e.substring(0,it),qt=$e.substring(it+1));var mt=st.indexOf(v["decimal-separator"]);return mt===-1?(rt=st,es=Xe):(rt=st.substring(0,mt),es=st.substring(mt+1)),{prefix:Oe,suffix:Xe,activePart:$e,mantissaPart:st,exponentPart:qt,integerPart:rt,fractionalPart:es,subpicture:te}},Pe=function(te){var Oe,Xe,$e=te.subpicture,st=$e.indexOf(v["decimal-separator"]);st!==$e.lastIndexOf(v["decimal-separator"])&&(Oe="D3081"),$e.indexOf(v.percent)!==$e.lastIndexOf(v.percent)&&(Oe="D3082"),$e.indexOf(v["per-mille"])!==$e.lastIndexOf(v["per-mille"])&&(Oe="D3083"),$e.indexOf(v.percent)!==-1&&$e.indexOf(v["per-mille"])!==-1&&(Oe="D3084");var qt=!1;for(Xe=0;Xe<te.mantissaPart.length;Xe++){var rt=te.mantissaPart.charAt(Xe);if(x.indexOf(rt)!==-1||rt===v.digit){qt=!0;break}}qt||(Oe="D3085");var es=te.activePart.split("").map(function(ze){return ne.indexOf(ze)===-1?"p":"a"}).join("");es.indexOf("p")!==-1&&(Oe="D3086"),st!==-1?($e.charAt(st-1)===v["grouping-separator"]||$e.charAt(st+1)===v["grouping-separator"])&&(Oe="D3087"):te.integerPart.charAt(te.integerPart.length-1)===v["grouping-separator"]&&(Oe="D3088"),$e.indexOf(v["grouping-separator"]+v["grouping-separator"])!==-1&&(Oe="D3089");var it=te.integerPart.indexOf(v.digit);it!==-1&&te.integerPart.substring(0,it).split("").filter(function(ze){return x.indexOf(ze)>-1}).length>0&&(Oe="D3090"),it=te.fractionalPart.lastIndexOf(v.digit),it!==-1&&te.fractionalPart.substring(it).split("").filter(function(ze){return x.indexOf(ze)>-1}).length>0&&(Oe="D3091");var mt=typeof te.exponentPart=="string";if(mt&&te.exponentPart.length>0&&($e.indexOf(v.percent)!==-1||$e.indexOf(v["per-mille"])!==-1)&&(Oe="D3092"),mt&&(te.exponentPart.length===0||te.exponentPart.split("").filter(function(ze){return x.indexOf(ze)===-1}).length>0)&&(Oe="D3093"),Oe)throw{code:Oe,stack:new Error().stack}},Te=function(te){var Oe=function(Ve,or){for(var Fs=[],Ot=Ve.indexOf(v["grouping-separator"]);Ot!==-1;){var ar=(or?Ve.substring(0,Ot):Ve.substring(Ot)).split("").filter(function(ds){return x.indexOf(ds)!==-1||ds===v.digit}).length;Fs.push(ar),Ot=te.integerPart.indexOf(v["grouping-separator"],Ot+1)}return Fs},Xe=Oe(te.integerPart),$e=function(Ve){if(Ve.length===0)return 0;for(var or=function(ar,ds){return ds===0?ar:or(ds,ar%ds)},Fs=Ve.reduce(or),Ot=1;Ot<=Ve.length;Ot++)if(Ve.indexOf(Ot*Fs)===-1)return 0;return Fs},st=$e(Xe),qt=Oe(te.fractionalPart,!0),rt=te.integerPart.split("").filter(function(Ve){return x.indexOf(Ve)!==-1}).length,es=rt,it=te.fractionalPart.split(""),mt=it.filter(function(Ve){return x.indexOf(Ve)!==-1}).length,ze=it.filter(function(Ve){return x.indexOf(Ve)!==-1||Ve===v.digit}).length,ot=typeof te.exponentPart=="string";rt===0&&ze===0&&(ot?(mt=1,ze=1):rt=1),ot&&rt===0&&te.integerPart.indexOf(v.digit)!==-1&&(rt=1),rt===0&&mt===0&&(mt=1);var pi=0;return ot&&(pi=te.exponentPart.split("").filter(function(Ve){return x.indexOf(Ve)!==-1}).length),{integerPartGroupingPositions:Xe,regularGrouping:st,minimumIntegerPartSize:rt,scalingFactor:es,prefix:te.prefix,fractionalPartGroupingPositions:qt,minimumFactionalPartSize:mt,maximumFactionalPartSize:ze,minimumExponentSize:pi,suffix:te.suffix,picture:te.subpicture}},Ne=G.map(Ae);Ne.forEach(Pe);var ye=Ne.map(Te),Me=v["minus-sign"],ht=v["zero-digit"],Je=v["decimal-separator"],xt=v["grouping-separator"];ye.length===1&&(ye.push(JSON.parse(JSON.stringify(ye[0]))),ye[1].prefix=Me+ye[1].prefix);var Ue;i>=0?Ue=ye[0]:Ue=ye[1];var Os;Ue.picture.indexOf(v.percent)!==-1?Os=i*100:Ue.picture.indexOf(v["per-mille"])!==-1?Os=i*1e3:Os=i;var zt,fs;if(Ue.minimumExponentSize===0)zt=Os;else{var $l=Math.pow(10,Ue.scalingFactor),Dl=Math.pow(10,Ue.scalingFactor-1);if(zt=Os,fs=0,zt!==0){for(;Math.abs(zt)<Dl;)zt*=10,fs-=1;for(;Math.abs(zt)>$l;)zt/=10,fs+=1}}var Ol=F(zt,Ue.maximumFactionalPartSize),fi=function(te,Oe){var Xe=Math.abs(te).toFixed(Oe);return ht!=="0"&&(Xe=Xe.split("").map(function($e){return $e>="0"&&$e<="9"?x[$e.charCodeAt(0)-48]:$e}).join("")),Xe},ae=fi(Ol,Ue.maximumFactionalPartSize),Ze=ae.indexOf(".");for(Ze===-1?ae=ae+Je:ae=ae.replace(".",Je);ae.charAt(0)===ht;)ae=ae.substring(1);for(;ae.charAt(ae.length-1)===ht;)ae=ae.substring(0,ae.length-1);Ze=ae.indexOf(Je);var Ls=Ue.minimumIntegerPartSize-Ze,di=Ue.minimumFactionalPartSize-(ae.length-Ze-1);if(ae=(Ls>0?new Array(Ls+1).join(ht):"")+ae,ae=ae+(di>0?new Array(di+1).join(ht):""),Ze=ae.indexOf(Je),Ue.regularGrouping>0)for(var Ll=Math.floor((Ze-1)/Ue.regularGrouping),nr=1;nr<=Ll;nr++)ae=[ae.slice(0,Ze-nr*Ue.regularGrouping),xt,ae.slice(Ze-nr*Ue.regularGrouping)].join("");else Ue.integerPartGroupingPositions.forEach(function(te){ae=[ae.slice(0,Ze-te),xt,ae.slice(Ze-te)].join(""),Ze++});if(Ze=ae.indexOf(Je),Ue.fractionalPartGroupingPositions.forEach(function(te){ae=[ae.slice(0,te+Ze+1),xt,ae.slice(te+Ze+1)].join("")}),Ze=ae.indexOf(Je),(Ue.picture.indexOf(Je)===-1||Ze===ae.length-1)&&(ae=ae.substring(0,ae.length-1)),typeof fs<"u"){var ir=fi(fs,0);Ls=Ue.minimumExponentSize-ir.length,Ls>0&&(ir=new Array(Ls+1).join(ht)+ir),ae=ae+v["exponent-separator"]+(fs<0?Me:"")+ir}return ae=Ue.prefix+ae+Ue.suffix,ae}}function D(i,l){if(!(typeof i>"u")){if(i=F(i),typeof l>"u"?l=10:l=F(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var u=i.toString(l);return u}}function P(i){var l;if(!(typeof i>"u")){if(typeof i=="number")l=i;else if(typeof i=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(i)&&!isNaN(parseFloat(i))&&isFinite(i))l=parseFloat(i);else if(typeof i=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(i))l=Number(i);else if(i===!0)l=1;else if(i===!1)l=0;else throw{code:"D3030",value:i,stack:new Error().stack,index:1};return l}}function I(i){var l;if(!(typeof i>"u"))return l=Math.abs(i),l}function q(i){var l;if(!(typeof i>"u"))return l=Math.floor(i),l}function j(i){var l;if(!(typeof i>"u"))return l=Math.ceil(i),l}function F(i,l){var u;if(!(typeof i>"u")){if(l){var y=i.toString().split("e");i=+(y[0]+"e"+(y[1]?+y[1]+l:l))}u=Math.round(i);var v=u-i;return Math.abs(v)===.5&&Math.abs(u%2)===1&&(u=u-1),l&&(y=u.toString().split("e"),u=+(y[0]+"e"+(y[1]?+y[1]-l:-l))),Object.is(u,-0)&&(u=0),u}}function B(i){var l;if(!(typeof i>"u")){if(i<0)throw{stack:new Error().stack,code:"D3060",index:1,value:i};return l=Math.sqrt(i),l}}function Y(i,l){var u;if(!(typeof i>"u")){if(u=Math.pow(i,l),!isFinite(u))throw{stack:new Error().stack,code:"D3061",index:1,value:i,exp:l};return u}}function fe(){return Math.random()}function le(i){if(!(typeof i>"u")){var l=!1;if(Array.isArray(i)){if(i.length===1)l=le(i[0]);else if(i.length>1){var u=i.filter(function(y){return le(y)});l=u.length>0}}else typeof i=="string"?i.length>0&&(l=!0):d(i)?i!==0&&(l=!0):i!==null&&typeof i=="object"&&!w(i)?o.keys(i).length>0&&(l=!0):typeof i=="boolean"&&i===!0&&(l=!0);return l}}function Q(i){if(!(typeof i>"u"))return!le(i)}function K(i,l,u,y){var v=[l],x=R(i);return x>=2&&v.push(u),x>=3&&v.push(y),v}async function ue(i,l){if(!(typeof i>"u")){for(var u=this.createSequence(),y=0;y<i.length;y++){var v=K(l,i[y],y,i),x=await l.apply(this,v);typeof x<"u"&&u.push(x)}return u}}async function J(i,l){if(!(typeof i>"u")){for(var u=this.createSequence(),y=0;y<i.length;y++){var v=i[y],x=K(l,v,y,i),U=await l.apply(this,x);le(U)&&u.push(v)}return u}}async function He(i,l){if(!(typeof i>"u")){for(var u=!1,y,v=0;v<i.length;v++){var x=i[v],U=!0;if(typeof l<"u"){var z=K(l,x,v,i),ne=await l.apply(this,z);U=le(ne)}if(U)if(!u)y=x,u=!0;else throw{stack:new Error().stack,code:"D3138",index:v}}if(!u)throw{stack:new Error().stack,code:"D3139"};return y}}function ut(){for(var i=[],l=Array.prototype.slice.call(arguments),u=Math.min.apply(Math,l.map(function(x){return Array.isArray(x)?x.length:0})),y=0;y<u;y++){var v=l.map(x=>x[y]);i.push(v)}return i}async function Ye(i,l,u){if(!(typeof i>"u")){var y,v=R(l);if(v<2)throw{stack:new Error().stack,code:"D3050",index:1};var x;for(typeof u>"u"&&i.length>0?(y=i[0],x=1):(y=u,x=0);x<i.length;){var U=[y,i[x]];v>=3&&U.push(x),v>=4&&U.push(i),y=await l.apply(this,U),x++}return y}}function Ie(i){var l=this.createSequence();if(Array.isArray(i)){for(var u=Object.create(null),y=0;y<i.length;y++){var v=Ie.call(this,i[y]);v.forEach(function(x){u[x]=!0})}l=Ie.call(this,u)}else i!==null&&typeof i=="object"&&!w(i)&&o.keys(i).forEach(x=>l.push(x));return l}function Ke(i,l){var u;if(Array.isArray(i)){u=this.createSequence();for(var y=0;y<i.length;y++){var v=Ke.call(this,i[y],l);typeof v<"u"&&(Array.isArray(v)?v.forEach(x=>u.push(x)):u.push(v))}}else i!==null&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,l)&&!w(i)&&(u=i[l]);return u}function Dt(i,l){if(typeof i>"u")return l;if(typeof l>"u")return i;Array.isArray(i)||(i=this.createSequence(i)),Array.isArray(l)||(l=[l]);const u=i.length+l.length;if(this.options&&u>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:u};return i.concat(l)}function us(i){return!(typeof i>"u")}function hs(i){var l=this.createSequence();if(Array.isArray(i))for(var u=0;u<i.length;u++)l=Dt.call(this,l,hs.call(this,i[u]));else if(i!==null&&typeof i=="object"&&!E(i))for(const v of o.keys(i)){var y=Object.create(null);y[v]=i[v],l.push(y)}else l=i;return l}function H(i){if(!(typeof i>"u")){var l=Object.create(null);return i.forEach(function(u){for(const y of o.keys(u))l[y]=u[y]}),l}}function sr(i){if(!(typeof i>"u")){if(i.length<=1)return i;for(var l=i.length,u=new Array(l),y=0;y<l;y++)u[l-y-1]=i[y];return u}}async function rr(i,l){var u=this.createSequence();for(const x of o.keys(i)){var y=K(l,i[x],x,i),v=await l.apply(this,y);typeof v<"u"&&u.push(v)}return u}function vt(i){throw{code:"D3137",stack:new Error().stack,message:i||"$error() function evaluated"}}function Ds(i,l){if(!i)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function St(i){if(i!==void 0)return i===null?"null":d(i)?"number":typeof i=="string"?"string":typeof i=="boolean"?"boolean":Array.isArray(i)?"array":w(i)?"function":"object"}async function Qt(i,l){if(!(typeof i>"u")){if(i.length<=1)return i;var u;if(typeof l>"u"){if(!$(i)&&!C(i))throw{stack:new Error().stack,code:"D3070",index:1};u=async function(U,z){return U>z}}else u=l;var y=async function(U,z){var ne=async function(Ae,Pe,Te){Pe.length===0?Array.prototype.push.apply(Ae,Te):Te.length===0?Array.prototype.push.apply(Ae,Pe):await u(Pe[0],Te[0])?(Ae.push(Te[0]),await ne(Ae,Pe,Te.slice(1))):(Ae.push(Pe[0]),await ne(Ae,Pe.slice(1),Te))},G=[];return await ne(G,U,z),G},v=async function(U){if(!Array.isArray(U)||U.length<=1)return U;var z=Math.floor(U.length/2),ne=U.slice(0,z),G=U.slice(z);return ne=await v(ne),G=await v(G),await y(ne,G)},x=await v(i);return x}}function c(i){if(!(typeof i>"u")){if(i.length<=1)return i;for(var l=new Array(i.length),u=0;u<i.length;u++){var y=Math.floor(Math.random()*(u+1));u!==y&&(l[u]=l[y]),l[y]=i[u]}return l}}function f(i){if(!(typeof i>"u")){if(!Array.isArray(i)||i.length<=1)return i;for(var l=k(i)?this.createSequence():[],u=0;u<i.length;u++){for(var y=i[u],v=!1,x=0;x<l.length;x++)if(X(y,l[x])){v=!0;break}v||l.push(y)}return l}}async function g(i,l){var u=Object.create(null);for(const U of o.keys(i)){var y=i[U],v=K(l,y,U,i),x=await l.apply(this,v);le(x)&&(u[U]=y)}return o.keys(u).length===0&&(u=void 0),u}return{sum:A,count:m,max:M,min:_,average:T,string:V,substring:N,substringBefore:ee,substringAfter:oe,lowercase:Se,uppercase:ve,length:pe,trim:Le,pad:nt,match:tt,contains:ge,replace:re,split:xe,join:_e,formatNumber:S,formatBase:D,number:P,floor:q,ceil:j,round:F,abs:I,sqrt:B,power:Y,random:fe,boolean:le,not:Q,map:ue,zip:ut,filter:J,single:He,foldLeft:Ye,sift:g,keys:Ie,lookup:Ke,append:Dt,exists:us,spread:hs,merge:H,reverse:sr,each:rr,error:vt,assert:Ds,type:St,sort:Qt,shuffle:c,distinct:f,base64encode:Fe,base64decode:kt,encodeUrlComponent:p,encodeUrl:b,decodeUrlComponent:W,decodeUrl:he}})();s.exports=h}).call(this)}).call(this,typeof hn<"u"?hn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,s,n){var a=t("./datetime"),o=t("./functions"),h=t("./utils"),d=t("./parser"),C=t("./signature"),$=(function(){var k=h.isNumeric,w=h.isArrayOfStrings,E=h.isArrayOfNumbers,O=h.isSequence,R=h.isFunction,X=h.isLambda,Z=h.isIterable,A=h.isPromise,m=h.getFunctionArity,M=h.isDeepEqual,_=vt(null);async function T(c,f,g){var i;g.base.depth++,g.base.guardrails();var l=g.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(c,f,g),c.type){case"path":i=await V(c,f,g);break;case"binary":i=await pe(c,f,g);break;case"unary":i=await Le(c,f,g);break;case"name":i=nt(c,f,g);break;case"string":case"number":case"value":i=ce(c);break;case"wildcard":i=ge(c,f,g);break;case"descendant":i=re(c,f,g);break;case"parent":i=g.lookup(c.slot.label);break;case"condition":i=await q(c,f,g);break;case"block":i=await j(c,f,g);break;case"bind":i=await I(c,f,g);break;case"regex":i=F(c,f,g);break;case"function":i=await K(c,f,g);break;case"variable":i=B(c,f,g);break;case"lambda":i=He(c,f,g);break;case"partial":i=await ut(c,f,g);break;case"apply":i=await Q(c,f,g);break;case"transform":i=fe(c,f,g);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var u=0;u<c.predicate.length;u++)i=await ve(c.predicate[u].expr,i,g);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(i=await S(c.group,i,g));var y=g.lookup(Symbol.for("jsonata.__evaluate_exit"));return y&&await y(c,f,g,i),i&&O(i)&&!i.tupleStream&&(c.keepArray&&(i.keepSingleton=!0),i.length===0?i=void 0:i.length===1&&(i=i.keepSingleton?i:i[0])),g.base.depth--,i}async function V(c,f,g){var i;Array.isArray(f)&&c.steps[0].type!=="variable"?i=f:i=g.base.createSequence(f);for(var l,u=!1,y=void 0,v=0;v<c.steps.length;v++){var x=c.steps[v];if(x.tuple&&(u=!0),v===0&&x.consarray?l=await T(x,i,g):u?y=await Se(x,i,y,g):l=await ee(x,i,g,v===c.steps.length-1),!u&&(typeof l>"u"||l.length===0))break;typeof x.focus>"u"&&(i=l)}if(u)if(c.tuple)l=y;else for(l=g.base.createSequence(),v=0;v<y.length;v++)l.push(y[v]["@"]);return c.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=g.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(l=await S(c.group,u?y:l,g)),l}function N(c,f){var g=vt(c);for(const i of h.keys(f))g.bind(i,f[i]);return g}async function ee(c,f,g,i){var l;if(c.type==="sort")return l=await Y(c,f,g),c.stages&&(l=await oe(c.stages,l,g)),l;l=g.base.createSequence();for(var u=0;u<f.length;u++){var y=await T(c,f[u],g);if(c.stages)for(var v=0;v<c.stages.length;v++)y=await ve(c.stages[v].expr,y,g);typeof y<"u"&&l.push(y)}var x=g.base.createSequence();return i&&l.length===1&&Array.isArray(l[0])&&!O(l[0])?x=l[0]:Array.prototype.forEach.call(l,function(U){!Array.isArray(U)||U.cons?x.push(U):Array.prototype.forEach.call(U,z=>x.push(z))}),x}async function oe(c,f,g){for(var i=f,l=0;l<c.length;l++){var u=c[l];switch(u.type){case"filter":i=await ve(u.expr,i,g);break;case"index":for(var y=0;y<i.length;y++){var v=i[y];v[u.value]=y}break}}return i}async function Se(c,f,g,i){var l;if(c.type==="sort"){if(g)l=await Y(c,g,i);else{var u=await Y(c,f,i);l=i.base.createSequence(),l.tupleStream=!0;for(var y=0;y<u.length;y++){var v={"@":u[y]};v[c.index]=y,l.push(v)}}return c.stages&&(l=await oe(c.stages,l,i)),l}l=i.base.createSequence(),l.tupleStream=!0;var x=i;g===void 0&&(g=f.map(G=>({"@":G})));for(var U=0;U<g.length;U++){x=N(i,g[U]);var z=await T(c,g[U]["@"],x);if(typeof z<"u"){Array.isArray(z)||(z=[z]);for(var ne=0;ne<z.length;ne++)v=Object.create(null),Object.assign(v,g[U]),z.tupleStream?Object.assign(v,z[ne]):(c.focus?(v[c.focus]=z[ne],v["@"]=g[U]["@"]):v["@"]=z[ne],c.index&&(v[c.index]=ne),c.ancestor&&(v[c.ancestor.label]=g[U]["@"])),l.push(v)}}return c.stages&&(l=await oe(c.stages,l,i)),l}async function ve(c,f,g){var i=g.base.createSequence();if(f&&f.tupleStream&&(i.tupleStream=!0),Array.isArray(f)||(f=g.base.createSequence(f)),c.type==="number"){var l=Math.floor(c.value);l<0&&(l=f.length+l);var u=await f[l];typeof u<"u"&&(Array.isArray(u)?i=u:i.push(u))}else for(l=0;l<f.length;l++){var u=f[l],y=u,v=g;f.tupleStream&&(y=u["@"],v=N(g,u));var x=await T(c,y,v);k(x)&&(x=[x]),E(x)?Array.prototype.forEach.call(x,function(z){var ne=Math.floor(z);ne<0&&(ne=f.length+ne),ne===l&&i.push(u)}):o.boolean(x)&&i.push(u)}return i}async function pe(c,f,g){var i,l=await T(c.lhs,f,g),u=c.value,y=async()=>await T(c.rhs,f,g);if(u==="and"||u==="or")try{return await he(l,y,u)}catch(x){throw x.position=c.position,x.token=u,x}var v=await y();try{switch(u){case"+":case"-":case"*":case"/":case"%":i=kt(l,v,u);break;case"=":case"!=":i=p(l,v,u);break;case"<":case"<=":case">":case">=":i=b(l,v,u);break;case"&":i=_e(l,v);break;case"..":i=P(l,v,g);break;case"in":i=W(l,v);break}}catch(x){throw x.position=c.position,x.token=u,x}return i}async function Le(c,f,g){var i,l={options:g.base.options,createSequence:g.base.createSequence};switch(c.value){case"-":if(i=await T(c.expression,f,g),typeof i>"u")i=void 0;else if(k(i))i=-i;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:i};break;case"[":i=[];let v=await Promise.all(c.expressions.map(async(x,U)=>(g.isParallelCall=U>0,[x,await T(x,f,g)])));for(let x of v){var[u,y]=x;typeof y<"u"&&(u.value==="["?i.push(y):i=o.append.call(l,i,y))}c.consarray&&Object.defineProperty(i,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":i=await S(c,f,g);break}return i}function nt(c,f,g){var i={createSequence:g.base.createSequence};return o.lookup.call(i,f,c.value)}function ce(c){return c.value}function ge(c,f,g){var i={options:g.base.options,createSequence:g.base.createSequence},l=i.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!R(f)&&h.keys(f).forEach(function(u){var y=f[u];Array.isArray(y)?(y=tt(y),l=o.append.call(i,l,y)):l.push(y)}),l}function tt(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(g){tt(g,f)}):f.push(c),f}function re(c,f,g){var i,l=g.base.createSequence();return typeof f<"u"&&(Fe(f,l),l.length===1?i=l[0]:i=l),i}function Fe(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(g){Fe(g,f)}):c!==null&&typeof c=="object"&&!R(c)&&h.keys(c).forEach(function(g){Fe(c[g],f)})}function kt(c,f,g){var i;if(typeof c<"u"&&!k(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!k(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return i;switch(g){case"+":i=c+f;break;case"-":i=c-f;break;case"*":i=c*f;break;case"/":i=c/f;break;case"%":i=c%f;break}return i}function p(c,f,g){var i,l=typeof c,u=typeof f;if(l==="undefined"||u==="undefined")return!1;switch(g){case"=":i=M(c,f);break;case"!=":i=!M(c,f);break}return i}function b(c,f,g){var i,l=typeof c,u=typeof f,y=l==="undefined"||l==="string"||l==="number",v=u==="undefined"||u==="string"||u==="number";if(!y||!v)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?f:c};if(!(l==="undefined"||u==="undefined")){if(l!==u)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(g){case"<":i=c<f;break;case"<=":i=c<=f;break;case">":i=c>f;break;case">=":i=c>=f;break}return i}}function W(c,f){var g=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var i=0;i<f.length;i++)if(f[i]===c){g=!0;break}return g}async function he(c,f,g){var i,l=xe(c);switch(g){case"and":i=l&&xe(await f());break;case"or":i=l||xe(await f());break}return i}function xe(c){var f=o.boolean(c);return typeof f>"u"?!1:f}function _e(c,f){var g,i="",l="";return typeof c<"u"&&(i=o.string(c)),typeof f<"u"&&(l=o.string(f)),g=i.concat(l),g}async function S(c,f,g){var i=Object.create(null),l=Object.create(null),u=!!(f&&f.tupleStream),y={options:g.base.options,createSequence:g.base.createSequence};Array.isArray(f)||(g.base.options,f=y.createSequence(f)),f.length===0&&!u&&f.push(void 0);for(var v=0;v<f.length;v++)for(var x=f[v],U=u?N(g,x):g,z=0;z<c.lhs.length;z++){var ne=c.lhs[z],G=await T(ne[0],u?x["@"]:x,U);if(typeof G!="string"&&G!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:G};if(G!==void 0){if(G==="_jsonata_lambda"||G==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:G};var Ae={data:x,exprIndex:z};if(Object.prototype.hasOwnProperty.call(l,G)){if(l[G].exprIndex!==z)throw{code:"D1009",stack:new Error().stack,position:c.position,value:G};l[G].data=o.append.call(y,l[G].data,x)}else l[G]=Ae}}let Pe=await Promise.all(h.keys(l).map(async(Ne,ye)=>{let Me=l[Ne];var ht=Me.data,Je=g;if(u){var xt=D(Me.data,g);ht=xt["@"],delete xt["@"],Je=N(g,xt)}return g.isParallelCall=ye>0,[Ne,await T(c.lhs[Me.exprIndex][1],ht,Je)]}));for(let Ne of Pe){var[G,Te]=await Ne;typeof Te<"u"&&(i[G]=Te)}return i}function D(c,f){if(!Array.isArray(c))return c;var g=Object.create(null),i={options:f.base.options,createSequence:f.base.createSequence};Object.assign(g,c[0]);for(var l=1;l<c.length;l++)for(const u of h.keys(c[l]))g[u]=o.append.call(i,g[u],c[l][u]);return g}function P(c,f,g){var i;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return i;var l=f-c+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(g.base.options&&l>g.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};i=new Array(l);for(var u=c,y=0;u<=f;u++,y++)i[y]=u;return i.sequence=!0,i}async function I(c,f,g){var i=await T(c.rhs,f,g);return g.bind(c.lhs.value,i),i}async function q(c,f,g){var i,l=await T(c.condition,f,g);return o.boolean(l)?i=await T(c.then,f,g):typeof c.else<"u"&&(i=await T(c.else,f,g)),i}async function j(c,f,g){for(var i,l=vt(g),u=0;u<c.expressions.length;u++)i=await T(c.expressions[u],f,l);return i}function F(c,f,g){var i=new g.base.RegexEngine(c.value),l=function(u,y){var v;i.lastIndex=y||0;var x=i.exec(u);if(x!==null){if(v={match:x[0],start:x.index,end:x.index+x[0].length,groups:[]},x.length>1)for(var U=1;U<x.length;U++)v.groups.push(x[U]);v.next=function(){if(!(i.lastIndex>=u.length)){var z=l(u,i.lastIndex);if(z&&z.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return z}}}return v};return l}function B(c,f,g){var i;return c.value===""?i=f&&f.outerWrapper?f[0]:f:i=g.lookup(c.value),i}async function Y(c,f,g){var i,l=f,u=!!f.tupleStream,y=async function(x,U){for(var z=0,ne=0;z===0&&ne<c.terms.length;ne++){var G=c.terms[ne],Ae=x,Pe=g;u&&(Ae=x["@"],Pe=N(g,x));var Te=await T(G.expression,Ae,Pe);Ae=U,Pe=g,u&&(Ae=U["@"],Pe=N(g,U));var Ne=await T(G.expression,Ae,Pe),ye=typeof Te,Me=typeof Ne;if(ye==="undefined"){z=Me==="undefined"?0:1;continue}if(Me==="undefined"){z=-1;continue}if(!(ye==="string"||ye==="number")||!(Me==="string"||Me==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:ye==="string"||ye==="number"?Ne:Te};if(ye!==Me)throw{code:"T2007",stack:new Error().stack,position:c.position,value:Te,value2:Ne};Te!==Ne&&(Te<Ne?z=-1:z=1,G.descending===!0&&(z=-z))}return z===1},v={environment:g,input:f};return i=await o.sort.apply(v,[l,y]),i}function fe(c,f,g){var i=async function(l){if(!(typeof l>"u")){var u=g.lookup("clone");if(!R(u))throw{code:"T2013",stack:new Error().stack,position:c.position};var y=await ue(u,[l],null,g),v=await T(c.pattern,y,g);if(typeof v<"u"){Array.isArray(v)||(v=[v]);for(var x=0;x<v.length;x++){var U=v[x],z=await T(c.update,U,g),ne=typeof z;if(ne!=="undefined"){if(ne!=="object"||z===null||Array.isArray(z))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:z};for(const Te of h.keys(z))U[Te]=z[Te]}if(typeof c.delete<"u"){var G=await T(c.delete,U,g);if(typeof G<"u"){var Ae=G;if(Array.isArray(G)||(G=[G]),!w(G))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:Ae};for(var Pe=0;Pe<G.length;Pe++)typeof U=="object"&&U!==null&&delete U[G[Pe]]}}}}return y}};return H(i,"<(oa):o>")}var le=d("function($f, $g) { function($x){ $g($f($x)) } }");async function Q(c,f,g){var i,l=await T(c.lhs,f,g);if(c.rhs.type==="function")i=await K(c.rhs,f,g,{context:l});else{var u=await T(c.rhs,f,g);if(!R(u))throw{code:"T2006",stack:new Error().stack,position:c.position,value:u};if(R(l)){var y=await T(le,null,g);i=await ue(y,[l,u],null,g)}else i=await ue(u,[l],null,g)}return i}async function K(c,f,g,i){var l,u=await T(c.procedure,f,g);if(typeof u>"u"&&c.procedure.type==="path"&&g.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var y=[];typeof i<"u"&&y.push(i.context);for(var v=0;v<c.arguments.length;v++){const U=await T(c.arguments[v],f,g);if(R(U)){const z=async function(...ne){return await ue(U,ne,null,g)};z.arity=m(U),y.push(z)}else y.push(U)}var x=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof u=="object"&&(u.token=x,u.position=c.position),l=await ue(u,y,f,g)}catch(U){throw U.position||(U.position=c.position),U.token||(U.token=x),U}return l}async function ue(c,f,g,i){var l;for(l=await J(c,f,g,i);X(l)&&l.thunk===!0;){var u=await T(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(u.token=l.body.procedure.value),u.position=l.body.procedure.position;for(var y=[],v=0;v<l.body.arguments.length;v++)y.push(await T(l.body.arguments[v],l.input,l.environment));l=await J(u,y,g,i)}return l}async function J(c,f,g,i){var l;try{var u=f;if(c&&(u=Ye(c.signature,f,g)),X(c))l=await Ie(c,u);else if(c&&c._jsonata_function===!0){var y={environment:i,input:g,options:i.base.options,createSequence:i.base.createSequence};l=c.implementation.apply(y,u),Z(l)&&(l=l.next().value),A(l)&&(l=await l)}else if(typeof c=="function")l=c.apply(g,u),A(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(v){throw c&&(typeof v.token>"u"&&typeof c.token<"u"&&(v.token=c.token),v.position=c.position||v.position),v}return l}function He(c,f,g){var i={_jsonata_lambda:!0,input:f,environment:g,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(i.thunk=!0),i.apply=async function(l,u){return await ue(i,u,f,l?l.environment:g)},i}async function ut(c,f,g){for(var i,l=[],u=0;u<c.arguments.length;u++){var y=c.arguments[u];y.type==="operator"&&y.value==="?"?l.push(y):l.push(await T(y,f,g))}var v=await T(c.procedure,f,g);if(typeof v>"u"&&c.procedure.type==="path"&&g.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(X(v))i=Ke(v,l,g);else if(v&&v._jsonata_function===!0)i=Dt(v.implementation,l,g);else if(typeof v=="function")i=Dt(v,l,g);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return i}function Ye(c,f,g){if(typeof c>"u")return f;var i=c.validate(f,g);return i}async function Ie(c,f){var g,i=vt(c.environment);return Array.prototype.forEach.call(c.arguments,function(l,u){i.bind(l.value,f[u])}),typeof c.body=="function"?g=await us(c.body,i):g=await T(c.body,c.input,i),g}function Ke(c,f,g){var i=vt(c.environment||g),l=[];Array.prototype.forEach.call(c.arguments,function(y,v){var x=f[v];x&&x.type==="operator"&&x.value==="?"?l.push(y):i.bind(y.value,x)});var u={_jsonata_lambda:!0,input:c.input,environment:i,arguments:l,body:c.body};return u}function Dt(c,f,g){var i=hs(c);i=i.map(function(v){return"$"+v.trim()});var l="function("+i.join(", ")+"){ _ }",u=d(l);u.body=c;var y=Ke(u,f,g);return y}async function us(c,f){var g=hs(c),i=g.map(function(y){return f.lookup(y.trim())}),l={environment:f,createSequence:f.base.createSequence},u=c.apply(l,i);return A(u)&&(u=await u),u}function hs(c){var f=c.toString(),g=/\(([^)]*)\)/.exec(f)[1],i=g.split(",");return i}function H(c,f){var g={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(g.signature=C(f)),g}async function sr(c,f){if(!(typeof c>"u")){var g=this.input;typeof f<"u"&&(g=f,Array.isArray(g)&&!O(g)&&(g=this.createSequence(g),g.outerWrapper=!0));try{var i=d(c,!1)}catch(u){throw St(u),{stack:new Error().stack,code:"D3120",value:u.message,error:u}}try{var l=await T(i,g,this.environment)}catch(u){throw St(u),{stack:new Error().stack,code:"D3121",value:u.message,error:u}}return l}}function rr(c){if(!(typeof c>"u"))return JSON.parse(o.string(c))}function vt(c){var f=Object.create(null);const g={bind:function(l,u){f[l]=u},lookup:function(l){var u;return Object.prototype.hasOwnProperty.call(f,l)?u=f[l]:c&&(u=c.lookup(l)),u},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var i=c.lookup(Symbol.for("jsonata.__createFrame_push"));i&&i(c,g),g.base=c.base}return g}_.bind("sum",H(o.sum,"<a<n>:n>")),_.bind("count",H(o.count,"<a:n>")),_.bind("max",H(o.max,"<a<n>:n>")),_.bind("min",H(o.min,"<a<n>:n>")),_.bind("average",H(o.average,"<a<n>:n>")),_.bind("string",H(o.string,"<x-b?:s>")),_.bind("substring",H(o.substring,"<s-nn?:s>")),_.bind("substringBefore",H(o.substringBefore,"<s-s:s>")),_.bind("substringAfter",H(o.substringAfter,"<s-s:s>")),_.bind("lowercase",H(o.lowercase,"<s-:s>")),_.bind("uppercase",H(o.uppercase,"<s-:s>")),_.bind("length",H(o.length,"<s-:n>")),_.bind("trim",H(o.trim,"<s-:s>")),_.bind("pad",H(o.pad,"<s-ns?:s>")),_.bind("match",H(o.match,"<s-f<s:o>n?:a<o>>")),_.bind("contains",H(o.contains,"<s-(sf):b>")),_.bind("replace",H(o.replace,"<s-(sf)(sf)n?:s>")),_.bind("split",H(o.split,"<s-(sf)n?:a<s>>")),_.bind("join",H(o.join,"<a<s>s?:s>")),_.bind("formatNumber",H(o.formatNumber,"<n-so?:s>")),_.bind("formatBase",H(o.formatBase,"<n-n?:s>")),_.bind("formatInteger",H(a.formatInteger,"<n-s:s>")),_.bind("parseInteger",H(a.parseInteger,"<s-s:n>")),_.bind("number",H(o.number,"<(nsb)-:n>")),_.bind("floor",H(o.floor,"<n-:n>")),_.bind("ceil",H(o.ceil,"<n-:n>")),_.bind("round",H(o.round,"<n-n?:n>")),_.bind("abs",H(o.abs,"<n-:n>")),_.bind("sqrt",H(o.sqrt,"<n-:n>")),_.bind("power",H(o.power,"<n-n:n>")),_.bind("random",H(o.random,"<:n>")),_.bind("boolean",H(o.boolean,"<x-:b>")),_.bind("not",H(o.not,"<x-:b>")),_.bind("map",H(o.map,"<af>")),_.bind("zip",H(o.zip,"<a+>")),_.bind("filter",H(o.filter,"<af>")),_.bind("single",H(o.single,"<af?>")),_.bind("reduce",H(o.foldLeft,"<afj?:j>")),_.bind("sift",H(o.sift,"<o-f?:o>")),_.bind("keys",H(o.keys,"<x-:a<s>>")),_.bind("lookup",H(o.lookup,"<x-s:x>")),_.bind("append",H(o.append,"<xx:a>")),_.bind("exists",H(o.exists,"<x:b>")),_.bind("spread",H(o.spread,"<x-:a<o>>")),_.bind("merge",H(o.merge,"<a<o>:o>")),_.bind("reverse",H(o.reverse,"<a:a>")),_.bind("each",H(o.each,"<o-f:a>")),_.bind("error",H(o.error,"<s?:x>")),_.bind("assert",H(o.assert,"<bs?:x>")),_.bind("type",H(o.type,"<x:s>")),_.bind("sort",H(o.sort,"<af?:a>")),_.bind("shuffle",H(o.shuffle,"<a:a>")),_.bind("distinct",H(o.distinct,"<x:x>")),_.bind("base64encode",H(o.base64encode,"<s-:s>")),_.bind("base64decode",H(o.base64decode,"<s-:s>")),_.bind("encodeUrlComponent",H(o.encodeUrlComponent,"<s-:s>")),_.bind("encodeUrl",H(o.encodeUrl,"<s-:s>")),_.bind("decodeUrlComponent",H(o.decodeUrlComponent,"<s-:s>")),_.bind("decodeUrl",H(o.decodeUrl,"<s-:s>")),_.bind("eval",H(sr,"<sx?:x>")),_.bind("toMillis",H(a.toMillis,"<s-s?:n>")),_.bind("fromMillis",H(a.fromMillis,"<n-s?s?:s>")),_.bind("clone",H(rr,"<(oa)-:o>"));var Ds={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function St(c){var f=Ds[c.code];if(typeof f<"u"){var g=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});g=g.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=g}}function Qt(c,f){var g,i;try{g=d(c,f&&f.recover),i=g.errors,delete g.errors}catch(y){throw St(y),y}var l=vt(_),u=new Date;return l.bind("now",H(function(y,v){return a.fromMillis(u.getTime(),y,v)},"<s?s?:s>")),l.bind("millis",H(function(){return u.getTime()},"<:n>")),{evaluate:async function(y,v,x){if(typeof i<"u"){var U={code:"S0500",position:0};throw St(U),U}const z=vt(l);for(const G of h.keys(v))z.bind(G,v[G]);if(z.bind("$",y),u=new Date,z.timestamp=u,z.options=f,z.createSequence=function(){var G=[];return f&&f.sequence&&(G.push=function(...Ae){if(G.length+Ae.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(G,Ae)}),G.sequence=!0,arguments.length===1&&G.push(arguments[0]),G},Array.isArray(y)&&!O(y)&&(y=z.createSequence(y),y.outerWrapper=!0),f&&(f.timeout||f.stack)){const G=Date.now();z.guardrails=function(){if(f.stack>0&&z.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-G>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else z.guardrails=function(){};z.base=z,z.depth=0,f&&f.RegexEngine?z.RegexEngine=f.RegexEngine:z.RegexEngine=RegExp;var ne;try{return ne=await T(g,y,z),typeof x=="function"&&x(null,ne),ne}catch(G){throw St(G),G}},assign:function(y,v){l.bind(y,v)},registerFunction:function(y,v,x){var U=H(v,x);l.bind(y,U)},ast:function(){return g},errors:function(){return i}}}return Qt.parser=d,Qt})();s.exports=$},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,s,n){var a=t("./signature");const o=(()=>{var h={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
44
- `,r:"\r",t:" "},C=function(k){var w=0,E=k.length,O=function(Z,A){var m={type:Z,value:A,position:w};return m},R=function(){for(var Z=w,A=0,m,M,_=function(V){if(k.charAt(V)==="/"&&A===0){for(var N=0;k.charAt(V-(N+1))==="\\";)N++;if(N%2===0)return!0}return!1};w<E;){var T=k.charAt(w);if(_(w)){if(m=k.substring(Z,w),m==="")throw{code:"S0301",stack:new Error().stack,position:w};for(w++,T=k.charAt(w),Z=w;T==="i"||T==="m";)w++,T=k.charAt(w);return M=k.substring(Z,w)+"g",new RegExp(m,M)}(T==="("||T==="["||T==="{")&&k.charAt(w-1)!=="\\"&&A++,(T===")"||T==="]"||T==="}")&&k.charAt(w-1)!=="\\"&&A--,w++}throw{code:"S0302",stack:new Error().stack,position:w}},X=function(Z){if(w>=E)return null;for(var A=k.charAt(w);w<E&&`
45
- \r\v`.indexOf(A)>-1;)w++,A=k.charAt(w);if(A==="/"&&k.charAt(w+1)==="*"){var m=w;for(w+=2,A=k.charAt(w);!(A==="*"&&k.charAt(w+1)==="/");)if(A=k.charAt(++w),w>=E)throw{code:"S0106",stack:new Error().stack,position:m};return w+=2,A=k.charAt(w),X(Z)}if(Z!==!0&&A==="/")return w++,O("regex",R());if(A==="."&&k.charAt(w+1)===".")return w+=2,O("operator","..");if(A===":"&&k.charAt(w+1)==="=")return w+=2,O("operator",":=");if(A==="!"&&k.charAt(w+1)==="=")return w+=2,O("operator","!=");if(A===">"&&k.charAt(w+1)==="=")return w+=2,O("operator",">=");if(A==="<"&&k.charAt(w+1)==="=")return w+=2,O("operator","<=");if(A==="*"&&k.charAt(w+1)==="*")return w+=2,O("operator","**");if(A==="~"&&k.charAt(w+1)===">")return w+=2,O("operator","~>");if(A==="?"&&k.charAt(w+1)===":")return w+=2,O("operator","?:");if(A==="?"&&k.charAt(w+1)==="?")return w+=2,O("operator","??");if(Object.prototype.hasOwnProperty.call(h,A))return w++,O("operator",A);if(A==='"'||A==="'"){var M=A;w++;for(var _="";w<E;){if(A=k.charAt(w),A==="\\")if(w++,A=k.charAt(w),Object.prototype.hasOwnProperty.call(d,A))_+=d[A];else if(A==="u"){var T=k.substr(w+1,4);if(/^[0-9a-fA-F]+$/.test(T)){var V=parseInt(T,16);_+=String.fromCharCode(V),w+=4}else throw{code:"S0104",stack:new Error().stack,position:w}}else throw{code:"S0103",stack:new Error().stack,position:w,token:A};else{if(A===M)return w++,O("string",_);_+=A}w++}throw{code:"S0101",stack:new Error().stack,position:w}}var N=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ee=N.exec(k.substring(w));if(ee!==null){var oe=parseFloat(ee[0]);if(!isNaN(oe)&&isFinite(oe))return w+=ee[0].length,O("number",oe);throw{code:"S0102",stack:new Error().stack,position:w,token:ee[0]}}var Se;if(A==="`"){w++;var ve=k.indexOf("`",w);if(ve!==-1)return Se=k.substring(w,ve),w=ve+1,O("name",Se);throw w=E,{code:"S0105",stack:new Error().stack,position:w}}for(var pe=w,Le;;)if(Le=k.charAt(pe),pe===E||`
46
- \r\v`.indexOf(Le)>-1||Object.prototype.hasOwnProperty.call(h,Le)){if(k.charAt(w)==="$")return Se=k.substring(w+1,pe),w=pe,O("variable",Se);switch(Se=k.substring(w,pe),w=pe,Se){case"or":case"in":case"and":return O("operator",Se);case"true":return O("value",!0);case"false":return O("value",!1);case"null":return O("value",null);default:return w===E&&Se===""?null:O("name",Se)}}else pe++};return X},$=function(k,w){var E,O,R=Object.create(null),X=[],Z=function(){var p=[];E.id!=="(end)"&&p.push({type:E.type,value:E.value,position:E.position});for(var b=O();b!==null;)p.push(b),b=O();return p},A={nud:function(){var p={code:"S0211",token:this.value,position:this.position};if(w)return p.remaining=Z(),p.type="error",X.push(p),p;throw p.stack=new Error().stack,p}},m=function(p,b){var W=R[p];return b=b||0,W?b>=W.lbp&&(W.lbp=b):(W=Object.create(A),W.id=W.value=p,W.lbp=b,R[p]=W),W},M=function(p){if(w){p.remaining=Z(),X.push(p);var b=R["(error)"];return E=Object.create(b),E.error=p,E.type="(error)",E}else throw p.stack=new Error().stack,p},_=function(p,b){if(p&&E.id!==p){var W;E.id==="(end)"?W="S0203":W="S0202";var he={code:W,position:E.position,token:E.value,value:p};return M(he)}var xe=O(b);if(xe===null)return E=R["(end)"],E.position=k.length,E;var _e=xe.value,S=xe.type,D;switch(S){case"name":case"variable":D=R["(name)"];break;case"operator":if(D=R[_e],!D)return M({code:"S0204",stack:new Error().stack,position:xe.position,token:_e});break;case"string":case"number":case"value":D=R["(literal)"];break;case"regex":S="regex",D=R["(regex)"];break;default:return M({code:"S0205",stack:new Error().stack,position:xe.position,token:_e})}return E=Object.create(D),E.value=_e,E.type=S,E.position=xe.position,E},T=function(p){var b,W=E;for(_(null,!0),b=W.nud();p<E.lbp;)W=E,_(),b=W.led(b);return b},V=function(p){var b=m(p,0);b.nud=function(){return this}},N=function(p,b,W){var he=b||h[p],xe=m(p,he);return xe.led=W||function(_e){return this.lhs=_e,this.rhs=T(he),this.type="binary",this},xe},ee=function(p,b,W){var he=m(p,b);return he.led=W,he},oe=function(p,b){var W=m(p);return W.nud=b||function(){return this.expression=T(70),this.type="unary",this},W};V("(end)"),V("(name)"),V("(literal)"),V("(regex)"),m(":"),m(";"),m(","),m(")"),m("]"),m("}"),m(".."),N("."),N("+"),N("-"),N("*"),N("/"),N("%"),N("="),N("<"),N(">"),N("!="),N("<="),N(">="),N("&"),N("and"),N("or"),N("in"),V("and"),V("or"),V("in"),oe("-"),N("~>"),N("??",h["??"],function(p){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(p))]},this.then=p,this.else=T(0),this}),ee("(error)",10,function(p){return this.lhs=p,this.error=E.error,this.remaining=Z(),this.type="error",this}),oe("*",function(){return this.type="wildcard",this}),oe("**",function(){return this.type="descendant",this}),oe("%",function(){return this.type="parent",this}),N("(",h["("],function(p){if(this.procedure=p,this.type="function",this.arguments=[],E.id!==")")for(;E.type==="operator"&&E.id==="?"?(this.type="partial",this.arguments.push(E),_("?")):this.arguments.push(T(0)),E.id===",";)_(",");if(_(")",!0),p.type==="name"&&(p.value==="function"||p.value==="λ")){if(this.arguments.forEach(function(_e,S){if(_e.type!=="variable")return M({code:"S0208",stack:new Error().stack,position:_e.position,token:_e.value,value:S+1})}),this.type="lambda",E.id==="<"){for(var b=E.position,W=1,he="<";W>0&&E.id!=="{"&&E.id!=="(end)";){var xe=_();xe.id===">"?W--:xe.id==="<"&&W++,he+=xe.value}_(">");try{this.signature=a(he)}catch(_e){return _e.position=b+_e.offset,M(_e)}}_("{"),this.body=T(0),_("}")}return this}),oe("(",function(){for(var p=[];E.id!==")"&&(p.push(T(0)),E.id===";");)_(";");return _(")",!0),this.type="block",this.expressions=p,this}),oe("[",function(){var p=[];if(E.id!=="]")for(;;){var b=T(0);if(E.id===".."){var W={type:"binary",value:"..",position:E.position,lhs:b};_(".."),W.rhs=T(0),b=W}if(p.push(b),E.id!==",")break;_(",")}return _("]",!0),this.expressions=p,this.type="unary",this}),N("[",h["["],function(p){if(E.id==="]"){for(var b=p;b&&b.type==="binary"&&b.value==="[";)b=b.lhs;return b.keepArray=!0,_("]"),p}else return this.lhs=p,this.rhs=T(h["]"]),this.type="binary",_("]",!0),this}),N("^",h["^"],function(p){_("(");for(var b=[];;){var W={descending:!1};if(E.id==="<"?_("<"):E.id===">"&&(W.descending=!0,_(">")),W.expression=T(0),b.push(W),E.id!==",")break;_(",")}return _(")"),this.lhs=p,this.rhs=b,this.type="binary",this});var Se=function(p){var b=[];if(E.id!=="}")for(;;){var W=T(0);_(":");var he=T(0);if(b.push([W,he]),E.id!==",")break;_(",")}return _("}",!0),typeof p>"u"?(this.lhs=b,this.type="unary"):(this.lhs=p,this.rhs=b,this.type="binary"),this};oe("{",Se),N("{",h["{"],Se),ee(":=",h[":="],function(p){return p.type!=="variable"?M({code:"S0212",stack:new Error().stack,position:p.position,token:p.value}):(this.lhs=p,this.rhs=T(h[":="]-1),this.type="binary",this)}),N("@",h["@"],function(p){return this.lhs=p,this.rhs=T(h["@"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),N("#",h["#"],function(p){return this.lhs=p,this.rhs=T(h["#"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),N("?",h["?"],function(p){return this.type="condition",this.condition=p,this.then=T(0),E.id===":"&&(_(":"),this.else=T(0)),this}),N("?:",h["?:"],function(p){return this.type="condition",this.condition=JSON.parse(JSON.stringify(p)),this.then=p,this.else=T(0),this}),oe("|",function(){return this.type="transform",this.pattern=T(0),_("|"),this.update=T(0),E.id===","&&(_(","),this.delete=T(0)),_("|"),this});var ve=function(p){var b;if(p.type==="function"&&!p.predicate){var W={type:"lambda",thunk:!0,arguments:[],position:p.position};W.body=p,b=W}else if(p.type==="condition")p.then=ve(p.then),typeof p.else<"u"&&(p.else=ve(p.else)),b=p;else if(p.type==="block"){var he=p.expressions.length;he>0&&(p.expressions[he-1]=ve(p.expressions[he-1])),b=p}else b=p;return b},pe=0,Le=0,nt=[],ce=function(p,b){switch(p.type){case"name":case"wildcard":b.level--,b.level===0&&(typeof p.ancestor>"u"||(nt[b.index].slot.label=p.ancestor.label),p.ancestor=b,p.tuple=!0);break;case"parent":b.level++;break;case"block":p.expressions.length>0&&(p.tuple=!0,b=ce(p.expressions[p.expressions.length-1],b));break;case"path":p.tuple=!0;var W=p.steps.length-1;for(b=ce(p.steps[W--],b);b.level>0&&W>=0;)b=ce(p.steps[W--],b);break;default:throw{code:"S0217",token:p.type,position:p.position}}return b},ge=function(p,b){if(typeof b.seekingParent<"u"||b.type==="parent"){var W=typeof b.seekingParent<"u"?b.seekingParent:[];b.type==="parent"&&W.push(b.slot),typeof p.seekingParent>"u"?p.seekingParent=W:Array.prototype.push.apply(p.seekingParent,W)}},tt=function(p){var b=p.steps.length-1,W=p.steps[b],he=typeof W.seekingParent<"u"?W.seekingParent:[];W.type==="parent"&&he.push(W.slot);for(var xe=0;xe<he.length;xe++){var _e=he[xe];for(b=p.steps.length-2;_e.level>0;){if(b<0){typeof p.seekingParent>"u"?p.seekingParent=[_e]:p.seekingParent.push(_e);break}for(var S=p.steps[b--];b>=0&&S.focus&&p.steps[b].focus;)S=p.steps[b--];_e=ce(S,_e)}}},re=function(p){var b;switch(p.type){case"binary":switch(p.value){case".":var W=re(p.lhs);W.type==="path"?b=W:b={type:"path",steps:[W]},W.type==="parent"&&(b.seekingParent=[W.slot]);var he=re(p.rhs);he.type==="path"?Array.prototype.push.apply(b.steps,he.steps):(typeof he.predicate<"u"&&(he.stages=he.predicate,delete he.predicate),b.steps.push(he)),b.steps.filter(function(B){if(B.type==="number"||B.type==="value")throw{code:"S0213",stack:new Error().stack,position:B.position,value:B.value};return B.type==="string"}).forEach(function(B){B.type="name"}),b.steps.filter(function(B){return B.keepArray===!0}).length>0&&(b.keepSingletonArray=!0);var xe=b.steps[0];xe.type==="unary"&&xe.value==="["&&(xe.consarray=!0);var _e=b.steps[b.steps.length-1];_e.type==="unary"&&_e.value==="["&&(_e.consarray=!0),tt(b);break;case"[":b=re(p.lhs);var S=b,D="predicate";if(b.type==="path"&&(S=b.steps[b.steps.length-1],D="stages"),typeof S.group<"u")throw{code:"S0209",stack:new Error().stack,position:p.position};typeof S[D]>"u"&&(S[D]=[]);var P=re(p.rhs);typeof P.seekingParent<"u"&&(P.seekingParent.forEach(B=>{B.level===1?ce(S,B):B.level--}),ge(S,P)),S[D].push({type:"filter",expr:P,position:p.position});break;case"{":if(b=re(p.lhs),typeof b.group<"u")throw{code:"S0210",stack:new Error().stack,position:p.position};b.group={lhs:p.rhs.map(function(B){return[re(B[0]),re(B[1])]}),position:p.position};break;case"^":b=re(p.lhs),b.type!=="path"&&(b={type:"path",steps:[b]});var I={type:"sort",position:p.position};I.terms=p.rhs.map(function(B){var Y=re(B.expression);return ge(I,Y),{descending:B.descending,expression:Y}}),b.steps.push(I),tt(b);break;case":=":b={type:"bind",value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),ge(b,b.rhs);break;case"@":if(b=re(p.lhs),S=b,b.type==="path"&&(S=b.steps[b.steps.length-1]),typeof S.stages<"u"||typeof S.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:p.position};if(S.type==="sort")throw{code:"S0216",stack:new Error().stack,position:p.position};p.keepArray&&(S.keepArray=!0),S.focus=p.rhs.value,S.tuple=!0;break;case"#":b=re(p.lhs),S=b,b.type==="path"?S=b.steps[b.steps.length-1]:(b={type:"path",steps:[b]},typeof S.predicate<"u"&&(S.stages=S.predicate,delete S.predicate)),typeof S.stages>"u"?S.index=p.rhs.value:S.stages.push({type:"index",value:p.rhs.value,position:p.position}),S.tuple=!0;break;case"~>":b={type:"apply",value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),b.keepArray=b.lhs.keepArray||b.rhs.keepArray;break;default:b={type:p.type,value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),ge(b,b.lhs),ge(b,b.rhs)}break;case"unary":b={type:p.type,value:p.value,position:p.position},p.value==="["?b.expressions=p.expressions.map(function(B){var Y=re(B);return ge(b,Y),Y}):p.value==="{"?b.lhs=p.lhs.map(function(B){var Y=re(B[0]);ge(b,Y);var fe=re(B[1]);return ge(b,fe),[Y,fe]}):(b.expression=re(p.expression),p.value==="-"&&b.expression.type==="number"?(b=b.expression,b.value=-b.value):ge(b,b.expression));break;case"function":case"partial":b={type:p.type,name:p.name,value:p.value,position:p.position},b.arguments=p.arguments.map(function(B){var Y=re(B);return ge(b,Y),Y}),b.procedure=re(p.procedure);break;case"lambda":b={type:p.type,arguments:p.arguments,signature:p.signature,position:p.position};var q=re(p.body);b.body=ve(q);break;case"condition":b={type:p.type,position:p.position},b.condition=re(p.condition),ge(b,b.condition),b.then=re(p.then),ge(b,b.then),typeof p.else<"u"&&(b.else=re(p.else),ge(b,b.else));break;case"transform":b={type:p.type,position:p.position},b.pattern=re(p.pattern),b.update=re(p.update),typeof p.delete<"u"&&(b.delete=re(p.delete));break;case"block":b={type:p.type,position:p.position},b.expressions=p.expressions.map(function(B){var Y=re(B);return ge(b,Y),(Y.consarray||Y.type==="path"&&Y.steps[0].consarray)&&(b.consarray=!0),Y});break;case"name":b={type:"path",steps:[p]},p.keepArray&&(b.keepSingletonArray=!0);break;case"parent":b={type:"parent",slot:{label:"!"+pe++,level:1,index:Le++}},nt.push(b);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":b=p;break;case"operator":if(p.value==="and"||p.value==="or"||p.value==="in")p.type="name",b=re(p);else if(p.value==="?")b=p;else throw{code:"S0201",stack:new Error().stack,position:p.position,token:p.value};break;case"error":b=p,p.lhs&&(b=re(p.lhs));break;default:var j="S0206";p.id==="(end)"&&(j="S0207");var F={code:j,position:p.position,token:p.value};if(w)return X.push(F),{type:"error",error:F};throw F.stack=new Error().stack,F}return p.keepArray&&(b.keepArray=!0),b};O=C(k),_();var Fe=T(0);if(E.id!=="(end)"){var kt={code:"S0201",position:E.position,token:E.value};M(kt)}if(Fe=re(Fe),Fe.type==="parent"||typeof Fe.seekingParent<"u")throw{code:"S0217",token:Fe.type,position:Fe.position};return X.length>0&&(Fe.errors=X),Fe};return $})();s.exports=o},{"./signature":5}],5:[function(t,s,n){var a=t("./utils");const o=(()=>{var h={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function d(C){for(var $=1,k=[],w=Object.create(null),E=w;$<C.length;){var O=C.charAt($);if(O===":")break;var R=function(){k.push(w),E=w,w=Object.create(null)},X=function(N,ee,oe,Se){for(var ve=1,pe=ee;pe<N.length;)if(pe++,O=N.charAt(pe),O===Se){if(ve--,ve===0)break}else O===oe&&ve++;return pe};switch(O){case"s":case"n":case"b":case"l":case"o":w.regex="["+O+"m]",w.type=O,R();break;case"a":w.regex="[asnblfom]",w.type=O,w.array=!0,R();break;case"f":w.regex="f",w.type=O,R();break;case"j":w.regex="[asnblom]",w.type=O,R();break;case"x":w.regex="[asnblfom]",w.type=O,R();break;case"-":E.context=!0,E.contextRegex=new RegExp(E.regex),E.regex+="?";break;case"?":case"+":E.regex+=O;break;case"(":var Z=X(C,$,"(",")"),A=C.substring($+1,Z);if(A.indexOf("<")===-1)w.regex="["+A+"m]";else throw{code:"S0402",stack:new Error().stack,value:A,offset:$};w.type="("+A+")",$=Z,R();break;case"<":if(E.type==="a"||E.type==="f"){var m=X(C,$,"<",">");E.subtype=C.substring($+1,m),$=m}else throw{code:"S0401",stack:new Error().stack,value:E.type,offset:$};break}$++}var M="^"+k.map(function(N){return"("+N.regex+")"}).join("")+"$",_=new RegExp(M),T=function(N){var ee;if(a.isFunction(N))ee="f";else{var oe=typeof N;switch(oe){case"string":ee="s";break;case"number":ee="n";break;case"boolean":ee="b";break;case"object":N===null?ee="l":Array.isArray(N)?ee="a":ee="o";break;case"undefined":default:ee="m"}}return ee},V=function(N,ee){for(var oe="^",Se=0,ve=0;ve<k.length;ve++){oe+=k[ve].regex;var pe=ee.match(oe);if(pe===null)throw{code:"T0410",stack:new Error().stack,value:N[Se],index:Se+1};Se=pe[0].length}throw{code:"T0410",stack:new Error().stack,value:N[Se],index:Se+1}};return{definition:C,validate:function(N,ee){var oe="";N.forEach(function(Le){oe+=T(Le)});var Se=_.exec(oe);if(Se){var ve=[],pe=0;return k.forEach(function(Le,nt){var ce=N[pe],ge=Se[nt+1];if(ge==="")if(Le.context&&Le.contextRegex){var tt=T(ee);if(Le.contextRegex.test(tt))ve.push(ee);else throw{code:"T0411",stack:new Error().stack,value:ee,index:pe+1}}else ve.push(ce),pe++;else ge.split("").forEach(function(re){if(ce=N[pe],Le.type==="a"){if(re==="m")ce=void 0;else{var Fe=!0;if(typeof Le.subtype<"u"){if(re!=="a"&&ge!==Le.subtype)Fe=!1;else if(re==="a"&&ce.length>0){var kt=T(ce[0]);if(kt!==Le.subtype.charAt(0))Fe=!1;else{var p=ce.filter(function(b){return T(b)!==kt});Fe=p.length===0}}}if(!Fe)throw{code:"T0412",stack:new Error().stack,value:ce,index:pe+1,type:h[Le.subtype]};re!=="a"&&(ce=[ce])}ve.push(ce),pe++}else ve.push(ce),pe++})}),ve}V(N,oe)}}}return d})();s.exports=o},{"./utils":6}],6:[function(t,s,n){const a=(()=>{function o(m){var M=!1;if(typeof m=="number"&&(M=!isNaN(m),M&&!isFinite(m)))throw{code:"D1001",value:m,stack:new Error().stack};return M}function h(m){var M=!1;return Array.isArray(m)&&(M=m.filter(function(_){return typeof _!="string"}).length===0),M}function d(m){var M=!1;return Array.isArray(m)&&(M=m.filter(function(_){return!o(_)}).length===0),M}function C(m){return m.sequence===!0&&Array.isArray(m)}function $(m){return m&&(m._jsonata_function===!0||m._jsonata_lambda===!0)||typeof m=="function"}function k(m){var M=typeof m.arity=="number"?m.arity:typeof m.implementation=="function"?m.implementation.length:typeof m.length=="number"?m.length:m.arguments.length;return M}function w(m){return m&&m._jsonata_lambda===!0}var E=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function O(m){return typeof m=="object"&&m!==null&&E in m&&"next"in m&&typeof m.next=="function"}function R(m,M){if(m===M)return!0;if(typeof m=="object"&&typeof M=="object"&&m!==null&&M!==null){if(Array.isArray(m)&&Array.isArray(M)){if(m.length!==M.length)return!1;for(var _=0;_<m.length;_++)if(!R(m[_],M[_]))return!1;return!0}var T=Object.getOwnPropertyNames(m),V=Object.getOwnPropertyNames(M);if(T.length!==V.length)return!1;for(T=T.sort(),V=V.sort(),_=0;_<T.length;_++)if(T[_]!==V[_])return!1;for(_=0;_<T.length;_++){var N=T[_];if(!R(m[N],M[N]))return!1}return!0}return!1}function X(m){return typeof m=="object"&&m!==null&&"then"in m&&typeof m.then=="function"}function Z(m){var M=[];for(let _ of m)M.push(_);return M}function A(m){return typeof m=="object"&&m!==null?Object.keys(m):[]}return{isNumeric:o,isArrayOfStrings:h,isArrayOfNumbers:d,isSequence:C,isFunction:$,isLambda:w,isIterable:O,getFunctionArity:k,isDeepEqual:R,stringToArray:Z,isPromise:X,keys:A}})();s.exports=a},{}]},{},[3])(3)})})(yr)),yr.exports}var Hi=Bi();const Vi=fn(Hi);class pn{constructor(e){this.path=e}toString(){return this.path}}function gn(r){return new Proxy(r,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const s=e.path?`${e.path}.${String(t)}`:String(t);return gn(new pn(s))}})}const Wi=/\$\{|\{\$/;function Gi(r){return Wi.test(r)}function br(r){const e=typeof r=="string"?r:r.path;if(Gi(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const zs=function(r){return this instanceof zs?gn(new pn(r)):new zs(r)},wr="1";function Yi(r){const e=r.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let Be=class Qe{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const s=t.indexOf("=");return e[t.substring(0,s).trim()]=t.substring(s+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let s=e;for(;s;){if(!t(s))return;s=s.parentNode||s.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let s=e;for(;s;){if(s instanceof Element&&s.nodeType===1){const n=window.getComputedStyle(s);if(Qe.overflowMatches(n,t))return s}s=Qe.nextComposedAncestor(s)}return null}static getScrollableAncestor(e){return Qe.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Qe.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const s of Qe.scopeAttributeNames(t))if(e.hasAttribute(s))return e.getAttribute(s)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let s=e;for(;s;){if(s instanceof HTMLElement){const a=Qe.readScopeAttributeOnElement(s,t);if(a!=null)return a}const n=s.parentNode||s.host;if(!n)break;s=n}return null}static getApiConfiguration(e){const t=Qe.getAncestorAttributeValue(e,"token"),s=Qe.getAncestorAttributeValue(e,"addHTTPResponse")!=null,n=Qe.getAncestorAttributeValue(e,"serviceURL");let a=null,o=null;const h=Qe.getAncestorAttributeValue(e,"tokenProvider"),d=Qe.getAncestorAttributeValue(e,"eventsApiToken");t||(a=Qe.getAncestorAttributeValue(e,"userName"),o=Qe.getAncestorAttributeValue(e,"password"));const C=Qe.getAncestorAttributeValue(e,"credentials")||void 0,$=e.getAttribute("cache"),k=e.hasAttribute("blockUntilDone"),w=e.hasAttribute("keepAlive");return{serviceURL:n,token:t,userName:a,password:o,authToken:d,tokenProvider:h,addHTTPResponse:s,credentials:C,cache:$,blockUntilDone:k,keepAlive:w}}static getClosestElement(e,t){let s=e;for(;s&&!(s.nodeName&&s.nodeName.toLowerCase()===t);){const n=s.parentNode||s.host;if(!n){s=null;break}s=n}return s?.nodeName?s:null}static getClosestForm(e){return Qe.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const s=new Set(t.map(o=>o.toLowerCase())),n=[];let a=e.parentNode||e.host;for(;a;)a instanceof Element&&s.has(a.tagName.toLowerCase())&&n.push(a),a=a.parentNode||a.host;return n}static getAncestorsBySelectors(e,t){const s=[];let n=e.parentNode||e.host;for(;n;){if(n instanceof Element)for(const a of t)try{if(n.matches(a)){s.push(n);break}}catch{}n=n.parentNode||n.host}return s}static async loadJS(e){if(!Yi(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,s=Array.from(document.scripts).find(a=>a.src===t);if(s)return s.dataset.concordeLoaded===wr?!0:new Promise(a=>{let o=!1;const h=C=>{o||(o=!0,C&&(s.dataset.concordeLoaded=wr),a(C))};s.addEventListener("load",()=>h(!0),{once:!0}),s.addEventListener("error",()=>h(!1),{once:!0});const d=s.readyState;if(d==="complete"||d==="loaded"){h(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||h(!0)})})});const n=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(a=>{const o=document.createElement("script");o.src=e,n&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded=wr,a(!0)},o.onerror=()=>a(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(t=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=e,s.onload=()=>t(!0),s.onerror=()=>t(!0),document.head.appendChild(s)})}};const vn=r=>{const e=document.documentElement;new MutationObserver(s=>{for(const n of s)n.type==="attributes"&&n.attributeName==="lang"&&r()}).observe(e,{attributes:!0,attributeFilter:["lang"]})};let lt=class Lt{static shallowEqual(e,t,s=!0){const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length&&s)return!1;for(const o of n){const h=e[o],d=t[o];if(s?h!==d:h!=d)return!1}return!0}static deepEqual(e,t,s=!0){const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length&&s)return!1;for(const o of n){const h=e[o],d=t[o],C=Lt.isObject(h)&&Lt.isObject(d),$=s?h!==d:h!=d;if(C&&!Lt.deepEqual(h,d)||!C&&$)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return Lt.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,s=!1){for(const n of t){const a=e[n];if(a===void 0)return;s&&Lt.isObject(a)?e=Object.assign(Array.isArray(a)?[]:{},e,a):e=e[n]}return e}static traverseDotNotation(e,t,s=!1){return Lt.traverse(e,t.split("."),s)}static getURLSearchArray(e,t=""){let s=[];for(let n in e){const a=e[n];t&&(n=t+"["+n+"]"),Lt.isObject(a)?s=[...s,...this.getURLSearchArray(a,n)]:s.push(`${n}=${a}`)}return s}static getURLSearchString(e){return Lt.getURLSearchArray(e,"").join("&")}};const ys=lt.traverseDotNotation;let Ki=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},mn="sonic";typeof __SONIC_PREFIX__<"u"&&(mn=__SONIC_PREFIX__);let yn=mn.replace(/-([a-z])/g,r=>r[1].toUpperCase());const _r=yn.charAt(0).toUpperCase()+yn.slice(1);function Ji(r){return!1}function qs(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Mt(r){return typeof r=="object"&&r!==null}let os="sonic";typeof __SONIC_PREFIX__>"u"&&(os="sonic");const Ar=os=="sonic"?"publisher-proxies-data":os+"-publisher-proxies-data",jt=class jt{constructor(e,t,s){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=t||null,this._parentKey_=s,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(t=>t()),this._is_savable_&&!De.changed){De.changed=!0,De.saveId++;const t=De.saveId;setTimeout(()=>De.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const s=this.get();this._assignListeners_.forEach(n=>{n(s)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(s=>{s[e]!==t&&(s[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(s=>{const n=Object.getOwnPropertyDescriptor(s,e);n&&!n.set&&!n.writable||(s.propertyMap&&s.propertyMap[e]&&(e=s.propertyMap[e]),typeof s[e]<"u"&&s[e]!==t&&(s[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const t in this._value_){let s=t;const n=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(s=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==n&&(e[s]=n)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const s=this._value_[t];e[t]!==s&&(e[t]=s)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||Mt(this._value_)&&Mt(e)&&e&&qs(this._value_)&&qs(e)&&this._value_.__value===e.__value||!Mt(e)&&e===this._value_.__value)return!0;this._value_=Mt(e)?e:{__value:e},this._cachedGet_=void 0;const s=qs(this._value_);if(this._parentKey_&&this.parent){const n=qs(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:n});else{const a=[];a[Number(this._parentKey_)]=n,this.parent.set(a)}else this.parent._value_[this._parentKey_]=n}if(s)return this._proxies_.forEach((n,a)=>{a!="_parent_"&&(n.set(null),this._publishDynamicFilling_(a,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,a)=>{const o=this._value_[a];a!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(a))&&(n.set(null),this._publishDynamicFilling_(a,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Mt(this._value_))for(const n in this._value_){const a=e[n],h=Mt(a)?a:{__value:a};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,a);continue}this._proxies_.get(n)?.set(h,!0),this._publishDynamicFilling_(n,a)}return!0}get(){if(Zi(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+os+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+os+"-publisher-proxy>"}};jt.instances=new Map,jt.instancesCounter=0;let Bs=jt;const Hs=[];function Zi(r){Hs.length>0&&Hs[0].add(r)}function Xi(){Hs.unshift(new Set)}function Qi(){return Hs.shift()}const me=class me{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],me.instance!=null)throw"Singleton / use getInstance";me.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),me.initPageShowHandler()}static initPageShowHandler(){me.pageShowHandlerInitialized||(me.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&me.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let s=localStorage.getItem(Ar),n=null;if(s&&(n=await this.decompress(s,"gzip")),n)try{this.localStorageData=JSON.parse(n)}catch{this.localStorageData={}}else s=await this.compress("{}","gzip"),localStorage.setItem(Ar,s),this.localStorageData={};const a=1e3*60*60*12;for(const o in this.localStorageData){const h=this.localStorageData[o],d=new Date().getTime()-(h.expirationDelayMs||a);h.lastModifiationMS<d&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=me.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new me)}return me.instance==null?new me:me.instance}static get(e,t){return me.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+Be.getLanguage()]?.data||e.get())}get(e,t){const s=t?.localStorageMode==="enabled",n=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const h=kr({});this.set(e,h)}const a=this.publishers.get(e);return s&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(a._expiration_delay_=t.expirationDelayMs),a._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(a,e)),n&&(a._invalidate_on_page_show_=n),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==me.saveId&&e%10!=0))try{if(!me.changed||me.saving)return;me.saving=!0,me.changed=!1;const t=Array.from(this.publishers.keys());let s=!1;for(const n of t){const a=this.publishers.get(n);if(!a?._is_savable_)continue;const o=a?.get();o&&(this.localStorageData[n+"¤lang_"+Be.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:a._expiration_delay_,data:o},s=!0)}if(s){const n=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Ar,n)}if(me.saving=!1,me.changed){me.saveId++;const n=me.saveId;setTimeout(()=>this.saveToLocalStorage(n),1e3)}}catch{me.saving=!1}}async compress(e,t){const s=new TextEncoder().encode(e),n=window,a=new n.CompressionStream(t),o=a.writable.getWriter();o.write(s),o.close();const h=await new Response(a.readable).arrayBuffer(),d=new Uint8Array(h);let C="";for(let $=0;$<d.length;$++)C+=String.fromCharCode(d[$]);return btoa(C)}async decompress(e,t){const s=atob(e),a=Uint8Array.from(s,$=>$.charCodeAt(0)).buffer,o=window,h=new o.DecompressionStream(t),d=h.writable.getWriter();d.write(a),d.close();const C=await new Response(h.readable).arrayBuffer();return new TextDecoder().decode(C)}};me.buildDate="Thu Oct 01 2026 19:01:55 GMT+0200 (Central European Summer Time)",me.changed=!1,me.saving=!1,me.saveId=0,me.instance=null,me.instances=new Map,me.pageShowHandlerInitialized=!1;let De=me;if(typeof window<"u"){const r=window,e=_r+"PublisherManager",t=r[e]||De;if(r[e]||(r[e]=De),t!==De){const s=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const n of s)Object.defineProperty(De,n,{configurable:!0,get(){return t[n]},set(a){t[n]=a}})}}const eo=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function to(r,e){return{get:function(t,s){if(typeof s=="string"&&eo.has(s))return r[s];if(s==Symbol.toPrimitive)return()=>e().get();if(!r._proxies_.has(s)){const n=r._value_[s],a=kr(Mt(n)?n:{__value:n},r,s);a._proxies_.set("_parent_",e()),r._proxies_.set(s,a)}return r._proxies_.get(s)},set:function(t,s,n){if(s=="_value_")return r._value_=n,!0;if(s=="_cachedGet_")return r._cachedGet_=n,!0;if(s=="_assignmentId_")return r._assignmentId_=n,!0;if(s=="_is_savable_")return r._is_savable_=n,!0;if(s=="_expiration_delay_")return r._expiration_delay_=n,!0;if(s=="_invalidate_on_page_show_")return r._invalidate_on_page_show_=n,!0;if(s=="_instanceCounter_")return r._instanceCounter_=n,!0;if(!r._proxies_.has(s)){const o=kr({},r,s);o._proxies_.set("_parent_",e()),r._proxies_.set(s,o)}return r._value_[s]!==n&&(r._value_[s]=n,r._publishDynamicFilling_(s,n),r._proxies_.get(s)?.set(Mt(n)?n:{__value:n})),!0},deleteProperty:function(t,s){return r._publishDynamicFilling_(s,null),r._proxies_.get(s)?.set(null),delete r._value_[s]},has:function(t,s){return s in r._value_&&s!="_lockInternalMutationPublishing_"},defineProperty:function(t,s,n){return n&&"value"in n&&(r._value_[s]=n.value),!0},getOwnPropertyDescriptor:function(t,s){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return r._value_.__value?Object.keys(r._value_.__value):Object.keys(r._value_)}}}function kr(r,e=null,t){const s=new Bs(r,e,t);let n=null;const a=to(s,()=>n);return n=new Proxy(s,a),n}class so extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Bs.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(os+"-publisher-proxy",so)}catch{}const Sr=(r,e)=>{if(typeof r=="function"){const t=r;return Xi(),t(),Qi()}if(typeof r=="string"){const t=r.split("."),s=t.shift()||"";let n=De.get(s,e);n=lt.traverse(n,t);const a=new Set;return a.add(n),a}return new Set([r])};function bn(r){const e=br(r);return Sr(e).values().next().value?.get()}function wn(r,e,t){const s=br(r);return Sr(s,t).values().next().value}function _n(r,e){return Ji()?wn(r,void 0,e):wn(r)}function An(r,e){const t=br(r);Sr(t).values().next().value?.set(e)}function kn(r){let e=(Number(r)>>>0)+1831565813;e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61);const t=e>>>0;return{value:((t^t>>>14)>>>0)/4294967296,seed:t}}function ro(r,e){const t=kn(r),s=Math.max(1,Math.floor(Number(e)||1));return{value:Math.floor(t.value*s),seed:t.seed}}function no(r,e,t){const s=Number(r),n=Number(e),a=Number(t);return Math.min(a,Math.max(n,s))}function io(r){const e=Math.max(0,Math.min(1e4,Math.floor(Number(r)||0)));return Array.from({length:e},(t,s)=>s)}function oo(r,e,t){const s=String(e??"").split(".").filter(Boolean);if(!s.length)return t;const n=h=>Array.isArray(h)?h.slice():h&&typeof h=="object"?{...h}:h,a=n(r??{});let o=a;for(let h=0;h<s.length-1;h++){const d=s[h],C=o[d];o[d]=n(C??(/^\d+$/.test(s[h+1])?[]:{})),o=o[d]}return o[s[s.length-1]]=t,a}function ao(r,e,t=0){const s=Math.max(0,Math.min(256,Math.floor(Number(r)||0))),n=Math.max(0,Math.min(256,Math.floor(Number(e)||0))),a=Number(t)||0;return Array.from({length:n},()=>Array.from({length:s},()=>a))}function lo(r){if(!Array.isArray(r)||!r.length)return[];const e=r,t=e.length,s=Array.isArray(e[0])?e[0].length:0,n=Array.from({length:s},()=>Array.from({length:t},()=>0));for(let a=0;a<t;a++){const o=e[a];if(Array.isArray(o))for(let h=0;h<s;h++)n[h][t-1-a]=Number(o[h])||0}return n}function co(r){r.registerFunction("rand",kn),r.registerFunction("randInt",ro),r.registerFunction("clamp",no),r.registerFunction("range",io),r.registerFunction("set",oo),r.registerFunction("matrix",ao),r.registerFunction("rotate",lo)}var uo=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,Rt=(r,e,t,s)=>{for(var n=s>1?void 0:s?ho(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&uo(e,t,n),n};const fo="sonic-store",po=256*1024,go=8;let bt=class extends We{constructor(){super(...arguments),this.id="",this.dataProvider="",this.initial=null,this.reducer="",this.maxStateBytes=po,this.budgetMs=go,this.history=0,this.state=null,this.queue=[],this.draining=!1,this.compiled=null,this.historyStack=[],this.lastError=null}connectedCallback(){super.connectedCallback(),this.bootstrap()}disconnectedCallback(){this.id&&Gr(this.id),super.disconnectedCallback()}updated(r){if(r.has("id")||r.has("reducer")||r.has("initial")||r.has("dataProvider")){const e=r.get("id");typeof e=="string"&&e&&e!==this.id&&Gr(e),this.bootstrap()}}dpId(){return(this.dataProvider||this.id||"").trim()}bootstrap(){if(!this.id)return;this.compileReducer(),this.state=this.clone(this.initial),this.historyStack=[],this.lastError=null,this.publish();const r={id:this.id,dispatch:e=>this.enqueue(e),getState:()=>this.state,reset:()=>this.reset()};vi(r)}compileReducer(){this.compiled=null;const r=(this.reducer||"").trim();if(r){if(r.length>32768){this.fail("reducer trop long (max 32 Ko)");return}try{const e=Vi(r);co(e),e.assign("random",()=>{throw new Error("$random interdit dans un reducer (utiliser $rand)")}),e.assign("now",()=>{throw new Error("$now interdit dans un reducer (utiliser $action.t)")}),this.compiled=e}catch(e){this.fail(e instanceof Error?e.message:String(e))}}}enqueue(r){if(r.type==="@reset"){this.reset();return}if(r.type==="@undo"){this.undo();return}this.queue.push(r),this.drain()}async drain(){if(!this.draining){this.draining=!0;try{for(;this.queue.length;){const r=this.queue.shift();this.apply(r)}}finally{this.draining=!1}}}apply(r){if(!this.compiled)return;const e=performance.now(),t={width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0,now:r.t??e},s={state:this.state,action:{type:r.type,payload:r.payload??null,t:r.t??e,dt:r.dt??null},env:t};try{const a=this.compiled.evaluate(this.state,{state:this.state,action:s.action,env:t}),o=performance.now()-e;if(o>this.budgetMs){this.fail(`budget ${this.budgetMs}ms dépassé (${o.toFixed(1)}ms)`);return}if(a===void 0)return;const h=JSON.stringify(a);if(h!==void 0&&h.length>this.maxStateBytes){this.fail(`état trop gros (max ${this.maxStateBytes} octets)`);return}this.history>0&&(this.historyStack.push(this.clone(this.state)),this.historyStack.length>this.history&&this.historyStack.shift()),this.state=a,this.lastError=null,this.publish()}catch(n){this.fail(n instanceof Error?n.message:String(n))}}reset(){this.state=this.clone(this.initial),this.historyStack=[],this.lastError=null,this.publish()}undo(){this.historyStack.length&&(this.state=this.historyStack.pop(),this.publish())}publish(){const r=this.dpId();if(!r)return;const e=this.state&&typeof this.state=="object"?{...this.state,lastError:this.lastError}:{value:this.state,lastError:this.lastError};An(r,e)}fail(r){this.lastError=r,this.dispatchEvent(new CustomEvent("error",{detail:{message:r},bubbles:!0,composed:!0})),this.publish()}clone(r){if(r===null||typeof r!="object")return r;try{return JSON.parse(JSON.stringify(r))}catch{return r}}dispatchAction(r){ss(this.id,r)}render(){return qe``}};bt.styles=je`
43
+ */function un(r){return(e,t)=>{const{slot:s,selector:n}=r??{},a="slot"+(s?`[name=${s}]`:":not([name])");return cn(e,t,{get(){const o=this.renderRoot?.querySelector(a),h=o?.assignedElements(r)??[];return n===void 0?h:h.filter((d=>d.matches(n)))}})}}var hn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function js(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var yr={exports:{}},dn;function Bi(){return dn||(dn=1,(function(r,e){(function(t){r.exports=t()})(function(){return(function(){function t(s,n,a){function o(C,$){if(!n[C]){if(!s[C]){var k=typeof js=="function"&&js;if(!$&&k)return k(C,!0);if(h)return h(C,!0);var w=new Error("Cannot find module '"+C+"'");throw w.code="MODULE_NOT_FOUND",w}var E=n[C]={exports:{}};s[C][0].call(E.exports,function(L){var R=s[C][1][L];return o(R||L)},E,E.exports,t,s,n,a)}return n[C].exports}for(var h=typeof js=="function"&&js,d=0;d<a.length;d++)o(a[d]);return o}return t})()({1:[function(t,s,n){const a=t("./utils"),o=(function(){const h=a.stringToArray,d=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],C=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],$=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],k=["Thousand","Million","Billion","Trillion"];function w(S,D){var P=function(q,j,F){var B="";if(q<=19)B=(j?" and ":"")+(F?C[q]:d[q]);else if(q<100){const fe=Math.floor(q/10),le=q%10;B=(j?" and ":"")+$[fe-2],le>0?B+="-"+P(le,!1,F):F&&(B=B.substring(0,B.length-1)+"ieth")}else if(q<1e3){const fe=Math.floor(q/100),le=q%100;B=(j?", ":"")+d[fe]+" Hundred",le>0?B+=P(le,!0,F):F&&(B+="th")}else{var Y=Math.floor(Math.log10(q)/3);Y>k.length&&(Y=k.length);const fe=Math.pow(10,Y*3),le=Math.floor(q/fe),Q=q-le*fe;B=(j?", ":"")+P(le,!1,!1)+" "+k[Y-1],Q>0?B+=P(Q,!0,F):F&&(B+="th")}return B},I=P(S,!1,D);return I}const E=Object.create(null);d.forEach(function(S,D){E[S.toLowerCase()]=D}),C.forEach(function(S,D){E[S.toLowerCase()]=D}),$.forEach(function(S,D){const P=S.toLowerCase();E[P]=(D+2)*10,E[P.substring(0,S.length-1)+"ieth"]=E[P]}),E.hundredth=100,k.forEach(function(S,D){const P=S.toLowerCase(),I=Math.pow(10,(D+1)*3);E[P]=I,E[P+"th"]=I});function L(S){const P=S.split(/,\s|\sand\s|[\s\\-]/).map(j=>E[j]);let I=[0];return P.forEach(j=>{if(j<100){let F=I.pop();F>=1e3&&(I.push(F),F=0),I.push(F+j)}else I.push(I.pop()*j)}),I.reduce((j,F)=>j+F,0)}const R=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],X={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function Z(S){for(var D=0;D<R.length;D++){const P=R[D];if(S>=P[0])return P[1]+Z(S-P[0])}return""}function A(S){for(var D=0,P=1,I=S.length-1;I>=0;I--){const q=S[I],j=X[q];j<P?D-=j:(P=j,D+=j)}return D}function m(S,D){for(var P=[],I=D.charCodeAt(0);S>0;)P.unshift(String.fromCharCode((S-1)%26+I)),S=Math.floor((S-1)/26);return P.join("")}function M(S,D){for(var P=D.charCodeAt(0),I=0,q=0;q<S.length;q++)I+=(S.charCodeAt(S.length-q-1)-P+1)*Math.pow(26,q);return I}function _(S,D){if(typeof S>"u")return;S=Math.floor(S);const P=oe(D);return N(S,P)}const T={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},V={UPPER:"upper",LOWER:"lower",TITLE:"title"};function N(S,D){let P;const I=S<0;switch(S=Math.abs(S),D.primary){case T.LETTERS:P=m(S,D.case===V.UPPER?"A":"a");break;case T.ROMAN:P=Z(S),D.case===V.UPPER&&(P=P.toUpperCase());break;case T.WORDS:P=w(S,D.ordinal),D.case===V.UPPER?P=P.toUpperCase():D.case===V.LOWER&&(P=P.toLowerCase());break;case T.DECIMAL:P=""+S;var q=D.mandatoryDigits-P.length;if(q>0){var j=new Array(q+1).join("0");P=j+P}if(D.zeroCode!==48&&(P=h(P).map(fe=>String.fromCodePoint(fe.codePointAt(0)+D.zeroCode-48)).join("")),D.regular){const fe=Math.floor((P.length-1)/D.groupingSeparators.position);for(let le=fe;le>0;le--){const Q=P.length-le*D.groupingSeparators.position;P=P.substr(0,Q)+D.groupingSeparators.character+P.substr(Q)}}else D.groupingSeparators.reverse().forEach(fe=>{const le=P.length-fe.position;P=P.substr(0,le)+fe.character+P.substr(le)});if(D.ordinal){var F={1:"st",2:"nd",3:"rd"},B=P[P.length-1],Y=F[B];(!Y||P.length>1&&P[P.length-2]==="1")&&(Y="th"),P=P+Y}break;case T.SEQUENCE:throw{code:"D3130",value:D.token}}return I&&(P="-"+P),P}const ee=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function oe(S){const D={type:"integer",primary:T.DECIMAL,case:V.LOWER,ordinal:!1};let P,I;const q=S.lastIndexOf(";");switch(q===-1?P=S:(P=S.substring(0,q),I=S.substring(q+1),I[0]==="o"&&(D.ordinal=!0)),P){case"A":D.case=V.UPPER;case"a":D.primary=T.LETTERS;break;case"I":D.case=V.UPPER;case"i":D.primary=T.ROMAN;break;case"W":D.case=V.UPPER,D.primary=T.WORDS;break;case"Ww":D.case=V.TITLE,D.primary=T.WORDS;break;case"w":D.primary=T.WORDS;break;default:{let j=null,F=0,B=0,Y=[],fe=0;if(h(P).map(Q=>Q.codePointAt(0)).reverse().forEach(Q=>{let K=!1;for(let ue=0;ue<ee.length;ue++){const J=ee[ue];if(Q>=J&&Q<=J+9){if(K=!0,F++,fe++,j===null)j=J;else if(J!==j)throw{code:"D3131"};break}}K||(Q===35?(fe++,B++):Y.push({position:fe,character:String.fromCodePoint(Q)}))}),F>0){D.primary=T.DECIMAL,D.zeroCode=j,D.mandatoryDigits=F,D.optionalDigits=B;const K=function(ue){if(ue.length===0)return 0;const J=ue[0].character;for(let Ie=1;Ie<ue.length;Ie++)if(ue[Ie].character!==J)return 0;const He=ue.map(Ie=>Ie.position),ut=function(Ie,Ke){return Ke===0?Ie:ut(Ke,Ie%Ke)},Ye=He.reduce(ut);for(let Ie=1;Ie<=He.length;Ie++)if(He.indexOf(Ie*Ye)===-1)return 0;return Ye}(Y);K>0?(D.regular=!0,D.groupingSeparators={position:K,character:Y[0].character}):(D.regular=!1,D.groupingSeparators=Y)}else D.primary=T.SEQUENCE,D.token=P}}return D}const Se={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function ve(S){var D=[];const P={type:"datetime",parts:D},I=function(K,ue){if(ue>K){let J=S.substring(K,ue);J=J.split("]]").join("]"),D.push({type:"literal",value:J})}};for(var q=0,j=0;j<S.length;){if(S.charAt(j)==="["){if(S.charAt(j+1)==="["){I(q,j),D.push({type:"literal",value:"["}),j+=2,q=j;continue}if(I(q,j),q=j,j=S.indexOf("]",q),j===-1)throw{code:"D3135"};let K=S.substring(q+1,j);K=K.split(/\s+/).join("");var F={type:"marker",component:K.charAt(0)},B=K.lastIndexOf(","),Y;if(B!==-1){const ue=K.substring(B+1),J=ue.indexOf("-");let He,ut;const Ye=function(Ke){if(!(typeof Ke>"u"||Ke==="*"))return parseInt(Ke)};J===-1?He=ue:(He=ue.substring(0,J),ut=ue.substring(J+1));const Ie={min:Ye(He),max:Ye(ut)};F.width=Ie,Y=K.substring(1,B)}else Y=K.substring(1);if(Y.length===1)F.presentation1=Y;else if(Y.length>1){var fe=Y.charAt(Y.length-1);"atco".indexOf(fe)!==-1?(F.presentation2=fe,fe==="o"&&(F.ordinal=!0),F.presentation1=Y.substring(0,Y.length-1)):F.presentation1=Y}else F.presentation1=Se[F.component];if(typeof F.presentation1>"u")throw{code:"D3132",value:F.component};if(F.presentation1[0]==="n")F.names=V.LOWER;else if(F.presentation1[0]==="N")F.presentation1[1]==="n"?F.names=V.TITLE:F.names=V.UPPER;else if("YMDdFWwXxHhmsf".indexOf(F.component)!==-1){var le=F.presentation1;if(F.presentation2&&(le+=";"+F.presentation2),F.integerFormat=oe(le),F.width&&F.width.min!==void 0&&F.integerFormat.mandatoryDigits<F.width.min&&(F.integerFormat.mandatoryDigits=F.width.min),F.component==="Y")if(F.n=-1,F.width&&F.width.max!==void 0)F.n=F.width.max,F.integerFormat.mandatoryDigits=F.n;else{var Q=F.integerFormat.mandatoryDigits+F.integerFormat.optionalDigits;Q>=2&&(F.n=Q)}const ue=D[D.length-1];ue&&ue.integerFormat&&(ue.integerFormat.parseWidth=ue.integerFormat.mandatoryDigits)}(F.component==="Z"||F.component==="z")&&(F.integerFormat=oe(F.presentation1)),D.push(F),q=j+1}j++}return I(q,j),P}const pe=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Le=["January","February","March","April","May","June","July","August","September","October","November","December"],nt=1e3*60*60*24,ce=function(S){const D=Date.UTC(S.year,S.month);var P=new Date(D).getUTCDay();return P===0&&(P=7),P>4?D+(8-P)*nt:D-(P-1)*nt},ge=function(S,D){return{year:S,month:D,nextMonth:function(){return D===11?ge(S+1,0):ge(S,D+1)},previousMonth:function(){return D===0?ge(S-1,11):ge(S,D-1)},nextYear:function(){return ge(S+1,D)},previousYear:function(){return ge(S-1,D)}}},tt=function(S,D){return(D-S)/(nt*7)+1},re=(S,D)=>{let P;switch(D){case"Y":P=S.getUTCFullYear();break;case"M":P=S.getUTCMonth()+1;break;case"D":P=S.getUTCDate();break;case"d":{const I=Date.UTC(S.getUTCFullYear(),S.getUTCMonth(),S.getUTCDate()),q=Date.UTC(S.getUTCFullYear(),0);P=(I-q)/nt+1;break}case"F":P=S.getUTCDay(),P===0&&(P=7);break;case"W":{const I=ge(S.getUTCFullYear(),0),q=ce(I),j=Date.UTC(I.year,S.getUTCMonth(),S.getUTCDate());let F=tt(q,j);if(F>52){const B=ce(I.nextYear());j>=B&&(F=1)}else if(F<1){const B=ce(I.previousYear());F=tt(B,j)}P=Math.floor(F);break}case"w":{const I=ge(S.getUTCFullYear(),S.getUTCMonth()),q=ce(I),j=Date.UTC(I.year,I.month,S.getUTCDate());let F=tt(q,j);if(F>4){const B=ce(I.nextMonth());j>=B&&(F=1)}else if(F<1){const B=ce(I.previousMonth());F=tt(B,j)}P=Math.floor(F);break}case"X":{const I=ge(S.getUTCFullYear(),0),q=ce(I),j=ce(I.nextYear()),F=S.getTime();F<q?P=I.year-1:F>=j?P=I.year+1:P=I.year;break}case"x":{const I=ge(S.getUTCFullYear(),S.getUTCMonth()),q=ce(I),j=I.nextMonth(),F=ce(j),B=S.getTime();B<q?P=I.previousMonth().month+1:B>=F?P=j.month+1:P=I.month+1;break}case"H":P=S.getUTCHours();break;case"h":P=S.getUTCHours(),P=P%12,P===0&&(P=12);break;case"P":P=S.getUTCHours()>=12?"pm":"am";break;case"m":P=S.getUTCMinutes();break;case"s":P=S.getUTCSeconds();break;case"f":P=S.getUTCMilliseconds();break;case"Z":case"z":break;case"C":P="ISO";break;case"E":P="ISO";break}return P};let Fe=null;function kt(S,D,P){var I=0,q=0;if(typeof P<"u"){const le=parseInt(P);I=Math.floor(le/100),q=le%100}var j=function(le,Q){var K=re(le,Q.component);if("YMDdFWwXxHhms".indexOf(Q.component)!==-1)if(Q.component==="Y"&&Q.n!==-1&&(K=K%Math.pow(10,Q.n)),Q.names){if(Q.component==="M"||Q.component==="x")K=Le[K-1];else if(Q.component==="F")K=pe[K];else throw{code:"D3133",value:Q.component};Q.names===V.UPPER?K=K.toUpperCase():Q.names===V.LOWER&&(K=K.toLowerCase()),Q.width&&K.length>Q.width.max&&(K=K.substring(0,Q.width.max))}else K=N(K,Q.integerFormat);else if(Q.component==="f")K=N(K,Q.integerFormat);else if(Q.component==="Z"||Q.component==="z"){const ue=I*100+q;if(Q.integerFormat.regular)K=N(ue,Q.integerFormat);else{const J=Q.integerFormat.mandatoryDigits;if(J===1||J===2)K=N(I,Q.integerFormat),q!==0&&(K+=":"+_(q,"00"));else if(J===3||J===4)K=N(ue,Q.integerFormat);else throw{code:"D3134",value:J}}ue>=0&&(K="+"+K),Q.component==="z"&&(K="GMT"+K),ue===0&&Q.presentation2==="t"&&(K="Z")}else Q.component==="P"&&Q.names===V.UPPER&&(K=K.toUpperCase());return K};let F;typeof D>"u"?(Fe===null&&(Fe=ve("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),F=Fe):F=ve(D);const B=(60*I+q)*60*1e3,Y=new Date(S+B);let fe="";return F.parts.forEach(function(le){le.type==="literal"?fe+=le.value:fe+=j(Y,le)}),fe}function p(S){var D=Object.create(null);if(S.type==="datetime")D.type="datetime",D.parts=S.parts.map(function(P){var I=Object.create(null);if(P.type==="literal")I.regex=P.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(P.component==="Z"||P.component==="z"){let j;Array.isArray(P.integerFormat.groupingSeparators)||(j=P.integerFormat.groupingSeparators),I.regex="",P.component==="z"&&(I.regex="GMT"),I.regex+="[-+][0-9]+",j&&(I.regex+=j.character+"[0-9]+"),I.parse=function(F){P.component==="z"&&(F=F.substring(3));let B=0,Y=0;return j?(B=Number.parseInt(F.substring(0,F.indexOf(j.character))),Y=Number.parseInt(F.substring(F.indexOf(j.character)+1))):F.length-1<=2?B=Number.parseInt(F):(B=Number.parseInt(F.substring(0,3)),Y=Number.parseInt(F.substring(3))),B*60+Y}}else if(P.component==="f")I.regex="[0-9]+",I.parse=function(j){return parseFloat("0."+j.substring(0,3))*1e3};else if(P.integerFormat)I=p(P.integerFormat);else{I.regex="[a-zA-Z]+";var q=Object.create(null);if(P.component==="M"||P.component==="x")Le.forEach(function(j,F){P.width&&P.width.max?q[j.substring(0,P.width.max)]=F+1:q[j]=F+1});else if(P.component==="F")pe.forEach(function(j,F){F>0&&(P.width&&P.width.max?q[j.substring(0,P.width.max)]=F:q[j]=F)});else if(P.component==="P")q={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:P.component};I.parse=function(j){return q[j]}}return I.component=P.component,I});else{D.type="integer";const P=S.case===V.UPPER;switch(S.primary){case T.LETTERS:D.regex=P?"[A-Z]+":"[a-z]+",D.parse=function(I){return M(I,P?"A":"a")};break;case T.ROMAN:D.regex=P?"[MDCLXVI]+":"[mdclxvi]+",D.parse=function(I){return A(P?I:I.toUpperCase())};break;case T.WORDS:D.regex="(?:"+a.keys(E).concat("and","[\\-, ]").join("|")+")+",D.parse=function(I){return L(I.toLowerCase())};break;case T.DECIMAL:D.regex="[0-9]",S.parseWidth?D.regex+=`{${S.parseWidth}}`:D.regex+="+",S.ordinal&&(D.regex+="(?:th|st|nd|rd)"),D.parse=function(I){let q=I;return S.ordinal&&(q=I.substring(0,I.length-2)),S.regular?q=q.split(",").join(""):S.groupingSeparators.forEach(j=>{q=q.split(j.character).join("")}),S.zeroCode!==48&&(q=q.split("").map(j=>String.fromCodePoint(j.codePointAt(0)-S.zeroCode+48)).join("")),parseInt(q)};break;case T.SEQUENCE:throw{code:"D3130",value:S.token}}}return D}function b(S,D){if(typeof S>"u")return;const P=oe(D);return p(P).parse(S)}function W(S,D){const P=ve(D),I=p(P),q="^"+I.parts.map(Y=>"("+Y.regex+")").join("")+"$";var F=new RegExp(q,"i").exec(S);if(F!==null){const J=Object.create(null);for(let c=1;c<F.length;c++){const f=I.parts[c-1];f.parse&&(J[f.component]=f.parse(F[c]))}if(Object.getOwnPropertyNames(J).length===0)return;let He=0;const ut=c=>{He<<=1,He+=c?1:0},Ye=c=>!(~c&He)&&!!(c&He);"YXMxWwdD".split("").forEach(c=>ut(J[c]));const Ke=!Ye(161)&&Ye(130),Ot=Ye(84),us=!Ot&&Ye(72);He=0,"PHhmsf".split("").forEach(c=>ut(J[c]));const H=!Ye(23)&&Ye(47),mt=(Ke?"YD":Ot?"XxwF":us?"XWF":"YMD")+(H?"Phmsf":"Hmsf"),Ds=this.environment.timestamp;let St=!1,Qt=!1;if(mt.split("").forEach(c=>{if(typeof J[c]>"u")St?(J[c]="MDd".indexOf(c)!==-1?1:0,Qt=!0):J[c]=re(Ds,c);else if(St=!0,Qt)throw{code:"D3136"}}),J.M>0?J.M-=1:J.M=0,Ke){const c=Date.UTC(J.Y,0),f=(J.d-1)*1e3*60*60*24,g=new Date(c+f);J.M=g.getUTCMonth(),J.D=g.getUTCDate()}if(Ot)throw{code:"D3136"};if(us)throw{code:"D3136"};H&&(J.H=J.h===12?0:J.h,J.P===1&&(J.H+=12));var B=Date.UTC(J.Y,J.M,J.D,J.H,J.m,J.s,J.f);return(J.Z||J.z)&&(B-=(J.Z||J.z)*60*1e3),B}}var he=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function xe(S,D){if(!(typeof S>"u"))if(typeof D>"u"){if(!he.test(S))throw{stack:new Error().stack,code:"D3110",value:S};return Date.parse(S)}else return W.call(this,S,D)}function _e(S,D,P){if(!(typeof S>"u"))return kt.call(this,S,D,P)}return{formatInteger:_,parseInteger:b,fromMillis:_e,toMillis:xe}})();s.exports=o},{"./utils":6}],2:[function(t,s,n){(function(a){(function(){var o=t("./utils");const h=(()=>{var d=o.isNumeric,C=o.isArrayOfStrings,$=o.isArrayOfNumbers,k=o.isSequence,w=o.isFunction,E=o.isLambda,L=o.isPromise,R=o.getFunctionArity,X=o.isDeepEqual,Z=o.stringToArray;function A(i){if(!(typeof i>"u")){var l=0;return i.forEach(function(u){l+=u}),l}}function m(i){return typeof i>"u"?0:i.length}function M(i){if(!(typeof i>"u"||i.length===0))return Math.max.apply(Math,i)}function _(i){if(!(typeof i>"u"||i.length===0))return Math.min.apply(Math,i)}function T(i){if(!(typeof i>"u"||i.length===0)){var l=0;return i.forEach(function(u){l+=u}),l/i.length}}function V(i,l=!1){if(!(typeof i>"u")){var u;if(typeof i=="string")u=i;else if(w(i))u="";else{if(typeof i=="number"&&!isFinite(i))throw{code:"D3001",value:i,stack:new Error().stack};var y=l?2:0;Array.isArray(i)&&i.outerWrapper&&(i=i[0]),u=JSON.stringify(i,function(v,x){return typeof x<"u"&&x!==null&&d(x)?x.toPrecision&&!Number.isInteger(x)?Number(x.toPrecision(15)):x:x&&w(x)?"":x},y)}return u}}function N(i,l,u){if(!(typeof i>"u")){var y=Z(i),v=y.length;if(v+l<0&&(l=0),typeof u<"u"){if(u<=0)return"";var x=l>=0?l+u:v+l+u;return y.slice(l,x).join("")}return y.slice(l).join("")}}function ee(i,l){if(!(typeof i>"u")){var u=i.indexOf(l);return u>-1?i.substr(0,u):i}}function oe(i,l){if(!(typeof i>"u")){var u=i.indexOf(l);return u>-1?i.substr(u+l.length):i}}function Se(i){if(!(typeof i>"u"))return i.toLowerCase()}function ve(i){if(!(typeof i>"u"))return i.toUpperCase()}function pe(i){if(!(typeof i>"u"))return Z(i).length}function Le(i){if(!(typeof i>"u")){var l=i.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function nt(i,l,u){if(!(typeof i>"u")){(typeof u>"u"||u.length===0)&&(u=" ");var y;l=Math.trunc(l);var v=Math.abs(l)-pe(i);if(v>0){var x=new Array(v+1).join(u);u.length>1&&(x=N(x,0,v)),l>0?y=i+x:y=x+i}else y=i;return y}}async function ce(i,l){var u=i.apply(this,[l]);if(L(u)&&(u=await u),u&&!(typeof u.start=="number"||u.end==="number"||Array.isArray(u.groups)||w(u.next)))throw{code:"T1010",stack:new Error().stack};return u}async function ge(i,l){if(!(typeof i>"u"||typeof l>"u")){var u;if(typeof l=="string")u=i.indexOf(l)!==-1;else{var y=await ce(l,i);u=typeof y<"u"}return u}}async function tt(i,l,u){if(!(typeof i>"u")){if(u<0)throw{stack:new Error().stack,value:u,code:"D3040",index:3};var y=this.createSequence();if(typeof u>"u"||u>0){var v=0,x=await ce(l,i);if(typeof x<"u")for(;typeof x<"u"&&(typeof u>"u"||v<u);)y.push({match:x.match,index:x.start,groups:x.groups}),x=await ce(x.next),v++}return y}}async function re(i,l,u,y){if(!(typeof i>"u")){var v=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(y<0)throw{code:"D3011",stack:new Error().stack,value:y,index:4};var x;typeof u=="string"?x=function(Te){for(var Ne="",ye=0,Me=u.indexOf("$",ye);Me!==-1&&ye<u.length;){Ne+=u.substring(ye,Me),ye=Me+1;var ht=u.charAt(ye);if(ht==="$")Ne+="$",ye++;else if(ht==="0")Ne+=Te.match,ye++;else{var Je;if(Te.groups.length===0?Je=1:Je=Math.floor(Math.log(Te.groups.length)*Math.LOG10E)+1,Me=parseInt(u.substring(ye,ye+Je),10),Je>1&&Me>Te.groups.length&&(Me=parseInt(u.substring(ye,ye+Je-1),10)),isNaN(Me))Ne+="$";else{if(Te.groups.length>0){var xt=Te.groups[Me-1];typeof xt<"u"&&(Ne+=xt)}ye+=Me.toString().length}}Me=u.indexOf("$",ye)}return Ne+=u.substring(ye),Ne}:x=u;var U="",z=0;if(typeof y>"u"||y>0){var ne=0;if(typeof l=="string"){for(var G=i.indexOf(l,z);G!==-1&&(typeof y>"u"||ne<y);)U+=i.substring(z,G),U+=u,z=G+l.length,ne++,G=i.indexOf(l,z);U+=i.substring(z)}else{var Ae=await ce(l,i);if(typeof Ae<"u"){for(;typeof Ae<"u"&&(typeof y>"u"||ne<y);){U+=i.substring(z,Ae.start);var Pe=x.apply(v,[Ae]);if(L(Pe)&&(Pe=await Pe),typeof Pe=="string")U+=Pe;else throw{code:"D3012",stack:new Error().stack,value:Pe};z=Ae.start+Ae.match.length,ne++,Ae=await ce(Ae.next)}U+=i.substring(z)}else U=i}}else U=i;return U}}function Fe(i){if(!(typeof i>"u")){var l=typeof window<"u"?window.btoa:function(u){return new a.Buffer.from(u,"binary").toString("base64")};return l(i)}}function kt(i){if(!(typeof i>"u")){var l=typeof window<"u"?window.atob:function(u){return new a.Buffer.from(u,"base64").toString("binary")};return l(i)}}function p(i){if(!(typeof i>"u")){var l;try{l=encodeURIComponent(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"encodeUrlComponent"}}return l}}function b(i){if(!(typeof i>"u")){var l;try{l=encodeURI(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"encodeUrl"}}return l}}function W(i){if(!(typeof i>"u")){var l;try{l=decodeURIComponent(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"decodeUrlComponent"}}return l}}function he(i){if(!(typeof i>"u")){var l;try{l=decodeURI(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"decodeUrl"}}return l}}async function xe(i,l,u){if(!(typeof i>"u")){if(u<0)throw{code:"D3020",stack:new Error().stack,value:u,index:3};var y=[];if(typeof u>"u"||u>0)if(typeof l=="string")y=i.split(l,u);else{var v=0,x=await ce(l,i);if(typeof x<"u"){for(var U=0;typeof x<"u"&&(typeof u>"u"||v<u);)y.push(i.substring(U,x.start)),U=x.end,x=await ce(x.next),v++;(typeof u>"u"||v<u)&&y.push(i.substring(U))}else y.push(i)}return y}}function _e(i,l){if(!(typeof i>"u"))return typeof l>"u"&&(l=""),i.join(l)}function S(i,l,u){if(!(typeof i>"u")){var y={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},v=y;typeof u<"u"&&o.keys(u).forEach(function(te){v[te]=u[te]});for(var x=[],U=v["zero-digit"].charCodeAt(0),z=U;z<U+10;z++)x.push(String.fromCharCode(z));var ne=x.concat([v["decimal-separator"],v["exponent-separator"],v["grouping-separator"],v.digit,v["pattern-separator"]]),G=l.split(v["pattern-separator"]);if(G.length>2)throw{code:"D3080",stack:new Error().stack};var Ae=function(te){var Oe=(function(){for(var ze,ot=0;ot<te.length;ot++)if(ze=te.charAt(ot),ne.indexOf(ze)!==-1&&ze!==v["exponent-separator"])return te.substring(0,ot);return""})(),Xe=(function(){for(var ze,ot=te.length-1;ot>=0;ot--)if(ze=te.charAt(ot),ne.indexOf(ze)!==-1&&ze!==v["exponent-separator"])return te.substring(ot+1);return""})(),$e=te.substring(Oe.length,te.length-Xe.length),st,qt,rt,es,it=te.indexOf(v["exponent-separator"],Oe.length);it===-1||it>te.length-Xe.length?(st=$e,qt=void 0):(st=$e.substring(0,it),qt=$e.substring(it+1));var yt=st.indexOf(v["decimal-separator"]);return yt===-1?(rt=st,es=Xe):(rt=st.substring(0,yt),es=st.substring(yt+1)),{prefix:Oe,suffix:Xe,activePart:$e,mantissaPart:st,exponentPart:qt,integerPart:rt,fractionalPart:es,subpicture:te}},Pe=function(te){var Oe,Xe,$e=te.subpicture,st=$e.indexOf(v["decimal-separator"]);st!==$e.lastIndexOf(v["decimal-separator"])&&(Oe="D3081"),$e.indexOf(v.percent)!==$e.lastIndexOf(v.percent)&&(Oe="D3082"),$e.indexOf(v["per-mille"])!==$e.lastIndexOf(v["per-mille"])&&(Oe="D3083"),$e.indexOf(v.percent)!==-1&&$e.indexOf(v["per-mille"])!==-1&&(Oe="D3084");var qt=!1;for(Xe=0;Xe<te.mantissaPart.length;Xe++){var rt=te.mantissaPart.charAt(Xe);if(x.indexOf(rt)!==-1||rt===v.digit){qt=!0;break}}qt||(Oe="D3085");var es=te.activePart.split("").map(function(ze){return ne.indexOf(ze)===-1?"p":"a"}).join("");es.indexOf("p")!==-1&&(Oe="D3086"),st!==-1?($e.charAt(st-1)===v["grouping-separator"]||$e.charAt(st+1)===v["grouping-separator"])&&(Oe="D3087"):te.integerPart.charAt(te.integerPart.length-1)===v["grouping-separator"]&&(Oe="D3088"),$e.indexOf(v["grouping-separator"]+v["grouping-separator"])!==-1&&(Oe="D3089");var it=te.integerPart.indexOf(v.digit);it!==-1&&te.integerPart.substring(0,it).split("").filter(function(ze){return x.indexOf(ze)>-1}).length>0&&(Oe="D3090"),it=te.fractionalPart.lastIndexOf(v.digit),it!==-1&&te.fractionalPart.substring(it).split("").filter(function(ze){return x.indexOf(ze)>-1}).length>0&&(Oe="D3091");var yt=typeof te.exponentPart=="string";if(yt&&te.exponentPart.length>0&&($e.indexOf(v.percent)!==-1||$e.indexOf(v["per-mille"])!==-1)&&(Oe="D3092"),yt&&(te.exponentPart.length===0||te.exponentPart.split("").filter(function(ze){return x.indexOf(ze)===-1}).length>0)&&(Oe="D3093"),Oe)throw{code:Oe,stack:new Error().stack}},Te=function(te){var Oe=function(Ve,or){for(var Fs=[],Lt=Ve.indexOf(v["grouping-separator"]);Lt!==-1;){var ar=(or?Ve.substring(0,Lt):Ve.substring(Lt)).split("").filter(function(ds){return x.indexOf(ds)!==-1||ds===v.digit}).length;Fs.push(ar),Lt=te.integerPart.indexOf(v["grouping-separator"],Lt+1)}return Fs},Xe=Oe(te.integerPart),$e=function(Ve){if(Ve.length===0)return 0;for(var or=function(ar,ds){return ds===0?ar:or(ds,ar%ds)},Fs=Ve.reduce(or),Lt=1;Lt<=Ve.length;Lt++)if(Ve.indexOf(Lt*Fs)===-1)return 0;return Fs},st=$e(Xe),qt=Oe(te.fractionalPart,!0),rt=te.integerPart.split("").filter(function(Ve){return x.indexOf(Ve)!==-1}).length,es=rt,it=te.fractionalPart.split(""),yt=it.filter(function(Ve){return x.indexOf(Ve)!==-1}).length,ze=it.filter(function(Ve){return x.indexOf(Ve)!==-1||Ve===v.digit}).length,ot=typeof te.exponentPart=="string";rt===0&&ze===0&&(ot?(yt=1,ze=1):rt=1),ot&&rt===0&&te.integerPart.indexOf(v.digit)!==-1&&(rt=1),rt===0&&yt===0&&(yt=1);var pi=0;return ot&&(pi=te.exponentPart.split("").filter(function(Ve){return x.indexOf(Ve)!==-1}).length),{integerPartGroupingPositions:Xe,regularGrouping:st,minimumIntegerPartSize:rt,scalingFactor:es,prefix:te.prefix,fractionalPartGroupingPositions:qt,minimumFactionalPartSize:yt,maximumFactionalPartSize:ze,minimumExponentSize:pi,suffix:te.suffix,picture:te.subpicture}},Ne=G.map(Ae);Ne.forEach(Pe);var ye=Ne.map(Te),Me=v["minus-sign"],ht=v["zero-digit"],Je=v["decimal-separator"],xt=v["grouping-separator"];ye.length===1&&(ye.push(JSON.parse(JSON.stringify(ye[0]))),ye[1].prefix=Me+ye[1].prefix);var Ue;i>=0?Ue=ye[0]:Ue=ye[1];var Os;Ue.picture.indexOf(v.percent)!==-1?Os=i*100:Ue.picture.indexOf(v["per-mille"])!==-1?Os=i*1e3:Os=i;var zt,fs;if(Ue.minimumExponentSize===0)zt=Os;else{var $l=Math.pow(10,Ue.scalingFactor),Dl=Math.pow(10,Ue.scalingFactor-1);if(zt=Os,fs=0,zt!==0){for(;Math.abs(zt)<Dl;)zt*=10,fs-=1;for(;Math.abs(zt)>$l;)zt/=10,fs+=1}}var Ol=F(zt,Ue.maximumFactionalPartSize),fi=function(te,Oe){var Xe=Math.abs(te).toFixed(Oe);return ht!=="0"&&(Xe=Xe.split("").map(function($e){return $e>="0"&&$e<="9"?x[$e.charCodeAt(0)-48]:$e}).join("")),Xe},ae=fi(Ol,Ue.maximumFactionalPartSize),Ze=ae.indexOf(".");for(Ze===-1?ae=ae+Je:ae=ae.replace(".",Je);ae.charAt(0)===ht;)ae=ae.substring(1);for(;ae.charAt(ae.length-1)===ht;)ae=ae.substring(0,ae.length-1);Ze=ae.indexOf(Je);var Ls=Ue.minimumIntegerPartSize-Ze,di=Ue.minimumFactionalPartSize-(ae.length-Ze-1);if(ae=(Ls>0?new Array(Ls+1).join(ht):"")+ae,ae=ae+(di>0?new Array(di+1).join(ht):""),Ze=ae.indexOf(Je),Ue.regularGrouping>0)for(var Ll=Math.floor((Ze-1)/Ue.regularGrouping),nr=1;nr<=Ll;nr++)ae=[ae.slice(0,Ze-nr*Ue.regularGrouping),xt,ae.slice(Ze-nr*Ue.regularGrouping)].join("");else Ue.integerPartGroupingPositions.forEach(function(te){ae=[ae.slice(0,Ze-te),xt,ae.slice(Ze-te)].join(""),Ze++});if(Ze=ae.indexOf(Je),Ue.fractionalPartGroupingPositions.forEach(function(te){ae=[ae.slice(0,te+Ze+1),xt,ae.slice(te+Ze+1)].join("")}),Ze=ae.indexOf(Je),(Ue.picture.indexOf(Je)===-1||Ze===ae.length-1)&&(ae=ae.substring(0,ae.length-1)),typeof fs<"u"){var ir=fi(fs,0);Ls=Ue.minimumExponentSize-ir.length,Ls>0&&(ir=new Array(Ls+1).join(ht)+ir),ae=ae+v["exponent-separator"]+(fs<0?Me:"")+ir}return ae=Ue.prefix+ae+Ue.suffix,ae}}function D(i,l){if(!(typeof i>"u")){if(i=F(i),typeof l>"u"?l=10:l=F(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var u=i.toString(l);return u}}function P(i){var l;if(!(typeof i>"u")){if(typeof i=="number")l=i;else if(typeof i=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(i)&&!isNaN(parseFloat(i))&&isFinite(i))l=parseFloat(i);else if(typeof i=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(i))l=Number(i);else if(i===!0)l=1;else if(i===!1)l=0;else throw{code:"D3030",value:i,stack:new Error().stack,index:1};return l}}function I(i){var l;if(!(typeof i>"u"))return l=Math.abs(i),l}function q(i){var l;if(!(typeof i>"u"))return l=Math.floor(i),l}function j(i){var l;if(!(typeof i>"u"))return l=Math.ceil(i),l}function F(i,l){var u;if(!(typeof i>"u")){if(l){var y=i.toString().split("e");i=+(y[0]+"e"+(y[1]?+y[1]+l:l))}u=Math.round(i);var v=u-i;return Math.abs(v)===.5&&Math.abs(u%2)===1&&(u=u-1),l&&(y=u.toString().split("e"),u=+(y[0]+"e"+(y[1]?+y[1]-l:-l))),Object.is(u,-0)&&(u=0),u}}function B(i){var l;if(!(typeof i>"u")){if(i<0)throw{stack:new Error().stack,code:"D3060",index:1,value:i};return l=Math.sqrt(i),l}}function Y(i,l){var u;if(!(typeof i>"u")){if(u=Math.pow(i,l),!isFinite(u))throw{stack:new Error().stack,code:"D3061",index:1,value:i,exp:l};return u}}function fe(){return Math.random()}function le(i){if(!(typeof i>"u")){var l=!1;if(Array.isArray(i)){if(i.length===1)l=le(i[0]);else if(i.length>1){var u=i.filter(function(y){return le(y)});l=u.length>0}}else typeof i=="string"?i.length>0&&(l=!0):d(i)?i!==0&&(l=!0):i!==null&&typeof i=="object"&&!w(i)?o.keys(i).length>0&&(l=!0):typeof i=="boolean"&&i===!0&&(l=!0);return l}}function Q(i){if(!(typeof i>"u"))return!le(i)}function K(i,l,u,y){var v=[l],x=R(i);return x>=2&&v.push(u),x>=3&&v.push(y),v}async function ue(i,l){if(!(typeof i>"u")){for(var u=this.createSequence(),y=0;y<i.length;y++){var v=K(l,i[y],y,i),x=await l.apply(this,v);typeof x<"u"&&u.push(x)}return u}}async function J(i,l){if(!(typeof i>"u")){for(var u=this.createSequence(),y=0;y<i.length;y++){var v=i[y],x=K(l,v,y,i),U=await l.apply(this,x);le(U)&&u.push(v)}return u}}async function He(i,l){if(!(typeof i>"u")){for(var u=!1,y,v=0;v<i.length;v++){var x=i[v],U=!0;if(typeof l<"u"){var z=K(l,x,v,i),ne=await l.apply(this,z);U=le(ne)}if(U)if(!u)y=x,u=!0;else throw{stack:new Error().stack,code:"D3138",index:v}}if(!u)throw{stack:new Error().stack,code:"D3139"};return y}}function ut(){for(var i=[],l=Array.prototype.slice.call(arguments),u=Math.min.apply(Math,l.map(function(x){return Array.isArray(x)?x.length:0})),y=0;y<u;y++){var v=l.map(x=>x[y]);i.push(v)}return i}async function Ye(i,l,u){if(!(typeof i>"u")){var y,v=R(l);if(v<2)throw{stack:new Error().stack,code:"D3050",index:1};var x;for(typeof u>"u"&&i.length>0?(y=i[0],x=1):(y=u,x=0);x<i.length;){var U=[y,i[x]];v>=3&&U.push(x),v>=4&&U.push(i),y=await l.apply(this,U),x++}return y}}function Ie(i){var l=this.createSequence();if(Array.isArray(i)){for(var u=Object.create(null),y=0;y<i.length;y++){var v=Ie.call(this,i[y]);v.forEach(function(x){u[x]=!0})}l=Ie.call(this,u)}else i!==null&&typeof i=="object"&&!w(i)&&o.keys(i).forEach(x=>l.push(x));return l}function Ke(i,l){var u;if(Array.isArray(i)){u=this.createSequence();for(var y=0;y<i.length;y++){var v=Ke.call(this,i[y],l);typeof v<"u"&&(Array.isArray(v)?v.forEach(x=>u.push(x)):u.push(v))}}else i!==null&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,l)&&!w(i)&&(u=i[l]);return u}function Ot(i,l){if(typeof i>"u")return l;if(typeof l>"u")return i;Array.isArray(i)||(i=this.createSequence(i)),Array.isArray(l)||(l=[l]);const u=i.length+l.length;if(this.options&&u>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:u};return i.concat(l)}function us(i){return!(typeof i>"u")}function hs(i){var l=this.createSequence();if(Array.isArray(i))for(var u=0;u<i.length;u++)l=Ot.call(this,l,hs.call(this,i[u]));else if(i!==null&&typeof i=="object"&&!E(i))for(const v of o.keys(i)){var y=Object.create(null);y[v]=i[v],l.push(y)}else l=i;return l}function H(i){if(!(typeof i>"u")){var l=Object.create(null);return i.forEach(function(u){for(const y of o.keys(u))l[y]=u[y]}),l}}function sr(i){if(!(typeof i>"u")){if(i.length<=1)return i;for(var l=i.length,u=new Array(l),y=0;y<l;y++)u[l-y-1]=i[y];return u}}async function rr(i,l){var u=this.createSequence();for(const x of o.keys(i)){var y=K(l,i[x],x,i),v=await l.apply(this,y);typeof v<"u"&&u.push(v)}return u}function mt(i){throw{code:"D3137",stack:new Error().stack,message:i||"$error() function evaluated"}}function Ds(i,l){if(!i)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function St(i){if(i!==void 0)return i===null?"null":d(i)?"number":typeof i=="string"?"string":typeof i=="boolean"?"boolean":Array.isArray(i)?"array":w(i)?"function":"object"}async function Qt(i,l){if(!(typeof i>"u")){if(i.length<=1)return i;var u;if(typeof l>"u"){if(!$(i)&&!C(i))throw{stack:new Error().stack,code:"D3070",index:1};u=async function(U,z){return U>z}}else u=l;var y=async function(U,z){var ne=async function(Ae,Pe,Te){Pe.length===0?Array.prototype.push.apply(Ae,Te):Te.length===0?Array.prototype.push.apply(Ae,Pe):await u(Pe[0],Te[0])?(Ae.push(Te[0]),await ne(Ae,Pe,Te.slice(1))):(Ae.push(Pe[0]),await ne(Ae,Pe.slice(1),Te))},G=[];return await ne(G,U,z),G},v=async function(U){if(!Array.isArray(U)||U.length<=1)return U;var z=Math.floor(U.length/2),ne=U.slice(0,z),G=U.slice(z);return ne=await v(ne),G=await v(G),await y(ne,G)},x=await v(i);return x}}function c(i){if(!(typeof i>"u")){if(i.length<=1)return i;for(var l=new Array(i.length),u=0;u<i.length;u++){var y=Math.floor(Math.random()*(u+1));u!==y&&(l[u]=l[y]),l[y]=i[u]}return l}}function f(i){if(!(typeof i>"u")){if(!Array.isArray(i)||i.length<=1)return i;for(var l=k(i)?this.createSequence():[],u=0;u<i.length;u++){for(var y=i[u],v=!1,x=0;x<l.length;x++)if(X(y,l[x])){v=!0;break}v||l.push(y)}return l}}async function g(i,l){var u=Object.create(null);for(const U of o.keys(i)){var y=i[U],v=K(l,y,U,i),x=await l.apply(this,v);le(x)&&(u[U]=y)}return o.keys(u).length===0&&(u=void 0),u}return{sum:A,count:m,max:M,min:_,average:T,string:V,substring:N,substringBefore:ee,substringAfter:oe,lowercase:Se,uppercase:ve,length:pe,trim:Le,pad:nt,match:tt,contains:ge,replace:re,split:xe,join:_e,formatNumber:S,formatBase:D,number:P,floor:q,ceil:j,round:F,abs:I,sqrt:B,power:Y,random:fe,boolean:le,not:Q,map:ue,zip:ut,filter:J,single:He,foldLeft:Ye,sift:g,keys:Ie,lookup:Ke,append:Ot,exists:us,spread:hs,merge:H,reverse:sr,each:rr,error:mt,assert:Ds,type:St,sort:Qt,shuffle:c,distinct:f,base64encode:Fe,base64decode:kt,encodeUrlComponent:p,encodeUrl:b,decodeUrlComponent:W,decodeUrl:he}})();s.exports=h}).call(this)}).call(this,typeof hn<"u"?hn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,s,n){var a=t("./datetime"),o=t("./functions"),h=t("./utils"),d=t("./parser"),C=t("./signature"),$=(function(){var k=h.isNumeric,w=h.isArrayOfStrings,E=h.isArrayOfNumbers,L=h.isSequence,R=h.isFunction,X=h.isLambda,Z=h.isIterable,A=h.isPromise,m=h.getFunctionArity,M=h.isDeepEqual,_=mt(null);async function T(c,f,g){var i;g.base.depth++,g.base.guardrails();var l=g.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(c,f,g),c.type){case"path":i=await V(c,f,g);break;case"binary":i=await pe(c,f,g);break;case"unary":i=await Le(c,f,g);break;case"name":i=nt(c,f,g);break;case"string":case"number":case"value":i=ce(c);break;case"wildcard":i=ge(c,f,g);break;case"descendant":i=re(c,f,g);break;case"parent":i=g.lookup(c.slot.label);break;case"condition":i=await q(c,f,g);break;case"block":i=await j(c,f,g);break;case"bind":i=await I(c,f,g);break;case"regex":i=F(c,f,g);break;case"function":i=await K(c,f,g);break;case"variable":i=B(c,f,g);break;case"lambda":i=He(c,f,g);break;case"partial":i=await ut(c,f,g);break;case"apply":i=await Q(c,f,g);break;case"transform":i=fe(c,f,g);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var u=0;u<c.predicate.length;u++)i=await ve(c.predicate[u].expr,i,g);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(i=await S(c.group,i,g));var y=g.lookup(Symbol.for("jsonata.__evaluate_exit"));return y&&await y(c,f,g,i),i&&L(i)&&!i.tupleStream&&(c.keepArray&&(i.keepSingleton=!0),i.length===0?i=void 0:i.length===1&&(i=i.keepSingleton?i:i[0])),g.base.depth--,i}async function V(c,f,g){var i;Array.isArray(f)&&c.steps[0].type!=="variable"?i=f:i=g.base.createSequence(f);for(var l,u=!1,y=void 0,v=0;v<c.steps.length;v++){var x=c.steps[v];if(x.tuple&&(u=!0),v===0&&x.consarray?l=await T(x,i,g):u?y=await Se(x,i,y,g):l=await ee(x,i,g,v===c.steps.length-1),!u&&(typeof l>"u"||l.length===0))break;typeof x.focus>"u"&&(i=l)}if(u)if(c.tuple)l=y;else for(l=g.base.createSequence(),v=0;v<y.length;v++)l.push(y[v]["@"]);return c.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=g.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(l=await S(c.group,u?y:l,g)),l}function N(c,f){var g=mt(c);for(const i of h.keys(f))g.bind(i,f[i]);return g}async function ee(c,f,g,i){var l;if(c.type==="sort")return l=await Y(c,f,g),c.stages&&(l=await oe(c.stages,l,g)),l;l=g.base.createSequence();for(var u=0;u<f.length;u++){var y=await T(c,f[u],g);if(c.stages)for(var v=0;v<c.stages.length;v++)y=await ve(c.stages[v].expr,y,g);typeof y<"u"&&l.push(y)}var x=g.base.createSequence();return i&&l.length===1&&Array.isArray(l[0])&&!L(l[0])?x=l[0]:Array.prototype.forEach.call(l,function(U){!Array.isArray(U)||U.cons?x.push(U):Array.prototype.forEach.call(U,z=>x.push(z))}),x}async function oe(c,f,g){for(var i=f,l=0;l<c.length;l++){var u=c[l];switch(u.type){case"filter":i=await ve(u.expr,i,g);break;case"index":for(var y=0;y<i.length;y++){var v=i[y];v[u.value]=y}break}}return i}async function Se(c,f,g,i){var l;if(c.type==="sort"){if(g)l=await Y(c,g,i);else{var u=await Y(c,f,i);l=i.base.createSequence(),l.tupleStream=!0;for(var y=0;y<u.length;y++){var v={"@":u[y]};v[c.index]=y,l.push(v)}}return c.stages&&(l=await oe(c.stages,l,i)),l}l=i.base.createSequence(),l.tupleStream=!0;var x=i;g===void 0&&(g=f.map(G=>({"@":G})));for(var U=0;U<g.length;U++){x=N(i,g[U]);var z=await T(c,g[U]["@"],x);if(typeof z<"u"){Array.isArray(z)||(z=[z]);for(var ne=0;ne<z.length;ne++)v=Object.create(null),Object.assign(v,g[U]),z.tupleStream?Object.assign(v,z[ne]):(c.focus?(v[c.focus]=z[ne],v["@"]=g[U]["@"]):v["@"]=z[ne],c.index&&(v[c.index]=ne),c.ancestor&&(v[c.ancestor.label]=g[U]["@"])),l.push(v)}}return c.stages&&(l=await oe(c.stages,l,i)),l}async function ve(c,f,g){var i=g.base.createSequence();if(f&&f.tupleStream&&(i.tupleStream=!0),Array.isArray(f)||(f=g.base.createSequence(f)),c.type==="number"){var l=Math.floor(c.value);l<0&&(l=f.length+l);var u=await f[l];typeof u<"u"&&(Array.isArray(u)?i=u:i.push(u))}else for(l=0;l<f.length;l++){var u=f[l],y=u,v=g;f.tupleStream&&(y=u["@"],v=N(g,u));var x=await T(c,y,v);k(x)&&(x=[x]),E(x)?Array.prototype.forEach.call(x,function(z){var ne=Math.floor(z);ne<0&&(ne=f.length+ne),ne===l&&i.push(u)}):o.boolean(x)&&i.push(u)}return i}async function pe(c,f,g){var i,l=await T(c.lhs,f,g),u=c.value,y=async()=>await T(c.rhs,f,g);if(u==="and"||u==="or")try{return await he(l,y,u)}catch(x){throw x.position=c.position,x.token=u,x}var v=await y();try{switch(u){case"+":case"-":case"*":case"/":case"%":i=kt(l,v,u);break;case"=":case"!=":i=p(l,v,u);break;case"<":case"<=":case">":case">=":i=b(l,v,u);break;case"&":i=_e(l,v);break;case"..":i=P(l,v,g);break;case"in":i=W(l,v);break}}catch(x){throw x.position=c.position,x.token=u,x}return i}async function Le(c,f,g){var i,l={options:g.base.options,createSequence:g.base.createSequence};switch(c.value){case"-":if(i=await T(c.expression,f,g),typeof i>"u")i=void 0;else if(k(i))i=-i;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:i};break;case"[":i=[];let v=await Promise.all(c.expressions.map(async(x,U)=>(g.isParallelCall=U>0,[x,await T(x,f,g)])));for(let x of v){var[u,y]=x;typeof y<"u"&&(u.value==="["?i.push(y):i=o.append.call(l,i,y))}c.consarray&&Object.defineProperty(i,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":i=await S(c,f,g);break}return i}function nt(c,f,g){var i={createSequence:g.base.createSequence};return o.lookup.call(i,f,c.value)}function ce(c){return c.value}function ge(c,f,g){var i={options:g.base.options,createSequence:g.base.createSequence},l=i.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!R(f)&&h.keys(f).forEach(function(u){var y=f[u];Array.isArray(y)?(y=tt(y),l=o.append.call(i,l,y)):l.push(y)}),l}function tt(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(g){tt(g,f)}):f.push(c),f}function re(c,f,g){var i,l=g.base.createSequence();return typeof f<"u"&&(Fe(f,l),l.length===1?i=l[0]:i=l),i}function Fe(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(g){Fe(g,f)}):c!==null&&typeof c=="object"&&!R(c)&&h.keys(c).forEach(function(g){Fe(c[g],f)})}function kt(c,f,g){var i;if(typeof c<"u"&&!k(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!k(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return i;switch(g){case"+":i=c+f;break;case"-":i=c-f;break;case"*":i=c*f;break;case"/":i=c/f;break;case"%":i=c%f;break}return i}function p(c,f,g){var i,l=typeof c,u=typeof f;if(l==="undefined"||u==="undefined")return!1;switch(g){case"=":i=M(c,f);break;case"!=":i=!M(c,f);break}return i}function b(c,f,g){var i,l=typeof c,u=typeof f,y=l==="undefined"||l==="string"||l==="number",v=u==="undefined"||u==="string"||u==="number";if(!y||!v)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?f:c};if(!(l==="undefined"||u==="undefined")){if(l!==u)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(g){case"<":i=c<f;break;case"<=":i=c<=f;break;case">":i=c>f;break;case">=":i=c>=f;break}return i}}function W(c,f){var g=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var i=0;i<f.length;i++)if(f[i]===c){g=!0;break}return g}async function he(c,f,g){var i,l=xe(c);switch(g){case"and":i=l&&xe(await f());break;case"or":i=l||xe(await f());break}return i}function xe(c){var f=o.boolean(c);return typeof f>"u"?!1:f}function _e(c,f){var g,i="",l="";return typeof c<"u"&&(i=o.string(c)),typeof f<"u"&&(l=o.string(f)),g=i.concat(l),g}async function S(c,f,g){var i=Object.create(null),l=Object.create(null),u=!!(f&&f.tupleStream),y={options:g.base.options,createSequence:g.base.createSequence};Array.isArray(f)||(g.base.options,f=y.createSequence(f)),f.length===0&&!u&&f.push(void 0);for(var v=0;v<f.length;v++)for(var x=f[v],U=u?N(g,x):g,z=0;z<c.lhs.length;z++){var ne=c.lhs[z],G=await T(ne[0],u?x["@"]:x,U);if(typeof G!="string"&&G!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:G};if(G!==void 0){if(G==="_jsonata_lambda"||G==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:G};var Ae={data:x,exprIndex:z};if(Object.prototype.hasOwnProperty.call(l,G)){if(l[G].exprIndex!==z)throw{code:"D1009",stack:new Error().stack,position:c.position,value:G};l[G].data=o.append.call(y,l[G].data,x)}else l[G]=Ae}}let Pe=await Promise.all(h.keys(l).map(async(Ne,ye)=>{let Me=l[Ne];var ht=Me.data,Je=g;if(u){var xt=D(Me.data,g);ht=xt["@"],delete xt["@"],Je=N(g,xt)}return g.isParallelCall=ye>0,[Ne,await T(c.lhs[Me.exprIndex][1],ht,Je)]}));for(let Ne of Pe){var[G,Te]=await Ne;typeof Te<"u"&&(i[G]=Te)}return i}function D(c,f){if(!Array.isArray(c))return c;var g=Object.create(null),i={options:f.base.options,createSequence:f.base.createSequence};Object.assign(g,c[0]);for(var l=1;l<c.length;l++)for(const u of h.keys(c[l]))g[u]=o.append.call(i,g[u],c[l][u]);return g}function P(c,f,g){var i;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return i;var l=f-c+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(g.base.options&&l>g.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};i=new Array(l);for(var u=c,y=0;u<=f;u++,y++)i[y]=u;return i.sequence=!0,i}async function I(c,f,g){var i=await T(c.rhs,f,g);return g.bind(c.lhs.value,i),i}async function q(c,f,g){var i,l=await T(c.condition,f,g);return o.boolean(l)?i=await T(c.then,f,g):typeof c.else<"u"&&(i=await T(c.else,f,g)),i}async function j(c,f,g){for(var i,l=mt(g),u=0;u<c.expressions.length;u++)i=await T(c.expressions[u],f,l);return i}function F(c,f,g){var i=new g.base.RegexEngine(c.value),l=function(u,y){var v;i.lastIndex=y||0;var x=i.exec(u);if(x!==null){if(v={match:x[0],start:x.index,end:x.index+x[0].length,groups:[]},x.length>1)for(var U=1;U<x.length;U++)v.groups.push(x[U]);v.next=function(){if(!(i.lastIndex>=u.length)){var z=l(u,i.lastIndex);if(z&&z.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return z}}}return v};return l}function B(c,f,g){var i;return c.value===""?i=f&&f.outerWrapper?f[0]:f:i=g.lookup(c.value),i}async function Y(c,f,g){var i,l=f,u=!!f.tupleStream,y=async function(x,U){for(var z=0,ne=0;z===0&&ne<c.terms.length;ne++){var G=c.terms[ne],Ae=x,Pe=g;u&&(Ae=x["@"],Pe=N(g,x));var Te=await T(G.expression,Ae,Pe);Ae=U,Pe=g,u&&(Ae=U["@"],Pe=N(g,U));var Ne=await T(G.expression,Ae,Pe),ye=typeof Te,Me=typeof Ne;if(ye==="undefined"){z=Me==="undefined"?0:1;continue}if(Me==="undefined"){z=-1;continue}if(!(ye==="string"||ye==="number")||!(Me==="string"||Me==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:ye==="string"||ye==="number"?Ne:Te};if(ye!==Me)throw{code:"T2007",stack:new Error().stack,position:c.position,value:Te,value2:Ne};Te!==Ne&&(Te<Ne?z=-1:z=1,G.descending===!0&&(z=-z))}return z===1},v={environment:g,input:f};return i=await o.sort.apply(v,[l,y]),i}function fe(c,f,g){var i=async function(l){if(!(typeof l>"u")){var u=g.lookup("clone");if(!R(u))throw{code:"T2013",stack:new Error().stack,position:c.position};var y=await ue(u,[l],null,g),v=await T(c.pattern,y,g);if(typeof v<"u"){Array.isArray(v)||(v=[v]);for(var x=0;x<v.length;x++){var U=v[x],z=await T(c.update,U,g),ne=typeof z;if(ne!=="undefined"){if(ne!=="object"||z===null||Array.isArray(z))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:z};for(const Te of h.keys(z))U[Te]=z[Te]}if(typeof c.delete<"u"){var G=await T(c.delete,U,g);if(typeof G<"u"){var Ae=G;if(Array.isArray(G)||(G=[G]),!w(G))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:Ae};for(var Pe=0;Pe<G.length;Pe++)typeof U=="object"&&U!==null&&delete U[G[Pe]]}}}}return y}};return H(i,"<(oa):o>")}var le=d("function($f, $g) { function($x){ $g($f($x)) } }");async function Q(c,f,g){var i,l=await T(c.lhs,f,g);if(c.rhs.type==="function")i=await K(c.rhs,f,g,{context:l});else{var u=await T(c.rhs,f,g);if(!R(u))throw{code:"T2006",stack:new Error().stack,position:c.position,value:u};if(R(l)){var y=await T(le,null,g);i=await ue(y,[l,u],null,g)}else i=await ue(u,[l],null,g)}return i}async function K(c,f,g,i){var l,u=await T(c.procedure,f,g);if(typeof u>"u"&&c.procedure.type==="path"&&g.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var y=[];typeof i<"u"&&y.push(i.context);for(var v=0;v<c.arguments.length;v++){const U=await T(c.arguments[v],f,g);if(R(U)){const z=async function(...ne){return await ue(U,ne,null,g)};z.arity=m(U),y.push(z)}else y.push(U)}var x=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof u=="object"&&(u.token=x,u.position=c.position),l=await ue(u,y,f,g)}catch(U){throw U.position||(U.position=c.position),U.token||(U.token=x),U}return l}async function ue(c,f,g,i){var l;for(l=await J(c,f,g,i);X(l)&&l.thunk===!0;){var u=await T(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(u.token=l.body.procedure.value),u.position=l.body.procedure.position;for(var y=[],v=0;v<l.body.arguments.length;v++)y.push(await T(l.body.arguments[v],l.input,l.environment));l=await J(u,y,g,i)}return l}async function J(c,f,g,i){var l;try{var u=f;if(c&&(u=Ye(c.signature,f,g)),X(c))l=await Ie(c,u);else if(c&&c._jsonata_function===!0){var y={environment:i,input:g,options:i.base.options,createSequence:i.base.createSequence};l=c.implementation.apply(y,u),Z(l)&&(l=l.next().value),A(l)&&(l=await l)}else if(typeof c=="function")l=c.apply(g,u),A(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(v){throw c&&(typeof v.token>"u"&&typeof c.token<"u"&&(v.token=c.token),v.position=c.position||v.position),v}return l}function He(c,f,g){var i={_jsonata_lambda:!0,input:f,environment:g,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(i.thunk=!0),i.apply=async function(l,u){return await ue(i,u,f,l?l.environment:g)},i}async function ut(c,f,g){for(var i,l=[],u=0;u<c.arguments.length;u++){var y=c.arguments[u];y.type==="operator"&&y.value==="?"?l.push(y):l.push(await T(y,f,g))}var v=await T(c.procedure,f,g);if(typeof v>"u"&&c.procedure.type==="path"&&g.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(X(v))i=Ke(v,l,g);else if(v&&v._jsonata_function===!0)i=Ot(v.implementation,l,g);else if(typeof v=="function")i=Ot(v,l,g);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return i}function Ye(c,f,g){if(typeof c>"u")return f;var i=c.validate(f,g);return i}async function Ie(c,f){var g,i=mt(c.environment);return Array.prototype.forEach.call(c.arguments,function(l,u){i.bind(l.value,f[u])}),typeof c.body=="function"?g=await us(c.body,i):g=await T(c.body,c.input,i),g}function Ke(c,f,g){var i=mt(c.environment||g),l=[];Array.prototype.forEach.call(c.arguments,function(y,v){var x=f[v];x&&x.type==="operator"&&x.value==="?"?l.push(y):i.bind(y.value,x)});var u={_jsonata_lambda:!0,input:c.input,environment:i,arguments:l,body:c.body};return u}function Ot(c,f,g){var i=hs(c);i=i.map(function(v){return"$"+v.trim()});var l="function("+i.join(", ")+"){ _ }",u=d(l);u.body=c;var y=Ke(u,f,g);return y}async function us(c,f){var g=hs(c),i=g.map(function(y){return f.lookup(y.trim())}),l={environment:f,createSequence:f.base.createSequence},u=c.apply(l,i);return A(u)&&(u=await u),u}function hs(c){var f=c.toString(),g=/\(([^)]*)\)/.exec(f)[1],i=g.split(",");return i}function H(c,f){var g={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(g.signature=C(f)),g}async function sr(c,f){if(!(typeof c>"u")){var g=this.input;typeof f<"u"&&(g=f,Array.isArray(g)&&!L(g)&&(g=this.createSequence(g),g.outerWrapper=!0));try{var i=d(c,!1)}catch(u){throw St(u),{stack:new Error().stack,code:"D3120",value:u.message,error:u}}try{var l=await T(i,g,this.environment)}catch(u){throw St(u),{stack:new Error().stack,code:"D3121",value:u.message,error:u}}return l}}function rr(c){if(!(typeof c>"u"))return JSON.parse(o.string(c))}function mt(c){var f=Object.create(null);const g={bind:function(l,u){f[l]=u},lookup:function(l){var u;return Object.prototype.hasOwnProperty.call(f,l)?u=f[l]:c&&(u=c.lookup(l)),u},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var i=c.lookup(Symbol.for("jsonata.__createFrame_push"));i&&i(c,g),g.base=c.base}return g}_.bind("sum",H(o.sum,"<a<n>:n>")),_.bind("count",H(o.count,"<a:n>")),_.bind("max",H(o.max,"<a<n>:n>")),_.bind("min",H(o.min,"<a<n>:n>")),_.bind("average",H(o.average,"<a<n>:n>")),_.bind("string",H(o.string,"<x-b?:s>")),_.bind("substring",H(o.substring,"<s-nn?:s>")),_.bind("substringBefore",H(o.substringBefore,"<s-s:s>")),_.bind("substringAfter",H(o.substringAfter,"<s-s:s>")),_.bind("lowercase",H(o.lowercase,"<s-:s>")),_.bind("uppercase",H(o.uppercase,"<s-:s>")),_.bind("length",H(o.length,"<s-:n>")),_.bind("trim",H(o.trim,"<s-:s>")),_.bind("pad",H(o.pad,"<s-ns?:s>")),_.bind("match",H(o.match,"<s-f<s:o>n?:a<o>>")),_.bind("contains",H(o.contains,"<s-(sf):b>")),_.bind("replace",H(o.replace,"<s-(sf)(sf)n?:s>")),_.bind("split",H(o.split,"<s-(sf)n?:a<s>>")),_.bind("join",H(o.join,"<a<s>s?:s>")),_.bind("formatNumber",H(o.formatNumber,"<n-so?:s>")),_.bind("formatBase",H(o.formatBase,"<n-n?:s>")),_.bind("formatInteger",H(a.formatInteger,"<n-s:s>")),_.bind("parseInteger",H(a.parseInteger,"<s-s:n>")),_.bind("number",H(o.number,"<(nsb)-:n>")),_.bind("floor",H(o.floor,"<n-:n>")),_.bind("ceil",H(o.ceil,"<n-:n>")),_.bind("round",H(o.round,"<n-n?:n>")),_.bind("abs",H(o.abs,"<n-:n>")),_.bind("sqrt",H(o.sqrt,"<n-:n>")),_.bind("power",H(o.power,"<n-n:n>")),_.bind("random",H(o.random,"<:n>")),_.bind("boolean",H(o.boolean,"<x-:b>")),_.bind("not",H(o.not,"<x-:b>")),_.bind("map",H(o.map,"<af>")),_.bind("zip",H(o.zip,"<a+>")),_.bind("filter",H(o.filter,"<af>")),_.bind("single",H(o.single,"<af?>")),_.bind("reduce",H(o.foldLeft,"<afj?:j>")),_.bind("sift",H(o.sift,"<o-f?:o>")),_.bind("keys",H(o.keys,"<x-:a<s>>")),_.bind("lookup",H(o.lookup,"<x-s:x>")),_.bind("append",H(o.append,"<xx:a>")),_.bind("exists",H(o.exists,"<x:b>")),_.bind("spread",H(o.spread,"<x-:a<o>>")),_.bind("merge",H(o.merge,"<a<o>:o>")),_.bind("reverse",H(o.reverse,"<a:a>")),_.bind("each",H(o.each,"<o-f:a>")),_.bind("error",H(o.error,"<s?:x>")),_.bind("assert",H(o.assert,"<bs?:x>")),_.bind("type",H(o.type,"<x:s>")),_.bind("sort",H(o.sort,"<af?:a>")),_.bind("shuffle",H(o.shuffle,"<a:a>")),_.bind("distinct",H(o.distinct,"<x:x>")),_.bind("base64encode",H(o.base64encode,"<s-:s>")),_.bind("base64decode",H(o.base64decode,"<s-:s>")),_.bind("encodeUrlComponent",H(o.encodeUrlComponent,"<s-:s>")),_.bind("encodeUrl",H(o.encodeUrl,"<s-:s>")),_.bind("decodeUrlComponent",H(o.decodeUrlComponent,"<s-:s>")),_.bind("decodeUrl",H(o.decodeUrl,"<s-:s>")),_.bind("eval",H(sr,"<sx?:x>")),_.bind("toMillis",H(a.toMillis,"<s-s?:n>")),_.bind("fromMillis",H(a.fromMillis,"<n-s?s?:s>")),_.bind("clone",H(rr,"<(oa)-:o>"));var Ds={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function St(c){var f=Ds[c.code];if(typeof f<"u"){var g=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});g=g.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=g}}function Qt(c,f){var g,i;try{g=d(c,f&&f.recover),i=g.errors,delete g.errors}catch(y){throw St(y),y}var l=mt(_),u=new Date;return l.bind("now",H(function(y,v){return a.fromMillis(u.getTime(),y,v)},"<s?s?:s>")),l.bind("millis",H(function(){return u.getTime()},"<:n>")),{evaluate:async function(y,v,x){if(typeof i<"u"){var U={code:"S0500",position:0};throw St(U),U}const z=mt(l);for(const G of h.keys(v))z.bind(G,v[G]);if(z.bind("$",y),u=new Date,z.timestamp=u,z.options=f,z.createSequence=function(){var G=[];return f&&f.sequence&&(G.push=function(...Ae){if(G.length+Ae.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(G,Ae)}),G.sequence=!0,arguments.length===1&&G.push(arguments[0]),G},Array.isArray(y)&&!L(y)&&(y=z.createSequence(y),y.outerWrapper=!0),f&&(f.timeout||f.stack)){const G=Date.now();z.guardrails=function(){if(f.stack>0&&z.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-G>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else z.guardrails=function(){};z.base=z,z.depth=0,f&&f.RegexEngine?z.RegexEngine=f.RegexEngine:z.RegexEngine=RegExp;var ne;try{return ne=await T(g,y,z),typeof x=="function"&&x(null,ne),ne}catch(G){throw St(G),G}},assign:function(y,v){l.bind(y,v)},registerFunction:function(y,v,x){var U=H(v,x);l.bind(y,U)},ast:function(){return g},errors:function(){return i}}}return Qt.parser=d,Qt})();s.exports=$},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,s,n){var a=t("./signature");const o=(()=>{var h={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
44
+ `,r:"\r",t:" "},C=function(k){var w=0,E=k.length,L=function(Z,A){var m={type:Z,value:A,position:w};return m},R=function(){for(var Z=w,A=0,m,M,_=function(V){if(k.charAt(V)==="/"&&A===0){for(var N=0;k.charAt(V-(N+1))==="\\";)N++;if(N%2===0)return!0}return!1};w<E;){var T=k.charAt(w);if(_(w)){if(m=k.substring(Z,w),m==="")throw{code:"S0301",stack:new Error().stack,position:w};for(w++,T=k.charAt(w),Z=w;T==="i"||T==="m";)w++,T=k.charAt(w);return M=k.substring(Z,w)+"g",new RegExp(m,M)}(T==="("||T==="["||T==="{")&&k.charAt(w-1)!=="\\"&&A++,(T===")"||T==="]"||T==="}")&&k.charAt(w-1)!=="\\"&&A--,w++}throw{code:"S0302",stack:new Error().stack,position:w}},X=function(Z){if(w>=E)return null;for(var A=k.charAt(w);w<E&&`
45
+ \r\v`.indexOf(A)>-1;)w++,A=k.charAt(w);if(A==="/"&&k.charAt(w+1)==="*"){var m=w;for(w+=2,A=k.charAt(w);!(A==="*"&&k.charAt(w+1)==="/");)if(A=k.charAt(++w),w>=E)throw{code:"S0106",stack:new Error().stack,position:m};return w+=2,A=k.charAt(w),X(Z)}if(Z!==!0&&A==="/")return w++,L("regex",R());if(A==="."&&k.charAt(w+1)===".")return w+=2,L("operator","..");if(A===":"&&k.charAt(w+1)==="=")return w+=2,L("operator",":=");if(A==="!"&&k.charAt(w+1)==="=")return w+=2,L("operator","!=");if(A===">"&&k.charAt(w+1)==="=")return w+=2,L("operator",">=");if(A==="<"&&k.charAt(w+1)==="=")return w+=2,L("operator","<=");if(A==="*"&&k.charAt(w+1)==="*")return w+=2,L("operator","**");if(A==="~"&&k.charAt(w+1)===">")return w+=2,L("operator","~>");if(A==="?"&&k.charAt(w+1)===":")return w+=2,L("operator","?:");if(A==="?"&&k.charAt(w+1)==="?")return w+=2,L("operator","??");if(Object.prototype.hasOwnProperty.call(h,A))return w++,L("operator",A);if(A==='"'||A==="'"){var M=A;w++;for(var _="";w<E;){if(A=k.charAt(w),A==="\\")if(w++,A=k.charAt(w),Object.prototype.hasOwnProperty.call(d,A))_+=d[A];else if(A==="u"){var T=k.substr(w+1,4);if(/^[0-9a-fA-F]+$/.test(T)){var V=parseInt(T,16);_+=String.fromCharCode(V),w+=4}else throw{code:"S0104",stack:new Error().stack,position:w}}else throw{code:"S0103",stack:new Error().stack,position:w,token:A};else{if(A===M)return w++,L("string",_);_+=A}w++}throw{code:"S0101",stack:new Error().stack,position:w}}var N=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ee=N.exec(k.substring(w));if(ee!==null){var oe=parseFloat(ee[0]);if(!isNaN(oe)&&isFinite(oe))return w+=ee[0].length,L("number",oe);throw{code:"S0102",stack:new Error().stack,position:w,token:ee[0]}}var Se;if(A==="`"){w++;var ve=k.indexOf("`",w);if(ve!==-1)return Se=k.substring(w,ve),w=ve+1,L("name",Se);throw w=E,{code:"S0105",stack:new Error().stack,position:w}}for(var pe=w,Le;;)if(Le=k.charAt(pe),pe===E||`
46
+ \r\v`.indexOf(Le)>-1||Object.prototype.hasOwnProperty.call(h,Le)){if(k.charAt(w)==="$")return Se=k.substring(w+1,pe),w=pe,L("variable",Se);switch(Se=k.substring(w,pe),w=pe,Se){case"or":case"in":case"and":return L("operator",Se);case"true":return L("value",!0);case"false":return L("value",!1);case"null":return L("value",null);default:return w===E&&Se===""?null:L("name",Se)}}else pe++};return X},$=function(k,w){var E,L,R=Object.create(null),X=[],Z=function(){var p=[];E.id!=="(end)"&&p.push({type:E.type,value:E.value,position:E.position});for(var b=L();b!==null;)p.push(b),b=L();return p},A={nud:function(){var p={code:"S0211",token:this.value,position:this.position};if(w)return p.remaining=Z(),p.type="error",X.push(p),p;throw p.stack=new Error().stack,p}},m=function(p,b){var W=R[p];return b=b||0,W?b>=W.lbp&&(W.lbp=b):(W=Object.create(A),W.id=W.value=p,W.lbp=b,R[p]=W),W},M=function(p){if(w){p.remaining=Z(),X.push(p);var b=R["(error)"];return E=Object.create(b),E.error=p,E.type="(error)",E}else throw p.stack=new Error().stack,p},_=function(p,b){if(p&&E.id!==p){var W;E.id==="(end)"?W="S0203":W="S0202";var he={code:W,position:E.position,token:E.value,value:p};return M(he)}var xe=L(b);if(xe===null)return E=R["(end)"],E.position=k.length,E;var _e=xe.value,S=xe.type,D;switch(S){case"name":case"variable":D=R["(name)"];break;case"operator":if(D=R[_e],!D)return M({code:"S0204",stack:new Error().stack,position:xe.position,token:_e});break;case"string":case"number":case"value":D=R["(literal)"];break;case"regex":S="regex",D=R["(regex)"];break;default:return M({code:"S0205",stack:new Error().stack,position:xe.position,token:_e})}return E=Object.create(D),E.value=_e,E.type=S,E.position=xe.position,E},T=function(p){var b,W=E;for(_(null,!0),b=W.nud();p<E.lbp;)W=E,_(),b=W.led(b);return b},V=function(p){var b=m(p,0);b.nud=function(){return this}},N=function(p,b,W){var he=b||h[p],xe=m(p,he);return xe.led=W||function(_e){return this.lhs=_e,this.rhs=T(he),this.type="binary",this},xe},ee=function(p,b,W){var he=m(p,b);return he.led=W,he},oe=function(p,b){var W=m(p);return W.nud=b||function(){return this.expression=T(70),this.type="unary",this},W};V("(end)"),V("(name)"),V("(literal)"),V("(regex)"),m(":"),m(";"),m(","),m(")"),m("]"),m("}"),m(".."),N("."),N("+"),N("-"),N("*"),N("/"),N("%"),N("="),N("<"),N(">"),N("!="),N("<="),N(">="),N("&"),N("and"),N("or"),N("in"),V("and"),V("or"),V("in"),oe("-"),N("~>"),N("??",h["??"],function(p){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(p))]},this.then=p,this.else=T(0),this}),ee("(error)",10,function(p){return this.lhs=p,this.error=E.error,this.remaining=Z(),this.type="error",this}),oe("*",function(){return this.type="wildcard",this}),oe("**",function(){return this.type="descendant",this}),oe("%",function(){return this.type="parent",this}),N("(",h["("],function(p){if(this.procedure=p,this.type="function",this.arguments=[],E.id!==")")for(;E.type==="operator"&&E.id==="?"?(this.type="partial",this.arguments.push(E),_("?")):this.arguments.push(T(0)),E.id===",";)_(",");if(_(")",!0),p.type==="name"&&(p.value==="function"||p.value==="λ")){if(this.arguments.forEach(function(_e,S){if(_e.type!=="variable")return M({code:"S0208",stack:new Error().stack,position:_e.position,token:_e.value,value:S+1})}),this.type="lambda",E.id==="<"){for(var b=E.position,W=1,he="<";W>0&&E.id!=="{"&&E.id!=="(end)";){var xe=_();xe.id===">"?W--:xe.id==="<"&&W++,he+=xe.value}_(">");try{this.signature=a(he)}catch(_e){return _e.position=b+_e.offset,M(_e)}}_("{"),this.body=T(0),_("}")}return this}),oe("(",function(){for(var p=[];E.id!==")"&&(p.push(T(0)),E.id===";");)_(";");return _(")",!0),this.type="block",this.expressions=p,this}),oe("[",function(){var p=[];if(E.id!=="]")for(;;){var b=T(0);if(E.id===".."){var W={type:"binary",value:"..",position:E.position,lhs:b};_(".."),W.rhs=T(0),b=W}if(p.push(b),E.id!==",")break;_(",")}return _("]",!0),this.expressions=p,this.type="unary",this}),N("[",h["["],function(p){if(E.id==="]"){for(var b=p;b&&b.type==="binary"&&b.value==="[";)b=b.lhs;return b.keepArray=!0,_("]"),p}else return this.lhs=p,this.rhs=T(h["]"]),this.type="binary",_("]",!0),this}),N("^",h["^"],function(p){_("(");for(var b=[];;){var W={descending:!1};if(E.id==="<"?_("<"):E.id===">"&&(W.descending=!0,_(">")),W.expression=T(0),b.push(W),E.id!==",")break;_(",")}return _(")"),this.lhs=p,this.rhs=b,this.type="binary",this});var Se=function(p){var b=[];if(E.id!=="}")for(;;){var W=T(0);_(":");var he=T(0);if(b.push([W,he]),E.id!==",")break;_(",")}return _("}",!0),typeof p>"u"?(this.lhs=b,this.type="unary"):(this.lhs=p,this.rhs=b,this.type="binary"),this};oe("{",Se),N("{",h["{"],Se),ee(":=",h[":="],function(p){return p.type!=="variable"?M({code:"S0212",stack:new Error().stack,position:p.position,token:p.value}):(this.lhs=p,this.rhs=T(h[":="]-1),this.type="binary",this)}),N("@",h["@"],function(p){return this.lhs=p,this.rhs=T(h["@"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),N("#",h["#"],function(p){return this.lhs=p,this.rhs=T(h["#"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),N("?",h["?"],function(p){return this.type="condition",this.condition=p,this.then=T(0),E.id===":"&&(_(":"),this.else=T(0)),this}),N("?:",h["?:"],function(p){return this.type="condition",this.condition=JSON.parse(JSON.stringify(p)),this.then=p,this.else=T(0),this}),oe("|",function(){return this.type="transform",this.pattern=T(0),_("|"),this.update=T(0),E.id===","&&(_(","),this.delete=T(0)),_("|"),this});var ve=function(p){var b;if(p.type==="function"&&!p.predicate){var W={type:"lambda",thunk:!0,arguments:[],position:p.position};W.body=p,b=W}else if(p.type==="condition")p.then=ve(p.then),typeof p.else<"u"&&(p.else=ve(p.else)),b=p;else if(p.type==="block"){var he=p.expressions.length;he>0&&(p.expressions[he-1]=ve(p.expressions[he-1])),b=p}else b=p;return b},pe=0,Le=0,nt=[],ce=function(p,b){switch(p.type){case"name":case"wildcard":b.level--,b.level===0&&(typeof p.ancestor>"u"||(nt[b.index].slot.label=p.ancestor.label),p.ancestor=b,p.tuple=!0);break;case"parent":b.level++;break;case"block":p.expressions.length>0&&(p.tuple=!0,b=ce(p.expressions[p.expressions.length-1],b));break;case"path":p.tuple=!0;var W=p.steps.length-1;for(b=ce(p.steps[W--],b);b.level>0&&W>=0;)b=ce(p.steps[W--],b);break;default:throw{code:"S0217",token:p.type,position:p.position}}return b},ge=function(p,b){if(typeof b.seekingParent<"u"||b.type==="parent"){var W=typeof b.seekingParent<"u"?b.seekingParent:[];b.type==="parent"&&W.push(b.slot),typeof p.seekingParent>"u"?p.seekingParent=W:Array.prototype.push.apply(p.seekingParent,W)}},tt=function(p){var b=p.steps.length-1,W=p.steps[b],he=typeof W.seekingParent<"u"?W.seekingParent:[];W.type==="parent"&&he.push(W.slot);for(var xe=0;xe<he.length;xe++){var _e=he[xe];for(b=p.steps.length-2;_e.level>0;){if(b<0){typeof p.seekingParent>"u"?p.seekingParent=[_e]:p.seekingParent.push(_e);break}for(var S=p.steps[b--];b>=0&&S.focus&&p.steps[b].focus;)S=p.steps[b--];_e=ce(S,_e)}}},re=function(p){var b;switch(p.type){case"binary":switch(p.value){case".":var W=re(p.lhs);W.type==="path"?b=W:b={type:"path",steps:[W]},W.type==="parent"&&(b.seekingParent=[W.slot]);var he=re(p.rhs);he.type==="path"?Array.prototype.push.apply(b.steps,he.steps):(typeof he.predicate<"u"&&(he.stages=he.predicate,delete he.predicate),b.steps.push(he)),b.steps.filter(function(B){if(B.type==="number"||B.type==="value")throw{code:"S0213",stack:new Error().stack,position:B.position,value:B.value};return B.type==="string"}).forEach(function(B){B.type="name"}),b.steps.filter(function(B){return B.keepArray===!0}).length>0&&(b.keepSingletonArray=!0);var xe=b.steps[0];xe.type==="unary"&&xe.value==="["&&(xe.consarray=!0);var _e=b.steps[b.steps.length-1];_e.type==="unary"&&_e.value==="["&&(_e.consarray=!0),tt(b);break;case"[":b=re(p.lhs);var S=b,D="predicate";if(b.type==="path"&&(S=b.steps[b.steps.length-1],D="stages"),typeof S.group<"u")throw{code:"S0209",stack:new Error().stack,position:p.position};typeof S[D]>"u"&&(S[D]=[]);var P=re(p.rhs);typeof P.seekingParent<"u"&&(P.seekingParent.forEach(B=>{B.level===1?ce(S,B):B.level--}),ge(S,P)),S[D].push({type:"filter",expr:P,position:p.position});break;case"{":if(b=re(p.lhs),typeof b.group<"u")throw{code:"S0210",stack:new Error().stack,position:p.position};b.group={lhs:p.rhs.map(function(B){return[re(B[0]),re(B[1])]}),position:p.position};break;case"^":b=re(p.lhs),b.type!=="path"&&(b={type:"path",steps:[b]});var I={type:"sort",position:p.position};I.terms=p.rhs.map(function(B){var Y=re(B.expression);return ge(I,Y),{descending:B.descending,expression:Y}}),b.steps.push(I),tt(b);break;case":=":b={type:"bind",value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),ge(b,b.rhs);break;case"@":if(b=re(p.lhs),S=b,b.type==="path"&&(S=b.steps[b.steps.length-1]),typeof S.stages<"u"||typeof S.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:p.position};if(S.type==="sort")throw{code:"S0216",stack:new Error().stack,position:p.position};p.keepArray&&(S.keepArray=!0),S.focus=p.rhs.value,S.tuple=!0;break;case"#":b=re(p.lhs),S=b,b.type==="path"?S=b.steps[b.steps.length-1]:(b={type:"path",steps:[b]},typeof S.predicate<"u"&&(S.stages=S.predicate,delete S.predicate)),typeof S.stages>"u"?S.index=p.rhs.value:S.stages.push({type:"index",value:p.rhs.value,position:p.position}),S.tuple=!0;break;case"~>":b={type:"apply",value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),b.keepArray=b.lhs.keepArray||b.rhs.keepArray;break;default:b={type:p.type,value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),ge(b,b.lhs),ge(b,b.rhs)}break;case"unary":b={type:p.type,value:p.value,position:p.position},p.value==="["?b.expressions=p.expressions.map(function(B){var Y=re(B);return ge(b,Y),Y}):p.value==="{"?b.lhs=p.lhs.map(function(B){var Y=re(B[0]);ge(b,Y);var fe=re(B[1]);return ge(b,fe),[Y,fe]}):(b.expression=re(p.expression),p.value==="-"&&b.expression.type==="number"?(b=b.expression,b.value=-b.value):ge(b,b.expression));break;case"function":case"partial":b={type:p.type,name:p.name,value:p.value,position:p.position},b.arguments=p.arguments.map(function(B){var Y=re(B);return ge(b,Y),Y}),b.procedure=re(p.procedure);break;case"lambda":b={type:p.type,arguments:p.arguments,signature:p.signature,position:p.position};var q=re(p.body);b.body=ve(q);break;case"condition":b={type:p.type,position:p.position},b.condition=re(p.condition),ge(b,b.condition),b.then=re(p.then),ge(b,b.then),typeof p.else<"u"&&(b.else=re(p.else),ge(b,b.else));break;case"transform":b={type:p.type,position:p.position},b.pattern=re(p.pattern),b.update=re(p.update),typeof p.delete<"u"&&(b.delete=re(p.delete));break;case"block":b={type:p.type,position:p.position},b.expressions=p.expressions.map(function(B){var Y=re(B);return ge(b,Y),(Y.consarray||Y.type==="path"&&Y.steps[0].consarray)&&(b.consarray=!0),Y});break;case"name":b={type:"path",steps:[p]},p.keepArray&&(b.keepSingletonArray=!0);break;case"parent":b={type:"parent",slot:{label:"!"+pe++,level:1,index:Le++}},nt.push(b);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":b=p;break;case"operator":if(p.value==="and"||p.value==="or"||p.value==="in")p.type="name",b=re(p);else if(p.value==="?")b=p;else throw{code:"S0201",stack:new Error().stack,position:p.position,token:p.value};break;case"error":b=p,p.lhs&&(b=re(p.lhs));break;default:var j="S0206";p.id==="(end)"&&(j="S0207");var F={code:j,position:p.position,token:p.value};if(w)return X.push(F),{type:"error",error:F};throw F.stack=new Error().stack,F}return p.keepArray&&(b.keepArray=!0),b};L=C(k),_();var Fe=T(0);if(E.id!=="(end)"){var kt={code:"S0201",position:E.position,token:E.value};M(kt)}if(Fe=re(Fe),Fe.type==="parent"||typeof Fe.seekingParent<"u")throw{code:"S0217",token:Fe.type,position:Fe.position};return X.length>0&&(Fe.errors=X),Fe};return $})();s.exports=o},{"./signature":5}],5:[function(t,s,n){var a=t("./utils");const o=(()=>{var h={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function d(C){for(var $=1,k=[],w=Object.create(null),E=w;$<C.length;){var L=C.charAt($);if(L===":")break;var R=function(){k.push(w),E=w,w=Object.create(null)},X=function(N,ee,oe,Se){for(var ve=1,pe=ee;pe<N.length;)if(pe++,L=N.charAt(pe),L===Se){if(ve--,ve===0)break}else L===oe&&ve++;return pe};switch(L){case"s":case"n":case"b":case"l":case"o":w.regex="["+L+"m]",w.type=L,R();break;case"a":w.regex="[asnblfom]",w.type=L,w.array=!0,R();break;case"f":w.regex="f",w.type=L,R();break;case"j":w.regex="[asnblom]",w.type=L,R();break;case"x":w.regex="[asnblfom]",w.type=L,R();break;case"-":E.context=!0,E.contextRegex=new RegExp(E.regex),E.regex+="?";break;case"?":case"+":E.regex+=L;break;case"(":var Z=X(C,$,"(",")"),A=C.substring($+1,Z);if(A.indexOf("<")===-1)w.regex="["+A+"m]";else throw{code:"S0402",stack:new Error().stack,value:A,offset:$};w.type="("+A+")",$=Z,R();break;case"<":if(E.type==="a"||E.type==="f"){var m=X(C,$,"<",">");E.subtype=C.substring($+1,m),$=m}else throw{code:"S0401",stack:new Error().stack,value:E.type,offset:$};break}$++}var M="^"+k.map(function(N){return"("+N.regex+")"}).join("")+"$",_=new RegExp(M),T=function(N){var ee;if(a.isFunction(N))ee="f";else{var oe=typeof N;switch(oe){case"string":ee="s";break;case"number":ee="n";break;case"boolean":ee="b";break;case"object":N===null?ee="l":Array.isArray(N)?ee="a":ee="o";break;case"undefined":default:ee="m"}}return ee},V=function(N,ee){for(var oe="^",Se=0,ve=0;ve<k.length;ve++){oe+=k[ve].regex;var pe=ee.match(oe);if(pe===null)throw{code:"T0410",stack:new Error().stack,value:N[Se],index:Se+1};Se=pe[0].length}throw{code:"T0410",stack:new Error().stack,value:N[Se],index:Se+1}};return{definition:C,validate:function(N,ee){var oe="";N.forEach(function(Le){oe+=T(Le)});var Se=_.exec(oe);if(Se){var ve=[],pe=0;return k.forEach(function(Le,nt){var ce=N[pe],ge=Se[nt+1];if(ge==="")if(Le.context&&Le.contextRegex){var tt=T(ee);if(Le.contextRegex.test(tt))ve.push(ee);else throw{code:"T0411",stack:new Error().stack,value:ee,index:pe+1}}else ve.push(ce),pe++;else ge.split("").forEach(function(re){if(ce=N[pe],Le.type==="a"){if(re==="m")ce=void 0;else{var Fe=!0;if(typeof Le.subtype<"u"){if(re!=="a"&&ge!==Le.subtype)Fe=!1;else if(re==="a"&&ce.length>0){var kt=T(ce[0]);if(kt!==Le.subtype.charAt(0))Fe=!1;else{var p=ce.filter(function(b){return T(b)!==kt});Fe=p.length===0}}}if(!Fe)throw{code:"T0412",stack:new Error().stack,value:ce,index:pe+1,type:h[Le.subtype]};re!=="a"&&(ce=[ce])}ve.push(ce),pe++}else ve.push(ce),pe++})}),ve}V(N,oe)}}}return d})();s.exports=o},{"./utils":6}],6:[function(t,s,n){const a=(()=>{function o(m){var M=!1;if(typeof m=="number"&&(M=!isNaN(m),M&&!isFinite(m)))throw{code:"D1001",value:m,stack:new Error().stack};return M}function h(m){var M=!1;return Array.isArray(m)&&(M=m.filter(function(_){return typeof _!="string"}).length===0),M}function d(m){var M=!1;return Array.isArray(m)&&(M=m.filter(function(_){return!o(_)}).length===0),M}function C(m){return m.sequence===!0&&Array.isArray(m)}function $(m){return m&&(m._jsonata_function===!0||m._jsonata_lambda===!0)||typeof m=="function"}function k(m){var M=typeof m.arity=="number"?m.arity:typeof m.implementation=="function"?m.implementation.length:typeof m.length=="number"?m.length:m.arguments.length;return M}function w(m){return m&&m._jsonata_lambda===!0}var E=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function L(m){return typeof m=="object"&&m!==null&&E in m&&"next"in m&&typeof m.next=="function"}function R(m,M){if(m===M)return!0;if(typeof m=="object"&&typeof M=="object"&&m!==null&&M!==null){if(Array.isArray(m)&&Array.isArray(M)){if(m.length!==M.length)return!1;for(var _=0;_<m.length;_++)if(!R(m[_],M[_]))return!1;return!0}var T=Object.getOwnPropertyNames(m),V=Object.getOwnPropertyNames(M);if(T.length!==V.length)return!1;for(T=T.sort(),V=V.sort(),_=0;_<T.length;_++)if(T[_]!==V[_])return!1;for(_=0;_<T.length;_++){var N=T[_];if(!R(m[N],M[N]))return!1}return!0}return!1}function X(m){return typeof m=="object"&&m!==null&&"then"in m&&typeof m.then=="function"}function Z(m){var M=[];for(let _ of m)M.push(_);return M}function A(m){return typeof m=="object"&&m!==null?Object.keys(m):[]}return{isNumeric:o,isArrayOfStrings:h,isArrayOfNumbers:d,isSequence:C,isFunction:$,isLambda:w,isIterable:L,getFunctionArity:k,isDeepEqual:R,stringToArray:Z,isPromise:X,keys:A}})();s.exports=a},{}]},{},[3])(3)})})(yr)),yr.exports}var Hi=Bi();const Vi=fn(Hi);class pn{constructor(e){this.path=e}toString(){return this.path}}function gn(r){return new Proxy(r,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const s=e.path?`${e.path}.${String(t)}`:String(t);return gn(new pn(s))}})}const Wi=/\$\{|\{\$/;function Gi(r){return Wi.test(r)}function br(r){const e=typeof r=="string"?r:r.path;if(Gi(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const zs=function(r){return this instanceof zs?gn(new pn(r)):new zs(r)},wr="1";function Yi(r){const e=r.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let Be=class Qe{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const s=t.indexOf("=");return e[t.substring(0,s).trim()]=t.substring(s+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let s=e;for(;s;){if(!t(s))return;s=s.parentNode||s.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let s=e;for(;s;){if(s instanceof Element&&s.nodeType===1){const n=window.getComputedStyle(s);if(Qe.overflowMatches(n,t))return s}s=Qe.nextComposedAncestor(s)}return null}static getScrollableAncestor(e){return Qe.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Qe.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const s of Qe.scopeAttributeNames(t))if(e.hasAttribute(s))return e.getAttribute(s)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let s=e;for(;s;){if(s instanceof HTMLElement){const a=Qe.readScopeAttributeOnElement(s,t);if(a!=null)return a}const n=s.parentNode||s.host;if(!n)break;s=n}return null}static getApiConfiguration(e){const t=Qe.getAncestorAttributeValue(e,"token"),s=Qe.getAncestorAttributeValue(e,"addHTTPResponse")!=null,n=Qe.getAncestorAttributeValue(e,"serviceURL");let a=null,o=null;const h=Qe.getAncestorAttributeValue(e,"tokenProvider"),d=Qe.getAncestorAttributeValue(e,"eventsApiToken");t||(a=Qe.getAncestorAttributeValue(e,"userName"),o=Qe.getAncestorAttributeValue(e,"password"));const C=Qe.getAncestorAttributeValue(e,"credentials")||void 0,$=e.getAttribute("cache"),k=e.hasAttribute("blockUntilDone"),w=e.hasAttribute("keepAlive");return{serviceURL:n,token:t,userName:a,password:o,authToken:d,tokenProvider:h,addHTTPResponse:s,credentials:C,cache:$,blockUntilDone:k,keepAlive:w}}static getClosestElement(e,t){let s=e;for(;s&&!(s.nodeName&&s.nodeName.toLowerCase()===t);){const n=s.parentNode||s.host;if(!n){s=null;break}s=n}return s?.nodeName?s:null}static getClosestForm(e){return Qe.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const s=new Set(t.map(o=>o.toLowerCase())),n=[];let a=e.parentNode||e.host;for(;a;)a instanceof Element&&s.has(a.tagName.toLowerCase())&&n.push(a),a=a.parentNode||a.host;return n}static getAncestorsBySelectors(e,t){const s=[];let n=e.parentNode||e.host;for(;n;){if(n instanceof Element)for(const a of t)try{if(n.matches(a)){s.push(n);break}}catch{}n=n.parentNode||n.host}return s}static async loadJS(e){if(!Yi(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,s=Array.from(document.scripts).find(a=>a.src===t);if(s)return s.dataset.concordeLoaded===wr?!0:new Promise(a=>{let o=!1;const h=C=>{o||(o=!0,C&&(s.dataset.concordeLoaded=wr),a(C))};s.addEventListener("load",()=>h(!0),{once:!0}),s.addEventListener("error",()=>h(!1),{once:!0});const d=s.readyState;if(d==="complete"||d==="loaded"){h(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||h(!0)})})});const n=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(a=>{const o=document.createElement("script");o.src=e,n&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded=wr,a(!0)},o.onerror=()=>a(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(t=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=e,s.onload=()=>t(!0),s.onerror=()=>t(!0),document.head.appendChild(s)})}};const vn=r=>{const e=document.documentElement;new MutationObserver(s=>{for(const n of s)n.type==="attributes"&&n.attributeName==="lang"&&r()}).observe(e,{attributes:!0,attributeFilter:["lang"]})};let lt=class Ft{static shallowEqual(e,t,s=!0){const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length&&s)return!1;for(const o of n){const h=e[o],d=t[o];if(s?h!==d:h!=d)return!1}return!0}static deepEqual(e,t,s=!0){const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length&&s)return!1;for(const o of n){const h=e[o],d=t[o],C=Ft.isObject(h)&&Ft.isObject(d),$=s?h!==d:h!=d;if(C&&!Ft.deepEqual(h,d)||!C&&$)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return Ft.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,s=!1){for(const n of t){const a=e[n];if(a===void 0)return;s&&Ft.isObject(a)?e=Object.assign(Array.isArray(a)?[]:{},e,a):e=e[n]}return e}static traverseDotNotation(e,t,s=!1){return Ft.traverse(e,t.split("."),s)}static getURLSearchArray(e,t=""){let s=[];for(let n in e){const a=e[n];t&&(n=t+"["+n+"]"),Ft.isObject(a)?s=[...s,...this.getURLSearchArray(a,n)]:s.push(`${n}=${a}`)}return s}static getURLSearchString(e){return Ft.getURLSearchArray(e,"").join("&")}};const ys=lt.traverseDotNotation;let Ki=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},mn="sonic";typeof __SONIC_PREFIX__<"u"&&(mn=__SONIC_PREFIX__);let yn=mn.replace(/-([a-z])/g,r=>r[1].toUpperCase());const _r=yn.charAt(0).toUpperCase()+yn.slice(1);function Ji(r){return!1}function qs(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Rt(r){return typeof r=="object"&&r!==null}let os="sonic";typeof __SONIC_PREFIX__>"u"&&(os="sonic");const Ar=os=="sonic"?"publisher-proxies-data":os+"-publisher-proxies-data",jt=class jt{constructor(e,t,s){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=t||null,this._parentKey_=s,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(t=>t()),this._is_savable_&&!De.changed){De.changed=!0,De.saveId++;const t=De.saveId;setTimeout(()=>De.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const s=this.get();this._assignListeners_.forEach(n=>{n(s)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(s=>{s[e]!==t&&(s[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(s=>{const n=Object.getOwnPropertyDescriptor(s,e);n&&!n.set&&!n.writable||(s.propertyMap&&s.propertyMap[e]&&(e=s.propertyMap[e]),typeof s[e]<"u"&&s[e]!==t&&(s[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const t in this._value_){let s=t;const n=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(s=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==n&&(e[s]=n)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const s=this._value_[t];e[t]!==s&&(e[t]=s)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||Rt(this._value_)&&Rt(e)&&e&&qs(this._value_)&&qs(e)&&this._value_.__value===e.__value||!Rt(e)&&e===this._value_.__value)return!0;this._value_=Rt(e)?e:{__value:e},this._cachedGet_=void 0;const s=qs(this._value_);if(this._parentKey_&&this.parent){const n=qs(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:n});else{const a=[];a[Number(this._parentKey_)]=n,this.parent.set(a)}else this.parent._value_[this._parentKey_]=n}if(s)return this._proxies_.forEach((n,a)=>{a!="_parent_"&&(n.set(null),this._publishDynamicFilling_(a,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,a)=>{const o=this._value_[a];a!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(a))&&(n.set(null),this._publishDynamicFilling_(a,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Rt(this._value_))for(const n in this._value_){const a=e[n],h=Rt(a)?a:{__value:a};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,a);continue}this._proxies_.get(n)?.set(h,!0),this._publishDynamicFilling_(n,a)}return!0}get(){if(Zi(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+os+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+os+"-publisher-proxy>"}};jt.instances=new Map,jt.instancesCounter=0;let Bs=jt;const Hs=[];function Zi(r){Hs.length>0&&Hs[0].add(r)}function Xi(){Hs.unshift(new Set)}function Qi(){return Hs.shift()}const me=class me{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],me.instance!=null)throw"Singleton / use getInstance";me.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),me.initPageShowHandler()}static initPageShowHandler(){me.pageShowHandlerInitialized||(me.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&me.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let s=localStorage.getItem(Ar),n=null;if(s&&(n=await this.decompress(s,"gzip")),n)try{this.localStorageData=JSON.parse(n)}catch{this.localStorageData={}}else s=await this.compress("{}","gzip"),localStorage.setItem(Ar,s),this.localStorageData={};const a=1e3*60*60*12;for(const o in this.localStorageData){const h=this.localStorageData[o],d=new Date().getTime()-(h.expirationDelayMs||a);h.lastModifiationMS<d&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=me.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new me)}return me.instance==null?new me:me.instance}static get(e,t){return me.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+Be.getLanguage()]?.data||e.get())}get(e,t){const s=t?.localStorageMode==="enabled",n=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const h=kr({});this.set(e,h)}const a=this.publishers.get(e);return s&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(a._expiration_delay_=t.expirationDelayMs),a._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(a,e)),n&&(a._invalidate_on_page_show_=n),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==me.saveId&&e%10!=0))try{if(!me.changed||me.saving)return;me.saving=!0,me.changed=!1;const t=Array.from(this.publishers.keys());let s=!1;for(const n of t){const a=this.publishers.get(n);if(!a?._is_savable_)continue;const o=a?.get();o&&(this.localStorageData[n+"¤lang_"+Be.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:a._expiration_delay_,data:o},s=!0)}if(s){const n=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Ar,n)}if(me.saving=!1,me.changed){me.saveId++;const n=me.saveId;setTimeout(()=>this.saveToLocalStorage(n),1e3)}}catch{me.saving=!1}}async compress(e,t){const s=new TextEncoder().encode(e),n=window,a=new n.CompressionStream(t),o=a.writable.getWriter();o.write(s),o.close();const h=await new Response(a.readable).arrayBuffer(),d=new Uint8Array(h);let C="";for(let $=0;$<d.length;$++)C+=String.fromCharCode(d[$]);return btoa(C)}async decompress(e,t){const s=atob(e),a=Uint8Array.from(s,$=>$.charCodeAt(0)).buffer,o=window,h=new o.DecompressionStream(t),d=h.writable.getWriter();d.write(a),d.close();const C=await new Response(h.readable).arrayBuffer();return new TextDecoder().decode(C)}};me.buildDate="Sat Oct 03 2026 09:31:33 GMT+0200 (Central European Summer Time)",me.changed=!1,me.saving=!1,me.saveId=0,me.instance=null,me.instances=new Map,me.pageShowHandlerInitialized=!1;let De=me;if(typeof window<"u"){const r=window,e=_r+"PublisherManager",t=r[e]||De;if(r[e]||(r[e]=De),t!==De){const s=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const n of s)Object.defineProperty(De,n,{configurable:!0,get(){return t[n]},set(a){t[n]=a}})}}const eo=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function to(r,e){return{get:function(t,s){if(typeof s=="string"&&eo.has(s))return r[s];if(s==Symbol.toPrimitive)return()=>e().get();if(!r._proxies_.has(s)){const n=r._value_[s],a=kr(Rt(n)?n:{__value:n},r,s);a._proxies_.set("_parent_",e()),r._proxies_.set(s,a)}return r._proxies_.get(s)},set:function(t,s,n){if(s=="_value_")return r._value_=n,!0;if(s=="_cachedGet_")return r._cachedGet_=n,!0;if(s=="_assignmentId_")return r._assignmentId_=n,!0;if(s=="_is_savable_")return r._is_savable_=n,!0;if(s=="_expiration_delay_")return r._expiration_delay_=n,!0;if(s=="_invalidate_on_page_show_")return r._invalidate_on_page_show_=n,!0;if(s=="_instanceCounter_")return r._instanceCounter_=n,!0;if(!r._proxies_.has(s)){const o=kr({},r,s);o._proxies_.set("_parent_",e()),r._proxies_.set(s,o)}return r._value_[s]!==n&&(r._value_[s]=n,r._publishDynamicFilling_(s,n),r._proxies_.get(s)?.set(Rt(n)?n:{__value:n})),!0},deleteProperty:function(t,s){return r._publishDynamicFilling_(s,null),r._proxies_.get(s)?.set(null),delete r._value_[s]},has:function(t,s){return s in r._value_&&s!="_lockInternalMutationPublishing_"},defineProperty:function(t,s,n){return n&&"value"in n&&(r._value_[s]=n.value),!0},getOwnPropertyDescriptor:function(t,s){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return r._value_.__value?Object.keys(r._value_.__value):Object.keys(r._value_)}}}function kr(r,e=null,t){const s=new Bs(r,e,t);let n=null;const a=to(s,()=>n);return n=new Proxy(s,a),n}class so extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Bs.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(os+"-publisher-proxy",so)}catch{}const Sr=(r,e)=>{if(typeof r=="function"){const t=r;return Xi(),t(),Qi()}if(typeof r=="string"){const t=r.split("."),s=t.shift()||"";let n=De.get(s,e);n=lt.traverse(n,t);const a=new Set;return a.add(n),a}return new Set([r])};function bn(r){const e=br(r);return Sr(e).values().next().value?.get()}function wn(r,e,t){const s=br(r);return Sr(s,t).values().next().value}function _n(r,e){return Ji()?wn(r,void 0,e):wn(r)}function An(r,e){const t=br(r);Sr(t).values().next().value?.set(e)}function kn(r){let e=(Number(r)>>>0)+1831565813;e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61);const t=e>>>0;return{value:((t^t>>>14)>>>0)/4294967296,seed:t}}function ro(r,e){const t=kn(r),s=Math.max(1,Math.floor(Number(e)||1));return{value:Math.floor(t.value*s),seed:t.seed}}function no(r,e,t){const s=Number(r),n=Number(e),a=Number(t);return Math.min(a,Math.max(n,s))}function io(r){const e=Math.max(0,Math.min(1e4,Math.floor(Number(r)||0)));return Array.from({length:e},(t,s)=>s)}function oo(r,e,t){const s=String(e??"").split(".").filter(Boolean);if(!s.length)return t;const n=h=>Array.isArray(h)?h.slice():h&&typeof h=="object"?{...h}:h,a=n(r??{});let o=a;for(let h=0;h<s.length-1;h++){const d=s[h],C=o[d];o[d]=n(C??(/^\d+$/.test(s[h+1])?[]:{})),o=o[d]}return o[s[s.length-1]]=t,a}function ao(r,e,t=0){const s=Math.max(0,Math.min(256,Math.floor(Number(r)||0))),n=Math.max(0,Math.min(256,Math.floor(Number(e)||0))),a=Number(t)||0;return Array.from({length:n},()=>Array.from({length:s},()=>a))}function lo(r){if(!Array.isArray(r)||!r.length)return[];const e=r,t=e.length,s=Array.isArray(e[0])?e[0].length:0,n=Array.from({length:s},()=>Array.from({length:t},()=>0));for(let a=0;a<t;a++){const o=e[a];if(Array.isArray(o))for(let h=0;h<s;h++)n[h][t-1-a]=Number(o[h])||0}return n}function co(r){r.registerFunction("rand",kn),r.registerFunction("randInt",ro),r.registerFunction("clamp",no),r.registerFunction("range",io),r.registerFunction("set",oo),r.registerFunction("matrix",ao),r.registerFunction("rotate",lo)}var uo=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,Ct=(r,e,t,s)=>{for(var n=s>1?void 0:s?ho(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&uo(e,t,n),n};const fo="sonic-store",po=256*1024,go=8;let dt=class extends We{constructor(){super(...arguments),this.id="",this.dataProvider="",this.initial=null,this.reducer="",this.maxStateBytes=po,this.budgetMs=go,this.history=0,this.state=null,this.queue=[],this.draining=!1,this.compiled=null,this.historyStack=[],this.lastError=null,this.bootAction=""}connectedCallback(){super.connectedCallback(),this.bootstrap()}disconnectedCallback(){this.id&&Gr(this.id),super.disconnectedCallback()}updated(r){if(r.has("id")||r.has("reducer")||r.has("initial")||r.has("dataProvider")){const e=r.get("id");typeof e=="string"&&e&&e!==this.id&&Gr(e),this.bootstrap()}}dpId(){return(this.dataProvider||this.id||"").trim()}bootstrap(){if(!this.id)return;this.compileReducer(),this.state=this.clone(this.initial),this.historyStack=[],this.lastError=null,this.publish();const r={id:this.id,dispatch:t=>this.enqueue(t),getState:()=>this.state,reset:()=>this.reset()};vi(r);const e=(this.bootAction||"").trim();e&&this.enqueue({type:e,t:performance.now()})}compileReducer(){this.compiled=null;const r=(this.reducer||"").trim();if(r){if(r.length>32768){this.fail("reducer trop long (max 32 Ko)");return}try{const e=Vi(r);co(e),e.assign("random",()=>{throw new Error("$random interdit dans un reducer (utiliser $rand)")}),e.assign("now",()=>{throw new Error("$now interdit dans un reducer (utiliser $action.t)")}),this.compiled=e}catch(e){this.fail(e instanceof Error?e.message:String(e))}}}enqueue(r){if(r.type==="@reset"){this.reset();return}if(r.type==="@undo"){this.undo();return}this.queue.push(r),this.drain()}async drain(){if(!this.draining){this.draining=!0;try{for(;this.queue.length;){const r=this.queue.shift();await this.apply(r)}}finally{this.draining=!1}}}async apply(r){if(!this.compiled)return;const e=performance.now(),t={width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0,now:r.t??e},s={state:this.state,action:{type:r.type,payload:r.payload??null,t:r.t??e,dt:r.dt??null},env:t};try{const a=await this.compiled.evaluate(this.state,{state:this.state,action:s.action,env:t}),o=performance.now()-e;if(o>this.budgetMs){this.fail(`budget ${this.budgetMs}ms dépassé (${o.toFixed(1)}ms)`);return}if(a===void 0)return;const h=JSON.stringify(a);if(h!==void 0&&h.length>this.maxStateBytes){this.fail(`état trop gros (max ${this.maxStateBytes} octets)`);return}this.history>0&&(this.historyStack.push(this.clone(this.state)),this.historyStack.length>this.history&&this.historyStack.shift()),this.state=a,this.lastError=null,this.publish()}catch(n){this.fail(n instanceof Error?n.message:String(n))}}reset(){this.state=this.clone(this.initial),this.historyStack=[],this.lastError=null,this.publish()}undo(){this.historyStack.length&&(this.state=this.historyStack.pop(),this.publish())}publish(){const r=this.dpId();if(!r)return;const e=this.state&&typeof this.state=="object"?{...this.state,lastError:this.lastError}:{value:this.state,lastError:this.lastError};An(r,e)}fail(r){this.lastError=r,this.dispatchEvent(new CustomEvent("error",{detail:{message:r},bubbles:!0,composed:!0})),this.publish()}clone(r){if(r===null||typeof r!="object")return r;try{return JSON.parse(JSON.stringify(r))}catch{return r}}dispatchAction(r){ss(this.id,r)}render(){return qe``}};dt.styles=je`
47
47
  :host {
48
48
  display: contents;
49
49
  }
50
- `,Rt([L({type:String})],bt.prototype,"id",2),Rt([L({type:String})],bt.prototype,"dataProvider",2),Rt([L({type:Object})],bt.prototype,"initial",2),Rt([L({type:String})],bt.prototype,"reducer",2),Rt([L({type:Number,attribute:"max-state-bytes"})],bt.prototype,"maxStateBytes",2),Rt([L({type:Number,attribute:"budget-ms"})],bt.prototype,"budgetMs",2),Rt([L({type:Number})],bt.prototype,"history",2),bt=Rt([at(fo)],bt);var vo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,Wt=(r,e,t,s)=>{for(var n=s>1?void 0:s?mo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&vo(e,t,n),n};const yo="sonic-keyboard";let Ct=class extends We{constructor(){super(...arguments),this.target="",this.keymap={},this.scope="document",this.repeat={},this.keyup=!1,this.dispatchEventFlag=!1,this.held=new Map,this.onVis=()=>{document.hidden&&this.releaseAll()},this.onKeyDown=r=>{const e=r;if(e.repeat||this.isEditableTarget(e.target))return;const t=e.code||e.key,s=this.keymap?.[t]??this.keymap?.[e.key];if(!s)return;e.preventDefault();const n=this.toAction(s);this.emit(n);const a=this.repeat?.[n.type];if(a){const[o,h]=a,d={type:n.type,payload:n.payload,timer:window.setTimeout(()=>{this.emit({type:n.type,payload:n.payload}),d.interval=window.setInterval(()=>{this.emit({type:n.type,payload:n.payload})},Math.max(16,h))},Math.max(0,o))};this.held.set(t,d)}else this.held.set(t,{type:n.type,payload:n.payload})},this.onKeyUp=r=>{const e=r,t=e.code||e.key,s=this.held.get(t);s&&(s.timer&&clearTimeout(s.timer),s.interval&&clearInterval(s.interval),this.held.delete(t),this.keyup&&this.emit({type:`${s.type}:up`,payload:s.payload}))},this.releaseAll=()=>{for(const[,r]of this.held)r.timer&&clearTimeout(r.timer),r.interval&&clearInterval(r.interval);this.held.clear()}}connectedCallback(){super.connectedCallback(),this.scope==="focus"&&(this.hasAttribute("tabindex")||(this.tabIndex=0)),this.bindTarget().addEventListener("keydown",this.onKeyDown),this.bindTarget().addEventListener("keyup",this.onKeyUp),window.addEventListener("blur",this.releaseAll),document.addEventListener("visibilitychange",this.onVis)}disconnectedCallback(){this.bindTarget().removeEventListener("keydown",this.onKeyDown),this.bindTarget().removeEventListener("keyup",this.onKeyUp),window.removeEventListener("blur",this.releaseAll),document.removeEventListener("visibilitychange",this.onVis),this.releaseAll(),super.disconnectedCallback()}updated(r){r.has("scope")&&this.scope==="focus"&&!this.hasAttribute("tabindex")&&(this.tabIndex=0)}bindTarget(){return this.scope==="focus"?this:window}isEditableTarget(r){if(!(r instanceof HTMLElement))return!1;const e=r.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"||r.isContentEditable?!0:!!r.closest("input,textarea,select,[contenteditable=true]")}toAction(r){return typeof r=="string"?{type:r}:{type:r.type,payload:r.payload}}emit(r){this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}render(){return this.scope==="focus"?qe`<slot></slot>`:qe``}};Ct.styles=je`
50
+ `,Ct([O({type:String})],dt.prototype,"id",2),Ct([O({type:String})],dt.prototype,"dataProvider",2),Ct([O({type:Object})],dt.prototype,"initial",2),Ct([O({type:String})],dt.prototype,"reducer",2),Ct([O({type:Number,attribute:"max-state-bytes"})],dt.prototype,"maxStateBytes",2),Ct([O({type:Number,attribute:"budget-ms"})],dt.prototype,"budgetMs",2),Ct([O({type:Number})],dt.prototype,"history",2),Ct([O({type:String,attribute:"boot-action"})],dt.prototype,"bootAction",2),dt=Ct([at(fo)],dt);var vo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,Wt=(r,e,t,s)=>{for(var n=s>1?void 0:s?mo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&vo(e,t,n),n};const yo="sonic-keyboard";let Et=class extends We{constructor(){super(...arguments),this.target="",this.keymap={},this.scope="document",this.repeat={},this.keyup=!1,this.dispatchEventFlag=!1,this.held=new Map,this.onVis=()=>{document.hidden&&this.releaseAll()},this.onKeyDown=r=>{const e=r;if(e.repeat||this.isEditableTarget(e.target))return;const t=e.code||e.key,s=this.keymap?.[t]??this.keymap?.[e.key];if(!s)return;e.preventDefault();const n=this.toAction(s);this.emit(n);const a=this.repeat?.[n.type];if(a){const[o,h]=a,d={type:n.type,payload:n.payload,timer:window.setTimeout(()=>{this.emit({type:n.type,payload:n.payload}),d.interval=window.setInterval(()=>{this.emit({type:n.type,payload:n.payload})},Math.max(16,h))},Math.max(0,o))};this.held.set(t,d)}else this.held.set(t,{type:n.type,payload:n.payload})},this.onKeyUp=r=>{const e=r,t=e.code||e.key,s=this.held.get(t);s&&(s.timer&&clearTimeout(s.timer),s.interval&&clearInterval(s.interval),this.held.delete(t),this.keyup&&this.emit({type:`${s.type}:up`,payload:s.payload}))},this.releaseAll=()=>{for(const[,r]of this.held)r.timer&&clearTimeout(r.timer),r.interval&&clearInterval(r.interval);this.held.clear()}}connectedCallback(){super.connectedCallback(),this.scope==="focus"&&(this.hasAttribute("tabindex")||(this.tabIndex=0)),this.bindTarget().addEventListener("keydown",this.onKeyDown),this.bindTarget().addEventListener("keyup",this.onKeyUp),window.addEventListener("blur",this.releaseAll),document.addEventListener("visibilitychange",this.onVis)}disconnectedCallback(){this.bindTarget().removeEventListener("keydown",this.onKeyDown),this.bindTarget().removeEventListener("keyup",this.onKeyUp),window.removeEventListener("blur",this.releaseAll),document.removeEventListener("visibilitychange",this.onVis),this.releaseAll(),super.disconnectedCallback()}updated(r){r.has("scope")&&this.scope==="focus"&&!this.hasAttribute("tabindex")&&(this.tabIndex=0)}bindTarget(){return this.scope==="focus"?this:window}isEditableTarget(r){if(!(r instanceof HTMLElement))return!1;const e=r.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"||r.isContentEditable?!0:!!r.closest("input,textarea,select,[contenteditable=true]")}toAction(r){return typeof r=="string"?{type:r}:{type:r.type,payload:r.payload}}emit(r){this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}render(){return this.scope==="focus"?qe`<slot></slot>`:qe``}};Et.styles=je`
51
51
  :host {
52
52
  display: contents;
53
53
  }
@@ -59,22 +59,17 @@
59
59
  outline: 2px solid var(--sc-primary, #3b82f6);
60
60
  outline-offset: 2px;
61
61
  }
62
- `,Wt([L({type:String})],Ct.prototype,"target",2),Wt([L({type:Object})],Ct.prototype,"keymap",2),Wt([L({type:String})],Ct.prototype,"scope",2),Wt([L({type:Object})],Ct.prototype,"repeat",2),Wt([L({type:Boolean})],Ct.prototype,"keyup",2),Wt([L({type:Boolean,attribute:"dispatch-event"})],Ct.prototype,"dispatchEventFlag",2),Ct=Wt([at(yo)],Ct);var bo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,It=(r,e,t,s)=>{for(var n=s>1?void 0:s?wo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&bo(e,t,n),n};const _o="sonic-gamepad",Ao={"dpad-up":12,"dpad-down":13,"dpad-left":14,"dpad-right":15,a:0,b:1,x:2,y:3,start:9,select:8,"ls-x-":{axis:0,dir:-1},"ls-x+":{axis:0,dir:1},"ls-y-":{axis:1,dir:-1},"ls-y+":{axis:1,dir:1}};let wt=class extends We{constructor(){super(...arguments),this.target="",this.keymap={"dpad-left":"left","dpad-right":"right","dpad-up":"rotate","dpad-down":"soft-drop",a:"rotate",b:"drop",start:"pause"},this.deadzone=.25,this.repeat={},this.dataProvider="",this.dispatchEventFlag=!1,this.connected=!1,this.raf=0,this.prev=new Map,this.heldTimers=new Map,this.onConnect=()=>this.scan(),this.onDisconnect=()=>this.scan()}connectedCallback(){super.connectedCallback(),window.addEventListener("gamepadconnected",this.onConnect),window.addEventListener("gamepaddisconnected",this.onDisconnect),this.scan()}disconnectedCallback(){window.removeEventListener("gamepadconnected",this.onConnect),window.removeEventListener("gamepaddisconnected",this.onDisconnect),this.stopLoop(),this.clearHolds(),super.disconnectedCallback()}scan(){const e=[...navigator.getGamepads?.()??[]].some(Boolean);this.connected=e,this.publishStatus(),e?this.startLoop():this.stopLoop()}publishStatus(){if(!this.dataProvider)return;const e=[...navigator.getGamepads?.()??[]].find(Boolean);An(this.dataProvider,{connected:this.connected,id:e?.id??null})}startLoop(){if(this.raf)return;const r=()=>{this.raf=requestAnimationFrame(r),this.poll()};this.raf=requestAnimationFrame(r)}stopLoop(){this.raf&&cancelAnimationFrame(this.raf),this.raf=0}poll(){const e=[...navigator.getGamepads?.()??[]].find(Boolean);if(!e){this.scan();return}for(const[t,s]of Object.entries(this.keymap||{})){const n=Ao[t];if(n==null)continue;let a=!1;if(typeof n=="number")a=!!e.buttons[n]?.pressed;else{const h=e.axes[n.axis]??0;a=n.dir<0?h<-this.deadzone:h>this.deadzone}const o=this.prev.get(t)??!1;a&&!o?(this.fire(s),this.startRepeat(t,s)):!a&&o&&this.stopRepeat(t),this.prev.set(t,a)}}startRepeat(r,e){const t=typeof e=="string"?{type:e}:e,s=this.repeat?.[t.type];if(!s)return;const[n,a]=s,o={};o.timer=window.setTimeout(()=>{this.fire(e),o.interval=window.setInterval(()=>this.fire(e),Math.max(16,a))},Math.max(0,n)),this.heldTimers.set(r,o)}stopRepeat(r){const e=this.heldTimers.get(r);e&&(e.timer&&clearTimeout(e.timer),e.interval&&clearInterval(e.interval),this.heldTimers.delete(r))}clearHolds(){for(const r of[...this.heldTimers.keys()])this.stopRepeat(r)}fire(r){const e=typeof r=="string"?{type:r}:{type:r.type,payload:r.payload};this.target&&ss(this.target,e),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:e,bubbles:!0,composed:!0}))}render(){return qe``}};wt.styles=je`
62
+ `,Wt([O({type:String})],Et.prototype,"target",2),Wt([O({type:Object})],Et.prototype,"keymap",2),Wt([O({type:String})],Et.prototype,"scope",2),Wt([O({type:Object})],Et.prototype,"repeat",2),Wt([O({type:Boolean})],Et.prototype,"keyup",2),Wt([O({type:Boolean,attribute:"dispatch-event"})],Et.prototype,"dispatchEventFlag",2),Et=Wt([at(yo)],Et);var bo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,It=(r,e,t,s)=>{for(var n=s>1?void 0:s?wo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&bo(e,t,n),n};const _o="sonic-gamepad",Ao={"dpad-up":12,"dpad-down":13,"dpad-left":14,"dpad-right":15,a:0,b:1,x:2,y:3,start:9,select:8,"ls-x-":{axis:0,dir:-1},"ls-x+":{axis:0,dir:1},"ls-y-":{axis:1,dir:-1},"ls-y+":{axis:1,dir:1}};let wt=class extends We{constructor(){super(...arguments),this.target="",this.keymap={"dpad-left":"left","dpad-right":"right","dpad-up":"rotate","dpad-down":"soft-drop",a:"rotate",b:"drop",start:"pause"},this.deadzone=.25,this.repeat={},this.dataProvider="",this.dispatchEventFlag=!1,this.connected=!1,this.raf=0,this.prev=new Map,this.heldTimers=new Map,this.onConnect=()=>this.scan(),this.onDisconnect=()=>this.scan()}connectedCallback(){super.connectedCallback(),window.addEventListener("gamepadconnected",this.onConnect),window.addEventListener("gamepaddisconnected",this.onDisconnect),this.scan()}disconnectedCallback(){window.removeEventListener("gamepadconnected",this.onConnect),window.removeEventListener("gamepaddisconnected",this.onDisconnect),this.stopLoop(),this.clearHolds(),super.disconnectedCallback()}scan(){const e=[...navigator.getGamepads?.()??[]].some(Boolean);this.connected=e,this.publishStatus(),e?this.startLoop():this.stopLoop()}publishStatus(){if(!this.dataProvider)return;const e=[...navigator.getGamepads?.()??[]].find(Boolean);An(this.dataProvider,{connected:this.connected,id:e?.id??null})}startLoop(){if(this.raf)return;const r=()=>{this.raf=requestAnimationFrame(r),this.poll()};this.raf=requestAnimationFrame(r)}stopLoop(){this.raf&&cancelAnimationFrame(this.raf),this.raf=0}poll(){const e=[...navigator.getGamepads?.()??[]].find(Boolean);if(!e){this.scan();return}for(const[t,s]of Object.entries(this.keymap||{})){const n=Ao[t];if(n==null)continue;let a=!1;if(typeof n=="number")a=!!e.buttons[n]?.pressed;else{const h=e.axes[n.axis]??0;a=n.dir<0?h<-this.deadzone:h>this.deadzone}const o=this.prev.get(t)??!1;a&&!o?(this.fire(s),this.startRepeat(t,s)):!a&&o&&this.stopRepeat(t),this.prev.set(t,a)}}startRepeat(r,e){const t=typeof e=="string"?{type:e}:e,s=this.repeat?.[t.type];if(!s)return;const[n,a]=s,o={};o.timer=window.setTimeout(()=>{this.fire(e),o.interval=window.setInterval(()=>this.fire(e),Math.max(16,a))},Math.max(0,n)),this.heldTimers.set(r,o)}stopRepeat(r){const e=this.heldTimers.get(r);e&&(e.timer&&clearTimeout(e.timer),e.interval&&clearInterval(e.interval),this.heldTimers.delete(r))}clearHolds(){for(const r of[...this.heldTimers.keys()])this.stopRepeat(r)}fire(r){const e=typeof r=="string"?{type:r}:{type:r.type,payload:r.payload};this.target&&ss(this.target,e),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:e,bubbles:!0,composed:!0}))}render(){return qe``}};wt.styles=je`
63
63
  :host {
64
64
  display: contents;
65
65
  }
66
- `,It([L({type:String})],wt.prototype,"target",2),It([L({type:Object})],wt.prototype,"keymap",2),It([L({type:Number})],wt.prototype,"deadzone",2),It([L({type:Object})],wt.prototype,"repeat",2),It([L({type:String})],wt.prototype,"dataProvider",2),It([L({type:Boolean,attribute:"dispatch-event"})],wt.prototype,"dispatchEventFlag",2),It([ft()],wt.prototype,"connected",2),wt=It([at(_o)],wt);var ko=Object.defineProperty,So=Object.getOwnPropertyDescriptor,Gt=(r,e,t,s)=>{for(var n=s>1?void 0:s?So(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&ko(e,t,n),n};const xo="sonic-gesture";let Et=class extends We{constructor(){super(...arguments),this.target="",this.swipeThreshold=40,this.longPressMs=450,this.doubleTapMs=280,this.drag=!1,this.dispatchEventFlag=!1,this.startX=0,this.startY=0,this.startT=0,this.longTimer=null,this.lastTap=0,this.pointerId=null,this.onDown=r=>{this.pointerId==null&&(this.pointerId=r.pointerId,this.setPointerCapture(r.pointerId),this.startX=r.clientX,this.startY=r.clientY,this.startT=performance.now(),this.longTimer=window.setTimeout(()=>{this.emit({type:"long-press"}),this.longTimer=null},this.longPressMs))},this.onMove=r=>{if(this.pointerId!==r.pointerId)return;const e=r.clientX-this.startX,t=r.clientY-this.startY;if(Math.hypot(e,t)>10&&this.longTimer!=null&&(clearTimeout(this.longTimer),this.longTimer=null),this.drag){const s=this.getBoundingClientRect();this.emit({type:"drag",payload:{dx:s.width?e/s.width:0,dy:s.height?t/s.height:0}})}},this.onUp=r=>{if(this.pointerId!==r.pointerId)return;this.longTimer!=null&&(clearTimeout(this.longTimer),this.longTimer=null);const e=r.clientX-this.startX,t=r.clientY-this.startY,s=Math.hypot(e,t),n=performance.now()-this.startT;if(this.pointerId=null,s>=this.swipeThreshold){const a=Math.abs(e)>Math.abs(t)?e>0?"swipe-right":"swipe-left":t>0?"swipe-down":"swipe-up";this.emit({type:a});return}if(n<this.longPressMs){const a=performance.now();a-this.lastTap<this.doubleTapMs?(this.emit({type:"double-tap"}),this.lastTap=0):(this.emit({type:"tap"}),this.lastTap=a)}}}emit(r){this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}render(){return qe`<slot
67
- @pointerdown=${this.onDown}
68
- @pointermove=${this.onMove}
69
- @pointerup=${this.onUp}
70
- @pointercancel=${this.onUp}
71
- ></slot>`}};Et.styles=je`
66
+ `,It([O({type:String})],wt.prototype,"target",2),It([O({type:Object})],wt.prototype,"keymap",2),It([O({type:Number})],wt.prototype,"deadzone",2),It([O({type:Object})],wt.prototype,"repeat",2),It([O({type:String})],wt.prototype,"dataProvider",2),It([O({type:Boolean,attribute:"dispatch-event"})],wt.prototype,"dispatchEventFlag",2),It([ft()],wt.prototype,"connected",2),wt=It([at(_o)],wt);var ko=Object.defineProperty,So=Object.getOwnPropertyDescriptor,Gt=(r,e,t,s)=>{for(var n=s>1?void 0:s?So(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&ko(e,t,n),n};const xo="sonic-gesture";let Pt=class extends We{constructor(){super(...arguments),this.target="",this.swipeThreshold=40,this.longPressMs=450,this.doubleTapMs=280,this.drag=!1,this.dispatchEventFlag=!1,this.startX=0,this.startY=0,this.startT=0,this.longTimer=null,this.lastTap=0,this.pointerId=null,this.onDown=r=>{this.pointerId==null&&(this.pointerId=r.pointerId,this.setPointerCapture(r.pointerId),this.startX=r.clientX,this.startY=r.clientY,this.startT=performance.now(),this.longTimer=window.setTimeout(()=>{this.emit({type:"long-press"}),this.longTimer=null},this.longPressMs))},this.onMove=r=>{if(this.pointerId!==r.pointerId)return;const e=r.clientX-this.startX,t=r.clientY-this.startY;if(Math.hypot(e,t)>10&&this.longTimer!=null&&(clearTimeout(this.longTimer),this.longTimer=null),this.drag){const s=this.getBoundingClientRect();this.emit({type:"drag",payload:{dx:s.width?e/s.width:0,dy:s.height?t/s.height:0}})}},this.onUp=r=>{if(this.pointerId!==r.pointerId)return;this.longTimer!=null&&(clearTimeout(this.longTimer),this.longTimer=null);const e=r.clientX-this.startX,t=r.clientY-this.startY,s=Math.hypot(e,t),n=performance.now()-this.startT;if(this.pointerId=null,s>=this.swipeThreshold){const a=Math.abs(e)>Math.abs(t)?e>0?"swipe-right":"swipe-left":t>0?"swipe-down":"swipe-up";this.emit({type:a});return}if(n<this.longPressMs){const a=performance.now();a-this.lastTap<this.doubleTapMs?(this.emit({type:"double-tap"}),this.lastTap=0):(this.emit({type:"tap"}),this.lastTap=a)}}}emit(r){this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerdown",this.onDown),this.addEventListener("pointermove",this.onMove),this.addEventListener("pointerup",this.onUp),this.addEventListener("pointercancel",this.onUp)}disconnectedCallback(){this.removeEventListener("pointerdown",this.onDown),this.removeEventListener("pointermove",this.onMove),this.removeEventListener("pointerup",this.onUp),this.removeEventListener("pointercancel",this.onUp),this.longTimer!=null&&clearTimeout(this.longTimer),super.disconnectedCallback()}render(){return qe`<slot></slot>`}};Pt.styles=je`
72
67
  :host {
73
68
  display: block;
74
69
  touch-action: none;
75
70
  user-select: none;
76
71
  }
77
- `,Gt([L({type:String})],Et.prototype,"target",2),Gt([L({type:Number,attribute:"swipe-threshold"})],Et.prototype,"swipeThreshold",2),Gt([L({type:Number,attribute:"long-press-ms"})],Et.prototype,"longPressMs",2),Gt([L({type:Number,attribute:"double-tap-ms"})],Et.prototype,"doubleTapMs",2),Gt([L({type:Boolean})],Et.prototype,"drag",2),Gt([L({type:Boolean,attribute:"dispatch-event"})],Et.prototype,"dispatchEventFlag",2),Et=Gt([at(xo)],Et);var Co=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,as=(r,e,t,s)=>{for(var n=s>1?void 0:s?Eo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Co(e,t,n),n};const Po="sonic-action";let Nt=class extends We{constructor(){super(...arguments),this.target="",this.type="",this.payload=null,this.holdRepeat="",this.dispatchEventFlag=!1,this.holdTimer=null,this.holdInterval=null,this.onPointerDown=r=>{if(r.button!=null&&r.button!==0)return;this.emit();const e=this.holdRepeat.split(",").map(t=>Number(t.trim()));if(e.length===2&&e.every(t=>Number.isFinite(t))){const[t,s]=e;this.holdTimer=window.setTimeout(()=>{this.emit(),this.holdInterval=window.setInterval(()=>this.emit(),Math.max(16,s))},Math.max(0,t))}},this.onPointerUp=()=>this.clearHold()}clearHold(){this.holdTimer!=null&&clearTimeout(this.holdTimer),this.holdInterval!=null&&clearInterval(this.holdInterval),this.holdTimer=null,this.holdInterval=null}emit(){if(!this.type)return;const r={type:this.type,payload:this.payload};this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}render(){return qe`<slot
72
+ `,Gt([O({type:String})],Pt.prototype,"target",2),Gt([O({type:Number,attribute:"swipe-threshold"})],Pt.prototype,"swipeThreshold",2),Gt([O({type:Number,attribute:"long-press-ms"})],Pt.prototype,"longPressMs",2),Gt([O({type:Number,attribute:"double-tap-ms"})],Pt.prototype,"doubleTapMs",2),Gt([O({type:Boolean})],Pt.prototype,"drag",2),Gt([O({type:Boolean,attribute:"dispatch-event"})],Pt.prototype,"dispatchEventFlag",2),Pt=Gt([at(xo)],Pt);var Co=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,as=(r,e,t,s)=>{for(var n=s>1?void 0:s?Eo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Co(e,t,n),n};const Po="sonic-action";let Nt=class extends We{constructor(){super(...arguments),this.target="",this.type="",this.payload=null,this.holdRepeat="",this.dispatchEventFlag=!1,this.holdTimer=null,this.holdInterval=null,this.onPointerDown=r=>{if(r.button!=null&&r.button!==0)return;this.emit();const e=this.holdRepeat.split(",").map(t=>Number(t.trim()));if(e.length===2&&e.every(t=>Number.isFinite(t))){const[t,s]=e;this.holdTimer=window.setTimeout(()=>{this.emit(),this.holdInterval=window.setInterval(()=>this.emit(),Math.max(16,s))},Math.max(0,t))}},this.onPointerUp=()=>this.clearHold()}clearHold(){this.holdTimer!=null&&clearTimeout(this.holdTimer),this.holdInterval!=null&&clearInterval(this.holdInterval),this.holdTimer=null,this.holdInterval=null}emit(){if(!this.type)return;const r={type:this.type,payload:this.payload};this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}render(){return qe`<slot
78
73
  @pointerdown=${this.onPointerDown}
79
74
  @pointerup=${this.onPointerUp}
80
75
  @pointercancel=${this.onPointerUp}
@@ -83,11 +78,11 @@
83
78
  :host {
84
79
  display: contents;
85
80
  }
86
- `,as([L({type:String})],Nt.prototype,"target",2),as([L({type:String})],Nt.prototype,"type",2),as([L({type:Object})],Nt.prototype,"payload",2),as([L({type:String,attribute:"hold-repeat"})],Nt.prototype,"holdRepeat",2),as([L({type:Boolean,attribute:"dispatch-event"})],Nt.prototype,"dispatchEventFlag",2),Nt=as([at(Po)],Nt);var To=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,Yt=(r,e,t,s)=>{for(var n=s>1?void 0:s?$o(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&To(e,t,n),n};const Do="sonic-ticker";let Pt=class extends We{constructor(){super(...arguments),this.target="",this.interval=500,this.intervalKey="",this.runningKey="",this.mode="interval",this.dispatchEventFlag=!1,this.timer=null,this.raf=0,this.last=0,this.acc=0,this.onVis=()=>{document.hidden?this.stop():this.restart()}}connectedCallback(){super.connectedCallback(),document.addEventListener("visibilitychange",this.onVis),this.restart()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.onVis),this.stop(),super.disconnectedCallback()}updated(r){(r.has("interval")||r.has("mode")||r.has("target")||r.has("intervalKey")||r.has("runningKey"))&&this.restart()}stop(){this.timer!=null&&(clearInterval(this.timer),this.timer=null),this.raf&&(cancelAnimationFrame(this.raf),this.raf=0),this.acc=0}restart(){if(this.stop(),!(!this.target||document.hidden)){if(this.last=performance.now(),this.mode==="raf"){const r=e=>{if(this.raf=requestAnimationFrame(r),!this.isRunning()){this.last=e;return}const t=Math.min(100,e-this.last);this.last=e,this.acc+=t;const s=this.currentInterval();for(;this.acc>=s;)this.acc-=s,this.emit(s)};this.raf=requestAnimationFrame(r);return}this.timer=window.setInterval(()=>{if(!this.isRunning())return;const r=performance.now(),e=Math.min(1e3,r-this.last);this.last=r,this.emit(e)},this.currentInterval())}}currentInterval(){let r=this.interval;if(this.intervalKey&&this.target)try{const e=bn(this.target),t=this.path(e,this.intervalKey);typeof t=="number"&&Number.isFinite(t)&&(r=t)}catch{}return Math.max(16,r)}isRunning(){if(!this.runningKey||!this.target)return!0;try{const r=bn(this.target);return!!this.path(r,this.runningKey)}catch{return!0}}path(r,e){if(!r||typeof r!="object")return;let t=r;for(const s of e.split(".").filter(Boolean)){if(t==null)return;t=t[s]}return t}emit(r){const e={type:"tick",payload:{dt:r},dt:r};this.target&&ss(this.target,e),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:e,bubbles:!0,composed:!0}))}render(){return qe``}};Pt.styles=je`
81
+ `,as([O({type:String})],Nt.prototype,"target",2),as([O({type:String})],Nt.prototype,"type",2),as([O({type:Object})],Nt.prototype,"payload",2),as([O({type:String,attribute:"hold-repeat"})],Nt.prototype,"holdRepeat",2),as([O({type:Boolean,attribute:"dispatch-event"})],Nt.prototype,"dispatchEventFlag",2),Nt=as([at(Po)],Nt);var To=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,Yt=(r,e,t,s)=>{for(var n=s>1?void 0:s?$o(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&To(e,t,n),n};const Do="sonic-ticker";let Tt=class extends We{constructor(){super(...arguments),this.target="",this.interval=500,this.intervalKey="",this.runningKey="",this.mode="interval",this.dispatchEventFlag=!1,this.timer=null,this.raf=0,this.last=0,this.acc=0,this.onVis=()=>{document.hidden?this.stop():this.restart()}}connectedCallback(){super.connectedCallback(),document.addEventListener("visibilitychange",this.onVis),this.restart()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.onVis),this.stop(),super.disconnectedCallback()}updated(r){(r.has("interval")||r.has("mode")||r.has("target")||r.has("intervalKey")||r.has("runningKey"))&&this.restart()}stop(){this.timer!=null&&(clearInterval(this.timer),this.timer=null),this.raf&&(cancelAnimationFrame(this.raf),this.raf=0),this.acc=0}restart(){if(this.stop(),!(!this.target||document.hidden)){if(this.last=performance.now(),this.mode==="raf"){const r=e=>{if(this.raf=requestAnimationFrame(r),!this.isRunning()){this.last=e;return}const t=Math.min(100,e-this.last);this.last=e,this.acc+=t;const s=this.currentInterval();for(;this.acc>=s;)this.acc-=s,this.emit(s)};this.raf=requestAnimationFrame(r);return}this.timer=window.setInterval(()=>{if(!this.isRunning())return;const r=performance.now(),e=Math.min(1e3,r-this.last);this.last=r,this.emit(e)},this.currentInterval())}}currentInterval(){let r=this.interval;if(this.intervalKey&&this.target)try{const e=bn(this.target),t=this.path(e,this.intervalKey);typeof t=="number"&&Number.isFinite(t)&&(r=t)}catch{}return Math.max(16,r)}isRunning(){if(!this.runningKey||!this.target)return!0;try{const r=bn(this.target);return!!this.path(r,this.runningKey)}catch{return!0}}path(r,e){if(!r||typeof r!="object")return;let t=r;for(const s of e.split(".").filter(Boolean)){if(t==null)return;t=t[s]}return t}emit(r){const e={type:"tick",payload:{dt:r},dt:r};this.target&&ss(this.target,e),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:e,bubbles:!0,composed:!0}))}render(){return qe``}};Tt.styles=je`
87
82
  :host {
88
83
  display: contents;
89
84
  }
90
- `,Yt([L({type:String})],Pt.prototype,"target",2),Yt([L({type:Number})],Pt.prototype,"interval",2),Yt([L({type:String,attribute:"interval-key"})],Pt.prototype,"intervalKey",2),Yt([L({type:String,attribute:"running-key"})],Pt.prototype,"runningKey",2),Yt([L({type:String})],Pt.prototype,"mode",2),Yt([L({type:Boolean,attribute:"dispatch-event"})],Pt.prototype,"dispatchEventFlag",2),Pt=Yt([at(Do)],Pt);let Ut=(Re=class{static listen(){if(!Re.listening)return;const e=document.location?.href.replace(document.location.origin,"");Re.prevURL&&Re.prevURL!=e&&(Re.prevURL=e,Re.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Re.listen)}static offChange(e){const t=Re.listeners.indexOf(e);t!=-1&&(Re.listeners.splice(t,1),Re.listeners.length==0&&(Re.listening=!1))}static onChange(e){Re.listening||(Re.listening=!0,Re.listen()),Re.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,s=document.referrer;if(t!=null){const C=document.location.origin,$=(t||C).toString(),w=s.indexOf("http")==0?new URL(s).origin!=C:!1,E=s=="",O=history.length<3,R=E&&O,X=$!=document.location.href;if(w&&X||R){const A=history.state||{};A.concorde=A.concorde||{},A.concorde.hasDoneHistoryBack=!0,history.pushState(A,document.title),history.back(),document.location.replace($)}else history.back();return}let n=e.getAttribute("to")||"";if(n||(n=e.href?.toString()||""),!n)return;if(n.indexOf("#")==0){document.location.hash=n.substring(1);return}const a=new URL(n,document.location.href),o=a.pathname.split("/"),h=[];let d="";for(const C of o)C!=d&&h.push(C),d=C;n="/"+h.join("/")+a.search+(a.hash?a.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",n):e.hasAttribute("replaceState")?history.replaceState(null,"",n):document.location.href=n}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const s=new URL(t,document.location.href),n=new URL(e.location||"",document.location.origin);let a=!1;e.autoActive=="strict"?a=s.pathname==n.pathname&&s.hash==n.hash&&s.search==n.search:e.autoActive=="strict-path-only"?a=s.pathname==n.pathname&&s.hash==n.hash:a=n.href.indexOf(s.href)==0,a?e.setAttribute("active","true"):e.removeAttribute("active")}}},Re.listeners=[],Re.listening=!1,Re.prevURL=document.location?.href.replace(document.location.origin,""),Re);/**
85
+ `,Yt([O({type:String})],Tt.prototype,"target",2),Yt([O({type:Number})],Tt.prototype,"interval",2),Yt([O({type:String,attribute:"interval-key"})],Tt.prototype,"intervalKey",2),Yt([O({type:String,attribute:"running-key"})],Tt.prototype,"runningKey",2),Yt([O({type:String})],Tt.prototype,"mode",2),Yt([O({type:Boolean,attribute:"dispatch-event"})],Tt.prototype,"dispatchEventFlag",2),Tt=Yt([at(Do)],Tt);let Ut=(Re=class{static listen(){if(!Re.listening)return;const e=document.location?.href.replace(document.location.origin,"");Re.prevURL&&Re.prevURL!=e&&(Re.prevURL=e,Re.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Re.listen)}static offChange(e){const t=Re.listeners.indexOf(e);t!=-1&&(Re.listeners.splice(t,1),Re.listeners.length==0&&(Re.listening=!1))}static onChange(e){Re.listening||(Re.listening=!0,Re.listen()),Re.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,s=document.referrer;if(t!=null){const C=document.location.origin,$=(t||C).toString(),w=s.indexOf("http")==0?new URL(s).origin!=C:!1,E=s=="",L=history.length<3,R=E&&L,X=$!=document.location.href;if(w&&X||R){const A=history.state||{};A.concorde=A.concorde||{},A.concorde.hasDoneHistoryBack=!0,history.pushState(A,document.title),history.back(),document.location.replace($)}else history.back();return}let n=e.getAttribute("to")||"";if(n||(n=e.href?.toString()||""),!n)return;if(n.indexOf("#")==0){document.location.hash=n.substring(1);return}const a=new URL(n,document.location.href),o=a.pathname.split("/"),h=[];let d="";for(const C of o)C!=d&&h.push(C),d=C;n="/"+h.join("/")+a.search+(a.hash?a.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",n):e.hasAttribute("replaceState")?history.replaceState(null,"",n):document.location.href=n}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const s=new URL(t,document.location.href),n=new URL(e.location||"",document.location.origin);let a=!1;e.autoActive=="strict"?a=s.pathname==n.pathname&&s.hash==n.hash&&s.search==n.search:e.autoActive=="strict-path-only"?a=s.pathname==n.pathname&&s.hash==n.hash:a=n.href.indexOf(s.href)==0,a?e.setAttribute("active","true"):e.removeAttribute("active")}}},Re.listeners=[],Re.listening=!1,Re.prevURL=document.location?.href.replace(document.location.origin,""),Re);/**
91
86
  * @license
92
87
  * Copyright 2017 Google LLC
93
88
  * SPDX-License-Identifier: BSD-3-Clause
@@ -95,11 +90,11 @@
95
90
  * @license
96
91
  * Copyright 2018 Google LLC
97
92
  * SPDX-License-Identifier: BSD-3-Clause
98
- */const Sn="important",Oo=" !"+Sn,xn=Vs(class extends Ws{constructor(r){if(super(r),r.type!==bs.ATTRIBUTE||r.name!=="style"||r.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce(((e,t)=>{const s=r[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(r,[e]){const{style:t}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const n=e[s];if(n!=null){this.ft.add(s);const a=typeof n=="string"&&n.endsWith(Oo);s.includes("-")||a?t.setProperty(s,a?n.slice(0,-11):n,a?Sn:""):t[s]=n}}return yt}});var Lo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,dt=(r,e,t,s)=>{for(var n=s>1?void 0:s?Fo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Lo(e,t,n),n};const Gs=new Map,Cn=r=>{class e extends r{constructor(...s){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.formDataProvider="",this._name="",this._value="",this.onFormValueAssign=async n=>{this.setFormValueFromPublisher(n)},this.onFormDataInValidate=()=>{const n=this.getFormPublisher();n&&n.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(s){return Be.getAncestorAttributeValue(this,s)!=null}getAncestorAttributeValue(s){return Be.getAncestorAttributeValue(this,s)||""}get name(){return this._name}set name(s){this.hasAttribute("name")&&!this.forceAutoFill&&(s=this.getAttribute("name")),this._name=s,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),this.formDataProvider?De.get(this.formDataProvider):null}setFormPublisherValue(s){const n=this.getFormPublisher();n&&ys(n,this.name).set(s)}getFormPublisherValue(){const s=this.getFormPublisher();return s?ys(s,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(s){this.value=s}get value(){return this._value}set value(s){s==null&&(s=""),lt.isObject(s)&&Object.prototype.hasOwnProperty.call(s,"__value")&&s._value==null&&(s=""),this._value!=s&&(this._value=s,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let s=this.getFormPublisher();const n=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&s&&ys(s,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),s=this.getFormPublisher(),this._name&&s&&(ys(s,this._name).onAssign(this.onFormValueAssign),s.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),n&&(this.value=n)}handleBlur(){this.touched=!0}handleChange(s){this.value=s.target.value;const n=new Event("change");this.dispatchEvent(n)}addKeyboardNavigation(){const s=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!s)return;const n=s.split(" "),a=n[0];if(!a)return;for(const h of n){Gs.has(h)||Gs.set(h,[]);const d=Gs.get(h);d?.indexOf(this)==-1&&d.push(this)}const o=Gs.get(a);this.addEventListener("keydown",h=>{const d=h;if(!["ArrowDown","ArrowUp"].includes(d.key))return;const C="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",$=o?.filter(E=>{const O=E.shadowRoot?.querySelector(C);if(!O)return!1;const R=window.getComputedStyle(O);return R.display!=="none"&&R.display!==""&&R.pointerEvents!="none"&&R.visibility!=="hidden"&&O.getBoundingClientRect().width>0});let k=null;if(d.key=="ArrowDown"&&$){const E=$.indexOf(this);E==$.length-1?k=$[0]:k=$[E+1]}else if(d.key=="ArrowUp"&&$){const E=$.indexOf(this);E==0?k=$[$.length-1]:k=$[E-1]}const w=k?.shadowRoot?.querySelector(C);w&&w.focus&&(w.focus(),h.preventDefault(),h.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),super.connectedCallback(),this.initFormPublisher(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback();const s=this.getFormPublisher();this._name&&s&&(ys(s,this._name).offAssign(this.onFormValueAssign),s.offFormInvalidate(this.onFormDataInValidate))}}return dt([L({type:Boolean,reflect:!0})],e.prototype,"touched",2),dt([L({type:Boolean})],e.prototype,"error",2),dt([L({type:Boolean})],e.prototype,"autofocus",2),dt([L({type:Boolean})],e.prototype,"required",2),dt([L({type:Boolean})],e.prototype,"forceAutoFill",2),dt([L({type:Boolean,reflect:!0})],e.prototype,"disabled",2),dt([L({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),dt([L({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),dt([L({type:String})],e.prototype,"formDataProvider",2),dt([L()],e.prototype,"name",1),dt([L()],e.prototype,"value",1),e};let Mo=class ts{static areEqual(e,t){return e.length===t.length?e.every((s,n)=>s===t[n]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(s=>t=t.concat(s)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const s=(e[0]||{})[t];return e.every(n=>(n||{})[t]==s)}})})}),value:()=>({forKey:t=>ts.from(e.map(s=>s[t]))}),copy:()=>({fromKey:t=>({toKey:s=>{e.forEach(n=>{n[s]=Array.isArray(n[t])?[...n[t]]:typeof n[t]=="object"&&n[t]!=null?{...n[t]}:n[t]})}})})}),map:t=>ts.from(e.map(t)),filter:t=>ts.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const s=[],n=new Map;for(const a of e){const o=a[t];if(!n.has(o)){const h=s.length;n.set(o,h);const d={items:[]};d[t]=o,s.push(d)}s[n.get(o)].items.push(a)}return ts.from(s)}}),without:()=>({duplicates:()=>({forKey:t=>{const s=[...new Set(e.map(n=>n[t]))];return ts.from(s.map(n=>e.find(a=>a[t]==n)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:s=>{const n=(a,o)=>h=>a[o]!=h[o];return ts.from(e.filter(a=>t.every(n(a,s))))}})})})}}},xr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",s="long"){t||(t=Be.getLanguage());const n=(C,$)=>[Math.floor(C/$),C%$];function a(C,$,k){return new Intl.NumberFormat(C,{style:"unit",unit:$,unitDisplay:k}).format}const[o,h]=n(e,60),d=[];return o&&d.push(a(t,"hour",s)(o)),h&&d.push(a(t,"minute",s)(h)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(d)}static js(e){try{return Function("return "+e)()}catch{return""}}},Ys=(de=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(de.observedElements.keys()).forEach(e=>de.unObserve(e)))}static observe(e){if(!e||!de.enabled||de.observedElements.has(e))return;const t=new MutationObserver(de.onMutation),s={};s.childList=!0,s.subtree=!0,s.attributes=!0,s.attributeFilter=["data-bind"],t.observe(e,s),e.querySelectorAll("[data-bind]").forEach(n=>de.addPublisherListeners(n)),de.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(s=>de.removePublisherListeners(s)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.addPublisherListeners(t)):e.childNodes.forEach(t=>de.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.removePublisherListeners(t)):e.childNodes.forEach(t=>de.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":de.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(s=>{de.onAdded(s)}),t.removedNodes.forEach(s=>{de.onRemoved(s)});break}}static removePublisherListeners(e){const t=de.publisherListeners.get(e);t&&(de.publisherListeners.delete(e),t.forEach(s=>{s.publisher?.offAssign(s.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(s=>s.replace("$","")):t=[e],t=t.filter(s=>s.length>0),{expression:e.replace("\\",""),variables:t.map(s=>s.split(/\b\.\b/).map(n=>n.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,n=>n.substring(1).toUpperCase()),bindedVariablesDescriptor:de.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const s of t)if(s!="_self_"){if(!e)return null;e=e[s]}return e}static addPublisherListeners(e){de.removePublisherListeners(e);const t=Be.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const s=De.getInstance().get(t),n=de.getDataBindItems(e),a=[];n.forEach(o=>{const h=o.bindedVariablesDescriptor,d=o.propertyToUpdate;for(const C of h.variables){const $=C;let k=s;k=de.getSubPublisher(s,$);const w=e,E={publisher:k,onAssign:()=>{const O=h.variables.map(Z=>de.getSubPublisher(s,Z)?.get());let R=h.expression,X=!1;if(O.length==1&&h.variables[0].join(".")==R.substring(1)){let Z=O[0];Z===null&&(Z=""),w[d]=Z;return}for(let Z=0;Z<O.length;Z++){let A=O[Z];const m=h.variables[Z];A===null&&(X=!0,A=void 0),R=R.replace("$"+m.join("."),A)}if(R.indexOf("|")!=-1){const Z=R.indexOf("|");if(Z==0)R=xr.js(R.substring(1));else{const A=R.substring(0,Z),m=R.substring(Z+1),M=xr[A];R=X?"":M?M(m):R}}else R=X?"":R;w[d]=R}};k?.onAssign(E.onAssign),a.push(E)}}),de.publisherListeners.set(e,a)}},de.observedElements=new Map,de.enabled=!0,de.publisherListeners=new Map,de);Ys.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ys);function En(r){if(r==null||typeof r!="object"||Array.isArray(r))return r;const e={...r};return delete e._sonic_http_response_,e}const we=class we{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){we.tokens.delete(this.serviceURL);return}we.invalidTokens.includes(e)||we.tokens.set(this.serviceURL,e)}get token(){return we.invalidTokens.includes(this._token)?we.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(we.invalidTokens.includes(e)||(we.invalidTokens.push(e),this.token=null))}async handleResult(e,t){we.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const s=e.headers.get("content-type")?.toLowerCase(),n=e.status;let a={};if(!s||s.indexOf("text/")==0)a={text:await e.text()};else try{a=await e.json()}catch{a={}}if(this.addHTTPResponse&&lt.isObject(a)&&(a._sonic_http_response_=e),n===498&&!we.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const h=await this.get(t.path,t.additionalHeaders);if(h==null)throw new Error("GET retry failed after token refresh");a=h}else a=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return _n("sonic-api").lastResponse.set({http:e,processed:a}),a}async auth(){if(this.token)return;if(we.tokens.has(this.serviceURL)){this.token=we.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const t=new URL(this.serviceURL),s=t.protocol+"//"+t.host,n=await fetch(this.computeURL(this.tokenProvider,{serviceHost:s}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const a=await n.json();a.token?this.token=a.token:we.failledTokenUpdates.set(this.serviceURL,!0)}catch{we.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const s=De.get(e),n=new URLSearchParams(t.split("?")[1]||""),a=s.get();let o=[];Array.isArray(a)?o=a:o=[a];const h=[];let d=Number.POSITIVE_INFINITY,C=0,$=0;if(n.has("limit")&&(d=parseInt(n.get("limit")||"0"),$++),n.has("offset")&&(C=parseInt(n.get("offset")||"0"),$++),$>0&&(n.delete("limit"),n.delete("offset")),n.size===0)return o.slice(C,C+d);for(const[k,w]of n.entries()){const E=w.split(",").map(O=>O.trim());for(const O of E)for(const R of o)if(typeof R!="object")isNaN(+R)?R.toString().toLowerCase().includes(w.toLowerCase())&&h.push(R):R===w&&h.push(R);else{const X=R;if(!X[k])continue;isNaN(+X[k])?X[k]?.toString().toLowerCase().includes(O.toLowerCase())&&h.push(R):X[k]===O&&h.push(R)}}return h.slice(C,C+d)}firstCallDone(){return new Promise(e=>{if(!we.firstCallDoneFlags.has(this.serviceURL))we.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(we.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const s=/dataProvider\((.*?)\)(.*?)$/;if(s.test(e)){this.blockUntilDone&&(await this.firstCallDone(),we.firstCallDoneFlags.set(this.serviceURL,"loading"));const C=e.match(s);if(!C)throw new Error("dataProvider path is not valid");return await this.localGet(C[1],C[2])}const n={apiMethod:"get",path:e,additionalHeaders:t},a=await this.createHeaders(t),o=this.computeURL(e),h=JSON.stringify({url:o,headers:a,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),we.firstCallDoneFlags.set(this.serviceURL,"loading")),!we.loadingGetPromises.has(h)){const C=new Promise(async $=>{try{const k=await fetch(o,{headers:a,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),w=await this.handleResult(k,n);$({processed:w,response:this.lastResult})}catch{we.firstCallDoneFlags.set(this.serviceURL,"error"),$(null)}});we.loadingGetPromises.set(h,C)}const d=await we.loadingGetPromises.get(h);return we.loadingGetPromises.delete(h),d?(this.lastResult=d.response,d.processed):null}async getDetailed(e,t){const s=/dataProvider\((.*?)\)(.*?)$/.test(e),n=await this.get(e,t);if(n==null)return;const a=En(n),o=this.computeURL(e);if(s)return{request:new Request(o,{method:"GET"}),result:a};const h=await this.createHeaders(t);return{request:new Request(o,{method:"GET",headers:new Headers(h),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:a}}async sendDetailed(e,t,s,n){const a=await this.send(e,t,s,n);if(a==null)return;const o=En(a),h=this.computeURL(e),d=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...n});return{request:new Request(h,{method:s,headers:new Headers(d),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,t,s){return this.sendDetailed(e,t,"POST",s)}async putDetailed(e,t,s){return this.sendDetailed(e,t,"PUT",s)}async patchDetailed(e,t,s){return this.sendDetailed(e,t,"PATCH",s)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=Be.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let s="";e.startsWith("http")?s=e:s=this.serviceURL+"/"+e,s.startsWith("http")||(s=window.location.origin+s);const n=new URL(s);for(const a in t)n.searchParams.set(a,t[a]);return n.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,s="POST",n){const a={apiMethod:"send",path:e,additionalHeaders:n,method:s,data:t},o=await this.createHeaders(n);o.Accept="application/json",o["Content-Type"]="application/json";const h=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:s,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(h,a)}async submitFormData(e,t,s="POST",n){const a={apiMethod:"submitFormData",path:e,additionalHeaders:n,method:s,data:t},o=await this.createHeaders(n);o.Accept="application/json";const h=new FormData,d=t;for(const $ in d)h.set($,d[$]);const C=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:s,body:h,keepalive:this.keepAlive});return await this.handleResult(C,a)}async put(e,t,s){return this.send(e,t,"PUT",s)}async post(e,t,s){return this.send(e,t,"POST",s)}async patch(e,t,s){return this.send(e,t,"PATCH",s)}async delete(e,t,s){return this.send(e,t,"delete",s)}};we.loadingGetPromises=new Map,we.tokens=new Map,we.invalidTokens=[],we.failledTokenUpdates=new Map,we.firstCallDoneFlags=new Map;let ws=we;Be.getApiConfiguration(document.body||document.documentElement);const Ro=async(r,e)=>{};var _s={exports:{}},Io=_s.exports,Pn;function No(){return Pn||(Pn=1,(function(r,e){var t=[].slice;(function(s,n){return e!==null?r.exports=n():s.UrlPattern=n()})(Io,function(){var s,n,a,o,h,d,C,$,k,w,E,O,R,X,Z;return k=function(A){return A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},C=function(A,m){var M,_,T;for(T=[],M=-1,_=A.length;++M<_;)T=T.concat(m(A[M]));return T},X=function(A,m){var M,_,T;for(T="",M=-1,_=A.length;++M<_;)T+=m(A[M]);return T},R=function(A){return new RegExp(A.toString()+"|").exec("").length-1},E=function(A,m){var M,_,T,V,N;for(V={},M=-1,T=A.length;++M<T;)_=A[M],N=m[M],N!=null&&(V[_]!=null?(Array.isArray(V[_])||(V[_]=[V[_]]),V[_].push(N)):V[_]=N);return V},s={},s.Result=function(A,m){this.value=A,this.rest=m},s.Tagged=function(A,m){this.tag=A,this.value=m},s.tag=function(A,m){return function(M){var _,T;if(_=m(M),_!=null)return T=new s.Tagged(A,_.value),new s.Result(T,_.rest)}},s.regex=function(A){return function(m){var M,_;if(M=A.exec(m),M!=null)return _=M[0],new s.Result(_,m.slice(_.length))}},s.sequence=function(){var A;return A=1<=arguments.length?t.call(arguments,0):[],function(m){var M,_,T,V,N,ee;for(M=-1,_=A.length,ee=[],V=m;++M<_;){if(T=A[M],N=T(V),N==null)return;ee.push(N.value),V=N.rest}return new s.Result(ee,V)}},s.pick=function(){var A,m;return A=arguments[0],m=2<=arguments.length?t.call(arguments,1):[],function(M){var _,T;if(T=s.sequence.apply(s,m)(M),T!=null)return _=T.value,T.value=_[A],T}},s.string=function(A){var m;return m=A.length,function(M){if(M.slice(0,m)===A)return new s.Result(A,M.slice(m))}},s.lazy=function(A){var m;return m=null,function(M){return m==null&&(m=A()),m(M)}},s.baseMany=function(A,m,M,_,T){var V,N,ee,oe;for(ee=T,oe=M?"":[];!(m!=null&&(V=m(ee),V!=null)||(N=A(ee),N==null));)M?oe+=N.value:oe.push(N.value),ee=N.rest;if(!(_&&oe.length===0))return new s.Result(oe,ee)},s.many1=function(A){return function(m){return s.baseMany(A,null,!1,!0,m)}},s.concatMany1Till=function(A,m){return function(M){return s.baseMany(A,m,!0,!0,M)}},s.firstChoice=function(){var A;return A=1<=arguments.length?t.call(arguments,0):[],function(m){var M,_,T,V;for(M=-1,_=A.length;++M<_;)if(T=A[M],V=T(m),V!=null)return V}},O=function(A){var m;return m={},m.wildcard=s.tag("wildcard",s.string(A.wildcardChar)),m.optional=s.tag("optional",s.pick(1,s.string(A.optionalSegmentStartChar),s.lazy(function(){return m.pattern}),s.string(A.optionalSegmentEndChar))),m.name=s.regex(new RegExp("^["+A.segmentNameCharset+"]+")),m.named=s.tag("named",s.pick(1,s.string(A.segmentNameStartChar),s.lazy(function(){return m.name}))),m.escapedChar=s.pick(1,s.string(A.escapeChar),s.regex(/^./)),m.static=s.tag("static",s.concatMany1Till(s.firstChoice(s.lazy(function(){return m.escapedChar}),s.regex(/^./)),s.firstChoice(s.string(A.segmentNameStartChar),s.string(A.optionalSegmentStartChar),s.string(A.optionalSegmentEndChar),m.wildcard))),m.token=s.lazy(function(){return s.firstChoice(m.wildcard,m.optional,m.named,m.static)}),m.pattern=s.many1(s.lazy(function(){return m.token})),m},$={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},d=function(A,m){if(Array.isArray(A))return X(A,function(M){return d(M,m)});switch(A.tag){case"wildcard":return"(.*?)";case"named":return"(["+m+"]+)";case"static":return k(A.value);case"optional":return"(?:"+d(A.value,m)+")?"}},h=function(A,m){return m==null&&(m=$.segmentValueCharset),"^"+d(A,m)+"$"},o=function(A){if(Array.isArray(A))return C(A,o);switch(A.tag){case"wildcard":return["_"];case"named":return[A.value];case"static":return[];case"optional":return o(A.value)}},w=function(A,m,M,_){var T,V,N,ee;if(_==null&&(_=!1),ee=A[m],ee==null){if(_)throw new Error("no values provided for key `"+m+"`");return}if(T=M[m]||0,V=Array.isArray(ee)?ee.length-1:0,T>V){if(_)throw new Error("too few values provided for key `"+m+"`");return}return N=Array.isArray(ee)?ee[T]:ee,_&&(M[m]=T+1),N},a=function(A,m,M){var _,T;if(Array.isArray(A)){for(_=-1,T=A.length;++_<T;)if(a(A[_],m,M))return!0;return!1}switch(A.tag){case"wildcard":return w(m,"_",M,!1)!=null;case"named":return w(m,A.value,M,!1)!=null;case"static":return!1;case"optional":return a(A.value,m,M)}},Z=function(A,m,M){if(Array.isArray(A))return X(A,function(_){return Z(_,m,M)});switch(A.tag){case"wildcard":return w(m,"_",M,!0);case"named":return w(m,A.value,M,!0);case"static":return A.value;case"optional":return a(A.value,m,M)?Z(A.value,m,M):""}},n=function(A,m){var M,_,T,V,N;if(A instanceof n){this.isRegex=A.isRegex,this.regex=A.regex,this.ast=A.ast,this.names=A.names;return}if(this.isRegex=A instanceof RegExp,!(typeof A=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=A,m!=null){if(!Array.isArray(m))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(M=R(this.regex),m.length!==M)throw new Error("regex contains "+M+" groups but array of group names contains "+m.length);this.names=m}return}if(A==="")throw new Error("argument must not be the empty string");if(N=A.replace(/\s+/g,""),N!==A)throw new Error("argument must not contain whitespace");if(_={escapeChar:m?.escapeChar||$.escapeChar,segmentNameStartChar:m?.segmentNameStartChar||$.segmentNameStartChar,segmentNameCharset:m?.segmentNameCharset||$.segmentNameCharset,segmentValueCharset:m?.segmentValueCharset||$.segmentValueCharset,optionalSegmentStartChar:m?.optionalSegmentStartChar||$.optionalSegmentStartChar,optionalSegmentEndChar:m?.optionalSegmentEndChar||$.optionalSegmentEndChar,wildcardChar:m?.wildcardChar||$.wildcardChar},V=O(_),T=V.pattern(A),T==null)throw new Error("couldn't parse pattern");if(T.rest!=="")throw new Error("could only partially parse pattern");this.ast=T.value,this.regex=new RegExp(h(this.ast,_.segmentValueCharset)),this.names=o(this.ast)},n.prototype.match=function(A){var m,M;return M=this.regex.exec(A),M==null?null:(m=M.slice(1),this.names?E(this.names,m):m)},n.prototype.stringify=function(A){if(A==null&&(A={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(A!==Object(A))throw new Error("argument must be an object or undefined");return Z(this.ast,A,{})},n.escapeForRegex=k,n.concatMap=C,n.stringConcatMap=X,n.regexGroupCount=R,n.keysAndValuesToObject=E,n.P=s,n.newParser=O,n.defaultOptions=$,n.astNodeToRegexString=h,n.astNodeToNames=o,n.getParam=w,n.astNodeContainsSegmentsForProvidedParams=a,n.stringify=Z,n})})(_s,_s.exports)),_s.exports}var Uo=No();const jo=fn(Uo);class Cr{constructor(e){this.path=Cr.normalizePath(e)}getDataProviderKey(){return new zs(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let d;try{d=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return d.pathname=d.pathname.replace(/\/+/g,"/"),d.href}const s=t.indexOf("?"),n=t.indexOf("#");let a=t.length;s>=0&&(a=Math.min(a,s)),n>=0&&(a=Math.min(a,n));let o=t.slice(0,a);const h=t.slice(a);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&h)throw new RangeError("Endpoint: path cannot be empty");return o+h}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}const zo=150,Tn=10,qo=200,Bo=16,$n=new WeakMap;let Dn=!1;function Ks(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function As(r){if(r===window)return{x:window.scrollX,y:window.scrollY};const e=r;return{x:e.scrollLeft,y:e.scrollTop}}function Ho(r,e,t){if(r===window){window.scrollTo(e,t);return}const s=r;typeof s.scrollTo=="function"?s.scrollTo(e,t):(s.scrollLeft=e,s.scrollTop=t)}function Vo(r){if(r===window){const t=document.documentElement;return Math.max(0,t.scrollHeight-window.innerHeight)}const e=r;return Math.max(0,e.scrollHeight-e.clientHeight)}function ls(r){let e=$n.get(r);if(!e){const t=As(r);e={x:t.x,y:t.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},$n.set(r,e)}return e}function Js(r){ls(r).userEngaged=!0}function Zs(r){const e=ls(r);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},zo)}function On(r,e){return e-r>=qo}function cs(r){if(!Ks())return;const e=ls(r);if(e.restoring)return;const t=As(r);if(On(t.y,e.y)){Er(r);return}e.x=t.x,e.y=t.y}function Wo(r){if(!Ks())return;const e=ls(r),t=Vo(r),s=e.x,n=t>0?Math.min(e.y,t):e.y,{x:a,y:o}=As(r);if(!(Math.abs(s-a)<=Tn&&Math.abs(n-o)<=Tn)){e.restoring=!0;try{Ho(r,s,n)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Er(r){const e=ls(r);if(e.stickyFrames=Bo,e.raf)return;const t=()=>{e.raf=0,Wo(r),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(t))};e.raf=requestAnimationFrame(t)}function Pr(r){Er(r)}function ks(r){if(!Ks())return;const e=ls(r);if(e.watching)return;e.watching=!0;const t=r===window?window:r,s=()=>{if(e.restoring)return;const{y:O}=As(r);if(On(O,e.y)){Er(r);return}if(e.userEngaged){cs(r),Zs(r);return}cs(r)},n=O=>Ln(O)===r,a=O=>{n(O)&&(cs(r),Js(r))},o=O=>{n(O)&&Zs(r)},h=O=>{n(O)&&(cs(r),Js(r),Zs(r))};t.addEventListener("scroll",s,{passive:!0}),t.addEventListener("touchstart",a,{passive:!0}),t.addEventListener("touchend",o,{passive:!0}),t.addEventListener("touchcancel",o,{passive:!0}),t.addEventListener("wheel",h,{passive:!0}),t.addEventListener("pointerdown",a,{passive:!0}),t.addEventListener("pointerup",o,{passive:!0}),t.addEventListener("pointercancel",o,{passive:!0});const d=As(r);if(e.x=d.x,e.y=d.y,r===window){const O=new ResizeObserver(()=>Pr(window));O.observe(document.documentElement),e.resizeObserver=O;return}const C=r,$=new ResizeObserver(()=>Pr(C));$.observe(C);for(const O of Array.from(C.children))$.observe(O);e.resizeObserver=$;const k=()=>Pr(C),w=new MutationObserver(O=>{for(const R of O)if(R.type==="childList")for(const X of Array.from(R.addedNodes))X instanceof Element&&$.observe(X);k()});w.observe(C,{childList:!0,subtree:!0,characterData:!0});const E=C.getRootNode();E instanceof ShadowRoot&&E.host&&w.observe(E.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=w}function Ln(r){for(const e of r.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&Fn(e))return e;return window}function Fn(r){if(!(r instanceof HTMLElement)||r===document.documentElement||r===document.body)return!1;const e=getComputedStyle(r).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Tr(r){for(const t of r.composedPath())t===window||t===document||t instanceof HTMLElement&&Fn(t)&&ks(t);const e=Ln(r);ks(e),r.type==="wheel"?(cs(e),Js(e),Zs(e)):(r.type==="touchstart"||r.type==="pointerdown")&&(cs(e),Js(e))}function Xs(r){r instanceof Element&&r.classList?.contains("custom-scroll")&&ks(r),r.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&ks(e)})}function $r(r){Xs(r),new MutationObserver(t=>{for(const s of t)for(const n of Array.from(s.addedNodes))n instanceof Element&&Xs(n)}).observe(r,{childList:!0,subtree:!0})}function Dr(r){r.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&($r(e.shadowRoot),Dr(e.shadowRoot))})}function Go(){const r=Element.prototype;if(r.__safariScrollGuardPatched)return;r.__safariScrollGuardPatched=!0;const e=r.attachShadow;r.attachShadow=function(s){const n=e.call(this,s);return $r(n),n}}function Mn(){if(typeof window>"u"||Dn||(Dn=!0,!Ks()))return;ks(window),Go();const r={capture:!0,passive:!0};window.addEventListener("wheel",Tr,r),window.addEventListener("touchstart",Tr,r),window.addEventListener("pointerdown",Tr,r);const e=()=>{Xs(document),Dr(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(s=>{for(const n of s)for(const a of Array.from(n.addedNodes))a instanceof Element&&(Xs(a),a.shadowRoot&&$r(a.shadowRoot),Dr(a))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Yo=Ki,Ko=Mo,Jo=Ys,Zo=xr,Rn=Be,Xo=Ut,Qo=lt,ea=ws,ta=jo;Mn(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Yo,Arrays:Ko,DataBindObserver:Jo,Format:Zo,HTML:Rn,LocationHandler:Xo,Objects:Qo,PublisherManager:De,api:ea,URLPattern:ta,Endpoint:Cr,DataProviderKey:zs};var sa=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,Ss=(r,e,t,s)=>{for(var n=s>1?void 0:s?ra(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&sa(e,t,n),n};const In=r=>{class e extends r{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const s=this.getAttribute("name"),n=this.getCheckAllPublisher(),a=this.getFormPublisher();if(n?.hasCheckAll.get()&&!this.checksAll()&&n&&a&&s){if(this.getFormPublisherValue()?.length)(this.checked===null||n.checkMode.get()=="noneChecked"||n.checkMode.get()==null)&&n.checkMode.set("someUnchecked");else{n.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),h=n.values.get();if(h&&h.length){let d=h.length;for(const C of h)o.indexOf(C)==-1&&(d-=1);d==h.length&&n.checkMode.set("allChecked"),d==0&&n.checkMode.set("noneChecked")}h.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=s=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),s=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),s=="noneChecked"&&(this.checked=null),s=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(s){if(this.value==s||(this.hasAttribute("value")&&!this.forceAutoFill&&(s=this.getAttribute("value")),this._value==s)||s==null||(this._value=s,!this.value))return;if(this.getFormPublisher()&&this.name){let a=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=a==s?!0:null),Array.isArray(a)||(a=[]),a.indexOf(s)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(s){if(this.setCheckedValue(s),this.checksAll()){const n=this.getCheckAllPublisher();n&&(this.checked===!0?n.checkMode.set("allChecked"):this.checked===null&&(n.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const s=this.shadowRoot?.querySelector("input");if(!s||s.checkValidity())return;const n=this.getFormPublisher();if(n){const a=this.getFormPublisherValue();if((this.unique||this.radio)&&a!==null&&a!==void 0&&a.toString().length>0)return;n.isFormValid=!1,s.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(s){this._checked!=s&&(this._checked=s,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const s=this.checked===!0?this.radio?!0:null:!0;this.checked=s;const n=new Event("change");this.dispatchEvent(n)}getValueForFormPublisher(){let s=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:s;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(s)||(s=[]);const n=s.slice(0),a=n.indexOf(this.value);return this.checked===!0&&a===-1&&!this.checksAll()&&n.push(this.value),this.checked===null&&a!==-1&&n.splice(a,1),n}setFormValueFromPublisher(s){if(this.unique||this.radio){this.checked=this.value==s?!0:null;return}Array.isArray(s)||(s=[]),!this.checksAll()&&(this.checked=s.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const s=this.formDataProvider,n=this.getAttribute("name");return!s||!n?null:De.get(s+"/"+n+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const s=this.getCheckAllPublisher();if(s&&(s.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const n=s.values.get().slice(0),a=n.indexOf(this.value);a!=-1&&(n.splice(a,1),s.values.set(n))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const a=this.getFormPublisherValue();a&&Array.isArray(a)&&a.indexOf(this.value)!==-1&&(this.checked=!0)}const n=this.getCheckAllPublisher();n&&(n.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&n.hasCheckAll.set(!0),n.values.get()||n.values.set([]),this.checksAll()||n.values.set([...n.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Ss([L()],e.prototype,"value",1),Ss([L()],e.prototype,"forceAutoFill",2),Ss([L({type:Boolean})],e.prototype,"unique",2),Ss([L({type:Boolean})],e.prototype,"radio",2),Ss([L()],e.prototype,"checked",1),e};/**
93
+ */const Sn="important",Oo=" !"+Sn,xn=Vs(class extends Ws{constructor(r){if(super(r),r.type!==bs.ATTRIBUTE||r.name!=="style"||r.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce(((e,t)=>{const s=r[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(r,[e]){const{style:t}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const n=e[s];if(n!=null){this.ft.add(s);const a=typeof n=="string"&&n.endsWith(Oo);s.includes("-")||a?t.setProperty(s,a?n.slice(0,-11):n,a?Sn:""):t[s]=n}}return bt}});var Lo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,pt=(r,e,t,s)=>{for(var n=s>1?void 0:s?Fo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Lo(e,t,n),n};const Gs=new Map,Cn=r=>{class e extends r{constructor(...s){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.formDataProvider="",this._name="",this._value="",this.onFormValueAssign=async n=>{this.setFormValueFromPublisher(n)},this.onFormDataInValidate=()=>{const n=this.getFormPublisher();n&&n.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(s){return Be.getAncestorAttributeValue(this,s)!=null}getAncestorAttributeValue(s){return Be.getAncestorAttributeValue(this,s)||""}get name(){return this._name}set name(s){this.hasAttribute("name")&&!this.forceAutoFill&&(s=this.getAttribute("name")),this._name=s,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),this.formDataProvider?De.get(this.formDataProvider):null}setFormPublisherValue(s){const n=this.getFormPublisher();n&&ys(n,this.name).set(s)}getFormPublisherValue(){const s=this.getFormPublisher();return s?ys(s,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(s){this.value=s}get value(){return this._value}set value(s){s==null&&(s=""),lt.isObject(s)&&Object.prototype.hasOwnProperty.call(s,"__value")&&s._value==null&&(s=""),this._value!=s&&(this._value=s,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let s=this.getFormPublisher();const n=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&s&&ys(s,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),s=this.getFormPublisher(),this._name&&s&&(ys(s,this._name).onAssign(this.onFormValueAssign),s.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),n&&(this.value=n)}handleBlur(){this.touched=!0}handleChange(s){this.value=s.target.value;const n=new Event("change");this.dispatchEvent(n)}addKeyboardNavigation(){const s=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!s)return;const n=s.split(" "),a=n[0];if(!a)return;for(const h of n){Gs.has(h)||Gs.set(h,[]);const d=Gs.get(h);d?.indexOf(this)==-1&&d.push(this)}const o=Gs.get(a);this.addEventListener("keydown",h=>{const d=h;if(!["ArrowDown","ArrowUp"].includes(d.key))return;const C="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",$=o?.filter(E=>{const L=E.shadowRoot?.querySelector(C);if(!L)return!1;const R=window.getComputedStyle(L);return R.display!=="none"&&R.display!==""&&R.pointerEvents!="none"&&R.visibility!=="hidden"&&L.getBoundingClientRect().width>0});let k=null;if(d.key=="ArrowDown"&&$){const E=$.indexOf(this);E==$.length-1?k=$[0]:k=$[E+1]}else if(d.key=="ArrowUp"&&$){const E=$.indexOf(this);E==0?k=$[$.length-1]:k=$[E-1]}const w=k?.shadowRoot?.querySelector(C);w&&w.focus&&(w.focus(),h.preventDefault(),h.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),super.connectedCallback(),this.initFormPublisher(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback();const s=this.getFormPublisher();this._name&&s&&(ys(s,this._name).offAssign(this.onFormValueAssign),s.offFormInvalidate(this.onFormDataInValidate))}}return pt([O({type:Boolean,reflect:!0})],e.prototype,"touched",2),pt([O({type:Boolean})],e.prototype,"error",2),pt([O({type:Boolean})],e.prototype,"autofocus",2),pt([O({type:Boolean})],e.prototype,"required",2),pt([O({type:Boolean})],e.prototype,"forceAutoFill",2),pt([O({type:Boolean,reflect:!0})],e.prototype,"disabled",2),pt([O({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),pt([O({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),pt([O({type:String})],e.prototype,"formDataProvider",2),pt([O()],e.prototype,"name",1),pt([O()],e.prototype,"value",1),e};let Mo=class ts{static areEqual(e,t){return e.length===t.length?e.every((s,n)=>s===t[n]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(s=>t=t.concat(s)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const s=(e[0]||{})[t];return e.every(n=>(n||{})[t]==s)}})})}),value:()=>({forKey:t=>ts.from(e.map(s=>s[t]))}),copy:()=>({fromKey:t=>({toKey:s=>{e.forEach(n=>{n[s]=Array.isArray(n[t])?[...n[t]]:typeof n[t]=="object"&&n[t]!=null?{...n[t]}:n[t]})}})})}),map:t=>ts.from(e.map(t)),filter:t=>ts.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const s=[],n=new Map;for(const a of e){const o=a[t];if(!n.has(o)){const h=s.length;n.set(o,h);const d={items:[]};d[t]=o,s.push(d)}s[n.get(o)].items.push(a)}return ts.from(s)}}),without:()=>({duplicates:()=>({forKey:t=>{const s=[...new Set(e.map(n=>n[t]))];return ts.from(s.map(n=>e.find(a=>a[t]==n)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:s=>{const n=(a,o)=>h=>a[o]!=h[o];return ts.from(e.filter(a=>t.every(n(a,s))))}})})})}}},xr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",s="long"){t||(t=Be.getLanguage());const n=(C,$)=>[Math.floor(C/$),C%$];function a(C,$,k){return new Intl.NumberFormat(C,{style:"unit",unit:$,unitDisplay:k}).format}const[o,h]=n(e,60),d=[];return o&&d.push(a(t,"hour",s)(o)),h&&d.push(a(t,"minute",s)(h)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(d)}static js(e){try{return Function("return "+e)()}catch{return""}}},Ys=(de=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(de.observedElements.keys()).forEach(e=>de.unObserve(e)))}static observe(e){if(!e||!de.enabled||de.observedElements.has(e))return;const t=new MutationObserver(de.onMutation),s={};s.childList=!0,s.subtree=!0,s.attributes=!0,s.attributeFilter=["data-bind"],t.observe(e,s),e.querySelectorAll("[data-bind]").forEach(n=>de.addPublisherListeners(n)),de.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(s=>de.removePublisherListeners(s)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.addPublisherListeners(t)):e.childNodes.forEach(t=>de.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.removePublisherListeners(t)):e.childNodes.forEach(t=>de.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":de.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(s=>{de.onAdded(s)}),t.removedNodes.forEach(s=>{de.onRemoved(s)});break}}static removePublisherListeners(e){const t=de.publisherListeners.get(e);t&&(de.publisherListeners.delete(e),t.forEach(s=>{s.publisher?.offAssign(s.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(s=>s.replace("$","")):t=[e],t=t.filter(s=>s.length>0),{expression:e.replace("\\",""),variables:t.map(s=>s.split(/\b\.\b/).map(n=>n.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,n=>n.substring(1).toUpperCase()),bindedVariablesDescriptor:de.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const s of t)if(s!="_self_"){if(!e)return null;e=e[s]}return e}static addPublisherListeners(e){de.removePublisherListeners(e);const t=Be.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const s=De.getInstance().get(t),n=de.getDataBindItems(e),a=[];n.forEach(o=>{const h=o.bindedVariablesDescriptor,d=o.propertyToUpdate;for(const C of h.variables){const $=C;let k=s;k=de.getSubPublisher(s,$);const w=e,E={publisher:k,onAssign:()=>{const L=h.variables.map(Z=>de.getSubPublisher(s,Z)?.get());let R=h.expression,X=!1;if(L.length==1&&h.variables[0].join(".")==R.substring(1)){let Z=L[0];Z===null&&(Z=""),w[d]=Z;return}for(let Z=0;Z<L.length;Z++){let A=L[Z];const m=h.variables[Z];A===null&&(X=!0,A=void 0),R=R.replace("$"+m.join("."),A)}if(R.indexOf("|")!=-1){const Z=R.indexOf("|");if(Z==0)R=xr.js(R.substring(1));else{const A=R.substring(0,Z),m=R.substring(Z+1),M=xr[A];R=X?"":M?M(m):R}}else R=X?"":R;w[d]=R}};k?.onAssign(E.onAssign),a.push(E)}}),de.publisherListeners.set(e,a)}},de.observedElements=new Map,de.enabled=!0,de.publisherListeners=new Map,de);Ys.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ys);function En(r){if(r==null||typeof r!="object"||Array.isArray(r))return r;const e={...r};return delete e._sonic_http_response_,e}const we=class we{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){we.tokens.delete(this.serviceURL);return}we.invalidTokens.includes(e)||we.tokens.set(this.serviceURL,e)}get token(){return we.invalidTokens.includes(this._token)?we.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(we.invalidTokens.includes(e)||(we.invalidTokens.push(e),this.token=null))}async handleResult(e,t){we.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const s=e.headers.get("content-type")?.toLowerCase(),n=e.status;let a={};if(!s||s.indexOf("text/")==0)a={text:await e.text()};else try{a=await e.json()}catch{a={}}if(this.addHTTPResponse&&lt.isObject(a)&&(a._sonic_http_response_=e),n===498&&!we.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const h=await this.get(t.path,t.additionalHeaders);if(h==null)throw new Error("GET retry failed after token refresh");a=h}else a=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return _n("sonic-api").lastResponse.set({http:e,processed:a}),a}async auth(){if(this.token)return;if(we.tokens.has(this.serviceURL)){this.token=we.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const t=new URL(this.serviceURL),s=t.protocol+"//"+t.host,n=await fetch(this.computeURL(this.tokenProvider,{serviceHost:s}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const a=await n.json();a.token?this.token=a.token:we.failledTokenUpdates.set(this.serviceURL,!0)}catch{we.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const s=De.get(e),n=new URLSearchParams(t.split("?")[1]||""),a=s.get();let o=[];Array.isArray(a)?o=a:o=[a];const h=[];let d=Number.POSITIVE_INFINITY,C=0,$=0;if(n.has("limit")&&(d=parseInt(n.get("limit")||"0"),$++),n.has("offset")&&(C=parseInt(n.get("offset")||"0"),$++),$>0&&(n.delete("limit"),n.delete("offset")),n.size===0)return o.slice(C,C+d);for(const[k,w]of n.entries()){const E=w.split(",").map(L=>L.trim());for(const L of E)for(const R of o)if(typeof R!="object")isNaN(+R)?R.toString().toLowerCase().includes(w.toLowerCase())&&h.push(R):R===w&&h.push(R);else{const X=R;if(!X[k])continue;isNaN(+X[k])?X[k]?.toString().toLowerCase().includes(L.toLowerCase())&&h.push(R):X[k]===L&&h.push(R)}}return h.slice(C,C+d)}firstCallDone(){return new Promise(e=>{if(!we.firstCallDoneFlags.has(this.serviceURL))we.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(we.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const s=/dataProvider\((.*?)\)(.*?)$/;if(s.test(e)){this.blockUntilDone&&(await this.firstCallDone(),we.firstCallDoneFlags.set(this.serviceURL,"loading"));const C=e.match(s);if(!C)throw new Error("dataProvider path is not valid");return await this.localGet(C[1],C[2])}const n={apiMethod:"get",path:e,additionalHeaders:t},a=await this.createHeaders(t),o=this.computeURL(e),h=JSON.stringify({url:o,headers:a,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),we.firstCallDoneFlags.set(this.serviceURL,"loading")),!we.loadingGetPromises.has(h)){const C=new Promise(async $=>{try{const k=await fetch(o,{headers:a,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),w=await this.handleResult(k,n);$({processed:w,response:this.lastResult})}catch{we.firstCallDoneFlags.set(this.serviceURL,"error"),$(null)}});we.loadingGetPromises.set(h,C)}const d=await we.loadingGetPromises.get(h);return we.loadingGetPromises.delete(h),d?(this.lastResult=d.response,d.processed):null}async getDetailed(e,t){const s=/dataProvider\((.*?)\)(.*?)$/.test(e),n=await this.get(e,t);if(n==null)return;const a=En(n),o=this.computeURL(e);if(s)return{request:new Request(o,{method:"GET"}),result:a};const h=await this.createHeaders(t);return{request:new Request(o,{method:"GET",headers:new Headers(h),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:a}}async sendDetailed(e,t,s,n){const a=await this.send(e,t,s,n);if(a==null)return;const o=En(a),h=this.computeURL(e),d=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...n});return{request:new Request(h,{method:s,headers:new Headers(d),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,t,s){return this.sendDetailed(e,t,"POST",s)}async putDetailed(e,t,s){return this.sendDetailed(e,t,"PUT",s)}async patchDetailed(e,t,s){return this.sendDetailed(e,t,"PATCH",s)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=Be.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let s="";e.startsWith("http")?s=e:s=this.serviceURL+"/"+e,s.startsWith("http")||(s=window.location.origin+s);const n=new URL(s);for(const a in t)n.searchParams.set(a,t[a]);return n.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,s="POST",n){const a={apiMethod:"send",path:e,additionalHeaders:n,method:s,data:t},o=await this.createHeaders(n);o.Accept="application/json",o["Content-Type"]="application/json";const h=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:s,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(h,a)}async submitFormData(e,t,s="POST",n){const a={apiMethod:"submitFormData",path:e,additionalHeaders:n,method:s,data:t},o=await this.createHeaders(n);o.Accept="application/json";const h=new FormData,d=t;for(const $ in d)h.set($,d[$]);const C=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:s,body:h,keepalive:this.keepAlive});return await this.handleResult(C,a)}async put(e,t,s){return this.send(e,t,"PUT",s)}async post(e,t,s){return this.send(e,t,"POST",s)}async patch(e,t,s){return this.send(e,t,"PATCH",s)}async delete(e,t,s){return this.send(e,t,"delete",s)}};we.loadingGetPromises=new Map,we.tokens=new Map,we.invalidTokens=[],we.failledTokenUpdates=new Map,we.firstCallDoneFlags=new Map;let ws=we;Be.getApiConfiguration(document.body||document.documentElement);const Ro=async(r,e)=>{};var _s={exports:{}},Io=_s.exports,Pn;function No(){return Pn||(Pn=1,(function(r,e){var t=[].slice;(function(s,n){return e!==null?r.exports=n():s.UrlPattern=n()})(Io,function(){var s,n,a,o,h,d,C,$,k,w,E,L,R,X,Z;return k=function(A){return A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},C=function(A,m){var M,_,T;for(T=[],M=-1,_=A.length;++M<_;)T=T.concat(m(A[M]));return T},X=function(A,m){var M,_,T;for(T="",M=-1,_=A.length;++M<_;)T+=m(A[M]);return T},R=function(A){return new RegExp(A.toString()+"|").exec("").length-1},E=function(A,m){var M,_,T,V,N;for(V={},M=-1,T=A.length;++M<T;)_=A[M],N=m[M],N!=null&&(V[_]!=null?(Array.isArray(V[_])||(V[_]=[V[_]]),V[_].push(N)):V[_]=N);return V},s={},s.Result=function(A,m){this.value=A,this.rest=m},s.Tagged=function(A,m){this.tag=A,this.value=m},s.tag=function(A,m){return function(M){var _,T;if(_=m(M),_!=null)return T=new s.Tagged(A,_.value),new s.Result(T,_.rest)}},s.regex=function(A){return function(m){var M,_;if(M=A.exec(m),M!=null)return _=M[0],new s.Result(_,m.slice(_.length))}},s.sequence=function(){var A;return A=1<=arguments.length?t.call(arguments,0):[],function(m){var M,_,T,V,N,ee;for(M=-1,_=A.length,ee=[],V=m;++M<_;){if(T=A[M],N=T(V),N==null)return;ee.push(N.value),V=N.rest}return new s.Result(ee,V)}},s.pick=function(){var A,m;return A=arguments[0],m=2<=arguments.length?t.call(arguments,1):[],function(M){var _,T;if(T=s.sequence.apply(s,m)(M),T!=null)return _=T.value,T.value=_[A],T}},s.string=function(A){var m;return m=A.length,function(M){if(M.slice(0,m)===A)return new s.Result(A,M.slice(m))}},s.lazy=function(A){var m;return m=null,function(M){return m==null&&(m=A()),m(M)}},s.baseMany=function(A,m,M,_,T){var V,N,ee,oe;for(ee=T,oe=M?"":[];!(m!=null&&(V=m(ee),V!=null)||(N=A(ee),N==null));)M?oe+=N.value:oe.push(N.value),ee=N.rest;if(!(_&&oe.length===0))return new s.Result(oe,ee)},s.many1=function(A){return function(m){return s.baseMany(A,null,!1,!0,m)}},s.concatMany1Till=function(A,m){return function(M){return s.baseMany(A,m,!0,!0,M)}},s.firstChoice=function(){var A;return A=1<=arguments.length?t.call(arguments,0):[],function(m){var M,_,T,V;for(M=-1,_=A.length;++M<_;)if(T=A[M],V=T(m),V!=null)return V}},L=function(A){var m;return m={},m.wildcard=s.tag("wildcard",s.string(A.wildcardChar)),m.optional=s.tag("optional",s.pick(1,s.string(A.optionalSegmentStartChar),s.lazy(function(){return m.pattern}),s.string(A.optionalSegmentEndChar))),m.name=s.regex(new RegExp("^["+A.segmentNameCharset+"]+")),m.named=s.tag("named",s.pick(1,s.string(A.segmentNameStartChar),s.lazy(function(){return m.name}))),m.escapedChar=s.pick(1,s.string(A.escapeChar),s.regex(/^./)),m.static=s.tag("static",s.concatMany1Till(s.firstChoice(s.lazy(function(){return m.escapedChar}),s.regex(/^./)),s.firstChoice(s.string(A.segmentNameStartChar),s.string(A.optionalSegmentStartChar),s.string(A.optionalSegmentEndChar),m.wildcard))),m.token=s.lazy(function(){return s.firstChoice(m.wildcard,m.optional,m.named,m.static)}),m.pattern=s.many1(s.lazy(function(){return m.token})),m},$={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},d=function(A,m){if(Array.isArray(A))return X(A,function(M){return d(M,m)});switch(A.tag){case"wildcard":return"(.*?)";case"named":return"(["+m+"]+)";case"static":return k(A.value);case"optional":return"(?:"+d(A.value,m)+")?"}},h=function(A,m){return m==null&&(m=$.segmentValueCharset),"^"+d(A,m)+"$"},o=function(A){if(Array.isArray(A))return C(A,o);switch(A.tag){case"wildcard":return["_"];case"named":return[A.value];case"static":return[];case"optional":return o(A.value)}},w=function(A,m,M,_){var T,V,N,ee;if(_==null&&(_=!1),ee=A[m],ee==null){if(_)throw new Error("no values provided for key `"+m+"`");return}if(T=M[m]||0,V=Array.isArray(ee)?ee.length-1:0,T>V){if(_)throw new Error("too few values provided for key `"+m+"`");return}return N=Array.isArray(ee)?ee[T]:ee,_&&(M[m]=T+1),N},a=function(A,m,M){var _,T;if(Array.isArray(A)){for(_=-1,T=A.length;++_<T;)if(a(A[_],m,M))return!0;return!1}switch(A.tag){case"wildcard":return w(m,"_",M,!1)!=null;case"named":return w(m,A.value,M,!1)!=null;case"static":return!1;case"optional":return a(A.value,m,M)}},Z=function(A,m,M){if(Array.isArray(A))return X(A,function(_){return Z(_,m,M)});switch(A.tag){case"wildcard":return w(m,"_",M,!0);case"named":return w(m,A.value,M,!0);case"static":return A.value;case"optional":return a(A.value,m,M)?Z(A.value,m,M):""}},n=function(A,m){var M,_,T,V,N;if(A instanceof n){this.isRegex=A.isRegex,this.regex=A.regex,this.ast=A.ast,this.names=A.names;return}if(this.isRegex=A instanceof RegExp,!(typeof A=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=A,m!=null){if(!Array.isArray(m))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(M=R(this.regex),m.length!==M)throw new Error("regex contains "+M+" groups but array of group names contains "+m.length);this.names=m}return}if(A==="")throw new Error("argument must not be the empty string");if(N=A.replace(/\s+/g,""),N!==A)throw new Error("argument must not contain whitespace");if(_={escapeChar:m?.escapeChar||$.escapeChar,segmentNameStartChar:m?.segmentNameStartChar||$.segmentNameStartChar,segmentNameCharset:m?.segmentNameCharset||$.segmentNameCharset,segmentValueCharset:m?.segmentValueCharset||$.segmentValueCharset,optionalSegmentStartChar:m?.optionalSegmentStartChar||$.optionalSegmentStartChar,optionalSegmentEndChar:m?.optionalSegmentEndChar||$.optionalSegmentEndChar,wildcardChar:m?.wildcardChar||$.wildcardChar},V=L(_),T=V.pattern(A),T==null)throw new Error("couldn't parse pattern");if(T.rest!=="")throw new Error("could only partially parse pattern");this.ast=T.value,this.regex=new RegExp(h(this.ast,_.segmentValueCharset)),this.names=o(this.ast)},n.prototype.match=function(A){var m,M;return M=this.regex.exec(A),M==null?null:(m=M.slice(1),this.names?E(this.names,m):m)},n.prototype.stringify=function(A){if(A==null&&(A={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(A!==Object(A))throw new Error("argument must be an object or undefined");return Z(this.ast,A,{})},n.escapeForRegex=k,n.concatMap=C,n.stringConcatMap=X,n.regexGroupCount=R,n.keysAndValuesToObject=E,n.P=s,n.newParser=L,n.defaultOptions=$,n.astNodeToRegexString=h,n.astNodeToNames=o,n.getParam=w,n.astNodeContainsSegmentsForProvidedParams=a,n.stringify=Z,n})})(_s,_s.exports)),_s.exports}var Uo=No();const jo=fn(Uo);class Cr{constructor(e){this.path=Cr.normalizePath(e)}getDataProviderKey(){return new zs(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let d;try{d=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return d.pathname=d.pathname.replace(/\/+/g,"/"),d.href}const s=t.indexOf("?"),n=t.indexOf("#");let a=t.length;s>=0&&(a=Math.min(a,s)),n>=0&&(a=Math.min(a,n));let o=t.slice(0,a);const h=t.slice(a);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&h)throw new RangeError("Endpoint: path cannot be empty");return o+h}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}const zo=150,Tn=10,qo=200,Bo=16,$n=new WeakMap;let Dn=!1;function Ks(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function As(r){if(r===window)return{x:window.scrollX,y:window.scrollY};const e=r;return{x:e.scrollLeft,y:e.scrollTop}}function Ho(r,e,t){if(r===window){window.scrollTo(e,t);return}const s=r;typeof s.scrollTo=="function"?s.scrollTo(e,t):(s.scrollLeft=e,s.scrollTop=t)}function Vo(r){if(r===window){const t=document.documentElement;return Math.max(0,t.scrollHeight-window.innerHeight)}const e=r;return Math.max(0,e.scrollHeight-e.clientHeight)}function ls(r){let e=$n.get(r);if(!e){const t=As(r);e={x:t.x,y:t.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},$n.set(r,e)}return e}function Js(r){ls(r).userEngaged=!0}function Zs(r){const e=ls(r);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},zo)}function On(r,e){return e-r>=qo}function cs(r){if(!Ks())return;const e=ls(r);if(e.restoring)return;const t=As(r);if(On(t.y,e.y)){Er(r);return}e.x=t.x,e.y=t.y}function Wo(r){if(!Ks())return;const e=ls(r),t=Vo(r),s=e.x,n=t>0?Math.min(e.y,t):e.y,{x:a,y:o}=As(r);if(!(Math.abs(s-a)<=Tn&&Math.abs(n-o)<=Tn)){e.restoring=!0;try{Ho(r,s,n)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Er(r){const e=ls(r);if(e.stickyFrames=Bo,e.raf)return;const t=()=>{e.raf=0,Wo(r),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(t))};e.raf=requestAnimationFrame(t)}function Pr(r){Er(r)}function ks(r){if(!Ks())return;const e=ls(r);if(e.watching)return;e.watching=!0;const t=r===window?window:r,s=()=>{if(e.restoring)return;const{y:L}=As(r);if(On(L,e.y)){Er(r);return}if(e.userEngaged){cs(r),Zs(r);return}cs(r)},n=L=>Ln(L)===r,a=L=>{n(L)&&(cs(r),Js(r))},o=L=>{n(L)&&Zs(r)},h=L=>{n(L)&&(cs(r),Js(r),Zs(r))};t.addEventListener("scroll",s,{passive:!0}),t.addEventListener("touchstart",a,{passive:!0}),t.addEventListener("touchend",o,{passive:!0}),t.addEventListener("touchcancel",o,{passive:!0}),t.addEventListener("wheel",h,{passive:!0}),t.addEventListener("pointerdown",a,{passive:!0}),t.addEventListener("pointerup",o,{passive:!0}),t.addEventListener("pointercancel",o,{passive:!0});const d=As(r);if(e.x=d.x,e.y=d.y,r===window){const L=new ResizeObserver(()=>Pr(window));L.observe(document.documentElement),e.resizeObserver=L;return}const C=r,$=new ResizeObserver(()=>Pr(C));$.observe(C);for(const L of Array.from(C.children))$.observe(L);e.resizeObserver=$;const k=()=>Pr(C),w=new MutationObserver(L=>{for(const R of L)if(R.type==="childList")for(const X of Array.from(R.addedNodes))X instanceof Element&&$.observe(X);k()});w.observe(C,{childList:!0,subtree:!0,characterData:!0});const E=C.getRootNode();E instanceof ShadowRoot&&E.host&&w.observe(E.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=w}function Ln(r){for(const e of r.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&Fn(e))return e;return window}function Fn(r){if(!(r instanceof HTMLElement)||r===document.documentElement||r===document.body)return!1;const e=getComputedStyle(r).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Tr(r){for(const t of r.composedPath())t===window||t===document||t instanceof HTMLElement&&Fn(t)&&ks(t);const e=Ln(r);ks(e),r.type==="wheel"?(cs(e),Js(e),Zs(e)):(r.type==="touchstart"||r.type==="pointerdown")&&(cs(e),Js(e))}function Xs(r){r instanceof Element&&r.classList?.contains("custom-scroll")&&ks(r),r.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&ks(e)})}function $r(r){Xs(r),new MutationObserver(t=>{for(const s of t)for(const n of Array.from(s.addedNodes))n instanceof Element&&Xs(n)}).observe(r,{childList:!0,subtree:!0})}function Dr(r){r.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&($r(e.shadowRoot),Dr(e.shadowRoot))})}function Go(){const r=Element.prototype;if(r.__safariScrollGuardPatched)return;r.__safariScrollGuardPatched=!0;const e=r.attachShadow;r.attachShadow=function(s){const n=e.call(this,s);return $r(n),n}}function Mn(){if(typeof window>"u"||Dn||(Dn=!0,!Ks()))return;ks(window),Go();const r={capture:!0,passive:!0};window.addEventListener("wheel",Tr,r),window.addEventListener("touchstart",Tr,r),window.addEventListener("pointerdown",Tr,r);const e=()=>{Xs(document),Dr(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(s=>{for(const n of s)for(const a of Array.from(n.addedNodes))a instanceof Element&&(Xs(a),a.shadowRoot&&$r(a.shadowRoot),Dr(a))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Yo=Ki,Ko=Mo,Jo=Ys,Zo=xr,Rn=Be,Xo=Ut,Qo=lt,ea=ws,ta=jo;Mn(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Yo,Arrays:Ko,DataBindObserver:Jo,Format:Zo,HTML:Rn,LocationHandler:Xo,Objects:Qo,PublisherManager:De,api:ea,URLPattern:ta,Endpoint:Cr,DataProviderKey:zs};var sa=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,Ss=(r,e,t,s)=>{for(var n=s>1?void 0:s?ra(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&sa(e,t,n),n};const In=r=>{class e extends r{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const s=this.getAttribute("name"),n=this.getCheckAllPublisher(),a=this.getFormPublisher();if(n?.hasCheckAll.get()&&!this.checksAll()&&n&&a&&s){if(this.getFormPublisherValue()?.length)(this.checked===null||n.checkMode.get()=="noneChecked"||n.checkMode.get()==null)&&n.checkMode.set("someUnchecked");else{n.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),h=n.values.get();if(h&&h.length){let d=h.length;for(const C of h)o.indexOf(C)==-1&&(d-=1);d==h.length&&n.checkMode.set("allChecked"),d==0&&n.checkMode.set("noneChecked")}h.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=s=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),s=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),s=="noneChecked"&&(this.checked=null),s=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(s){if(this.value==s||(this.hasAttribute("value")&&!this.forceAutoFill&&(s=this.getAttribute("value")),this._value==s)||s==null||(this._value=s,!this.value))return;if(this.getFormPublisher()&&this.name){let a=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=a==s?!0:null),Array.isArray(a)||(a=[]),a.indexOf(s)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(s){if(this.setCheckedValue(s),this.checksAll()){const n=this.getCheckAllPublisher();n&&(this.checked===!0?n.checkMode.set("allChecked"):this.checked===null&&(n.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const s=this.shadowRoot?.querySelector("input");if(!s||s.checkValidity())return;const n=this.getFormPublisher();if(n){const a=this.getFormPublisherValue();if((this.unique||this.radio)&&a!==null&&a!==void 0&&a.toString().length>0)return;n.isFormValid=!1,s.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(s){this._checked!=s&&(this._checked=s,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const s=this.checked===!0?this.radio?!0:null:!0;this.checked=s;const n=new Event("change");this.dispatchEvent(n)}getValueForFormPublisher(){let s=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:s;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(s)||(s=[]);const n=s.slice(0),a=n.indexOf(this.value);return this.checked===!0&&a===-1&&!this.checksAll()&&n.push(this.value),this.checked===null&&a!==-1&&n.splice(a,1),n}setFormValueFromPublisher(s){if(this.unique||this.radio){this.checked=this.value==s?!0:null;return}Array.isArray(s)||(s=[]),!this.checksAll()&&(this.checked=s.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const s=this.formDataProvider,n=this.getAttribute("name");return!s||!n?null:De.get(s+"/"+n+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const s=this.getCheckAllPublisher();if(s&&(s.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const n=s.values.get().slice(0),a=n.indexOf(this.value);a!=-1&&(n.splice(a,1),s.values.set(n))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const a=this.getFormPublisherValue();a&&Array.isArray(a)&&a.indexOf(this.value)!==-1&&(this.checked=!0)}const n=this.getCheckAllPublisher();n&&(n.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&n.hasCheckAll.set(!0),n.values.get()||n.values.set([]),this.checksAll()||n.values.set([...n.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Ss([O()],e.prototype,"value",1),Ss([O()],e.prototype,"forceAutoFill",2),Ss([O({type:Boolean})],e.prototype,"unique",2),Ss([O({type:Boolean})],e.prototype,"radio",2),Ss([O()],e.prototype,"checked",1),e};/**
99
94
  * @license
100
95
  * Copyright 2018 Google LLC
101
96
  * SPDX-License-Identifier: BSD-3-Clause
102
- */const pt=r=>r??be,na=je`
97
+ */const gt=r=>r??be,na=je`
103
98
  /*SIZES*/
104
99
  :host {
105
100
  --sc-_fs: 1rem;
@@ -137,11 +132,11 @@
137
132
  part="button"
138
133
  class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
139
134
  style=${xn(r)}
140
- aria-controls=${pt(this.ariaControls)}
141
- aria-expanded=${pt(this.sonicAriaExpanded)}
142
- aria-label=${pt(this.ariaLabel)}
143
- aria-labelledby=${pt(this.ariaLabelledby)}
144
- aria-busy=${pt(this.loading?"true":void 0)}
135
+ aria-controls=${gt(this.ariaControls)}
136
+ aria-expanded=${gt(this.sonicAriaExpanded)}
137
+ aria-label=${gt(this.ariaLabel)}
138
+ aria-labelledby=${gt(this.ariaLabelledby)}
139
+ aria-busy=${gt(this.loading?"true":void 0)}
145
140
  ?disabled=${this.disabled}
146
141
  @click=${this.handleChange}
147
142
  @pointerdown=${this.handleRepeatStart}
@@ -161,10 +156,10 @@
161
156
  </button>
162
157
  `;return this.href?qe`<a
163
158
  href="${this.href}"
164
- download=${pt(this.download)}
165
- target=${pt(this.target)}
166
- aria-label=${pt(this.ariaLabel)}
167
- aria-labelledby=${pt(this.ariaLabelledby)}
159
+ download=${gt(this.download)}
160
+ target=${gt(this.target)}
161
+ aria-label=${gt(this.ariaLabel)}
162
+ aria-labelledby=${gt(this.ariaLabelledby)}
168
163
  @click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
169
164
  >${e}</a
170
165
  >`:qe`${e}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};ke.styles=[na,je`
@@ -534,7 +529,7 @@
534
529
  transform: translate(-50%, -50%) rotate(359deg);
535
530
  }
536
531
  }
537
- `],Ce([L({type:String,reflect:!0})],ke.prototype,"type",2),Ce([L({type:String,reflect:!0})],ke.prototype,"variant",2),Ce([L({type:String,reflect:!0})],ke.prototype,"size",2),Ce([L({type:String,reflect:!0})],ke.prototype,"shape",2),Ce([L({type:String})],ke.prototype,"direction",2),Ce([L({type:String,reflect:!0})],ke.prototype,"alignItems",2),Ce([L({type:String})],ke.prototype,"justify",2),Ce([L({type:String,reflect:!0})],ke.prototype,"align",2),Ce([L({type:String})],ke.prototype,"minWidth",2),Ce([L({type:Boolean,reflect:!0})],ke.prototype,"icon",2),Ce([L({type:String})],ke.prototype,"download",2),Ce([L({type:String})],ke.prototype,"autoActive",2),Ce([L({type:Boolean,reflect:!0})],ke.prototype,"loading",2),Ce([ft()],ke.prototype,"hasPrefix",2),Ce([ft()],ke.prototype,"hasSuffix",2),Ce([un({flatten:!0,slot:"prefix"})],ke.prototype,"prefixes",2),Ce([un({flatten:!0,slot:"suffix"})],ke.prototype,"suffixes",2),Ce([L({type:String})],ke.prototype,"target",2),Ce([L({type:String})],ke.prototype,"href",1),Ce([L({type:String})],ke.prototype,"goBack",2),Ce([L({type:Boolean})],ke.prototype,"pushState",2),Ce([L({type:Boolean,reflect:!0})],ke.prototype,"active",2),Ce([L({type:Boolean,reflect:!0})],ke.prototype,"autoRepeat",2),Ce([L({type:String,attribute:"data-aria-controls"})],ke.prototype,"ariaControls",2),Ce([L({type:Boolean,attribute:"data-aria-expanded"})],ke.prototype,"sonicAriaExpanded",2),Ce([ft()],ke.prototype,"location",2),ke=Ce([at(aa)],ke);/**
532
+ `],Ce([O({type:String,reflect:!0})],ke.prototype,"type",2),Ce([O({type:String,reflect:!0})],ke.prototype,"variant",2),Ce([O({type:String,reflect:!0})],ke.prototype,"size",2),Ce([O({type:String,reflect:!0})],ke.prototype,"shape",2),Ce([O({type:String})],ke.prototype,"direction",2),Ce([O({type:String,reflect:!0})],ke.prototype,"alignItems",2),Ce([O({type:String})],ke.prototype,"justify",2),Ce([O({type:String,reflect:!0})],ke.prototype,"align",2),Ce([O({type:String})],ke.prototype,"minWidth",2),Ce([O({type:Boolean,reflect:!0})],ke.prototype,"icon",2),Ce([O({type:String})],ke.prototype,"download",2),Ce([O({type:String})],ke.prototype,"autoActive",2),Ce([O({type:Boolean,reflect:!0})],ke.prototype,"loading",2),Ce([ft()],ke.prototype,"hasPrefix",2),Ce([ft()],ke.prototype,"hasSuffix",2),Ce([un({flatten:!0,slot:"prefix"})],ke.prototype,"prefixes",2),Ce([un({flatten:!0,slot:"suffix"})],ke.prototype,"suffixes",2),Ce([O({type:String})],ke.prototype,"target",2),Ce([O({type:String})],ke.prototype,"href",1),Ce([O({type:String})],ke.prototype,"goBack",2),Ce([O({type:Boolean})],ke.prototype,"pushState",2),Ce([O({type:Boolean,reflect:!0})],ke.prototype,"active",2),Ce([O({type:Boolean,reflect:!0})],ke.prototype,"autoRepeat",2),Ce([O({type:String,attribute:"data-aria-controls"})],ke.prototype,"ariaControls",2),Ce([O({type:Boolean,attribute:"data-aria-expanded"})],ke.prototype,"sonicAriaExpanded",2),Ce([ft()],ke.prototype,"location",2),ke=Ce([at(aa)],ke);/**
538
533
  * @license
539
534
  * Copyright 2020 Google LLC
540
535
  * SPDX-License-Identifier: BSD-3-Clause
@@ -542,7 +537,7 @@
542
537
  * @license
543
538
  * Copyright 2017 Google LLC
544
539
  * SPDX-License-Identifier: BSD-3-Clause
545
- */const Un=(r,e,t)=>{const s=new Map;for(let n=e;n<=t;n++)s.set(r[n],n);return s},da=Vs(class extends Ws{constructor(r){if(super(r),r.type!==bs.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);const n=[],a=[];let o=0;for(const h of r)n[o]=s?s(h,o):o,a[o]=t(h,o),o++;return{values:a,keys:n}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,s]){const n=fa(r),{values:a,keys:o}=this.dt(e,t,s);if(!Array.isArray(n))return this.ut=o,a;const h=this.ut??=[],d=[];let C,$,k=0,w=n.length-1,E=0,O=a.length-1;for(;k<=w&&E<=O;)if(n[k]===null)k++;else if(n[w]===null)w--;else if(h[k]===o[E])d[E]=Kt(n[k],a[E]),k++,E++;else if(h[w]===o[O])d[O]=Kt(n[w],a[O]),w--,O--;else if(h[k]===o[O])d[O]=Kt(n[k],a[O]),xs(r,d[O+1],n[k]),k++,O--;else if(h[w]===o[E])d[E]=Kt(n[w],a[E]),xs(r,n[k],n[w]),w--,E++;else if(C===void 0&&(C=Un(o,E,O),$=Un(h,k,w)),C.has(h[k]))if(C.has(h[w])){const R=$.get(o[E]),X=R!==void 0?n[R]:null;if(X===null){const Z=xs(r,n[k]);Kt(Z,a[E]),d[E]=Z}else d[E]=Kt(X,a[E]),xs(r,n[k],X),n[R]=null;E++}else Or(n[w]),w--;else Or(n[k]),k++;for(;E<=O;){const R=xs(r,d[O+1]);Kt(R,a[E]),d[E++]=R}for(;k<=w;){const R=n[k++];R!==null&&Or(R)}return this.ut=o,ha(r,d),yt}});/**
540
+ */const Un=(r,e,t)=>{const s=new Map;for(let n=e;n<=t;n++)s.set(r[n],n);return s},da=Vs(class extends Ws{constructor(r){if(super(r),r.type!==bs.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);const n=[],a=[];let o=0;for(const h of r)n[o]=s?s(h,o):o,a[o]=t(h,o),o++;return{values:a,keys:n}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,s]){const n=fa(r),{values:a,keys:o}=this.dt(e,t,s);if(!Array.isArray(n))return this.ut=o,a;const h=this.ut??=[],d=[];let C,$,k=0,w=n.length-1,E=0,L=a.length-1;for(;k<=w&&E<=L;)if(n[k]===null)k++;else if(n[w]===null)w--;else if(h[k]===o[E])d[E]=Kt(n[k],a[E]),k++,E++;else if(h[w]===o[L])d[L]=Kt(n[w],a[L]),w--,L--;else if(h[k]===o[L])d[L]=Kt(n[k],a[L]),xs(r,d[L+1],n[k]),k++,L--;else if(h[w]===o[E])d[E]=Kt(n[w],a[E]),xs(r,n[k],n[w]),w--,E++;else if(C===void 0&&(C=Un(o,E,L),$=Un(h,k,w)),C.has(h[k]))if(C.has(h[w])){const R=$.get(o[E]),X=R!==void 0?n[R]:null;if(X===null){const Z=xs(r,n[k]);Kt(Z,a[E]),d[E]=Z}else d[E]=Kt(X,a[E]),xs(r,n[k],X),n[R]=null;E++}else Or(n[w]),w--;else Or(n[k]),k++;for(;E<=L;){const R=xs(r,d[L+1]);Kt(R,a[E]),d[E++]=R}for(;k<=w;){const R=n[k++];R!==null&&Or(R)}return this.ut=o,ha(r,d),bt}});/**
546
541
  * @license
547
542
  * Copyright 2017 Google LLC
548
543
  * SPDX-License-Identifier: BSD-3-Clause
@@ -586,7 +581,7 @@
586
581
  * @license
587
582
  * Copyright 2017 Google LLC
588
583
  * SPDX-License-Identifier: BSD-3-Clause
589
- */class Mr extends Ws{constructor(e){if(super(e),this.it=be,e.type!==bs.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===be||e==null)return this._t=void 0,this.it=e;if(e===yt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Mr.directiveName="unsafeHTML",Mr.resultType=1;const Jt=Vs(Mr),er=new Map,Yn={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};function ka(r){let e=r.customLibraryPath,t=r.customLibraryDefaultPrefix;if(e==null){const s=document.querySelector("[customIconLibraryPath]");e=s?.getAttribute("customIconLibraryPath")??"",t==null&&(t=s?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:t||""}}function Sa(r,e){return r in Yn?r!=="custom"?Yn[r]:ka(e):null}const Kn=sessionStorage.getItem("sonicIconsCache"),Tt=Kn?JSON.parse(Kn):{icons:{},names:[]},xa=100,Wr=class Wr{};Wr.default={get:async e=>{const t=e.library;if(!e.name)return"";const s=e.name,n=Aa;if(!t)return Jt(n.core[e.name]||"");const a=Sa(t,e);if(a){if(t==="custom"&&!a.url)return"";const o=e.prefix||a.defaultPrefix||"",h=n[t]||{};n[t]=h;const d=t==="custom"?`${a.url}|${o}-${s}`:`${o}-${s}`;if(h[d])return Jt(h[d]);const C=(a.url||"").replace("$prefix",o).replace("$name",s);if(Tt.icons[C]){const k=Tt.icons[C];if(/^\s*<svg[\s>]/i.test(k||""))return h[d]=k,Jt(k);delete Tt.icons[C]}if(!er.has(C)){const k=new Promise(async w=>{try{const E=await fetch(C);if(!E.ok){w("");return}try{const O=E.headers.get("content-type")||"";if(!O.includes("image/svg+xml")&&!O.includes("svg")){w("");return}const R=await E.text(),X=/^\s*<svg[\s>]/i.test(R);w(X?R:"")}catch{w("")}}catch{Ro(),w("")}});er.set(C,k)}const $=await er.get(C);if(er.delete(C),h[d]=$||"",$&&/^\s*<svg[\s>]/i.test($)&&(Tt.icons[C]=$,Tt.names.push(C)),Tt.names.length>xa){const k=Tt.names.shift();delete Tt.icons[k]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(Tt)),$?Jt($):""}return Jt(n.core[e.name]||"")}};let Rr=Wr;function Ca(r){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(r)}function Ea(r){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(r)}function Pa(r){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(r)}function Ta(r){if(r.__is__setSubscribable__)return;r.__is__setSubscribable__=!0,r.__onBeforeConnected__=Ca,r.__onConnected__=Ea,r.__onDisconnected__=Pa;const e=r.connectedCallback;r.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(s=>s(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(s=>s(this))};const t=r.disconnectedCallback;r.disconnectedCallback=function(){t?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(s=>s(this))}}function $a(r){const e=[];let t=r;for(;t;)t instanceof Element&&e.push(t),t=t.parentNode||(t.host??null);return e}function Da(r){const e=r.parentNode||(r.getRootNode()?.host??null);return e instanceof Element?e:null}function Jn(r,e,t,s){const n=r,a=Be.getAncestorAttributeValue(r,e);!s.assignNull&&a===null||Object.is(n[t],a)||(n[t]=a)}const se=class se{static subscribe(e,t,s,n={assignNull:!0}){const a={component:e,attributeName:t,propertyKey:s,syncOptions:n,watchedAncestors:[],parentForReparent:null};return se.subscriptions.add(a),se.bindSubscription(a),()=>{se.unsubscribe(a)}}static bindSubscription(e){se.unbindWatchers(e);const t=$a(e.component);e.watchedAncestors=t;for(const n of t)se.addAttrSlot(n,e.attributeName,e);const s=Da(e.component);e.parentForReparent=s,s&&se.addParentSlot(s,e),se.pendingRefresh.add(e),se.scheduleRefresh()}static unbindWatchers(e){for(const t of e.watchedAncestors)se.removeAttrSlot(t,e.attributeName,e);e.watchedAncestors=[],e.parentForReparent&&(se.removeParentSlot(e.parentForReparent,e),e.parentForReparent=null)}static addAttrSlot(e,t,s){let n=se.attrSlots.get(e);n||(n=new Map,se.attrSlots.set(e,n));let a=n.get(t);if(!a){const o=Be.scopeAttributeNames(t),h=new Set,d=new MutationObserver(()=>{for(const C of h)se.subscriptions.has(C)&&se.pendingRefresh.add(C);se.scheduleRefresh()});d.observe(e,{attributes:!0,attributeFilter:o}),a={observer:d,subscriptions:h},n.set(t,a)}a.subscriptions.add(s)}static removeAttrSlot(e,t,s){const n=se.attrSlots.get(e);if(!n)return;const a=n.get(t);a&&(a.subscriptions.delete(s),!(a.subscriptions.size>0)&&(a.observer.disconnect(),n.delete(t)))}static addParentSlot(e,t){let s=se.parentSlots.get(e);if(!s){const a=new Map,o=new MutationObserver(h=>{const d=new Set;for(const C of h)C.removedNodes.forEach($=>{$ instanceof Element&&d.add($)}),C.addedNodes.forEach($=>{$ instanceof Element&&d.add($)});for(const C of d){const $=a.get(C);if($)for(const k of[...$])se.subscriptions.has(k)&&se.bindSubscription(k)}});o.observe(e,{childList:!0}),s={observer:o,byComponent:a},se.parentSlots.set(e,s)}let n=s.byComponent.get(t.component);n||(n=new Set,s.byComponent.set(t.component,n)),n.add(t)}static removeParentSlot(e,t){const s=se.parentSlots.get(e);if(!s)return;const n=s.byComponent.get(t.component);n&&(n.delete(t),n.size===0&&s.byComponent.delete(t.component)),!(s.byComponent.size>0)&&(s.observer.disconnect(),se.parentSlots.delete(e))}static unsubscribe(e){se.subscriptions.has(e)&&(se.unbindWatchers(e),se.subscriptions.delete(e),se.pendingRefresh.delete(e),se.subscriptions.size===0&&se.cancelScheduledRefresh())}static scheduleRefresh(){se.pendingRefresh.size!==0&&se.animationFrameId===null&&(se.animationFrameId=requestAnimationFrame(()=>{se.flushRefresh()}))}static cancelScheduledRefresh(){se.animationFrameId!==null&&(cancelAnimationFrame(se.animationFrameId),se.animationFrameId=null),se.pendingRefresh.clear()}static flushRefresh(){se.animationFrameId=null;const e=Array.from(se.pendingRefresh);se.pendingRefresh.clear();for(const t of e)se.subscriptions.has(t)&&Jn(t.component,t.attributeName,t.propertyKey,t.syncOptions)}};se.subscriptions=new Set,se.pendingRefresh=new Set,se.animationFrameId=null,se.attrSlots=new WeakMap,se.parentSlots=new WeakMap;let Ir=se;function Zn(r,e){const t=e?.dynamic??!1,s=t;return function(n,a){if(!n||(Ta(n),n.__onBeforeConnected__(h=>{Jn(h,r,a,{assignNull:s})}),!t))return;let o=null;n.__onConnected__(h=>{o=Ir.subscribe(h,r,a,{assignNull:!0})}),n.__onDisconnected__(()=>{o?.(),o=null})}}var Oa=Object.defineProperty,La=Object.getOwnPropertyDescriptor,Zt=(r,e,t,s)=>{for(var n=s>1?void 0:s?La(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Oa(e,t,n),n};const Nr=r=>L(r),Fa="sonic-icon";let $t=class extends We{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Rr.default.get({name:this.name,prefix:this.prefix,library:this.library,customLibraryPath:this.customIconLibraryPath,customLibraryDefaultPrefix:this.customIconDefaultPrefix})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(r){(r.has("name")||r.has("prefix")||r.has("library")||this.library==="custom"&&(r.has("customIconLibraryPath")||r.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(r)}render(){return this.iconText?this.iconText:be}};$t.styles=je`
584
+ */class Mr extends Ws{constructor(e){if(super(e),this.it=be,e.type!==bs.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===be||e==null)return this._t=void 0,this.it=e;if(e===bt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Mr.directiveName="unsafeHTML",Mr.resultType=1;const Jt=Vs(Mr),er=new Map,Yn={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};function ka(r){let e=r.customLibraryPath,t=r.customLibraryDefaultPrefix;if(e==null){const s=document.querySelector("[customIconLibraryPath]");e=s?.getAttribute("customIconLibraryPath")??"",t==null&&(t=s?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:t||""}}function Sa(r,e){return r in Yn?r!=="custom"?Yn[r]:ka(e):null}const Kn=sessionStorage.getItem("sonicIconsCache"),$t=Kn?JSON.parse(Kn):{icons:{},names:[]},xa=100,Wr=class Wr{};Wr.default={get:async e=>{const t=e.library;if(!e.name)return"";const s=e.name,n=Aa;if(!t)return Jt(n.core[e.name]||"");const a=Sa(t,e);if(a){if(t==="custom"&&!a.url)return"";const o=e.prefix||a.defaultPrefix||"",h=n[t]||{};n[t]=h;const d=t==="custom"?`${a.url}|${o}-${s}`:`${o}-${s}`;if(h[d])return Jt(h[d]);const C=(a.url||"").replace("$prefix",o).replace("$name",s);if($t.icons[C]){const k=$t.icons[C];if(/^\s*<svg[\s>]/i.test(k||""))return h[d]=k,Jt(k);delete $t.icons[C]}if(!er.has(C)){const k=new Promise(async w=>{try{const E=await fetch(C);if(!E.ok){w("");return}try{const L=E.headers.get("content-type")||"";if(!L.includes("image/svg+xml")&&!L.includes("svg")){w("");return}const R=await E.text(),X=/^\s*<svg[\s>]/i.test(R);w(X?R:"")}catch{w("")}}catch{Ro(),w("")}});er.set(C,k)}const $=await er.get(C);if(er.delete(C),h[d]=$||"",$&&/^\s*<svg[\s>]/i.test($)&&($t.icons[C]=$,$t.names.push(C)),$t.names.length>xa){const k=$t.names.shift();delete $t.icons[k]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify($t)),$?Jt($):""}return Jt(n.core[e.name]||"")}};let Rr=Wr;function Ca(r){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(r)}function Ea(r){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(r)}function Pa(r){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(r)}function Ta(r){if(r.__is__setSubscribable__)return;r.__is__setSubscribable__=!0,r.__onBeforeConnected__=Ca,r.__onConnected__=Ea,r.__onDisconnected__=Pa;const e=r.connectedCallback;r.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(s=>s(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(s=>s(this))};const t=r.disconnectedCallback;r.disconnectedCallback=function(){t?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(s=>s(this))}}function $a(r){const e=[];let t=r;for(;t;)t instanceof Element&&e.push(t),t=t.parentNode||(t.host??null);return e}function Da(r){const e=r.parentNode||(r.getRootNode()?.host??null);return e instanceof Element?e:null}function Jn(r,e,t,s){const n=r,a=Be.getAncestorAttributeValue(r,e);!s.assignNull&&a===null||Object.is(n[t],a)||(n[t]=a)}const se=class se{static subscribe(e,t,s,n={assignNull:!0}){const a={component:e,attributeName:t,propertyKey:s,syncOptions:n,watchedAncestors:[],parentForReparent:null};return se.subscriptions.add(a),se.bindSubscription(a),()=>{se.unsubscribe(a)}}static bindSubscription(e){se.unbindWatchers(e);const t=$a(e.component);e.watchedAncestors=t;for(const n of t)se.addAttrSlot(n,e.attributeName,e);const s=Da(e.component);e.parentForReparent=s,s&&se.addParentSlot(s,e),se.pendingRefresh.add(e),se.scheduleRefresh()}static unbindWatchers(e){for(const t of e.watchedAncestors)se.removeAttrSlot(t,e.attributeName,e);e.watchedAncestors=[],e.parentForReparent&&(se.removeParentSlot(e.parentForReparent,e),e.parentForReparent=null)}static addAttrSlot(e,t,s){let n=se.attrSlots.get(e);n||(n=new Map,se.attrSlots.set(e,n));let a=n.get(t);if(!a){const o=Be.scopeAttributeNames(t),h=new Set,d=new MutationObserver(()=>{for(const C of h)se.subscriptions.has(C)&&se.pendingRefresh.add(C);se.scheduleRefresh()});d.observe(e,{attributes:!0,attributeFilter:o}),a={observer:d,subscriptions:h},n.set(t,a)}a.subscriptions.add(s)}static removeAttrSlot(e,t,s){const n=se.attrSlots.get(e);if(!n)return;const a=n.get(t);a&&(a.subscriptions.delete(s),!(a.subscriptions.size>0)&&(a.observer.disconnect(),n.delete(t)))}static addParentSlot(e,t){let s=se.parentSlots.get(e);if(!s){const a=new Map,o=new MutationObserver(h=>{const d=new Set;for(const C of h)C.removedNodes.forEach($=>{$ instanceof Element&&d.add($)}),C.addedNodes.forEach($=>{$ instanceof Element&&d.add($)});for(const C of d){const $=a.get(C);if($)for(const k of[...$])se.subscriptions.has(k)&&se.bindSubscription(k)}});o.observe(e,{childList:!0}),s={observer:o,byComponent:a},se.parentSlots.set(e,s)}let n=s.byComponent.get(t.component);n||(n=new Set,s.byComponent.set(t.component,n)),n.add(t)}static removeParentSlot(e,t){const s=se.parentSlots.get(e);if(!s)return;const n=s.byComponent.get(t.component);n&&(n.delete(t),n.size===0&&s.byComponent.delete(t.component)),!(s.byComponent.size>0)&&(s.observer.disconnect(),se.parentSlots.delete(e))}static unsubscribe(e){se.subscriptions.has(e)&&(se.unbindWatchers(e),se.subscriptions.delete(e),se.pendingRefresh.delete(e),se.subscriptions.size===0&&se.cancelScheduledRefresh())}static scheduleRefresh(){se.pendingRefresh.size!==0&&se.animationFrameId===null&&(se.animationFrameId=requestAnimationFrame(()=>{se.flushRefresh()}))}static cancelScheduledRefresh(){se.animationFrameId!==null&&(cancelAnimationFrame(se.animationFrameId),se.animationFrameId=null),se.pendingRefresh.clear()}static flushRefresh(){se.animationFrameId=null;const e=Array.from(se.pendingRefresh);se.pendingRefresh.clear();for(const t of e)se.subscriptions.has(t)&&Jn(t.component,t.attributeName,t.propertyKey,t.syncOptions)}};se.subscriptions=new Set,se.pendingRefresh=new Set,se.animationFrameId=null,se.attrSlots=new WeakMap,se.parentSlots=new WeakMap;let Ir=se;function Zn(r,e){const t=e?.dynamic??!1,s=t;return function(n,a){if(!n||(Ta(n),n.__onBeforeConnected__(h=>{Jn(h,r,a,{assignNull:s})}),!t))return;let o=null;n.__onConnected__(h=>{o=Ir.subscribe(h,r,a,{assignNull:!0})}),n.__onDisconnected__(()=>{o?.(),o=null})}}var Oa=Object.defineProperty,La=Object.getOwnPropertyDescriptor,Zt=(r,e,t,s)=>{for(var n=s>1?void 0:s?La(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Oa(e,t,n),n};const Nr=r=>O(r),Fa="sonic-icon";let Dt=class extends We{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Rr.default.get({name:this.name,prefix:this.prefix,library:this.library,customLibraryPath:this.customIconLibraryPath,customLibraryDefaultPrefix:this.customIconDefaultPrefix})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(r){(r.has("name")||r.has("prefix")||r.has("library")||this.library==="custom"&&(r.has("customIconLibraryPath")||r.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(r)}render(){return this.iconText?this.iconText:be}};Dt.styles=je`
590
585
  :host {
591
586
  line-height: 0.1em;
592
587
  width: fit-content;
@@ -636,7 +631,7 @@
636
631
  :host([size="3xl"]) svg {
637
632
  --_sc-icon-size: 2.8em;
638
633
  }
639
- `,Zt([ft()],$t.prototype,"iconText",2),Zt([Nr({type:String})],$t.prototype,"name",2),Zt([Nr({type:String})],$t.prototype,"prefix",2),Zt([Nr({type:String})],$t.prototype,"library",2),Zt([Zn("customIconLibraryPath",{dynamic:!0}),ft()],$t.prototype,"customIconLibraryPath",2),Zt([Zn("customIconDefaultPrefix",{dynamic:!0}),ft()],$t.prototype,"customIconDefaultPrefix",2),$t=Zt([at(Fa)],$t);function Ur(r){return r?r instanceof Object?r:Jt(r):be}const Xn=new WeakMap;function Ma(r){const e=Xn.get(r);if(e)return e;const t=new CSSStyleSheet;return t.replaceSync(r.cssText),Xn.set(r,t),t}function Ra(r){return r instanceof hr}function Qn(r){return r?(Array.isArray(r)?r:[r]).flatMap(t=>Array.isArray(t)?Qn(t):t instanceof CSSStyleSheet?[t]:Ra(t)?[Ma(t)]:[]):[]}Mn();const Ia=je`
634
+ `,Zt([ft()],Dt.prototype,"iconText",2),Zt([Nr({type:String})],Dt.prototype,"name",2),Zt([Nr({type:String})],Dt.prototype,"prefix",2),Zt([Nr({type:String})],Dt.prototype,"library",2),Zt([Zn("customIconLibraryPath",{dynamic:!0}),ft()],Dt.prototype,"customIconLibraryPath",2),Zt([Zn("customIconDefaultPrefix",{dynamic:!0}),ft()],Dt.prototype,"customIconDefaultPrefix",2),Dt=Zt([at(Fa)],Dt);function Ur(r){return r?r instanceof Object?r:Jt(r):be}const Xn=new WeakMap;function Ma(r){const e=Xn.get(r);if(e)return e;const t=new CSSStyleSheet;return t.replaceSync(r.cssText),Xn.set(r,t),t}function Ra(r){return r instanceof hr}function Qn(r){return r?(Array.isArray(r)?r:[r]).flatMap(t=>Array.isArray(t)?Qn(t):t instanceof CSSStyleSheet?[t]:Ra(t)?[Ma(t)]:[]):[]}Mn();const Ia=je`
640
635
  .custom-scroll {
641
636
  overflow: auto !important;
642
637
  overflow-y: overlay !important;
@@ -955,7 +950,7 @@
955
950
  opacity: 0.85;
956
951
  pointer-events: none;
957
952
  }
958
- `],et([L()],Ge.prototype,"label",2),et([L({type:String})],Ge.prototype,"id",2),et([L()],Ge.prototype,"text",2),et([L({type:String,reflect:!0})],Ge.prototype,"status",2),et([L({type:Boolean})],Ge.prototype,"ghost",2),et([L({type:Boolean})],Ge.prototype,"preserve",2),et([L({type:Boolean})],Ge.prototype,"dismissForever",2),et([L({type:String})],Ge.prototype,"maxHeight",2),et([L({type:Boolean})],Ge.prototype,"useSlot",2),et([L({attribute:!1})],Ge.prototype,"styleSheet",2),et([ft()],Ge.prototype,"visible",2),et([ft()],Ge.prototype,"_titleId",2),et([ft()],Ge.prototype,"_dismissed",2),Ge=et([at(Ja)],Ge);const Za=je`
953
+ `],et([O()],Ge.prototype,"label",2),et([O({type:String})],Ge.prototype,"id",2),et([O()],Ge.prototype,"text",2),et([O({type:String,reflect:!0})],Ge.prototype,"status",2),et([O({type:Boolean})],Ge.prototype,"ghost",2),et([O({type:Boolean})],Ge.prototype,"preserve",2),et([O({type:Boolean})],Ge.prototype,"dismissForever",2),et([O({type:String})],Ge.prototype,"maxHeight",2),et([O({type:Boolean})],Ge.prototype,"useSlot",2),et([O({attribute:!1})],Ge.prototype,"styleSheet",2),et([ft()],Ge.prototype,"visible",2),et([ft()],Ge.prototype,"_titleId",2),et([ft()],Ge.prototype,"_dismissed",2),Ge=et([at(Ja)],Ge);const Za=je`
959
954
  :host {
960
955
  /* POLICES */
961
956
  /*
@@ -1090,7 +1085,7 @@
1090
1085
  ${ii}
1091
1086
  }
1092
1087
  }
1093
- `;var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,Ps=(r,e,t,s)=>{for(var n=s>1?void 0:s?tl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&el(e,t,n),n};const sl="sonic-theme";let gt=class extends We{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,gt.instance=this}static getPopContainer(){return gt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const r=document.styleSheets,e=r.length,t=[];for(let n=0;n<e;n++){const a=r[n];a.href&&(a.href.includes("googleapis")||a.href.includes("typekit.net"))&&t.push(a.href)}const s={variables:this.getCssVariables(),fonts:t};De.get("sonic-theme")?.set(s),document.querySelectorAll("iframe").forEach(n=>n.contentWindow?.postMessage({type:"SonicTheme",...s},"*"))}receiveMessage(r){const e=r.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],e=[...gt.styles.map(n=>n.styleSheet),...Array.from(document.styleSheets)];for(const n of e)try{if(!n)continue;const a=n.cssRules;for(const o of a){if(!("style"in o))continue;const h=o.style;for(const d of h)r.includes(d)||d.indexOf("--sc")!==0||r.push(d)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const t=window.getComputedStyle(this),s={};return r.forEach(n=>s[n]=t.getPropertyValue(n)),s}render(){return qe`<slot></slot>`}};gt.styles=[Xa,Qa,Za,je`
1088
+ `;var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,Ps=(r,e,t,s)=>{for(var n=s>1?void 0:s?tl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&el(e,t,n),n};const sl="sonic-theme";let vt=class extends We{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,vt.instance=this}static getPopContainer(){return vt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const r=document.styleSheets,e=r.length,t=[];for(let n=0;n<e;n++){const a=r[n];a.href&&(a.href.includes("googleapis")||a.href.includes("typekit.net"))&&t.push(a.href)}const s={variables:this.getCssVariables(),fonts:t};De.get("sonic-theme")?.set(s),document.querySelectorAll("iframe").forEach(n=>n.contentWindow?.postMessage({type:"SonicTheme",...s},"*"))}receiveMessage(r){const e=r.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],e=[...vt.styles.map(n=>n.styleSheet),...Array.from(document.styleSheets)];for(const n of e)try{if(!n)continue;const a=n.cssRules;for(const o of a){if(!("style"in o))continue;const h=o.style;for(const d of h)r.includes(d)||d.indexOf("--sc")!==0||r.push(d)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const t=window.getComputedStyle(this),s={};return r.forEach(n=>s[n]=t.getPropertyValue(n)),s}render(){return qe`<slot></slot>`}};vt.styles=[Xa,Qa,Za,je`
1094
1089
  :host([color]) {
1095
1090
  color: var(--sc-base-content, #000);
1096
1091
  }
@@ -1122,11 +1117,11 @@
1122
1117
  transition-property: scale, opacity;
1123
1118
  transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1124
1119
  }
1125
- `],Ps([L({type:String,reflect:!0})],gt.prototype,"theme",2),Ps([L({type:Boolean,reflect:!0})],gt.prototype,"background",2),Ps([L({type:Boolean,reflect:!0})],gt.prototype,"color",2),Ps([L({type:Boolean,reflect:!0})],gt.prototype,"font",2),gt=Ps([at(sl)],gt);var rl=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,oi=(r,e,t,s)=>{for(var n=s>1?void 0:s?nl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&rl(e,t,n),n};let ai=!1;function li(r){if(r.label!==void 0)return r.label;if(r.title!==void 0)return ai||(ai=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),r.title}const il="sonic-toast";let ie=class extends We{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const r=window.parent!=window;let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return r||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"45ch",flexDirection:"column-reverse"}),ie.handleExistingToastDelegation(),this.toasts?qe`<div style=${xn(e)}>
1120
+ `],Ps([O({type:String,reflect:!0})],vt.prototype,"theme",2),Ps([O({type:Boolean,reflect:!0})],vt.prototype,"background",2),Ps([O({type:Boolean,reflect:!0})],vt.prototype,"color",2),Ps([O({type:Boolean,reflect:!0})],vt.prototype,"font",2),vt=Ps([at(sl)],vt);var rl=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,oi=(r,e,t,s)=>{for(var n=s>1?void 0:s?nl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&rl(e,t,n),n};let ai=!1;function li(r){if(r.label!==void 0)return r.label;if(r.title!==void 0)return ai||(ai=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),r.title}const il="sonic-toast";let ie=class extends We{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const r=window.parent!=window;let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return r||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"45ch",flexDirection:"column-reverse"}),ie.handleExistingToastDelegation(),this.toasts?qe`<div style=${xn(e)}>
1126
1121
  ${da(this.toasts,t=>t.id,t=>qe`
1127
1122
  <sonic-toast-item
1128
1123
  maxHeight=${r?"none":"10rem"}
1129
- status=${pt(t.status)}
1124
+ status=${gt(t.status)}
1130
1125
  .label=${li(t)}
1131
1126
  .text=${t.useSlot?void 0:t.text}
1132
1127
  .styleSheet=${t.styleSheet}
@@ -1134,19 +1129,19 @@
1134
1129
  ?ghost=${t.ghost}
1135
1130
  ?dismissForever=${t.dismissForever}
1136
1131
  ?preserve=${t.preserve}
1137
- id=${pt(t.id)}
1132
+ id=${gt(t.id)}
1138
1133
  @hide=${()=>this.removeItem(t)}
1139
1134
  ${_a({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}
1140
1135
  >
1141
1136
  ${t.useSlot?Ur(t.text):be}
1142
1137
  </sonic-toast-item>
1143
1138
  `)}
1144
- </div>`:be}static removeAll(){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const r=ie.getInstance();r&&(r.toasts=r.toasts.filter(e=>e.ghost))}static removeItemsByStatus(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:r},"*");return}const e=ie.getInstance();e&&(e.toasts=e.toasts.filter(t=>t.status!==r))}static removeItemById(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:r},"*");return}const e=ie.getInstance();e&&(e.toasts=e.toasts.filter(t=>t.id!==r))}static removeTemporaryItems(){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const r=ie.getInstance();r&&(r.toasts=r.toasts.filter(e=>e.preserve))}static getInstance(){return ie.instance||(ie.instance=document.createElement("sonic-toast"),gt.getPopContainer().prepend(ie.instance)),ie.instance}static add(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:r},"*");return}const e=ie.getInstance(),t=r.id??new Date().valueOf(),s=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof r.text=="string"&&s.test(r.text),a={id:t,text:r.text,label:li(r),status:r.status,preserve:n?!0:r.preserve,ghost:r.ghost,dismissForever:r.dismissForever,styleSheet:r.styleSheet,useSlot:r.useSlot};if(r.dismissForever&&r.id&&si(r.id))return null;if(e?.toasts.length){const o={...a};for(const h of e.toasts){const d={...h};if(o.id=d.id=0,lt.shallowEqual(o,d))return null}}return e&&(e.toasts=[...e.toasts,a]),a}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const r=ie.getInstance();window.parent.postMessage({type:"addToasts",toasts:r.toasts},"*"),r.toasts=[]}static removeItem(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:r},"*");return}const e=ie.getInstance();e&&e.removeItem(r)}removeItem(r){r&&(this.toasts=this.toasts.filter(e=>(e={...e},delete e.id,!lt.shallowEqual(e,r,!1))))}};ie.delegateToasts=!1,oi([L({type:Array})],ie.prototype,"toasts",2),ie=oi([at(il)],ie),typeof window<"u"&&(window[_r+"Toast"]=window[_r+"Toast"]||ie);function ol(){const r=t=>{t.data.type=="querySonicToastAvailability"&&t.source.postMessage({type:"sonicToastAvailable"},"*"),t.data.type=="removeItemsByStatus"&&ie.removeItemsByStatus(t.data.status),t.data.type=="removeItemById"&&ie.removeItemById(t.data.id),t.data.type=="removeTemporaryItems"&&ie.removeTemporaryItems(),t.data.type=="sonicToastAvailable"&&(ie.delegateToasts=!0,ie.handleExistingToastDelegation()),t.data.type=="addToasts"&&(ie.getInstance().toasts=[...ie.getInstance().toasts,...t.data.toasts]),t.data.type=="removeAllToasts"&&ie.removeAll(),t.data.type=="removeToast"&&ie.removeItem(t.data.toast),t.data.type=="addToast"&&ie.add(t.data.toast)},e=window.parent!=window;if(window.addEventListener("message",r,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const t of document.querySelectorAll("iframe"))t.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}ol();var al=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,Ts=(r,e,t,s)=>{for(var n=s>1?void 0:s?ll(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&al(e,t,n),n};const cl=new Set,ul=new Set,hl=r=>{for(const e of ul)e(r)},zr=new Set;let qr=0;vn(async()=>{qr++;const r=qr,e=Array.from(zr);for(;e.length>0;){if(r!=qr)return;const t=e.splice(0,4);await Promise.all(t.map(s=>s.refetch()))}});const fl=(r,e)=>{class t extends r{constructor(...n){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.noErrorsRecordings=!1,this.requestId=0,this.refetchEveryMs=0,this._isFetching=!1,this._mustRefetch=!1,this.dataProvider=""}get props(){return super.props}set props(n){super.props=n}set endPoint(n){this._endPoint=n,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}refetch(){return this._fetchData()}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new ws(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await De.getInstance().isLocalStrorageReady,!this.isConnected))return;const n=De.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,lt.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}),this.handleStartFetching()==="fetching")return;let o=null;try{o=await this.api.get(this.endPoint||this.dataProvider||"",n)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||cl.add(this),hl(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&ie.add({text:"Network Error",status:"error"});else{this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs));return}if(this.key){const h=o._sonic_http_response_,d=this.key.split(".");o=lt.traverse(o,d,this.hasAttribute("preserveOtherKeys")),o&&lt.isObject(o)&&h&&(o._sonic_http_response_=h)}this.props=o,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs))}}disconnectedCallback(){super.disconnectedCallback(),zr.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),zr.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const n=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),a={root:null,rootMargin:Math.max(window.innerWidth*n,window.innerHeight*n)+"px",threshold:.9};this.iObserver=new IntersectionObserver(d=>this.onIntersection(d),a);let h=[...(this.shadowRoot?this.shadowRoot:this).children].filter(d=>d.nodeName.toLowerCase()!="style")[0];if(h?.nodeName.toLocaleLowerCase()=="slot"&&(h=[...h.children].filter(d=>d.nodeName.toLowerCase()!="style")[0]),!h||h.nodeName.toLocaleLowerCase()=="template"){h=document.createElement("div");const d=h.style;d.pointerEvents="none",d.width="1px",d.height="1px",this.lazyLoadPlaceHolder=h,this.appendChild(h)}h?this.iObserver.observe(h):this.isFirstLoad&&this._fetchData()}onIntersection(n){for(const a of n)if(a.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return Ts([L()],t.prototype,"noErrorsRecordings",2),Ts([L()],t.prototype,"props",1),Ts([L({type:String})],t.prototype,"endPoint",1),Ts([L()],t.prototype,"requestId",2),Ts([L({type:Number})],t.prototype,"refetchEveryMs",2),t};var dl=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,Xt=(r,e,t,s)=>{for(var n=s>1?void 0:s?pl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&dl(e,t,n),n};const gl=r=>{class e extends r{constructor(...s){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const s=this.shadowRoot?.querySelector("input");if(!s||s.checkValidity())return;const n=this.getFormPublisher();n&&(n.isFormValid=!1),s.reportValidity()}set type(s){this.hasAttribute("type")&&!this.forceAutoFill&&(s=this.getAttribute("type")),this._type=s,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(s){this.hasAttribute("description")&&!this.forceAutoFill&&(s=this.getAttribute("description")),this._description=s,this.requestUpdate()}get label(){return this._label}set label(s){this.hasAttribute("label")&&!this.forceAutoFill&&(s=this.getAttribute("label")),this._label=s,this.requestUpdate()}}return Xt([L()],e.prototype,"forceAutoFill",2),Xt([L({type:String})],e.prototype,"type",1),Xt([L()],e.prototype,"description",1),Xt([L()],e.prototype,"label",1),Xt([L({type:String,reflect:!0})],e.prototype,"status",2),Xt([L({type:Number})],e.prototype,"tabindex",2),Xt([L({type:String})],e.prototype,"autocomplete",2),e},Br=new Map,ci=r=>{if(!r)return null;const e=Be.getApiConfiguration(r),t=Be.getAncestorAttributeValue(r,"wordingProvider"),s=Be.getAncestorAttributeValue(r,"wordingVersionProvider"),n={apiConfiguration:e,wordingProvider:t,wordingVersionProvider:s};let a=null;for(const[o,h]of Br)if(lt.deepEqual(o,n)){a=h;break}return a||(a={api:new ws(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:t,callIndex:0,wordingVersionProvider:s,apiCallKey:n},Br.set(n,a)),a},ui="",Ee=class Ee extends zn{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=t=>{const s=this.useUnsafeHTML?Jt(t):t;this.setValue(s)},this.node=e.options.host}unsubscribe(){Ee.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,t=!1){return this.useUnsafeHTML=t,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),yt}static async callApi(e,t,s=!0,n){if(await De.getInstance().isLocalStrorageReady,Ee.firstCall){Ee.firstCall=!1,vn(Ee.reloadWordings);const $=Object.keys(Ee.publisher.get());for(const k of $)Ee.publisher.get()[k]===ui&&delete Ee.publisher[k]}if(e){const $=Be.getAncestorAttributeValue(e,"wordingVersionProvider");$&&_n($).onAssign(Ee.handleVersionProvider(e))}let a=Ee.publisher.get()["wording_"+t]!=null;const o=n||ci(e);if(!o)return;if(a&&t!==""){o.translatedKeys.add(t);return}o.callIndex++;const h=o.callIndex,d=o.wordingProvider??"";if(!d&&s){window.setTimeout(async()=>{Ee.callApi(null,t,!1,o)},1e3);return}const C=o.api;window.queueMicrotask(async()=>{if(a=Ee.publisher["wording_"+t].get()!=null,!a&&t!==""&&(o.keysToTranslate.add(t),Ee.publisher["wording_"+t].set(ui)),h!==o.callIndex)return;const $=Array.from(o.keysToTranslate);if(!$.length)return;const k=d.split("?"),w=k.shift(),E=(k.length>0?k.join("?")+"&":"")+"labels[]="+$.join("&labels[]="),O=w+"?"+E;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const R=await C.get(O);for(const X in R)Ee.publisher["wording_"+X].set(R[X])})}static reloadWordings(){for(const e of Br.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&Ee.callApi(null,"",!1,e)}static handleVersionProvider(e){const t=ci(e),s=a=>{};if(!t)return s;if(Ee.versionProviderHandlers.has(t))return Ee.versionProviderHandlers.get(t)||s;const n=function(a){if(!t.wordingVersionProvider)return;const h=Ee.publisher.get().__wording_versions__??[];if(a==null)return;const d=h.find(C=>C.serviceURL===t.api.serviceURL)||{serviceURL:t.api.serviceURL,version:0};h.includes(d)||h.push(d),a!==d.version&&(d.version=a,Ee.publisher.set({__wording_versions__:h}),Ee.reloadWordings())};return Ee.versionProviderHandlers.set(t,n),n}subscribe(e){this.unsubscribe(),Ee.publisher["wording_"+e].onAssign(this.onAssign),Ee.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};Ee.publisher=De.get("sonic-wording",{localStorageMode:"enabled"}),Ee.firstCall=!0,Ee.versionProviderHandlers=new Map;let $s=Ee;var vl=Object.defineProperty,ml=Object.getOwnPropertyDescriptor,_t=(r,e,t,s)=>{for(var n=s>1?void 0:s?ml(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&vl(e,t,n),n};let tr=!1,Hr=new Set;const yl=(r,e)=>{var n;const t=(n=class extends r{constructor(...o){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.shouldRenderLazy=!0,this.defferedDebug=null,this.debug=null,this.onAssign=h=>{this.props=h}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return Be.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){typeof o=="string"&&["{","["].includes(o.trim().charAt(0))&&(o=JSON.parse(o)),o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const d=[...(this.shadowRoot||this).children].filter($=>$.tagName!="STYLE"),C=this.displayContents?"contents":d.length==0?"none":null;C?this.style.display=C:this.style.removeProperty("display")}connectedCallback(){if(n.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let h=!0;const d=new IntersectionObserver(C=>{for(const $ of C)if(h&&$.isIntersecting){h=!1,d.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);d.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),$s.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const o=this.debug.style;o.position="fixed",o.top="0",o.right="0",o.margin="auto",o.borderRadius=".7rem",o.backgroundColor="#0f1729",o.color="#c5d4f9",o.padding="16px 16px",o.margin="16px 16px",o.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",o.overflowY="auto",o.zIndex="99999999",o.maxHeight="calc(100vh - 32px)",o.fontFamily="Consolas, monospace",o.maxWidth="min(50vw,25rem)",o.fontSize="12px",o.minWidth="300px",o.overflowWrap="break-word",o.resize="vertical"}this.addEventListener("click",o=>{o.ctrlKey&&(o.preventDefault(),tr=!tr)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{tr||this.removeDebugger(),document.body.appendChild(this.debug),Hr.add(this.debug)}),this.addEventListener("mouseout",()=>{tr||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
1139
+ </div>`:be}static removeAll(){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const r=ie.getInstance();r&&(r.toasts=r.toasts.filter(e=>e.ghost))}static removeItemsByStatus(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:r},"*");return}const e=ie.getInstance();e&&(e.toasts=e.toasts.filter(t=>t.status!==r))}static removeItemById(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:r},"*");return}const e=ie.getInstance();e&&(e.toasts=e.toasts.filter(t=>t.id!==r))}static removeTemporaryItems(){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const r=ie.getInstance();r&&(r.toasts=r.toasts.filter(e=>e.preserve))}static getInstance(){return ie.instance||(ie.instance=document.createElement("sonic-toast"),vt.getPopContainer().prepend(ie.instance)),ie.instance}static add(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:r},"*");return}const e=ie.getInstance(),t=r.id??new Date().valueOf(),s=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof r.text=="string"&&s.test(r.text),a={id:t,text:r.text,label:li(r),status:r.status,preserve:n?!0:r.preserve,ghost:r.ghost,dismissForever:r.dismissForever,styleSheet:r.styleSheet,useSlot:r.useSlot};if(r.dismissForever&&r.id&&si(r.id))return null;if(e?.toasts.length){const o={...a};for(const h of e.toasts){const d={...h};if(o.id=d.id=0,lt.shallowEqual(o,d))return null}}return e&&(e.toasts=[...e.toasts,a]),a}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const r=ie.getInstance();window.parent.postMessage({type:"addToasts",toasts:r.toasts},"*"),r.toasts=[]}static removeItem(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:r},"*");return}const e=ie.getInstance();e&&e.removeItem(r)}removeItem(r){r&&(this.toasts=this.toasts.filter(e=>(e={...e},delete e.id,!lt.shallowEqual(e,r,!1))))}};ie.delegateToasts=!1,oi([O({type:Array})],ie.prototype,"toasts",2),ie=oi([at(il)],ie),typeof window<"u"&&(window[_r+"Toast"]=window[_r+"Toast"]||ie);function ol(){const r=t=>{t.data.type=="querySonicToastAvailability"&&t.source.postMessage({type:"sonicToastAvailable"},"*"),t.data.type=="removeItemsByStatus"&&ie.removeItemsByStatus(t.data.status),t.data.type=="removeItemById"&&ie.removeItemById(t.data.id),t.data.type=="removeTemporaryItems"&&ie.removeTemporaryItems(),t.data.type=="sonicToastAvailable"&&(ie.delegateToasts=!0,ie.handleExistingToastDelegation()),t.data.type=="addToasts"&&(ie.getInstance().toasts=[...ie.getInstance().toasts,...t.data.toasts]),t.data.type=="removeAllToasts"&&ie.removeAll(),t.data.type=="removeToast"&&ie.removeItem(t.data.toast),t.data.type=="addToast"&&ie.add(t.data.toast)},e=window.parent!=window;if(window.addEventListener("message",r,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const t of document.querySelectorAll("iframe"))t.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}ol();var al=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,Ts=(r,e,t,s)=>{for(var n=s>1?void 0:s?ll(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&al(e,t,n),n};const cl=new Set,ul=new Set,hl=r=>{for(const e of ul)e(r)},zr=new Set;let qr=0;vn(async()=>{qr++;const r=qr,e=Array.from(zr);for(;e.length>0;){if(r!=qr)return;const t=e.splice(0,4);await Promise.all(t.map(s=>s.refetch()))}});const fl=(r,e)=>{class t extends r{constructor(...n){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.noErrorsRecordings=!1,this.requestId=0,this.refetchEveryMs=0,this._isFetching=!1,this._mustRefetch=!1,this.dataProvider=""}get props(){return super.props}set props(n){super.props=n}set endPoint(n){this._endPoint=n,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}refetch(){return this._fetchData()}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new ws(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await De.getInstance().isLocalStrorageReady,!this.isConnected))return;const n=De.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,lt.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}),this.handleStartFetching()==="fetching")return;let o=null;try{o=await this.api.get(this.endPoint||this.dataProvider||"",n)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||cl.add(this),hl(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&ie.add({text:"Network Error",status:"error"});else{this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs));return}if(this.key){const h=o._sonic_http_response_,d=this.key.split(".");o=lt.traverse(o,d,this.hasAttribute("preserveOtherKeys")),o&&lt.isObject(o)&&h&&(o._sonic_http_response_=h)}this.props=o,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs))}}disconnectedCallback(){super.disconnectedCallback(),zr.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),zr.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const n=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),a={root:null,rootMargin:Math.max(window.innerWidth*n,window.innerHeight*n)+"px",threshold:.9};this.iObserver=new IntersectionObserver(d=>this.onIntersection(d),a);let h=[...(this.shadowRoot?this.shadowRoot:this).children].filter(d=>d.nodeName.toLowerCase()!="style")[0];if(h?.nodeName.toLocaleLowerCase()=="slot"&&(h=[...h.children].filter(d=>d.nodeName.toLowerCase()!="style")[0]),!h||h.nodeName.toLocaleLowerCase()=="template"){h=document.createElement("div");const d=h.style;d.pointerEvents="none",d.width="1px",d.height="1px",this.lazyLoadPlaceHolder=h,this.appendChild(h)}h?this.iObserver.observe(h):this.isFirstLoad&&this._fetchData()}onIntersection(n){for(const a of n)if(a.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return Ts([O()],t.prototype,"noErrorsRecordings",2),Ts([O()],t.prototype,"props",1),Ts([O({type:String})],t.prototype,"endPoint",1),Ts([O()],t.prototype,"requestId",2),Ts([O({type:Number})],t.prototype,"refetchEveryMs",2),t};var dl=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,Xt=(r,e,t,s)=>{for(var n=s>1?void 0:s?pl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&dl(e,t,n),n};const gl=r=>{class e extends r{constructor(...s){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const s=this.shadowRoot?.querySelector("input");if(!s||s.checkValidity())return;const n=this.getFormPublisher();n&&(n.isFormValid=!1),s.reportValidity()}set type(s){this.hasAttribute("type")&&!this.forceAutoFill&&(s=this.getAttribute("type")),this._type=s,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(s){this.hasAttribute("description")&&!this.forceAutoFill&&(s=this.getAttribute("description")),this._description=s,this.requestUpdate()}get label(){return this._label}set label(s){this.hasAttribute("label")&&!this.forceAutoFill&&(s=this.getAttribute("label")),this._label=s,this.requestUpdate()}}return Xt([O()],e.prototype,"forceAutoFill",2),Xt([O({type:String})],e.prototype,"type",1),Xt([O()],e.prototype,"description",1),Xt([O()],e.prototype,"label",1),Xt([O({type:String,reflect:!0})],e.prototype,"status",2),Xt([O({type:Number})],e.prototype,"tabindex",2),Xt([O({type:String})],e.prototype,"autocomplete",2),e},Br=new Map,ci=r=>{if(!r)return null;const e=Be.getApiConfiguration(r),t=Be.getAncestorAttributeValue(r,"wordingProvider"),s=Be.getAncestorAttributeValue(r,"wordingVersionProvider"),n={apiConfiguration:e,wordingProvider:t,wordingVersionProvider:s};let a=null;for(const[o,h]of Br)if(lt.deepEqual(o,n)){a=h;break}return a||(a={api:new ws(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:t,callIndex:0,wordingVersionProvider:s,apiCallKey:n},Br.set(n,a)),a},ui="",Ee=class Ee extends zn{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=t=>{const s=this.useUnsafeHTML?Jt(t):t;this.setValue(s)},this.node=e.options.host}unsubscribe(){Ee.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,t=!1){return this.useUnsafeHTML=t,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),bt}static async callApi(e,t,s=!0,n){if(await De.getInstance().isLocalStrorageReady,Ee.firstCall){Ee.firstCall=!1,vn(Ee.reloadWordings);const $=Object.keys(Ee.publisher.get());for(const k of $)Ee.publisher.get()[k]===ui&&delete Ee.publisher[k]}if(e){const $=Be.getAncestorAttributeValue(e,"wordingVersionProvider");$&&_n($).onAssign(Ee.handleVersionProvider(e))}let a=Ee.publisher.get()["wording_"+t]!=null;const o=n||ci(e);if(!o)return;if(a&&t!==""){o.translatedKeys.add(t);return}o.callIndex++;const h=o.callIndex,d=o.wordingProvider??"";if(!d&&s){window.setTimeout(async()=>{Ee.callApi(null,t,!1,o)},1e3);return}const C=o.api;window.queueMicrotask(async()=>{if(a=Ee.publisher["wording_"+t].get()!=null,!a&&t!==""&&(o.keysToTranslate.add(t),Ee.publisher["wording_"+t].set(ui)),h!==o.callIndex)return;const $=Array.from(o.keysToTranslate);if(!$.length)return;const k=d.split("?"),w=k.shift(),E=(k.length>0?k.join("?")+"&":"")+"labels[]="+$.join("&labels[]="),L=w+"?"+E;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const R=await C.get(L);for(const X in R)Ee.publisher["wording_"+X].set(R[X])})}static reloadWordings(){for(const e of Br.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&Ee.callApi(null,"",!1,e)}static handleVersionProvider(e){const t=ci(e),s=a=>{};if(!t)return s;if(Ee.versionProviderHandlers.has(t))return Ee.versionProviderHandlers.get(t)||s;const n=function(a){if(!t.wordingVersionProvider)return;const h=Ee.publisher.get().__wording_versions__??[];if(a==null)return;const d=h.find(C=>C.serviceURL===t.api.serviceURL)||{serviceURL:t.api.serviceURL,version:0};h.includes(d)||h.push(d),a!==d.version&&(d.version=a,Ee.publisher.set({__wording_versions__:h}),Ee.reloadWordings())};return Ee.versionProviderHandlers.set(t,n),n}subscribe(e){this.unsubscribe(),Ee.publisher["wording_"+e].onAssign(this.onAssign),Ee.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};Ee.publisher=De.get("sonic-wording",{localStorageMode:"enabled"}),Ee.firstCall=!0,Ee.versionProviderHandlers=new Map;let $s=Ee;var vl=Object.defineProperty,ml=Object.getOwnPropertyDescriptor,_t=(r,e,t,s)=>{for(var n=s>1?void 0:s?ml(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&vl(e,t,n),n};let tr=!1,Hr=new Set;const yl=(r,e)=>{var n;const t=(n=class extends r{constructor(...o){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.shouldRenderLazy=!0,this.defferedDebug=null,this.debug=null,this.onAssign=h=>{this.props=h}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return Be.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){if(typeof o=="string"&&["{","["].includes(o.trim().charAt(0)))try{o=JSON.parse(o)}catch{}o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const d=[...(this.shadowRoot||this).children].filter($=>$.tagName!="STYLE"),C=this.displayContents?"contents":d.length==0?"none":null;C?this.style.display=C:this.style.removeProperty("display")}connectedCallback(){if(n.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let h=!0;const d=new IntersectionObserver(C=>{for(const $ of C)if(h&&$.isIntersecting){h=!1,d.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);d.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),$s.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const o=this.debug.style;o.position="fixed",o.top="0",o.right="0",o.margin="auto",o.borderRadius=".7rem",o.backgroundColor="#0f1729",o.color="#c5d4f9",o.padding="16px 16px",o.margin="16px 16px",o.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",o.overflowY="auto",o.zIndex="99999999",o.maxHeight="calc(100vh - 32px)",o.fontFamily="Consolas, monospace",o.maxWidth="min(50vw,25rem)",o.fontSize="12px",o.minWidth="300px",o.overflowWrap="break-word",o.resize="vertical"}this.addEventListener("click",o=>{o.ctrlKey&&(o.preventDefault(),tr=!tr)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{tr||this.removeDebugger(),document.body.appendChild(this.debug),Hr.add(this.debug)}),this.addEventListener("mouseout",()=>{tr||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
1145
1140
  <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">
1146
1141
  Variable disponible dans la console<br>
1147
1142
  ctrl + Clique : épingler / désépingler
1148
1143
  </div>
1149
- <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Hr.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Hr=new Set}getApiConfiguration(){return Be.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const h of o)h.indexOf("wording_")==0&&$s.callApi(this,h.substring(8));$s.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return Ys.observe(o),o}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const o=De.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let h=this.dataProvider;if(!h&&this._props&&(this.dataProvider=h="__subscriber__"+n.instanceCounter),h){this.bindPublisher&&o.set(h,this.bindPublisher());let d=o.get(h,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=h,this.hasAttribute("subDataProvider")){const C=this.getAttribute("subDataProvider");this.dataProvider=h+"/"+C,d=lt.traverse(d,C.split(".")),o.set(this.dataProvider,d),this.publisher=d}this.publisher=d}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},n.instanceCounter=0,n);return _t([L({type:Number})],t.prototype,"collectDependenciesVersion",2),_t([L({type:Boolean})],t.prototype,"displayContents",2),_t([L({type:Boolean})],t.prototype,"noAutoFill",2),_t([L({type:Boolean})],t.prototype,"forceAutoFill",2),_t([L({type:Object})],t.prototype,"propertyMap",2),_t([L({type:String,attribute:"data-title"})],t.prototype,"title",2),_t([L({reflect:!0})],t.prototype,"dataProvider",2),_t([L()],t.prototype,"bindPublisher",2),_t([L()],t.prototype,"props",1),_t([ft()],t.prototype,"shouldRenderLazy",2),t};var bl=Object.defineProperty,wl=(r,e,t,s)=>{for(var n=void 0,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=o(e,t,n)||n);return n&&bl(e,t,n),n};const _l=r=>{class e extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const s=this.templates||[...this.querySelectorAll("template")];for(const n of s)n.hasAttribute(this.templateValueAttribute)&&(this.templateParts[n.getAttribute(this.templateValueAttribute)]=n,this.templatePartsList.push(n)),n.hasAttribute("skeleton")&&(this.templateParts.skeleton=n),n.hasAttribute("no-result")&&(this.templateParts["no-result"]=n),n.hasAttribute("no-item")&&(this.templateParts["no-item"]=n);this.templateList=s.filter(n=>!n.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=s),super.connectedCallback()}}return wl([L({type:Array})],e.prototype,"templates"),e},Al=fl,kl=In,Sl=Cn,xl=gl,hi=yl,Cl=_l;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Al,FormCheckable:kl,FormElement:Sl,FormInput:xl,Subscriber:hi,TemplatesContainer:Cl};var El=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,At=(r,e,t,s)=>{for(var n=s>1?void 0:s?Pl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&El(e,t,n),n};const Tl="sonic-matrix";function Vr(r,e){if(!e)return r;let t=r;for(const s of e.split(".").filter(Boolean)){if(t==null)return;t=t[s]}return t}let ct=class extends hi(We){constructor(){super(...arguments),this.key="grid",this.cols=0,this.palette={0:"transparent",1:"#00f0f0",2:"#0000f0",3:"#f0a000",4:"#f0f000",5:"#00f000",6:"#a000f0",7:"#f00000"},this.cell="24",this.gap=1,this.radius=2,this.ghostKey="",this.labelKey="",this.lastSig=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","img")}updated(){this.draw()}readGrid(){const r=this.props,e=r?Vr(r,this.key):void 0;if(Array.isArray(e)&&Array.isArray(e[0]))return e;if(Array.isArray(e)&&this.cols>0){const t=e,s=[];for(let n=0;n<t.length;n+=this.cols)s.push(t.slice(n,n+this.cols).map(a=>Number(a)||0));return s}return[]}readGhost(){if(!this.ghostKey)return null;const r=this.props,e=r?Vr(r,this.ghostKey):void 0;return Array.isArray(e)&&Array.isArray(e[0])?e:null}colorFor(r,e=!1){const t=this.palette?.[String(r)]??this.palette?.[r]??"#888";return!e||t==="transparent"||t.startsWith("var(")?t:`${t}66`}draw(){const r=this.readGrid(),e=this.readGhost(),t=r.length,s=t?r[0].length:0;if(!s||!t||!this.canvas)return;const n=JSON.stringify({grid:r,ghost:e,palette:this.palette,cell:this.cell,gap:this.gap});if(n===this.lastSig)return;this.lastSig=n;const a=this.clientWidth||s*24,o=this.cell==="auto"?Math.max(1,Math.floor(a/s)):Math.max(1,Number(this.cell)||24),h=Math.max(0,this.gap),d=Math.min(2,window.devicePixelRatio||1),C=s*o,$=t*o;this.canvas.width=Math.floor(C*d),this.canvas.height=Math.floor($*d),this.canvas.style.width=`${C}px`,this.canvas.style.height=`${$}px`;const k=this.canvas.getContext("2d");if(!k)return;k.setTransform(d,0,0,d,0,0),k.clearRect(0,0,C,$);const w=(E,O)=>{for(let R=0;R<E.length;R++){const X=E[R];for(let Z=0;Z<X.length;Z++){const A=Number(X[Z])||0;if(!A&&!O||!A)continue;k.fillStyle=this.colorFor(A,O);const m=Z*o+h,M=R*o+h,_=o-h*2;if(this.radius>0){const T=Math.min(this.radius,_/2);k.beginPath(),k.roundRect(m,M,_,_,T),k.fill()}else k.fillRect(m,M,_,_)}}};if(e&&w(e,!0),w(r,!1),this.labelKey){const E=this.props,O=E?Vr(E,this.labelKey):void 0;O!=null&&this.setAttribute("aria-label",String(O))}}render(){return qe`<canvas></canvas>`}};ct.styles=je`
1144
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Hr.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Hr=new Set}getApiConfiguration(){return Be.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const h of o)h.indexOf("wording_")==0&&$s.callApi(this,h.substring(8));$s.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return Ys.observe(o),o}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const o=De.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let h=this.dataProvider;if(!h&&this._props&&(this.dataProvider=h="__subscriber__"+n.instanceCounter),h){this.bindPublisher&&o.set(h,this.bindPublisher());let d=o.get(h,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=h,this.hasAttribute("subDataProvider")){const C=this.getAttribute("subDataProvider");this.dataProvider=h+"/"+C,d=lt.traverse(d,C.split(".")),o.set(this.dataProvider,d),this.publisher=d}this.publisher=d}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},n.instanceCounter=0,n);return _t([O({type:Number})],t.prototype,"collectDependenciesVersion",2),_t([O({type:Boolean})],t.prototype,"displayContents",2),_t([O({type:Boolean})],t.prototype,"noAutoFill",2),_t([O({type:Boolean})],t.prototype,"forceAutoFill",2),_t([O({type:Object})],t.prototype,"propertyMap",2),_t([O({type:String,attribute:"data-title"})],t.prototype,"title",2),_t([O({reflect:!0})],t.prototype,"dataProvider",2),_t([O()],t.prototype,"bindPublisher",2),_t([O()],t.prototype,"props",1),_t([ft()],t.prototype,"shouldRenderLazy",2),t};var bl=Object.defineProperty,wl=(r,e,t,s)=>{for(var n=void 0,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=o(e,t,n)||n);return n&&bl(e,t,n),n};const _l=r=>{class e extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const s=this.templates||[...this.querySelectorAll("template")];for(const n of s)n.hasAttribute(this.templateValueAttribute)&&(this.templateParts[n.getAttribute(this.templateValueAttribute)]=n,this.templatePartsList.push(n)),n.hasAttribute("skeleton")&&(this.templateParts.skeleton=n),n.hasAttribute("no-result")&&(this.templateParts["no-result"]=n),n.hasAttribute("no-item")&&(this.templateParts["no-item"]=n);this.templateList=s.filter(n=>!n.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=s),super.connectedCallback()}}return wl([O({type:Array})],e.prototype,"templates"),e},Al=fl,kl=In,Sl=Cn,xl=gl,hi=yl,Cl=_l;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Al,FormCheckable:kl,FormElement:Sl,FormInput:xl,Subscriber:hi,TemplatesContainer:Cl};var El=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,At=(r,e,t,s)=>{for(var n=s>1?void 0:s?Pl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&El(e,t,n),n};const Tl="sonic-matrix";function Vr(r,e){if(!e)return r;let t=r;for(const s of e.split(".").filter(Boolean)){if(t==null)return;t=t[s]}return t}let ct=class extends hi(We){constructor(){super(...arguments),this.key="grid",this.cols=0,this.palette={0:"transparent",1:"#00f0f0",2:"#0000f0",3:"#f0a000",4:"#f0f000",5:"#00f000",6:"#a000f0",7:"#f00000"},this.cell="24",this.gap=1,this.radius=2,this.ghostKey="",this.labelKey="",this.lastSig=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","img")}updated(){this.draw()}readGrid(){const r=this.props,e=r?Vr(r,this.key):void 0;if(Array.isArray(e)&&Array.isArray(e[0]))return e;if(Array.isArray(e)&&this.cols>0){const t=e,s=[];for(let n=0;n<t.length;n+=this.cols)s.push(t.slice(n,n+this.cols).map(a=>Number(a)||0));return s}return[]}readGhost(){if(!this.ghostKey)return null;const r=this.props,e=r?Vr(r,this.ghostKey):void 0;return Array.isArray(e)&&Array.isArray(e[0])?e:null}colorFor(r,e=!1){const t=this.palette?.[String(r)]??this.palette?.[r]??"#888";return!e||t==="transparent"||t.startsWith("var(")?t:`${t}66`}draw(){const r=this.readGrid(),e=this.readGhost(),t=r.length,s=t?r[0].length:0;if(!s||!t||!this.canvas)return;const n=JSON.stringify({grid:r,ghost:e,palette:this.palette,cell:this.cell,gap:this.gap});if(n===this.lastSig)return;this.lastSig=n;const a=this.clientWidth||s*24,o=this.cell==="auto"?Math.max(1,Math.floor(a/s)):Math.max(1,Number(this.cell)||24),h=Math.max(0,this.gap),d=Math.min(2,window.devicePixelRatio||1),C=s*o,$=t*o;this.canvas.width=Math.floor(C*d),this.canvas.height=Math.floor($*d),this.canvas.style.width=`${C}px`,this.canvas.style.height=`${$}px`;const k=this.canvas.getContext("2d");if(!k)return;k.setTransform(d,0,0,d,0,0),k.clearRect(0,0,C,$);const w=(E,L)=>{for(let R=0;R<E.length;R++){const X=E[R];for(let Z=0;Z<X.length;Z++){const A=Number(X[Z])||0;if(!A&&!L||!A)continue;k.fillStyle=this.colorFor(A,L);const m=Z*o+h,M=R*o+h,_=o-h*2;if(this.radius>0){const T=Math.min(this.radius,_/2);k.beginPath(),k.roundRect(m,M,_,_,T),k.fill()}else k.fillRect(m,M,_,_)}}};if(e&&w(e,!0),w(r,!1),this.labelKey){const E=this.props,L=E?Vr(E,this.labelKey):void 0;L!=null&&this.setAttribute("aria-label",String(L))}}render(){return qe`<canvas></canvas>`}};ct.styles=je`
1150
1145
  :host {
1151
1146
  display: block;
1152
1147
  width: 100%;
@@ -1159,4 +1154,4 @@
1159
1154
  height: auto;
1160
1155
  image-rendering: pixelated;
1161
1156
  }
1162
- `,At([L({type:String})],ct.prototype,"key",2),At([L({type:Number})],ct.prototype,"cols",2),At([L({type:Object})],ct.prototype,"palette",2),At([L({type:String})],ct.prototype,"cell",2),At([L({type:Number})],ct.prototype,"gap",2),At([L({type:Number})],ct.prototype,"radius",2),At([L({type:String,attribute:"ghost-key"})],ct.prototype,"ghostKey",2),At([L({type:String,attribute:"label-key"})],ct.prototype,"labelKey",2),At([qi("canvas")],ct.prototype,"canvas",2),ct=At([at(Tl)],ct)})();
1157
+ `,At([O({type:String})],ct.prototype,"key",2),At([O({type:Number})],ct.prototype,"cols",2),At([O({type:Object})],ct.prototype,"palette",2),At([O({type:String})],ct.prototype,"cell",2),At([O({type:Number})],ct.prototype,"gap",2),At([O({type:Number})],ct.prototype,"radius",2),At([O({type:String,attribute:"ghost-key"})],ct.prototype,"ghostKey",2),At([O({type:String,attribute:"label-key"})],ct.prototype,"labelKey",2),At([qi("canvas")],ct.prototype,"canvas",2),ct=At([at(Tl)],ct)})();