@supersoniks/concorde 5.1.3-immutable.1 → 5.1.3-immutable.2

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.
@@ -1,4 +1,4 @@
1
- (function(ze){typeof define=="function"&&define.amd?define(ze):ze()})((function(){"use strict";var Te,st;let ze=class kt{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const r=s.indexOf("=");return e[s.substring(0,r).trim()]=s.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,s){for(;e;){if(!s(e))return;e=e.parentNode||e.host}}static overflowMatches(e,s){return s.includes(e.overflowY)||s.includes(e.overflowX)}static findAncestorByOverflow(e,s){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(kt.overflowMatches(i,s))return r}r=kt.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return kt.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return kt.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const r of kt.scopeAttributeNames(s))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const n=kt.readScopeAttributeOnElement(r,s);if(n!=null)return n}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const s=kt.getAncestorAttributeValue(e,"token"),r=kt.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=kt.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const l=kt.getAncestorAttributeValue(e,"tokenProvider"),h=kt.getAncestorAttributeValue(e,"eventsApiToken");s||(n=kt.getAncestorAttributeValue(e,"userName"),o=kt.getAncestorAttributeValue(e,"password"));const g=kt.getAncestorAttributeValue(e,"credentials")||void 0,x=e.getAttribute("cache"),m=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:i,token:s,userName:n,password:o,authToken:h,tokenProvider:l,addHTTPResponse:r,credentials:g,cache:x,blockUntilDone:m,keepAlive:f}}static getClosestElement(e,s){for(;!(e.nodeName&&e.nodeName.toLowerCase()===s)&&(e.parentNode||e.host);)e=e.parentNode||e.host;return e.nodeName?e:null}static getClosestForm(e){return kt.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const r=new Set(s.map(o=>o.toLowerCase())),i=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&r.has(n.tagName.toLowerCase())&&i.push(n),n=n.parentNode||n.host;return i}static getAncestorsBySelectors(e,s){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const n of s)try{if(i.matches(n)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){return new Promise(async r=>{const i=document.createElement("script");i.src=e,i.onload=()=>r(!0),i.onerror=()=>r(!0),document.head.appendChild(i)})}static async loadCSS(e){return new Promise(async r=>{const i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href=e,i.onload=()=>r(!0),i.onerror=()=>r(!0),document.head.appendChild(i)})}};const yn=t=>{const e=document.documentElement,s=new MutationObserver(i=>{for(let n of i)n.type==="attributes"&&n.attributeName==="lang"&&t()}),r={attributes:!0,attributeFilter:["lang"]};s.observe(e,r)};let zr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",r="long"){s||(s=ze.getLanguage());const i=(g,x)=>[Math.floor(g/x),g%x];function n(g,x,m){return new Intl.NumberFormat(g,{style:"unit",unit:x,unitDisplay:m}).format}const[o,l]=i(e,60),h=[];return o&&h.push(n(s,"hour",r)(o)),l&&h.push(n(s,"minute",r)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(h)}static js(e){try{return Function("return "+e)()}catch{return""}}};class Io{constructor(e){this.path=e}toString(){return this.path}}function Mo(t){return new Proxy(t,{get(e,s){if(s==="path")return e.path;if(s==="toString")return e.toString.bind(e);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return e[s];const r=e.path?`${e.path}.${String(s)}`:String(s);return Mo(new Io(r))}})}const ic=/\$\{|\{\$/;function nc(t){return ic.test(t)}function yi(t){const e=typeof t=="string"?t:t.path;if(nc(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Cs=function(t){return this instanceof Cs?Mo(new Io(t)):new Cs(t)},No=new WeakSet;function oc(t){return t!=null&&typeof t=="object"&&Object.isFrozen(t)}function Vs(t){if(t==null||typeof t!="object"||Object.isFrozen(t))return t;if(Object.freeze(t),Array.isArray(t))for(const e of t)Vs(e);else for(const e of Reflect.ownKeys(t))Vs(t[e]);return t}function Fo(t){if(t==null||typeof t!="object"||oc(t))return t;try{return Vs(structuredClone(t))}catch{return No.has(t)||(No.add(t),console.warn("[Concorde] takeOwnership: value is not structuredClone-able; stored without freeze.")),t}}function ac(t){if(t==null||typeof t!="object"||Array.isArray(t)||Object.prototype.hasOwnProperty.call(t,"__value")||Object.isFrozen(t))return t;let e=!1;for(const r of Object.keys(t))if(t[r]===void 0){e=!0;break}if(!e)return t;const s={...t};for(const r of Object.keys(s))s[r]===void 0&&delete s[r];return s}function lc(t,e,s){let r;return t==null?r=typeof e=="number"||!isNaN(Number(e))?[]:{}:Array.isArray(t)?r=[...t]:r={...t},r[e]=s,Vs(r)}function cc(t,e){if(Array.isArray(t)){const r=[...t];return delete r[e],Vs(r)}const s={...t};return delete s[String(e)],Vs(s)}let ut=class As{static shallowEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const l=e[o],h=s[o];if(r?l!==h:l!=h)return!1}return!0}static deepEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const l=e[o],h=s[o],g=As.isObject(l)&&As.isObject(h),x=r?l!==h:l!=h;if(g&&!As.deepEqual(l,h)||!g&&x)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return As.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,r=!1){for(const i of s){const n=e[i];if(n===void 0)return;r&&As.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[i]}return e}static traverseDotNotation(e,s,r=!1){return As.traverse(e,s.split("."),r)}static getURLSearchArray(e,s=""){let r=[];for(let i in e){const n=e[i];s&&(i=s+"["+i+"]"),As.isObject(n)?r=[...r,...this.getURLSearchArray(n,i)]:r.push(`${i}=${n}`)}return r}static getURLSearchString(e){return As.getURLSearchArray(e,"").join("&")}};const Ot=ut.traverseDotNotation;let Ro="off";const jo=new Set,zo=new WeakMap;function pr(){return Ro}function uc(t){Ro=t}function wn(t,e){const s=`[Concorde strictGet=${t}] Mutation via get() at "${e||"(root)"}". Use set() / dp(…).set(…) instead.`;if(t==="throw")throw new TypeError(s);jo.has(e)||(jo.add(e),console.warn(s))}function Uo(t,e){const s=zo.get(t);if(s)return s;const r=new Proxy(t,{get(i,n,o){if(n==="__strictGetTarget__")return t;const l=Reflect.get(i,n,o);if(l==null||typeof l!="object"||pr()==="off")return l;const h=e===""?String(n):`${e}.${String(n)}`;return Uo(l,h)},set(i,n,o,l){const h=pr();if(h==="off")return Reflect.set(i,n,o,l);const g=e===""?String(n):`${e}.${String(n)}`;return wn(h,g),h==="throw"?!1:Reflect.set(i,n,o,l)},deleteProperty(i,n){const o=pr();if(o==="off")return Reflect.deleteProperty(i,n);const l=e===""?String(n):`${e}.${String(n)}`;return wn(o,l),o==="throw"?!1:Reflect.deleteProperty(i,n)},defineProperty(i,n,o){const l=pr();if(l==="off")return Reflect.defineProperty(i,n,o);const h=e===""?String(n):`${e}.${String(n)}`;return wn(l,h),l==="throw"?!1:Reflect.defineProperty(i,n,o)}});return zo.set(t,r),r}function hc(t){return pr()==="off"||t==null||typeof t!="object"?t:Uo(t,"")}let dc=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},qo="sonic";typeof __SONIC_PREFIX__<"u"&&(qo=__SONIC_PREFIX__);let Bo=qo.replace(/-([a-z])/g,t=>t[1].toUpperCase());const wi=Bo.charAt(0).toUpperCase()+Bo.slice(1),pc=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function Ho(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>pc.has(e))}function fr(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function ks(t){return typeof t=="object"&&t!==null}let mr="sonic";typeof __SONIC_PREFIX__>"u"&&(mr="sonic");const _n=mr=="sonic"?"publisher-proxies-data":mr+"-publisher-proxies-data",qs=class qs{constructor(e,s,r){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_=Fo(e),this.parent=s||null,this._parentKey_=r,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(),qs.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(s=>s()),this._is_savable_&&!ve.changed){ve.changed=!0,ve.saveId++;const s=ve.saveId;setTimeout(()=>ve.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(r=>{r[e]!==s&&(r[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==s&&(r[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&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 s in this._value_){let r=s;const i=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(r=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const r=this._value_[s];e[s]!==r&&(e[s]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1,r=!1){const i=ks(e)?e:{__value:e},n=ac(i),o=r?Vs(n):Fo(n);if(this._value_===o||ks(this._value_)&&ks(o)&&o&&fr(this._value_)&&fr(o)&&this._value_.__value===o.__value||!ks(e)&&e===this._value_.__value)return!0;this._value_=o,this._cachedGet_=void 0;const l=fr(this._value_);if(this._parentKey_&&this.parent&&!s&&this._syncOwnedValueIntoParent_(s),l)return this._proxies_.forEach((h,g)=>{g!="_parent_"&&(h.set(null,!0,!0),this._publishDynamicFilling_(g,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;if(this._proxies_.forEach((h,g)=>{const x=this._value_[g];g!="_parent_"&&x===void 0&&x!==null&&isNaN(Number(g))&&(h.set(null,!0,!0),this._publishDynamicFilling_(g,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ks(this._value_))for(const h in this._value_){const g=this._value_[h],m=ks(g)?g:{__value:g};if(!this._proxies_.has(h)){this._publishDynamicFilling_(h,g);continue}this._proxies_.get(h)?.set(m,!0,!0),this._publishDynamicFilling_(h,g)}return!0}_syncOwnedValueIntoParent_(e=!1){if(!this.parent||this._parentKey_==null)return;const s=fr(this._value_)?this._value_.__value:this._value_,r=this.parent._value_;if(r==null||r===void 0||fr(r)&&r.__value==null){if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:s},e);else{const l=[];l[Number(this._parentKey_)]=s,this.parent.set(l,e)}return}if(r[this._parentKey_]===s)return;const o=lc(r,this._parentKey_,s);this.parent.set(o,e,!0)}get(){fc(this);let e;if(this._cachedGet_!==void 0)e=this._cachedGet_;else if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const s=this._value_.__value;e=this._cachedGet_=s??null}else e=this._cachedGet_=this._value_!=null?this._value_:null;return hc(e)}get $tag(){return this._instanceCounter_||(qs.instancesCounter++,this._instanceCounter_=qs.instancesCounter),qs.instances.set(this._instanceCounter_,this),"<"+mr+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+mr+"-publisher-proxy>"}};qs.instances=new Map,qs.instancesCounter=0;let Ur=qs;const _i=[];function fc(t){_i.length>0&&_i[0].add(t)}function Vo(){_i.unshift(new Set)}function Wo(){return _i.shift()}const Ie=class Ie{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Ie.instance!=null)throw"Singleton / use getInstance";Ie.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Ie.initPageShowHandler()}static get strictGet(){return pr()}static set strictGet(e){uc(e)}static initPageShowHandler(){Ie.pageShowHandlerInitialized||(Ie.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Ie.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(_n),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(_n,r),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const l=this.localStorageData[o],h=new Date().getTime()-(l.expirationDelayMs||n);l.lastModifiationMS<h&&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 s=Ie.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Ie)}return Ie.instance==null?new Ie:Ie.instance}static get(e,s){return Ie.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+ze.getLanguage()]?.data||e.get())}get(e,s){const r=s?.localStorageMode==="enabled",i=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const l=Sn({});this.set(e,l)}const n=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),i&&(n._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==Ie.saveId&&e%10!=0))try{if(!Ie.changed||Ie.saving)return;Ie.saving=!0,Ie.changed=!1;const s=Array.from(this.publishers.keys());let r=!1;for(const i of s){const n=this.publishers.get(i);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[i+"¤lang_"+ze.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(_n,i)}if(Ie.saving=!1,Ie.changed){Ie.saveId++;const i=Ie.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{Ie.saving=!1}}async compress(e,s){const r=new TextEncoder().encode(e),i=window,n=new i.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const l=await new Response(n.readable).arrayBuffer(),h=new Uint8Array(l);let g="";for(let x=0;x<h.length;x++)g+=String.fromCharCode(h[x]);return btoa(g)}async decompress(e,s){const r=atob(e),n=Uint8Array.from(r,x=>x.charCodeAt(0)).buffer,o=window,l=new o.DecompressionStream(s),h=l.writable.getWriter();h.write(n),h.close();const g=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(g)}};Ie.buildDate="Thu Oct 29 2026 22:35:30 GMT+0100 (Central European Standard Time)",Ie.changed=!1,Ie.saving=!1,Ie.saveId=0,Ie.instance=null,Ie.instances=new Map,Ie.pageShowHandlerInitialized=!1;let ve=Ie;if(typeof window<"u"){const t=window;t[wi+"PublisherManager"]=t[wi+"PublisherManager"]||ve}const mc=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_","_syncOwnedValueIntoParent_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function gc(t,e){return{get:function(s,r){if(typeof r=="string"&&mc.has(r))return t[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(r)){const i=t._value_[r],n=Sn(ks(i)?i:{__value:i},t,r);n._proxies_.set("_parent_",e()),t._proxies_.set(r,n)}return t._proxies_.get(r)},set:function(s,r,i){if(r=="_value_")return t._value_=i,!0;if(r=="_cachedGet_")return t._cachedGet_=i,!0;if(r=="_assignmentId_")return t._assignmentId_=i,!0;if(r=="_is_savable_")return t._is_savable_=i,!0;if(r=="_expiration_delay_")return t._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return t._instanceCounter_=i,!0;if(!t._proxies_.has(r)){const o=Sn({},t,r);o._proxies_.set("_parent_",e()),t._proxies_.set(r,o)}if(t._value_?.[r]!==i){const o=ks(i)?i:{__value:i};t._proxies_.get(r)?.set(o),t._publishDynamicFilling_(r,i)}return!0},deleteProperty:function(s,r){if(t._publishDynamicFilling_(r,null),t._proxies_.get(r)?.set(null,!0,!0),t._value_!=null&&typeof t._value_=="object"&&!fr(t._value_)){const i=cc(t._value_,r);t.set(i,!1,!0)}return!0},has:function(s,r){return r in t._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(s,r,i){return i&&"value"in i&&(e()[r]=i.value),!0},getOwnPropertyDescriptor:function(s,r){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function Sn(t,e=null,s){const r=new Ur(t,e,s);let i=null;const n=gc(r,()=>i);return i=new Proxy(r,n),i}class bc extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ur.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(mr+"-publisher-proxy",bc)}catch{}const Si=(t,e)=>{if(typeof t=="function"){const s=t;return Vo(),s(),Wo()}if(typeof t=="string"){const s=t.split("."),r=s.shift()||"";let i=ve.get(r,e);i=ut.traverse(i,s);const n=new Set;return n.add(i),n}return new Set([t])};function vc(t){const e=yi(t);return Si(e).values().next().value?.get()}function Pi(t,e,s){const r=yi(t);return Si(r,s).values().next().value}function yc(t,e){return Ho(e)?Pi(t,void 0,e):Pi(t)}function xi(t,e){return Ho(e)?Pi(t,void 0,e):Pi(t)}function wc(t,e){const s=yi(t);Si(s).values().next().value?.set(e)}let Ai=(Te=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Te.observedElements.keys()).forEach(e=>Te.unObserve(e)))}static observe(e){if(!e||!Te.enabled||Te.observedElements.has(e))return;const s=new MutationObserver(Te.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>Te.addPublisherListeners(i)),Te.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>Te.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.addPublisherListeners(s)):e.childNodes.forEach(s=>Te.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.removePublisherListeners(s)):e.childNodes.forEach(s=>Te.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Te.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{Te.onAdded(r)}),s.removedNodes.forEach(r=>{Te.onRemoved(r)});break}}static removePublisherListeners(e){const s=Te.publisherListeners.get(e);s&&(Te.publisherListeners.delete(e),s.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[e],s=s.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:Te.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const r of s)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){Te.removePublisherListeners(e);const s=ze.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const r=ve.getInstance().get(s),i=Te.getDataBindItems(e),n=[];i.forEach(o=>{const l=o.bindedVariablesDescriptor,h=o.propertyToUpdate;for(const g of l.variables){const x=g;let m=r;m=Te.getSubPublisher(r,x);const f=e,C={publisher:m,onAssign:()=>{const E=l.variables.map(U=>Te.getSubPublisher(r,U)?.get());let T=l.expression,z=!1;if(E.length==1&&l.variables[0].join(".")==T.substring(1)){let U=E[0];U===null&&(U=""),f[h]=U;return}for(let U=0;U<E.length;U++){let S=E[U];const y=l.variables[U];S===null&&(z=!0,S=void 0),T=T.replace("$"+y.join("."),S)}if(T.indexOf("|")!=-1){const U=T.indexOf("|");if(U==0)T=zr.js(T.substring(1));else{const S=T.substring(0,U),y=T.substring(U+1),M=zr[S];T=z?"":M?M(y):T}}else T=z?"":T;f[h]=T}};m?.onAssign(C.onAssign),n.push(C)}}),Te.publisherListeners.set(e,n)}},Te.observedElements=new Map,Te.enabled=!0,Te.publisherListeners=new Map,Te);Ai.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ai);/**
1
+ (function(ze){typeof define=="function"&&define.amd?define(ze):ze()})((function(){"use strict";var Te,st;let ze=class kt{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const r=s.indexOf("=");return e[s.substring(0,r).trim()]=s.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,s){for(;e;){if(!s(e))return;e=e.parentNode||e.host}}static overflowMatches(e,s){return s.includes(e.overflowY)||s.includes(e.overflowX)}static findAncestorByOverflow(e,s){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(kt.overflowMatches(i,s))return r}r=kt.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return kt.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return kt.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const r of kt.scopeAttributeNames(s))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const n=kt.readScopeAttributeOnElement(r,s);if(n!=null)return n}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const s=kt.getAncestorAttributeValue(e,"token"),r=kt.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=kt.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const l=kt.getAncestorAttributeValue(e,"tokenProvider"),h=kt.getAncestorAttributeValue(e,"eventsApiToken");s||(n=kt.getAncestorAttributeValue(e,"userName"),o=kt.getAncestorAttributeValue(e,"password"));const g=kt.getAncestorAttributeValue(e,"credentials")||void 0,x=e.getAttribute("cache"),m=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:i,token:s,userName:n,password:o,authToken:h,tokenProvider:l,addHTTPResponse:r,credentials:g,cache:x,blockUntilDone:m,keepAlive:f}}static getClosestElement(e,s){for(;!(e.nodeName&&e.nodeName.toLowerCase()===s)&&(e.parentNode||e.host);)e=e.parentNode||e.host;return e.nodeName?e:null}static getClosestForm(e){return kt.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const r=new Set(s.map(o=>o.toLowerCase())),i=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&r.has(n.tagName.toLowerCase())&&i.push(n),n=n.parentNode||n.host;return i}static getAncestorsBySelectors(e,s){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const n of s)try{if(i.matches(n)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){return new Promise(async r=>{const i=document.createElement("script");i.src=e,i.onload=()=>r(!0),i.onerror=()=>r(!0),document.head.appendChild(i)})}static async loadCSS(e){return new Promise(async r=>{const i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href=e,i.onload=()=>r(!0),i.onerror=()=>r(!0),document.head.appendChild(i)})}};const vn=t=>{const e=document.documentElement,s=new MutationObserver(i=>{for(let n of i)n.type==="attributes"&&n.attributeName==="lang"&&t()}),r={attributes:!0,attributeFilter:["lang"]};s.observe(e,r)};let zr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",r="long"){s||(s=ze.getLanguage());const i=(g,x)=>[Math.floor(g/x),g%x];function n(g,x,m){return new Intl.NumberFormat(g,{style:"unit",unit:x,unitDisplay:m}).format}const[o,l]=i(e,60),h=[];return o&&h.push(n(s,"hour",r)(o)),l&&h.push(n(s,"minute",r)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(h)}static js(e){try{return Function("return "+e)()}catch{return""}}};class Mo{constructor(e){this.path=e}toString(){return this.path}}function No(t){return new Proxy(t,{get(e,s){if(s==="path")return e.path;if(s==="toString")return e.toString.bind(e);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return e[s];const r=e.path?`${e.path}.${String(s)}`:String(s);return No(new Mo(r))}})}const nc=/\$\{|\{\$/;function oc(t){return nc.test(t)}function vi(t){const e=typeof t=="string"?t:t.path;if(oc(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Cs=function(t){return this instanceof Cs?No(new Mo(t)):new Cs(t)};function ac(t){return t!=null&&typeof t=="object"&&Object.isFrozen(t)}function Fo(t){if(t==null||typeof t!="object")return!1;if(Array.isArray(t))return!0;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Vs(t){if(!Fo(t)||Object.isFrozen(t))return t;if(Object.freeze(t),Array.isArray(t))for(const e of t)Vs(e);else for(const e of Reflect.ownKeys(t))Vs(t[e]);return t}function Ro(t){if(t==null||typeof t!="object"||ac(t))return t;try{return Vs(structuredClone(t))}catch{return wn(t)}}function wn(t){if(!Fo(t)||Object.isFrozen(t))return t;const e=Array.isArray(t)?t.map(wn):Object.fromEntries(Object.entries(t).map(([s,r])=>[s,wn(r)]));return Object.freeze(e)}function lc(t){if(t==null||typeof t!="object"||Array.isArray(t)||Object.prototype.hasOwnProperty.call(t,"__value")||Object.isFrozen(t))return t;let e=!1;for(const r of Object.keys(t))if(t[r]===void 0){e=!0;break}if(!e)return t;const s={...t};for(const r of Object.keys(s))s[r]===void 0&&delete s[r];return s}function cc(t,e,s){let r;return t==null?r=typeof e=="number"||!isNaN(Number(e))?[]:{}:Array.isArray(t)?r=[...t]:r={...t},r[e]=s,Vs(r)}function uc(t,e){if(Array.isArray(t)){const r=[...t];return delete r[e],Vs(r)}const s={...t};return delete s[String(e)],Vs(s)}let ut=class As{static shallowEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const l=e[o],h=s[o];if(r?l!==h:l!=h)return!1}return!0}static deepEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const l=e[o],h=s[o],g=As.isObject(l)&&As.isObject(h),x=r?l!==h:l!=h;if(g&&!As.deepEqual(l,h)||!g&&x)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return As.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,r=!1){for(const i of s){const n=e[i];if(n===void 0)return;r&&As.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[i]}return e}static traverseDotNotation(e,s,r=!1){return As.traverse(e,s.split("."),r)}static getURLSearchArray(e,s=""){let r=[];for(let i in e){const n=e[i];s&&(i=s+"["+i+"]"),As.isObject(n)?r=[...r,...this.getURLSearchArray(n,i)]:r.push(`${i}=${n}`)}return r}static getURLSearchString(e){return As.getURLSearchArray(e,"").join("&")}};const Ot=ut.traverseDotNotation;let jo="off";const zo=new Set,Uo=new WeakMap;function pr(){return jo}function hc(t){jo=t}function _n(t,e){const s=`[Concorde strictGet=${t}] Mutation via get() at "${e||"(root)"}". Use set() / dp(…).set(…) instead.`;if(t==="throw")throw new TypeError(s);zo.has(e)||(zo.add(e),console.warn(s))}function qo(t,e){const s=Uo.get(t);if(s)return s;const r=new Proxy(t,{get(i,n,o){if(n==="__strictGetTarget__")return t;const l=Reflect.get(i,n,o);if(l==null||typeof l!="object"||pr()==="off")return l;const h=e===""?String(n):`${e}.${String(n)}`;return qo(l,h)},set(i,n,o,l){const h=pr();if(h==="off")return Reflect.set(i,n,o,l);const g=e===""?String(n):`${e}.${String(n)}`;return _n(h,g),h==="throw"?!1:Reflect.set(i,n,o,l)},deleteProperty(i,n){const o=pr();if(o==="off")return Reflect.deleteProperty(i,n);const l=e===""?String(n):`${e}.${String(n)}`;return _n(o,l),o==="throw"?!1:Reflect.deleteProperty(i,n)},defineProperty(i,n,o){const l=pr();if(l==="off")return Reflect.defineProperty(i,n,o);const h=e===""?String(n):`${e}.${String(n)}`;return _n(l,h),l==="throw"?!1:Reflect.defineProperty(i,n,o)}});return Uo.set(t,r),r}function dc(t){return pr()==="off"||t==null||typeof t!="object"?t:qo(t,"")}let pc=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},Bo="sonic";typeof __SONIC_PREFIX__<"u"&&(Bo=__SONIC_PREFIX__);let Ho=Bo.replace(/-([a-z])/g,t=>t[1].toUpperCase());const wi=Ho.charAt(0).toUpperCase()+Ho.slice(1),fc=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function Vo(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>fc.has(e))}function fr(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function ks(t){return typeof t=="object"&&t!==null}let mr="sonic";typeof __SONIC_PREFIX__>"u"&&(mr="sonic");const Sn=mr=="sonic"?"publisher-proxies-data":mr+"-publisher-proxies-data",qs=class qs{constructor(e,s,r){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_=Ro(e),this.parent=s||null,this._parentKey_=r,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(),qs.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(s=>s()),this._is_savable_&&!ye.changed){ye.changed=!0,ye.saveId++;const s=ye.saveId;setTimeout(()=>ye.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(r=>{r[e]!==s&&(r[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==s&&(r[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&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 s in this._value_){let r=s;const i=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(r=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const r=this._value_[s];e[s]!==r&&(e[s]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1,r=!1){const i=ks(e)?e:{__value:e},n=lc(i),o=r?Vs(n):Ro(n);if(this._value_===o||ks(this._value_)&&ks(o)&&o&&fr(this._value_)&&fr(o)&&this._value_.__value===o.__value||!ks(e)&&e===this._value_.__value)return!0;this._value_=o,this._cachedGet_=void 0;const l=fr(this._value_);if(this._parentKey_&&this.parent&&!s&&this._syncOwnedValueIntoParent_(s),l)return this._proxies_.forEach((h,g)=>{g!="_parent_"&&(h.set(null,!0,!0),this._publishDynamicFilling_(g,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;if(this._proxies_.forEach((h,g)=>{const x=this._value_[g];g!="_parent_"&&x===void 0&&x!==null&&isNaN(Number(g))&&(h.set(null,!0,!0),this._publishDynamicFilling_(g,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ks(this._value_))for(const h in this._value_){const g=this._value_[h],m=ks(g)?g:{__value:g};if(!this._proxies_.has(h)){this._publishDynamicFilling_(h,g);continue}this._proxies_.get(h)?.set(m,!0,!0),this._publishDynamicFilling_(h,g)}return!0}_syncOwnedValueIntoParent_(e=!1){if(!this.parent||this._parentKey_==null)return;const s=fr(this._value_)?this._value_.__value:this._value_,r=this.parent._value_;if(r==null||r===void 0||fr(r)&&r.__value==null){if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:s},e);else{const o=[];o[Number(this._parentKey_)]=s,this.parent.set(o,e)}return}r[this._parentKey_]!==s&&(this.parent._value_=cc(r,this._parentKey_,s),this.parent._cachedGet_=void 0,this.parent._syncOwnedValueIntoParent_(e))}get(){mc(this);let e;if(this._cachedGet_!==void 0)e=this._cachedGet_;else if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const s=this._value_.__value;e=this._cachedGet_=s??null}else e=this._cachedGet_=this._value_!=null?this._value_:null;return dc(e)}get $tag(){return this._instanceCounter_||(qs.instancesCounter++,this._instanceCounter_=qs.instancesCounter),qs.instances.set(this._instanceCounter_,this),"<"+mr+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+mr+"-publisher-proxy>"}};qs.instances=new Map,qs.instancesCounter=0;let Ur=qs;const _i=[];function mc(t){_i.length>0&&_i[0].add(t)}function Wo(){_i.unshift(new Set)}function Ko(){return _i.shift()}const Ie=class Ie{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Ie.instance!=null)throw"Singleton / use getInstance";Ie.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Ie.initPageShowHandler()}static get strictGet(){return pr()}static set strictGet(e){hc(e)}static initPageShowHandler(){Ie.pageShowHandlerInitialized||(Ie.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Ie.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(Sn),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(Sn,r),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const l=this.localStorageData[o],h=new Date().getTime()-(l.expirationDelayMs||n);l.lastModifiationMS<h&&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 s=Ie.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Ie)}return Ie.instance==null?new Ie:Ie.instance}static get(e,s){return Ie.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+ze.getLanguage()]?.data||e.get())}get(e,s){const r=s?.localStorageMode==="enabled",i=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const l=Pn({});this.set(e,l)}const n=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),i&&(n._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==Ie.saveId&&e%10!=0))try{if(!Ie.changed||Ie.saving)return;Ie.saving=!0,Ie.changed=!1;const s=Array.from(this.publishers.keys());let r=!1;for(const i of s){const n=this.publishers.get(i);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[i+"¤lang_"+ze.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Sn,i)}if(Ie.saving=!1,Ie.changed){Ie.saveId++;const i=Ie.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{Ie.saving=!1}}async compress(e,s){const r=new TextEncoder().encode(e),i=window,n=new i.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const l=await new Response(n.readable).arrayBuffer(),h=new Uint8Array(l);let g="";for(let x=0;x<h.length;x++)g+=String.fromCharCode(h[x]);return btoa(g)}async decompress(e,s){const r=atob(e),n=Uint8Array.from(r,x=>x.charCodeAt(0)).buffer,o=window,l=new o.DecompressionStream(s),h=l.writable.getWriter();h.write(n),h.close();const g=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(g)}};Ie.buildDate="Mon Nov 02 2026 10:56:11 GMT+0100 (Central European Standard Time)",Ie.changed=!1,Ie.saving=!1,Ie.saveId=0,Ie.instance=null,Ie.instances=new Map,Ie.pageShowHandlerInitialized=!1;let ye=Ie;if(typeof window<"u"){const t=window;t[wi+"PublisherManager"]=t[wi+"PublisherManager"]||ye}const gc=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_","_syncOwnedValueIntoParent_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function bc(t,e){return{get:function(s,r){if(typeof r=="string"&&gc.has(r))return t[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(r)){const i=t._value_[r],n=Pn(ks(i)?i:{__value:i},t,r);n._proxies_.set("_parent_",e()),t._proxies_.set(r,n)}return t._proxies_.get(r)},set:function(s,r,i){if(r=="_value_")return t._value_=i,!0;if(r=="_cachedGet_")return t._cachedGet_=i,!0;if(r=="_assignmentId_")return t._assignmentId_=i,!0;if(r=="_is_savable_")return t._is_savable_=i,!0;if(r=="_expiration_delay_")return t._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return t._instanceCounter_=i,!0;if(!t._proxies_.has(r)){const o=Pn({},t,r);o._proxies_.set("_parent_",e()),t._proxies_.set(r,o)}if(t._value_?.[r]!==i){const o=ks(i)?i:{__value:i};t._proxies_.get(r)?.set(o),t._publishDynamicFilling_(r,i)}return!0},deleteProperty:function(s,r){if(t._publishDynamicFilling_(r,null),t._proxies_.get(r)?.set(null,!0,!0),t._value_!=null&&typeof t._value_=="object"&&!fr(t._value_)){const i=uc(t._value_,r);t.set(i,!1,!0)}return!0},has:function(s,r){return r in t._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(s,r,i){return i&&"value"in i&&(e()[r]=i.value),!0},getOwnPropertyDescriptor:function(s,r){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function Pn(t,e=null,s){const r=new Ur(t,e,s);let i=null;const n=bc(r,()=>i);return i=new Proxy(r,n),i}class yc extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ur.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(mr+"-publisher-proxy",yc)}catch{}const Si=(t,e)=>{if(typeof t=="function"){const s=t;return Wo(),s(),Ko()}if(typeof t=="string"){const s=t.split("."),r=s.shift()||"";let i=ye.get(r,e);i=ut.traverse(i,s);const n=new Set;return n.add(i),n}return new Set([t])};function vc(t){const e=vi(t);return Si(e).values().next().value?.get()}function Pi(t,e,s){const r=vi(t);return Si(r,s).values().next().value}function wc(t,e){return Vo(e)?Pi(t,void 0,e):Pi(t)}function xi(t,e){return Vo(e)?Pi(t,void 0,e):Pi(t)}function _c(t,e){const s=vi(t);Si(s).values().next().value?.set(e)}let Ai=(Te=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Te.observedElements.keys()).forEach(e=>Te.unObserve(e)))}static observe(e){if(!e||!Te.enabled||Te.observedElements.has(e))return;const s=new MutationObserver(Te.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>Te.addPublisherListeners(i)),Te.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>Te.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.addPublisherListeners(s)):e.childNodes.forEach(s=>Te.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.removePublisherListeners(s)):e.childNodes.forEach(s=>Te.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Te.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{Te.onAdded(r)}),s.removedNodes.forEach(r=>{Te.onRemoved(r)});break}}static removePublisherListeners(e){const s=Te.publisherListeners.get(e);s&&(Te.publisherListeners.delete(e),s.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[e],s=s.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:Te.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const r of s)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){Te.removePublisherListeners(e);const s=ze.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const r=ye.getInstance().get(s),i=Te.getDataBindItems(e),n=[];i.forEach(o=>{const l=o.bindedVariablesDescriptor,h=o.propertyToUpdate;for(const g of l.variables){const x=g;let m=r;m=Te.getSubPublisher(r,x);const f=e,C={publisher:m,onAssign:()=>{const E=l.variables.map(U=>Te.getSubPublisher(r,U)?.get());let T=l.expression,z=!1;if(E.length==1&&l.variables[0].join(".")==T.substring(1)){let U=E[0];U===null&&(U=""),f[h]=U;return}for(let U=0;U<E.length;U++){let S=E[U];const v=l.variables[U];S===null&&(z=!0,S=void 0),T=T.replace("$"+v.join("."),S)}if(T.indexOf("|")!=-1){const U=T.indexOf("|");if(U==0)T=zr.js(T.substring(1));else{const S=T.substring(0,U),v=T.substring(U+1),M=zr[S];T=z?"":M?M(v):T}}else T=z?"":T;f[h]=T}};m?.onAssign(C.onAssign),n.push(C)}}),Te.publisherListeners.set(e,n)}},Te.observedElements=new Map,Te.enabled=!0,Te.publisherListeners=new Map,Te);Ai.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ai);/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -6,15 +6,15 @@
6
6
  * @license
7
7
  * Copyright 2019 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const Ci=globalThis,Pn=Ci.ShadowRoot&&(Ci.ShadyCSS===void 0||Ci.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xn=Symbol(),Ko=new WeakMap;let An=class{constructor(e,s,r){if(this._$cssResult$=!0,r!==xn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(Pn&&e===void 0){const r=s!==void 0&&s.length===1;r&&(e=Ko.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ko.set(s,e))}return e}toString(){return this.cssText}};const _c=t=>new An(typeof t=="string"?t:t+"",void 0,xn),Z=(t,...e)=>{const s=t.length===1?t[0]:e.reduce(((r,i,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new An(s,t,xn)},Sc=(t,e)=>{if(Pn)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const r=document.createElement("style"),i=Ci.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,t.appendChild(r)}},Go=Pn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const r of e.cssRules)s+=r.cssText;return _c(s)})(t):t;/**
9
+ */const Ci=globalThis,xn=Ci.ShadowRoot&&(Ci.ShadyCSS===void 0||Ci.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,An=Symbol(),Go=new WeakMap;let Cn=class{constructor(e,s,r){if(this._$cssResult$=!0,r!==An)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(xn&&e===void 0){const r=s!==void 0&&s.length===1;r&&(e=Go.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Go.set(s,e))}return e}toString(){return this.cssText}};const Sc=t=>new Cn(typeof t=="string"?t:t+"",void 0,An),Z=(t,...e)=>{const s=t.length===1?t[0]:e.reduce(((r,i,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new Cn(s,t,An)},Pc=(t,e)=>{if(xn)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const r=document.createElement("style"),i=Ci.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,t.appendChild(r)}},Yo=xn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const r of e.cssRules)s+=r.cssText;return Sc(s)})(t):t;/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const{is:Pc,defineProperty:xc,getOwnPropertyDescriptor:Ac,getOwnPropertyNames:Cc,getOwnPropertySymbols:kc,getPrototypeOf:$c}=Object,ki=globalThis,Yo=ki.trustedTypes,Dc=Yo?Yo.emptyScript:"",Ec=ki.reactiveElementPolyfillSupport,qr=(t,e)=>t,$i={toAttribute(t,e){switch(e){case Boolean:t=t?Dc:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},Cn=(t,e)=>!Pc(t,e),Zo={attribute:!0,type:String,converter:$i,reflect:!1,useDefault:!1,hasChanged:Cn};Symbol.metadata??=Symbol("metadata"),ki.litPropertyMetadata??=new WeakMap;let gr=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=Zo){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,s);i!==void 0&&xc(this.prototype,e,i)}}static getPropertyDescriptor(e,s,r){const{get:i,set:n}=Ac(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:i,set(o){const l=i?.call(this);n?.call(this,o),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Zo}static _$Ei(){if(this.hasOwnProperty(qr("elementProperties")))return;const e=$c(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(qr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qr("properties"))){const s=this.properties,r=[...Cc(s),...kc(s)];for(const i of r)this.createProperty(i,s[i])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[r,i]of s)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[s,r]of this.elementProperties){const i=this._$Eu(s,r);i!==void 0&&this._$Eh.set(i,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)s.unshift(Go(i))}else e!==void 0&&s.push(Go(e));return s}static _$Eu(e,s){const r=s.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const r of s.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Sc(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,r){this._$AK(e,r)}_$ET(e,s){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:$i).toAttribute(s,r.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,s){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=r.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:$i;this._$Em=i;const l=o.fromAttribute(s,n.type);this[i]=l??this._$Ej?.get(i)??l,this._$Em=null}}requestUpdate(e,s,r){if(e!==void 0){const i=this.constructor,n=this[e];if(r??=i.getPropertyOptions(e),!((r.hasChanged??Cn)(n,s)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??s??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(s=void 0),this._$AL.set(e,s)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,n]of r){const{wrapped:o}=n,l=this[i];o!==!0||this._$AL.has(i)||l===void 0||this.C(i,void 0,n,l)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(s)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(e){}firstUpdated(e){}};gr.elementStyles=[],gr.shadowRootOptions={mode:"open"},gr[qr("elementProperties")]=new Map,gr[qr("finalized")]=new Map,Ec?.({ReactiveElement:gr}),(ki.reactiveElementVersions??=[]).push("2.1.1");/**
13
+ */const{is:xc,defineProperty:Ac,getOwnPropertyDescriptor:Cc,getOwnPropertyNames:kc,getOwnPropertySymbols:$c,getPrototypeOf:Dc}=Object,ki=globalThis,Zo=ki.trustedTypes,Ec=Zo?Zo.emptyScript:"",Oc=ki.reactiveElementPolyfillSupport,qr=(t,e)=>t,$i={toAttribute(t,e){switch(e){case Boolean:t=t?Ec:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},kn=(t,e)=>!xc(t,e),Jo={attribute:!0,type:String,converter:$i,reflect:!1,useDefault:!1,hasChanged:kn};Symbol.metadata??=Symbol("metadata"),ki.litPropertyMetadata??=new WeakMap;let gr=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=Jo){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,s);i!==void 0&&Ac(this.prototype,e,i)}}static getPropertyDescriptor(e,s,r){const{get:i,set:n}=Cc(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:i,set(o){const l=i?.call(this);n?.call(this,o),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Jo}static _$Ei(){if(this.hasOwnProperty(qr("elementProperties")))return;const e=Dc(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(qr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qr("properties"))){const s=this.properties,r=[...kc(s),...$c(s)];for(const i of r)this.createProperty(i,s[i])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[r,i]of s)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[s,r]of this.elementProperties){const i=this._$Eu(s,r);i!==void 0&&this._$Eh.set(i,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)s.unshift(Yo(i))}else e!==void 0&&s.push(Yo(e));return s}static _$Eu(e,s){const r=s.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const r of s.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pc(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,r){this._$AK(e,r)}_$ET(e,s){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:$i).toAttribute(s,r.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,s){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=r.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:$i;this._$Em=i;const l=o.fromAttribute(s,n.type);this[i]=l??this._$Ej?.get(i)??l,this._$Em=null}}requestUpdate(e,s,r){if(e!==void 0){const i=this.constructor,n=this[e];if(r??=i.getPropertyOptions(e),!((r.hasChanged??kn)(n,s)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??s??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(s=void 0),this._$AL.set(e,s)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,n]of r){const{wrapped:o}=n,l=this[i];o!==!0||this._$AL.has(i)||l===void 0||this.C(i,void 0,n,l)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(s)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(e){}firstUpdated(e){}};gr.elementStyles=[],gr.shadowRootOptions={mode:"open"},gr[qr("elementProperties")]=new Map,gr[qr("finalized")]=new Map,Oc?.({ReactiveElement:gr}),(ki.reactiveElementVersions??=[]).push("2.1.1");/**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */const Oc={attribute:!0,type:String,converter:$i,reflect:!1,hasChanged:Cn},Tc=(t=Oc,e,s)=>{const{kind:r,metadata:i}=s;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),r==="accessor"){const{name:o}=s;return{set(l){const h=e.get.call(this);e.set.call(this,l),this.requestUpdate(o,h,t)},init(l){return l!==void 0&&this.C(o,void 0,t,l),l}}}if(r==="setter"){const{name:o}=s;return function(l){const h=this[o];e.call(this,l),this.requestUpdate(o,h,t)}}throw Error("Unsupported decorator location: "+r)};function u(t){return(e,s)=>typeof s=="object"?Tc(t,e,s):((r,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(t,e,s)}/**
17
+ */const Tc={attribute:!0,type:String,converter:$i,reflect:!1,hasChanged:kn},Lc=(t=Tc,e,s)=>{const{kind:r,metadata:i}=s;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),r==="accessor"){const{name:o}=s;return{set(l){const h=e.get.call(this);e.set.call(this,l),this.requestUpdate(o,h,t)},init(l){return l!==void 0&&this.C(o,void 0,t,l),l}}}if(r==="setter"){const{name:o}=s;return function(l){const h=this[o];e.call(this,l),this.requestUpdate(o,h,t)}}throw Error("Unsupported decorator location: "+r)};function u(t){return(e,s)=>typeof s=="object"?Lc(t,e,s):((r,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(t,e,s)}/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
@@ -22,57 +22,57 @@
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const kn=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
25
+ */const $n=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */function $s(t,e){return(s,r,i)=>{const n=o=>o.renderRoot?.querySelector(t)??null;return kn(s,r,{get(){return n(this)}})}}/**
29
+ */function $s(t,e){return(s,r,i)=>{const n=o=>o.renderRoot?.querySelector(t)??null;return $n(s,r,{get(){return n(this)}})}}/**
30
30
  * @license
31
31
  * Copyright 2021 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */function Br(t){return(e,s)=>{const{slot:r,selector:i}=t??{},n="slot"+(r?`[name=${r}]`:":not([name])");return kn(e,s,{get(){const o=this.renderRoot?.querySelector(n),l=o?.assignedElements(t)??[];return i===void 0?l:l.filter((h=>h.matches(i)))}})}}/**
33
+ */function Br(t){return(e,s)=>{const{slot:r,selector:i}=t??{},n="slot"+(r?`[name=${r}]`:":not([name])");return $n(e,s,{get(){const o=this.renderRoot?.querySelector(n),l=o?.assignedElements(t)??[];return i===void 0?l:l.filter((h=>h.matches(i)))}})}}/**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */function bt(t){return(e,s)=>{const{slot:r}=t??{},i="slot"+(r?`[name=${r}]`:":not([name])");return kn(e,s,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(t)??[]}})}}/**
37
+ */function bt(t){return(e,s)=>{const{slot:r}=t??{},i="slot"+(r?`[name=${r}]`:":not([name])");return $n(e,s,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(t)??[]}})}}/**
38
38
  * @license
39
39
  * Copyright 2017 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
- */const $n=globalThis,Di=$n.trustedTypes,Jo=Di?Di.createPolicy("lit-html",{createHTML:t=>t}):void 0,Qo="$lit$",Ds=`lit$${Math.random().toFixed(9).slice(2)}$`,Xo="?"+Ds,Lc=`<${Xo}>`,Ws=document,Hr=()=>Ws.createComment(""),Vr=t=>t===null||typeof t!="object"&&typeof t!="function",Dn=Array.isArray,Ic=t=>Dn(t)||typeof t?.[Symbol.iterator]=="function",En=`[
42
- \f\r]`,Wr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ea=/-->/g,ta=/>/g,Ks=RegExp(`>|${En}(?:([^\\s"'>=/]+)(${En}*=${En}*(?:[^
43
- \f\r"'\`<>=]|("|')|))|$)`,"g"),sa=/'/g,ra=/"/g,ia=/^(?:script|style|textarea|title)$/i,Mc=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=Mc(1),zt=Symbol.for("lit-noChange"),ee=Symbol.for("lit-nothing"),na=new WeakMap,Gs=Ws.createTreeWalker(Ws,129);function oa(t,e){if(!Dn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Jo!==void 0?Jo.createHTML(e):e}const Nc=(t,e)=>{const s=t.length-1,r=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=Wr;for(let l=0;l<s;l++){const h=t[l];let g,x,m=-1,f=0;for(;f<h.length&&(o.lastIndex=f,x=o.exec(h),x!==null);)f=o.lastIndex,o===Wr?x[1]==="!--"?o=ea:x[1]!==void 0?o=ta:x[2]!==void 0?(ia.test(x[2])&&(i=RegExp("</"+x[2],"g")),o=Ks):x[3]!==void 0&&(o=Ks):o===Ks?x[0]===">"?(o=i??Wr,m=-1):x[1]===void 0?m=-2:(m=o.lastIndex-x[2].length,g=x[1],o=x[3]===void 0?Ks:x[3]==='"'?ra:sa):o===ra||o===sa?o=Ks:o===ea||o===ta?o=Wr:(o=Ks,i=void 0);const C=o===Ks&&t[l+1].startsWith("/>")?" ":"";n+=o===Wr?h+Lc:m>=0?(r.push(g),h.slice(0,m)+Qo+h.slice(m)+Ds+C):h+Ds+(m===-2?l:C)}return[oa(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};let On=class rc{constructor({strings:e,_$litType$:s},r){let i;this.parts=[];let n=0,o=0;const l=e.length-1,h=this.parts,[g,x]=Nc(e,s);if(this.el=rc.createElement(g,r),Gs.currentNode=this.el.content,s===2||s===3){const m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(i=Gs.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const m of i.getAttributeNames())if(m.endsWith(Qo)){const f=x[o++],C=i.getAttribute(m).split(Ds),E=/([.?@])?(.*)/.exec(f);h.push({type:1,index:n,name:E[2],strings:C,ctor:E[1]==="."?Rc:E[1]==="?"?jc:E[1]==="@"?zc:Ei}),i.removeAttribute(m)}else m.startsWith(Ds)&&(h.push({type:6,index:n}),i.removeAttribute(m));if(ia.test(i.tagName)){const m=i.textContent.split(Ds),f=m.length-1;if(f>0){i.textContent=Di?Di.emptyScript:"";for(let C=0;C<f;C++)i.append(m[C],Hr()),Gs.nextNode(),h.push({type:2,index:++n});i.append(m[f],Hr())}}}else if(i.nodeType===8)if(i.data===Xo)h.push({type:2,index:n});else{let m=-1;for(;(m=i.data.indexOf(Ds,m+1))!==-1;)h.push({type:7,index:n}),m+=Ds.length-1}n++}}static createElement(e,s){const r=Ws.createElement("template");return r.innerHTML=e,r}};function br(t,e,s=t,r){if(e===zt)return e;let i=r!==void 0?s._$Co?.[r]:s._$Cl;const n=Vr(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(t),i._$AT(t,s,r)),r!==void 0?(s._$Co??=[])[r]=i:s._$Cl=i),i!==void 0&&(e=br(t,i._$AS(t,e.values),i,r)),e}let Fc=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:r}=this._$AD,i=(e?.creationScope??Ws).importNode(s,!0);Gs.currentNode=i;let n=Gs.nextNode(),o=0,l=0,h=r[0];for(;h!==void 0;){if(o===h.index){let g;h.type===2?g=new vr(n,n.nextSibling,this,e):h.type===1?g=new h.ctor(n,h.name,h.strings,this,e):h.type===6&&(g=new Uc(n,this,e)),this._$AV.push(g),h=r[++l]}o!==h?.index&&(n=Gs.nextNode(),o++)}return Gs.currentNode=Ws,i}p(e){let s=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,s),s+=r.strings.length-2):r._$AI(e[s])),s++}};class vr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,r,i){this.type=2,this._$AH=ee,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=br(this,e,s),Vr(e)?e===ee||e==null||e===""?(this._$AH!==ee&&this._$AR(),this._$AH=ee):e!==this._$AH&&e!==zt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ic(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!==ee&&Vr(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ws.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=On.createElement(oa(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(s);else{const n=new Fc(i,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=na.get(e.strings);return s===void 0&&na.set(e.strings,s=new On(e)),s}k(e){Dn(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,i=0;for(const n of e)i===s.length?s.push(r=new vr(this.O(Hr()),this.O(Hr()),this,this.options)):r=s[i],r._$AI(n),i++;i<s.length&&(this._$AR(r&&r._$AB.nextSibling,i),s.length=i)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Ei{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,r,i,n){this.type=1,this._$AH=ee,this._$AN=void 0,this.element=e,this.name=s,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=ee}_$AI(e,s=this,r,i){const n=this.strings;let o=!1;if(n===void 0)e=br(this,e,s,0),o=!Vr(e)||e!==this._$AH&&e!==zt,o&&(this._$AH=e);else{const l=e;let h,g;for(e=n[0],h=0;h<n.length-1;h++)g=br(this,l[r+h],s,h),g===zt&&(g=this._$AH[h]),o||=!Vr(g)||g!==this._$AH[h],g===ee?e=ee:e!==ee&&(e+=(g??"")+n[h+1]),this._$AH[h]=g}o&&!i&&this.j(e)}j(e){e===ee?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Rc extends Ei{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ee?void 0:e}}class jc extends Ei{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==ee)}}class zc extends Ei{constructor(e,s,r,i,n){super(e,s,r,i,n),this.type=5}_$AI(e,s=this){if((e=br(this,e,s,0)??ee)===zt)return;const r=this._$AH,i=e===ee&&r!==ee||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==ee&&(r===ee||i);i&&this.element.removeEventListener(this.name,this,r),n&&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 Uc{constructor(e,s,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){br(this,e)}}const qc={I:vr},Bc=$n.litHtmlPolyfillSupport;Bc?.(On,vr),($n.litHtmlVersions??=[]).push("3.3.1");const Hc=(t,e,s)=>{const r=s?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const n=s?.renderBefore??null;r._$litPart$=i=new vr(e.insertBefore(Hr(),n),n,void 0,s??{})}return i._$AI(t),i};/**
41
+ */const Dn=globalThis,Di=Dn.trustedTypes,Qo=Di?Di.createPolicy("lit-html",{createHTML:t=>t}):void 0,Xo="$lit$",Ds=`lit$${Math.random().toFixed(9).slice(2)}$`,ea="?"+Ds,Ic=`<${ea}>`,Ws=document,Hr=()=>Ws.createComment(""),Vr=t=>t===null||typeof t!="object"&&typeof t!="function",En=Array.isArray,Mc=t=>En(t)||typeof t?.[Symbol.iterator]=="function",On=`[
42
+ \f\r]`,Wr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ta=/-->/g,sa=/>/g,Ks=RegExp(`>|${On}(?:([^\\s"'>=/]+)(${On}*=${On}*(?:[^
43
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ra=/'/g,ia=/"/g,na=/^(?:script|style|textarea|title)$/i,Nc=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=Nc(1),zt=Symbol.for("lit-noChange"),ee=Symbol.for("lit-nothing"),oa=new WeakMap,Gs=Ws.createTreeWalker(Ws,129);function aa(t,e){if(!En(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Qo!==void 0?Qo.createHTML(e):e}const Fc=(t,e)=>{const s=t.length-1,r=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=Wr;for(let l=0;l<s;l++){const h=t[l];let g,x,m=-1,f=0;for(;f<h.length&&(o.lastIndex=f,x=o.exec(h),x!==null);)f=o.lastIndex,o===Wr?x[1]==="!--"?o=ta:x[1]!==void 0?o=sa:x[2]!==void 0?(na.test(x[2])&&(i=RegExp("</"+x[2],"g")),o=Ks):x[3]!==void 0&&(o=Ks):o===Ks?x[0]===">"?(o=i??Wr,m=-1):x[1]===void 0?m=-2:(m=o.lastIndex-x[2].length,g=x[1],o=x[3]===void 0?Ks:x[3]==='"'?ia:ra):o===ia||o===ra?o=Ks:o===ta||o===sa?o=Wr:(o=Ks,i=void 0);const C=o===Ks&&t[l+1].startsWith("/>")?" ":"";n+=o===Wr?h+Ic:m>=0?(r.push(g),h.slice(0,m)+Xo+h.slice(m)+Ds+C):h+Ds+(m===-2?l:C)}return[aa(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};let Tn=class ic{constructor({strings:e,_$litType$:s},r){let i;this.parts=[];let n=0,o=0;const l=e.length-1,h=this.parts,[g,x]=Fc(e,s);if(this.el=ic.createElement(g,r),Gs.currentNode=this.el.content,s===2||s===3){const m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(i=Gs.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const m of i.getAttributeNames())if(m.endsWith(Xo)){const f=x[o++],C=i.getAttribute(m).split(Ds),E=/([.?@])?(.*)/.exec(f);h.push({type:1,index:n,name:E[2],strings:C,ctor:E[1]==="."?jc:E[1]==="?"?zc:E[1]==="@"?Uc:Ei}),i.removeAttribute(m)}else m.startsWith(Ds)&&(h.push({type:6,index:n}),i.removeAttribute(m));if(na.test(i.tagName)){const m=i.textContent.split(Ds),f=m.length-1;if(f>0){i.textContent=Di?Di.emptyScript:"";for(let C=0;C<f;C++)i.append(m[C],Hr()),Gs.nextNode(),h.push({type:2,index:++n});i.append(m[f],Hr())}}}else if(i.nodeType===8)if(i.data===ea)h.push({type:2,index:n});else{let m=-1;for(;(m=i.data.indexOf(Ds,m+1))!==-1;)h.push({type:7,index:n}),m+=Ds.length-1}n++}}static createElement(e,s){const r=Ws.createElement("template");return r.innerHTML=e,r}};function br(t,e,s=t,r){if(e===zt)return e;let i=r!==void 0?s._$Co?.[r]:s._$Cl;const n=Vr(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(t),i._$AT(t,s,r)),r!==void 0?(s._$Co??=[])[r]=i:s._$Cl=i),i!==void 0&&(e=br(t,i._$AS(t,e.values),i,r)),e}let Rc=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:r}=this._$AD,i=(e?.creationScope??Ws).importNode(s,!0);Gs.currentNode=i;let n=Gs.nextNode(),o=0,l=0,h=r[0];for(;h!==void 0;){if(o===h.index){let g;h.type===2?g=new yr(n,n.nextSibling,this,e):h.type===1?g=new h.ctor(n,h.name,h.strings,this,e):h.type===6&&(g=new qc(n,this,e)),this._$AV.push(g),h=r[++l]}o!==h?.index&&(n=Gs.nextNode(),o++)}return Gs.currentNode=Ws,i}p(e){let s=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,s),s+=r.strings.length-2):r._$AI(e[s])),s++}};class yr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,r,i){this.type=2,this._$AH=ee,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=br(this,e,s),Vr(e)?e===ee||e==null||e===""?(this._$AH!==ee&&this._$AR(),this._$AH=ee):e!==this._$AH&&e!==zt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Mc(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!==ee&&Vr(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ws.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Tn.createElement(aa(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(s);else{const n=new Rc(i,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=oa.get(e.strings);return s===void 0&&oa.set(e.strings,s=new Tn(e)),s}k(e){En(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,i=0;for(const n of e)i===s.length?s.push(r=new yr(this.O(Hr()),this.O(Hr()),this,this.options)):r=s[i],r._$AI(n),i++;i<s.length&&(this._$AR(r&&r._$AB.nextSibling,i),s.length=i)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Ei{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,r,i,n){this.type=1,this._$AH=ee,this._$AN=void 0,this.element=e,this.name=s,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=ee}_$AI(e,s=this,r,i){const n=this.strings;let o=!1;if(n===void 0)e=br(this,e,s,0),o=!Vr(e)||e!==this._$AH&&e!==zt,o&&(this._$AH=e);else{const l=e;let h,g;for(e=n[0],h=0;h<n.length-1;h++)g=br(this,l[r+h],s,h),g===zt&&(g=this._$AH[h]),o||=!Vr(g)||g!==this._$AH[h],g===ee?e=ee:e!==ee&&(e+=(g??"")+n[h+1]),this._$AH[h]=g}o&&!i&&this.j(e)}j(e){e===ee?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class jc extends Ei{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ee?void 0:e}}class zc extends Ei{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==ee)}}class Uc extends Ei{constructor(e,s,r,i,n){super(e,s,r,i,n),this.type=5}_$AI(e,s=this){if((e=br(this,e,s,0)??ee)===zt)return;const r=this._$AH,i=e===ee&&r!==ee||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==ee&&(r===ee||i);i&&this.element.removeEventListener(this.name,this,r),n&&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 qc{constructor(e,s,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){br(this,e)}}const Bc={I:yr},Hc=Dn.litHtmlPolyfillSupport;Hc?.(Tn,yr),(Dn.litHtmlVersions??=[]).push("3.3.1");const Vc=(t,e,s)=>{const r=s?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const n=s?.renderBefore??null;r._$litPart$=i=new yr(e.insertBefore(Hr(),n),n,void 0,s??{})}return i._$AI(t),i};/**
44
44
  * @license
45
45
  * Copyright 2020 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
- */const{I:Vc}=qc,Wc=t=>t.strings===void 0,aa=()=>document.createComment(""),Kr=(t,e,s)=>{const r=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(s===void 0){const n=r.insertBefore(aa(),i),o=r.insertBefore(aa(),i);s=new Vc(n,o,t,t.options)}else{const n=s._$AB.nextSibling,o=s._$AM,l=o!==t;if(l){let h;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(h=t._$AU)!==o._$AU&&s._$AP(h)}if(n!==i||l){let h=s._$AA;for(;h!==n;){const g=h.nextSibling;r.insertBefore(h,i),h=g}}}return s},Ys=(t,e,s=t)=>(t._$AI(e,s),t),Kc={},Gc=(t,e=Kc)=>t._$AH=e,Yc=t=>t._$AH,Tn=t=>{t._$AR(),t._$AA.remove()};/**
47
+ */const{I:Wc}=Bc,Kc=t=>t.strings===void 0,la=()=>document.createComment(""),Kr=(t,e,s)=>{const r=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(s===void 0){const n=r.insertBefore(la(),i),o=r.insertBefore(la(),i);s=new Wc(n,o,t,t.options)}else{const n=s._$AB.nextSibling,o=s._$AM,l=o!==t;if(l){let h;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(h=t._$AU)!==o._$AU&&s._$AP(h)}if(n!==i||l){let h=s._$AA;for(;h!==n;){const g=h.nextSibling;r.insertBefore(h,i),h=g}}}return s},Ys=(t,e,s=t)=>(t._$AI(e,s),t),Gc={},Yc=(t,e=Gc)=>t._$AH=e,Zc=t=>t._$AH,Ln=t=>{t._$AR(),t._$AA.remove()};/**
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
- */const Zs={ATTRIBUTE:1,CHILD:2},Es=t=>(...e)=>({_$litDirective$:t,values:e});let yr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,r){this._$Ct=e,this._$AM=s,this._$Ci=r}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/**
51
+ */const Zs={ATTRIBUTE:1,CHILD:2},Es=t=>(...e)=>({_$litDirective$:t,values:e});let vr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,r){this._$Ct=e,this._$AM=s,this._$Ci=r}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/**
52
52
  * @license
53
53
  * Copyright 2017 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
- */const Gr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const r of s)r._$AO?.(e,!1),Gr(r,e);return!0},Oi=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},la=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Qc(e)}};function Zc(t){this._$AN!==void 0?(Oi(this),this._$AM=t,la(this)):this._$AM=t}function Jc(t,e=!1,s=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(r))for(let n=s;n<r.length;n++)Gr(r[n],!1),Oi(r[n]);else r!=null&&(Gr(r,!1),Oi(r));else Gr(this,t)}const Qc=t=>{t.type==Zs.CHILD&&(t._$AP??=Jc,t._$AQ??=Zc)};class Ln extends yr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,r){super._$AT(e,s,r),la(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(Gr(this,e),Oi(this))}setValue(e){if(Wc(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
55
+ */const Gr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const r of s)r._$AO?.(e,!1),Gr(r,e);return!0},Oi=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},ca=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Xc(e)}};function Jc(t){this._$AN!==void 0?(Oi(this),this._$AM=t,ca(this)):this._$AM=t}function Qc(t,e=!1,s=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(r))for(let n=s;n<r.length;n++)Gr(r[n],!1),Oi(r[n]);else r!=null&&(Gr(r,!1),Oi(r));else Gr(this,t)}const Xc=t=>{t.type==Zs.CHILD&&(t._$AP??=Qc,t._$AQ??=Jc)};class In extends vr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,r){super._$AT(e,s,r),ca(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(Gr(this,e),Oi(this))}setValue(e){if(Kc(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
- */const In=globalThis;let Q=class extends gr{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 s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Hc(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return zt}};Q._$litElement$=!0,Q.finalized=!0,In.litElementHydrateSupport?.({LitElement:Q});const Xc=In.litElementPolyfillSupport;Xc?.({LitElement:Q}),(In.litElementVersions??=[]).push("4.2.1");function ca(t){if(t==null||typeof t!="object"||Array.isArray(t))return t;const e={...t};return delete e._sonic_http_response_,e}const Re=class Re{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){Re.tokens.delete(this.serviceURL);return}Re.invalidTokens.includes(e)||Re.tokens.set(this.serviceURL,e)}get token(){return Re.invalidTokens.includes(this._token)?Re.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(Re.invalidTokens.includes(e)||(Re.invalidTokens.push(e),this.token=null))}async handleResult(e,s){Re.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let n={};if(!r||r.indexOf("text/")==0)n={text:await e.text()};else try{n=await e.json()}catch{n={}}if(this.addHTTPResponse&&ut.isObject(n)&&(n._sonic_http_response_=e),i===498&&!Re.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),s.apiMethod==="get"){const l=await this.get(s.path,s.additionalHeaders);if(l==null)throw new Error("GET retry failed after token refresh");n=l}else n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders);return xi("sonic-api").lastResponse.set({http:e,processed:n}),n}async auth(){if(this.token)return;if(Re.tokens.has(this.serviceURL)){this.token=Re.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 s=new URL(this.serviceURL),r=s.protocol+"//"+s.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await i.json();n.token?this.token=n.token:Re.failledTokenUpdates.set(this.serviceURL,!0)}catch{Re.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,s){const r=ve.get(e),i=new URLSearchParams(s.split("?")[1]||""),n=r.get();let o=[];Array.isArray(n)?o=n:o=[n];const l=[];let h=Number.POSITIVE_INFINITY,g=0,x=0;if(i.has("limit")&&(h=parseInt(i.get("limit")||"0"),x++),i.has("offset")&&(g=parseInt(i.get("offset")||"0"),x++),x>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return o.slice(g,g+h);for(const[m,f]of i.entries()){const C=f.split(",").map(E=>E.trim());for(const E of C)for(const T of o)if(typeof T!="object")isNaN(+T)?T.toString().toLowerCase().includes(f.toLowerCase())&&l.push(T):T===f&&l.push(T);else{const z=T;if(!z[m])continue;isNaN(+z[m])?z[m]?.toString().toLowerCase().includes(E.toLowerCase())&&l.push(T):z[m]===E&&l.push(T)}}return l.slice(g,g+h)}firstCallDone(){return new Promise(e=>{if(!Re.firstCallDoneFlags.has(this.serviceURL))Re.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const s=()=>{[void 0,"loading"].includes(Re.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}})}async get(e,s){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading"));const g=e.match(r);if(!g)throw new Error("dataProvider path is not valid");return await this.localGet(g[1],g[2])}const i={apiMethod:"get",path:e,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(e),l=JSON.stringify({url:o,headers:n,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading")),!Re.loadingGetPromises.has(l)){const g=new Promise(async x=>{try{const m=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(m,i);x({processed:f,response:this.lastResult})}catch{Re.firstCallDoneFlags.set(this.serviceURL,"error"),x(null)}});Re.loadingGetPromises.set(l,g)}const h=await Re.loadingGetPromises.get(l);return Re.loadingGetPromises.delete(l),h?(this.lastResult=h.response,h.processed):null}async getDetailed(e,s){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,s);if(i==null)return;const n=ca(i),o=this.computeURL(e);if(r)return{request:new Request(o,{method:"GET"}),result:n};const l=await this.createHeaders(s);return{request:new Request(o,{method:"GET",headers:new Headers(l),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:n}}async sendDetailed(e,s,r,i){const n=await this.send(e,s,r,i);if(n==null)return;const o=ca(n),l=this.computeURL(e),h=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(l,{method:r,headers:new Headers(h),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,s,r){return this.sendDetailed(e,s,"POST",r)}async putDetailed(e,s,r){return this.sendDetailed(e,s,"PUT",r)}async patchDetailed(e,s,r){return this.sendDetailed(e,s,"PATCH",r)}async createHeaders(e){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=ze.getLanguage(),e&&Object.assign(s,e),s}computeURL(e,s={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const n in s)i.searchParams.set(n,s[n]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,s,r="POST",i){const n={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const l=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(l,n)}async submitFormData(e,s,r="POST",i){const n={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json";const l=new FormData,h=s;for(const x in h)l.set(x,h[x]);const g=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:l,keepalive:this.keepAlive});return await this.handleResult(g,n)}async put(e,s,r){return this.send(e,s,"PUT",r)}async post(e,s,r){return this.send(e,s,"POST",r)}async patch(e,s,r){return this.send(e,s,"PATCH",r)}async delete(e,s,r){return this.send(e,s,"delete",r)}};Re.loadingGetPromises=new Map,Re.tokens=new Map,Re.invalidTokens=[],Re.failledTokenUpdates=new Map,Re.firstCallDoneFlags=new Map;let Os=Re;ze.getApiConfiguration(document.body||document.documentElement);const eu=async(t,e)=>{};/**
59
+ */const Mn=globalThis;let Q=class extends gr{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 s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Vc(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return zt}};Q._$litElement$=!0,Q.finalized=!0,Mn.litElementHydrateSupport?.({LitElement:Q});const eu=Mn.litElementPolyfillSupport;eu?.({LitElement:Q}),(Mn.litElementVersions??=[]).push("4.2.1");function ua(t){if(t==null||typeof t!="object"||Array.isArray(t))return t;const e={...t};return delete e._sonic_http_response_,e}const Re=class Re{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){Re.tokens.delete(this.serviceURL);return}Re.invalidTokens.includes(e)||Re.tokens.set(this.serviceURL,e)}get token(){return Re.invalidTokens.includes(this._token)?Re.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(Re.invalidTokens.includes(e)||(Re.invalidTokens.push(e),this.token=null))}async handleResult(e,s){Re.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let n={};if(!r||r.indexOf("text/")==0)n={text:await e.text()};else try{n=await e.json()}catch{n={}}if(this.addHTTPResponse&&ut.isObject(n)&&(n._sonic_http_response_=e),i===498&&!Re.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),s.apiMethod==="get"){const l=await this.get(s.path,s.additionalHeaders);if(l==null)throw new Error("GET retry failed after token refresh");n=l}else n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders);return xi("sonic-api").lastResponse.set({http:e,processed:n}),n}async auth(){if(this.token)return;if(Re.tokens.has(this.serviceURL)){this.token=Re.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 s=new URL(this.serviceURL),r=s.protocol+"//"+s.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await i.json();n.token?this.token=n.token:Re.failledTokenUpdates.set(this.serviceURL,!0)}catch{Re.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,s){const r=ye.get(e),i=new URLSearchParams(s.split("?")[1]||""),n=r.get();let o=[];Array.isArray(n)?o=n:o=[n];const l=[];let h=Number.POSITIVE_INFINITY,g=0,x=0;if(i.has("limit")&&(h=parseInt(i.get("limit")||"0"),x++),i.has("offset")&&(g=parseInt(i.get("offset")||"0"),x++),x>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return o.slice(g,g+h);for(const[m,f]of i.entries()){const C=f.split(",").map(E=>E.trim());for(const E of C)for(const T of o)if(typeof T!="object")isNaN(+T)?T.toString().toLowerCase().includes(f.toLowerCase())&&l.push(T):T===f&&l.push(T);else{const z=T;if(!z[m])continue;isNaN(+z[m])?z[m]?.toString().toLowerCase().includes(E.toLowerCase())&&l.push(T):z[m]===E&&l.push(T)}}return l.slice(g,g+h)}firstCallDone(){return new Promise(e=>{if(!Re.firstCallDoneFlags.has(this.serviceURL))Re.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const s=()=>{[void 0,"loading"].includes(Re.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}})}async get(e,s){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading"));const g=e.match(r);if(!g)throw new Error("dataProvider path is not valid");return await this.localGet(g[1],g[2])}const i={apiMethod:"get",path:e,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(e),l=JSON.stringify({url:o,headers:n,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading")),!Re.loadingGetPromises.has(l)){const g=new Promise(async x=>{try{const m=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(m,i);x({processed:f,response:this.lastResult})}catch{Re.firstCallDoneFlags.set(this.serviceURL,"error"),x(null)}});Re.loadingGetPromises.set(l,g)}const h=await Re.loadingGetPromises.get(l);return Re.loadingGetPromises.delete(l),h?(this.lastResult=h.response,h.processed):null}async getDetailed(e,s){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,s);if(i==null)return;const n=ua(i),o=this.computeURL(e);if(r)return{request:new Request(o,{method:"GET"}),result:n};const l=await this.createHeaders(s);return{request:new Request(o,{method:"GET",headers:new Headers(l),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:n}}async sendDetailed(e,s,r,i){const n=await this.send(e,s,r,i);if(n==null)return;const o=ua(n),l=this.computeURL(e),h=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(l,{method:r,headers:new Headers(h),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,s,r){return this.sendDetailed(e,s,"POST",r)}async putDetailed(e,s,r){return this.sendDetailed(e,s,"PUT",r)}async patchDetailed(e,s,r){return this.sendDetailed(e,s,"PATCH",r)}async createHeaders(e){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=ze.getLanguage(),e&&Object.assign(s,e),s}computeURL(e,s={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const n in s)i.searchParams.set(n,s[n]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,s,r="POST",i){const n={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const l=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(l,n)}async submitFormData(e,s,r="POST",i){const n={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json";const l=new FormData,h=s;for(const x in h)l.set(x,h[x]);const g=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:l,keepalive:this.keepAlive});return await this.handleResult(g,n)}async put(e,s,r){return this.send(e,s,"PUT",r)}async post(e,s,r){return this.send(e,s,"POST",r)}async patch(e,s,r){return this.send(e,s,"PATCH",r)}async delete(e,s,r){return this.send(e,s,"delete",r)}};Re.loadingGetPromises=new Map,Re.tokens=new Map,Re.invalidTokens=[],Re.failledTokenUpdates=new Map,Re.firstCallDoneFlags=new Map;let Os=Re;ze.getApiConfiguration(document.body||document.documentElement);const tu=async(t,e)=>{};/**
60
60
  * @license
61
61
  * Copyright 2017 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
- */let Mn=class extends yr{constructor(e){if(super(e),this.it=ee,e.type!==Zs.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ee||e==null)return this._t=void 0,this.it=e;if(e===zt)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 s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};Mn.directiveName="unsafeHTML",Mn.resultType=1;const He=Es(Mn),Nn=new Map,ua=t=>{if(!t)return null;const e=ze.getApiConfiguration(t),s=ze.getAncestorAttributeValue(t,"wordingProvider"),r=ze.getAncestorAttributeValue(t,"wordingVersionProvider"),i={apiConfiguration:e,wordingProvider:s,wordingVersionProvider:r};let n=null;for(const[o,l]of Nn)if(ut.deepEqual(o,i)){n=l;break}return n||(n={api:new Os(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:r,apiCallKey:i},Nn.set(i,n)),n},ha="",We=class We extends Ln{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=s=>{const r=this.useUnsafeHTML?He(s):s;this.setValue(r)},this.node=e.options.host}unsubscribe(){We.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,s=!1){return this.useUnsafeHTML=s,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),zt}static async callApi(e,s,r=!0,i){if(await ve.getInstance().isLocalStrorageReady,We.firstCall){We.firstCall=!1,yn(We.reloadWordings);const x=Object.keys(We.publisher.get());for(const m of x)We.publisher.get()[m]===ha&&delete We.publisher[m]}if(e){const x=ze.getAncestorAttributeValue(e,"wordingVersionProvider");x&&xi(x).onAssign(We.handleVersionProvider(e))}let n=We.publisher.get()["wording_"+s]!=null;const o=i||ua(e);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const l=o.callIndex,h=o.wordingProvider??"";if(!h&&r){window.setTimeout(async()=>{We.callApi(null,s,!1,o)},1e3);return}const g=o.api;window.queueMicrotask(async()=>{if(n=We.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),We.publisher["wording_"+s].set(ha)),l!==o.callIndex)return;const x=Array.from(o.keysToTranslate);if(!x.length)return;const m=h.split("?"),f=m.shift(),C=(m.length>0?m.join("?")+"&":"")+"labels[]="+x.join("&labels[]="),E=f+"?"+C;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const T=await g.get(E);for(const z in T)We.publisher["wording_"+z].set(T[z])})}static reloadWordings(){for(const e of Nn.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&We.callApi(null,"",!1,e)}static handleVersionProvider(e){const s=ua(e),r=n=>{};if(!s)return r;if(We.versionProviderHandlers.has(s))return We.versionProviderHandlers.get(s)||r;const i=function(n){if(!s.wordingVersionProvider)return;const l=We.publisher.get().__wording_versions__??[];if(n==null)return;const h=l.find(g=>g.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};l.includes(h)||l.push(h),n!==h.version&&(h.version=n,We.publisher.set({__wording_versions__:l}),We.reloadWordings())};return We.versionProviderHandlers.set(s,i),i}subscribe(e){this.unsubscribe(),We.publisher["wording_"+e].onAssign(this.onAssign),We.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};We.publisher=ve.get("sonic-wording",{localStorageMode:"enabled"}),We.firstCall=!0,We.versionProviderHandlers=new Map;let wr=We;const tu=Es(wr);var su=Object.defineProperty,ru=Object.getOwnPropertyDescriptor,rs=(t,e,s,r)=>{for(var i=r>1?void 0:r?ru(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&su(e,s,i),i};let Ti=!1,Fn=new Set;const Tt=(t,e)=>{var i;const s=(i=class extends t{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=l=>{this.props=l}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return ze.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 h=[...(this.shadowRoot||this).children].filter(x=>x.tagName!="STYLE"),g=this.displayContents?"contents":h.length==0?"none":null;g?this.style.display=g:this.style.removeProperty("display")}connectedCallback(){if(i.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let l=!0;const h=new IntersectionObserver(g=>{for(const x of g)if(l&&x.isIntersecting){l=!1,h.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);h.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)),wr.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(),Ti=!Ti)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Ti||this.removeDebugger(),document.body.appendChild(this.debug),Fn.add(this.debug)}),this.addEventListener("mouseout",()=>{Ti||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
63
+ */let Nn=class extends vr{constructor(e){if(super(e),this.it=ee,e.type!==Zs.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ee||e==null)return this._t=void 0,this.it=e;if(e===zt)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 s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};Nn.directiveName="unsafeHTML",Nn.resultType=1;const He=Es(Nn),Fn=new Map,ha=t=>{if(!t)return null;const e=ze.getApiConfiguration(t),s=ze.getAncestorAttributeValue(t,"wordingProvider"),r=ze.getAncestorAttributeValue(t,"wordingVersionProvider"),i={apiConfiguration:e,wordingProvider:s,wordingVersionProvider:r};let n=null;for(const[o,l]of Fn)if(ut.deepEqual(o,i)){n=l;break}return n||(n={api:new Os(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:r,apiCallKey:i},Fn.set(i,n)),n},da="",We=class We extends In{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=s=>{const r=this.useUnsafeHTML?He(s):s;this.setValue(r)},this.node=e.options.host}unsubscribe(){We.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,s=!1){return this.useUnsafeHTML=s,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),zt}static async callApi(e,s,r=!0,i){if(await ye.getInstance().isLocalStrorageReady,We.firstCall){We.firstCall=!1,vn(We.reloadWordings);const x=Object.keys(We.publisher.get());for(const m of x)We.publisher.get()[m]===da&&delete We.publisher[m]}if(e){const x=ze.getAncestorAttributeValue(e,"wordingVersionProvider");x&&xi(x).onAssign(We.handleVersionProvider(e))}let n=We.publisher.get()["wording_"+s]!=null;const o=i||ha(e);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const l=o.callIndex,h=o.wordingProvider??"";if(!h&&r){window.setTimeout(async()=>{We.callApi(null,s,!1,o)},1e3);return}const g=o.api;window.queueMicrotask(async()=>{if(n=We.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),We.publisher["wording_"+s].set(da)),l!==o.callIndex)return;const x=Array.from(o.keysToTranslate);if(!x.length)return;const m=h.split("?"),f=m.shift(),C=(m.length>0?m.join("?")+"&":"")+"labels[]="+x.join("&labels[]="),E=f+"?"+C;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const T=await g.get(E);for(const z in T)We.publisher["wording_"+z].set(T[z])})}static reloadWordings(){for(const e of Fn.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&We.callApi(null,"",!1,e)}static handleVersionProvider(e){const s=ha(e),r=n=>{};if(!s)return r;if(We.versionProviderHandlers.has(s))return We.versionProviderHandlers.get(s)||r;const i=function(n){if(!s.wordingVersionProvider)return;const l=We.publisher.get().__wording_versions__??[];if(n==null)return;const h=l.find(g=>g.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};l.includes(h)||l.push(h),n!==h.version&&(h.version=n,We.publisher.set({__wording_versions__:l}),We.reloadWordings())};return We.versionProviderHandlers.set(s,i),i}subscribe(e){this.unsubscribe(),We.publisher["wording_"+e].onAssign(this.onAssign),We.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};We.publisher=ye.get("sonic-wording",{localStorageMode:"enabled"}),We.firstCall=!0,We.versionProviderHandlers=new Map;let wr=We;const su=Es(wr);var ru=Object.defineProperty,iu=Object.getOwnPropertyDescriptor,rs=(t,e,s,r)=>{for(var i=r>1?void 0:r?iu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ru(e,s,i),i};let Ti=!1,Rn=new Set;const Tt=(t,e)=>{var i;const s=(i=class extends t{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=l=>{this.props=l}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return ze.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 h=[...(this.shadowRoot||this).children].filter(x=>x.tagName!="STYLE"),g=this.displayContents?"contents":h.length==0?"none":null;g?this.style.display=g:this.style.removeProperty("display")}connectedCallback(){if(i.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let l=!0;const h=new IntersectionObserver(g=>{for(const x of g)if(l&&x.isIntersecting){l=!1,h.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);h.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)),wr.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(),Ti=!Ti)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Ti||this.removeDebugger(),document.body.appendChild(this.debug),Rn.add(this.debug)}),this.addEventListener("mouseout",()=>{Ti||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
64
64
  <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">
65
65
  Variable disponible dans la console<br>
66
66
  ctrl + Clique : épingler / désépingler
67
67
  </div>
68
- <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Fn.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Fn=new Set}getApiConfiguration(){return ze.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of o)l.indexOf("wording_")==0&&wr.callApi(this,l.substring(8));wr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return Ai.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=ve.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let l=this.dataProvider;if(!l&&this._props&&(this.dataProvider=l="__subscriber__"+i.instanceCounter),l){this.bindPublisher&&o.set(l,this.bindPublisher());let h=o.get(l,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const g=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+g,h=ut.traverse(h,g.split(".")),o.set(this.dataProvider,h),this.publisher=h}this.publisher=h}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))}},i.instanceCounter=0,i);return rs([u({type:Number})],s.prototype,"collectDependenciesVersion",2),rs([u({type:Boolean})],s.prototype,"displayContents",2),rs([u({type:Boolean})],s.prototype,"noAutoFill",2),rs([u({type:Boolean})],s.prototype,"forceAutoFill",2),rs([u({type:Object})],s.prototype,"propertyMap",2),rs([u({type:String,attribute:"data-title"})],s.prototype,"title",2),rs([u({reflect:!0})],s.prototype,"dataProvider",2),rs([u()],s.prototype,"bindPublisher",2),rs([u()],s.prototype,"props",1),rs([xe()],s.prototype,"shouldRenderLazy",2),s};var iu=Object.defineProperty,nu=(t,e,s,r)=>{for(var i=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(e,s,i)||i);return i&&iu(e,s,i),i};const Yr=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const r=this.templates||[...this.querySelectorAll("template")];for(const i of r)i.hasAttribute(this.templateValueAttribute)&&(this.templateParts[i.getAttribute(this.templateValueAttribute)]=i,this.templatePartsList.push(i)),i.hasAttribute("skeleton")&&(this.templateParts.skeleton=i),i.hasAttribute("no-result")&&(this.templateParts["no-result"]=i),i.hasAttribute("no-item")&&(this.templateParts["no-item"]=i);this.templateList=r.filter(i=>!i.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=r),super.connectedCallback()}}return nu([u({type:Array})],e.prototype,"templates"),e};var ou=Object.defineProperty,au=Object.getOwnPropertyDescriptor,Xe=(t,e,s,r)=>{for(var i=r>1?void 0:r?au(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ou(e,s,i),i};const lu="sonic-date";yn(()=>Ue.updateComponentsLanguage());let Ue=class extends Tt(Yr(Q)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){Ue.dateCompnents.forEach(t=>t.pageLanguage=ze.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite?.split("%s").map(e=>e.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=ze.getLanguage(),Ue.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),Ue.dateCompnents.delete(this)}getDatesParts(t,e,s){const r=this.startDateObject;r.setTime(t*1e3);let i=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=r.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(r,n),!o){const h=i.find(g=>g.type=="literal"&&g.source=="shared"&&g.value.trim().length>0);h&&(h.value=" "+this.duAu[1]+" ",h.type="to"),this.designMode||i.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(r);return this.designMode&&i.forEach(n=>n.value=n.value.replace(/,/g," ")),i[0].value=zr.ucFirst(i[0].value),i.filter(n=>n.hidden!==!0)}dateStringToSeconds(t){return new Date(t).getTime()/1e3}willUpdate(t){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const e=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=e}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return ee;const t={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(t.weekday=this.weekday||"short"),this.hour!=="hidden"&&(t.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(t.minute=this.minute||"2-digit"),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.computedStartDate,this.computedEndDate,t);return He(`${e.map(s=>{const r=this.templateParts[s.type];if(r){const o=document.importNode(r.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const i=document.createElement("span");return i.innerText=s.value,i.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};Ue.dateCompnents=new Set,Xe([u()],Ue.prototype,"wording_billet_periode_validite",1),Xe([u({type:Boolean})],Ue.prototype,"designMode",2),Xe([u({type:String})],Ue.prototype,"time_zone",2),Xe([u({type:Number})],Ue.prototype,"date",2),Xe([u({type:String})],Ue.prototype,"date_string",2),Xe([u({type:String})],Ue.prototype,"start_date_string",2),Xe([u({type:String})],Ue.prototype,"end_date_string",2),Xe([u({type:Number})],Ue.prototype,"start_date",2),Xe([u({type:Number})],Ue.prototype,"end_date",2),Xe([u({type:Boolean})],Ue.prototype,"hide_hours",2),Xe([u({type:String})],Ue.prototype,"era",2),Xe([u({type:String})],Ue.prototype,"year",2),Xe([u({type:String})],Ue.prototype,"month",2),Xe([u({type:String})],Ue.prototype,"day",2),Xe([u({type:String})],Ue.prototype,"weekday",2),Xe([u({type:String})],Ue.prototype,"hour",2),Xe([u({type:Boolean})],Ue.prototype,"hour12",2),Xe([u({type:String})],Ue.prototype,"minute",2),Xe([u({type:String})],Ue.prototype,"language",2),Xe([u({type:Boolean})],Ue.prototype,"renderIf",2),Xe([u({type:Boolean})],Ue.prototype,"now",2),Ue=Xe([X(lu)],Ue);let dt=(st=class{static listen(){if(!st.listening)return;const e=document.location?.href.replace(document.location.origin,"");st.prevURL&&st.prevURL!=e&&(st.prevURL=e,st.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(st.listen)}static offChange(e){const s=st.listeners.indexOf(e);s!=-1&&(st.listeners.splice(s,1),st.listeners.length==0&&(st.listening=!1))}static onChange(e){st.listening||(st.listening=!0,st.listen()),st.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,r=document.referrer;if(s!=null){const l=document.location.origin,h=(s||l).toString(),x=r.indexOf("http")==0?new URL(r).origin!=l:!1,m=r=="",f=history.length<3,C=m&&f,E=h!=document.location.href;if(x&&E||C){const z=history.state||{};z.concorde=z.concorde||{},z.concorde.hasDoneHistoryBack=!0,history.pushState(z,document.title),history.back(),document.location.replace(h)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const n=new URL(i,document.location.href);i=`/${n.pathname.split("/").filter(Boolean).join("/")}${n.search}${n.hash||""}`,e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const r=new URL(s,document.location.href),i=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?n=r.pathname==i.pathname&&r.hash==i.hash:n=i.href.indexOf(r.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},st.listeners=[],st.listening=!1,st.prevURL=document.location?.href.replace(document.location.origin,""),st);/**
68
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Rn.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Rn=new Set}getApiConfiguration(){return ze.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of o)l.indexOf("wording_")==0&&wr.callApi(this,l.substring(8));wr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return Ai.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=ye.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let l=this.dataProvider;if(!l&&this._props&&(this.dataProvider=l="__subscriber__"+i.instanceCounter),l){this.bindPublisher&&o.set(l,this.bindPublisher());let h=o.get(l,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const g=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+g,h=ut.traverse(h,g.split(".")),o.set(this.dataProvider,h),this.publisher=h}this.publisher=h}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))}},i.instanceCounter=0,i);return rs([u({type:Number})],s.prototype,"collectDependenciesVersion",2),rs([u({type:Boolean})],s.prototype,"displayContents",2),rs([u({type:Boolean})],s.prototype,"noAutoFill",2),rs([u({type:Boolean})],s.prototype,"forceAutoFill",2),rs([u({type:Object})],s.prototype,"propertyMap",2),rs([u({type:String,attribute:"data-title"})],s.prototype,"title",2),rs([u({reflect:!0})],s.prototype,"dataProvider",2),rs([u()],s.prototype,"bindPublisher",2),rs([u()],s.prototype,"props",1),rs([xe()],s.prototype,"shouldRenderLazy",2),s};var nu=Object.defineProperty,ou=(t,e,s,r)=>{for(var i=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(e,s,i)||i);return i&&nu(e,s,i),i};const Yr=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const r=this.templates||[...this.querySelectorAll("template")];for(const i of r)i.hasAttribute(this.templateValueAttribute)&&(this.templateParts[i.getAttribute(this.templateValueAttribute)]=i,this.templatePartsList.push(i)),i.hasAttribute("skeleton")&&(this.templateParts.skeleton=i),i.hasAttribute("no-result")&&(this.templateParts["no-result"]=i),i.hasAttribute("no-item")&&(this.templateParts["no-item"]=i);this.templateList=r.filter(i=>!i.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=r),super.connectedCallback()}}return ou([u({type:Array})],e.prototype,"templates"),e};var au=Object.defineProperty,lu=Object.getOwnPropertyDescriptor,Xe=(t,e,s,r)=>{for(var i=r>1?void 0:r?lu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&au(e,s,i),i};const cu="sonic-date";vn(()=>Ue.updateComponentsLanguage());let Ue=class extends Tt(Yr(Q)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){Ue.dateCompnents.forEach(t=>t.pageLanguage=ze.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite?.split("%s").map(e=>e.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=ze.getLanguage(),Ue.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),Ue.dateCompnents.delete(this)}getDatesParts(t,e,s){const r=this.startDateObject;r.setTime(t*1e3);let i=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=r.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(r,n),!o){const h=i.find(g=>g.type=="literal"&&g.source=="shared"&&g.value.trim().length>0);h&&(h.value=" "+this.duAu[1]+" ",h.type="to"),this.designMode||i.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(r);return this.designMode&&i.forEach(n=>n.value=n.value.replace(/,/g," ")),i[0].value=zr.ucFirst(i[0].value),i.filter(n=>n.hidden!==!0)}dateStringToSeconds(t){return new Date(t).getTime()/1e3}willUpdate(t){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const e=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=e}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return ee;const t={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(t.weekday=this.weekday||"short"),this.hour!=="hidden"&&(t.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(t.minute=this.minute||"2-digit"),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.computedStartDate,this.computedEndDate,t);return He(`${e.map(s=>{const r=this.templateParts[s.type];if(r){const o=document.importNode(r.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const i=document.createElement("span");return i.innerText=s.value,i.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};Ue.dateCompnents=new Set,Xe([u()],Ue.prototype,"wording_billet_periode_validite",1),Xe([u({type:Boolean})],Ue.prototype,"designMode",2),Xe([u({type:String})],Ue.prototype,"time_zone",2),Xe([u({type:Number})],Ue.prototype,"date",2),Xe([u({type:String})],Ue.prototype,"date_string",2),Xe([u({type:String})],Ue.prototype,"start_date_string",2),Xe([u({type:String})],Ue.prototype,"end_date_string",2),Xe([u({type:Number})],Ue.prototype,"start_date",2),Xe([u({type:Number})],Ue.prototype,"end_date",2),Xe([u({type:Boolean})],Ue.prototype,"hide_hours",2),Xe([u({type:String})],Ue.prototype,"era",2),Xe([u({type:String})],Ue.prototype,"year",2),Xe([u({type:String})],Ue.prototype,"month",2),Xe([u({type:String})],Ue.prototype,"day",2),Xe([u({type:String})],Ue.prototype,"weekday",2),Xe([u({type:String})],Ue.prototype,"hour",2),Xe([u({type:Boolean})],Ue.prototype,"hour12",2),Xe([u({type:String})],Ue.prototype,"minute",2),Xe([u({type:String})],Ue.prototype,"language",2),Xe([u({type:Boolean})],Ue.prototype,"renderIf",2),Xe([u({type:Boolean})],Ue.prototype,"now",2),Ue=Xe([X(cu)],Ue);let dt=(st=class{static listen(){if(!st.listening)return;const e=document.location?.href.replace(document.location.origin,"");st.prevURL&&st.prevURL!=e&&(st.prevURL=e,st.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(st.listen)}static offChange(e){const s=st.listeners.indexOf(e);s!=-1&&(st.listeners.splice(s,1),st.listeners.length==0&&(st.listening=!1))}static onChange(e){st.listening||(st.listening=!0,st.listen()),st.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,r=document.referrer;if(s!=null){const l=document.location.origin,h=(s||l).toString(),x=r.indexOf("http")==0?new URL(r).origin!=l:!1,m=r=="",f=history.length<3,C=m&&f,E=h!=document.location.href;if(x&&E||C){const z=history.state||{};z.concorde=z.concorde||{},z.concorde.hasDoneHistoryBack=!0,history.pushState(z,document.title),history.back(),document.location.replace(h)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const n=new URL(i,document.location.href);i=`/${n.pathname.split("/").filter(Boolean).join("/")}${n.search}${n.hash||""}`,e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const r=new URL(s,document.location.href),i=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?n=r.pathname==i.pathname&&r.hash==i.hash:n=i.href.indexOf(r.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},st.listeners=[],st.listening=!1,st.prevURL=document.location?.href.replace(document.location.origin,""),st);/**
69
69
  * @license
70
70
  * Copyright 2018 Google LLC
71
71
  * SPDX-License-Identifier: BSD-3-Clause
72
- */const da="important",cu=" !"+da,$t=Es(class extends yr{constructor(t){if(super(t),t.type!==Zs.ATTRIBUTE||t.name!=="style"||t.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(t){return Object.keys(t).reduce(((e,s)=>{const r=t[s];return r==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:s}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(cu);r.includes("-")||n?s.setProperty(r,n?i.slice(0,-11):i,n?da:""):s[r]=i}}return zt}});var uu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,Jt=(t,e,s,r)=>{for(var i=r>1?void 0:r?hu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&uu(e,s,i),i};const Li=new Map,_r=t=>{class e extends t{constructor(...r){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 i=>{this.setFormValueFromPublisher(i)},this.onFormDataInValidate=()=>{const i=this.getFormPublisher();i&&i.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(r){return ze.getAncestorAttributeValue(this,r)!=null}getAncestorAttributeValue(r){return ze.getAncestorAttributeValue(this,r)||""}get name(){return this._name}set name(r){this.hasAttribute("name")&&!this.forceAutoFill&&(r=this.getAttribute("name")),this._name=r,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?ve.get(this.formDataProvider):null}setFormPublisherValue(r){const i=this.getFormPublisher();i&&Ot(i,this.name).set(r)}getFormPublisherValue(){const r=this.getFormPublisher();return r?Ot(r,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(r){this.value=r}get value(){return this._value}set value(r){r==null&&(r=""),ut.isObject(r)&&Object.prototype.hasOwnProperty.call(r,"__value")&&r._value==null&&(r=""),this._value!=r&&(this._value=r,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let r=this.getFormPublisher();const i=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&r&&Ot(r,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),r=this.getFormPublisher(),this._name&&r&&(Ot(r,this._name).onAssign(this.onFormValueAssign),r.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),i&&(this.value=i)}handleBlur(){this.touched=!0}handleChange(r){this.value=r.target.value;const i=new Event("change");this.dispatchEvent(i)}addKeyboardNavigation(){const r=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!r)return;const i=r.split(" "),n=i[0];if(!n)return;for(const l of i){Li.has(l)||Li.set(l,[]);const h=Li.get(l);h?.indexOf(this)==-1&&h.push(this)}const o=Li.get(n);this.addEventListener("keydown",l=>{const h=l;if(!["ArrowDown","ArrowUp"].includes(h.key))return;const g="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",x=o?.filter(C=>{const E=C.shadowRoot?.querySelector(g);if(!E)return!1;const T=window.getComputedStyle(E);return T.display!=="none"&&T.display!==""&&T.pointerEvents!="none"&&T.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let m=null;if(h.key=="ArrowDown"&&x){const C=x.indexOf(this);C==x.length-1?m=x[0]:m=x[C+1]}else if(h.key=="ArrowUp"&&x){const C=x.indexOf(this);C==0?m=x[x.length-1]:m=x[C-1]}const f=m?.shadowRoot?.querySelector(g);f&&f.focus&&(f.focus(),l.preventDefault(),l.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 r=this.getFormPublisher();this._name&&r&&(Ot(r,this._name).offAssign(this.onFormValueAssign),r.offFormInvalidate(this.onFormDataInValidate))}}return Jt([u({type:Boolean,reflect:!0})],e.prototype,"touched",2),Jt([u({type:Boolean})],e.prototype,"error",2),Jt([u({type:Boolean})],e.prototype,"autofocus",2),Jt([u({type:Boolean})],e.prototype,"required",2),Jt([u({type:Boolean})],e.prototype,"forceAutoFill",2),Jt([u({type:Boolean,reflect:!0})],e.prototype,"disabled",2),Jt([u({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Jt([u({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Jt([u({type:String})],e.prototype,"formDataProvider",2),Jt([u()],e.prototype,"name",1),Jt([u()],e.prototype,"value",1),e};let du=class dr{static areEqual(e,s){return e.length===s.length?e.every((r,i)=>r===s[i]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(r=>s=s.concat(r)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const r=(e[0]||{})[s];return e.every(i=>(i||{})[s]==r)}})})}),value:()=>({forKey:s=>dr.from(e.map(r=>r[s]))}),copy:()=>({fromKey:s=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[s])?[...i[s]]:typeof i[s]=="object"&&i[s]!=null?{...i[s]}:i[s]})}})})}),map:s=>dr.from(e.map(s)),filter:s=>dr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const r=[],i=new Map;for(const n of e){const o=n[s];if(!i.has(o)){const l=r.length;i.set(o,l);const h={items:[]};h[s]=o,r.push(h)}r[i.get(o)].items.push(n)}return dr.from(r)}}),without:()=>({duplicates:()=>({forKey:s=>{const r=[...new Set(e.map(i=>i[s]))];return dr.from(r.map(i=>e.find(n=>n[s]==i)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:r=>{const i=(n,o)=>l=>n[o]!=l[o];return dr.from(e.filter(n=>s.every(i(n,r))))}})})})}}};var pa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Zr={exports:{}},pu=Zr.exports,ma;function fu(){return ma||(ma=1,(function(t,e){var s=[].slice;(function(r,i){return e!==null?t.exports=i():r.UrlPattern=i()})(pu,function(){var r,i,n,o,l,h,g,x,m,f,C,E,T,z,U;return m=function(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},g=function(S,y){var M,k,D;for(D=[],M=-1,k=S.length;++M<k;)D=D.concat(y(S[M]));return D},z=function(S,y){var M,k,D;for(D="",M=-1,k=S.length;++M<k;)D+=y(S[M]);return D},T=function(S){return new RegExp(S.toString()+"|").exec("").length-1},C=function(S,y){var M,k,D,Y,j;for(Y={},M=-1,D=S.length;++M<D;)k=S[M],j=y[M],j!=null&&(Y[k]!=null?(Array.isArray(Y[k])||(Y[k]=[Y[k]]),Y[k].push(j)):Y[k]=j);return Y},r={},r.Result=function(S,y){this.value=S,this.rest=y},r.Tagged=function(S,y){this.tag=S,this.value=y},r.tag=function(S,y){return function(M){var k,D;if(k=y(M),k!=null)return D=new r.Tagged(S,k.value),new r.Result(D,k.rest)}},r.regex=function(S){return function(y){var M,k;if(M=S.exec(y),M!=null)return k=M[0],new r.Result(k,y.slice(k.length))}},r.sequence=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var M,k,D,Y,j,ne;for(M=-1,k=S.length,ne=[],Y=y;++M<k;){if(D=S[M],j=D(Y),j==null)return;ne.push(j.value),Y=j.rest}return new r.Result(ne,Y)}},r.pick=function(){var S,y;return S=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],function(M){var k,D;if(D=r.sequence.apply(r,y)(M),D!=null)return k=D.value,D.value=k[S],D}},r.string=function(S){var y;return y=S.length,function(M){if(M.slice(0,y)===S)return new r.Result(S,M.slice(y))}},r.lazy=function(S){var y;return y=null,function(M){return y==null&&(y=S()),y(M)}},r.baseMany=function(S,y,M,k,D){var Y,j,ne,re;for(ne=D,re=M?"":[];!(y!=null&&(Y=y(ne),Y!=null)||(j=S(ne),j==null));)M?re+=j.value:re.push(j.value),ne=j.rest;if(!(k&&re.length===0))return new r.Result(re,ne)},r.many1=function(S){return function(y){return r.baseMany(S,null,!1,!0,y)}},r.concatMany1Till=function(S,y){return function(M){return r.baseMany(S,y,!0,!0,M)}},r.firstChoice=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var M,k,D,Y;for(M=-1,k=S.length;++M<k;)if(D=S[M],Y=D(y),Y!=null)return Y}},E=function(S){var y;return y={},y.wildcard=r.tag("wildcard",r.string(S.wildcardChar)),y.optional=r.tag("optional",r.pick(1,r.string(S.optionalSegmentStartChar),r.lazy(function(){return y.pattern}),r.string(S.optionalSegmentEndChar))),y.name=r.regex(new RegExp("^["+S.segmentNameCharset+"]+")),y.named=r.tag("named",r.pick(1,r.string(S.segmentNameStartChar),r.lazy(function(){return y.name}))),y.escapedChar=r.pick(1,r.string(S.escapeChar),r.regex(/^./)),y.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return y.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(S.segmentNameStartChar),r.string(S.optionalSegmentStartChar),r.string(S.optionalSegmentEndChar),y.wildcard))),y.token=r.lazy(function(){return r.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=r.many1(r.lazy(function(){return y.token})),y},x={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},h=function(S,y){if(Array.isArray(S))return z(S,function(M){return h(M,y)});switch(S.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return m(S.value);case"optional":return"(?:"+h(S.value,y)+")?"}},l=function(S,y){return y==null&&(y=x.segmentValueCharset),"^"+h(S,y)+"$"},o=function(S){if(Array.isArray(S))return g(S,o);switch(S.tag){case"wildcard":return["_"];case"named":return[S.value];case"static":return[];case"optional":return o(S.value)}},f=function(S,y,M,k){var D,Y,j,ne;if(k==null&&(k=!1),ne=S[y],ne==null){if(k)throw new Error("no values provided for key `"+y+"`");return}if(D=M[y]||0,Y=Array.isArray(ne)?ne.length-1:0,D>Y){if(k)throw new Error("too few values provided for key `"+y+"`");return}return j=Array.isArray(ne)?ne[D]:ne,k&&(M[y]=D+1),j},n=function(S,y,M){var k,D;if(Array.isArray(S)){for(k=-1,D=S.length;++k<D;)if(n(S[k],y,M))return!0;return!1}switch(S.tag){case"wildcard":return f(y,"_",M,!1)!=null;case"named":return f(y,S.value,M,!1)!=null;case"static":return!1;case"optional":return n(S.value,y,M)}},U=function(S,y,M){if(Array.isArray(S))return z(S,function(k){return U(k,y,M)});switch(S.tag){case"wildcard":return f(y,"_",M,!0);case"named":return f(y,S.value,M,!0);case"static":return S.value;case"optional":return n(S.value,y,M)?U(S.value,y,M):""}},i=function(S,y){var M,k,D,Y,j;if(S instanceof i){this.isRegex=S.isRegex,this.regex=S.regex,this.ast=S.ast,this.names=S.names;return}if(this.isRegex=S instanceof RegExp,!(typeof S=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=S,y!=null){if(!Array.isArray(y))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=T(this.regex),y.length!==M)throw new Error("regex contains "+M+" groups but array of group names contains "+y.length);this.names=y}return}if(S==="")throw new Error("argument must not be the empty string");if(j=S.replace(/\s+/g,""),j!==S)throw new Error("argument must not contain whitespace");if(k={escapeChar:y?.escapeChar||x.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||x.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||x.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||x.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||x.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||x.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||x.wildcardChar},Y=E(k),D=Y.pattern(S),D==null)throw new Error("couldn't parse pattern");if(D.rest!=="")throw new Error("could only partially parse pattern");this.ast=D.value,this.regex=new RegExp(l(this.ast,k.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(S){var y,M;return M=this.regex.exec(S),M==null?null:(y=M.slice(1),this.names?C(this.names,y):y)},i.prototype.stringify=function(S){if(S==null&&(S={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(S!==Object(S))throw new Error("argument must be an object or undefined");return U(this.ast,S,{})},i.escapeForRegex=m,i.concatMap=g,i.stringConcatMap=z,i.regexGroupCount=T,i.keysAndValuesToObject=C,i.P=r,i.newParser=E,i.defaultOptions=x,i.astNodeToRegexString=l,i.astNodeToNames=o,i.getParam=f,i.astNodeContainsSegmentsForProvidedParams=n,i.stringify=U,i})})(Zr,Zr.exports)),Zr.exports}var mu=fu();const fs=fa(mu);class Ii{constructor(e){this.path=Ii.normalizePath(e)}getDataProviderKey(){return new Cs(this.path)}static normalizePath(e){const s=String(e).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let h;try{h=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return h.pathname=h.pathname.replace(/\/+/g,"/"),h.href}const r=s.indexOf("?"),i=s.indexOf("#");let n=s.length;r>=0&&(n=Math.min(n,r)),i>=0&&(n=Math.min(n,i));let o=s.slice(0,n);const l=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&l)throw new RangeError("Endpoint: path cannot be empty");return o+l}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 gu=50,bu=1e4,vu=100,Rn=new Map;function Mi(t){return yi(t)}function Jr(t){return t.split(".")[0]??t}function Ni(t){const e=t.split("."),s=e.shift();let r=ve.get(s);return e.length&&(r=ut.traverse(r,e)),r}function yu(t){return t==null?!0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.length===0:!1}function wu(t){return Array.isArray(t)?t.length:0}function _u(t,e){for(const o of e)if(o===t||t.startsWith(o+".")||o.startsWith(t+"."))throw new Error(`[derive] Cycle détecté : la sortie "${t}" chevauche l'entrée "${o}".`);const s=Jr(t),r=new Map;for(const[o,l]of Rn)r.set(Jr(o),new Set(l));r.set(s,new Set(e.map(Jr)));const i=new Set,n=o=>{if(i.has(o))return!0;i.add(o);for(const l of r.get(o)??[])if(n(l))return!0;return i.delete(o),!1};if(n(s))throw new Error(`[derive] Cycle détecté (chaîne) : la sortie "${t}" dépend indirectement d'elle-même.`)}function Su(t,e){Rn.set(t,new Set(e.map(s=>Jr(s))))}function Pu(t){Rn.delete(t)}function xu(t){return`${Jr(Mi(t))}/_state_`}function Fi(t,e){const s=xu(t);ve.get(s).set(e)}function Au(t,e,s,r){const i=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:r},n=i.debounceMs??gu,o=i.maxInputItems??bu,l=i.isEmpty??yu,h=Mi(i.output),g=Object.entries(i.inputs).map(([ie,q])=>({alias:ie,path:Mi(q)})),x=g.map(ie=>ie.path),m=i.variables?Mi(i.variables):null;_u(h,x),Su(h,x);const f=Ni(h);let C,E=!1,T=0,z=null,U=!1,S="";const y=ie=>{E=!0,C=ie,f.set(ie),E=!1},M=()=>{E||U||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${h}".`),C!==void 0&&(E=!0,f.set(C),E=!1))};f.onAssign(M,!1);const k=()=>{const ie={};for(const{alias:q,path:le}of g){const pe=Ni(le).get(),Be=wu(pe);Be>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${Be} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[q]=pe}return ie},D=()=>m?Ni(m).get()??{}:{},Y=async()=>{if(U)return;const ie=++T;Fi(h,{status:"loading",error:null});const q=k(),le=D(),pe=JSON.stringify({inputs:q,vars:le});if(pe===S&&C!==void 0){Fi(h,{status:l(C)?"empty":"ready",error:null});return}const Be=typeof performance<"u"?performance.now():Date.now();try{const ue=await Promise.resolve(i.compute(q,le));if(U||ie!==T)return;const ge=(typeof performance<"u"?performance.now():Date.now())-Be;ge>vu&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(ge)} ms) → "${h}".`),S=pe,y(ue),Fi(h,{status:l(ue)?"empty":"ready",error:null})}catch(ue){if(U||ie!==T)return;const ge=ue instanceof Error?ue.message:String(ue);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${h}" :`,ge),Fi(h,{status:"error",error:ge})}},j=()=>{U||(z&&clearTimeout(z),z=setTimeout(()=>{z=null,Y()},n))},ne=[],re=ie=>{const q=Ni(ie),le=()=>j();q.onInternalMutation(le),ne.push({pub:q,handler:le})};for(const{path:ie}of g)re(ie);return m&&re(m),j(),{stop(){if(!U){U=!0,z&&clearTimeout(z);for(const{pub:ie,handler:q}of ne)ie.offInternalMutation(q);f.offAssign(M),Pu(h)}},recompute(){S="",Y()}}}function Ri(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jn={exports:{}},ga;function Cu(){return ga||(ga=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(r,i,n){function o(g,x){if(!i[g]){if(!r[g]){var m=typeof Ri=="function"&&Ri;if(!x&&m)return m(g,!0);if(l)return l(g,!0);var f=new Error("Cannot find module '"+g+"'");throw f.code="MODULE_NOT_FOUND",f}var C=i[g]={exports:{}};r[g][0].call(C.exports,function(E){var T=r[g][1][E];return o(T||E)},C,C.exports,s,r,i,n)}return i[g].exports}for(var l=typeof Ri=="function"&&Ri,h=0;h<n.length;h++)o(n[h]);return o}return s})()({1:[function(s,r,i){const n=s("./utils"),o=(function(){const l=n.stringToArray,h=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],g=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],x=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],m=["Thousand","Million","Billion","Trillion"];function f(O,I){var $=function(B,V,N){var G="";if(B<=19)G=(V?" and ":"")+(N?g[B]:h[B]);else if(B<100){const Ce=Math.floor(B/10),me=B%10;G=(V?" and ":"")+x[Ce-2],me>0?G+="-"+$(me,!1,N):N&&(G=G.substring(0,G.length-1)+"ieth")}else if(B<1e3){const Ce=Math.floor(B/100),me=B%100;G=(V?", ":"")+h[Ce]+" Hundred",me>0?G+=$(me,!0,N):N&&(G+="th")}else{var ae=Math.floor(Math.log10(B)/3);ae>m.length&&(ae=m.length);const Ce=Math.pow(10,ae*3),me=Math.floor(B/Ce),fe=B-me*Ce;G=(V?", ":"")+$(me,!1,!1)+" "+m[ae-1],fe>0?G+=$(fe,!0,N):N&&(G+="th")}return G},F=$(O,!1,I);return F}const C=Object.create(null);h.forEach(function(O,I){C[O.toLowerCase()]=I}),g.forEach(function(O,I){C[O.toLowerCase()]=I}),x.forEach(function(O,I){const $=O.toLowerCase();C[$]=(I+2)*10,C[$.substring(0,O.length-1)+"ieth"]=C[$]}),C.hundredth=100,m.forEach(function(O,I){const $=O.toLowerCase(),F=Math.pow(10,(I+1)*3);C[$]=F,C[$+"th"]=F});function E(O){const $=O.split(/,\s|\sand\s|[\s\\-]/).map(V=>C[V]);let F=[0];return $.forEach(V=>{if(V<100){let N=F.pop();N>=1e3&&(F.push(N),N=0),F.push(N+V)}else F.push(F.pop()*V)}),F.reduce((V,N)=>V+N,0)}const T=[[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"]],z={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function U(O){for(var I=0;I<T.length;I++){const $=T[I];if(O>=$[0])return $[1]+U(O-$[0])}return""}function S(O){for(var I=0,$=1,F=O.length-1;F>=0;F--){const B=O[F],V=z[B];V<$?I-=V:($=V,I+=V)}return I}function y(O,I){for(var $=[],F=I.charCodeAt(0);O>0;)$.unshift(String.fromCharCode((O-1)%26+F)),O=Math.floor((O-1)/26);return $.join("")}function M(O,I){for(var $=I.charCodeAt(0),F=0,B=0;B<O.length;B++)F+=(O.charCodeAt(O.length-B-1)-$+1)*Math.pow(26,B);return F}function k(O,I){if(typeof O>"u")return;O=Math.floor(O);const $=re(I);return j(O,$)}const D={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},Y={UPPER:"upper",LOWER:"lower",TITLE:"title"};function j(O,I){let $;const F=O<0;switch(O=Math.abs(O),I.primary){case D.LETTERS:$=y(O,I.case===Y.UPPER?"A":"a");break;case D.ROMAN:$=U(O),I.case===Y.UPPER&&($=$.toUpperCase());break;case D.WORDS:$=f(O,I.ordinal),I.case===Y.UPPER?$=$.toUpperCase():I.case===Y.LOWER&&($=$.toLowerCase());break;case D.DECIMAL:$=""+O;var B=I.mandatoryDigits-$.length;if(B>0){var V=new Array(B+1).join("0");$=V+$}if(I.zeroCode!==48&&($=l($).map(Ce=>String.fromCodePoint(Ce.codePointAt(0)+I.zeroCode-48)).join("")),I.regular){const Ce=Math.floor(($.length-1)/I.groupingSeparators.position);for(let me=Ce;me>0;me--){const fe=$.length-me*I.groupingSeparators.position;$=$.substr(0,fe)+I.groupingSeparators.character+$.substr(fe)}}else I.groupingSeparators.reverse().forEach(Ce=>{const me=$.length-Ce.position;$=$.substr(0,me)+Ce.character+$.substr(me)});if(I.ordinal){var N={1:"st",2:"nd",3:"rd"},G=$[$.length-1],ae=N[G];(!ae||$.length>1&&$[$.length-2]==="1")&&(ae="th"),$=$+ae}break;case D.SEQUENCE:throw{code:"D3130",value:I.token}}return F&&($="-"+$),$}const ne=[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 re(O){const I={type:"integer",primary:D.DECIMAL,case:Y.LOWER,ordinal:!1};let $,F;const B=O.lastIndexOf(";");switch(B===-1?$=O:($=O.substring(0,B),F=O.substring(B+1),F[0]==="o"&&(I.ordinal=!0)),$){case"A":I.case=Y.UPPER;case"a":I.primary=D.LETTERS;break;case"I":I.case=Y.UPPER;case"i":I.primary=D.ROMAN;break;case"W":I.case=Y.UPPER,I.primary=D.WORDS;break;case"Ww":I.case=Y.TITLE,I.primary=D.WORDS;break;case"w":I.primary=D.WORDS;break;default:{let V=null,N=0,G=0,ae=[],Ce=0;if(l($).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let he=!1;for(let De=0;De<ne.length;De++){const de=ne[De];if(fe>=de&&fe<=de+9){if(he=!0,N++,Ce++,V===null)V=de;else if(de!==V)throw{code:"D3131"};break}}he||(fe===35?(Ce++,G++):ae.push({position:Ce,character:String.fromCodePoint(fe)}))}),N>0){I.primary=D.DECIMAL,I.zeroCode=V,I.mandatoryDigits=N,I.optionalDigits=G;const he=function(De){if(De.length===0)return 0;const de=De[0].character;for(let it=1;it<De.length;it++)if(De[it].character!==de)return 0;const mt=De.map(it=>it.position),Yt=function(it,Pt){return Pt===0?it:Yt(Pt,it%Pt)},St=mt.reduce(Yt);for(let it=1;it<=mt.length;it++)if(mt.indexOf(it*St)===-1)return 0;return St}(ae);he>0?(I.regular=!0,I.groupingSeparators={position:he,character:ae[0].character}):(I.regular=!1,I.groupingSeparators=ae)}else I.primary=D.SEQUENCE,I.token=$}}return I}const ie={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 q(O){var I=[];const $={type:"datetime",parts:I},F=function(he,De){if(De>he){let de=O.substring(he,De);de=de.split("]]").join("]"),I.push({type:"literal",value:de})}};for(var B=0,V=0;V<O.length;){if(O.charAt(V)==="["){if(O.charAt(V+1)==="["){F(B,V),I.push({type:"literal",value:"["}),V+=2,B=V;continue}if(F(B,V),B=V,V=O.indexOf("]",B),V===-1)throw{code:"D3135"};let he=O.substring(B+1,V);he=he.split(/\s+/).join("");var N={type:"marker",component:he.charAt(0)},G=he.lastIndexOf(","),ae;if(G!==-1){const De=he.substring(G+1),de=De.indexOf("-");let mt,Yt;const St=function(Pt){if(!(typeof Pt>"u"||Pt==="*"))return parseInt(Pt)};de===-1?mt=De:(mt=De.substring(0,de),Yt=De.substring(de+1));const it={min:St(mt),max:St(Yt)};N.width=it,ae=he.substring(1,G)}else ae=he.substring(1);if(ae.length===1)N.presentation1=ae;else if(ae.length>1){var Ce=ae.charAt(ae.length-1);"atco".indexOf(Ce)!==-1?(N.presentation2=Ce,Ce==="o"&&(N.ordinal=!0),N.presentation1=ae.substring(0,ae.length-1)):N.presentation1=ae}else N.presentation1=ie[N.component];if(typeof N.presentation1>"u")throw{code:"D3132",value:N.component};if(N.presentation1[0]==="n")N.names=Y.LOWER;else if(N.presentation1[0]==="N")N.presentation1[1]==="n"?N.names=Y.TITLE:N.names=Y.UPPER;else if("YMDdFWwXxHhmsf".indexOf(N.component)!==-1){var me=N.presentation1;if(N.presentation2&&(me+=";"+N.presentation2),N.integerFormat=re(me),N.width&&N.width.min!==void 0&&N.integerFormat.mandatoryDigits<N.width.min&&(N.integerFormat.mandatoryDigits=N.width.min),N.component==="Y")if(N.n=-1,N.width&&N.width.max!==void 0)N.n=N.width.max,N.integerFormat.mandatoryDigits=N.n;else{var fe=N.integerFormat.mandatoryDigits+N.integerFormat.optionalDigits;fe>=2&&(N.n=fe)}const De=I[I.length-1];De&&De.integerFormat&&(De.integerFormat.parseWidth=De.integerFormat.mandatoryDigits)}(N.component==="Z"||N.component==="z")&&(N.integerFormat=re(N.presentation1)),I.push(N),B=V+1}V++}return F(B,V),$}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Be=1e3*60*60*24,ue=function(O){const I=Date.UTC(O.year,O.month);var $=new Date(I).getUTCDay();return $===0&&($=7),$>4?I+(8-$)*Be:I-($-1)*Be},ge=function(O,I){return{year:O,month:I,nextMonth:function(){return I===11?ge(O+1,0):ge(O,I+1)},previousMonth:function(){return I===0?ge(O-1,11):ge(O,I-1)},nextYear:function(){return ge(O+1,I)},previousYear:function(){return ge(O-1,I)}}},$e=function(O,I){return(I-O)/(Be*7)+1},ce=(O,I)=>{let $;switch(I){case"Y":$=O.getUTCFullYear();break;case"M":$=O.getUTCMonth()+1;break;case"D":$=O.getUTCDate();break;case"d":{const F=Date.UTC(O.getUTCFullYear(),O.getUTCMonth(),O.getUTCDate()),B=Date.UTC(O.getUTCFullYear(),0);$=(F-B)/Be+1;break}case"F":$=O.getUTCDay(),$===0&&($=7);break;case"W":{const F=ge(O.getUTCFullYear(),0),B=ue(F),V=Date.UTC(F.year,O.getUTCMonth(),O.getUTCDate());let N=$e(B,V);if(N>52){const G=ue(F.nextYear());V>=G&&(N=1)}else if(N<1){const G=ue(F.previousYear());N=$e(G,V)}$=Math.floor(N);break}case"w":{const F=ge(O.getUTCFullYear(),O.getUTCMonth()),B=ue(F),V=Date.UTC(F.year,F.month,O.getUTCDate());let N=$e(B,V);if(N>4){const G=ue(F.nextMonth());V>=G&&(N=1)}else if(N<1){const G=ue(F.previousMonth());N=$e(G,V)}$=Math.floor(N);break}case"X":{const F=ge(O.getUTCFullYear(),0),B=ue(F),V=ue(F.nextYear()),N=O.getTime();N<B?$=F.year-1:N>=V?$=F.year+1:$=F.year;break}case"x":{const F=ge(O.getUTCFullYear(),O.getUTCMonth()),B=ue(F),V=F.nextMonth(),N=ue(V),G=O.getTime();G<B?$=F.previousMonth().month+1:G>=N?$=V.month+1:$=F.month+1;break}case"H":$=O.getUTCHours();break;case"h":$=O.getUTCHours(),$=$%12,$===0&&($=12);break;case"P":$=O.getUTCHours()>=12?"pm":"am";break;case"m":$=O.getUTCMinutes();break;case"s":$=O.getUTCSeconds();break;case"f":$=O.getUTCMilliseconds();break;case"Z":case"z":break;case"C":$="ISO";break;case"E":$="ISO";break}return $};let W=null;function Ae(O,I,$){var F=0,B=0;if(typeof $<"u"){const me=parseInt($);F=Math.floor(me/100),B=me%100}var V=function(me,fe){var he=ce(me,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(he=he%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")he=pe[he-1];else if(fe.component==="F")he=le[he];else throw{code:"D3133",value:fe.component};fe.names===Y.UPPER?he=he.toUpperCase():fe.names===Y.LOWER&&(he=he.toLowerCase()),fe.width&&he.length>fe.width.max&&(he=he.substring(0,fe.width.max))}else he=j(he,fe.integerFormat);else if(fe.component==="f")he=j(he,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const De=F*100+B;if(fe.integerFormat.regular)he=j(De,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)he=j(F,fe.integerFormat),B!==0&&(he+=":"+k(B,"00"));else if(de===3||de===4)he=j(De,fe.integerFormat);else throw{code:"D3134",value:de}}De>=0&&(he="+"+he),fe.component==="z"&&(he="GMT"+he),De===0&&fe.presentation2==="t"&&(he="Z")}else fe.component==="P"&&fe.names===Y.UPPER&&(he=he.toUpperCase());return he};let N;typeof I>"u"?(W===null&&(W=q("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),N=W):N=q(I);const G=(60*F+B)*60*1e3,ae=new Date(O+G);let Ce="";return N.parts.forEach(function(me){me.type==="literal"?Ce+=me.value:Ce+=V(ae,me)}),Ce}function b(O){var I=Object.create(null);if(O.type==="datetime")I.type="datetime",I.parts=O.parts.map(function($){var F=Object.create(null);if($.type==="literal")F.regex=$.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if($.component==="Z"||$.component==="z"){let V;Array.isArray($.integerFormat.groupingSeparators)||(V=$.integerFormat.groupingSeparators),F.regex="",$.component==="z"&&(F.regex="GMT"),F.regex+="[-+][0-9]+",V&&(F.regex+=V.character+"[0-9]+"),F.parse=function(N){$.component==="z"&&(N=N.substring(3));let G=0,ae=0;return V?(G=Number.parseInt(N.substring(0,N.indexOf(V.character))),ae=Number.parseInt(N.substring(N.indexOf(V.character)+1))):N.length-1<=2?G=Number.parseInt(N):(G=Number.parseInt(N.substring(0,3)),ae=Number.parseInt(N.substring(3))),G*60+ae}}else if($.component==="f")F.regex="[0-9]+",F.parse=function(V){return parseFloat("0."+V.substring(0,3))*1e3};else if($.integerFormat)F=b($.integerFormat);else{F.regex="[a-zA-Z]+";var B=Object.create(null);if($.component==="M"||$.component==="x")pe.forEach(function(V,N){$.width&&$.width.max?B[V.substring(0,$.width.max)]=N+1:B[V]=N+1});else if($.component==="F")le.forEach(function(V,N){N>0&&($.width&&$.width.max?B[V.substring(0,$.width.max)]=N:B[V]=N)});else if($.component==="P")B={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:$.component};F.parse=function(V){return B[V]}}return F.component=$.component,F});else{I.type="integer";const $=O.case===Y.UPPER;switch(O.primary){case D.LETTERS:I.regex=$?"[A-Z]+":"[a-z]+",I.parse=function(F){return M(F,$?"A":"a")};break;case D.ROMAN:I.regex=$?"[MDCLXVI]+":"[mdclxvi]+",I.parse=function(F){return S($?F:F.toUpperCase())};break;case D.WORDS:I.regex="(?:"+n.keys(C).concat("and","[\\-, ]").join("|")+")+",I.parse=function(F){return E(F.toLowerCase())};break;case D.DECIMAL:I.regex="[0-9]",O.parseWidth?I.regex+=`{${O.parseWidth}}`:I.regex+="+",O.ordinal&&(I.regex+="(?:th|st|nd|rd)"),I.parse=function(F){let B=F;return O.ordinal&&(B=F.substring(0,F.length-2)),O.regular?B=B.split(",").join(""):O.groupingSeparators.forEach(V=>{B=B.split(V.character).join("")}),O.zeroCode!==48&&(B=B.split("").map(V=>String.fromCodePoint(V.codePointAt(0)-O.zeroCode+48)).join("")),parseInt(B)};break;case D.SEQUENCE:throw{code:"D3130",value:O.token}}}return I}function _(O,I){if(typeof O>"u")return;const $=re(I);return b($).parse(O)}function te(O,I){const $=q(I),F=b($),B="^"+F.parts.map(ae=>"("+ae.regex+")").join("")+"$";var N=new RegExp(B,"i").exec(O);if(N!==null){const de=Object.create(null);for(let d=1;d<N.length;d++){const v=F.parts[d-1];v.parse&&(de[v.component]=v.parse(N[d]))}if(Object.getOwnPropertyNames(de).length===0)return;let mt=0;const Yt=d=>{mt<<=1,mt+=d?1:0},St=d=>!(~d&mt)&&!!(d&mt);"YXMxWwdD".split("").forEach(d=>Yt(de[d]));const Pt=!St(161)&&St(130),Ps=St(84),Nr=!Ps&&St(72);mt=0,"PHhmsf".split("").forEach(d=>Yt(de[d]));const J=!St(23)&&St(47),ts=(Pt?"YD":Ps?"XxwF":Nr?"XWF":"YMD")+(J?"Phmsf":"Hmsf"),mi=this.environment.timestamp;let ds=!1,ur=!1;if(ts.split("").forEach(d=>{if(typeof de[d]>"u")ds?(de[d]="MDd".indexOf(d)!==-1?1:0,ur=!0):de[d]=ce(mi,d);else if(ds=!0,ur)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,Pt){const d=Date.UTC(de.Y,0),v=(de.d-1)*1e3*60*60*24,w=new Date(d+v);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(Ps)throw{code:"D3136"};if(Nr)throw{code:"D3136"};J&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var G=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(G-=(de.Z||de.z)*60*1e3),G}}var we=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 Pe(O,I){if(!(typeof O>"u"))if(typeof I>"u"){if(!we.test(O))throw{stack:new Error().stack,code:"D3110",value:O};return Date.parse(O)}else return te.call(this,O,I)}function Ee(O,I,$){if(!(typeof O>"u"))return Ae.call(this,O,I,$)}return{formatInteger:k,parseInteger:_,fromMillis:Ee,toMillis:Pe}})();r.exports=o},{"./utils":6}],2:[function(s,r,i){(function(n){(function(){var o=s("./utils");const l=(()=>{var h=o.isNumeric,g=o.isArrayOfStrings,x=o.isArrayOfNumbers,m=o.isSequence,f=o.isFunction,C=o.isLambda,E=o.isPromise,T=o.getFunctionArity,z=o.isDeepEqual,U=o.stringToArray;function S(a){if(!(typeof a>"u")){var c=0;return a.forEach(function(p){c+=p}),c}}function y(a){return typeof a>"u"?0:a.length}function M(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function k(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function D(a){if(!(typeof a>"u"||a.length===0)){var c=0;return a.forEach(function(p){c+=p}),c/a.length}}function Y(a,c=!1){if(!(typeof a>"u")){var p;if(typeof a=="string")p=a;else if(f(a))p="";else{if(typeof a=="number"&&!isFinite(a))throw{code:"D3001",value:a,stack:new Error().stack};var A=c?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(P,L){return typeof L<"u"&&L!==null&&h(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},A)}return p}}function j(a,c,p){if(!(typeof a>"u")){var A=U(a),P=A.length;if(P+c<0&&(c=0),typeof p<"u"){if(p<=0)return"";var L=c>=0?c+p:P+c+p;return A.slice(c,L).join("")}return A.slice(c).join("")}}function ne(a,c){if(!(typeof a>"u")){var p=a.indexOf(c);return p>-1?a.substr(0,p):a}}function re(a,c){if(!(typeof a>"u")){var p=a.indexOf(c);return p>-1?a.substr(p+c.length):a}}function ie(a){if(!(typeof a>"u"))return a.toLowerCase()}function q(a){if(!(typeof a>"u"))return a.toUpperCase()}function le(a){if(!(typeof a>"u"))return U(a).length}function pe(a){if(!(typeof a>"u")){var c=a.replace(/[ \t\n\r]+/gm," ");return c.charAt(0)===" "&&(c=c.substring(1)),c.charAt(c.length-1)===" "&&(c=c.substring(0,c.length-1)),c}}function Be(a,c,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var A;c=Math.trunc(c);var P=Math.abs(c)-le(a);if(P>0){var L=new Array(P+1).join(p);p.length>1&&(L=j(L,0,P)),c>0?A=a+L:A=L+a}else A=a;return A}}async function ue(a,c){var p=a.apply(this,[c]);if(E(p)&&(p=await p),p&&!(typeof p.start=="number"||p.end==="number"||Array.isArray(p.groups)||f(p.next)))throw{code:"T1010",stack:new Error().stack};return p}async function ge(a,c){if(!(typeof a>"u"||typeof c>"u")){var p;if(typeof c=="string")p=a.indexOf(c)!==-1;else{var A=await ue(c,a);p=typeof A<"u"}return p}}async function $e(a,c,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var A=this.createSequence();if(typeof p>"u"||p>0){var P=0,L=await ue(c,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||P<p);)A.push({match:L.match,index:L.start,groups:L.groups}),L=await ue(L.next),P++}return A}}async function ce(a,c,p,A){if(!(typeof a>"u")){var P=this;if(c==="")throw{code:"D3010",stack:new Error().stack,value:c,index:2};if(A<0)throw{code:"D3011",stack:new Error().stack,value:A,index:4};var L;typeof p=="string"?L=function(Ge){for(var nt="",Me=0,Qe=p.indexOf("$",Me);Qe!==-1&&Me<p.length;){nt+=p.substring(Me,Qe),Me=Qe+1;var Zt=p.charAt(Me);if(Zt==="$")nt+="$",Me++;else if(Zt==="0")nt+=Ge.match,Me++;else{var xt;if(Ge.groups.length===0?xt=1:xt=Math.floor(Math.log(Ge.groups.length)*Math.LOG10E)+1,Qe=parseInt(p.substring(Me,Me+xt),10),xt>1&&Qe>Ge.groups.length&&(Qe=parseInt(p.substring(Me,Me+xt-1),10)),isNaN(Qe))nt+="$";else{if(Ge.groups.length>0){var ps=Ge.groups[Qe-1];typeof ps<"u"&&(nt+=ps)}Me+=Qe.toString().length}}Qe=p.indexOf("$",Me)}return nt+=p.substring(Me),nt}:L=p;var H="",K=0;if(typeof A>"u"||A>0){var _e=0;if(typeof c=="string"){for(var oe=a.indexOf(c,K);oe!==-1&&(typeof A>"u"||_e<A);)H+=a.substring(K,oe),H+=p,K=oe+c.length,_e++,oe=a.indexOf(c,K);H+=a.substring(K)}else{var je=await ue(c,a);if(typeof je<"u"){for(;typeof je<"u"&&(typeof A>"u"||_e<A);){H+=a.substring(K,je.start);var Ke=L.apply(P,[je]);if(E(Ke)&&(Ke=await Ke),typeof Ke=="string")H+=Ke;else throw{code:"D3012",stack:new Error().stack,value:Ke};K=je.start+je.match.length,_e++,je=await ue(je.next)}H+=a.substring(K)}else H=a}}else H=a;return H}}function W(a){if(!(typeof a>"u")){var c=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return c(a)}}function Ae(a){if(!(typeof a>"u")){var c=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return c(a)}}function b(a){if(!(typeof a>"u")){var c;try{c=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return c}}function _(a){if(!(typeof a>"u")){var c;try{c=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return c}}function te(a){if(!(typeof a>"u")){var c;try{c=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return c}}function we(a){if(!(typeof a>"u")){var c;try{c=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return c}}async function Pe(a,c,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var A=[];if(typeof p>"u"||p>0)if(typeof c=="string")A=a.split(c,p);else{var P=0,L=await ue(c,a);if(typeof L<"u"){for(var H=0;typeof L<"u"&&(typeof p>"u"||P<p);)A.push(a.substring(H,L.start)),H=L.end,L=await ue(L.next),P++;(typeof p>"u"||P<p)&&A.push(a.substring(H))}else A.push(a)}return A}}function Ee(a,c){if(!(typeof a>"u"))return typeof c>"u"&&(c=""),a.join(c)}function O(a,c,p){if(!(typeof a>"u")){var A={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},P=A;typeof p<"u"&&o.keys(p).forEach(function(be){P[be]=p[be]});for(var L=[],H=P["zero-digit"].charCodeAt(0),K=H;K<H+10;K++)L.push(String.fromCharCode(K));var _e=L.concat([P["decimal-separator"],P["exponent-separator"],P["grouping-separator"],P.digit,P["pattern-separator"]]),oe=c.split(P["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var je=function(be){var Ze=(function(){for(var ht,Bt=0;Bt<be.length;Bt++)if(ht=be.charAt(Bt),_e.indexOf(ht)!==-1&&ht!==P["exponent-separator"])return be.substring(0,Bt);return""})(),Ct=(function(){for(var ht,Bt=be.length-1;Bt>=0;Bt--)if(ht=be.charAt(Bt),_e.indexOf(ht)!==-1&&ht!==P["exponent-separator"])return be.substring(Bt+1);return""})(),Ye=be.substring(Ze.length,be.length-Ct.length),Rt,Hs,jt,hr,qt=be.indexOf(P["exponent-separator"],Ze.length);qt===-1||qt>be.length-Ct.length?(Rt=Ye,Hs=void 0):(Rt=Ye.substring(0,qt),Hs=Ye.substring(qt+1));var ss=Rt.indexOf(P["decimal-separator"]);return ss===-1?(jt=Rt,hr=Ct):(jt=Rt.substring(0,ss),hr=Rt.substring(ss+1)),{prefix:Ze,suffix:Ct,activePart:Ye,mantissaPart:Rt,exponentPart:Hs,integerPart:jt,fractionalPart:hr,subpicture:be}},Ke=function(be){var Ze,Ct,Ye=be.subpicture,Rt=Ye.indexOf(P["decimal-separator"]);Rt!==Ye.lastIndexOf(P["decimal-separator"])&&(Ze="D3081"),Ye.indexOf(P.percent)!==Ye.lastIndexOf(P.percent)&&(Ze="D3082"),Ye.indexOf(P["per-mille"])!==Ye.lastIndexOf(P["per-mille"])&&(Ze="D3083"),Ye.indexOf(P.percent)!==-1&&Ye.indexOf(P["per-mille"])!==-1&&(Ze="D3084");var Hs=!1;for(Ct=0;Ct<be.mantissaPart.length;Ct++){var jt=be.mantissaPart.charAt(Ct);if(L.indexOf(jt)!==-1||jt===P.digit){Hs=!0;break}}Hs||(Ze="D3085");var hr=be.activePart.split("").map(function(ht){return _e.indexOf(ht)===-1?"p":"a"}).join("");hr.indexOf("p")!==-1&&(Ze="D3086"),Rt!==-1?(Ye.charAt(Rt-1)===P["grouping-separator"]||Ye.charAt(Rt+1)===P["grouping-separator"])&&(Ze="D3087"):be.integerPart.charAt(be.integerPart.length-1)===P["grouping-separator"]&&(Ze="D3088"),Ye.indexOf(P["grouping-separator"]+P["grouping-separator"])!==-1&&(Ze="D3089");var qt=be.integerPart.indexOf(P.digit);qt!==-1&&be.integerPart.substring(0,qt).split("").filter(function(ht){return L.indexOf(ht)>-1}).length>0&&(Ze="D3090"),qt=be.fractionalPart.lastIndexOf(P.digit),qt!==-1&&be.fractionalPart.substring(qt).split("").filter(function(ht){return L.indexOf(ht)>-1}).length>0&&(Ze="D3091");var ss=typeof be.exponentPart=="string";if(ss&&be.exponentPart.length>0&&(Ye.indexOf(P.percent)!==-1||Ye.indexOf(P["per-mille"])!==-1)&&(Ze="D3092"),ss&&(be.exponentPart.length===0||be.exponentPart.split("").filter(function(ht){return L.indexOf(ht)===-1}).length>0)&&(Ze="D3093"),Ze)throw{code:Ze,stack:new Error().stack}},Ge=function(be){var Ze=function(gt,bn){for(var vi=[],xs=gt.indexOf(P["grouping-separator"]);xs!==-1;){var vn=(bn?gt.substring(0,xs):gt.substring(xs)).split("").filter(function(jr){return L.indexOf(jr)!==-1||jr===P.digit}).length;vi.push(vn),xs=be.integerPart.indexOf(P["grouping-separator"],xs+1)}return vi},Ct=Ze(be.integerPart),Ye=function(gt){if(gt.length===0)return 0;for(var bn=function(vn,jr){return jr===0?vn:bn(jr,vn%jr)},vi=gt.reduce(bn),xs=1;xs<=gt.length;xs++)if(gt.indexOf(xs*vi)===-1)return 0;return vi},Rt=Ye(Ct),Hs=Ze(be.fractionalPart,!0),jt=be.integerPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length,hr=jt,qt=be.fractionalPart.split(""),ss=qt.filter(function(gt){return L.indexOf(gt)!==-1}).length,ht=qt.filter(function(gt){return L.indexOf(gt)!==-1||gt===P.digit}).length,Bt=typeof be.exponentPart=="string";jt===0&&ht===0&&(Bt?(ss=1,ht=1):jt=1),Bt&&jt===0&&be.integerPart.indexOf(P.digit)!==-1&&(jt=1),jt===0&&ss===0&&(ss=1);var sc=0;return Bt&&(sc=be.exponentPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length),{integerPartGroupingPositions:Ct,regularGrouping:Rt,minimumIntegerPartSize:jt,scalingFactor:hr,prefix:be.prefix,fractionalPartGroupingPositions:Hs,minimumFactionalPartSize:ss,maximumFactionalPartSize:ht,minimumExponentSize:sc,suffix:be.suffix,picture:be.subpicture}},nt=oe.map(je);nt.forEach(Ke);var Me=nt.map(Ge),Qe=P["minus-sign"],Zt=P["zero-digit"],xt=P["decimal-separator"],ps=P["grouping-separator"];Me.length===1&&(Me.push(JSON.parse(JSON.stringify(Me[0]))),Me[1].prefix=Qe+Me[1].prefix);var ot;a>=0?ot=Me[0]:ot=Me[1];var gi;ot.picture.indexOf(P.percent)!==-1?gi=a*100:ot.picture.indexOf(P["per-mille"])!==-1?gi=a*1e3:gi=a;var Bs,Rr;if(ot.minimumExponentSize===0)Bs=gi;else{var vg=Math.pow(10,ot.scalingFactor),yg=Math.pow(10,ot.scalingFactor-1);if(Bs=gi,Rr=0,Bs!==0){for(;Math.abs(Bs)<yg;)Bs*=10,Rr-=1;for(;Math.abs(Bs)>vg;)Bs/=10,Rr+=1}}var wg=N(Bs,ot.maximumFactionalPartSize),ec=function(be,Ze){var Ct=Math.abs(be).toFixed(Ze);return Zt!=="0"&&(Ct=Ct.split("").map(function(Ye){return Ye>="0"&&Ye<="9"?L[Ye.charCodeAt(0)-48]:Ye}).join("")),Ct},ke=ec(wg,ot.maximumFactionalPartSize),At=ke.indexOf(".");for(At===-1?ke=ke+xt:ke=ke.replace(".",xt);ke.charAt(0)===Zt;)ke=ke.substring(1);for(;ke.charAt(ke.length-1)===Zt;)ke=ke.substring(0,ke.length-1);At=ke.indexOf(xt);var bi=ot.minimumIntegerPartSize-At,tc=ot.minimumFactionalPartSize-(ke.length-At-1);if(ke=(bi>0?new Array(bi+1).join(Zt):"")+ke,ke=ke+(tc>0?new Array(tc+1).join(Zt):""),At=ke.indexOf(xt),ot.regularGrouping>0)for(var _g=Math.floor((At-1)/ot.regularGrouping),mn=1;mn<=_g;mn++)ke=[ke.slice(0,At-mn*ot.regularGrouping),ps,ke.slice(At-mn*ot.regularGrouping)].join("");else ot.integerPartGroupingPositions.forEach(function(be){ke=[ke.slice(0,At-be),ps,ke.slice(At-be)].join(""),At++});if(At=ke.indexOf(xt),ot.fractionalPartGroupingPositions.forEach(function(be){ke=[ke.slice(0,be+At+1),ps,ke.slice(be+At+1)].join("")}),At=ke.indexOf(xt),(ot.picture.indexOf(xt)===-1||At===ke.length-1)&&(ke=ke.substring(0,ke.length-1)),typeof Rr<"u"){var gn=ec(Rr,0);bi=ot.minimumExponentSize-gn.length,bi>0&&(gn=new Array(bi+1).join(Zt)+gn),ke=ke+P["exponent-separator"]+(Rr<0?Qe:"")+gn}return ke=ot.prefix+ke+ot.suffix,ke}}function I(a,c){if(!(typeof a>"u")){if(a=N(a),typeof c>"u"?c=10:c=N(c),c<2||c>36)throw{code:"D3100",stack:new Error().stack,value:c};var p=a.toString(c);return p}}function $(a){var c;if(!(typeof a>"u")){if(typeof a=="number")c=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))c=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))c=Number(a);else if(a===!0)c=1;else if(a===!1)c=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return c}}function F(a){var c;if(!(typeof a>"u"))return c=Math.abs(a),c}function B(a){var c;if(!(typeof a>"u"))return c=Math.floor(a),c}function V(a){var c;if(!(typeof a>"u"))return c=Math.ceil(a),c}function N(a,c){var p;if(!(typeof a>"u")){if(c){var A=a.toString().split("e");a=+(A[0]+"e"+(A[1]?+A[1]+c:c))}p=Math.round(a);var P=p-a;return Math.abs(P)===.5&&Math.abs(p%2)===1&&(p=p-1),c&&(A=p.toString().split("e"),p=+(A[0]+"e"+(A[1]?+A[1]-c:-c))),Object.is(p,-0)&&(p=0),p}}function G(a){var c;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return c=Math.sqrt(a),c}}function ae(a,c){var p;if(!(typeof a>"u")){if(p=Math.pow(a,c),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:c};return p}}function Ce(){return Math.random()}function me(a){if(!(typeof a>"u")){var c=!1;if(Array.isArray(a)){if(a.length===1)c=me(a[0]);else if(a.length>1){var p=a.filter(function(A){return me(A)});c=p.length>0}}else typeof a=="string"?a.length>0&&(c=!0):h(a)?a!==0&&(c=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(c=!0):typeof a=="boolean"&&a===!0&&(c=!0);return c}}function fe(a){if(!(typeof a>"u"))return!me(a)}function he(a,c,p,A){var P=[c],L=T(a);return L>=2&&P.push(p),L>=3&&P.push(A),P}async function De(a,c){if(!(typeof a>"u")){for(var p=this.createSequence(),A=0;A<a.length;A++){var P=he(c,a[A],A,a),L=await c.apply(this,P);typeof L<"u"&&p.push(L)}return p}}async function de(a,c){if(!(typeof a>"u")){for(var p=this.createSequence(),A=0;A<a.length;A++){var P=a[A],L=he(c,P,A,a),H=await c.apply(this,L);me(H)&&p.push(P)}return p}}async function mt(a,c){if(!(typeof a>"u")){for(var p=!1,A,P=0;P<a.length;P++){var L=a[P],H=!0;if(typeof c<"u"){var K=he(c,L,P,a),_e=await c.apply(this,K);H=me(_e)}if(H)if(!p)A=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:P}}if(!p)throw{stack:new Error().stack,code:"D3139"};return A}}function Yt(){for(var a=[],c=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,c.map(function(L){return Array.isArray(L)?L.length:0})),A=0;A<p;A++){var P=c.map(L=>L[A]);a.push(P)}return a}async function St(a,c,p){if(!(typeof a>"u")){var A,P=T(c);if(P<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(A=a[0],L=1):(A=p,L=0);L<a.length;){var H=[A,a[L]];P>=3&&H.push(L),P>=4&&H.push(a),A=await c.apply(this,H),L++}return A}}function it(a){var c=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),A=0;A<a.length;A++){var P=it.call(this,a[A]);P.forEach(function(L){p[L]=!0})}c=it.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>c.push(L));return c}function Pt(a,c){var p;if(Array.isArray(a)){p=this.createSequence();for(var A=0;A<a.length;A++){var P=Pt.call(this,a[A],c);typeof P<"u"&&(Array.isArray(P)?P.forEach(L=>p.push(L)):p.push(P))}}else a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,c)&&!f(a)&&(p=a[c]);return p}function Ps(a,c){if(typeof a>"u")return c;if(typeof c>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(c)||(c=[c]);const p=a.length+c.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(c)}function Nr(a){return!(typeof a>"u")}function Fr(a){var c=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)c=Ps.call(this,c,Fr.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!C(a))for(const P of o.keys(a)){var A=Object.create(null);A[P]=a[P],c.push(A)}else c=a;return c}function J(a){if(!(typeof a>"u")){var c=Object.create(null);return a.forEach(function(p){for(const A of o.keys(p))c[A]=p[A]}),c}}function pn(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var c=a.length,p=new Array(c),A=0;A<c;A++)p[c-A-1]=a[A];return p}}async function fn(a,c){var p=this.createSequence();for(const L of o.keys(a)){var A=he(c,a[L],L,a),P=await c.apply(this,A);typeof P<"u"&&p.push(P)}return p}function ts(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function mi(a,c){if(!a)throw{code:"D3141",stack:new Error().stack,message:c||"$assert() statement failed"}}function ds(a){if(a!==void 0)return a===null?"null":h(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function ur(a,c){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof c>"u"){if(!x(a)&&!g(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(H,K){return H>K}}else p=c;var A=async function(H,K){var _e=async function(je,Ke,Ge){Ke.length===0?Array.prototype.push.apply(je,Ge):Ge.length===0?Array.prototype.push.apply(je,Ke):await p(Ke[0],Ge[0])?(je.push(Ge[0]),await _e(je,Ke,Ge.slice(1))):(je.push(Ke[0]),await _e(je,Ke.slice(1),Ge))},oe=[];return await _e(oe,H,K),oe},P=async function(H){if(!Array.isArray(H)||H.length<=1)return H;var K=Math.floor(H.length/2),_e=H.slice(0,K),oe=H.slice(K);return _e=await P(_e),oe=await P(oe),await A(_e,oe)},L=await P(a);return L}}function d(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var c=new Array(a.length),p=0;p<a.length;p++){var A=Math.floor(Math.random()*(p+1));p!==A&&(c[p]=c[A]),c[A]=a[p]}return c}}function v(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var c=m(a)?this.createSequence():[],p=0;p<a.length;p++){for(var A=a[p],P=!1,L=0;L<c.length;L++)if(z(A,c[L])){P=!0;break}P||c.push(A)}return c}}async function w(a,c){var p=Object.create(null);for(const H of o.keys(a)){var A=a[H],P=he(c,A,H,a),L=await c.apply(this,P);me(L)&&(p[H]=A)}return o.keys(p).length===0&&(p=void 0),p}return{sum:S,count:y,max:M,min:k,average:D,string:Y,substring:j,substringBefore:ne,substringAfter:re,lowercase:ie,uppercase:q,length:le,trim:pe,pad:Be,match:$e,contains:ge,replace:ce,split:Pe,join:Ee,formatNumber:O,formatBase:I,number:$,floor:B,ceil:V,round:N,abs:F,sqrt:G,power:ae,random:Ce,boolean:me,not:fe,map:De,zip:Yt,filter:de,single:mt,foldLeft:St,sift:w,keys:it,lookup:Pt,append:Ps,exists:Nr,spread:Fr,merge:J,reverse:pn,each:fn,error:ts,assert:mi,type:ds,sort:ur,shuffle:d,distinct:v,base64encode:W,base64decode:Ae,encodeUrlComponent:b,encodeUrl:_,decodeUrlComponent:te,decodeUrl:we}})();r.exports=l}).call(this)}).call(this,typeof pa<"u"?pa:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,r,i){var n=s("./datetime"),o=s("./functions"),l=s("./utils"),h=s("./parser"),g=s("./signature"),x=(function(){var m=l.isNumeric,f=l.isArrayOfStrings,C=l.isArrayOfNumbers,E=l.isSequence,T=l.isFunction,z=l.isLambda,U=l.isIterable,S=l.isPromise,y=l.getFunctionArity,M=l.isDeepEqual,k=ts(null);async function D(d,v,w){var a;w.base.depth++,w.base.guardrails();var c=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(c&&await c(d,v,w),d.type){case"path":a=await Y(d,v,w);break;case"binary":a=await le(d,v,w);break;case"unary":a=await pe(d,v,w);break;case"name":a=Be(d,v,w);break;case"string":case"number":case"value":a=ue(d);break;case"wildcard":a=ge(d,v,w);break;case"descendant":a=ce(d,v,w);break;case"parent":a=w.lookup(d.slot.label);break;case"condition":a=await B(d,v,w);break;case"block":a=await V(d,v,w);break;case"bind":a=await F(d,v,w);break;case"regex":a=N(d,v,w);break;case"function":a=await he(d,v,w);break;case"variable":a=G(d,v,w);break;case"lambda":a=mt(d,v,w);break;case"partial":a=await Yt(d,v,w);break;case"apply":a=await fe(d,v,w);break;case"transform":a=Ce(d,v,w);break}if(Object.prototype.hasOwnProperty.call(d,"predicate"))for(var p=0;p<d.predicate.length;p++)a=await q(d.predicate[p].expr,a,w);d.type!=="path"&&Object.prototype.hasOwnProperty.call(d,"group")&&(a=await O(d.group,a,w));var A=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return A&&await A(d,v,w,a),a&&E(a)&&!a.tupleStream&&(d.keepArray&&(a.keepSingleton=!0),a.length===0?a=void 0:a.length===1&&(a=a.keepSingleton?a:a[0])),w.base.depth--,a}async function Y(d,v,w){var a;Array.isArray(v)&&d.steps[0].type!=="variable"?a=v:a=w.base.createSequence(v);for(var c,p=!1,A=void 0,P=0;P<d.steps.length;P++){var L=d.steps[P];if(L.tuple&&(p=!0),P===0&&L.consarray?c=await D(L,a,w):p?A=await ie(L,a,A,w):c=await ne(L,a,w,P===d.steps.length-1),!p&&(typeof c>"u"||c.length===0))break;typeof L.focus>"u"&&(a=c)}if(p)if(d.tuple)c=A;else for(c=w.base.createSequence(),P=0;P<A.length;P++)c.push(A[P]["@"]);return d.keepSingletonArray&&(Array.isArray(c)&&c.cons&&!c.sequence&&(c=w.base.createSequence(c)),c.keepSingleton=!0),Object.prototype.hasOwnProperty.call(d,"group")&&(c=await O(d.group,p?A:c,w)),c}function j(d,v){var w=ts(d);for(const a of l.keys(v))w.bind(a,v[a]);return w}async function ne(d,v,w,a){var c;if(d.type==="sort")return c=await ae(d,v,w),d.stages&&(c=await re(d.stages,c,w)),c;c=w.base.createSequence();for(var p=0;p<v.length;p++){var A=await D(d,v[p],w);if(d.stages)for(var P=0;P<d.stages.length;P++)A=await q(d.stages[P].expr,A,w);typeof A<"u"&&c.push(A)}var L=w.base.createSequence();return a&&c.length===1&&Array.isArray(c[0])&&!E(c[0])?L=c[0]:Array.prototype.forEach.call(c,function(H){!Array.isArray(H)||H.cons?L.push(H):Array.prototype.forEach.call(H,K=>L.push(K))}),L}async function re(d,v,w){for(var a=v,c=0;c<d.length;c++){var p=d[c];switch(p.type){case"filter":a=await q(p.expr,a,w);break;case"index":for(var A=0;A<a.length;A++){var P=a[A];P[p.value]=A}break}}return a}async function ie(d,v,w,a){var c;if(d.type==="sort"){if(w)c=await ae(d,w,a);else{var p=await ae(d,v,a);c=a.base.createSequence(),c.tupleStream=!0;for(var A=0;A<p.length;A++){var P={"@":p[A]};P[d.index]=A,c.push(P)}}return d.stages&&(c=await re(d.stages,c,a)),c}c=a.base.createSequence(),c.tupleStream=!0;var L=a;w===void 0&&(w=v.map(oe=>({"@":oe})));for(var H=0;H<w.length;H++){L=j(a,w[H]);var K=await D(d,w[H]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var _e=0;_e<K.length;_e++)P=Object.create(null),Object.assign(P,w[H]),K.tupleStream?Object.assign(P,K[_e]):(d.focus?(P[d.focus]=K[_e],P["@"]=w[H]["@"]):P["@"]=K[_e],d.index&&(P[d.index]=_e),d.ancestor&&(P[d.ancestor.label]=w[H]["@"])),c.push(P)}}return d.stages&&(c=await re(d.stages,c,a)),c}async function q(d,v,w){var a=w.base.createSequence();if(v&&v.tupleStream&&(a.tupleStream=!0),Array.isArray(v)||(v=w.base.createSequence(v)),d.type==="number"){var c=Math.floor(d.value);c<0&&(c=v.length+c);var p=await v[c];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(c=0;c<v.length;c++){var p=v[c],A=p,P=w;v.tupleStream&&(A=p["@"],P=j(w,p));var L=await D(d,A,P);m(L)&&(L=[L]),C(L)?Array.prototype.forEach.call(L,function(K){var _e=Math.floor(K);_e<0&&(_e=v.length+_e),_e===c&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(d,v,w){var a,c=await D(d.lhs,v,w),p=d.value,A=async()=>await D(d.rhs,v,w);if(p==="and"||p==="or")try{return await we(c,A,p)}catch(L){throw L.position=d.position,L.token=p,L}var P=await A();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=Ae(c,P,p);break;case"=":case"!=":a=b(c,P,p);break;case"<":case"<=":case">":case">=":a=_(c,P,p);break;case"&":a=Ee(c,P);break;case"..":a=$(c,P,w);break;case"in":a=te(c,P);break}}catch(L){throw L.position=d.position,L.token=p,L}return a}async function pe(d,v,w){var a,c={options:w.base.options,createSequence:w.base.createSequence};switch(d.value){case"-":if(a=await D(d.expression,v,w),typeof a>"u")a=void 0;else if(m(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:d.position,token:d.value,value:a};break;case"[":a=[];let P=await Promise.all(d.expressions.map(async(L,H)=>(w.isParallelCall=H>0,[L,await D(L,v,w)])));for(let L of P){var[p,A]=L;typeof A<"u"&&(p.value==="["?a.push(A):a=o.append.call(c,a,A))}d.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await O(d,v,w);break}return a}function Be(d,v,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,v,d.value)}function ue(d){return d.value}function ge(d,v,w){var a={options:w.base.options,createSequence:w.base.createSequence},c=a.createSequence();return Array.isArray(v)&&v.outerWrapper&&v.length>0&&(v=v[0]),v!==null&&typeof v=="object"&&!T(v)&&l.keys(v).forEach(function(p){var A=v[p];Array.isArray(A)?(A=$e(A),c=o.append.call(a,c,A)):c.push(A)}),c}function $e(d,v){return typeof v>"u"&&(v=[]),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){$e(w,v)}):v.push(d),v}function ce(d,v,w){var a,c=w.base.createSequence();return typeof v<"u"&&(W(v,c),c.length===1?a=c[0]:a=c),a}function W(d,v){Array.isArray(d)||v.push(d),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){W(w,v)}):d!==null&&typeof d=="object"&&!T(d)&&l.keys(d).forEach(function(w){W(d[w],v)})}function Ae(d,v,w){var a;if(typeof d<"u"&&!m(d))throw{code:"T2001",stack:new Error().stack,value:d};if(typeof v<"u"&&!m(v))throw{code:"T2002",stack:new Error().stack,value:v};if(typeof d>"u"||typeof v>"u")return a;switch(w){case"+":a=d+v;break;case"-":a=d-v;break;case"*":a=d*v;break;case"/":a=d/v;break;case"%":a=d%v;break}return a}function b(d,v,w){var a,c=typeof d,p=typeof v;if(c==="undefined"||p==="undefined")return!1;switch(w){case"=":a=M(d,v);break;case"!=":a=!M(d,v);break}return a}function _(d,v,w){var a,c=typeof d,p=typeof v,A=c==="undefined"||c==="string"||c==="number",P=p==="undefined"||p==="string"||p==="number";if(!A||!P)throw{code:"T2010",stack:new Error().stack,value:c==="string"||c==="number"?v:d};if(!(c==="undefined"||p==="undefined")){if(c!==p)throw{code:"T2009",stack:new Error().stack,value:d,value2:v};switch(w){case"<":a=d<v;break;case"<=":a=d<=v;break;case">":a=d>v;break;case">=":a=d>=v;break}return a}}function te(d,v){var w=!1;if(typeof d>"u"||typeof v>"u")return!1;Array.isArray(v)||(v=[v]);for(var a=0;a<v.length;a++)if(v[a]===d){w=!0;break}return w}async function we(d,v,w){var a,c=Pe(d);switch(w){case"and":a=c&&Pe(await v());break;case"or":a=c||Pe(await v());break}return a}function Pe(d){var v=o.boolean(d);return typeof v>"u"?!1:v}function Ee(d,v){var w,a="",c="";return typeof d<"u"&&(a=o.string(d)),typeof v<"u"&&(c=o.string(v)),w=a.concat(c),w}async function O(d,v,w){var a=Object.create(null),c=Object.create(null),p=!!(v&&v.tupleStream),A={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(v)||(w.base.options,v=A.createSequence(v)),v.length===0&&!p&&v.push(void 0);for(var P=0;P<v.length;P++)for(var L=v[P],H=p?j(w,L):w,K=0;K<d.lhs.length;K++){var _e=d.lhs[K],oe=await D(_e[0],p?L["@"]:L,H);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:d.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:d.position,value:oe};var je={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(c,oe)){if(c[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:d.position,value:oe};c[oe].data=o.append.call(A,c[oe].data,L)}else c[oe]=je}}let Ke=await Promise.all(l.keys(c).map(async(nt,Me)=>{let Qe=c[nt];var Zt=Qe.data,xt=w;if(p){var ps=I(Qe.data,w);Zt=ps["@"],delete ps["@"],xt=j(w,ps)}return w.isParallelCall=Me>0,[nt,await D(d.lhs[Qe.exprIndex][1],Zt,xt)]}));for(let nt of Ke){var[oe,Ge]=await nt;typeof Ge<"u"&&(a[oe]=Ge)}return a}function I(d,v){if(!Array.isArray(d))return d;var w=Object.create(null),a={options:v.base.options,createSequence:v.base.createSequence};Object.assign(w,d[0]);for(var c=1;c<d.length;c++)for(const p of l.keys(d[c]))w[p]=o.append.call(a,w[p],d[c][p]);return w}function $(d,v,w){var a;if(typeof d<"u"&&!Number.isInteger(d))throw{code:"T2003",stack:new Error().stack,value:d};if(typeof v<"u"&&!Number.isInteger(v))throw{code:"T2004",stack:new Error().stack,value:v};if(typeof d>"u"||typeof v>"u"||d>v)return a;var c=v-d+1;if(c>1e7)throw{code:"D2014",stack:new Error().stack,value:c};if(w.base.options&&c>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:c};a=new Array(c);for(var p=d,A=0;p<=v;p++,A++)a[A]=p;return a.sequence=!0,a}async function F(d,v,w){var a=await D(d.rhs,v,w);return w.bind(d.lhs.value,a),a}async function B(d,v,w){var a,c=await D(d.condition,v,w);return o.boolean(c)?a=await D(d.then,v,w):typeof d.else<"u"&&(a=await D(d.else,v,w)),a}async function V(d,v,w){for(var a,c=ts(w),p=0;p<d.expressions.length;p++)a=await D(d.expressions[p],v,c);return a}function N(d,v,w){var a=new w.base.RegexEngine(d.value),c=function(p,A){var P;a.lastIndex=A||0;var L=a.exec(p);if(L!==null){if(P={match:L[0],start:L.index,end:L.index+L[0].length,groups:[]},L.length>1)for(var H=1;H<L.length;H++)P.groups.push(L[H]);P.next=function(){if(!(a.lastIndex>=p.length)){var K=c(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:d.position,value:d.value.source};return K}}}return P};return c}function G(d,v,w){var a;return d.value===""?a=v&&v.outerWrapper?v[0]:v:a=w.lookup(d.value),a}async function ae(d,v,w){var a,c=v,p=!!v.tupleStream,A=async function(L,H){for(var K=0,_e=0;K===0&&_e<d.terms.length;_e++){var oe=d.terms[_e],je=L,Ke=w;p&&(je=L["@"],Ke=j(w,L));var Ge=await D(oe.expression,je,Ke);je=H,Ke=w,p&&(je=H["@"],Ke=j(w,H));var nt=await D(oe.expression,je,Ke),Me=typeof Ge,Qe=typeof nt;if(Me==="undefined"){K=Qe==="undefined"?0:1;continue}if(Qe==="undefined"){K=-1;continue}if(!(Me==="string"||Me==="number")||!(Qe==="string"||Qe==="number"))throw{code:"T2008",stack:new Error().stack,position:d.position,value:Me==="string"||Me==="number"?nt:Ge};if(Me!==Qe)throw{code:"T2007",stack:new Error().stack,position:d.position,value:Ge,value2:nt};Ge!==nt&&(Ge<nt?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},P={environment:w,input:v};return a=await o.sort.apply(P,[c,A]),a}function Ce(d,v,w){var a=async function(c){if(!(typeof c>"u")){var p=w.lookup("clone");if(!T(p))throw{code:"T2013",stack:new Error().stack,position:d.position};var A=await De(p,[c],null,w),P=await D(d.pattern,A,w);if(typeof P<"u"){Array.isArray(P)||(P=[P]);for(var L=0;L<P.length;L++){var H=P[L],K=await D(d.update,H,w),_e=typeof K;if(_e!=="undefined"){if(_e!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:d.update.position,value:K};for(const Ge of l.keys(K))H[Ge]=K[Ge]}if(typeof d.delete<"u"){var oe=await D(d.delete,H,w);if(typeof oe<"u"){var je=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:d.delete.position,value:je};for(var Ke=0;Ke<oe.length;Ke++)typeof H=="object"&&H!==null&&delete H[oe[Ke]]}}}}return A}};return J(a,"<(oa):o>")}var me=h("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(d,v,w){var a,c=await D(d.lhs,v,w);if(d.rhs.type==="function")a=await he(d.rhs,v,w,{context:c});else{var p=await D(d.rhs,v,w);if(!T(p))throw{code:"T2006",stack:new Error().stack,position:d.position,value:p};if(T(c)){var A=await D(me,null,w);a=await De(A,[c,p],null,w)}else a=await De(p,[c],null,w)}return a}async function he(d,v,w,a){var c,p=await D(d.procedure,v,w);if(typeof p>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};var A=[];typeof a<"u"&&A.push(a.context);for(var P=0;P<d.arguments.length;P++){const H=await D(d.arguments[P],v,w);if(T(H)){const K=async function(..._e){return await De(H,_e,null,w)};K.arity=y(H),A.push(K)}else A.push(H)}var L=d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=d.position),c=await De(p,A,v,w)}catch(H){throw H.position||(H.position=d.position),H.token||(H.token=L),H}return c}async function De(d,v,w,a){var c;for(c=await de(d,v,w,a);z(c)&&c.thunk===!0;){var p=await D(c.body.procedure,c.input,c.environment);c.body.procedure.type==="variable"&&(p.token=c.body.procedure.value),p.position=c.body.procedure.position;for(var A=[],P=0;P<c.body.arguments.length;P++)A.push(await D(c.body.arguments[P],c.input,c.environment));c=await de(p,A,w,a)}return c}async function de(d,v,w,a){var c;try{var p=v;if(d&&(p=St(d.signature,v,w)),z(d))c=await it(d,p);else if(d&&d._jsonata_function===!0){var A={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};c=d.implementation.apply(A,p),U(c)&&(c=c.next().value),S(c)&&(c=await c)}else if(typeof d=="function")c=d.apply(w,p),S(c)&&(c=await c);else throw{code:"T1006",stack:new Error().stack}}catch(P){throw d&&(typeof P.token>"u"&&typeof d.token<"u"&&(P.token=d.token),P.position=d.position||P.position),P}return c}function mt(d,v,w){var a={_jsonata_lambda:!0,input:v,environment:w,arguments:d.arguments,signature:d.signature,body:d.body};return d.thunk===!0&&(a.thunk=!0),a.apply=async function(c,p){return await De(a,p,v,c?c.environment:w)},a}async function Yt(d,v,w){for(var a,c=[],p=0;p<d.arguments.length;p++){var A=d.arguments[p];A.type==="operator"&&A.value==="?"?c.push(A):c.push(await D(A,v,w))}var P=await D(d.procedure,v,w);if(typeof P>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};if(z(P))a=Pt(P,c,w);else if(P&&P._jsonata_function===!0)a=Ps(P.implementation,c,w);else if(typeof P=="function")a=Ps(P,c,w);else throw{code:"T1008",stack:new Error().stack,position:d.position,token:d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value};return a}function St(d,v,w){if(typeof d>"u")return v;var a=d.validate(v,w);return a}async function it(d,v){var w,a=ts(d.environment);return Array.prototype.forEach.call(d.arguments,function(c,p){a.bind(c.value,v[p])}),typeof d.body=="function"?w=await Nr(d.body,a):w=await D(d.body,d.input,a),w}function Pt(d,v,w){var a=ts(d.environment||w),c=[];Array.prototype.forEach.call(d.arguments,function(A,P){var L=v[P];L&&L.type==="operator"&&L.value==="?"?c.push(A):a.bind(A.value,L)});var p={_jsonata_lambda:!0,input:d.input,environment:a,arguments:c,body:d.body};return p}function Ps(d,v,w){var a=Fr(d);a=a.map(function(P){return"$"+P.trim()});var c="function("+a.join(", ")+"){ _ }",p=h(c);p.body=d;var A=Pt(p,v,w);return A}async function Nr(d,v){var w=Fr(d),a=w.map(function(A){return v.lookup(A.trim())}),c={environment:v,createSequence:v.base.createSequence},p=d.apply(c,a);return S(p)&&(p=await p),p}function Fr(d){var v=d.toString(),w=/\(([^)]*)\)/.exec(v)[1],a=w.split(",");return a}function J(d,v){var w={_jsonata_function:!0,implementation:d};return typeof v<"u"&&(w.signature=g(v)),w}async function pn(d,v){if(!(typeof d>"u")){var w=this.input;typeof v<"u"&&(w=v,Array.isArray(w)&&!E(w)&&(w=this.createSequence(w),w.outerWrapper=!0));try{var a=h(d,!1)}catch(p){throw ds(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var c=await D(a,w,this.environment)}catch(p){throw ds(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return c}}function fn(d){if(!(typeof d>"u"))return JSON.parse(o.string(d))}function ts(d){var v=Object.create(null);const w={bind:function(c,p){v[c]=p},lookup:function(c){var p;return Object.prototype.hasOwnProperty.call(v,c)?p=v[c]:d&&(p=d.lookup(c)),p},timestamp:d?d.timestamp:null,async:d?d.async:!1,isParallelCall:d?d.isParallelCall:!1,global:d?d.global:{ancestry:[null]}};if(d){var a=d.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(d,w),w.base=d.base}return w}k.bind("sum",J(o.sum,"<a<n>:n>")),k.bind("count",J(o.count,"<a:n>")),k.bind("max",J(o.max,"<a<n>:n>")),k.bind("min",J(o.min,"<a<n>:n>")),k.bind("average",J(o.average,"<a<n>:n>")),k.bind("string",J(o.string,"<x-b?:s>")),k.bind("substring",J(o.substring,"<s-nn?:s>")),k.bind("substringBefore",J(o.substringBefore,"<s-s:s>")),k.bind("substringAfter",J(o.substringAfter,"<s-s:s>")),k.bind("lowercase",J(o.lowercase,"<s-:s>")),k.bind("uppercase",J(o.uppercase,"<s-:s>")),k.bind("length",J(o.length,"<s-:n>")),k.bind("trim",J(o.trim,"<s-:s>")),k.bind("pad",J(o.pad,"<s-ns?:s>")),k.bind("match",J(o.match,"<s-f<s:o>n?:a<o>>")),k.bind("contains",J(o.contains,"<s-(sf):b>")),k.bind("replace",J(o.replace,"<s-(sf)(sf)n?:s>")),k.bind("split",J(o.split,"<s-(sf)n?:a<s>>")),k.bind("join",J(o.join,"<a<s>s?:s>")),k.bind("formatNumber",J(o.formatNumber,"<n-so?:s>")),k.bind("formatBase",J(o.formatBase,"<n-n?:s>")),k.bind("formatInteger",J(n.formatInteger,"<n-s:s>")),k.bind("parseInteger",J(n.parseInteger,"<s-s:n>")),k.bind("number",J(o.number,"<(nsb)-:n>")),k.bind("floor",J(o.floor,"<n-:n>")),k.bind("ceil",J(o.ceil,"<n-:n>")),k.bind("round",J(o.round,"<n-n?:n>")),k.bind("abs",J(o.abs,"<n-:n>")),k.bind("sqrt",J(o.sqrt,"<n-:n>")),k.bind("power",J(o.power,"<n-n:n>")),k.bind("random",J(o.random,"<:n>")),k.bind("boolean",J(o.boolean,"<x-:b>")),k.bind("not",J(o.not,"<x-:b>")),k.bind("map",J(o.map,"<af>")),k.bind("zip",J(o.zip,"<a+>")),k.bind("filter",J(o.filter,"<af>")),k.bind("single",J(o.single,"<af?>")),k.bind("reduce",J(o.foldLeft,"<afj?:j>")),k.bind("sift",J(o.sift,"<o-f?:o>")),k.bind("keys",J(o.keys,"<x-:a<s>>")),k.bind("lookup",J(o.lookup,"<x-s:x>")),k.bind("append",J(o.append,"<xx:a>")),k.bind("exists",J(o.exists,"<x:b>")),k.bind("spread",J(o.spread,"<x-:a<o>>")),k.bind("merge",J(o.merge,"<a<o>:o>")),k.bind("reverse",J(o.reverse,"<a:a>")),k.bind("each",J(o.each,"<o-f:a>")),k.bind("error",J(o.error,"<s?:x>")),k.bind("assert",J(o.assert,"<bs?:x>")),k.bind("type",J(o.type,"<x:s>")),k.bind("sort",J(o.sort,"<af?:a>")),k.bind("shuffle",J(o.shuffle,"<a:a>")),k.bind("distinct",J(o.distinct,"<x:x>")),k.bind("base64encode",J(o.base64encode,"<s-:s>")),k.bind("base64decode",J(o.base64decode,"<s-:s>")),k.bind("encodeUrlComponent",J(o.encodeUrlComponent,"<s-:s>")),k.bind("encodeUrl",J(o.encodeUrl,"<s-:s>")),k.bind("decodeUrlComponent",J(o.decodeUrlComponent,"<s-:s>")),k.bind("decodeUrl",J(o.decodeUrl,"<s-:s>")),k.bind("eval",J(pn,"<sx?:x>")),k.bind("toMillis",J(n.toMillis,"<s-s?:n>")),k.bind("fromMillis",J(n.fromMillis,"<n-s?s?:s>")),k.bind("clone",J(fn,"<(oa)-:o>"));var mi={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 ds(d){var v=mi[d.code];if(typeof v<"u"){var w=v.replace(/\{\{\{([^}]+)}}}/g,function(){return d[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(d[arguments[1]])}),d.message=w}}function ur(d,v){var w,a;try{w=h(d,v&&v.recover),a=w.errors,delete w.errors}catch(A){throw ds(A),A}var c=ts(k),p=new Date;return c.bind("now",J(function(A,P){return n.fromMillis(p.getTime(),A,P)},"<s?s?:s>")),c.bind("millis",J(function(){return p.getTime()},"<:n>")),{evaluate:async function(A,P,L){if(typeof a<"u"){var H={code:"S0500",position:0};throw ds(H),H}const K=ts(c);for(const oe of l.keys(P))K.bind(oe,P[oe]);if(K.bind("$",A),p=new Date,K.timestamp=p,K.options=v,K.createSequence=function(){var oe=[];return v&&v.sequence&&(oe.push=function(...je){if(oe.length+je.length>v.sequence)throw{code:"D2015",stack:new Error().stack,value:v.sequence};return Array.prototype.push.apply(oe,je)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(A)&&!E(A)&&(A=K.createSequence(A),A.outerWrapper=!0),v&&(v.timeout||v.stack)){const oe=Date.now();K.guardrails=function(){if(v.stack>0&&K.depth>v.stack)throw{code:"D1011",value:v.stack,stack:new Error().stack};if(v.timeout>0&&Date.now()-oe>v.timeout)throw{code:"D1012",value:v.timeout,stack:new Error().stack}}}else K.guardrails=function(){};K.base=K,K.depth=0,v&&v.RegexEngine?K.RegexEngine=v.RegexEngine:K.RegexEngine=RegExp;var _e;try{return _e=await D(w,A,K),typeof L=="function"&&L(null,_e),_e}catch(oe){throw ds(oe),oe}},assign:function(A,P){c.bind(A,P)},registerFunction:function(A,P,L){var H=J(P,L);c.bind(A,H)},ast:function(){return w},errors:function(){return a}}}return ur.parser=h,ur})();r.exports=x},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,r,i){var n=s("./signature");const o=(()=>{var l={".":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},h={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
73
- `,r:"\r",t:" "},g=function(m){var f=0,C=m.length,E=function(U,S){var y={type:U,value:S,position:f};return y},T=function(){for(var U=f,S=0,y,M,k=function(Y){if(m.charAt(Y)==="/"&&S===0){for(var j=0;m.charAt(Y-(j+1))==="\\";)j++;if(j%2===0)return!0}return!1};f<C;){var D=m.charAt(f);if(k(f)){if(y=m.substring(U,f),y==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,D=m.charAt(f),U=f;D==="i"||D==="m";)f++,D=m.charAt(f);return M=m.substring(U,f)+"g",new RegExp(y,M)}(D==="("||D==="["||D==="{")&&m.charAt(f-1)!=="\\"&&S++,(D===")"||D==="]"||D==="}")&&m.charAt(f-1)!=="\\"&&S--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},z=function(U){if(f>=C)return null;for(var S=m.charAt(f);f<C&&`
74
- \r\v`.indexOf(S)>-1;)f++,S=m.charAt(f);if(S==="/"&&m.charAt(f+1)==="*"){var y=f;for(f+=2,S=m.charAt(f);!(S==="*"&&m.charAt(f+1)==="/");)if(S=m.charAt(++f),f>=C)throw{code:"S0106",stack:new Error().stack,position:y};return f+=2,S=m.charAt(f),z(U)}if(U!==!0&&S==="/")return f++,E("regex",T());if(S==="."&&m.charAt(f+1)===".")return f+=2,E("operator","..");if(S===":"&&m.charAt(f+1)==="=")return f+=2,E("operator",":=");if(S==="!"&&m.charAt(f+1)==="=")return f+=2,E("operator","!=");if(S===">"&&m.charAt(f+1)==="=")return f+=2,E("operator",">=");if(S==="<"&&m.charAt(f+1)==="=")return f+=2,E("operator","<=");if(S==="*"&&m.charAt(f+1)==="*")return f+=2,E("operator","**");if(S==="~"&&m.charAt(f+1)===">")return f+=2,E("operator","~>");if(S==="?"&&m.charAt(f+1)===":")return f+=2,E("operator","?:");if(S==="?"&&m.charAt(f+1)==="?")return f+=2,E("operator","??");if(Object.prototype.hasOwnProperty.call(l,S))return f++,E("operator",S);if(S==='"'||S==="'"){var M=S;f++;for(var k="";f<C;){if(S=m.charAt(f),S==="\\")if(f++,S=m.charAt(f),Object.prototype.hasOwnProperty.call(h,S))k+=h[S];else if(S==="u"){var D=m.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test(D)){var Y=parseInt(D,16);k+=String.fromCharCode(Y),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:S};else{if(S===M)return f++,E("string",k);k+=S}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var j=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ne=j.exec(m.substring(f));if(ne!==null){var re=parseFloat(ne[0]);if(!isNaN(re)&&isFinite(re))return f+=ne[0].length,E("number",re);throw{code:"S0102",stack:new Error().stack,position:f,token:ne[0]}}var ie;if(S==="`"){f++;var q=m.indexOf("`",f);if(q!==-1)return ie=m.substring(f,q),f=q+1,E("name",ie);throw f=C,{code:"S0105",stack:new Error().stack,position:f}}for(var le=f,pe;;)if(pe=m.charAt(le),le===C||`
75
- \r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(l,pe)){if(m.charAt(f)==="$")return ie=m.substring(f+1,le),f=le,E("variable",ie);switch(ie=m.substring(f,le),f=le,ie){case"or":case"in":case"and":return E("operator",ie);case"true":return E("value",!0);case"false":return E("value",!1);case"null":return E("value",null);default:return f===C&&ie===""?null:E("name",ie)}}else le++};return z},x=function(m,f){var C,E,T=Object.create(null),z=[],U=function(){var b=[];C.id!=="(end)"&&b.push({type:C.type,value:C.value,position:C.position});for(var _=E();_!==null;)b.push(_),_=E();return b},S={nud:function(){var b={code:"S0211",token:this.value,position:this.position};if(f)return b.remaining=U(),b.type="error",z.push(b),b;throw b.stack=new Error().stack,b}},y=function(b,_){var te=T[b];return _=_||0,te?_>=te.lbp&&(te.lbp=_):(te=Object.create(S),te.id=te.value=b,te.lbp=_,T[b]=te),te},M=function(b){if(f){b.remaining=U(),z.push(b);var _=T["(error)"];return C=Object.create(_),C.error=b,C.type="(error)",C}else throw b.stack=new Error().stack,b},k=function(b,_){if(b&&C.id!==b){var te;C.id==="(end)"?te="S0203":te="S0202";var we={code:te,position:C.position,token:C.value,value:b};return M(we)}var Pe=E(_);if(Pe===null)return C=T["(end)"],C.position=m.length,C;var Ee=Pe.value,O=Pe.type,I;switch(O){case"name":case"variable":I=T["(name)"];break;case"operator":if(I=T[Ee],!I)return M({code:"S0204",stack:new Error().stack,position:Pe.position,token:Ee});break;case"string":case"number":case"value":I=T["(literal)"];break;case"regex":O="regex",I=T["(regex)"];break;default:return M({code:"S0205",stack:new Error().stack,position:Pe.position,token:Ee})}return C=Object.create(I),C.value=Ee,C.type=O,C.position=Pe.position,C},D=function(b){var _,te=C;for(k(null,!0),_=te.nud();b<C.lbp;)te=C,k(),_=te.led(_);return _},Y=function(b){var _=y(b,0);_.nud=function(){return this}},j=function(b,_,te){var we=_||l[b],Pe=y(b,we);return Pe.led=te||function(Ee){return this.lhs=Ee,this.rhs=D(we),this.type="binary",this},Pe},ne=function(b,_,te){var we=y(b,_);return we.led=te,we},re=function(b,_){var te=y(b);return te.nud=_||function(){return this.expression=D(70),this.type="unary",this},te};Y("(end)"),Y("(name)"),Y("(literal)"),Y("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),j("."),j("+"),j("-"),j("*"),j("/"),j("%"),j("="),j("<"),j(">"),j("!="),j("<="),j(">="),j("&"),j("and"),j("or"),j("in"),Y("and"),Y("or"),Y("in"),re("-"),j("~>"),j("??",l["??"],function(b){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(b))]},this.then=b,this.else=D(0),this}),ne("(error)",10,function(b){return this.lhs=b,this.error=C.error,this.remaining=U(),this.type="error",this}),re("*",function(){return this.type="wildcard",this}),re("**",function(){return this.type="descendant",this}),re("%",function(){return this.type="parent",this}),j("(",l["("],function(b){if(this.procedure=b,this.type="function",this.arguments=[],C.id!==")")for(;C.type==="operator"&&C.id==="?"?(this.type="partial",this.arguments.push(C),k("?")):this.arguments.push(D(0)),C.id===",";)k(",");if(k(")",!0),b.type==="name"&&(b.value==="function"||b.value==="λ")){if(this.arguments.forEach(function(Ee,O){if(Ee.type!=="variable")return M({code:"S0208",stack:new Error().stack,position:Ee.position,token:Ee.value,value:O+1})}),this.type="lambda",C.id==="<"){for(var _=C.position,te=1,we="<";te>0&&C.id!=="{"&&C.id!=="(end)";){var Pe=k();Pe.id===">"?te--:Pe.id==="<"&&te++,we+=Pe.value}k(">");try{this.signature=n(we)}catch(Ee){return Ee.position=_+Ee.offset,M(Ee)}}k("{"),this.body=D(0),k("}")}return this}),re("(",function(){for(var b=[];C.id!==")"&&(b.push(D(0)),C.id===";");)k(";");return k(")",!0),this.type="block",this.expressions=b,this}),re("[",function(){var b=[];if(C.id!=="]")for(;;){var _=D(0);if(C.id===".."){var te={type:"binary",value:"..",position:C.position,lhs:_};k(".."),te.rhs=D(0),_=te}if(b.push(_),C.id!==",")break;k(",")}return k("]",!0),this.expressions=b,this.type="unary",this}),j("[",l["["],function(b){if(C.id==="]"){for(var _=b;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,k("]"),b}else return this.lhs=b,this.rhs=D(l["]"]),this.type="binary",k("]",!0),this}),j("^",l["^"],function(b){k("(");for(var _=[];;){var te={descending:!1};if(C.id==="<"?k("<"):C.id===">"&&(te.descending=!0,k(">")),te.expression=D(0),_.push(te),C.id!==",")break;k(",")}return k(")"),this.lhs=b,this.rhs=_,this.type="binary",this});var ie=function(b){var _=[];if(C.id!=="}")for(;;){var te=D(0);k(":");var we=D(0);if(_.push([te,we]),C.id!==",")break;k(",")}return k("}",!0),typeof b>"u"?(this.lhs=_,this.type="unary"):(this.lhs=b,this.rhs=_,this.type="binary"),this};re("{",ie),j("{",l["{"],ie),ne(":=",l[":="],function(b){return b.type!=="variable"?M({code:"S0212",stack:new Error().stack,position:b.position,token:b.value}):(this.lhs=b,this.rhs=D(l[":="]-1),this.type="binary",this)}),j("@",l["@"],function(b){return this.lhs=b,this.rhs=D(l["@"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),j("#",l["#"],function(b){return this.lhs=b,this.rhs=D(l["#"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),j("?",l["?"],function(b){return this.type="condition",this.condition=b,this.then=D(0),C.id===":"&&(k(":"),this.else=D(0)),this}),j("?:",l["?:"],function(b){return this.type="condition",this.condition=JSON.parse(JSON.stringify(b)),this.then=b,this.else=D(0),this}),re("|",function(){return this.type="transform",this.pattern=D(0),k("|"),this.update=D(0),C.id===","&&(k(","),this.delete=D(0)),k("|"),this});var q=function(b){var _;if(b.type==="function"&&!b.predicate){var te={type:"lambda",thunk:!0,arguments:[],position:b.position};te.body=b,_=te}else if(b.type==="condition")b.then=q(b.then),typeof b.else<"u"&&(b.else=q(b.else)),_=b;else if(b.type==="block"){var we=b.expressions.length;we>0&&(b.expressions[we-1]=q(b.expressions[we-1])),_=b}else _=b;return _},le=0,pe=0,Be=[],ue=function(b,_){switch(b.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof b.ancestor>"u"||(Be[_.index].slot.label=b.ancestor.label),b.ancestor=_,b.tuple=!0);break;case"parent":_.level++;break;case"block":b.expressions.length>0&&(b.tuple=!0,_=ue(b.expressions[b.expressions.length-1],_));break;case"path":b.tuple=!0;var te=b.steps.length-1;for(_=ue(b.steps[te--],_);_.level>0&&te>=0;)_=ue(b.steps[te--],_);break;default:throw{code:"S0217",token:b.type,position:b.position}}return _},ge=function(b,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var te=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&te.push(_.slot),typeof b.seekingParent>"u"?b.seekingParent=te:Array.prototype.push.apply(b.seekingParent,te)}},$e=function(b){var _=b.steps.length-1,te=b.steps[_],we=typeof te.seekingParent<"u"?te.seekingParent:[];te.type==="parent"&&we.push(te.slot);for(var Pe=0;Pe<we.length;Pe++){var Ee=we[Pe];for(_=b.steps.length-2;Ee.level>0;){if(_<0){typeof b.seekingParent>"u"?b.seekingParent=[Ee]:b.seekingParent.push(Ee);break}for(var O=b.steps[_--];_>=0&&O.focus&&b.steps[_].focus;)O=b.steps[_--];Ee=ue(O,Ee)}}},ce=function(b){var _;switch(b.type){case"binary":switch(b.value){case".":var te=ce(b.lhs);te.type==="path"?_=te:_={type:"path",steps:[te]},te.type==="parent"&&(_.seekingParent=[te.slot]);var we=ce(b.rhs);we.type==="path"?Array.prototype.push.apply(_.steps,we.steps):(typeof we.predicate<"u"&&(we.stages=we.predicate,delete we.predicate),_.steps.push(we)),_.steps.filter(function(G){if(G.type==="number"||G.type==="value")throw{code:"S0213",stack:new Error().stack,position:G.position,value:G.value};return G.type==="string"}).forEach(function(G){G.type="name"}),_.steps.filter(function(G){return G.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var Pe=_.steps[0];Pe.type==="unary"&&Pe.value==="["&&(Pe.consarray=!0);var Ee=_.steps[_.steps.length-1];Ee.type==="unary"&&Ee.value==="["&&(Ee.consarray=!0),$e(_);break;case"[":_=ce(b.lhs);var O=_,I="predicate";if(_.type==="path"&&(O=_.steps[_.steps.length-1],I="stages"),typeof O.group<"u")throw{code:"S0209",stack:new Error().stack,position:b.position};typeof O[I]>"u"&&(O[I]=[]);var $=ce(b.rhs);typeof $.seekingParent<"u"&&($.seekingParent.forEach(G=>{G.level===1?ue(O,G):G.level--}),ge(O,$)),O[I].push({type:"filter",expr:$,position:b.position});break;case"{":if(_=ce(b.lhs),typeof _.group<"u")throw{code:"S0210",stack:new Error().stack,position:b.position};_.group={lhs:b.rhs.map(function(G){return[ce(G[0]),ce(G[1])]}),position:b.position};break;case"^":_=ce(b.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var F={type:"sort",position:b.position};F.terms=b.rhs.map(function(G){var ae=ce(G.expression);return ge(F,ae),{descending:G.descending,expression:ae}}),_.steps.push(F),$e(_);break;case":=":_={type:"bind",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),ge(_,_.rhs);break;case"@":if(_=ce(b.lhs),O=_,_.type==="path"&&(O=_.steps[_.steps.length-1]),typeof O.stages<"u"||typeof O.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:b.position};if(O.type==="sort")throw{code:"S0216",stack:new Error().stack,position:b.position};b.keepArray&&(O.keepArray=!0),O.focus=b.rhs.value,O.tuple=!0;break;case"#":_=ce(b.lhs),O=_,_.type==="path"?O=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof O.predicate<"u"&&(O.stages=O.predicate,delete O.predicate)),typeof O.stages>"u"?O.index=b.rhs.value:O.stages.push({type:"index",value:b.rhs.value,position:b.position}),O.tuple=!0;break;case"~>":_={type:"apply",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),_.keepArray=_.lhs.keepArray||_.rhs.keepArray;break;default:_={type:b.type,value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),ge(_,_.lhs),ge(_,_.rhs)}break;case"unary":_={type:b.type,value:b.value,position:b.position},b.value==="["?_.expressions=b.expressions.map(function(G){var ae=ce(G);return ge(_,ae),ae}):b.value==="{"?_.lhs=b.lhs.map(function(G){var ae=ce(G[0]);ge(_,ae);var Ce=ce(G[1]);return ge(_,Ce),[ae,Ce]}):(_.expression=ce(b.expression),b.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):ge(_,_.expression));break;case"function":case"partial":_={type:b.type,name:b.name,value:b.value,position:b.position},_.arguments=b.arguments.map(function(G){var ae=ce(G);return ge(_,ae),ae}),_.procedure=ce(b.procedure);break;case"lambda":_={type:b.type,arguments:b.arguments,signature:b.signature,position:b.position};var B=ce(b.body);_.body=q(B);break;case"condition":_={type:b.type,position:b.position},_.condition=ce(b.condition),ge(_,_.condition),_.then=ce(b.then),ge(_,_.then),typeof b.else<"u"&&(_.else=ce(b.else),ge(_,_.else));break;case"transform":_={type:b.type,position:b.position},_.pattern=ce(b.pattern),_.update=ce(b.update),typeof b.delete<"u"&&(_.delete=ce(b.delete));break;case"block":_={type:b.type,position:b.position},_.expressions=b.expressions.map(function(G){var ae=ce(G);return ge(_,ae),(ae.consarray||ae.type==="path"&&ae.steps[0].consarray)&&(_.consarray=!0),ae});break;case"name":_={type:"path",steps:[b]},b.keepArray&&(_.keepSingletonArray=!0);break;case"parent":_={type:"parent",slot:{label:"!"+le++,level:1,index:pe++}},Be.push(_);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":_=b;break;case"operator":if(b.value==="and"||b.value==="or"||b.value==="in")b.type="name",_=ce(b);else if(b.value==="?")_=b;else throw{code:"S0201",stack:new Error().stack,position:b.position,token:b.value};break;case"error":_=b,b.lhs&&(_=ce(b.lhs));break;default:var V="S0206";b.id==="(end)"&&(V="S0207");var N={code:V,position:b.position,token:b.value};if(f)return z.push(N),{type:"error",error:N};throw N.stack=new Error().stack,N}return b.keepArray&&(_.keepArray=!0),_};E=g(m),k();var W=D(0);if(C.id!=="(end)"){var Ae={code:"S0201",position:C.position,token:C.value};M(Ae)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return z.length>0&&(W.errors=z),W};return x})();r.exports=o},{"./signature":5}],5:[function(s,r,i){var n=s("./utils");const o=(()=>{var l={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function h(g){for(var x=1,m=[],f=Object.create(null),C=f;x<g.length;){var E=g.charAt(x);if(E===":")break;var T=function(){m.push(f),C=f,f=Object.create(null)},z=function(j,ne,re,ie){for(var q=1,le=ne;le<j.length;)if(le++,E=j.charAt(le),E===ie){if(q--,q===0)break}else E===re&&q++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,T();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,T();break;case"f":f.regex="f",f.type=E,T();break;case"j":f.regex="[asnblom]",f.type=E,T();break;case"x":f.regex="[asnblfom]",f.type=E,T();break;case"-":C.context=!0,C.contextRegex=new RegExp(C.regex),C.regex+="?";break;case"?":case"+":C.regex+=E;break;case"(":var U=z(g,x,"(",")"),S=g.substring(x+1,U);if(S.indexOf("<")===-1)f.regex="["+S+"m]";else throw{code:"S0402",stack:new Error().stack,value:S,offset:x};f.type="("+S+")",x=U,T();break;case"<":if(C.type==="a"||C.type==="f"){var y=z(g,x,"<",">");C.subtype=g.substring(x+1,y),x=y}else throw{code:"S0401",stack:new Error().stack,value:C.type,offset:x};break}x++}var M="^"+m.map(function(j){return"("+j.regex+")"}).join("")+"$",k=new RegExp(M),D=function(j){var ne;if(n.isFunction(j))ne="f";else{var re=typeof j;switch(re){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":j===null?ne="l":Array.isArray(j)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},Y=function(j,ne){for(var re="^",ie=0,q=0;q<m.length;q++){re+=m[q].regex;var le=ne.match(re);if(le===null)throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1}};return{definition:g,validate:function(j,ne){var re="";j.forEach(function(pe){re+=D(pe)});var ie=k.exec(re);if(ie){var q=[],le=0;return m.forEach(function(pe,Be){var ue=j[le],ge=ie[Be+1];if(ge==="")if(pe.context&&pe.contextRegex){var $e=D(ne);if(pe.contextRegex.test($e))q.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else q.push(ue),le++;else ge.split("").forEach(function(ce){if(ue=j[le],pe.type==="a"){if(ce==="m")ue=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&ge!==pe.subtype)W=!1;else if(ce==="a"&&ue.length>0){var Ae=D(ue[0]);if(Ae!==pe.subtype.charAt(0))W=!1;else{var b=ue.filter(function(_){return D(_)!==Ae});W=b.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:ue,index:le+1,type:l[pe.subtype]};ce!=="a"&&(ue=[ue])}q.push(ue),le++}else q.push(ue),le++})}),q}Y(j,re)}}}return h})();r.exports=o},{"./utils":6}],6:[function(s,r,i){const n=(()=>{function o(y){var M=!1;if(typeof y=="number"&&(M=!isNaN(y),M&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return M}function l(y){var M=!1;return Array.isArray(y)&&(M=y.filter(function(k){return typeof k!="string"}).length===0),M}function h(y){var M=!1;return Array.isArray(y)&&(M=y.filter(function(k){return!o(k)}).length===0),M}function g(y){return y.sequence===!0&&Array.isArray(y)}function x(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function m(y){var M=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return M}function f(y){return y&&y._jsonata_lambda===!0}var C=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(y){return typeof y=="object"&&y!==null&&C in y&&"next"in y&&typeof y.next=="function"}function T(y,M){if(y===M)return!0;if(typeof y=="object"&&typeof M=="object"&&y!==null&&M!==null){if(Array.isArray(y)&&Array.isArray(M)){if(y.length!==M.length)return!1;for(var k=0;k<y.length;k++)if(!T(y[k],M[k]))return!1;return!0}var D=Object.getOwnPropertyNames(y),Y=Object.getOwnPropertyNames(M);if(D.length!==Y.length)return!1;for(D=D.sort(),Y=Y.sort(),k=0;k<D.length;k++)if(D[k]!==Y[k])return!1;for(k=0;k<D.length;k++){var j=D[k];if(!T(y[j],M[j]))return!1}return!0}return!1}function z(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function U(y){var M=[];for(let k of y)M.push(k);return M}function S(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:o,isArrayOfStrings:l,isArrayOfNumbers:h,isSequence:g,isFunction:x,isLambda:f,isIterable:E,getFunctionArity:m,isDeepEqual:T,stringToArray:U,isPromise:z,keys:S}})();r.exports=n},{}]},{},[3])(3)})})(jn)),jn.exports}var ku=Cu();const $u=fa(ku);function Du(t){t.registerFunction("ucFirst",e=>zr.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",r="EUR")=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(r)}).format(i)}),t.registerFunction("percent",(e,s="fr-FR",r=0)=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(r)||0}).format(i)}),t.registerFunction("date",(e,s="fr-FR",r)=>{const i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e??"");let n={dateStyle:"medium"};if(r)try{n=JSON.parse(String(r))}catch{}return new Intl.DateTimeFormat(String(s),n).format(i)}),t.registerFunction("toChart",(e,s="label",r="value",i="")=>{const n=Array.isArray(e)?e:[],o=[],l=[];for(const h of n){if(!h||typeof h!="object")continue;const g=h;o.push(String(g[String(s)]??"")),l.push(Number(g[String(r)]??0))}return{labels:o,datasets:[{label:String(i||""),data:l}]}})}const ba=new Map,va=8e3;function Eu(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>va)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${va}).`);const e=ba.get(t);if(e)return e;try{const s=$u(t);return Du(s),ba.set(t,s),s}catch(s){const r=s instanceof Error?s.message:typeof s=="object"&&s&&"message"in s?String(s.message):String(s);throw new Error(`[sonic-jsonata] Syntaxe JSONata invalide : ${r}`)}}function Ou(t,e){if(!e||typeof e!="object")return;const s=e.type;if(typeof s=="string"&&!(s==="array"&&Array.isArray(t)||s==="object"&&t!==null&&typeof t=="object"&&!Array.isArray(t)||s==="string"&&typeof t=="string"||s==="number"&&typeof t=="number"||s==="boolean"&&typeof t=="boolean"||s==="null"&&t===null))throw new Error(`[sonic-jsonata] outputSchema : type attendu "${s}", reçu ${Tu(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const r=t;for(const i of e.required)if(typeof i=="string"&&!(i in r))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${i}".`)}}function Tu(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const Lu=150,ya=10,Iu=200,Mu=16,wa=new WeakMap;let _a=!1;function ms(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Sr(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function Nu(t,e,s){if(t===window){window.scrollTo(e,s);return}const r=t;typeof r.scrollTo=="function"?r.scrollTo(e,s):(r.scrollLeft=e,r.scrollTop=s)}function Fu(t){if(t===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const e=t;return Math.max(0,e.scrollHeight-e.clientHeight)}function Js(t){let e=wa.get(t);if(!e){const s=Sr(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},wa.set(t,e)}return e}function ji(t){Js(t).userEngaged=!0}function zi(t){const e=Js(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},Lu)}function Sa(t,e){return e-t>=Iu}function Pr(t){if(!ms())return;const e=Js(t);if(e.restoring)return;const s=Sr(t);if(Sa(s.y,e.y)){Un(t);return}e.x=s.x,e.y=s.y}function zn(t){if(!ms())return;const e=Js(t),s=Fu(t),r=e.x,i=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=Sr(t);if(!(Math.abs(r-n)<=ya&&Math.abs(i-o)<=ya)){e.restoring=!0;try{Nu(t,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Ru(t,e={x:0,y:0}){if(!ms())return;const s=Js(t);if(e==="current"){const r=Sr(t);s.x=r.x,s.y=r.y;return}s.x=e.x??0,s.y=e.y??0}function Un(t){const e=Js(t);if(e.stickyFrames=Mu,e.raf)return;const s=()=>{e.raf=0,zn(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function qn(t){Un(t)}function Qs(t){if(!ms())return;const e=Js(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,r=()=>{if(e.restoring)return;const{y:E}=Sr(t);if(Sa(E,e.y)){Un(t);return}if(e.userEngaged){Pr(t),zi(t);return}Pr(t)},i=E=>Pa(E)===t,n=E=>{i(E)&&(Pr(t),ji(t))},o=E=>{i(E)&&zi(t)},l=E=>{i(E)&&(Pr(t),ji(t),zi(t))};s.addEventListener("scroll",r,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",l,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const h=Sr(t);if(e.x=h.x,e.y=h.y,t===window){const E=new ResizeObserver(()=>qn(window));E.observe(document.documentElement),e.resizeObserver=E;return}const g=t,x=new ResizeObserver(()=>qn(g));x.observe(g);for(const E of Array.from(g.children))x.observe(E);e.resizeObserver=x;const m=()=>qn(g),f=new MutationObserver(E=>{for(const T of E)if(T.type==="childList")for(const z of Array.from(T.addedNodes))z instanceof Element&&x.observe(z);m()});f.observe(g,{childList:!0,subtree:!0,characterData:!0});const C=g.getRootNode();C instanceof ShadowRoot&&C.host&&f.observe(C.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function Pa(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&xa(e))return e;return window}function xa(t){if(!(t instanceof HTMLElement)||t===document.documentElement||t===document.body)return!1;const e=getComputedStyle(t).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Bn(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&xa(s)&&Qs(s);const e=Pa(t);Qs(e),t.type==="wheel"?(Pr(e),ji(e),zi(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(Pr(e),ji(e))}function Ui(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&Qs(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Qs(e)})}function Hn(t){Ui(t),new MutationObserver(s=>{for(const r of s)for(const i of Array.from(r.addedNodes))i instanceof Element&&Ui(i)}).observe(t,{childList:!0,subtree:!0})}function Vn(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(Hn(e.shadowRoot),Vn(e.shadowRoot))})}function ju(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(r){const i=e.call(this,r);return Hn(i),i}}function Aa(){if(typeof window>"u"||_a||(_a=!0,!ms()))return;Qs(window),ju();const t={capture:!0,passive:!0};window.addEventListener("wheel",Bn,t),window.addEventListener("touchstart",Bn,t),window.addEventListener("pointerdown",Bn,t);const e=()=>{Ui(document),Vn(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const n of Array.from(i.addedNodes))n instanceof Element&&(Ui(n),n.shadowRoot&&Hn(n.shadowRoot),Vn(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const zu=dc,Uu=du,qu=Ai,Bu=zr,gs=ze,Hu=dt,Qr=ut,Vu=Os,Wu=fs;Aa(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:zu,Arrays:Uu,DataBindObserver:qu,Format:Bu,HTML:gs,LocationHandler:Hu,Objects:Qr,PublisherManager:ve,api:Vu,URLPattern:Wu,Endpoint:Ii,DataProviderKey:Cs};var Ku=Object.defineProperty,Gu=Object.getOwnPropertyDescriptor,Xr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ku(e,s,i),i};const Wn=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const r=this.getAttribute("name"),i=this.getCheckAllPublisher(),n=this.getFormPublisher();if(i?.hasCheckAll.get()&&!this.checksAll()&&i&&n&&r){if(this.getFormPublisherValue()?.length)(this.checked===null||i.checkMode.get()=="noneChecked"||i.checkMode.get()==null)&&i.checkMode.set("someUnchecked");else{i.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),l=i.values.get();if(l&&l.length){let h=l.length;for(const g of l)o.indexOf(g)==-1&&(h-=1);h==l.length&&i.checkMode.set("allChecked"),h==0&&i.checkMode.set("noneChecked")}l.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=r=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),r=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),r=="noneChecked"&&(this.checked=null),r=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(r){if(this.value==r||(this.hasAttribute("value")&&!this.forceAutoFill&&(r=this.getAttribute("value")),this._value==r)||r==null||(this._value=r,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==r?!0:null),Array.isArray(n)||(n=[]),n.indexOf(r)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(r){if(this.setCheckedValue(r),this.checksAll()){const i=this.getCheckAllPublisher();i&&(this.checked===!0?i.checkMode.set("allChecked"):this.checked===null&&(i.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();if(i){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;i.isFormValid=!1,r.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(r){this._checked!=r&&(this._checked=r,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const r=this.checked===!0?this.radio?!0:null:!0;this.checked=r;const i=new Event("change");this.dispatchEvent(i)}getValueForFormPublisher(){let r=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:r;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(r)||(r=[]);const i=r.slice(0),n=i.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&i.push(this.value),this.checked===null&&n!==-1&&i.splice(n,1),i}setFormValueFromPublisher(r){if(this.unique||this.radio){this.checked=this.value==r?!0:null;return}Array.isArray(r)||(r=[]),!this.checksAll()&&(this.checked=r.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const r=this.formDataProvider,i=this.getAttribute("name");return!r||!i?null:ve.get(r+"/"+i+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const r=this.getCheckAllPublisher();if(r&&(r.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const i=r.values.get().slice(0),n=i.indexOf(this.value);n!=-1&&(i.splice(n,1),r.values.set(i))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const n=this.getFormPublisherValue();n&&Array.isArray(n)&&n.indexOf(this.value)!==-1&&(this.checked=!0)}const i=this.getCheckAllPublisher();i&&(i.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&i.hasCheckAll.set(!0),i.values.get()||i.values.set([]),this.checksAll()||i.values.set([...i.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Xr([u()],e.prototype,"value",1),Xr([u()],e.prototype,"forceAutoFill",2),Xr([u({type:Boolean})],e.prototype,"unique",2),Xr([u({type:Boolean})],e.prototype,"radio",2),Xr([u()],e.prototype,"checked",1),e};/**
72
+ */const pa="important",uu=" !"+pa,$t=Es(class extends vr{constructor(t){if(super(t),t.type!==Zs.ATTRIBUTE||t.name!=="style"||t.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(t){return Object.keys(t).reduce(((e,s)=>{const r=t[s];return r==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:s}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(uu);r.includes("-")||n?s.setProperty(r,n?i.slice(0,-11):i,n?pa:""):s[r]=i}}return zt}});var hu=Object.defineProperty,du=Object.getOwnPropertyDescriptor,Jt=(t,e,s,r)=>{for(var i=r>1?void 0:r?du(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&hu(e,s,i),i};const Li=new Map,_r=t=>{class e extends t{constructor(...r){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 i=>{this.setFormValueFromPublisher(i)},this.onFormDataInValidate=()=>{const i=this.getFormPublisher();i&&i.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(r){return ze.getAncestorAttributeValue(this,r)!=null}getAncestorAttributeValue(r){return ze.getAncestorAttributeValue(this,r)||""}get name(){return this._name}set name(r){this.hasAttribute("name")&&!this.forceAutoFill&&(r=this.getAttribute("name")),this._name=r,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?ye.get(this.formDataProvider):null}setFormPublisherValue(r){const i=this.getFormPublisher();i&&Ot(i,this.name).set(r)}getFormPublisherValue(){const r=this.getFormPublisher();return r?Ot(r,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(r){this.value=r}get value(){return this._value}set value(r){r==null&&(r=""),ut.isObject(r)&&Object.prototype.hasOwnProperty.call(r,"__value")&&r._value==null&&(r=""),this._value!=r&&(this._value=r,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let r=this.getFormPublisher();const i=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&r&&Ot(r,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),r=this.getFormPublisher(),this._name&&r&&(Ot(r,this._name).onAssign(this.onFormValueAssign),r.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),i&&(this.value=i)}handleBlur(){this.touched=!0}handleChange(r){this.value=r.target.value;const i=new Event("change");this.dispatchEvent(i)}addKeyboardNavigation(){const r=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!r)return;const i=r.split(" "),n=i[0];if(!n)return;for(const l of i){Li.has(l)||Li.set(l,[]);const h=Li.get(l);h?.indexOf(this)==-1&&h.push(this)}const o=Li.get(n);this.addEventListener("keydown",l=>{const h=l;if(!["ArrowDown","ArrowUp"].includes(h.key))return;const g="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",x=o?.filter(C=>{const E=C.shadowRoot?.querySelector(g);if(!E)return!1;const T=window.getComputedStyle(E);return T.display!=="none"&&T.display!==""&&T.pointerEvents!="none"&&T.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let m=null;if(h.key=="ArrowDown"&&x){const C=x.indexOf(this);C==x.length-1?m=x[0]:m=x[C+1]}else if(h.key=="ArrowUp"&&x){const C=x.indexOf(this);C==0?m=x[x.length-1]:m=x[C-1]}const f=m?.shadowRoot?.querySelector(g);f&&f.focus&&(f.focus(),l.preventDefault(),l.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 r=this.getFormPublisher();this._name&&r&&(Ot(r,this._name).offAssign(this.onFormValueAssign),r.offFormInvalidate(this.onFormDataInValidate))}}return Jt([u({type:Boolean,reflect:!0})],e.prototype,"touched",2),Jt([u({type:Boolean})],e.prototype,"error",2),Jt([u({type:Boolean})],e.prototype,"autofocus",2),Jt([u({type:Boolean})],e.prototype,"required",2),Jt([u({type:Boolean})],e.prototype,"forceAutoFill",2),Jt([u({type:Boolean,reflect:!0})],e.prototype,"disabled",2),Jt([u({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Jt([u({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Jt([u({type:String})],e.prototype,"formDataProvider",2),Jt([u()],e.prototype,"name",1),Jt([u()],e.prototype,"value",1),e};let pu=class dr{static areEqual(e,s){return e.length===s.length?e.every((r,i)=>r===s[i]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(r=>s=s.concat(r)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const r=(e[0]||{})[s];return e.every(i=>(i||{})[s]==r)}})})}),value:()=>({forKey:s=>dr.from(e.map(r=>r[s]))}),copy:()=>({fromKey:s=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[s])?[...i[s]]:typeof i[s]=="object"&&i[s]!=null?{...i[s]}:i[s]})}})})}),map:s=>dr.from(e.map(s)),filter:s=>dr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const r=[],i=new Map;for(const n of e){const o=n[s];if(!i.has(o)){const l=r.length;i.set(o,l);const h={items:[]};h[s]=o,r.push(h)}r[i.get(o)].items.push(n)}return dr.from(r)}}),without:()=>({duplicates:()=>({forKey:s=>{const r=[...new Set(e.map(i=>i[s]))];return dr.from(r.map(i=>e.find(n=>n[s]==i)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:r=>{const i=(n,o)=>l=>n[o]!=l[o];return dr.from(e.filter(n=>s.every(i(n,r))))}})})})}}};var fa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ma(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Zr={exports:{}},fu=Zr.exports,ga;function mu(){return ga||(ga=1,(function(t,e){var s=[].slice;(function(r,i){return e!==null?t.exports=i():r.UrlPattern=i()})(fu,function(){var r,i,n,o,l,h,g,x,m,f,C,E,T,z,U;return m=function(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},g=function(S,v){var M,k,D;for(D=[],M=-1,k=S.length;++M<k;)D=D.concat(v(S[M]));return D},z=function(S,v){var M,k,D;for(D="",M=-1,k=S.length;++M<k;)D+=v(S[M]);return D},T=function(S){return new RegExp(S.toString()+"|").exec("").length-1},C=function(S,v){var M,k,D,Y,j;for(Y={},M=-1,D=S.length;++M<D;)k=S[M],j=v[M],j!=null&&(Y[k]!=null?(Array.isArray(Y[k])||(Y[k]=[Y[k]]),Y[k].push(j)):Y[k]=j);return Y},r={},r.Result=function(S,v){this.value=S,this.rest=v},r.Tagged=function(S,v){this.tag=S,this.value=v},r.tag=function(S,v){return function(M){var k,D;if(k=v(M),k!=null)return D=new r.Tagged(S,k.value),new r.Result(D,k.rest)}},r.regex=function(S){return function(v){var M,k;if(M=S.exec(v),M!=null)return k=M[0],new r.Result(k,v.slice(k.length))}},r.sequence=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(v){var M,k,D,Y,j,ne;for(M=-1,k=S.length,ne=[],Y=v;++M<k;){if(D=S[M],j=D(Y),j==null)return;ne.push(j.value),Y=j.rest}return new r.Result(ne,Y)}},r.pick=function(){var S,v;return S=arguments[0],v=2<=arguments.length?s.call(arguments,1):[],function(M){var k,D;if(D=r.sequence.apply(r,v)(M),D!=null)return k=D.value,D.value=k[S],D}},r.string=function(S){var v;return v=S.length,function(M){if(M.slice(0,v)===S)return new r.Result(S,M.slice(v))}},r.lazy=function(S){var v;return v=null,function(M){return v==null&&(v=S()),v(M)}},r.baseMany=function(S,v,M,k,D){var Y,j,ne,re;for(ne=D,re=M?"":[];!(v!=null&&(Y=v(ne),Y!=null)||(j=S(ne),j==null));)M?re+=j.value:re.push(j.value),ne=j.rest;if(!(k&&re.length===0))return new r.Result(re,ne)},r.many1=function(S){return function(v){return r.baseMany(S,null,!1,!0,v)}},r.concatMany1Till=function(S,v){return function(M){return r.baseMany(S,v,!0,!0,M)}},r.firstChoice=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(v){var M,k,D,Y;for(M=-1,k=S.length;++M<k;)if(D=S[M],Y=D(v),Y!=null)return Y}},E=function(S){var v;return v={},v.wildcard=r.tag("wildcard",r.string(S.wildcardChar)),v.optional=r.tag("optional",r.pick(1,r.string(S.optionalSegmentStartChar),r.lazy(function(){return v.pattern}),r.string(S.optionalSegmentEndChar))),v.name=r.regex(new RegExp("^["+S.segmentNameCharset+"]+")),v.named=r.tag("named",r.pick(1,r.string(S.segmentNameStartChar),r.lazy(function(){return v.name}))),v.escapedChar=r.pick(1,r.string(S.escapeChar),r.regex(/^./)),v.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return v.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(S.segmentNameStartChar),r.string(S.optionalSegmentStartChar),r.string(S.optionalSegmentEndChar),v.wildcard))),v.token=r.lazy(function(){return r.firstChoice(v.wildcard,v.optional,v.named,v.static)}),v.pattern=r.many1(r.lazy(function(){return v.token})),v},x={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},h=function(S,v){if(Array.isArray(S))return z(S,function(M){return h(M,v)});switch(S.tag){case"wildcard":return"(.*?)";case"named":return"(["+v+"]+)";case"static":return m(S.value);case"optional":return"(?:"+h(S.value,v)+")?"}},l=function(S,v){return v==null&&(v=x.segmentValueCharset),"^"+h(S,v)+"$"},o=function(S){if(Array.isArray(S))return g(S,o);switch(S.tag){case"wildcard":return["_"];case"named":return[S.value];case"static":return[];case"optional":return o(S.value)}},f=function(S,v,M,k){var D,Y,j,ne;if(k==null&&(k=!1),ne=S[v],ne==null){if(k)throw new Error("no values provided for key `"+v+"`");return}if(D=M[v]||0,Y=Array.isArray(ne)?ne.length-1:0,D>Y){if(k)throw new Error("too few values provided for key `"+v+"`");return}return j=Array.isArray(ne)?ne[D]:ne,k&&(M[v]=D+1),j},n=function(S,v,M){var k,D;if(Array.isArray(S)){for(k=-1,D=S.length;++k<D;)if(n(S[k],v,M))return!0;return!1}switch(S.tag){case"wildcard":return f(v,"_",M,!1)!=null;case"named":return f(v,S.value,M,!1)!=null;case"static":return!1;case"optional":return n(S.value,v,M)}},U=function(S,v,M){if(Array.isArray(S))return z(S,function(k){return U(k,v,M)});switch(S.tag){case"wildcard":return f(v,"_",M,!0);case"named":return f(v,S.value,M,!0);case"static":return S.value;case"optional":return n(S.value,v,M)?U(S.value,v,M):""}},i=function(S,v){var M,k,D,Y,j;if(S instanceof i){this.isRegex=S.isRegex,this.regex=S.regex,this.ast=S.ast,this.names=S.names;return}if(this.isRegex=S instanceof RegExp,!(typeof S=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=S,v!=null){if(!Array.isArray(v))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=T(this.regex),v.length!==M)throw new Error("regex contains "+M+" groups but array of group names contains "+v.length);this.names=v}return}if(S==="")throw new Error("argument must not be the empty string");if(j=S.replace(/\s+/g,""),j!==S)throw new Error("argument must not contain whitespace");if(k={escapeChar:v?.escapeChar||x.escapeChar,segmentNameStartChar:v?.segmentNameStartChar||x.segmentNameStartChar,segmentNameCharset:v?.segmentNameCharset||x.segmentNameCharset,segmentValueCharset:v?.segmentValueCharset||x.segmentValueCharset,optionalSegmentStartChar:v?.optionalSegmentStartChar||x.optionalSegmentStartChar,optionalSegmentEndChar:v?.optionalSegmentEndChar||x.optionalSegmentEndChar,wildcardChar:v?.wildcardChar||x.wildcardChar},Y=E(k),D=Y.pattern(S),D==null)throw new Error("couldn't parse pattern");if(D.rest!=="")throw new Error("could only partially parse pattern");this.ast=D.value,this.regex=new RegExp(l(this.ast,k.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(S){var v,M;return M=this.regex.exec(S),M==null?null:(v=M.slice(1),this.names?C(this.names,v):v)},i.prototype.stringify=function(S){if(S==null&&(S={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(S!==Object(S))throw new Error("argument must be an object or undefined");return U(this.ast,S,{})},i.escapeForRegex=m,i.concatMap=g,i.stringConcatMap=z,i.regexGroupCount=T,i.keysAndValuesToObject=C,i.P=r,i.newParser=E,i.defaultOptions=x,i.astNodeToRegexString=l,i.astNodeToNames=o,i.getParam=f,i.astNodeContainsSegmentsForProvidedParams=n,i.stringify=U,i})})(Zr,Zr.exports)),Zr.exports}var gu=mu();const fs=ma(gu);class Ii{constructor(e){this.path=Ii.normalizePath(e)}getDataProviderKey(){return new Cs(this.path)}static normalizePath(e){const s=String(e).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let h;try{h=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return h.pathname=h.pathname.replace(/\/+/g,"/"),h.href}const r=s.indexOf("?"),i=s.indexOf("#");let n=s.length;r>=0&&(n=Math.min(n,r)),i>=0&&(n=Math.min(n,i));let o=s.slice(0,n);const l=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&l)throw new RangeError("Endpoint: path cannot be empty");return o+l}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 bu=50,yu=1e4,vu=100,jn=new Map;function Mi(t){return vi(t)}function Jr(t){return t.split(".")[0]??t}function Ni(t){const e=t.split("."),s=e.shift();let r=ye.get(s);return e.length&&(r=ut.traverse(r,e)),r}function wu(t){return t==null?!0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.length===0:!1}function _u(t){return Array.isArray(t)?t.length:0}function Su(t,e){for(const o of e)if(o===t||t.startsWith(o+".")||o.startsWith(t+"."))throw new Error(`[derive] Cycle détecté : la sortie "${t}" chevauche l'entrée "${o}".`);const s=Jr(t),r=new Map;for(const[o,l]of jn)r.set(Jr(o),new Set(l));r.set(s,new Set(e.map(Jr)));const i=new Set,n=o=>{if(i.has(o))return!0;i.add(o);for(const l of r.get(o)??[])if(n(l))return!0;return i.delete(o),!1};if(n(s))throw new Error(`[derive] Cycle détecté (chaîne) : la sortie "${t}" dépend indirectement d'elle-même.`)}function Pu(t,e){jn.set(t,new Set(e.map(s=>Jr(s))))}function xu(t){jn.delete(t)}function Au(t){return`${Jr(Mi(t))}/_state_`}function Fi(t,e){const s=Au(t);ye.get(s).set(e)}function Cu(t,e,s,r){const i=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:r},n=i.debounceMs??bu,o=i.maxInputItems??yu,l=i.isEmpty??wu,h=Mi(i.output),g=Object.entries(i.inputs).map(([ie,q])=>({alias:ie,path:Mi(q)})),x=g.map(ie=>ie.path),m=i.variables?Mi(i.variables):null;Su(h,x),Pu(h,x);const f=Ni(h);let C,E=!1,T=0,z=null,U=!1,S="";const v=ie=>{E=!0,C=ie,f.set(ie),E=!1},M=()=>{E||U||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${h}".`),C!==void 0&&(E=!0,f.set(C),E=!1))};f.onAssign(M,!1);const k=()=>{const ie={};for(const{alias:q,path:le}of g){const pe=Ni(le).get(),Be=_u(pe);Be>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${Be} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[q]=pe}return ie},D=()=>m?Ni(m).get()??{}:{},Y=async()=>{if(U)return;const ie=++T;Fi(h,{status:"loading",error:null});const q=k(),le=D(),pe=JSON.stringify({inputs:q,vars:le});if(pe===S&&C!==void 0){Fi(h,{status:l(C)?"empty":"ready",error:null});return}const Be=typeof performance<"u"?performance.now():Date.now();try{const ue=await Promise.resolve(i.compute(q,le));if(U||ie!==T)return;const ge=(typeof performance<"u"?performance.now():Date.now())-Be;ge>vu&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(ge)} ms) → "${h}".`),S=pe,v(ue),Fi(h,{status:l(ue)?"empty":"ready",error:null})}catch(ue){if(U||ie!==T)return;const ge=ue instanceof Error?ue.message:String(ue);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${h}" :`,ge),Fi(h,{status:"error",error:ge})}},j=()=>{U||(z&&clearTimeout(z),z=setTimeout(()=>{z=null,Y()},n))},ne=[],re=ie=>{const q=Ni(ie),le=()=>j();q.onInternalMutation(le),ne.push({pub:q,handler:le})};for(const{path:ie}of g)re(ie);return m&&re(m),j(),{stop(){if(!U){U=!0,z&&clearTimeout(z);for(const{pub:ie,handler:q}of ne)ie.offInternalMutation(q);f.offAssign(M),xu(h)}},recompute(){S="",Y()}}}function Ri(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zn={exports:{}},ba;function ku(){return ba||(ba=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(r,i,n){function o(g,x){if(!i[g]){if(!r[g]){var m=typeof Ri=="function"&&Ri;if(!x&&m)return m(g,!0);if(l)return l(g,!0);var f=new Error("Cannot find module '"+g+"'");throw f.code="MODULE_NOT_FOUND",f}var C=i[g]={exports:{}};r[g][0].call(C.exports,function(E){var T=r[g][1][E];return o(T||E)},C,C.exports,s,r,i,n)}return i[g].exports}for(var l=typeof Ri=="function"&&Ri,h=0;h<n.length;h++)o(n[h]);return o}return s})()({1:[function(s,r,i){const n=s("./utils"),o=(function(){const l=n.stringToArray,h=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],g=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],x=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],m=["Thousand","Million","Billion","Trillion"];function f(O,I){var $=function(B,V,N){var G="";if(B<=19)G=(V?" and ":"")+(N?g[B]:h[B]);else if(B<100){const Ce=Math.floor(B/10),me=B%10;G=(V?" and ":"")+x[Ce-2],me>0?G+="-"+$(me,!1,N):N&&(G=G.substring(0,G.length-1)+"ieth")}else if(B<1e3){const Ce=Math.floor(B/100),me=B%100;G=(V?", ":"")+h[Ce]+" Hundred",me>0?G+=$(me,!0,N):N&&(G+="th")}else{var ae=Math.floor(Math.log10(B)/3);ae>m.length&&(ae=m.length);const Ce=Math.pow(10,ae*3),me=Math.floor(B/Ce),fe=B-me*Ce;G=(V?", ":"")+$(me,!1,!1)+" "+m[ae-1],fe>0?G+=$(fe,!0,N):N&&(G+="th")}return G},F=$(O,!1,I);return F}const C=Object.create(null);h.forEach(function(O,I){C[O.toLowerCase()]=I}),g.forEach(function(O,I){C[O.toLowerCase()]=I}),x.forEach(function(O,I){const $=O.toLowerCase();C[$]=(I+2)*10,C[$.substring(0,O.length-1)+"ieth"]=C[$]}),C.hundredth=100,m.forEach(function(O,I){const $=O.toLowerCase(),F=Math.pow(10,(I+1)*3);C[$]=F,C[$+"th"]=F});function E(O){const $=O.split(/,\s|\sand\s|[\s\\-]/).map(V=>C[V]);let F=[0];return $.forEach(V=>{if(V<100){let N=F.pop();N>=1e3&&(F.push(N),N=0),F.push(N+V)}else F.push(F.pop()*V)}),F.reduce((V,N)=>V+N,0)}const T=[[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"]],z={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function U(O){for(var I=0;I<T.length;I++){const $=T[I];if(O>=$[0])return $[1]+U(O-$[0])}return""}function S(O){for(var I=0,$=1,F=O.length-1;F>=0;F--){const B=O[F],V=z[B];V<$?I-=V:($=V,I+=V)}return I}function v(O,I){for(var $=[],F=I.charCodeAt(0);O>0;)$.unshift(String.fromCharCode((O-1)%26+F)),O=Math.floor((O-1)/26);return $.join("")}function M(O,I){for(var $=I.charCodeAt(0),F=0,B=0;B<O.length;B++)F+=(O.charCodeAt(O.length-B-1)-$+1)*Math.pow(26,B);return F}function k(O,I){if(typeof O>"u")return;O=Math.floor(O);const $=re(I);return j(O,$)}const D={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},Y={UPPER:"upper",LOWER:"lower",TITLE:"title"};function j(O,I){let $;const F=O<0;switch(O=Math.abs(O),I.primary){case D.LETTERS:$=v(O,I.case===Y.UPPER?"A":"a");break;case D.ROMAN:$=U(O),I.case===Y.UPPER&&($=$.toUpperCase());break;case D.WORDS:$=f(O,I.ordinal),I.case===Y.UPPER?$=$.toUpperCase():I.case===Y.LOWER&&($=$.toLowerCase());break;case D.DECIMAL:$=""+O;var B=I.mandatoryDigits-$.length;if(B>0){var V=new Array(B+1).join("0");$=V+$}if(I.zeroCode!==48&&($=l($).map(Ce=>String.fromCodePoint(Ce.codePointAt(0)+I.zeroCode-48)).join("")),I.regular){const Ce=Math.floor(($.length-1)/I.groupingSeparators.position);for(let me=Ce;me>0;me--){const fe=$.length-me*I.groupingSeparators.position;$=$.substr(0,fe)+I.groupingSeparators.character+$.substr(fe)}}else I.groupingSeparators.reverse().forEach(Ce=>{const me=$.length-Ce.position;$=$.substr(0,me)+Ce.character+$.substr(me)});if(I.ordinal){var N={1:"st",2:"nd",3:"rd"},G=$[$.length-1],ae=N[G];(!ae||$.length>1&&$[$.length-2]==="1")&&(ae="th"),$=$+ae}break;case D.SEQUENCE:throw{code:"D3130",value:I.token}}return F&&($="-"+$),$}const ne=[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 re(O){const I={type:"integer",primary:D.DECIMAL,case:Y.LOWER,ordinal:!1};let $,F;const B=O.lastIndexOf(";");switch(B===-1?$=O:($=O.substring(0,B),F=O.substring(B+1),F[0]==="o"&&(I.ordinal=!0)),$){case"A":I.case=Y.UPPER;case"a":I.primary=D.LETTERS;break;case"I":I.case=Y.UPPER;case"i":I.primary=D.ROMAN;break;case"W":I.case=Y.UPPER,I.primary=D.WORDS;break;case"Ww":I.case=Y.TITLE,I.primary=D.WORDS;break;case"w":I.primary=D.WORDS;break;default:{let V=null,N=0,G=0,ae=[],Ce=0;if(l($).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let he=!1;for(let De=0;De<ne.length;De++){const de=ne[De];if(fe>=de&&fe<=de+9){if(he=!0,N++,Ce++,V===null)V=de;else if(de!==V)throw{code:"D3131"};break}}he||(fe===35?(Ce++,G++):ae.push({position:Ce,character:String.fromCodePoint(fe)}))}),N>0){I.primary=D.DECIMAL,I.zeroCode=V,I.mandatoryDigits=N,I.optionalDigits=G;const he=function(De){if(De.length===0)return 0;const de=De[0].character;for(let it=1;it<De.length;it++)if(De[it].character!==de)return 0;const mt=De.map(it=>it.position),Yt=function(it,Pt){return Pt===0?it:Yt(Pt,it%Pt)},St=mt.reduce(Yt);for(let it=1;it<=mt.length;it++)if(mt.indexOf(it*St)===-1)return 0;return St}(ae);he>0?(I.regular=!0,I.groupingSeparators={position:he,character:ae[0].character}):(I.regular=!1,I.groupingSeparators=ae)}else I.primary=D.SEQUENCE,I.token=$}}return I}const ie={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 q(O){var I=[];const $={type:"datetime",parts:I},F=function(he,De){if(De>he){let de=O.substring(he,De);de=de.split("]]").join("]"),I.push({type:"literal",value:de})}};for(var B=0,V=0;V<O.length;){if(O.charAt(V)==="["){if(O.charAt(V+1)==="["){F(B,V),I.push({type:"literal",value:"["}),V+=2,B=V;continue}if(F(B,V),B=V,V=O.indexOf("]",B),V===-1)throw{code:"D3135"};let he=O.substring(B+1,V);he=he.split(/\s+/).join("");var N={type:"marker",component:he.charAt(0)},G=he.lastIndexOf(","),ae;if(G!==-1){const De=he.substring(G+1),de=De.indexOf("-");let mt,Yt;const St=function(Pt){if(!(typeof Pt>"u"||Pt==="*"))return parseInt(Pt)};de===-1?mt=De:(mt=De.substring(0,de),Yt=De.substring(de+1));const it={min:St(mt),max:St(Yt)};N.width=it,ae=he.substring(1,G)}else ae=he.substring(1);if(ae.length===1)N.presentation1=ae;else if(ae.length>1){var Ce=ae.charAt(ae.length-1);"atco".indexOf(Ce)!==-1?(N.presentation2=Ce,Ce==="o"&&(N.ordinal=!0),N.presentation1=ae.substring(0,ae.length-1)):N.presentation1=ae}else N.presentation1=ie[N.component];if(typeof N.presentation1>"u")throw{code:"D3132",value:N.component};if(N.presentation1[0]==="n")N.names=Y.LOWER;else if(N.presentation1[0]==="N")N.presentation1[1]==="n"?N.names=Y.TITLE:N.names=Y.UPPER;else if("YMDdFWwXxHhmsf".indexOf(N.component)!==-1){var me=N.presentation1;if(N.presentation2&&(me+=";"+N.presentation2),N.integerFormat=re(me),N.width&&N.width.min!==void 0&&N.integerFormat.mandatoryDigits<N.width.min&&(N.integerFormat.mandatoryDigits=N.width.min),N.component==="Y")if(N.n=-1,N.width&&N.width.max!==void 0)N.n=N.width.max,N.integerFormat.mandatoryDigits=N.n;else{var fe=N.integerFormat.mandatoryDigits+N.integerFormat.optionalDigits;fe>=2&&(N.n=fe)}const De=I[I.length-1];De&&De.integerFormat&&(De.integerFormat.parseWidth=De.integerFormat.mandatoryDigits)}(N.component==="Z"||N.component==="z")&&(N.integerFormat=re(N.presentation1)),I.push(N),B=V+1}V++}return F(B,V),$}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Be=1e3*60*60*24,ue=function(O){const I=Date.UTC(O.year,O.month);var $=new Date(I).getUTCDay();return $===0&&($=7),$>4?I+(8-$)*Be:I-($-1)*Be},ge=function(O,I){return{year:O,month:I,nextMonth:function(){return I===11?ge(O+1,0):ge(O,I+1)},previousMonth:function(){return I===0?ge(O-1,11):ge(O,I-1)},nextYear:function(){return ge(O+1,I)},previousYear:function(){return ge(O-1,I)}}},$e=function(O,I){return(I-O)/(Be*7)+1},ce=(O,I)=>{let $;switch(I){case"Y":$=O.getUTCFullYear();break;case"M":$=O.getUTCMonth()+1;break;case"D":$=O.getUTCDate();break;case"d":{const F=Date.UTC(O.getUTCFullYear(),O.getUTCMonth(),O.getUTCDate()),B=Date.UTC(O.getUTCFullYear(),0);$=(F-B)/Be+1;break}case"F":$=O.getUTCDay(),$===0&&($=7);break;case"W":{const F=ge(O.getUTCFullYear(),0),B=ue(F),V=Date.UTC(F.year,O.getUTCMonth(),O.getUTCDate());let N=$e(B,V);if(N>52){const G=ue(F.nextYear());V>=G&&(N=1)}else if(N<1){const G=ue(F.previousYear());N=$e(G,V)}$=Math.floor(N);break}case"w":{const F=ge(O.getUTCFullYear(),O.getUTCMonth()),B=ue(F),V=Date.UTC(F.year,F.month,O.getUTCDate());let N=$e(B,V);if(N>4){const G=ue(F.nextMonth());V>=G&&(N=1)}else if(N<1){const G=ue(F.previousMonth());N=$e(G,V)}$=Math.floor(N);break}case"X":{const F=ge(O.getUTCFullYear(),0),B=ue(F),V=ue(F.nextYear()),N=O.getTime();N<B?$=F.year-1:N>=V?$=F.year+1:$=F.year;break}case"x":{const F=ge(O.getUTCFullYear(),O.getUTCMonth()),B=ue(F),V=F.nextMonth(),N=ue(V),G=O.getTime();G<B?$=F.previousMonth().month+1:G>=N?$=V.month+1:$=F.month+1;break}case"H":$=O.getUTCHours();break;case"h":$=O.getUTCHours(),$=$%12,$===0&&($=12);break;case"P":$=O.getUTCHours()>=12?"pm":"am";break;case"m":$=O.getUTCMinutes();break;case"s":$=O.getUTCSeconds();break;case"f":$=O.getUTCMilliseconds();break;case"Z":case"z":break;case"C":$="ISO";break;case"E":$="ISO";break}return $};let W=null;function Ae(O,I,$){var F=0,B=0;if(typeof $<"u"){const me=parseInt($);F=Math.floor(me/100),B=me%100}var V=function(me,fe){var he=ce(me,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(he=he%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")he=pe[he-1];else if(fe.component==="F")he=le[he];else throw{code:"D3133",value:fe.component};fe.names===Y.UPPER?he=he.toUpperCase():fe.names===Y.LOWER&&(he=he.toLowerCase()),fe.width&&he.length>fe.width.max&&(he=he.substring(0,fe.width.max))}else he=j(he,fe.integerFormat);else if(fe.component==="f")he=j(he,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const De=F*100+B;if(fe.integerFormat.regular)he=j(De,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)he=j(F,fe.integerFormat),B!==0&&(he+=":"+k(B,"00"));else if(de===3||de===4)he=j(De,fe.integerFormat);else throw{code:"D3134",value:de}}De>=0&&(he="+"+he),fe.component==="z"&&(he="GMT"+he),De===0&&fe.presentation2==="t"&&(he="Z")}else fe.component==="P"&&fe.names===Y.UPPER&&(he=he.toUpperCase());return he};let N;typeof I>"u"?(W===null&&(W=q("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),N=W):N=q(I);const G=(60*F+B)*60*1e3,ae=new Date(O+G);let Ce="";return N.parts.forEach(function(me){me.type==="literal"?Ce+=me.value:Ce+=V(ae,me)}),Ce}function b(O){var I=Object.create(null);if(O.type==="datetime")I.type="datetime",I.parts=O.parts.map(function($){var F=Object.create(null);if($.type==="literal")F.regex=$.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if($.component==="Z"||$.component==="z"){let V;Array.isArray($.integerFormat.groupingSeparators)||(V=$.integerFormat.groupingSeparators),F.regex="",$.component==="z"&&(F.regex="GMT"),F.regex+="[-+][0-9]+",V&&(F.regex+=V.character+"[0-9]+"),F.parse=function(N){$.component==="z"&&(N=N.substring(3));let G=0,ae=0;return V?(G=Number.parseInt(N.substring(0,N.indexOf(V.character))),ae=Number.parseInt(N.substring(N.indexOf(V.character)+1))):N.length-1<=2?G=Number.parseInt(N):(G=Number.parseInt(N.substring(0,3)),ae=Number.parseInt(N.substring(3))),G*60+ae}}else if($.component==="f")F.regex="[0-9]+",F.parse=function(V){return parseFloat("0."+V.substring(0,3))*1e3};else if($.integerFormat)F=b($.integerFormat);else{F.regex="[a-zA-Z]+";var B=Object.create(null);if($.component==="M"||$.component==="x")pe.forEach(function(V,N){$.width&&$.width.max?B[V.substring(0,$.width.max)]=N+1:B[V]=N+1});else if($.component==="F")le.forEach(function(V,N){N>0&&($.width&&$.width.max?B[V.substring(0,$.width.max)]=N:B[V]=N)});else if($.component==="P")B={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:$.component};F.parse=function(V){return B[V]}}return F.component=$.component,F});else{I.type="integer";const $=O.case===Y.UPPER;switch(O.primary){case D.LETTERS:I.regex=$?"[A-Z]+":"[a-z]+",I.parse=function(F){return M(F,$?"A":"a")};break;case D.ROMAN:I.regex=$?"[MDCLXVI]+":"[mdclxvi]+",I.parse=function(F){return S($?F:F.toUpperCase())};break;case D.WORDS:I.regex="(?:"+n.keys(C).concat("and","[\\-, ]").join("|")+")+",I.parse=function(F){return E(F.toLowerCase())};break;case D.DECIMAL:I.regex="[0-9]",O.parseWidth?I.regex+=`{${O.parseWidth}}`:I.regex+="+",O.ordinal&&(I.regex+="(?:th|st|nd|rd)"),I.parse=function(F){let B=F;return O.ordinal&&(B=F.substring(0,F.length-2)),O.regular?B=B.split(",").join(""):O.groupingSeparators.forEach(V=>{B=B.split(V.character).join("")}),O.zeroCode!==48&&(B=B.split("").map(V=>String.fromCodePoint(V.codePointAt(0)-O.zeroCode+48)).join("")),parseInt(B)};break;case D.SEQUENCE:throw{code:"D3130",value:O.token}}}return I}function _(O,I){if(typeof O>"u")return;const $=re(I);return b($).parse(O)}function te(O,I){const $=q(I),F=b($),B="^"+F.parts.map(ae=>"("+ae.regex+")").join("")+"$";var N=new RegExp(B,"i").exec(O);if(N!==null){const de=Object.create(null);for(let d=1;d<N.length;d++){const y=F.parts[d-1];y.parse&&(de[y.component]=y.parse(N[d]))}if(Object.getOwnPropertyNames(de).length===0)return;let mt=0;const Yt=d=>{mt<<=1,mt+=d?1:0},St=d=>!(~d&mt)&&!!(d&mt);"YXMxWwdD".split("").forEach(d=>Yt(de[d]));const Pt=!St(161)&&St(130),Ps=St(84),Nr=!Ps&&St(72);mt=0,"PHhmsf".split("").forEach(d=>Yt(de[d]));const J=!St(23)&&St(47),ts=(Pt?"YD":Ps?"XxwF":Nr?"XWF":"YMD")+(J?"Phmsf":"Hmsf"),mi=this.environment.timestamp;let ds=!1,ur=!1;if(ts.split("").forEach(d=>{if(typeof de[d]>"u")ds?(de[d]="MDd".indexOf(d)!==-1?1:0,ur=!0):de[d]=ce(mi,d);else if(ds=!0,ur)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,Pt){const d=Date.UTC(de.Y,0),y=(de.d-1)*1e3*60*60*24,w=new Date(d+y);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(Ps)throw{code:"D3136"};if(Nr)throw{code:"D3136"};J&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var G=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(G-=(de.Z||de.z)*60*1e3),G}}var we=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 Pe(O,I){if(!(typeof O>"u"))if(typeof I>"u"){if(!we.test(O))throw{stack:new Error().stack,code:"D3110",value:O};return Date.parse(O)}else return te.call(this,O,I)}function Ee(O,I,$){if(!(typeof O>"u"))return Ae.call(this,O,I,$)}return{formatInteger:k,parseInteger:_,fromMillis:Ee,toMillis:Pe}})();r.exports=o},{"./utils":6}],2:[function(s,r,i){(function(n){(function(){var o=s("./utils");const l=(()=>{var h=o.isNumeric,g=o.isArrayOfStrings,x=o.isArrayOfNumbers,m=o.isSequence,f=o.isFunction,C=o.isLambda,E=o.isPromise,T=o.getFunctionArity,z=o.isDeepEqual,U=o.stringToArray;function S(a){if(!(typeof a>"u")){var c=0;return a.forEach(function(p){c+=p}),c}}function v(a){return typeof a>"u"?0:a.length}function M(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function k(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function D(a){if(!(typeof a>"u"||a.length===0)){var c=0;return a.forEach(function(p){c+=p}),c/a.length}}function Y(a,c=!1){if(!(typeof a>"u")){var p;if(typeof a=="string")p=a;else if(f(a))p="";else{if(typeof a=="number"&&!isFinite(a))throw{code:"D3001",value:a,stack:new Error().stack};var A=c?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(P,L){return typeof L<"u"&&L!==null&&h(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},A)}return p}}function j(a,c,p){if(!(typeof a>"u")){var A=U(a),P=A.length;if(P+c<0&&(c=0),typeof p<"u"){if(p<=0)return"";var L=c>=0?c+p:P+c+p;return A.slice(c,L).join("")}return A.slice(c).join("")}}function ne(a,c){if(!(typeof a>"u")){var p=a.indexOf(c);return p>-1?a.substr(0,p):a}}function re(a,c){if(!(typeof a>"u")){var p=a.indexOf(c);return p>-1?a.substr(p+c.length):a}}function ie(a){if(!(typeof a>"u"))return a.toLowerCase()}function q(a){if(!(typeof a>"u"))return a.toUpperCase()}function le(a){if(!(typeof a>"u"))return U(a).length}function pe(a){if(!(typeof a>"u")){var c=a.replace(/[ \t\n\r]+/gm," ");return c.charAt(0)===" "&&(c=c.substring(1)),c.charAt(c.length-1)===" "&&(c=c.substring(0,c.length-1)),c}}function Be(a,c,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var A;c=Math.trunc(c);var P=Math.abs(c)-le(a);if(P>0){var L=new Array(P+1).join(p);p.length>1&&(L=j(L,0,P)),c>0?A=a+L:A=L+a}else A=a;return A}}async function ue(a,c){var p=a.apply(this,[c]);if(E(p)&&(p=await p),p&&!(typeof p.start=="number"||p.end==="number"||Array.isArray(p.groups)||f(p.next)))throw{code:"T1010",stack:new Error().stack};return p}async function ge(a,c){if(!(typeof a>"u"||typeof c>"u")){var p;if(typeof c=="string")p=a.indexOf(c)!==-1;else{var A=await ue(c,a);p=typeof A<"u"}return p}}async function $e(a,c,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var A=this.createSequence();if(typeof p>"u"||p>0){var P=0,L=await ue(c,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||P<p);)A.push({match:L.match,index:L.start,groups:L.groups}),L=await ue(L.next),P++}return A}}async function ce(a,c,p,A){if(!(typeof a>"u")){var P=this;if(c==="")throw{code:"D3010",stack:new Error().stack,value:c,index:2};if(A<0)throw{code:"D3011",stack:new Error().stack,value:A,index:4};var L;typeof p=="string"?L=function(Ge){for(var nt="",Me=0,Qe=p.indexOf("$",Me);Qe!==-1&&Me<p.length;){nt+=p.substring(Me,Qe),Me=Qe+1;var Zt=p.charAt(Me);if(Zt==="$")nt+="$",Me++;else if(Zt==="0")nt+=Ge.match,Me++;else{var xt;if(Ge.groups.length===0?xt=1:xt=Math.floor(Math.log(Ge.groups.length)*Math.LOG10E)+1,Qe=parseInt(p.substring(Me,Me+xt),10),xt>1&&Qe>Ge.groups.length&&(Qe=parseInt(p.substring(Me,Me+xt-1),10)),isNaN(Qe))nt+="$";else{if(Ge.groups.length>0){var ps=Ge.groups[Qe-1];typeof ps<"u"&&(nt+=ps)}Me+=Qe.toString().length}}Qe=p.indexOf("$",Me)}return nt+=p.substring(Me),nt}:L=p;var H="",K=0;if(typeof A>"u"||A>0){var _e=0;if(typeof c=="string"){for(var oe=a.indexOf(c,K);oe!==-1&&(typeof A>"u"||_e<A);)H+=a.substring(K,oe),H+=p,K=oe+c.length,_e++,oe=a.indexOf(c,K);H+=a.substring(K)}else{var je=await ue(c,a);if(typeof je<"u"){for(;typeof je<"u"&&(typeof A>"u"||_e<A);){H+=a.substring(K,je.start);var Ke=L.apply(P,[je]);if(E(Ke)&&(Ke=await Ke),typeof Ke=="string")H+=Ke;else throw{code:"D3012",stack:new Error().stack,value:Ke};K=je.start+je.match.length,_e++,je=await ue(je.next)}H+=a.substring(K)}else H=a}}else H=a;return H}}function W(a){if(!(typeof a>"u")){var c=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return c(a)}}function Ae(a){if(!(typeof a>"u")){var c=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return c(a)}}function b(a){if(!(typeof a>"u")){var c;try{c=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return c}}function _(a){if(!(typeof a>"u")){var c;try{c=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return c}}function te(a){if(!(typeof a>"u")){var c;try{c=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return c}}function we(a){if(!(typeof a>"u")){var c;try{c=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return c}}async function Pe(a,c,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var A=[];if(typeof p>"u"||p>0)if(typeof c=="string")A=a.split(c,p);else{var P=0,L=await ue(c,a);if(typeof L<"u"){for(var H=0;typeof L<"u"&&(typeof p>"u"||P<p);)A.push(a.substring(H,L.start)),H=L.end,L=await ue(L.next),P++;(typeof p>"u"||P<p)&&A.push(a.substring(H))}else A.push(a)}return A}}function Ee(a,c){if(!(typeof a>"u"))return typeof c>"u"&&(c=""),a.join(c)}function O(a,c,p){if(!(typeof a>"u")){var A={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},P=A;typeof p<"u"&&o.keys(p).forEach(function(be){P[be]=p[be]});for(var L=[],H=P["zero-digit"].charCodeAt(0),K=H;K<H+10;K++)L.push(String.fromCharCode(K));var _e=L.concat([P["decimal-separator"],P["exponent-separator"],P["grouping-separator"],P.digit,P["pattern-separator"]]),oe=c.split(P["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var je=function(be){var Ze=(function(){for(var ht,Bt=0;Bt<be.length;Bt++)if(ht=be.charAt(Bt),_e.indexOf(ht)!==-1&&ht!==P["exponent-separator"])return be.substring(0,Bt);return""})(),Ct=(function(){for(var ht,Bt=be.length-1;Bt>=0;Bt--)if(ht=be.charAt(Bt),_e.indexOf(ht)!==-1&&ht!==P["exponent-separator"])return be.substring(Bt+1);return""})(),Ye=be.substring(Ze.length,be.length-Ct.length),Rt,Hs,jt,hr,qt=be.indexOf(P["exponent-separator"],Ze.length);qt===-1||qt>be.length-Ct.length?(Rt=Ye,Hs=void 0):(Rt=Ye.substring(0,qt),Hs=Ye.substring(qt+1));var ss=Rt.indexOf(P["decimal-separator"]);return ss===-1?(jt=Rt,hr=Ct):(jt=Rt.substring(0,ss),hr=Rt.substring(ss+1)),{prefix:Ze,suffix:Ct,activePart:Ye,mantissaPart:Rt,exponentPart:Hs,integerPart:jt,fractionalPart:hr,subpicture:be}},Ke=function(be){var Ze,Ct,Ye=be.subpicture,Rt=Ye.indexOf(P["decimal-separator"]);Rt!==Ye.lastIndexOf(P["decimal-separator"])&&(Ze="D3081"),Ye.indexOf(P.percent)!==Ye.lastIndexOf(P.percent)&&(Ze="D3082"),Ye.indexOf(P["per-mille"])!==Ye.lastIndexOf(P["per-mille"])&&(Ze="D3083"),Ye.indexOf(P.percent)!==-1&&Ye.indexOf(P["per-mille"])!==-1&&(Ze="D3084");var Hs=!1;for(Ct=0;Ct<be.mantissaPart.length;Ct++){var jt=be.mantissaPart.charAt(Ct);if(L.indexOf(jt)!==-1||jt===P.digit){Hs=!0;break}}Hs||(Ze="D3085");var hr=be.activePart.split("").map(function(ht){return _e.indexOf(ht)===-1?"p":"a"}).join("");hr.indexOf("p")!==-1&&(Ze="D3086"),Rt!==-1?(Ye.charAt(Rt-1)===P["grouping-separator"]||Ye.charAt(Rt+1)===P["grouping-separator"])&&(Ze="D3087"):be.integerPart.charAt(be.integerPart.length-1)===P["grouping-separator"]&&(Ze="D3088"),Ye.indexOf(P["grouping-separator"]+P["grouping-separator"])!==-1&&(Ze="D3089");var qt=be.integerPart.indexOf(P.digit);qt!==-1&&be.integerPart.substring(0,qt).split("").filter(function(ht){return L.indexOf(ht)>-1}).length>0&&(Ze="D3090"),qt=be.fractionalPart.lastIndexOf(P.digit),qt!==-1&&be.fractionalPart.substring(qt).split("").filter(function(ht){return L.indexOf(ht)>-1}).length>0&&(Ze="D3091");var ss=typeof be.exponentPart=="string";if(ss&&be.exponentPart.length>0&&(Ye.indexOf(P.percent)!==-1||Ye.indexOf(P["per-mille"])!==-1)&&(Ze="D3092"),ss&&(be.exponentPart.length===0||be.exponentPart.split("").filter(function(ht){return L.indexOf(ht)===-1}).length>0)&&(Ze="D3093"),Ze)throw{code:Ze,stack:new Error().stack}},Ge=function(be){var Ze=function(gt,bn){for(var yi=[],xs=gt.indexOf(P["grouping-separator"]);xs!==-1;){var yn=(bn?gt.substring(0,xs):gt.substring(xs)).split("").filter(function(jr){return L.indexOf(jr)!==-1||jr===P.digit}).length;yi.push(yn),xs=be.integerPart.indexOf(P["grouping-separator"],xs+1)}return yi},Ct=Ze(be.integerPart),Ye=function(gt){if(gt.length===0)return 0;for(var bn=function(yn,jr){return jr===0?yn:bn(jr,yn%jr)},yi=gt.reduce(bn),xs=1;xs<=gt.length;xs++)if(gt.indexOf(xs*yi)===-1)return 0;return yi},Rt=Ye(Ct),Hs=Ze(be.fractionalPart,!0),jt=be.integerPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length,hr=jt,qt=be.fractionalPart.split(""),ss=qt.filter(function(gt){return L.indexOf(gt)!==-1}).length,ht=qt.filter(function(gt){return L.indexOf(gt)!==-1||gt===P.digit}).length,Bt=typeof be.exponentPart=="string";jt===0&&ht===0&&(Bt?(ss=1,ht=1):jt=1),Bt&&jt===0&&be.integerPart.indexOf(P.digit)!==-1&&(jt=1),jt===0&&ss===0&&(ss=1);var rc=0;return Bt&&(rc=be.exponentPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length),{integerPartGroupingPositions:Ct,regularGrouping:Rt,minimumIntegerPartSize:jt,scalingFactor:hr,prefix:be.prefix,fractionalPartGroupingPositions:Hs,minimumFactionalPartSize:ss,maximumFactionalPartSize:ht,minimumExponentSize:rc,suffix:be.suffix,picture:be.subpicture}},nt=oe.map(je);nt.forEach(Ke);var Me=nt.map(Ge),Qe=P["minus-sign"],Zt=P["zero-digit"],xt=P["decimal-separator"],ps=P["grouping-separator"];Me.length===1&&(Me.push(JSON.parse(JSON.stringify(Me[0]))),Me[1].prefix=Qe+Me[1].prefix);var ot;a>=0?ot=Me[0]:ot=Me[1];var gi;ot.picture.indexOf(P.percent)!==-1?gi=a*100:ot.picture.indexOf(P["per-mille"])!==-1?gi=a*1e3:gi=a;var Bs,Rr;if(ot.minimumExponentSize===0)Bs=gi;else{var vg=Math.pow(10,ot.scalingFactor),wg=Math.pow(10,ot.scalingFactor-1);if(Bs=gi,Rr=0,Bs!==0){for(;Math.abs(Bs)<wg;)Bs*=10,Rr-=1;for(;Math.abs(Bs)>vg;)Bs/=10,Rr+=1}}var _g=N(Bs,ot.maximumFactionalPartSize),tc=function(be,Ze){var Ct=Math.abs(be).toFixed(Ze);return Zt!=="0"&&(Ct=Ct.split("").map(function(Ye){return Ye>="0"&&Ye<="9"?L[Ye.charCodeAt(0)-48]:Ye}).join("")),Ct},ke=tc(_g,ot.maximumFactionalPartSize),At=ke.indexOf(".");for(At===-1?ke=ke+xt:ke=ke.replace(".",xt);ke.charAt(0)===Zt;)ke=ke.substring(1);for(;ke.charAt(ke.length-1)===Zt;)ke=ke.substring(0,ke.length-1);At=ke.indexOf(xt);var bi=ot.minimumIntegerPartSize-At,sc=ot.minimumFactionalPartSize-(ke.length-At-1);if(ke=(bi>0?new Array(bi+1).join(Zt):"")+ke,ke=ke+(sc>0?new Array(sc+1).join(Zt):""),At=ke.indexOf(xt),ot.regularGrouping>0)for(var Sg=Math.floor((At-1)/ot.regularGrouping),mn=1;mn<=Sg;mn++)ke=[ke.slice(0,At-mn*ot.regularGrouping),ps,ke.slice(At-mn*ot.regularGrouping)].join("");else ot.integerPartGroupingPositions.forEach(function(be){ke=[ke.slice(0,At-be),ps,ke.slice(At-be)].join(""),At++});if(At=ke.indexOf(xt),ot.fractionalPartGroupingPositions.forEach(function(be){ke=[ke.slice(0,be+At+1),ps,ke.slice(be+At+1)].join("")}),At=ke.indexOf(xt),(ot.picture.indexOf(xt)===-1||At===ke.length-1)&&(ke=ke.substring(0,ke.length-1)),typeof Rr<"u"){var gn=tc(Rr,0);bi=ot.minimumExponentSize-gn.length,bi>0&&(gn=new Array(bi+1).join(Zt)+gn),ke=ke+P["exponent-separator"]+(Rr<0?Qe:"")+gn}return ke=ot.prefix+ke+ot.suffix,ke}}function I(a,c){if(!(typeof a>"u")){if(a=N(a),typeof c>"u"?c=10:c=N(c),c<2||c>36)throw{code:"D3100",stack:new Error().stack,value:c};var p=a.toString(c);return p}}function $(a){var c;if(!(typeof a>"u")){if(typeof a=="number")c=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))c=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))c=Number(a);else if(a===!0)c=1;else if(a===!1)c=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return c}}function F(a){var c;if(!(typeof a>"u"))return c=Math.abs(a),c}function B(a){var c;if(!(typeof a>"u"))return c=Math.floor(a),c}function V(a){var c;if(!(typeof a>"u"))return c=Math.ceil(a),c}function N(a,c){var p;if(!(typeof a>"u")){if(c){var A=a.toString().split("e");a=+(A[0]+"e"+(A[1]?+A[1]+c:c))}p=Math.round(a);var P=p-a;return Math.abs(P)===.5&&Math.abs(p%2)===1&&(p=p-1),c&&(A=p.toString().split("e"),p=+(A[0]+"e"+(A[1]?+A[1]-c:-c))),Object.is(p,-0)&&(p=0),p}}function G(a){var c;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return c=Math.sqrt(a),c}}function ae(a,c){var p;if(!(typeof a>"u")){if(p=Math.pow(a,c),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:c};return p}}function Ce(){return Math.random()}function me(a){if(!(typeof a>"u")){var c=!1;if(Array.isArray(a)){if(a.length===1)c=me(a[0]);else if(a.length>1){var p=a.filter(function(A){return me(A)});c=p.length>0}}else typeof a=="string"?a.length>0&&(c=!0):h(a)?a!==0&&(c=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(c=!0):typeof a=="boolean"&&a===!0&&(c=!0);return c}}function fe(a){if(!(typeof a>"u"))return!me(a)}function he(a,c,p,A){var P=[c],L=T(a);return L>=2&&P.push(p),L>=3&&P.push(A),P}async function De(a,c){if(!(typeof a>"u")){for(var p=this.createSequence(),A=0;A<a.length;A++){var P=he(c,a[A],A,a),L=await c.apply(this,P);typeof L<"u"&&p.push(L)}return p}}async function de(a,c){if(!(typeof a>"u")){for(var p=this.createSequence(),A=0;A<a.length;A++){var P=a[A],L=he(c,P,A,a),H=await c.apply(this,L);me(H)&&p.push(P)}return p}}async function mt(a,c){if(!(typeof a>"u")){for(var p=!1,A,P=0;P<a.length;P++){var L=a[P],H=!0;if(typeof c<"u"){var K=he(c,L,P,a),_e=await c.apply(this,K);H=me(_e)}if(H)if(!p)A=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:P}}if(!p)throw{stack:new Error().stack,code:"D3139"};return A}}function Yt(){for(var a=[],c=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,c.map(function(L){return Array.isArray(L)?L.length:0})),A=0;A<p;A++){var P=c.map(L=>L[A]);a.push(P)}return a}async function St(a,c,p){if(!(typeof a>"u")){var A,P=T(c);if(P<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(A=a[0],L=1):(A=p,L=0);L<a.length;){var H=[A,a[L]];P>=3&&H.push(L),P>=4&&H.push(a),A=await c.apply(this,H),L++}return A}}function it(a){var c=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),A=0;A<a.length;A++){var P=it.call(this,a[A]);P.forEach(function(L){p[L]=!0})}c=it.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>c.push(L));return c}function Pt(a,c){var p;if(Array.isArray(a)){p=this.createSequence();for(var A=0;A<a.length;A++){var P=Pt.call(this,a[A],c);typeof P<"u"&&(Array.isArray(P)?P.forEach(L=>p.push(L)):p.push(P))}}else a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,c)&&!f(a)&&(p=a[c]);return p}function Ps(a,c){if(typeof a>"u")return c;if(typeof c>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(c)||(c=[c]);const p=a.length+c.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(c)}function Nr(a){return!(typeof a>"u")}function Fr(a){var c=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)c=Ps.call(this,c,Fr.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!C(a))for(const P of o.keys(a)){var A=Object.create(null);A[P]=a[P],c.push(A)}else c=a;return c}function J(a){if(!(typeof a>"u")){var c=Object.create(null);return a.forEach(function(p){for(const A of o.keys(p))c[A]=p[A]}),c}}function pn(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var c=a.length,p=new Array(c),A=0;A<c;A++)p[c-A-1]=a[A];return p}}async function fn(a,c){var p=this.createSequence();for(const L of o.keys(a)){var A=he(c,a[L],L,a),P=await c.apply(this,A);typeof P<"u"&&p.push(P)}return p}function ts(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function mi(a,c){if(!a)throw{code:"D3141",stack:new Error().stack,message:c||"$assert() statement failed"}}function ds(a){if(a!==void 0)return a===null?"null":h(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function ur(a,c){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof c>"u"){if(!x(a)&&!g(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(H,K){return H>K}}else p=c;var A=async function(H,K){var _e=async function(je,Ke,Ge){Ke.length===0?Array.prototype.push.apply(je,Ge):Ge.length===0?Array.prototype.push.apply(je,Ke):await p(Ke[0],Ge[0])?(je.push(Ge[0]),await _e(je,Ke,Ge.slice(1))):(je.push(Ke[0]),await _e(je,Ke.slice(1),Ge))},oe=[];return await _e(oe,H,K),oe},P=async function(H){if(!Array.isArray(H)||H.length<=1)return H;var K=Math.floor(H.length/2),_e=H.slice(0,K),oe=H.slice(K);return _e=await P(_e),oe=await P(oe),await A(_e,oe)},L=await P(a);return L}}function d(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var c=new Array(a.length),p=0;p<a.length;p++){var A=Math.floor(Math.random()*(p+1));p!==A&&(c[p]=c[A]),c[A]=a[p]}return c}}function y(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var c=m(a)?this.createSequence():[],p=0;p<a.length;p++){for(var A=a[p],P=!1,L=0;L<c.length;L++)if(z(A,c[L])){P=!0;break}P||c.push(A)}return c}}async function w(a,c){var p=Object.create(null);for(const H of o.keys(a)){var A=a[H],P=he(c,A,H,a),L=await c.apply(this,P);me(L)&&(p[H]=A)}return o.keys(p).length===0&&(p=void 0),p}return{sum:S,count:v,max:M,min:k,average:D,string:Y,substring:j,substringBefore:ne,substringAfter:re,lowercase:ie,uppercase:q,length:le,trim:pe,pad:Be,match:$e,contains:ge,replace:ce,split:Pe,join:Ee,formatNumber:O,formatBase:I,number:$,floor:B,ceil:V,round:N,abs:F,sqrt:G,power:ae,random:Ce,boolean:me,not:fe,map:De,zip:Yt,filter:de,single:mt,foldLeft:St,sift:w,keys:it,lookup:Pt,append:Ps,exists:Nr,spread:Fr,merge:J,reverse:pn,each:fn,error:ts,assert:mi,type:ds,sort:ur,shuffle:d,distinct:y,base64encode:W,base64decode:Ae,encodeUrlComponent:b,encodeUrl:_,decodeUrlComponent:te,decodeUrl:we}})();r.exports=l}).call(this)}).call(this,typeof fa<"u"?fa:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,r,i){var n=s("./datetime"),o=s("./functions"),l=s("./utils"),h=s("./parser"),g=s("./signature"),x=(function(){var m=l.isNumeric,f=l.isArrayOfStrings,C=l.isArrayOfNumbers,E=l.isSequence,T=l.isFunction,z=l.isLambda,U=l.isIterable,S=l.isPromise,v=l.getFunctionArity,M=l.isDeepEqual,k=ts(null);async function D(d,y,w){var a;w.base.depth++,w.base.guardrails();var c=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(c&&await c(d,y,w),d.type){case"path":a=await Y(d,y,w);break;case"binary":a=await le(d,y,w);break;case"unary":a=await pe(d,y,w);break;case"name":a=Be(d,y,w);break;case"string":case"number":case"value":a=ue(d);break;case"wildcard":a=ge(d,y,w);break;case"descendant":a=ce(d,y,w);break;case"parent":a=w.lookup(d.slot.label);break;case"condition":a=await B(d,y,w);break;case"block":a=await V(d,y,w);break;case"bind":a=await F(d,y,w);break;case"regex":a=N(d,y,w);break;case"function":a=await he(d,y,w);break;case"variable":a=G(d,y,w);break;case"lambda":a=mt(d,y,w);break;case"partial":a=await Yt(d,y,w);break;case"apply":a=await fe(d,y,w);break;case"transform":a=Ce(d,y,w);break}if(Object.prototype.hasOwnProperty.call(d,"predicate"))for(var p=0;p<d.predicate.length;p++)a=await q(d.predicate[p].expr,a,w);d.type!=="path"&&Object.prototype.hasOwnProperty.call(d,"group")&&(a=await O(d.group,a,w));var A=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return A&&await A(d,y,w,a),a&&E(a)&&!a.tupleStream&&(d.keepArray&&(a.keepSingleton=!0),a.length===0?a=void 0:a.length===1&&(a=a.keepSingleton?a:a[0])),w.base.depth--,a}async function Y(d,y,w){var a;Array.isArray(y)&&d.steps[0].type!=="variable"?a=y:a=w.base.createSequence(y);for(var c,p=!1,A=void 0,P=0;P<d.steps.length;P++){var L=d.steps[P];if(L.tuple&&(p=!0),P===0&&L.consarray?c=await D(L,a,w):p?A=await ie(L,a,A,w):c=await ne(L,a,w,P===d.steps.length-1),!p&&(typeof c>"u"||c.length===0))break;typeof L.focus>"u"&&(a=c)}if(p)if(d.tuple)c=A;else for(c=w.base.createSequence(),P=0;P<A.length;P++)c.push(A[P]["@"]);return d.keepSingletonArray&&(Array.isArray(c)&&c.cons&&!c.sequence&&(c=w.base.createSequence(c)),c.keepSingleton=!0),Object.prototype.hasOwnProperty.call(d,"group")&&(c=await O(d.group,p?A:c,w)),c}function j(d,y){var w=ts(d);for(const a of l.keys(y))w.bind(a,y[a]);return w}async function ne(d,y,w,a){var c;if(d.type==="sort")return c=await ae(d,y,w),d.stages&&(c=await re(d.stages,c,w)),c;c=w.base.createSequence();for(var p=0;p<y.length;p++){var A=await D(d,y[p],w);if(d.stages)for(var P=0;P<d.stages.length;P++)A=await q(d.stages[P].expr,A,w);typeof A<"u"&&c.push(A)}var L=w.base.createSequence();return a&&c.length===1&&Array.isArray(c[0])&&!E(c[0])?L=c[0]:Array.prototype.forEach.call(c,function(H){!Array.isArray(H)||H.cons?L.push(H):Array.prototype.forEach.call(H,K=>L.push(K))}),L}async function re(d,y,w){for(var a=y,c=0;c<d.length;c++){var p=d[c];switch(p.type){case"filter":a=await q(p.expr,a,w);break;case"index":for(var A=0;A<a.length;A++){var P=a[A];P[p.value]=A}break}}return a}async function ie(d,y,w,a){var c;if(d.type==="sort"){if(w)c=await ae(d,w,a);else{var p=await ae(d,y,a);c=a.base.createSequence(),c.tupleStream=!0;for(var A=0;A<p.length;A++){var P={"@":p[A]};P[d.index]=A,c.push(P)}}return d.stages&&(c=await re(d.stages,c,a)),c}c=a.base.createSequence(),c.tupleStream=!0;var L=a;w===void 0&&(w=y.map(oe=>({"@":oe})));for(var H=0;H<w.length;H++){L=j(a,w[H]);var K=await D(d,w[H]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var _e=0;_e<K.length;_e++)P=Object.create(null),Object.assign(P,w[H]),K.tupleStream?Object.assign(P,K[_e]):(d.focus?(P[d.focus]=K[_e],P["@"]=w[H]["@"]):P["@"]=K[_e],d.index&&(P[d.index]=_e),d.ancestor&&(P[d.ancestor.label]=w[H]["@"])),c.push(P)}}return d.stages&&(c=await re(d.stages,c,a)),c}async function q(d,y,w){var a=w.base.createSequence();if(y&&y.tupleStream&&(a.tupleStream=!0),Array.isArray(y)||(y=w.base.createSequence(y)),d.type==="number"){var c=Math.floor(d.value);c<0&&(c=y.length+c);var p=await y[c];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(c=0;c<y.length;c++){var p=y[c],A=p,P=w;y.tupleStream&&(A=p["@"],P=j(w,p));var L=await D(d,A,P);m(L)&&(L=[L]),C(L)?Array.prototype.forEach.call(L,function(K){var _e=Math.floor(K);_e<0&&(_e=y.length+_e),_e===c&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(d,y,w){var a,c=await D(d.lhs,y,w),p=d.value,A=async()=>await D(d.rhs,y,w);if(p==="and"||p==="or")try{return await we(c,A,p)}catch(L){throw L.position=d.position,L.token=p,L}var P=await A();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=Ae(c,P,p);break;case"=":case"!=":a=b(c,P,p);break;case"<":case"<=":case">":case">=":a=_(c,P,p);break;case"&":a=Ee(c,P);break;case"..":a=$(c,P,w);break;case"in":a=te(c,P);break}}catch(L){throw L.position=d.position,L.token=p,L}return a}async function pe(d,y,w){var a,c={options:w.base.options,createSequence:w.base.createSequence};switch(d.value){case"-":if(a=await D(d.expression,y,w),typeof a>"u")a=void 0;else if(m(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:d.position,token:d.value,value:a};break;case"[":a=[];let P=await Promise.all(d.expressions.map(async(L,H)=>(w.isParallelCall=H>0,[L,await D(L,y,w)])));for(let L of P){var[p,A]=L;typeof A<"u"&&(p.value==="["?a.push(A):a=o.append.call(c,a,A))}d.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await O(d,y,w);break}return a}function Be(d,y,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,y,d.value)}function ue(d){return d.value}function ge(d,y,w){var a={options:w.base.options,createSequence:w.base.createSequence},c=a.createSequence();return Array.isArray(y)&&y.outerWrapper&&y.length>0&&(y=y[0]),y!==null&&typeof y=="object"&&!T(y)&&l.keys(y).forEach(function(p){var A=y[p];Array.isArray(A)?(A=$e(A),c=o.append.call(a,c,A)):c.push(A)}),c}function $e(d,y){return typeof y>"u"&&(y=[]),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){$e(w,y)}):y.push(d),y}function ce(d,y,w){var a,c=w.base.createSequence();return typeof y<"u"&&(W(y,c),c.length===1?a=c[0]:a=c),a}function W(d,y){Array.isArray(d)||y.push(d),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){W(w,y)}):d!==null&&typeof d=="object"&&!T(d)&&l.keys(d).forEach(function(w){W(d[w],y)})}function Ae(d,y,w){var a;if(typeof d<"u"&&!m(d))throw{code:"T2001",stack:new Error().stack,value:d};if(typeof y<"u"&&!m(y))throw{code:"T2002",stack:new Error().stack,value:y};if(typeof d>"u"||typeof y>"u")return a;switch(w){case"+":a=d+y;break;case"-":a=d-y;break;case"*":a=d*y;break;case"/":a=d/y;break;case"%":a=d%y;break}return a}function b(d,y,w){var a,c=typeof d,p=typeof y;if(c==="undefined"||p==="undefined")return!1;switch(w){case"=":a=M(d,y);break;case"!=":a=!M(d,y);break}return a}function _(d,y,w){var a,c=typeof d,p=typeof y,A=c==="undefined"||c==="string"||c==="number",P=p==="undefined"||p==="string"||p==="number";if(!A||!P)throw{code:"T2010",stack:new Error().stack,value:c==="string"||c==="number"?y:d};if(!(c==="undefined"||p==="undefined")){if(c!==p)throw{code:"T2009",stack:new Error().stack,value:d,value2:y};switch(w){case"<":a=d<y;break;case"<=":a=d<=y;break;case">":a=d>y;break;case">=":a=d>=y;break}return a}}function te(d,y){var w=!1;if(typeof d>"u"||typeof y>"u")return!1;Array.isArray(y)||(y=[y]);for(var a=0;a<y.length;a++)if(y[a]===d){w=!0;break}return w}async function we(d,y,w){var a,c=Pe(d);switch(w){case"and":a=c&&Pe(await y());break;case"or":a=c||Pe(await y());break}return a}function Pe(d){var y=o.boolean(d);return typeof y>"u"?!1:y}function Ee(d,y){var w,a="",c="";return typeof d<"u"&&(a=o.string(d)),typeof y<"u"&&(c=o.string(y)),w=a.concat(c),w}async function O(d,y,w){var a=Object.create(null),c=Object.create(null),p=!!(y&&y.tupleStream),A={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(y)||(w.base.options,y=A.createSequence(y)),y.length===0&&!p&&y.push(void 0);for(var P=0;P<y.length;P++)for(var L=y[P],H=p?j(w,L):w,K=0;K<d.lhs.length;K++){var _e=d.lhs[K],oe=await D(_e[0],p?L["@"]:L,H);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:d.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:d.position,value:oe};var je={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(c,oe)){if(c[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:d.position,value:oe};c[oe].data=o.append.call(A,c[oe].data,L)}else c[oe]=je}}let Ke=await Promise.all(l.keys(c).map(async(nt,Me)=>{let Qe=c[nt];var Zt=Qe.data,xt=w;if(p){var ps=I(Qe.data,w);Zt=ps["@"],delete ps["@"],xt=j(w,ps)}return w.isParallelCall=Me>0,[nt,await D(d.lhs[Qe.exprIndex][1],Zt,xt)]}));for(let nt of Ke){var[oe,Ge]=await nt;typeof Ge<"u"&&(a[oe]=Ge)}return a}function I(d,y){if(!Array.isArray(d))return d;var w=Object.create(null),a={options:y.base.options,createSequence:y.base.createSequence};Object.assign(w,d[0]);for(var c=1;c<d.length;c++)for(const p of l.keys(d[c]))w[p]=o.append.call(a,w[p],d[c][p]);return w}function $(d,y,w){var a;if(typeof d<"u"&&!Number.isInteger(d))throw{code:"T2003",stack:new Error().stack,value:d};if(typeof y<"u"&&!Number.isInteger(y))throw{code:"T2004",stack:new Error().stack,value:y};if(typeof d>"u"||typeof y>"u"||d>y)return a;var c=y-d+1;if(c>1e7)throw{code:"D2014",stack:new Error().stack,value:c};if(w.base.options&&c>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:c};a=new Array(c);for(var p=d,A=0;p<=y;p++,A++)a[A]=p;return a.sequence=!0,a}async function F(d,y,w){var a=await D(d.rhs,y,w);return w.bind(d.lhs.value,a),a}async function B(d,y,w){var a,c=await D(d.condition,y,w);return o.boolean(c)?a=await D(d.then,y,w):typeof d.else<"u"&&(a=await D(d.else,y,w)),a}async function V(d,y,w){for(var a,c=ts(w),p=0;p<d.expressions.length;p++)a=await D(d.expressions[p],y,c);return a}function N(d,y,w){var a=new w.base.RegexEngine(d.value),c=function(p,A){var P;a.lastIndex=A||0;var L=a.exec(p);if(L!==null){if(P={match:L[0],start:L.index,end:L.index+L[0].length,groups:[]},L.length>1)for(var H=1;H<L.length;H++)P.groups.push(L[H]);P.next=function(){if(!(a.lastIndex>=p.length)){var K=c(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:d.position,value:d.value.source};return K}}}return P};return c}function G(d,y,w){var a;return d.value===""?a=y&&y.outerWrapper?y[0]:y:a=w.lookup(d.value),a}async function ae(d,y,w){var a,c=y,p=!!y.tupleStream,A=async function(L,H){for(var K=0,_e=0;K===0&&_e<d.terms.length;_e++){var oe=d.terms[_e],je=L,Ke=w;p&&(je=L["@"],Ke=j(w,L));var Ge=await D(oe.expression,je,Ke);je=H,Ke=w,p&&(je=H["@"],Ke=j(w,H));var nt=await D(oe.expression,je,Ke),Me=typeof Ge,Qe=typeof nt;if(Me==="undefined"){K=Qe==="undefined"?0:1;continue}if(Qe==="undefined"){K=-1;continue}if(!(Me==="string"||Me==="number")||!(Qe==="string"||Qe==="number"))throw{code:"T2008",stack:new Error().stack,position:d.position,value:Me==="string"||Me==="number"?nt:Ge};if(Me!==Qe)throw{code:"T2007",stack:new Error().stack,position:d.position,value:Ge,value2:nt};Ge!==nt&&(Ge<nt?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},P={environment:w,input:y};return a=await o.sort.apply(P,[c,A]),a}function Ce(d,y,w){var a=async function(c){if(!(typeof c>"u")){var p=w.lookup("clone");if(!T(p))throw{code:"T2013",stack:new Error().stack,position:d.position};var A=await De(p,[c],null,w),P=await D(d.pattern,A,w);if(typeof P<"u"){Array.isArray(P)||(P=[P]);for(var L=0;L<P.length;L++){var H=P[L],K=await D(d.update,H,w),_e=typeof K;if(_e!=="undefined"){if(_e!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:d.update.position,value:K};for(const Ge of l.keys(K))H[Ge]=K[Ge]}if(typeof d.delete<"u"){var oe=await D(d.delete,H,w);if(typeof oe<"u"){var je=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:d.delete.position,value:je};for(var Ke=0;Ke<oe.length;Ke++)typeof H=="object"&&H!==null&&delete H[oe[Ke]]}}}}return A}};return J(a,"<(oa):o>")}var me=h("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(d,y,w){var a,c=await D(d.lhs,y,w);if(d.rhs.type==="function")a=await he(d.rhs,y,w,{context:c});else{var p=await D(d.rhs,y,w);if(!T(p))throw{code:"T2006",stack:new Error().stack,position:d.position,value:p};if(T(c)){var A=await D(me,null,w);a=await De(A,[c,p],null,w)}else a=await De(p,[c],null,w)}return a}async function he(d,y,w,a){var c,p=await D(d.procedure,y,w);if(typeof p>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};var A=[];typeof a<"u"&&A.push(a.context);for(var P=0;P<d.arguments.length;P++){const H=await D(d.arguments[P],y,w);if(T(H)){const K=async function(..._e){return await De(H,_e,null,w)};K.arity=v(H),A.push(K)}else A.push(H)}var L=d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=d.position),c=await De(p,A,y,w)}catch(H){throw H.position||(H.position=d.position),H.token||(H.token=L),H}return c}async function De(d,y,w,a){var c;for(c=await de(d,y,w,a);z(c)&&c.thunk===!0;){var p=await D(c.body.procedure,c.input,c.environment);c.body.procedure.type==="variable"&&(p.token=c.body.procedure.value),p.position=c.body.procedure.position;for(var A=[],P=0;P<c.body.arguments.length;P++)A.push(await D(c.body.arguments[P],c.input,c.environment));c=await de(p,A,w,a)}return c}async function de(d,y,w,a){var c;try{var p=y;if(d&&(p=St(d.signature,y,w)),z(d))c=await it(d,p);else if(d&&d._jsonata_function===!0){var A={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};c=d.implementation.apply(A,p),U(c)&&(c=c.next().value),S(c)&&(c=await c)}else if(typeof d=="function")c=d.apply(w,p),S(c)&&(c=await c);else throw{code:"T1006",stack:new Error().stack}}catch(P){throw d&&(typeof P.token>"u"&&typeof d.token<"u"&&(P.token=d.token),P.position=d.position||P.position),P}return c}function mt(d,y,w){var a={_jsonata_lambda:!0,input:y,environment:w,arguments:d.arguments,signature:d.signature,body:d.body};return d.thunk===!0&&(a.thunk=!0),a.apply=async function(c,p){return await De(a,p,y,c?c.environment:w)},a}async function Yt(d,y,w){for(var a,c=[],p=0;p<d.arguments.length;p++){var A=d.arguments[p];A.type==="operator"&&A.value==="?"?c.push(A):c.push(await D(A,y,w))}var P=await D(d.procedure,y,w);if(typeof P>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};if(z(P))a=Pt(P,c,w);else if(P&&P._jsonata_function===!0)a=Ps(P.implementation,c,w);else if(typeof P=="function")a=Ps(P,c,w);else throw{code:"T1008",stack:new Error().stack,position:d.position,token:d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value};return a}function St(d,y,w){if(typeof d>"u")return y;var a=d.validate(y,w);return a}async function it(d,y){var w,a=ts(d.environment);return Array.prototype.forEach.call(d.arguments,function(c,p){a.bind(c.value,y[p])}),typeof d.body=="function"?w=await Nr(d.body,a):w=await D(d.body,d.input,a),w}function Pt(d,y,w){var a=ts(d.environment||w),c=[];Array.prototype.forEach.call(d.arguments,function(A,P){var L=y[P];L&&L.type==="operator"&&L.value==="?"?c.push(A):a.bind(A.value,L)});var p={_jsonata_lambda:!0,input:d.input,environment:a,arguments:c,body:d.body};return p}function Ps(d,y,w){var a=Fr(d);a=a.map(function(P){return"$"+P.trim()});var c="function("+a.join(", ")+"){ _ }",p=h(c);p.body=d;var A=Pt(p,y,w);return A}async function Nr(d,y){var w=Fr(d),a=w.map(function(A){return y.lookup(A.trim())}),c={environment:y,createSequence:y.base.createSequence},p=d.apply(c,a);return S(p)&&(p=await p),p}function Fr(d){var y=d.toString(),w=/\(([^)]*)\)/.exec(y)[1],a=w.split(",");return a}function J(d,y){var w={_jsonata_function:!0,implementation:d};return typeof y<"u"&&(w.signature=g(y)),w}async function pn(d,y){if(!(typeof d>"u")){var w=this.input;typeof y<"u"&&(w=y,Array.isArray(w)&&!E(w)&&(w=this.createSequence(w),w.outerWrapper=!0));try{var a=h(d,!1)}catch(p){throw ds(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var c=await D(a,w,this.environment)}catch(p){throw ds(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return c}}function fn(d){if(!(typeof d>"u"))return JSON.parse(o.string(d))}function ts(d){var y=Object.create(null);const w={bind:function(c,p){y[c]=p},lookup:function(c){var p;return Object.prototype.hasOwnProperty.call(y,c)?p=y[c]:d&&(p=d.lookup(c)),p},timestamp:d?d.timestamp:null,async:d?d.async:!1,isParallelCall:d?d.isParallelCall:!1,global:d?d.global:{ancestry:[null]}};if(d){var a=d.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(d,w),w.base=d.base}return w}k.bind("sum",J(o.sum,"<a<n>:n>")),k.bind("count",J(o.count,"<a:n>")),k.bind("max",J(o.max,"<a<n>:n>")),k.bind("min",J(o.min,"<a<n>:n>")),k.bind("average",J(o.average,"<a<n>:n>")),k.bind("string",J(o.string,"<x-b?:s>")),k.bind("substring",J(o.substring,"<s-nn?:s>")),k.bind("substringBefore",J(o.substringBefore,"<s-s:s>")),k.bind("substringAfter",J(o.substringAfter,"<s-s:s>")),k.bind("lowercase",J(o.lowercase,"<s-:s>")),k.bind("uppercase",J(o.uppercase,"<s-:s>")),k.bind("length",J(o.length,"<s-:n>")),k.bind("trim",J(o.trim,"<s-:s>")),k.bind("pad",J(o.pad,"<s-ns?:s>")),k.bind("match",J(o.match,"<s-f<s:o>n?:a<o>>")),k.bind("contains",J(o.contains,"<s-(sf):b>")),k.bind("replace",J(o.replace,"<s-(sf)(sf)n?:s>")),k.bind("split",J(o.split,"<s-(sf)n?:a<s>>")),k.bind("join",J(o.join,"<a<s>s?:s>")),k.bind("formatNumber",J(o.formatNumber,"<n-so?:s>")),k.bind("formatBase",J(o.formatBase,"<n-n?:s>")),k.bind("formatInteger",J(n.formatInteger,"<n-s:s>")),k.bind("parseInteger",J(n.parseInteger,"<s-s:n>")),k.bind("number",J(o.number,"<(nsb)-:n>")),k.bind("floor",J(o.floor,"<n-:n>")),k.bind("ceil",J(o.ceil,"<n-:n>")),k.bind("round",J(o.round,"<n-n?:n>")),k.bind("abs",J(o.abs,"<n-:n>")),k.bind("sqrt",J(o.sqrt,"<n-:n>")),k.bind("power",J(o.power,"<n-n:n>")),k.bind("random",J(o.random,"<:n>")),k.bind("boolean",J(o.boolean,"<x-:b>")),k.bind("not",J(o.not,"<x-:b>")),k.bind("map",J(o.map,"<af>")),k.bind("zip",J(o.zip,"<a+>")),k.bind("filter",J(o.filter,"<af>")),k.bind("single",J(o.single,"<af?>")),k.bind("reduce",J(o.foldLeft,"<afj?:j>")),k.bind("sift",J(o.sift,"<o-f?:o>")),k.bind("keys",J(o.keys,"<x-:a<s>>")),k.bind("lookup",J(o.lookup,"<x-s:x>")),k.bind("append",J(o.append,"<xx:a>")),k.bind("exists",J(o.exists,"<x:b>")),k.bind("spread",J(o.spread,"<x-:a<o>>")),k.bind("merge",J(o.merge,"<a<o>:o>")),k.bind("reverse",J(o.reverse,"<a:a>")),k.bind("each",J(o.each,"<o-f:a>")),k.bind("error",J(o.error,"<s?:x>")),k.bind("assert",J(o.assert,"<bs?:x>")),k.bind("type",J(o.type,"<x:s>")),k.bind("sort",J(o.sort,"<af?:a>")),k.bind("shuffle",J(o.shuffle,"<a:a>")),k.bind("distinct",J(o.distinct,"<x:x>")),k.bind("base64encode",J(o.base64encode,"<s-:s>")),k.bind("base64decode",J(o.base64decode,"<s-:s>")),k.bind("encodeUrlComponent",J(o.encodeUrlComponent,"<s-:s>")),k.bind("encodeUrl",J(o.encodeUrl,"<s-:s>")),k.bind("decodeUrlComponent",J(o.decodeUrlComponent,"<s-:s>")),k.bind("decodeUrl",J(o.decodeUrl,"<s-:s>")),k.bind("eval",J(pn,"<sx?:x>")),k.bind("toMillis",J(n.toMillis,"<s-s?:n>")),k.bind("fromMillis",J(n.fromMillis,"<n-s?s?:s>")),k.bind("clone",J(fn,"<(oa)-:o>"));var mi={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 ds(d){var y=mi[d.code];if(typeof y<"u"){var w=y.replace(/\{\{\{([^}]+)}}}/g,function(){return d[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(d[arguments[1]])}),d.message=w}}function ur(d,y){var w,a;try{w=h(d,y&&y.recover),a=w.errors,delete w.errors}catch(A){throw ds(A),A}var c=ts(k),p=new Date;return c.bind("now",J(function(A,P){return n.fromMillis(p.getTime(),A,P)},"<s?s?:s>")),c.bind("millis",J(function(){return p.getTime()},"<:n>")),{evaluate:async function(A,P,L){if(typeof a<"u"){var H={code:"S0500",position:0};throw ds(H),H}const K=ts(c);for(const oe of l.keys(P))K.bind(oe,P[oe]);if(K.bind("$",A),p=new Date,K.timestamp=p,K.options=y,K.createSequence=function(){var oe=[];return y&&y.sequence&&(oe.push=function(...je){if(oe.length+je.length>y.sequence)throw{code:"D2015",stack:new Error().stack,value:y.sequence};return Array.prototype.push.apply(oe,je)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(A)&&!E(A)&&(A=K.createSequence(A),A.outerWrapper=!0),y&&(y.timeout||y.stack)){const oe=Date.now();K.guardrails=function(){if(y.stack>0&&K.depth>y.stack)throw{code:"D1011",value:y.stack,stack:new Error().stack};if(y.timeout>0&&Date.now()-oe>y.timeout)throw{code:"D1012",value:y.timeout,stack:new Error().stack}}}else K.guardrails=function(){};K.base=K,K.depth=0,y&&y.RegexEngine?K.RegexEngine=y.RegexEngine:K.RegexEngine=RegExp;var _e;try{return _e=await D(w,A,K),typeof L=="function"&&L(null,_e),_e}catch(oe){throw ds(oe),oe}},assign:function(A,P){c.bind(A,P)},registerFunction:function(A,P,L){var H=J(P,L);c.bind(A,H)},ast:function(){return w},errors:function(){return a}}}return ur.parser=h,ur})();r.exports=x},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,r,i){var n=s("./signature");const o=(()=>{var l={".":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},h={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
73
+ `,r:"\r",t:" "},g=function(m){var f=0,C=m.length,E=function(U,S){var v={type:U,value:S,position:f};return v},T=function(){for(var U=f,S=0,v,M,k=function(Y){if(m.charAt(Y)==="/"&&S===0){for(var j=0;m.charAt(Y-(j+1))==="\\";)j++;if(j%2===0)return!0}return!1};f<C;){var D=m.charAt(f);if(k(f)){if(v=m.substring(U,f),v==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,D=m.charAt(f),U=f;D==="i"||D==="m";)f++,D=m.charAt(f);return M=m.substring(U,f)+"g",new RegExp(v,M)}(D==="("||D==="["||D==="{")&&m.charAt(f-1)!=="\\"&&S++,(D===")"||D==="]"||D==="}")&&m.charAt(f-1)!=="\\"&&S--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},z=function(U){if(f>=C)return null;for(var S=m.charAt(f);f<C&&`
74
+ \r\v`.indexOf(S)>-1;)f++,S=m.charAt(f);if(S==="/"&&m.charAt(f+1)==="*"){var v=f;for(f+=2,S=m.charAt(f);!(S==="*"&&m.charAt(f+1)==="/");)if(S=m.charAt(++f),f>=C)throw{code:"S0106",stack:new Error().stack,position:v};return f+=2,S=m.charAt(f),z(U)}if(U!==!0&&S==="/")return f++,E("regex",T());if(S==="."&&m.charAt(f+1)===".")return f+=2,E("operator","..");if(S===":"&&m.charAt(f+1)==="=")return f+=2,E("operator",":=");if(S==="!"&&m.charAt(f+1)==="=")return f+=2,E("operator","!=");if(S===">"&&m.charAt(f+1)==="=")return f+=2,E("operator",">=");if(S==="<"&&m.charAt(f+1)==="=")return f+=2,E("operator","<=");if(S==="*"&&m.charAt(f+1)==="*")return f+=2,E("operator","**");if(S==="~"&&m.charAt(f+1)===">")return f+=2,E("operator","~>");if(S==="?"&&m.charAt(f+1)===":")return f+=2,E("operator","?:");if(S==="?"&&m.charAt(f+1)==="?")return f+=2,E("operator","??");if(Object.prototype.hasOwnProperty.call(l,S))return f++,E("operator",S);if(S==='"'||S==="'"){var M=S;f++;for(var k="";f<C;){if(S=m.charAt(f),S==="\\")if(f++,S=m.charAt(f),Object.prototype.hasOwnProperty.call(h,S))k+=h[S];else if(S==="u"){var D=m.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test(D)){var Y=parseInt(D,16);k+=String.fromCharCode(Y),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:S};else{if(S===M)return f++,E("string",k);k+=S}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var j=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ne=j.exec(m.substring(f));if(ne!==null){var re=parseFloat(ne[0]);if(!isNaN(re)&&isFinite(re))return f+=ne[0].length,E("number",re);throw{code:"S0102",stack:new Error().stack,position:f,token:ne[0]}}var ie;if(S==="`"){f++;var q=m.indexOf("`",f);if(q!==-1)return ie=m.substring(f,q),f=q+1,E("name",ie);throw f=C,{code:"S0105",stack:new Error().stack,position:f}}for(var le=f,pe;;)if(pe=m.charAt(le),le===C||`
75
+ \r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(l,pe)){if(m.charAt(f)==="$")return ie=m.substring(f+1,le),f=le,E("variable",ie);switch(ie=m.substring(f,le),f=le,ie){case"or":case"in":case"and":return E("operator",ie);case"true":return E("value",!0);case"false":return E("value",!1);case"null":return E("value",null);default:return f===C&&ie===""?null:E("name",ie)}}else le++};return z},x=function(m,f){var C,E,T=Object.create(null),z=[],U=function(){var b=[];C.id!=="(end)"&&b.push({type:C.type,value:C.value,position:C.position});for(var _=E();_!==null;)b.push(_),_=E();return b},S={nud:function(){var b={code:"S0211",token:this.value,position:this.position};if(f)return b.remaining=U(),b.type="error",z.push(b),b;throw b.stack=new Error().stack,b}},v=function(b,_){var te=T[b];return _=_||0,te?_>=te.lbp&&(te.lbp=_):(te=Object.create(S),te.id=te.value=b,te.lbp=_,T[b]=te),te},M=function(b){if(f){b.remaining=U(),z.push(b);var _=T["(error)"];return C=Object.create(_),C.error=b,C.type="(error)",C}else throw b.stack=new Error().stack,b},k=function(b,_){if(b&&C.id!==b){var te;C.id==="(end)"?te="S0203":te="S0202";var we={code:te,position:C.position,token:C.value,value:b};return M(we)}var Pe=E(_);if(Pe===null)return C=T["(end)"],C.position=m.length,C;var Ee=Pe.value,O=Pe.type,I;switch(O){case"name":case"variable":I=T["(name)"];break;case"operator":if(I=T[Ee],!I)return M({code:"S0204",stack:new Error().stack,position:Pe.position,token:Ee});break;case"string":case"number":case"value":I=T["(literal)"];break;case"regex":O="regex",I=T["(regex)"];break;default:return M({code:"S0205",stack:new Error().stack,position:Pe.position,token:Ee})}return C=Object.create(I),C.value=Ee,C.type=O,C.position=Pe.position,C},D=function(b){var _,te=C;for(k(null,!0),_=te.nud();b<C.lbp;)te=C,k(),_=te.led(_);return _},Y=function(b){var _=v(b,0);_.nud=function(){return this}},j=function(b,_,te){var we=_||l[b],Pe=v(b,we);return Pe.led=te||function(Ee){return this.lhs=Ee,this.rhs=D(we),this.type="binary",this},Pe},ne=function(b,_,te){var we=v(b,_);return we.led=te,we},re=function(b,_){var te=v(b);return te.nud=_||function(){return this.expression=D(70),this.type="unary",this},te};Y("(end)"),Y("(name)"),Y("(literal)"),Y("(regex)"),v(":"),v(";"),v(","),v(")"),v("]"),v("}"),v(".."),j("."),j("+"),j("-"),j("*"),j("/"),j("%"),j("="),j("<"),j(">"),j("!="),j("<="),j(">="),j("&"),j("and"),j("or"),j("in"),Y("and"),Y("or"),Y("in"),re("-"),j("~>"),j("??",l["??"],function(b){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(b))]},this.then=b,this.else=D(0),this}),ne("(error)",10,function(b){return this.lhs=b,this.error=C.error,this.remaining=U(),this.type="error",this}),re("*",function(){return this.type="wildcard",this}),re("**",function(){return this.type="descendant",this}),re("%",function(){return this.type="parent",this}),j("(",l["("],function(b){if(this.procedure=b,this.type="function",this.arguments=[],C.id!==")")for(;C.type==="operator"&&C.id==="?"?(this.type="partial",this.arguments.push(C),k("?")):this.arguments.push(D(0)),C.id===",";)k(",");if(k(")",!0),b.type==="name"&&(b.value==="function"||b.value==="λ")){if(this.arguments.forEach(function(Ee,O){if(Ee.type!=="variable")return M({code:"S0208",stack:new Error().stack,position:Ee.position,token:Ee.value,value:O+1})}),this.type="lambda",C.id==="<"){for(var _=C.position,te=1,we="<";te>0&&C.id!=="{"&&C.id!=="(end)";){var Pe=k();Pe.id===">"?te--:Pe.id==="<"&&te++,we+=Pe.value}k(">");try{this.signature=n(we)}catch(Ee){return Ee.position=_+Ee.offset,M(Ee)}}k("{"),this.body=D(0),k("}")}return this}),re("(",function(){for(var b=[];C.id!==")"&&(b.push(D(0)),C.id===";");)k(";");return k(")",!0),this.type="block",this.expressions=b,this}),re("[",function(){var b=[];if(C.id!=="]")for(;;){var _=D(0);if(C.id===".."){var te={type:"binary",value:"..",position:C.position,lhs:_};k(".."),te.rhs=D(0),_=te}if(b.push(_),C.id!==",")break;k(",")}return k("]",!0),this.expressions=b,this.type="unary",this}),j("[",l["["],function(b){if(C.id==="]"){for(var _=b;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,k("]"),b}else return this.lhs=b,this.rhs=D(l["]"]),this.type="binary",k("]",!0),this}),j("^",l["^"],function(b){k("(");for(var _=[];;){var te={descending:!1};if(C.id==="<"?k("<"):C.id===">"&&(te.descending=!0,k(">")),te.expression=D(0),_.push(te),C.id!==",")break;k(",")}return k(")"),this.lhs=b,this.rhs=_,this.type="binary",this});var ie=function(b){var _=[];if(C.id!=="}")for(;;){var te=D(0);k(":");var we=D(0);if(_.push([te,we]),C.id!==",")break;k(",")}return k("}",!0),typeof b>"u"?(this.lhs=_,this.type="unary"):(this.lhs=b,this.rhs=_,this.type="binary"),this};re("{",ie),j("{",l["{"],ie),ne(":=",l[":="],function(b){return b.type!=="variable"?M({code:"S0212",stack:new Error().stack,position:b.position,token:b.value}):(this.lhs=b,this.rhs=D(l[":="]-1),this.type="binary",this)}),j("@",l["@"],function(b){return this.lhs=b,this.rhs=D(l["@"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),j("#",l["#"],function(b){return this.lhs=b,this.rhs=D(l["#"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),j("?",l["?"],function(b){return this.type="condition",this.condition=b,this.then=D(0),C.id===":"&&(k(":"),this.else=D(0)),this}),j("?:",l["?:"],function(b){return this.type="condition",this.condition=JSON.parse(JSON.stringify(b)),this.then=b,this.else=D(0),this}),re("|",function(){return this.type="transform",this.pattern=D(0),k("|"),this.update=D(0),C.id===","&&(k(","),this.delete=D(0)),k("|"),this});var q=function(b){var _;if(b.type==="function"&&!b.predicate){var te={type:"lambda",thunk:!0,arguments:[],position:b.position};te.body=b,_=te}else if(b.type==="condition")b.then=q(b.then),typeof b.else<"u"&&(b.else=q(b.else)),_=b;else if(b.type==="block"){var we=b.expressions.length;we>0&&(b.expressions[we-1]=q(b.expressions[we-1])),_=b}else _=b;return _},le=0,pe=0,Be=[],ue=function(b,_){switch(b.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof b.ancestor>"u"||(Be[_.index].slot.label=b.ancestor.label),b.ancestor=_,b.tuple=!0);break;case"parent":_.level++;break;case"block":b.expressions.length>0&&(b.tuple=!0,_=ue(b.expressions[b.expressions.length-1],_));break;case"path":b.tuple=!0;var te=b.steps.length-1;for(_=ue(b.steps[te--],_);_.level>0&&te>=0;)_=ue(b.steps[te--],_);break;default:throw{code:"S0217",token:b.type,position:b.position}}return _},ge=function(b,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var te=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&te.push(_.slot),typeof b.seekingParent>"u"?b.seekingParent=te:Array.prototype.push.apply(b.seekingParent,te)}},$e=function(b){var _=b.steps.length-1,te=b.steps[_],we=typeof te.seekingParent<"u"?te.seekingParent:[];te.type==="parent"&&we.push(te.slot);for(var Pe=0;Pe<we.length;Pe++){var Ee=we[Pe];for(_=b.steps.length-2;Ee.level>0;){if(_<0){typeof b.seekingParent>"u"?b.seekingParent=[Ee]:b.seekingParent.push(Ee);break}for(var O=b.steps[_--];_>=0&&O.focus&&b.steps[_].focus;)O=b.steps[_--];Ee=ue(O,Ee)}}},ce=function(b){var _;switch(b.type){case"binary":switch(b.value){case".":var te=ce(b.lhs);te.type==="path"?_=te:_={type:"path",steps:[te]},te.type==="parent"&&(_.seekingParent=[te.slot]);var we=ce(b.rhs);we.type==="path"?Array.prototype.push.apply(_.steps,we.steps):(typeof we.predicate<"u"&&(we.stages=we.predicate,delete we.predicate),_.steps.push(we)),_.steps.filter(function(G){if(G.type==="number"||G.type==="value")throw{code:"S0213",stack:new Error().stack,position:G.position,value:G.value};return G.type==="string"}).forEach(function(G){G.type="name"}),_.steps.filter(function(G){return G.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var Pe=_.steps[0];Pe.type==="unary"&&Pe.value==="["&&(Pe.consarray=!0);var Ee=_.steps[_.steps.length-1];Ee.type==="unary"&&Ee.value==="["&&(Ee.consarray=!0),$e(_);break;case"[":_=ce(b.lhs);var O=_,I="predicate";if(_.type==="path"&&(O=_.steps[_.steps.length-1],I="stages"),typeof O.group<"u")throw{code:"S0209",stack:new Error().stack,position:b.position};typeof O[I]>"u"&&(O[I]=[]);var $=ce(b.rhs);typeof $.seekingParent<"u"&&($.seekingParent.forEach(G=>{G.level===1?ue(O,G):G.level--}),ge(O,$)),O[I].push({type:"filter",expr:$,position:b.position});break;case"{":if(_=ce(b.lhs),typeof _.group<"u")throw{code:"S0210",stack:new Error().stack,position:b.position};_.group={lhs:b.rhs.map(function(G){return[ce(G[0]),ce(G[1])]}),position:b.position};break;case"^":_=ce(b.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var F={type:"sort",position:b.position};F.terms=b.rhs.map(function(G){var ae=ce(G.expression);return ge(F,ae),{descending:G.descending,expression:ae}}),_.steps.push(F),$e(_);break;case":=":_={type:"bind",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),ge(_,_.rhs);break;case"@":if(_=ce(b.lhs),O=_,_.type==="path"&&(O=_.steps[_.steps.length-1]),typeof O.stages<"u"||typeof O.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:b.position};if(O.type==="sort")throw{code:"S0216",stack:new Error().stack,position:b.position};b.keepArray&&(O.keepArray=!0),O.focus=b.rhs.value,O.tuple=!0;break;case"#":_=ce(b.lhs),O=_,_.type==="path"?O=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof O.predicate<"u"&&(O.stages=O.predicate,delete O.predicate)),typeof O.stages>"u"?O.index=b.rhs.value:O.stages.push({type:"index",value:b.rhs.value,position:b.position}),O.tuple=!0;break;case"~>":_={type:"apply",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),_.keepArray=_.lhs.keepArray||_.rhs.keepArray;break;default:_={type:b.type,value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),ge(_,_.lhs),ge(_,_.rhs)}break;case"unary":_={type:b.type,value:b.value,position:b.position},b.value==="["?_.expressions=b.expressions.map(function(G){var ae=ce(G);return ge(_,ae),ae}):b.value==="{"?_.lhs=b.lhs.map(function(G){var ae=ce(G[0]);ge(_,ae);var Ce=ce(G[1]);return ge(_,Ce),[ae,Ce]}):(_.expression=ce(b.expression),b.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):ge(_,_.expression));break;case"function":case"partial":_={type:b.type,name:b.name,value:b.value,position:b.position},_.arguments=b.arguments.map(function(G){var ae=ce(G);return ge(_,ae),ae}),_.procedure=ce(b.procedure);break;case"lambda":_={type:b.type,arguments:b.arguments,signature:b.signature,position:b.position};var B=ce(b.body);_.body=q(B);break;case"condition":_={type:b.type,position:b.position},_.condition=ce(b.condition),ge(_,_.condition),_.then=ce(b.then),ge(_,_.then),typeof b.else<"u"&&(_.else=ce(b.else),ge(_,_.else));break;case"transform":_={type:b.type,position:b.position},_.pattern=ce(b.pattern),_.update=ce(b.update),typeof b.delete<"u"&&(_.delete=ce(b.delete));break;case"block":_={type:b.type,position:b.position},_.expressions=b.expressions.map(function(G){var ae=ce(G);return ge(_,ae),(ae.consarray||ae.type==="path"&&ae.steps[0].consarray)&&(_.consarray=!0),ae});break;case"name":_={type:"path",steps:[b]},b.keepArray&&(_.keepSingletonArray=!0);break;case"parent":_={type:"parent",slot:{label:"!"+le++,level:1,index:pe++}},Be.push(_);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":_=b;break;case"operator":if(b.value==="and"||b.value==="or"||b.value==="in")b.type="name",_=ce(b);else if(b.value==="?")_=b;else throw{code:"S0201",stack:new Error().stack,position:b.position,token:b.value};break;case"error":_=b,b.lhs&&(_=ce(b.lhs));break;default:var V="S0206";b.id==="(end)"&&(V="S0207");var N={code:V,position:b.position,token:b.value};if(f)return z.push(N),{type:"error",error:N};throw N.stack=new Error().stack,N}return b.keepArray&&(_.keepArray=!0),_};E=g(m),k();var W=D(0);if(C.id!=="(end)"){var Ae={code:"S0201",position:C.position,token:C.value};M(Ae)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return z.length>0&&(W.errors=z),W};return x})();r.exports=o},{"./signature":5}],5:[function(s,r,i){var n=s("./utils");const o=(()=>{var l={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function h(g){for(var x=1,m=[],f=Object.create(null),C=f;x<g.length;){var E=g.charAt(x);if(E===":")break;var T=function(){m.push(f),C=f,f=Object.create(null)},z=function(j,ne,re,ie){for(var q=1,le=ne;le<j.length;)if(le++,E=j.charAt(le),E===ie){if(q--,q===0)break}else E===re&&q++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,T();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,T();break;case"f":f.regex="f",f.type=E,T();break;case"j":f.regex="[asnblom]",f.type=E,T();break;case"x":f.regex="[asnblfom]",f.type=E,T();break;case"-":C.context=!0,C.contextRegex=new RegExp(C.regex),C.regex+="?";break;case"?":case"+":C.regex+=E;break;case"(":var U=z(g,x,"(",")"),S=g.substring(x+1,U);if(S.indexOf("<")===-1)f.regex="["+S+"m]";else throw{code:"S0402",stack:new Error().stack,value:S,offset:x};f.type="("+S+")",x=U,T();break;case"<":if(C.type==="a"||C.type==="f"){var v=z(g,x,"<",">");C.subtype=g.substring(x+1,v),x=v}else throw{code:"S0401",stack:new Error().stack,value:C.type,offset:x};break}x++}var M="^"+m.map(function(j){return"("+j.regex+")"}).join("")+"$",k=new RegExp(M),D=function(j){var ne;if(n.isFunction(j))ne="f";else{var re=typeof j;switch(re){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":j===null?ne="l":Array.isArray(j)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},Y=function(j,ne){for(var re="^",ie=0,q=0;q<m.length;q++){re+=m[q].regex;var le=ne.match(re);if(le===null)throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1}};return{definition:g,validate:function(j,ne){var re="";j.forEach(function(pe){re+=D(pe)});var ie=k.exec(re);if(ie){var q=[],le=0;return m.forEach(function(pe,Be){var ue=j[le],ge=ie[Be+1];if(ge==="")if(pe.context&&pe.contextRegex){var $e=D(ne);if(pe.contextRegex.test($e))q.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else q.push(ue),le++;else ge.split("").forEach(function(ce){if(ue=j[le],pe.type==="a"){if(ce==="m")ue=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&ge!==pe.subtype)W=!1;else if(ce==="a"&&ue.length>0){var Ae=D(ue[0]);if(Ae!==pe.subtype.charAt(0))W=!1;else{var b=ue.filter(function(_){return D(_)!==Ae});W=b.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:ue,index:le+1,type:l[pe.subtype]};ce!=="a"&&(ue=[ue])}q.push(ue),le++}else q.push(ue),le++})}),q}Y(j,re)}}}return h})();r.exports=o},{"./utils":6}],6:[function(s,r,i){const n=(()=>{function o(v){var M=!1;if(typeof v=="number"&&(M=!isNaN(v),M&&!isFinite(v)))throw{code:"D1001",value:v,stack:new Error().stack};return M}function l(v){var M=!1;return Array.isArray(v)&&(M=v.filter(function(k){return typeof k!="string"}).length===0),M}function h(v){var M=!1;return Array.isArray(v)&&(M=v.filter(function(k){return!o(k)}).length===0),M}function g(v){return v.sequence===!0&&Array.isArray(v)}function x(v){return v&&(v._jsonata_function===!0||v._jsonata_lambda===!0)||typeof v=="function"}function m(v){var M=typeof v.arity=="number"?v.arity:typeof v.implementation=="function"?v.implementation.length:typeof v.length=="number"?v.length:v.arguments.length;return M}function f(v){return v&&v._jsonata_lambda===!0}var C=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(v){return typeof v=="object"&&v!==null&&C in v&&"next"in v&&typeof v.next=="function"}function T(v,M){if(v===M)return!0;if(typeof v=="object"&&typeof M=="object"&&v!==null&&M!==null){if(Array.isArray(v)&&Array.isArray(M)){if(v.length!==M.length)return!1;for(var k=0;k<v.length;k++)if(!T(v[k],M[k]))return!1;return!0}var D=Object.getOwnPropertyNames(v),Y=Object.getOwnPropertyNames(M);if(D.length!==Y.length)return!1;for(D=D.sort(),Y=Y.sort(),k=0;k<D.length;k++)if(D[k]!==Y[k])return!1;for(k=0;k<D.length;k++){var j=D[k];if(!T(v[j],M[j]))return!1}return!0}return!1}function z(v){return typeof v=="object"&&v!==null&&"then"in v&&typeof v.then=="function"}function U(v){var M=[];for(let k of v)M.push(k);return M}function S(v){return typeof v=="object"&&v!==null?Object.keys(v):[]}return{isNumeric:o,isArrayOfStrings:l,isArrayOfNumbers:h,isSequence:g,isFunction:x,isLambda:f,isIterable:E,getFunctionArity:m,isDeepEqual:T,stringToArray:U,isPromise:z,keys:S}})();r.exports=n},{}]},{},[3])(3)})})(zn)),zn.exports}var $u=ku();const Du=ma($u);function Eu(t){t.registerFunction("ucFirst",e=>zr.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",r="EUR")=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(r)}).format(i)}),t.registerFunction("percent",(e,s="fr-FR",r=0)=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(r)||0}).format(i)}),t.registerFunction("date",(e,s="fr-FR",r)=>{const i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e??"");let n={dateStyle:"medium"};if(r)try{n=JSON.parse(String(r))}catch{}return new Intl.DateTimeFormat(String(s),n).format(i)}),t.registerFunction("toChart",(e,s="label",r="value",i="")=>{const n=Array.isArray(e)?e:[],o=[],l=[];for(const h of n){if(!h||typeof h!="object")continue;const g=h;o.push(String(g[String(s)]??"")),l.push(Number(g[String(r)]??0))}return{labels:o,datasets:[{label:String(i||""),data:l}]}})}const ya=new Map,va=8e3;function Ou(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>va)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${va}).`);const e=ya.get(t);if(e)return e;try{const s=Du(t);return Eu(s),ya.set(t,s),s}catch(s){const r=s instanceof Error?s.message:typeof s=="object"&&s&&"message"in s?String(s.message):String(s);throw new Error(`[sonic-jsonata] Syntaxe JSONata invalide : ${r}`)}}function Tu(t,e){if(!e||typeof e!="object")return;const s=e.type;if(typeof s=="string"&&!(s==="array"&&Array.isArray(t)||s==="object"&&t!==null&&typeof t=="object"&&!Array.isArray(t)||s==="string"&&typeof t=="string"||s==="number"&&typeof t=="number"||s==="boolean"&&typeof t=="boolean"||s==="null"&&t===null))throw new Error(`[sonic-jsonata] outputSchema : type attendu "${s}", reçu ${Lu(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const r=t;for(const i of e.required)if(typeof i=="string"&&!(i in r))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${i}".`)}}function Lu(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const Iu=150,wa=10,Mu=200,Nu=16,_a=new WeakMap;let Sa=!1;function ms(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Sr(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function Fu(t,e,s){if(t===window){window.scrollTo(e,s);return}const r=t;typeof r.scrollTo=="function"?r.scrollTo(e,s):(r.scrollLeft=e,r.scrollTop=s)}function Ru(t){if(t===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const e=t;return Math.max(0,e.scrollHeight-e.clientHeight)}function Js(t){let e=_a.get(t);if(!e){const s=Sr(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},_a.set(t,e)}return e}function ji(t){Js(t).userEngaged=!0}function zi(t){const e=Js(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},Iu)}function Pa(t,e){return e-t>=Mu}function Pr(t){if(!ms())return;const e=Js(t);if(e.restoring)return;const s=Sr(t);if(Pa(s.y,e.y)){qn(t);return}e.x=s.x,e.y=s.y}function Un(t){if(!ms())return;const e=Js(t),s=Ru(t),r=e.x,i=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=Sr(t);if(!(Math.abs(r-n)<=wa&&Math.abs(i-o)<=wa)){e.restoring=!0;try{Fu(t,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function ju(t,e={x:0,y:0}){if(!ms())return;const s=Js(t);if(e==="current"){const r=Sr(t);s.x=r.x,s.y=r.y;return}s.x=e.x??0,s.y=e.y??0}function qn(t){const e=Js(t);if(e.stickyFrames=Nu,e.raf)return;const s=()=>{e.raf=0,Un(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function Bn(t){qn(t)}function Qs(t){if(!ms())return;const e=Js(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,r=()=>{if(e.restoring)return;const{y:E}=Sr(t);if(Pa(E,e.y)){qn(t);return}if(e.userEngaged){Pr(t),zi(t);return}Pr(t)},i=E=>xa(E)===t,n=E=>{i(E)&&(Pr(t),ji(t))},o=E=>{i(E)&&zi(t)},l=E=>{i(E)&&(Pr(t),ji(t),zi(t))};s.addEventListener("scroll",r,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",l,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const h=Sr(t);if(e.x=h.x,e.y=h.y,t===window){const E=new ResizeObserver(()=>Bn(window));E.observe(document.documentElement),e.resizeObserver=E;return}const g=t,x=new ResizeObserver(()=>Bn(g));x.observe(g);for(const E of Array.from(g.children))x.observe(E);e.resizeObserver=x;const m=()=>Bn(g),f=new MutationObserver(E=>{for(const T of E)if(T.type==="childList")for(const z of Array.from(T.addedNodes))z instanceof Element&&x.observe(z);m()});f.observe(g,{childList:!0,subtree:!0,characterData:!0});const C=g.getRootNode();C instanceof ShadowRoot&&C.host&&f.observe(C.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function xa(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&Aa(e))return e;return window}function Aa(t){if(!(t instanceof HTMLElement)||t===document.documentElement||t===document.body)return!1;const e=getComputedStyle(t).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Hn(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&Aa(s)&&Qs(s);const e=xa(t);Qs(e),t.type==="wheel"?(Pr(e),ji(e),zi(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(Pr(e),ji(e))}function Ui(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&Qs(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Qs(e)})}function Vn(t){Ui(t),new MutationObserver(s=>{for(const r of s)for(const i of Array.from(r.addedNodes))i instanceof Element&&Ui(i)}).observe(t,{childList:!0,subtree:!0})}function Wn(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(Vn(e.shadowRoot),Wn(e.shadowRoot))})}function zu(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(r){const i=e.call(this,r);return Vn(i),i}}function Ca(){if(typeof window>"u"||Sa||(Sa=!0,!ms()))return;Qs(window),zu();const t={capture:!0,passive:!0};window.addEventListener("wheel",Hn,t),window.addEventListener("touchstart",Hn,t),window.addEventListener("pointerdown",Hn,t);const e=()=>{Ui(document),Wn(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const n of Array.from(i.addedNodes))n instanceof Element&&(Ui(n),n.shadowRoot&&Vn(n.shadowRoot),Wn(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Uu=pc,qu=pu,Bu=Ai,Hu=zr,gs=ze,Vu=dt,Qr=ut,Wu=Os,Ku=fs;Ca(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Uu,Arrays:qu,DataBindObserver:Bu,Format:Hu,HTML:gs,LocationHandler:Vu,Objects:Qr,PublisherManager:ye,api:Wu,URLPattern:Ku,Endpoint:Ii,DataProviderKey:Cs};var Gu=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Xr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Yu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Gu(e,s,i),i};const Kn=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const r=this.getAttribute("name"),i=this.getCheckAllPublisher(),n=this.getFormPublisher();if(i?.hasCheckAll.get()&&!this.checksAll()&&i&&n&&r){if(this.getFormPublisherValue()?.length)(this.checked===null||i.checkMode.get()=="noneChecked"||i.checkMode.get()==null)&&i.checkMode.set("someUnchecked");else{i.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),l=i.values.get();if(l&&l.length){let h=l.length;for(const g of l)o.indexOf(g)==-1&&(h-=1);h==l.length&&i.checkMode.set("allChecked"),h==0&&i.checkMode.set("noneChecked")}l.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=r=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),r=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),r=="noneChecked"&&(this.checked=null),r=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(r){if(this.value==r||(this.hasAttribute("value")&&!this.forceAutoFill&&(r=this.getAttribute("value")),this._value==r)||r==null||(this._value=r,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==r?!0:null),Array.isArray(n)||(n=[]),n.indexOf(r)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(r){if(this.setCheckedValue(r),this.checksAll()){const i=this.getCheckAllPublisher();i&&(this.checked===!0?i.checkMode.set("allChecked"):this.checked===null&&(i.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();if(i){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;i.isFormValid=!1,r.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(r){this._checked!=r&&(this._checked=r,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const r=this.checked===!0?this.radio?!0:null:!0;this.checked=r;const i=new Event("change");this.dispatchEvent(i)}getValueForFormPublisher(){let r=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:r;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(r)||(r=[]);const i=r.slice(0),n=i.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&i.push(this.value),this.checked===null&&n!==-1&&i.splice(n,1),i}setFormValueFromPublisher(r){if(this.unique||this.radio){this.checked=this.value==r?!0:null;return}Array.isArray(r)||(r=[]),!this.checksAll()&&(this.checked=r.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const r=this.formDataProvider,i=this.getAttribute("name");return!r||!i?null:ye.get(r+"/"+i+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const r=this.getCheckAllPublisher();if(r&&(r.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const i=r.values.get().slice(0),n=i.indexOf(this.value);n!=-1&&(i.splice(n,1),r.values.set(i))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const n=this.getFormPublisherValue();n&&Array.isArray(n)&&n.indexOf(this.value)!==-1&&(this.checked=!0)}const i=this.getCheckAllPublisher();i&&(i.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&i.hasCheckAll.set(!0),i.values.get()||i.values.set([]),this.checksAll()||i.values.set([...i.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Xr([u()],e.prototype,"value",1),Xr([u()],e.prototype,"forceAutoFill",2),Xr([u({type:Boolean})],e.prototype,"unique",2),Xr([u({type:Boolean})],e.prototype,"radio",2),Xr([u()],e.prototype,"checked",1),e};/**
76
76
  * @license
77
77
  * Copyright 2018 Google LLC
78
78
  * SPDX-License-Identifier: BSD-3-Clause
@@ -109,7 +109,7 @@
109
109
  :host([size="inherit"]) {
110
110
  --sc-_fs: 1em;
111
111
  }
112
- `;var Yu=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,Ve=(t,e,s,r)=>{for(var i=r>1?void 0:r?Zu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Yu(e,s,i),i};const Ju="sonic-button";let Ne=class extends Wn(_r(Q)){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(t){this._href=t??"";const e=this._href.toString();e&&e.indexOf("http")!=0?dt.onChange(this):dt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),dt.changeFromComponent(this)}handleChange(t){if(!(t?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(t?.preventDefault(),t?.stopPropagation(),dt.changeFromComponent(this)),this.hasAttribute("reset"))){const e=this.getAttribute("reset"),s=e?ve.get(e):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(t){this.autoRepeat&&(this.handleChange(t),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&dt.updateComponentActiveState(this),t.has("location")&&dt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},e=R`
112
+ `;var Zu=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,Ve=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ju(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Zu(e,s,i),i};const Qu="sonic-button";let Ne=class extends Kn(_r(Q)){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(t){this._href=t??"";const e=this._href.toString();e&&e.indexOf("http")!=0?dt.onChange(this):dt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),dt.changeFromComponent(this)}handleChange(t){if(!(t?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(t?.preventDefault(),t?.stopPropagation(),dt.changeFromComponent(this)),this.hasAttribute("reset"))){const e=this.getAttribute("reset"),s=e?ye.get(e):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(t){this.autoRepeat&&(this.handleChange(t),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&dt.updateComponentActiveState(this),t.has("location")&&dt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},e=R`
113
113
  <button
114
114
  part="button"
115
115
  class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
@@ -503,11 +503,11 @@
503
503
  transform: translate(-50%, -50%) rotate(359deg);
504
504
  }
505
505
  }
506
- `],Ve([u({type:String,reflect:!0})],Ne.prototype,"type",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"variant",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"size",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"shape",2),Ve([u({type:String})],Ne.prototype,"direction",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"alignItems",2),Ve([u({type:String})],Ne.prototype,"justify",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"align",2),Ve([u({type:String})],Ne.prototype,"minWidth",2),Ve([u({type:Boolean,reflect:!0})],Ne.prototype,"icon",2),Ve([u({type:String})],Ne.prototype,"download",2),Ve([u({type:String})],Ne.prototype,"autoActive",2),Ve([u({type:Boolean,reflect:!0})],Ne.prototype,"loading",2),Ve([xe()],Ne.prototype,"hasPrefix",2),Ve([xe()],Ne.prototype,"hasSuffix",2),Ve([Br({flatten:!0,slot:"prefix"})],Ne.prototype,"prefixes",2),Ve([Br({flatten:!0,slot:"suffix"})],Ne.prototype,"suffixes",2),Ve([u({type:String})],Ne.prototype,"target",2),Ve([u({type:String})],Ne.prototype,"href",1),Ve([u({type:String})],Ne.prototype,"goBack",2),Ve([u({type:Boolean})],Ne.prototype,"pushState",2),Ve([u({type:Boolean,reflect:!0})],Ne.prototype,"active",2),Ve([u({type:Boolean,reflect:!0})],Ne.prototype,"autoRepeat",2),Ve([u({type:String,attribute:"data-aria-controls"})],Ne.prototype,"ariaControls",2),Ve([u({type:Boolean,attribute:"data-aria-expanded"})],Ne.prototype,"sonicAriaExpanded",2),Ve([xe()],Ne.prototype,"location",2),Ne=Ve([X(Ju)],Ne);/**
506
+ `],Ve([u({type:String,reflect:!0})],Ne.prototype,"type",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"variant",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"size",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"shape",2),Ve([u({type:String})],Ne.prototype,"direction",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"alignItems",2),Ve([u({type:String})],Ne.prototype,"justify",2),Ve([u({type:String,reflect:!0})],Ne.prototype,"align",2),Ve([u({type:String})],Ne.prototype,"minWidth",2),Ve([u({type:Boolean,reflect:!0})],Ne.prototype,"icon",2),Ve([u({type:String})],Ne.prototype,"download",2),Ve([u({type:String})],Ne.prototype,"autoActive",2),Ve([u({type:Boolean,reflect:!0})],Ne.prototype,"loading",2),Ve([xe()],Ne.prototype,"hasPrefix",2),Ve([xe()],Ne.prototype,"hasSuffix",2),Ve([Br({flatten:!0,slot:"prefix"})],Ne.prototype,"prefixes",2),Ve([Br({flatten:!0,slot:"suffix"})],Ne.prototype,"suffixes",2),Ve([u({type:String})],Ne.prototype,"target",2),Ve([u({type:String})],Ne.prototype,"href",1),Ve([u({type:String})],Ne.prototype,"goBack",2),Ve([u({type:Boolean})],Ne.prototype,"pushState",2),Ve([u({type:Boolean,reflect:!0})],Ne.prototype,"active",2),Ve([u({type:Boolean,reflect:!0})],Ne.prototype,"autoRepeat",2),Ve([u({type:String,attribute:"data-aria-controls"})],Ne.prototype,"ariaControls",2),Ve([u({type:Boolean,attribute:"data-aria-expanded"})],Ne.prototype,"sonicAriaExpanded",2),Ve([xe()],Ne.prototype,"location",2),Ne=Ve([X(Qu)],Ne);/**
507
507
  * @license
508
508
  * Copyright 2017 Google LLC
509
509
  * SPDX-License-Identifier: BSD-3-Clause
510
- */const Ca=(t,e,s)=>{const r=new Map;for(let i=e;i<=s;i++)r.set(t[i],i);return r},qi=Es(class extends yr{constructor(t){if(super(t),t.type!==Zs.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let r;s===void 0?s=e:e!==void 0&&(r=e);const i=[],n=[];let o=0;for(const l of t)i[o]=r?r(l,o):o,n[o]=s(l,o),o++;return{values:n,keys:i}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,r]){const i=Yc(t),{values:n,keys:o}=this.dt(e,s,r);if(!Array.isArray(i))return this.ut=o,n;const l=this.ut??=[],h=[];let g,x,m=0,f=i.length-1,C=0,E=n.length-1;for(;m<=f&&C<=E;)if(i[m]===null)m++;else if(i[f]===null)f--;else if(l[m]===o[C])h[C]=Ys(i[m],n[C]),m++,C++;else if(l[f]===o[E])h[E]=Ys(i[f],n[E]),f--,E--;else if(l[m]===o[E])h[E]=Ys(i[m],n[E]),Kr(t,h[E+1],i[m]),m++,E--;else if(l[f]===o[C])h[C]=Ys(i[f],n[C]),Kr(t,i[m],i[f]),f--,C++;else if(g===void 0&&(g=Ca(o,C,E),x=Ca(l,m,f)),g.has(l[m]))if(g.has(l[f])){const T=x.get(o[C]),z=T!==void 0?i[T]:null;if(z===null){const U=Kr(t,i[m]);Ys(U,n[C]),h[C]=U}else h[C]=Ys(z,n[C]),Kr(t,i[m],z),i[T]=null;C++}else Tn(i[f]),f--;else Tn(i[m]),m++;for(;C<=E;){const T=Kr(t,h[E+1]);Ys(T,n[C]),h[C++]=T}for(;m<=f;){const T=i[m++];T!==null&&Tn(T)}return this.ut=o,Gc(t,h),zt}}),Qu=new WeakMap;let ka=0;const Kn=new Map,$a=new WeakSet,Da=()=>new Promise((t=>requestAnimationFrame(t))),Ea=(t,e)=>{const s=t-e;return s===0?void 0:s},Oa=(t,e)=>{const s=t/e;return s===1?void 0:s},Gn={left:(t,e)=>{const s=Ea(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=Ea(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;e===0&&(e=1,s={width:"1px"});const r=Oa(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleX(${r})`}},height:(t,e)=>{let s;e===0&&(e=1,s={height:"1px"});const r=Oa(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleY(${r})`}}},Xu={duration:333,easing:"ease-in-out"},eh=["left","top","width","height","opacity","color","background"],Ta=new WeakMap;class th extends Ln{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Zs.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return ee}getController(){return Qu.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[s]){const r=this.u===void 0;return r&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((i=>this.t=!0)),this.element=e.element,Ta.set(this.element,this)),this.optionsOrCallback=s,(r||typeof s!="function")&&this.p(s),this.render(s)}p(e){e=e??{};const s=this.getController();s!==void 0&&((e={...s.defaultOptions,...e}).keyframeOptions={...s.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=eh,this.options=e}m(){const e={},s=this.element.getBoundingClientRect(),r=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const n=s[i]??(Gn[i]?void 0:r[i]),o=Number(n);e[i]=isNaN(o)?n+"":o})),e}v(){let e,s=!0;return this.options.guard&&(e=this.options.guard(),s=((r,i)=>{if(Array.isArray(r)){if(Array.isArray(i)&&i.length===r.length&&r.every(((n,o)=>n===i[o])))return!1}else if(i===r)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await Da;const s=this.O(),r=this.j(this.options.keyframeOptions,s),i=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,i,s);this.log("measured",[this.A,i,n,o]),e=this.calculateKeyframes(n,o)}else{const n=Kn.get(this.options.inId);if(n){Kn.delete(this.options.inId);const{from:o,to:l}=this.N(n,i,s);e=this.calculateKeyframes(o,l),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,ka++,e.forEach((h=>h.zIndex=ka))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,r)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&Kn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Da(),this.i?.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const r=this.m();this.log("stabilizing out");const i=this.A.left-r.left,n=this.A.top-r.top;getComputedStyle(this.element).position!=="static"||i===0&&n===0||(this.element.style.position="relative"),i!==0&&(this.element.style.left=i+"px"),n!==0&&(this.element.style.top=n+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let s=this.element.parentNode;s;s=s?.parentNode){const r=Ta.get(s);r&&!r.isDisabled()&&r&&e.push(r)}return e}get isHostRendered(){const e=$a.has(this.u);return e||this.u.updateComplete.then((()=>{$a.add(this.u)})),e}j(e,s=this.O()){const r={...Xu};return s.forEach((i=>Object.assign(r,i.options.keyframeOptions))),Object.assign(r,e),r}N(e,s,r){e={...e},s={...s};const i=r.map((l=>l.animatingProperties)).filter((l=>l!==void 0));let n=1,o=1;return i.length>0&&(i.forEach((l=>{l.width&&(n/=l.width),l.height&&(o/=l.height)})),e.left!==void 0&&s.left!==void 0&&(e.left=n*e.left,s.left=n*s.left),e.top!==void 0&&s.top!==void 0&&(e.top=o*e.top,s.top=o*s.top)),{from:e,to:s}}calculateKeyframes(e,s,r=!1){const i={},n={};let o=!1;const l={};for(const h in s){const g=e[h],x=s[h];if(h in Gn){const m=Gn[h];if(g===void 0||x===void 0)continue;const f=m(g,x);f.transform!==void 0&&(l[h]=f.value,o=!0,i.transform=`${i.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(i,f.overrideFrom))}else g!==x&&g!==void 0&&x!==void 0&&(o=!0,i[h]=g,n[h]=x)}return i.transformOrigin=n.transformOrigin=r?"center center":"top left",this.animatingProperties=l,o?[i,n]:void 0}async animate(e,s=this.options.keyframeOptions){this.start(),this.frames=e;let r=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,s]),r=!0,this.webAnimation=this.element.animate(e,s);const i=this.getController();i?.add(this);try{await this.webAnimation.finished}catch{}i?.remove(this)}return this.didFinish(r),r}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,s){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,s)}}const sh=Es(th),rh={core:{cancel:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
510
+ */const ka=(t,e,s)=>{const r=new Map;for(let i=e;i<=s;i++)r.set(t[i],i);return r},qi=Es(class extends vr{constructor(t){if(super(t),t.type!==Zs.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let r;s===void 0?s=e:e!==void 0&&(r=e);const i=[],n=[];let o=0;for(const l of t)i[o]=r?r(l,o):o,n[o]=s(l,o),o++;return{values:n,keys:i}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,r]){const i=Zc(t),{values:n,keys:o}=this.dt(e,s,r);if(!Array.isArray(i))return this.ut=o,n;const l=this.ut??=[],h=[];let g,x,m=0,f=i.length-1,C=0,E=n.length-1;for(;m<=f&&C<=E;)if(i[m]===null)m++;else if(i[f]===null)f--;else if(l[m]===o[C])h[C]=Ys(i[m],n[C]),m++,C++;else if(l[f]===o[E])h[E]=Ys(i[f],n[E]),f--,E--;else if(l[m]===o[E])h[E]=Ys(i[m],n[E]),Kr(t,h[E+1],i[m]),m++,E--;else if(l[f]===o[C])h[C]=Ys(i[f],n[C]),Kr(t,i[m],i[f]),f--,C++;else if(g===void 0&&(g=ka(o,C,E),x=ka(l,m,f)),g.has(l[m]))if(g.has(l[f])){const T=x.get(o[C]),z=T!==void 0?i[T]:null;if(z===null){const U=Kr(t,i[m]);Ys(U,n[C]),h[C]=U}else h[C]=Ys(z,n[C]),Kr(t,i[m],z),i[T]=null;C++}else Ln(i[f]),f--;else Ln(i[m]),m++;for(;C<=E;){const T=Kr(t,h[E+1]);Ys(T,n[C]),h[C++]=T}for(;m<=f;){const T=i[m++];T!==null&&Ln(T)}return this.ut=o,Yc(t,h),zt}}),Xu=new WeakMap;let $a=0;const Gn=new Map,Da=new WeakSet,Ea=()=>new Promise((t=>requestAnimationFrame(t))),Oa=(t,e)=>{const s=t-e;return s===0?void 0:s},Ta=(t,e)=>{const s=t/e;return s===1?void 0:s},Yn={left:(t,e)=>{const s=Oa(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=Oa(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;e===0&&(e=1,s={width:"1px"});const r=Ta(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleX(${r})`}},height:(t,e)=>{let s;e===0&&(e=1,s={height:"1px"});const r=Ta(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleY(${r})`}}},eh={duration:333,easing:"ease-in-out"},th=["left","top","width","height","opacity","color","background"],La=new WeakMap;class sh extends In{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Zs.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return ee}getController(){return Xu.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[s]){const r=this.u===void 0;return r&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((i=>this.t=!0)),this.element=e.element,La.set(this.element,this)),this.optionsOrCallback=s,(r||typeof s!="function")&&this.p(s),this.render(s)}p(e){e=e??{};const s=this.getController();s!==void 0&&((e={...s.defaultOptions,...e}).keyframeOptions={...s.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=th,this.options=e}m(){const e={},s=this.element.getBoundingClientRect(),r=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const n=s[i]??(Yn[i]?void 0:r[i]),o=Number(n);e[i]=isNaN(o)?n+"":o})),e}v(){let e,s=!0;return this.options.guard&&(e=this.options.guard(),s=((r,i)=>{if(Array.isArray(r)){if(Array.isArray(i)&&i.length===r.length&&r.every(((n,o)=>n===i[o])))return!1}else if(i===r)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await Ea;const s=this.O(),r=this.j(this.options.keyframeOptions,s),i=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,i,s);this.log("measured",[this.A,i,n,o]),e=this.calculateKeyframes(n,o)}else{const n=Gn.get(this.options.inId);if(n){Gn.delete(this.options.inId);const{from:o,to:l}=this.N(n,i,s);e=this.calculateKeyframes(o,l),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,$a++,e.forEach((h=>h.zIndex=$a))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,r)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&Gn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Ea(),this.i?.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const r=this.m();this.log("stabilizing out");const i=this.A.left-r.left,n=this.A.top-r.top;getComputedStyle(this.element).position!=="static"||i===0&&n===0||(this.element.style.position="relative"),i!==0&&(this.element.style.left=i+"px"),n!==0&&(this.element.style.top=n+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let s=this.element.parentNode;s;s=s?.parentNode){const r=La.get(s);r&&!r.isDisabled()&&r&&e.push(r)}return e}get isHostRendered(){const e=Da.has(this.u);return e||this.u.updateComplete.then((()=>{Da.add(this.u)})),e}j(e,s=this.O()){const r={...eh};return s.forEach((i=>Object.assign(r,i.options.keyframeOptions))),Object.assign(r,e),r}N(e,s,r){e={...e},s={...s};const i=r.map((l=>l.animatingProperties)).filter((l=>l!==void 0));let n=1,o=1;return i.length>0&&(i.forEach((l=>{l.width&&(n/=l.width),l.height&&(o/=l.height)})),e.left!==void 0&&s.left!==void 0&&(e.left=n*e.left,s.left=n*s.left),e.top!==void 0&&s.top!==void 0&&(e.top=o*e.top,s.top=o*s.top)),{from:e,to:s}}calculateKeyframes(e,s,r=!1){const i={},n={};let o=!1;const l={};for(const h in s){const g=e[h],x=s[h];if(h in Yn){const m=Yn[h];if(g===void 0||x===void 0)continue;const f=m(g,x);f.transform!==void 0&&(l[h]=f.value,o=!0,i.transform=`${i.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(i,f.overrideFrom))}else g!==x&&g!==void 0&&x!==void 0&&(o=!0,i[h]=g,n[h]=x)}return i.transformOrigin=n.transformOrigin=r?"center center":"top left",this.animatingProperties=l,o?[i,n]:void 0}async animate(e,s=this.options.keyframeOptions){this.start(),this.frames=e;let r=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,s]),r=!0,this.webAnimation=this.element.animate(e,s);const i=this.getController();i?.add(this);try{await this.webAnimation.finished}catch{}i?.remove(this)}return this.didFinish(r),r}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,s){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,s)}}const rh=Es(sh),ih={core:{cancel:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
511
511
  <path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
512
512
  </svg>
513
513
  `,"check-circled-outline":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -543,7 +543,7 @@
543
543
  <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
544
544
  <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
545
545
  </svg>
546
- `}},Bi=new Map,La={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 ih(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const r=document.querySelector("[customIconLibraryPath]");e=r?.getAttribute("customIconLibraryPath")??"",s==null&&(s=r?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function nh(t,e){return t in La?t!=="custom"?La[t]:ih(e):null}const Ia=sessionStorage.getItem("sonicIconsCache"),bs=Ia?JSON.parse(Ia):{icons:{},names:[]},oh=100,Lo=class Lo{};Lo.default={get:async e=>{const s=e.library;if(!e.name)return"";const r=e.name,i=rh;if(!s)return He(i.core[e.name]||"");const n=nh(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",l=i[s]||{};i[s]=l;const h=s==="custom"?`${n.url}|${o}-${r}`:`${o}-${r}`;if(l[h])return He(l[h]);const g=(n.url||"").replace("$prefix",o).replace("$name",r);if(bs.icons[g]){const m=bs.icons[g];if(/^\s*<svg[\s>]/i.test(m||""))return l[h]=m,He(m);delete bs.icons[g]}if(!Bi.has(g)){const m=new Promise(async f=>{try{const C=await fetch(g);if(!C.ok){f("");return}try{const E=C.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const T=await C.text(),z=/^\s*<svg[\s>]/i.test(T);f(z?T:"")}catch{f("")}}catch{eu(),f("")}});Bi.set(g,m)}const x=await Bi.get(g);if(Bi.delete(g),l[h]=x||"",x&&/^\s*<svg[\s>]/i.test(x)&&(bs.icons[g]=x,bs.names.push(g)),bs.names.length>oh){const m=bs.names.shift();delete bs.icons[m]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(bs)),x?He(x):""}return He(i.core[e.name]||"")}};let Yn=Lo;function ah(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function lh(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function ch(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Xs(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=ah,t.__onConnected__=lh,t.__onDisconnected__=ch;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(r=>r(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(r=>r(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(r=>r(this))}}function uh(t){return t.trim().replace(/^this\./,"")}function Zn(t,e){if(!e)return;const s=e.split(".").filter(Boolean);if(s.length===0)return;let r=t;for(const i of s){if(r==null||typeof r!="object")return;r=r[i]}return r}function hh(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Lt(t,e,s){let r=!1;const i=(l,h)=>{const g=uh(h),x=Zn(t,g);return hh(x,s)?(r=!0,""):`${x}`},n=e.replace(/\$\{([^}]+)\}/g,i).replace(/\{\$([^}]+)\}/g,i).trim();if(r||!n.length)return{ready:!1,path:null};const o=n.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:n}}function Ht(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const r of e){let i;for(;(i=r.exec(t))!==null;){const n=(i[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function Ma(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const ei=new WeakMap,ti=new Set;let xr=null;const dh=8;function ph(t){let e=ei.get(t);return e||(e=new Map,ei.set(t,e)),e}function fh(t,e){const s=new Set;for(const[r,i]of e){const n=Zn(t,r);Object.is(i.lastValue,n)||(i.lastValue=n,i.onChangeHandlers.forEach(o=>s.add(o)))}return s}function mh(){xr=null;let t=0,e=!0;for(;e&&t<dh;){e=!1,t+=1;for(const s of ti){const r=ei.get(s);if(!r||r.size===0)continue;const i=fh(s,r);i.size!==0&&(e=!0,i.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),ti.size>0&&Na()}function Na(){xr===null&&(xr=requestAnimationFrame(mh))}function gh(){ti.size===0&&xr!==null&&(cancelAnimationFrame(xr),xr=null)}function Ts(t,e,s,r,i){const n=String(r),o=ph(s);let l=o.get(n);return l||(l={lastValue:Zn(s,n),onChangeHandlers:new Set},o.set(n,l)),l.onChangeHandlers.add(i),ti.add(s),Na(),()=>{const h=ei.get(s);if(!h)return;const g=h.get(n);g&&(g.onChangeHandlers.delete(i),g.onChangeHandlers.size===0&&h.delete(n),h.size===0&&(ei.delete(s),ti.delete(s),gh()))}}const Hi={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},Fa={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Ls={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},Ra={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function It(t){const e=t.split(".").filter(i=>i.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let r=ve.get(s);return r?(r=Qr.traverse(r,e),r):null}function bh(t,e){const s=e?.reflect??!1,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ht(t),n=i.length>0;return function(o,l){if(!o)return;Xs(o);const h=`__bind_state_${l}`,g=`__bind_${l}_publisher__`,x=s?`__bind_${l}_updating_from_publisher__`:null;if(s){const m=Object.getOwnPropertyDescriptor(o,l),f=`__bind_${l}_value__`,C=`__bind_${l}_updating_from_publisher__`,E=m&&!m.get&&!m.set?m.value:void 0;Object.defineProperty(o,l,{get(){return m?.get?m.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(T){m?.set?m.set.call(this,T):this[f]=T,!this[C]&&this[g]&&this[g].set(T)},enumerable:m?.enumerable??!0,configurable:m?.configurable??!0})}o.__onConnected__(m=>{const f=m[h]||(m[h]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(T=>T()),f.cleanupWatchers=[],f.currentPath=null;const C=T=>{if(!T){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,m[g]=null;return}if(T===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const z=It(T);if(!z){f.currentPath=null,m[g]=null;return}const U=S=>{s&&x&&(m[x]=!0),m[l]=S,s&&x&&(m[x]=!1)};z.onAssign(U),f.unsubscribePublisher=()=>{z.offAssign(U),m[g]===z&&(m[g]=null)},f.currentPath=T,m[g]=z},E=()=>{if(n){const T=Lt(m,t,r);if(!T.ready){C(null);return}C(T.path);return}C(t)};if(n)for(const T of i){const z=Ts(Hi.watcherStore,Hi.hooked,m,T,()=>E());f.cleanupWatchers.push(z)}E()}),o.__onDisconnected__(m=>{const f=m[h];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(C=>C()),f.cleanupWatchers=[],f.currentPath=null,m[g]=null)})}}function ja(t,e){const s=Ma(t)?t.path:t;return bh(s,e)}function za(t,e){const s=t.path,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ht(s);return function(n,o){Xs(n);const l=`__publish_${o}_publisher__`,h=`__publish_${o}_value__`,g=Object.getOwnPropertyDescriptor(n,o),x=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(n,o,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,h)&&x!==void 0&&(this[h]=x),this[h])},set(m){g?.set?g.set.call(this,m):this[h]=m;const f=this[l];f&&f.set(m)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0}),n.__onConnected__(m=>{const f=m,C=`__publish_state_${o}`,E=f[C]||(f[C]={cleanupWatchers:[]}),T=()=>{let z;if(i.length){const S=Lt(m,s,r);z=S.ready?S.path:null}else z=s;const U=z?It(z):void 0;if(f[l]=U??null,U&&o in m){const S=f[o];S!==void 0&&U.set(S)}};if(E.cleanupWatchers.forEach(z=>z()),E.cleanupWatchers=[],i.length)for(const z of i)E.cleanupWatchers.push(Ts(Fa.watcherStore,Fa.hooked,f,z,T));T()}),n.__onDisconnected__(m=>{const f=m,C=`__publish_state_${o}`,E=f[C];E?.cleanupWatchers&&E.cleanupWatchers.forEach(T=>T()),f[l]=void 0})}}function Ua(t){return ja(t)}const vh={nullish:t=>t==null,emptyString:t=>t==="",emptyObject:t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===0,emptyArray:t=>Array.isArray(t)&&t.length===0};function yh(t,e){return e.some(s=>vh[s](t))}function wh(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(i=>i!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let r=0;r<e;r++)if(yh(t[r],s.skip))return!1}return!0}function _h(...t){return qa({},t)}function qa(t,e){const s=e.map(i=>{const n=Ht(i);return{originalPath:i,dynamicDependencies:n,isDynamic:n.length>0}}),r={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(i,n,o){Xs(i);const l=`__onAssign_state_${n}__`;let h;i.__onConnected__(g=>{const x=g[l]||(g[l]={cleanupWatchers:[],configurations:[]});x.cleanupWatchers.forEach(T=>T()),x.cleanupWatchers=[],x.configurations.forEach(T=>{T.unsubscribePublisher&&T.unsubscribePublisher()}),x.configurations=[];const m=[],f=[];for(let T=0;T<e.length;T++){const z=s[T],U=new Set,S=y=>{m[T]=y,wh(m,e.length,t)&&U.forEach(M=>M(...m))};f.push({publisher:null,onAssign:S,callbacks:U,unsubscribePublisher:null,pathConfig:z,index:T})}const C=(T,z)=>{if(T.unsubscribePublisher&&(T.unsubscribePublisher(),T.unsubscribePublisher=null),m[T.index]=null,T.publisher=null,!z)return;const U=It(z);U&&(U.onAssign(T.onAssign),T.unsubscribePublisher=()=>{U.offAssign(T.onAssign),T.publisher===U&&(T.publisher=null)},T.publisher=U)},E=()=>{for(const T of f)if(T.pathConfig.isDynamic){const z=Lt(g,T.pathConfig.originalPath,r);if(!z.ready){C(T,null);continue}C(T,z.path)}else C(T,T.pathConfig.originalPath)};for(const T of f)if(T.pathConfig.isDynamic)for(const z of T.pathConfig.dynamicDependencies){const U=Ts(Ra.watcherStore,Ra.hooked,g,z,()=>E());x.cleanupWatchers.push(U)}h=o.value.bind(g);for(const T of f)T.callbacks.add(h);E(),x.configurations=f}),i.__onDisconnected__(g=>{const x=g[l];x&&(x.cleanupWatchers.forEach(m=>m()),x.cleanupWatchers=[],x.configurations.forEach(m=>{m.unsubscribePublisher&&m.unsubscribePublisher(),m.callbacks.delete(h)}),x.configurations=[])})}}function Sh(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function Ph(...t){const e=t[t.length-1],s=e!==void 0&&!Sh(e),r=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return qa({dispatchWhenUndefined:!r.waitForAllDefined,skip:r.skip,skipEmptyPlaceholder:r.skipEmptyPlaceholder},n)}function xh(){return function(t,e,s){let r=0;const i=s.value,n=t.constructor.prototype.disconnectedCallback;t.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=t.connectedCallback;t.connectedCallback=function(){o?.call(this),this[e]()},s.value=function(...l){let h=new Set;const g=()=>{r++;const m=r;window.queueMicrotask(()=>{m===r&&this[e]()})};h.forEach(m=>{m.offAssign(g)}),Vo();const x=i.apply(this,l);return h=Wo()||new Set,h.forEach(m=>{m.onAssign(g,!1)}),this.__removeAutoSubscribe__=()=>{h.forEach(m=>{m.offAssign(g)})},x}}}function Ah(t){return function(e){Xs(e);for(const s of t){const r=s.split(".");if(r.length===0)continue;const i=r.shift()||"";let n=ve.get(i);n=Qr.traverse(n,r),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function Ch(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function kh(t){const e=t.parentNode||(t.getRootNode()?.host??null);return e instanceof Element?e:null}function Ba(t,e,s,r){const i=t,n=ze.getAncestorAttributeValue(t,e);!r.assignNull&&n===null||Object.is(i[s],n)||(i[s]=n)}const ye=class ye{static subscribe(e,s,r,i={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:r,syncOptions:i,watchedAncestors:[],parentForReparent:null};return ye.subscriptions.add(n),ye.bindSubscription(n),()=>{ye.unsubscribe(n)}}static bindSubscription(e){ye.unbindWatchers(e);const s=Ch(e.component);e.watchedAncestors=s;for(const i of s)ye.addAttrSlot(i,e.attributeName,e);const r=kh(e.component);e.parentForReparent=r,r&&ye.addParentSlot(r,e),ye.pendingRefresh.add(e),ye.scheduleRefresh()}static unbindWatchers(e){for(const s of e.watchedAncestors)ye.removeAttrSlot(s,e.attributeName,e);e.watchedAncestors=[],e.parentForReparent&&(ye.removeParentSlot(e.parentForReparent,e),e.parentForReparent=null)}static addAttrSlot(e,s,r){let i=ye.attrSlots.get(e);i||(i=new Map,ye.attrSlots.set(e,i));let n=i.get(s);if(!n){const o=ze.scopeAttributeNames(s),l=new Set,h=new MutationObserver(()=>{for(const g of l)ye.subscriptions.has(g)&&ye.pendingRefresh.add(g);ye.scheduleRefresh()});h.observe(e,{attributes:!0,attributeFilter:o}),n={observer:h,subscriptions:l},i.set(s,n)}n.subscriptions.add(r)}static removeAttrSlot(e,s,r){const i=ye.attrSlots.get(e);if(!i)return;const n=i.get(s);n&&(n.subscriptions.delete(r),!(n.subscriptions.size>0)&&(n.observer.disconnect(),i.delete(s)))}static addParentSlot(e,s){let r=ye.parentSlots.get(e);if(!r){const n=new Map,o=new MutationObserver(l=>{const h=new Set;for(const g of l)g.removedNodes.forEach(x=>{x instanceof Element&&h.add(x)}),g.addedNodes.forEach(x=>{x instanceof Element&&h.add(x)});for(const g of h){const x=n.get(g);if(x)for(const m of[...x])ye.subscriptions.has(m)&&ye.bindSubscription(m)}});o.observe(e,{childList:!0}),r={observer:o,byComponent:n},ye.parentSlots.set(e,r)}let i=r.byComponent.get(s.component);i||(i=new Set,r.byComponent.set(s.component,i)),i.add(s)}static removeParentSlot(e,s){const r=ye.parentSlots.get(e);if(!r)return;const i=r.byComponent.get(s.component);i&&(i.delete(s),i.size===0&&r.byComponent.delete(s.component)),!(r.byComponent.size>0)&&(r.observer.disconnect(),ye.parentSlots.delete(e))}static unsubscribe(e){ye.subscriptions.has(e)&&(ye.unbindWatchers(e),ye.subscriptions.delete(e),ye.pendingRefresh.delete(e),ye.subscriptions.size===0&&ye.cancelScheduledRefresh())}static scheduleRefresh(){ye.pendingRefresh.size!==0&&ye.animationFrameId===null&&(ye.animationFrameId=requestAnimationFrame(()=>{ye.flushRefresh()}))}static cancelScheduledRefresh(){ye.animationFrameId!==null&&(cancelAnimationFrame(ye.animationFrameId),ye.animationFrameId=null),ye.pendingRefresh.clear()}static flushRefresh(){ye.animationFrameId=null;const e=Array.from(ye.pendingRefresh);ye.pendingRefresh.clear();for(const s of e)ye.subscriptions.has(s)&&Ba(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};ye.subscriptions=new Set,ye.pendingRefresh=new Set,ye.animationFrameId=null,ye.attrSlots=new WeakMap,ye.parentSlots=new WeakMap;let Jn=ye;function Qn(t,e){const s=e?.dynamic??!1,r=s;return function(i,n){if(!i||(Xs(i),i.__onBeforeConnected__(l=>{Ba(l,t,n,{assignNull:r})}),!s))return;let o=null;i.__onConnected__(l=>{o=Jn.subscribe(l,t,n,{assignNull:!0})}),i.__onDisconnected__(()=>{o?.(),o=null})}}var $h=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,er=(t,e,s,r)=>{for(var i=r>1?void 0:r?Dh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&$h(e,s,i),i};const Xn=t=>u(t),Eh="sonic-icon";let vs=class extends Q{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Yn.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(t){(t.has("name")||t.has("prefix")||t.has("library")||this.library==="custom"&&(t.has("customIconLibraryPath")||t.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:ee}};vs.styles=Z`
546
+ `}},Bi=new Map,Ia={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 nh(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const r=document.querySelector("[customIconLibraryPath]");e=r?.getAttribute("customIconLibraryPath")??"",s==null&&(s=r?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function oh(t,e){return t in Ia?t!=="custom"?Ia[t]:nh(e):null}const Ma=sessionStorage.getItem("sonicIconsCache"),bs=Ma?JSON.parse(Ma):{icons:{},names:[]},ah=100,Io=class Io{};Io.default={get:async e=>{const s=e.library;if(!e.name)return"";const r=e.name,i=ih;if(!s)return He(i.core[e.name]||"");const n=oh(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",l=i[s]||{};i[s]=l;const h=s==="custom"?`${n.url}|${o}-${r}`:`${o}-${r}`;if(l[h])return He(l[h]);const g=(n.url||"").replace("$prefix",o).replace("$name",r);if(bs.icons[g]){const m=bs.icons[g];if(/^\s*<svg[\s>]/i.test(m||""))return l[h]=m,He(m);delete bs.icons[g]}if(!Bi.has(g)){const m=new Promise(async f=>{try{const C=await fetch(g);if(!C.ok){f("");return}try{const E=C.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const T=await C.text(),z=/^\s*<svg[\s>]/i.test(T);f(z?T:"")}catch{f("")}}catch{tu(),f("")}});Bi.set(g,m)}const x=await Bi.get(g);if(Bi.delete(g),l[h]=x||"",x&&/^\s*<svg[\s>]/i.test(x)&&(bs.icons[g]=x,bs.names.push(g)),bs.names.length>ah){const m=bs.names.shift();delete bs.icons[m]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(bs)),x?He(x):""}return He(i.core[e.name]||"")}};let Zn=Io;function lh(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function ch(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function uh(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Xs(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=lh,t.__onConnected__=ch,t.__onDisconnected__=uh;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(r=>r(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(r=>r(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(r=>r(this))}}function hh(t){return t.trim().replace(/^this\./,"")}function Jn(t,e){if(!e)return;const s=e.split(".").filter(Boolean);if(s.length===0)return;let r=t;for(const i of s){if(r==null||typeof r!="object")return;r=r[i]}return r}function dh(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Lt(t,e,s){let r=!1;const i=(l,h)=>{const g=hh(h),x=Jn(t,g);return dh(x,s)?(r=!0,""):`${x}`},n=e.replace(/\$\{([^}]+)\}/g,i).replace(/\{\$([^}]+)\}/g,i).trim();if(r||!n.length)return{ready:!1,path:null};const o=n.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:n}}function Ht(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const r of e){let i;for(;(i=r.exec(t))!==null;){const n=(i[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function Na(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const ei=new WeakMap,ti=new Set;let xr=null;const ph=8;function fh(t){let e=ei.get(t);return e||(e=new Map,ei.set(t,e)),e}function mh(t,e){const s=new Set;for(const[r,i]of e){const n=Jn(t,r);Object.is(i.lastValue,n)||(i.lastValue=n,i.onChangeHandlers.forEach(o=>s.add(o)))}return s}function gh(){xr=null;let t=0,e=!0;for(;e&&t<ph;){e=!1,t+=1;for(const s of ti){const r=ei.get(s);if(!r||r.size===0)continue;const i=mh(s,r);i.size!==0&&(e=!0,i.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),ti.size>0&&Fa()}function Fa(){xr===null&&(xr=requestAnimationFrame(gh))}function bh(){ti.size===0&&xr!==null&&(cancelAnimationFrame(xr),xr=null)}function Ts(t,e,s,r,i){const n=String(r),o=fh(s);let l=o.get(n);return l||(l={lastValue:Jn(s,n),onChangeHandlers:new Set},o.set(n,l)),l.onChangeHandlers.add(i),ti.add(s),Fa(),()=>{const h=ei.get(s);if(!h)return;const g=h.get(n);g&&(g.onChangeHandlers.delete(i),g.onChangeHandlers.size===0&&h.delete(n),h.size===0&&(ei.delete(s),ti.delete(s),bh()))}}const Hi={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},Ra={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Ls={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},ja={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function It(t){const e=t.split(".").filter(i=>i.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let r=ye.get(s);return r?(r=Qr.traverse(r,e),r):null}function yh(t,e){const s=e?.reflect??!1,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ht(t),n=i.length>0;return function(o,l){if(!o)return;Xs(o);const h=`__bind_state_${l}`,g=`__bind_${l}_publisher__`,x=s?`__bind_${l}_updating_from_publisher__`:null;if(s){const m=Object.getOwnPropertyDescriptor(o,l),f=`__bind_${l}_value__`,C=`__bind_${l}_updating_from_publisher__`,E=m&&!m.get&&!m.set?m.value:void 0;Object.defineProperty(o,l,{get(){return m?.get?m.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(T){m?.set?m.set.call(this,T):this[f]=T,!this[C]&&this[g]&&this[g].set(T)},enumerable:m?.enumerable??!0,configurable:m?.configurable??!0})}o.__onConnected__(m=>{const f=m[h]||(m[h]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(T=>T()),f.cleanupWatchers=[],f.currentPath=null;const C=T=>{if(!T){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,m[g]=null;return}if(T===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const z=It(T);if(!z){f.currentPath=null,m[g]=null;return}const U=S=>{s&&x&&(m[x]=!0),m[l]=S,s&&x&&(m[x]=!1)};z.onAssign(U),f.unsubscribePublisher=()=>{z.offAssign(U),m[g]===z&&(m[g]=null)},f.currentPath=T,m[g]=z},E=()=>{if(n){const T=Lt(m,t,r);if(!T.ready){C(null);return}C(T.path);return}C(t)};if(n)for(const T of i){const z=Ts(Hi.watcherStore,Hi.hooked,m,T,()=>E());f.cleanupWatchers.push(z)}E()}),o.__onDisconnected__(m=>{const f=m[h];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(C=>C()),f.cleanupWatchers=[],f.currentPath=null,m[g]=null)})}}function za(t,e){const s=Na(t)?t.path:t;return yh(s,e)}function Ua(t,e){const s=t.path,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ht(s);return function(n,o){Xs(n);const l=`__publish_${o}_publisher__`,h=`__publish_${o}_value__`,g=Object.getOwnPropertyDescriptor(n,o),x=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(n,o,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,h)&&x!==void 0&&(this[h]=x),this[h])},set(m){g?.set?g.set.call(this,m):this[h]=m;const f=this[l];f&&f.set(m)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0}),n.__onConnected__(m=>{const f=m,C=`__publish_state_${o}`,E=f[C]||(f[C]={cleanupWatchers:[]}),T=()=>{let z;if(i.length){const S=Lt(m,s,r);z=S.ready?S.path:null}else z=s;const U=z?It(z):void 0;if(f[l]=U??null,U&&o in m){const S=f[o];S!==void 0&&U.set(S)}};if(E.cleanupWatchers.forEach(z=>z()),E.cleanupWatchers=[],i.length)for(const z of i)E.cleanupWatchers.push(Ts(Ra.watcherStore,Ra.hooked,f,z,T));T()}),n.__onDisconnected__(m=>{const f=m,C=`__publish_state_${o}`,E=f[C];E?.cleanupWatchers&&E.cleanupWatchers.forEach(T=>T()),f[l]=void 0})}}function qa(t){return za(t)}const vh={nullish:t=>t==null,emptyString:t=>t==="",emptyObject:t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===0,emptyArray:t=>Array.isArray(t)&&t.length===0};function wh(t,e){return e.some(s=>vh[s](t))}function _h(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(i=>i!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let r=0;r<e;r++)if(wh(t[r],s.skip))return!1}return!0}function Sh(...t){return Ba({},t)}function Ba(t,e){const s=e.map(i=>{const n=Ht(i);return{originalPath:i,dynamicDependencies:n,isDynamic:n.length>0}}),r={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(i,n,o){Xs(i);const l=`__onAssign_state_${n}__`;let h;i.__onConnected__(g=>{const x=g[l]||(g[l]={cleanupWatchers:[],configurations:[]});x.cleanupWatchers.forEach(T=>T()),x.cleanupWatchers=[],x.configurations.forEach(T=>{T.unsubscribePublisher&&T.unsubscribePublisher()}),x.configurations=[];const m=[],f=[];for(let T=0;T<e.length;T++){const z=s[T],U=new Set,S=v=>{m[T]=v,_h(m,e.length,t)&&U.forEach(M=>M(...m))};f.push({publisher:null,onAssign:S,callbacks:U,unsubscribePublisher:null,pathConfig:z,index:T})}const C=(T,z)=>{if(T.unsubscribePublisher&&(T.unsubscribePublisher(),T.unsubscribePublisher=null),m[T.index]=null,T.publisher=null,!z)return;const U=It(z);U&&(U.onAssign(T.onAssign),T.unsubscribePublisher=()=>{U.offAssign(T.onAssign),T.publisher===U&&(T.publisher=null)},T.publisher=U)},E=()=>{for(const T of f)if(T.pathConfig.isDynamic){const z=Lt(g,T.pathConfig.originalPath,r);if(!z.ready){C(T,null);continue}C(T,z.path)}else C(T,T.pathConfig.originalPath)};for(const T of f)if(T.pathConfig.isDynamic)for(const z of T.pathConfig.dynamicDependencies){const U=Ts(ja.watcherStore,ja.hooked,g,z,()=>E());x.cleanupWatchers.push(U)}h=o.value.bind(g);for(const T of f)T.callbacks.add(h);E(),x.configurations=f}),i.__onDisconnected__(g=>{const x=g[l];x&&(x.cleanupWatchers.forEach(m=>m()),x.cleanupWatchers=[],x.configurations.forEach(m=>{m.unsubscribePublisher&&m.unsubscribePublisher(),m.callbacks.delete(h)}),x.configurations=[])})}}function Ph(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function xh(...t){const e=t[t.length-1],s=e!==void 0&&!Ph(e),r=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return Ba({dispatchWhenUndefined:!r.waitForAllDefined,skip:r.skip,skipEmptyPlaceholder:r.skipEmptyPlaceholder},n)}function Ah(){return function(t,e,s){let r=0;const i=s.value,n=t.constructor.prototype.disconnectedCallback;t.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=t.connectedCallback;t.connectedCallback=function(){o?.call(this),this[e]()},s.value=function(...l){let h=new Set;const g=()=>{r++;const m=r;window.queueMicrotask(()=>{m===r&&this[e]()})};h.forEach(m=>{m.offAssign(g)}),Wo();const x=i.apply(this,l);return h=Ko()||new Set,h.forEach(m=>{m.onAssign(g,!1)}),this.__removeAutoSubscribe__=()=>{h.forEach(m=>{m.offAssign(g)})},x}}}function Ch(t){return function(e){Xs(e);for(const s of t){const r=s.split(".");if(r.length===0)continue;const i=r.shift()||"";let n=ye.get(i);n=Qr.traverse(n,r),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function kh(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function $h(t){const e=t.parentNode||(t.getRootNode()?.host??null);return e instanceof Element?e:null}function Ha(t,e,s,r){const i=t,n=ze.getAncestorAttributeValue(t,e);!r.assignNull&&n===null||Object.is(i[s],n)||(i[s]=n)}const ve=class ve{static subscribe(e,s,r,i={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:r,syncOptions:i,watchedAncestors:[],parentForReparent:null};return ve.subscriptions.add(n),ve.bindSubscription(n),()=>{ve.unsubscribe(n)}}static bindSubscription(e){ve.unbindWatchers(e);const s=kh(e.component);e.watchedAncestors=s;for(const i of s)ve.addAttrSlot(i,e.attributeName,e);const r=$h(e.component);e.parentForReparent=r,r&&ve.addParentSlot(r,e),ve.pendingRefresh.add(e),ve.scheduleRefresh()}static unbindWatchers(e){for(const s of e.watchedAncestors)ve.removeAttrSlot(s,e.attributeName,e);e.watchedAncestors=[],e.parentForReparent&&(ve.removeParentSlot(e.parentForReparent,e),e.parentForReparent=null)}static addAttrSlot(e,s,r){let i=ve.attrSlots.get(e);i||(i=new Map,ve.attrSlots.set(e,i));let n=i.get(s);if(!n){const o=ze.scopeAttributeNames(s),l=new Set,h=new MutationObserver(()=>{for(const g of l)ve.subscriptions.has(g)&&ve.pendingRefresh.add(g);ve.scheduleRefresh()});h.observe(e,{attributes:!0,attributeFilter:o}),n={observer:h,subscriptions:l},i.set(s,n)}n.subscriptions.add(r)}static removeAttrSlot(e,s,r){const i=ve.attrSlots.get(e);if(!i)return;const n=i.get(s);n&&(n.subscriptions.delete(r),!(n.subscriptions.size>0)&&(n.observer.disconnect(),i.delete(s)))}static addParentSlot(e,s){let r=ve.parentSlots.get(e);if(!r){const n=new Map,o=new MutationObserver(l=>{const h=new Set;for(const g of l)g.removedNodes.forEach(x=>{x instanceof Element&&h.add(x)}),g.addedNodes.forEach(x=>{x instanceof Element&&h.add(x)});for(const g of h){const x=n.get(g);if(x)for(const m of[...x])ve.subscriptions.has(m)&&ve.bindSubscription(m)}});o.observe(e,{childList:!0}),r={observer:o,byComponent:n},ve.parentSlots.set(e,r)}let i=r.byComponent.get(s.component);i||(i=new Set,r.byComponent.set(s.component,i)),i.add(s)}static removeParentSlot(e,s){const r=ve.parentSlots.get(e);if(!r)return;const i=r.byComponent.get(s.component);i&&(i.delete(s),i.size===0&&r.byComponent.delete(s.component)),!(r.byComponent.size>0)&&(r.observer.disconnect(),ve.parentSlots.delete(e))}static unsubscribe(e){ve.subscriptions.has(e)&&(ve.unbindWatchers(e),ve.subscriptions.delete(e),ve.pendingRefresh.delete(e),ve.subscriptions.size===0&&ve.cancelScheduledRefresh())}static scheduleRefresh(){ve.pendingRefresh.size!==0&&ve.animationFrameId===null&&(ve.animationFrameId=requestAnimationFrame(()=>{ve.flushRefresh()}))}static cancelScheduledRefresh(){ve.animationFrameId!==null&&(cancelAnimationFrame(ve.animationFrameId),ve.animationFrameId=null),ve.pendingRefresh.clear()}static flushRefresh(){ve.animationFrameId=null;const e=Array.from(ve.pendingRefresh);ve.pendingRefresh.clear();for(const s of e)ve.subscriptions.has(s)&&Ha(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};ve.subscriptions=new Set,ve.pendingRefresh=new Set,ve.animationFrameId=null,ve.attrSlots=new WeakMap,ve.parentSlots=new WeakMap;let Qn=ve;function Xn(t,e){const s=e?.dynamic??!1,r=s;return function(i,n){if(!i||(Xs(i),i.__onBeforeConnected__(l=>{Ha(l,t,n,{assignNull:r})}),!s))return;let o=null;i.__onConnected__(l=>{o=Qn.subscribe(l,t,n,{assignNull:!0})}),i.__onDisconnected__(()=>{o?.(),o=null})}}var Dh=Object.defineProperty,Eh=Object.getOwnPropertyDescriptor,er=(t,e,s,r)=>{for(var i=r>1?void 0:r?Eh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Dh(e,s,i),i};const eo=t=>u(t),Oh="sonic-icon";let ys=class extends Q{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Zn.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(t){(t.has("name")||t.has("prefix")||t.has("library")||this.library==="custom"&&(t.has("customIconLibraryPath")||t.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:ee}};ys.styles=Z`
547
547
  :host {
548
548
  line-height: 0.1em;
549
549
  width: fit-content;
@@ -593,7 +593,7 @@
593
593
  :host([size="3xl"]) svg {
594
594
  --_sc-icon-size: 2.8em;
595
595
  }
596
- `,er([xe()],vs.prototype,"iconText",2),er([Xn({type:String})],vs.prototype,"name",2),er([Xn({type:String})],vs.prototype,"prefix",2),er([Xn({type:String})],vs.prototype,"library",2),er([Qn("customIconLibraryPath",{dynamic:!0}),xe()],vs.prototype,"customIconLibraryPath",2),er([Qn("customIconDefaultPrefix",{dynamic:!0}),xe()],vs.prototype,"customIconDefaultPrefix",2),vs=er([X(Eh)],vs);function eo(t){return t?t instanceof Object?t:He(t):ee}const Ha=new WeakMap;function Oh(t){const e=Ha.get(t);if(e)return e;const s=new CSSStyleSheet;return s.replaceSync(t.cssText),Ha.set(t,s),s}function Th(t){return t instanceof An}function to(t){return t?(Array.isArray(t)?t:[t]).flatMap(s=>Array.isArray(s)?to(s):s instanceof CSSStyleSheet?[s]:Th(s)?[Oh(s)]:[]):[]}Aa();const si=Z`
596
+ `,er([xe()],ys.prototype,"iconText",2),er([eo({type:String})],ys.prototype,"name",2),er([eo({type:String})],ys.prototype,"prefix",2),er([eo({type:String})],ys.prototype,"library",2),er([Xn("customIconLibraryPath",{dynamic:!0}),xe()],ys.prototype,"customIconLibraryPath",2),er([Xn("customIconDefaultPrefix",{dynamic:!0}),xe()],ys.prototype,"customIconDefaultPrefix",2),ys=er([X(Oh)],ys);function to(t){return t?t instanceof Object?t:He(t):ee}const Va=new WeakMap;function Th(t){const e=Va.get(t);if(e)return e;const s=new CSSStyleSheet;return s.replaceSync(t.cssText),Va.set(t,s),s}function Lh(t){return t instanceof Cn}function so(t){return t?(Array.isArray(t)?t:[t]).flatMap(s=>Array.isArray(s)?so(s):s instanceof CSSStyleSheet?[s]:Lh(s)?[Th(s)]:[]):[]}Ca();const si=Z`
597
597
  .custom-scroll {
598
598
  overflow: auto !important;
599
599
  overflow-y: overlay !important;
@@ -615,7 +615,7 @@
615
615
  border: solid 0.15rem transparent;
616
616
  }
617
617
  }
618
- `;function Va(t){try{const e=JSON.parse(localStorage.getItem(t)||"{}");return e&&typeof e=="object"?e:{}}catch{return{}}}function Wa(t,e){return!!Va(t)[e]}function Ka(t,e){const s=Va(t);s[e]=!0;try{localStorage.setItem(t,JSON.stringify(s))}catch{}}const Ga="sonic-toast-dismissed";function Ya(t){return Wa(Ga,t)}function Lh(t){Ka(Ga,t)}const Ih=new Set(["en","fr","de","nl","es","it"]);function ri(t,e){const s=(ze.getLanguage()??"en").split("-")[0].toLowerCase();return Ih.has(s)&&t[s]?t[s]:t.en}const is={closeWindow:{en:"Close window",fr:"Fermer la fenêtre",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar ventana",it:"Chiudi finestra"},closeAlert:{en:"Close",fr:"Fermer",de:"Schließen",nl:"Sluiten",es:"Cerrar",it:"Chiudi"},showPassword:{en:"Show password",fr:"Afficher le mot de passe",de:"Passwort anzeigen",nl:"Wachtwoord tonen",es:"Mostrar contraseña",it:"Mostra password"},hidePassword:{en:"Hide password",fr:"Masquer le mot de passe",de:"Passwort ausblenden",nl:"Wachtwoord verbergen",es:"Ocultar contraseña",it:"Nascondi password"},closeToast:{en:"Close notification",fr:"Fermer la notification",de:"Benachrichtigung schließen",nl:"Melding sluiten",es:"Cerrar notificación",it:"Chiudi notifica"},closeToastError:{en:"Close error message",fr:"Fermer le message d'erreur",de:"Fehlermeldung schließen",nl:"Foutmelding sluiten",es:"Cerrar mensaje de error",it:"Chiudi messaggio di errore"},closeToastWarning:{en:"Close warning",fr:"Fermer l'avertissement",de:"Warnung schließen",nl:"Waarschuwing sluiten",es:"Cerrar advertencia",it:"Chiudi avviso"},closeToastSuccess:{en:"Close success message",fr:"Fermer le message de succès",de:"Erfolgsmeldung schließen",nl:"Succesmelding sluiten",es:"Cerrar mensaje de éxito",it:"Chiudi messaggio di successo"},closeToastInfo:{en:"Close information message",fr:"Fermer l'information",de:"Information schließen",nl:"Informatie sluiten",es:"Cerrar información",it:"Chiudi informazione"},loading:{en:"Loading",fr:"Chargement en cours",de:"Wird geladen",nl:"Laden",es:"Cargando",it:"Caricamento in corso"}},Mh={error:is.closeToastError,warning:is.closeToastWarning,success:is.closeToastSuccess,info:is.closeToastInfo};function Nh(t){const e=t?Mh[t]:void 0;return ri(e??is.closeToast)}const Vi={default:"info-empty",info:"info-empty",success:"check-circled-outline",warning:"warning-circled-outline",error:"warning-circled-outline"};function so(t){if(t)return t==="danger"?"error":t in Vi?t:void 0}function Za(t){return t==="error"?"alert":"status"}function Ja(t){return t==="error"?null:"polite"}const Qa=Z`
618
+ `;function Wa(t){try{const e=JSON.parse(localStorage.getItem(t)||"{}");return e&&typeof e=="object"?e:{}}catch{return{}}}function Ka(t,e){return!!Wa(t)[e]}function Ga(t,e){const s=Wa(t);s[e]=!0;try{localStorage.setItem(t,JSON.stringify(s))}catch{}}const Ya="sonic-toast-dismissed";function Za(t){return Ka(Ya,t)}function Ih(t){Ga(Ya,t)}const Mh=new Set(["en","fr","de","nl","es","it"]);function ri(t,e){const s=(ze.getLanguage()??"en").split("-")[0].toLowerCase();return Mh.has(s)&&t[s]?t[s]:t.en}const is={closeWindow:{en:"Close window",fr:"Fermer la fenêtre",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar ventana",it:"Chiudi finestra"},closeAlert:{en:"Close",fr:"Fermer",de:"Schließen",nl:"Sluiten",es:"Cerrar",it:"Chiudi"},showPassword:{en:"Show password",fr:"Afficher le mot de passe",de:"Passwort anzeigen",nl:"Wachtwoord tonen",es:"Mostrar contraseña",it:"Mostra password"},hidePassword:{en:"Hide password",fr:"Masquer le mot de passe",de:"Passwort ausblenden",nl:"Wachtwoord verbergen",es:"Ocultar contraseña",it:"Nascondi password"},closeToast:{en:"Close notification",fr:"Fermer la notification",de:"Benachrichtigung schließen",nl:"Melding sluiten",es:"Cerrar notificación",it:"Chiudi notifica"},closeToastError:{en:"Close error message",fr:"Fermer le message d'erreur",de:"Fehlermeldung schließen",nl:"Foutmelding sluiten",es:"Cerrar mensaje de error",it:"Chiudi messaggio di errore"},closeToastWarning:{en:"Close warning",fr:"Fermer l'avertissement",de:"Warnung schließen",nl:"Waarschuwing sluiten",es:"Cerrar advertencia",it:"Chiudi avviso"},closeToastSuccess:{en:"Close success message",fr:"Fermer le message de succès",de:"Erfolgsmeldung schließen",nl:"Succesmelding sluiten",es:"Cerrar mensaje de éxito",it:"Chiudi messaggio di successo"},closeToastInfo:{en:"Close information message",fr:"Fermer l'information",de:"Information schließen",nl:"Informatie sluiten",es:"Cerrar información",it:"Chiudi informazione"},loading:{en:"Loading",fr:"Chargement en cours",de:"Wird geladen",nl:"Laden",es:"Cargando",it:"Caricamento in corso"}},Nh={error:is.closeToastError,warning:is.closeToastWarning,success:is.closeToastSuccess,info:is.closeToastInfo};function Fh(t){const e=t?Nh[t]:void 0;return ri(e??is.closeToast)}const Vi={default:"info-empty",info:"info-empty",success:"check-circled-outline",warning:"warning-circled-outline",error:"warning-circled-outline"};function ro(t){if(t)return t==="danger"?"error":t in Vi?t:void 0}function Ja(t){return t==="error"?"alert":"status"}function Qa(t){return t==="error"?null:"polite"}const Xa=Z`
619
619
  :host {
620
620
  --sc-_color: var(--sc-base-content, #000);
621
621
  color: var(--sc-_color);
@@ -665,7 +665,7 @@
665
665
  .inherit-color {
666
666
  color: var(--sc-_color);
667
667
  }
668
- `,Xa=Z`
668
+ `,el=Z`
669
669
  :host([type="default"][invert]) {
670
670
  --sc-_color: var(--sc-base, #fff);
671
671
  --sc-_bg: color-mix(
@@ -722,7 +722,7 @@
722
722
  var(--sc-base-content, #000)
723
723
  );
724
724
  }
725
- `,el=Z`
725
+ `,tl=Z`
726
726
  :host {
727
727
  --sc-_bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
728
728
  --sc-_color: var(--sc-base-content, #000);
@@ -785,7 +785,7 @@
785
785
  .inherit-bg {
786
786
  color: inherit;
787
787
  }
788
- `;var Fh=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,Mt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Fh(e,s,i),i};const tl=6e3,jh="sonic-toast-item";let vt=class extends Q{constructor(){super(...arguments),this.label="",this.id="",this.text="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.useSlot=!1,this.visible=!0,this._titleId="",this._dismissed=!1,this._adoptedStyleSheets=[],this._hideRemaining=tl,this._hideStartedAt=0,this._hovered=!1,this._focused=!1,this._hidden=!1,this._onMouseEnter=()=>{this._hovered=!0,this._syncHideTimer()},this._onMouseLeave=()=>{this._hovered=!1,this._syncHideTimer()},this._onFocusIn=()=>{this._focused=!0,this._syncHideTimer()},this._onFocusOut=t=>{this.contains(t.relatedTarget)||(this._focused=!1,this._syncHideTimer())}}connectedCallback(){super.connectedCallback(),this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)}disconnectedCallback(){this._clearHideTimer(),this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),super.disconnectedCallback()}willUpdate(t){(t.has("dismissForever")||t.has("id"))&&(this._dismissed=this.dismissForever&&!!this.id&&Ya(this.id)),super.willUpdate(t)}getAriaRole(){return Za(so(this.status)??"default")}getAriaLive(){return Ja(so(this.status)??"default")}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}render(){if(this._dismissed||!this.visible)return ee;const t=this.label?this.getTitleId():void 0,e=!this.label&&typeof this.text=="string"?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return R`<div
788
+ `;var Rh=Object.defineProperty,jh=Object.getOwnPropertyDescriptor,Mt=(t,e,s,r)=>{for(var i=r>1?void 0:r?jh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Rh(e,s,i),i};const sl=6e3,zh="sonic-toast-item";let yt=class extends Q{constructor(){super(...arguments),this.label="",this.id="",this.text="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.useSlot=!1,this.visible=!0,this._titleId="",this._dismissed=!1,this._adoptedStyleSheets=[],this._hideRemaining=sl,this._hideStartedAt=0,this._hovered=!1,this._focused=!1,this._hidden=!1,this._onMouseEnter=()=>{this._hovered=!0,this._syncHideTimer()},this._onMouseLeave=()=>{this._hovered=!1,this._syncHideTimer()},this._onFocusIn=()=>{this._focused=!0,this._syncHideTimer()},this._onFocusOut=t=>{this.contains(t.relatedTarget)||(this._focused=!1,this._syncHideTimer())}}connectedCallback(){super.connectedCallback(),this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)}disconnectedCallback(){this._clearHideTimer(),this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),super.disconnectedCallback()}willUpdate(t){(t.has("dismissForever")||t.has("id"))&&(this._dismissed=this.dismissForever&&!!this.id&&Za(this.id)),super.willUpdate(t)}getAriaRole(){return Ja(ro(this.status)??"default")}getAriaLive(){return Qa(ro(this.status)??"default")}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}render(){if(this._dismissed||!this.visible)return ee;const t=this.label?this.getTitleId():void 0,e=!this.label&&typeof this.text=="string"?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return R`<div
789
789
  class="sonic-toast ${this.ghost?"ghost":""}"
790
790
  role=${this.getAriaRole()}
791
791
  aria-live=${s||ee}
@@ -793,7 +793,7 @@
793
793
  aria-label=${e||ee}
794
794
  >
795
795
  <button
796
- aria-label=${Nh(this.status)}
796
+ aria-label=${Fh(this.status)}
797
797
  class="sonic-toast-close"
798
798
  @click=${()=>this.hide()}
799
799
  >
@@ -804,7 +804,7 @@
804
804
  style="max-height: ${this.maxHeight} ;"
805
805
  >
806
806
  ${this.status&&R`<sonic-icon
807
- name=${Vi[so(this.status)??"default"]}
807
+ name=${Vi[ro(this.status)??"default"]}
808
808
  class="sonic-toast-icon"
809
809
  size="xl"
810
810
  aria-hidden="true"
@@ -812,13 +812,13 @@
812
812
 
813
813
  <div class="sonic-toast-text">
814
814
  ${this.label?R`<div class="sonic-toast-title" id=${t}>
815
- ${eo(this.label)}
815
+ ${to(this.label)}
816
816
  </div>`:""}
817
- ${this.useSlot?ee:eo(this.text)}
817
+ ${this.useSlot?ee:to(this.text)}
818
818
  <slot></slot>
819
819
  </div>
820
820
  </div>
821
- </div>`}updated(t){t.has("styleSheet")&&this.syncAdoptedStyleSheets(),(t.has("preserve")||t.has("visible")||t.has("_dismissed"))&&this._syncHideTimer()}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=to(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}hide(){this._clearHideTimer(),this._hidden=!0,gs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever&&Lh(this.id),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this._hidden=!1,this._hideRemaining=tl,this.visible=!0,this._syncHideTimer()}_syncHideTimer(){if(!(!this.preserve&&this.visible&&!this._hidden&&!this._dismissed&&!this._hovered&&!this._focused)){this._pauseHideTimer();return}this._hideTimer||(this._hideStartedAt=Date.now(),this._hideTimer=setTimeout(()=>{this._hideTimer=void 0,this.hide()},this._hideRemaining))}_pauseHideTimer(){this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=void 0,this._hideRemaining=Math.max(0,this._hideRemaining-(Date.now()-this._hideStartedAt)))}_clearHideTimer(){clearTimeout(this._hideTimer),this._hideTimer=void 0}};vt.styles=[si,Qa,Z`
821
+ </div>`}updated(t){t.has("styleSheet")&&this.syncAdoptedStyleSheets(),(t.has("preserve")||t.has("visible")||t.has("_dismissed"))&&this._syncHideTimer()}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=so(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}hide(){this._clearHideTimer(),this._hidden=!0,gs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever&&Ih(this.id),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this._hidden=!1,this._hideRemaining=sl,this.visible=!0,this._syncHideTimer()}_syncHideTimer(){if(!(!this.preserve&&this.visible&&!this._hidden&&!this._dismissed&&!this._hovered&&!this._focused)){this._pauseHideTimer();return}this._hideTimer||(this._hideStartedAt=Date.now(),this._hideTimer=setTimeout(()=>{this._hideTimer=void 0,this.hide()},this._hideRemaining))}_pauseHideTimer(){this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=void 0,this._hideRemaining=Math.max(0,this._hideRemaining-(Date.now()-this._hideStartedAt)))}_clearHideTimer(){clearTimeout(this._hideTimer),this._hideTimer=void 0}};yt.styles=[si,Xa,Z`
822
822
  * {
823
823
  box-sizing: border-box;
824
824
  }
@@ -969,7 +969,7 @@
969
969
  opacity: 0.85;
970
970
  pointer-events: none;
971
971
  }
972
- `],Mt([u()],vt.prototype,"label",2),Mt([u({type:String})],vt.prototype,"id",2),Mt([u()],vt.prototype,"text",2),Mt([u({type:String,reflect:!0})],vt.prototype,"status",2),Mt([u({type:Boolean})],vt.prototype,"ghost",2),Mt([u({type:Boolean})],vt.prototype,"preserve",2),Mt([u({type:Boolean})],vt.prototype,"dismissForever",2),Mt([u({type:String})],vt.prototype,"maxHeight",2),Mt([u({type:Boolean})],vt.prototype,"useSlot",2),Mt([u({attribute:!1})],vt.prototype,"styleSheet",2),Mt([xe()],vt.prototype,"visible",2),Mt([xe()],vt.prototype,"_titleId",2),Mt([xe()],vt.prototype,"_dismissed",2),vt=Mt([X(jh)],vt);const zh=Z`
972
+ `],Mt([u()],yt.prototype,"label",2),Mt([u({type:String})],yt.prototype,"id",2),Mt([u()],yt.prototype,"text",2),Mt([u({type:String,reflect:!0})],yt.prototype,"status",2),Mt([u({type:Boolean})],yt.prototype,"ghost",2),Mt([u({type:Boolean})],yt.prototype,"preserve",2),Mt([u({type:Boolean})],yt.prototype,"dismissForever",2),Mt([u({type:String})],yt.prototype,"maxHeight",2),Mt([u({type:Boolean})],yt.prototype,"useSlot",2),Mt([u({attribute:!1})],yt.prototype,"styleSheet",2),Mt([xe()],yt.prototype,"visible",2),Mt([xe()],yt.prototype,"_titleId",2),Mt([xe()],yt.prototype,"_dismissed",2),yt=Mt([X(zh)],yt);const Uh=Z`
973
973
  :host {
974
974
  /* ROUNDED*/
975
975
  --sc-rounded-sm: calc(var(--sc-rounded, 0px) * 0.5);
@@ -1017,7 +1017,7 @@
1017
1017
  --sc-contrast-content: #fff;
1018
1018
  --sc-contrast: #000000;
1019
1019
  }
1020
- `,sl=Z`
1020
+ `,rl=Z`
1021
1021
  --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
1022
1022
  --sc-info: var(--sc-dark-info, #3abff8);
1023
1023
  --sc-danger: var(--sc-dark-danger, #f87272);
@@ -1042,11 +1042,11 @@
1042
1042
  --sc-base-800: var(--sc-dark-base-800, #d9dce0);
1043
1043
  --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
1044
1044
  --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
1045
- `,Uh=Z`
1045
+ `,qh=Z`
1046
1046
  :host([theme="dark"]) {
1047
- ${sl}
1047
+ ${rl}
1048
1048
  }
1049
- `,rl=Z`
1049
+ `,il=Z`
1050
1050
  /*Boutons*/
1051
1051
  --sc-primary: var(--sc-base-800);
1052
1052
  --sc-info: #2563eb;
@@ -1073,21 +1073,21 @@
1073
1073
  --sc-base-800: #1e293b;
1074
1074
  --sc-base-900: #0f172a;
1075
1075
  --sc-base-content: var(--sc-base-700);
1076
- `,qh=Z`
1076
+ `,Bh=Z`
1077
1077
  :host([theme="light"]) {
1078
- ${rl}
1078
+ ${il}
1079
1079
  }
1080
- `,Bh=Z`
1080
+ `,Hh=Z`
1081
1081
  :host([theme="auto"]) {
1082
- ${rl}
1082
+ ${il}
1083
1083
  }
1084
1084
 
1085
1085
  @media (prefers-color-scheme: dark) {
1086
1086
  :host([theme="auto"]) {
1087
- ${sl}
1087
+ ${rl}
1088
1088
  }
1089
1089
  }
1090
- `;var Hh=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,Ki=(t,e,s,r)=>{for(var i=r>1?void 0:r?Vh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Hh(e,s,i),i};const il="sonic-theme";let at=class extends Q{constructor(){super(...arguments),this.onWindowMessage=t=>this.receiveMessage(t),this.color=!1,this.font=!1}static adoptPopContainerInstance(t){at.instance=void 0;const e=document.querySelectorAll(il);for(let s=e.length-1;s>=0;s--){const r=e[s];if(r!==t&&r instanceof at&&r.isConnected){at.instance=r;return}}}static getPopContainer(){return at.instance?.isConnected?at.instance:(at.adoptPopContainerInstance(),at.instance??document.body)}connectedCallback(){super.connectedCallback(),at.instance=this,window.addEventListener("message",this.onWindowMessage,!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}disconnectedCallback(){window.removeEventListener("message",this.onWindowMessage,!1),at.instance===this&&at.adoptPopContainerInstance(this),super.disconnectedCallback()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let i=0;i<e;i++){const n=t[i];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const r={variables:this.getCssVariables(),fonts:s};ve.get("sonic-theme")?.set(r),document.querySelectorAll("iframe").forEach(i=>i.contentWindow?.postMessage({type:"SonicTheme",...r},"*"))}receiveMessage(t){const e=t.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const t=[],e=[...at.styles.map(i=>i.styleSheet),...Array.from(document.styleSheets)];for(const i of e)try{if(!i)continue;const n=i.cssRules;for(const o of n){if(!("style"in o))continue;const l=o.style;for(const h of l)t.includes(h)||h.indexOf("--sc")!==0||t.push(h)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),r={};return t.forEach(i=>r[i]=s.getPropertyValue(i)),r}render(){return R`<slot></slot>`}};at.styles=[qh,Uh,Bh,zh,Z`
1090
+ `;var Vh=Object.defineProperty,Wh=Object.getOwnPropertyDescriptor,Ki=(t,e,s,r)=>{for(var i=r>1?void 0:r?Wh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Vh(e,s,i),i};const nl="sonic-theme";let at=class extends Q{constructor(){super(...arguments),this.onWindowMessage=t=>this.receiveMessage(t),this.color=!1,this.font=!1}static adoptPopContainerInstance(t){at.instance=void 0;const e=document.querySelectorAll(nl);for(let s=e.length-1;s>=0;s--){const r=e[s];if(r!==t&&r instanceof at&&r.isConnected){at.instance=r;return}}}static getPopContainer(){return at.instance?.isConnected?at.instance:(at.adoptPopContainerInstance(),at.instance??document.body)}connectedCallback(){super.connectedCallback(),at.instance=this,window.addEventListener("message",this.onWindowMessage,!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}disconnectedCallback(){window.removeEventListener("message",this.onWindowMessage,!1),at.instance===this&&at.adoptPopContainerInstance(this),super.disconnectedCallback()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let i=0;i<e;i++){const n=t[i];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const r={variables:this.getCssVariables(),fonts:s};ye.get("sonic-theme")?.set(r),document.querySelectorAll("iframe").forEach(i=>i.contentWindow?.postMessage({type:"SonicTheme",...r},"*"))}receiveMessage(t){const e=t.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const t=[],e=[...at.styles.map(i=>i.styleSheet),...Array.from(document.styleSheets)];for(const i of e)try{if(!i)continue;const n=i.cssRules;for(const o of n){if(!("style"in o))continue;const l=o.style;for(const h of l)t.includes(h)||h.indexOf("--sc")!==0||t.push(h)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),r={};return t.forEach(i=>r[i]=s.getPropertyValue(i)),r}render(){return R`<slot></slot>`}};at.styles=[Bh,qh,Hh,Uh,Z`
1091
1091
  :host([color]) {
1092
1092
  color: var(--sc-base-content, #000);
1093
1093
  }
@@ -1119,12 +1119,12 @@
1119
1119
  transition-property: scale, opacity;
1120
1120
  transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1121
1121
  }
1122
- `],Ki([u({type:String,reflect:!0})],at.prototype,"theme",2),Ki([u({type:Boolean,reflect:!0})],at.prototype,"color",2),Ki([u({type:Boolean,reflect:!0})],at.prototype,"font",2),at=Ki([X(il)],at);var Wh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,nl=(t,e,s,r)=>{for(var i=r>1?void 0:r?Kh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Wh(e,s,i),i};let ol=!1;function al(t){if(t.label!==void 0)return t.label;if(t.title!==void 0)return ol||(ol=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),t.title}const Gh="sonic-toast";let Se=class extends Q{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const e=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return e||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"45ch",flexDirection:"column-reverse"}),Se.handleExistingToastDelegation(),this.toasts?R`<div style=${$t(s)}>
1122
+ `],Ki([u({type:String,reflect:!0})],at.prototype,"theme",2),Ki([u({type:Boolean,reflect:!0})],at.prototype,"color",2),Ki([u({type:Boolean,reflect:!0})],at.prototype,"font",2),at=Ki([X(nl)],at);var Kh=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,ol=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Kh(e,s,i),i};let al=!1;function ll(t){if(t.label!==void 0)return t.label;if(t.title!==void 0)return al||(al=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),t.title}const Yh="sonic-toast";let Se=class extends Q{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const e=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return e||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"45ch",flexDirection:"column-reverse"}),Se.handleExistingToastDelegation(),this.toasts?R`<div style=${$t(s)}>
1123
1123
  ${qi(this.toasts,r=>r.id,r=>R`
1124
1124
  <sonic-toast-item
1125
1125
  maxHeight=${e?"none":"10rem"}
1126
1126
  status=${se(r.status)}
1127
- .label=${al(r)}
1127
+ .label=${ll(r)}
1128
1128
  .text=${r.useSlot?void 0:r.text}
1129
1129
  .styleSheet=${r.styleSheet}
1130
1130
  ?useSlot=${r.useSlot}
@@ -1133,31 +1133,31 @@
1133
1133
  ?preserve=${r.preserve}
1134
1134
  id=${se(r.id)}
1135
1135
  @hide=${()=>this.removeItem(r)}
1136
- ${sh({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})}
1136
+ ${rh({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})}
1137
1137
  >
1138
- ${r.useSlot?eo(r.text):ee}
1138
+ ${r.useSlot?to(r.text):ee}
1139
1139
  </sonic-toast-item>
1140
1140
  `)}
1141
- </div>`:ee}static removeAll(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.ghost))}static removeItemsByStatus(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.status!==e))}static removeItemById(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.id!==e))}static removeTemporaryItems(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.preserve))}static getInstance(){return Se.instance||(Se.instance=document.createElement("sonic-toast"),at.getPopContainer().prepend(Se.instance)),Se.instance}static add(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:e},"*");return}const s=Se.getInstance(),r=e.id??new Date().valueOf(),i=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof e.text=="string"&&i.test(e.text),o={id:r,text:e.text,label:al(e),status:e.status,preserve:n?!0:e.preserve,ghost:e.ghost,dismissForever:e.dismissForever,styleSheet:e.styleSheet,useSlot:e.useSlot};if(e.dismissForever&&e.id&&Ya(e.id))return null;if(s?.toasts.length){const l={...o};for(const h of s.toasts){const g={...h};if(l.id=g.id=0,ut.shallowEqual(l,g))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const e=Se.getInstance();window.parent.postMessage({type:"addToasts",toasts:e.toasts},"*"),e.toasts=[]}static removeItem(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:e},"*");return}const s=Se.getInstance();s&&s.removeItem(e)}removeItem(e){e&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!ut.shallowEqual(s,e,!1))))}};Se.delegateToasts=!1,nl([u({type:Array})],Se.prototype,"toasts",2),Se=nl([X(Gh)],Se),typeof window<"u"&&(window[wi+"Toast"]=window[wi+"Toast"]||Se);function Yh(){const t=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&Se.removeItemsByStatus(s.data.status),s.data.type=="removeItemById"&&Se.removeItemById(s.data.id),s.data.type=="removeTemporaryItems"&&Se.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(Se.delegateToasts=!0,Se.handleExistingToastDelegation()),s.data.type=="addToasts"&&(Se.getInstance().toasts=[...Se.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&Se.removeAll(),s.data.type=="removeToast"&&Se.removeItem(s.data.toast),s.data.type=="addToast"&&Se.add(s.data.toast)},e=window.parent!=window;if(window.addEventListener("message",t,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const s of document.querySelectorAll("iframe"))s.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}Yh();var Zh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,ii=(t,e,s,r)=>{for(var i=r>1?void 0:r?Jh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Zh(e,s,i),i};const Qh=new Set,Xh=new Set,ed=t=>{for(const e of Xh)e(t)},ro=new Set;let io=0;yn(async()=>{io++;const t=io,e=Array.from(ro);for(;e.length>0;){if(t!=io)return;const s=e.splice(0,4);await Promise.all(s.map(r=>r.refetch()))}});const no=(t,e)=>{class s extends t{constructor(...i){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(i){super.props=i}set endPoint(i){this._endPoint=i,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 Os(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await ve.getInstance().isLocalStrorageReady,!this.isConnected))return;const i=ve.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,ut.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||"",i)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||Qh.add(this),ed(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&Se.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 l=o._sonic_http_response_,h=this.key.split(".");o=ut.traverse(o,h,this.hasAttribute("preserveOtherKeys")),o&&ut.isObject(o)&&l&&(o._sonic_http_response_=l)}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(),ro.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"),ro.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 i=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*i,window.innerHeight*i)+"px",threshold:.9};this.iObserver=new IntersectionObserver(h=>this.onIntersection(h),n);let l=[...(this.shadowRoot?this.shadowRoot:this).children].filter(h=>h.nodeName.toLowerCase()!="style")[0];if(l?.nodeName.toLocaleLowerCase()=="slot"&&(l=[...l.children].filter(h=>h.nodeName.toLowerCase()!="style")[0]),!l||l.nodeName.toLocaleLowerCase()=="template"){l=document.createElement("div");const h=l.style;h.pointerEvents="none",h.width="1px",h.height="1px",this.lazyLoadPlaceHolder=l,this.appendChild(l)}l?this.iObserver.observe(l):this.isFirstLoad&&this._fetchData()}onIntersection(i){for(const n of i)if(n.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return ii([u()],s.prototype,"noErrorsRecordings",2),ii([u()],s.prototype,"props",1),ii([u({type:String})],s.prototype,"endPoint",1),ii([u()],s.prototype,"requestId",2),ii([u({type:Number})],s.prototype,"refetchEveryMs",2),s};var td=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,tr=(t,e,s,r)=>{for(var i=r>1?void 0:r?sd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&td(e,s,i),i};const Gi=t=>{class e extends t{constructor(...r){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();i&&(i.isFormValid=!1),r.reportValidity()}set type(r){this.hasAttribute("type")&&!this.forceAutoFill&&(r=this.getAttribute("type")),this._type=r,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(r){this.hasAttribute("description")&&!this.forceAutoFill&&(r=this.getAttribute("description")),this._description=r,this.requestUpdate()}get label(){return this._label}set label(r){this.hasAttribute("label")&&!this.forceAutoFill&&(r=this.getAttribute("label")),this._label=r,this.requestUpdate()}}return tr([u()],e.prototype,"forceAutoFill",2),tr([u({type:String})],e.prototype,"type",1),tr([u()],e.prototype,"description",1),tr([u()],e.prototype,"label",1),tr([u({type:String,reflect:!0})],e.prototype,"status",2),tr([u({type:Number})],e.prototype,"tabindex",2),tr([u({type:String})],e.prototype,"autocomplete",2),e},ll=no,rd=Wn,cl=_r,ul=Gi,sr=Tt,oo=Yr;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:ll,FormCheckable:rd,FormElement:cl,FormInput:ul,Subscriber:sr,TemplatesContainer:oo};/**
1141
+ </div>`:ee}static removeAll(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.ghost))}static removeItemsByStatus(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.status!==e))}static removeItemById(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.id!==e))}static removeTemporaryItems(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.preserve))}static getInstance(){return Se.instance||(Se.instance=document.createElement("sonic-toast"),at.getPopContainer().prepend(Se.instance)),Se.instance}static add(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:e},"*");return}const s=Se.getInstance(),r=e.id??new Date().valueOf(),i=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof e.text=="string"&&i.test(e.text),o={id:r,text:e.text,label:ll(e),status:e.status,preserve:n?!0:e.preserve,ghost:e.ghost,dismissForever:e.dismissForever,styleSheet:e.styleSheet,useSlot:e.useSlot};if(e.dismissForever&&e.id&&Za(e.id))return null;if(s?.toasts.length){const l={...o};for(const h of s.toasts){const g={...h};if(l.id=g.id=0,ut.shallowEqual(l,g))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const e=Se.getInstance();window.parent.postMessage({type:"addToasts",toasts:e.toasts},"*"),e.toasts=[]}static removeItem(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:e},"*");return}const s=Se.getInstance();s&&s.removeItem(e)}removeItem(e){e&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!ut.shallowEqual(s,e,!1))))}};Se.delegateToasts=!1,ol([u({type:Array})],Se.prototype,"toasts",2),Se=ol([X(Yh)],Se),typeof window<"u"&&(window[wi+"Toast"]=window[wi+"Toast"]||Se);function Zh(){const t=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&Se.removeItemsByStatus(s.data.status),s.data.type=="removeItemById"&&Se.removeItemById(s.data.id),s.data.type=="removeTemporaryItems"&&Se.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(Se.delegateToasts=!0,Se.handleExistingToastDelegation()),s.data.type=="addToasts"&&(Se.getInstance().toasts=[...Se.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&Se.removeAll(),s.data.type=="removeToast"&&Se.removeItem(s.data.toast),s.data.type=="addToast"&&Se.add(s.data.toast)},e=window.parent!=window;if(window.addEventListener("message",t,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const s of document.querySelectorAll("iframe"))s.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}Zh();var Jh=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,ii=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Jh(e,s,i),i};const Xh=new Set,ed=new Set,td=t=>{for(const e of ed)e(t)},io=new Set;let no=0;vn(async()=>{no++;const t=no,e=Array.from(io);for(;e.length>0;){if(t!=no)return;const s=e.splice(0,4);await Promise.all(s.map(r=>r.refetch()))}});const oo=(t,e)=>{class s extends t{constructor(...i){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(i){super.props=i}set endPoint(i){this._endPoint=i,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 Os(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await ye.getInstance().isLocalStrorageReady,!this.isConnected))return;const i=ye.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,ut.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||"",i)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||Xh.add(this),td(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&Se.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 l=o._sonic_http_response_,h=this.key.split(".");o=ut.traverse(o,h,this.hasAttribute("preserveOtherKeys")),o&&ut.isObject(o)&&l&&(o._sonic_http_response_=l)}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(),io.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"),io.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 i=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*i,window.innerHeight*i)+"px",threshold:.9};this.iObserver=new IntersectionObserver(h=>this.onIntersection(h),n);let l=[...(this.shadowRoot?this.shadowRoot:this).children].filter(h=>h.nodeName.toLowerCase()!="style")[0];if(l?.nodeName.toLocaleLowerCase()=="slot"&&(l=[...l.children].filter(h=>h.nodeName.toLowerCase()!="style")[0]),!l||l.nodeName.toLocaleLowerCase()=="template"){l=document.createElement("div");const h=l.style;h.pointerEvents="none",h.width="1px",h.height="1px",this.lazyLoadPlaceHolder=l,this.appendChild(l)}l?this.iObserver.observe(l):this.isFirstLoad&&this._fetchData()}onIntersection(i){for(const n of i)if(n.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return ii([u()],s.prototype,"noErrorsRecordings",2),ii([u()],s.prototype,"props",1),ii([u({type:String})],s.prototype,"endPoint",1),ii([u()],s.prototype,"requestId",2),ii([u({type:Number})],s.prototype,"refetchEveryMs",2),s};var sd=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,tr=(t,e,s,r)=>{for(var i=r>1?void 0:r?rd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&sd(e,s,i),i};const Gi=t=>{class e extends t{constructor(...r){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();i&&(i.isFormValid=!1),r.reportValidity()}set type(r){this.hasAttribute("type")&&!this.forceAutoFill&&(r=this.getAttribute("type")),this._type=r,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(r){this.hasAttribute("description")&&!this.forceAutoFill&&(r=this.getAttribute("description")),this._description=r,this.requestUpdate()}get label(){return this._label}set label(r){this.hasAttribute("label")&&!this.forceAutoFill&&(r=this.getAttribute("label")),this._label=r,this.requestUpdate()}}return tr([u()],e.prototype,"forceAutoFill",2),tr([u({type:String})],e.prototype,"type",1),tr([u()],e.prototype,"description",1),tr([u()],e.prototype,"label",1),tr([u({type:String,reflect:!0})],e.prototype,"status",2),tr([u({type:Number})],e.prototype,"tabindex",2),tr([u({type:String})],e.prototype,"autocomplete",2),e},cl=oo,id=Kn,ul=_r,hl=Gi,sr=Tt,ao=Yr;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:cl,FormCheckable:id,FormElement:ul,FormInput:hl,Subscriber:sr,TemplatesContainer:ao};/**
1142
1142
  * @license
1143
1143
  * Copyright 2020 Google LLC
1144
1144
  * SPDX-License-Identifier: BSD-3-Clause
1145
- */const ns=Es(class extends yr{constructor(t){if(super(t),t.type!==Zs.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?zt:(this.vt=t,document.importNode(t.content,!0))}});var id=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,hl=(t,e,s,r)=>{for(var i=r>1?void 0:r?nd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&id(e,s,i),i};const od="sonic-fetch";let Yi=class extends no(Tt(oo(Q))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return ee;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?ns(t):ee}render(){return R`
1145
+ */const ns=Es(class extends vr{constructor(t){if(super(t),t.type!==Zs.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?zt:(this.vt=t,document.importNode(t.content,!0))}});var nd=Object.defineProperty,od=Object.getOwnPropertyDescriptor,dl=(t,e,s,r)=>{for(var i=r>1?void 0:r?od(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&nd(e,s,i),i};const ad="sonic-fetch";let Yi=class extends oo(Tt(ao(Q))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return ee;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?ns(t):ee}render(){return R`
1146
1146
  ${this.renderSkeleton()} ${this.renderLoader()}
1147
1147
  ${this.isLoading?ee:R`<slot></slot>`}
1148
1148
  `}};Yi.styles=[Z`
1149
1149
  :host {
1150
1150
  display: contents;
1151
1151
  }
1152
- `],hl([u()],Yi.prototype,"loader",2),Yi=hl([X(od)],Yi);var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,dl=(t,e,s,r)=>{for(var i=r>1?void 0:r?ld(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ad(e,s,i),i};const cd="sonic-if";let Zi=class extends Q{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?R` <slot></slot> `:ee}};Zi.styles=Z`
1152
+ `],dl([u()],Yi.prototype,"loader",2),Yi=dl([X(ad)],Yi);var ld=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,pl=(t,e,s,r)=>{for(var i=r>1?void 0:r?cd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ld(e,s,i),i};const ud="sonic-if";let Zi=class extends Q{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?R` <slot></slot> `:ee}};Zi.styles=Z`
1153
1153
  :host {
1154
1154
  display: contents;
1155
1155
  }
1156
- `,dl([u({type:Boolean})],Zi.prototype,"condition",2),Zi=dl([X(cd)],Zi);/**
1156
+ `,pl([u({type:Boolean})],Zi.prototype,"condition",2),Zi=pl([X(ud)],Zi);/**
1157
1157
  * @license
1158
1158
  * Copyright 2018 Google LLC
1159
1159
  * SPDX-License-Identifier: BSD-3-Clause
1160
- */const Ji=Es(class extends yr{constructor(t){if(super(t),t.type!==Zs.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const s=t.element.classList;for(const r of this.st)r in e||(s.remove(r),this.st.delete(r));for(const r in e){const i=!!e[r];i===this.st.has(r)||this.nt?.has(r)||(i?(s.add(r),this.st.add(r)):(s.remove(r),this.st.delete(r)))}return zt}}),ud=Z`
1160
+ */const Ji=Es(class extends vr{constructor(t){if(super(t),t.type!==Zs.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const s=t.element.classList;for(const r of this.st)r in e||(s.remove(r),this.st.delete(r));for(const r in e){const i=!!e[r];i===this.st.has(r)||this.nt?.has(r)||(i?(s.add(r),this.st.add(r)):(s.remove(r),this.st.delete(r)))}return zt}}),hd=Z`
1161
1161
  :host([align="left"]) .sonic-loader--inline {
1162
1162
  margin-left: 0;
1163
1163
  }
@@ -1224,7 +1224,7 @@
1224
1224
  transform: translate(24px, 0);
1225
1225
  }
1226
1226
  }
1227
- `,hd=Z`
1227
+ `,dd=Z`
1228
1228
  @keyframes sonic-loader--fixed {
1229
1229
  0% {
1230
1230
  transform: scale(0);
@@ -1272,12 +1272,12 @@
1272
1272
  animation: sonic-loader--fixed 1s linear infinite;
1273
1273
  animation-fill-mode: both;
1274
1274
  }
1275
- `;var dd=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,Qi=(t,e,s,r)=>{for(var i=r>1?void 0:r?pd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&dd(e,s,i),i};const pl="sonic-loader";let lt=class extends Q{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1,this.announce=!1}static show(t={}){lt.loader||(lt.loader=document.createElement(pl));const e=lt.loader,s=t.container??at.getPopContainer(),r=t.container?t.mode??"fixed":"fixed",i=t.noDelay??!1;e.mode=r,e.noDelay=i,e.announce=t.announce??!1,s.appendChild(e),lt.callCounter++}static hide(){lt.callCounter<=0||(lt.callCounter--,!(lt.callCounter>0)&&lt.loader?.remove())}willUpdate(t){t.has("announce")&&this._syncAnnounceA11y()}_syncAnnounceA11y(){if(!this.announce){this.removeAttribute("role"),this.removeAttribute("aria-live"),this.removeAttribute("aria-label");return}this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.setAttribute("aria-label",ri(is.loading))}render(){const t={"sonic-loader":!0,[`sonic-loader--${this.mode}`]:!0,"sonic-loader--nodelay":this.noDelay};return R`<div aria-hidden="true" class=${Ji(t)}>
1275
+ `;var pd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,Qi=(t,e,s,r)=>{for(var i=r>1?void 0:r?fd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&pd(e,s,i),i};const fl="sonic-loader";let lt=class extends Q{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1,this.announce=!1}static show(t={}){lt.loader||(lt.loader=document.createElement(fl));const e=lt.loader,s=t.container??at.getPopContainer(),r=t.container?t.mode??"fixed":"fixed",i=t.noDelay??!1;e.mode=r,e.noDelay=i,e.announce=t.announce??!1,s.appendChild(e),lt.callCounter++}static hide(){lt.callCounter<=0||(lt.callCounter--,!(lt.callCounter>0)&&lt.loader?.remove())}willUpdate(t){t.has("announce")&&this._syncAnnounceA11y()}_syncAnnounceA11y(){if(!this.announce){this.removeAttribute("role"),this.removeAttribute("aria-live"),this.removeAttribute("aria-label");return}this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.setAttribute("aria-label",ri(is.loading))}render(){const t={"sonic-loader":!0,[`sonic-loader--${this.mode}`]:!0,"sonic-loader--nodelay":this.noDelay};return R`<div aria-hidden="true" class=${Ji(t)}>
1276
1276
  <div></div>
1277
1277
  <div></div>
1278
1278
  <div></div>
1279
1279
  <div></div>
1280
- </div>`}};lt.styles=[ud,hd,Z`
1280
+ </div>`}};lt.styles=[hd,dd,Z`
1281
1281
  :host {
1282
1282
  --sc-_loader-bg: var(--sc-primary, currentColor);
1283
1283
  pointer-events: none;
@@ -1305,7 +1305,7 @@
1305
1305
  opacity: 1;
1306
1306
  }
1307
1307
  }
1308
- `],lt.loader=null,lt.callCounter=0,Qi([u({type:String})],lt.prototype,"mode",2),Qi([u({type:Boolean})],lt.prototype,"noDelay",2),Qi([u({type:Boolean,reflect:!0})],lt.prototype,"announce",2),lt=Qi([X(pl)],lt);var fd=Object.getOwnPropertyDescriptor,md=(t,e,s,r)=>{for(var i=r>1?void 0:r?fd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const gd="sonic-subscriber";let fl=class extends Tt(Q){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return R`<slot></slot> `}};fl=md([X(gd)],fl);var bd=Object.defineProperty,vd=Object.getOwnPropertyDescriptor,Xt=(t,e,s,r)=>{for(var i=r>1?void 0:r?vd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&bd(e,s,i),i};const yd="sonic-list";let Vt=class extends no(Tt(Yr(Q))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(t){typeof t!="function"&&t!==void 0||(this._items=t,this.requestUpdate())}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!(this.isLoading&&this.loader!==void 0)||this.templateParts.skeleton)return ee;const e=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${e}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const t=this.templateParts.skeleton;return this.isLoading&&t?ns(t):ee}renderSeparator(){if(this.separator)return this.separator();const t=this.templateParts.separator;return t?ns(t):ee}renderLoadingState(){return R`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return R` <div
1308
+ `],lt.loader=null,lt.callCounter=0,Qi([u({type:String})],lt.prototype,"mode",2),Qi([u({type:Boolean})],lt.prototype,"noDelay",2),Qi([u({type:Boolean,reflect:!0})],lt.prototype,"announce",2),lt=Qi([X(fl)],lt);var md=Object.getOwnPropertyDescriptor,gd=(t,e,s,r)=>{for(var i=r>1?void 0:r?md(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const bd="sonic-subscriber";let ml=class extends Tt(Q){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return R`<slot></slot> `}};ml=gd([X(bd)],ml);var yd=Object.defineProperty,vd=Object.getOwnPropertyDescriptor,Xt=(t,e,s,r)=>{for(var i=r>1?void 0:r?vd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&yd(e,s,i),i};const wd="sonic-list";let Vt=class extends oo(Tt(Yr(Q))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(t){typeof t!="function"&&t!==void 0||(this._items=t,this.requestUpdate())}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!(this.isLoading&&this.loader!==void 0)||this.templateParts.skeleton)return ee;const e=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${e}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const t=this.templateParts.skeleton;return this.isLoading&&t?ns(t):ee}renderSeparator(){if(this.separator)return this.separator();const t=this.templateParts.separator;return t?ns(t):ee}renderLoadingState(){return R`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return R` <div
1309
1309
  style="color: var(--sc-base-400);
1310
1310
  font-size: 1.5em;
1311
1311
  margin: 4rem 0;
@@ -1329,7 +1329,7 @@
1329
1329
  >
1330
1330
  ${this.items(t,e)}
1331
1331
  </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!ut.isObject(this.props))return R`<div></div>`;const r=this.formatProps();if((r?.length||0)==0){if(this.noItems)return this.noItems();if(this.templateParts["no-items"]=this.templateParts["no-items"]||this.templateParts["no-item"],this.templateParts["no-items"])return ns(this.templateParts["no-items"])}const i=this.templateList.length;let n=-1;const o=this.hasAttribute("extractValues"),l=this.renderSeparator(),h=r?.length||0,g=r?.slice(this.offset,this.offset+this.limit);return R`
1332
- ${g?.map((x,m)=>{if(x==null)return ee;let f=m,C=null;if(typeof x=="object"&&!Array.isArray(x)){o&&(f=x?.key);const M=x[this.templateKey];M&&typeof M=="string"&&(C=this.templateParts[M])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return ee;const E=m>=h-1,T=m%2,z=this.publisher[f],U={key:f,even:T==0,odd:T==1,onlyChild:h==1,firstChild:m==0,lastChild:E};z._key_=f+"";const S=z._metadata_?.get();(S?.key!==U.key||S?.even!==U.even||S?.odd!==U.odd||S?.onlyChild!==U.onlyChild||S?.firstChild!==U.firstChild||S?.lastChild!==U.lastChild)&&(z._metadata_={...S||{},...U});const y=this.handleProgrammaticTemplates(x,U,f);return y?R`${y}${E?ee:l}`:(n++,C&&(n=-1),R`
1332
+ ${g?.map((x,m)=>{if(x==null)return ee;let f=m,C=null;if(typeof x=="object"&&!Array.isArray(x)){o&&(f=x?.key);const M=x[this.templateKey];M&&typeof M=="string"&&(C=this.templateParts[M])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return ee;const E=m>=h-1,T=m%2,z=this.publisher[f],U={key:f,even:T==0,odd:T==1,onlyChild:h==1,firstChild:m==0,lastChild:E};z._key_=f+"";const S=z._metadata_?.get();(S?.key!==U.key||S?.even!==U.even||S?.odd!==U.odd||S?.onlyChild!==U.onlyChild||S?.firstChild!==U.firstChild||S?.lastChild!==U.lastChild)&&(z._metadata_={...S||{},...U});const v=this.handleProgrammaticTemplates(x,U,f);return v?R`${v}${E?ee:l}`:(n++,C&&(n=-1),R`
1333
1333
  <sonic-subscriber
1334
1334
  ?debug=${this.defferedDebug===!0}
1335
1335
  .bindPublisher=${function(){return z}}
@@ -1340,12 +1340,12 @@
1340
1340
  </sonic-subscriber>
1341
1341
  ${E?ee:l}
1342
1342
  `)})}
1343
- `}};Xt([u({type:Object})],Vt.prototype,"itemPropertyMap",2),Xt([u({type:String})],Vt.prototype,"templateKey",2),Xt([u({type:String})],Vt.prototype,"idKey",2),Xt([u()],Vt.prototype,"loader",2),Xt([u()],Vt.prototype,"limit",2),Xt([u()],Vt.prototype,"offset",2),Xt([u({type:Function,attribute:!1})],Vt.prototype,"items",1),Xt([u({type:Function,attribute:!1})],Vt.prototype,"noItems",2),Xt([u({type:Function,attribute:!1})],Vt.prototype,"skeleton",2),Xt([u({type:Function,attribute:!1})],Vt.prototype,"separator",2),Vt=Xt([X(yd)],Vt);/**
1343
+ `}};Xt([u({type:Object})],Vt.prototype,"itemPropertyMap",2),Xt([u({type:String})],Vt.prototype,"templateKey",2),Xt([u({type:String})],Vt.prototype,"idKey",2),Xt([u()],Vt.prototype,"loader",2),Xt([u()],Vt.prototype,"limit",2),Xt([u()],Vt.prototype,"offset",2),Xt([u({type:Function,attribute:!1})],Vt.prototype,"items",1),Xt([u({type:Function,attribute:!1})],Vt.prototype,"noItems",2),Xt([u({type:Function,attribute:!1})],Vt.prototype,"skeleton",2),Xt([u({type:Function,attribute:!1})],Vt.prototype,"separator",2),Vt=Xt([X(wd)],Vt);/**
1344
1344
  * @license
1345
1345
  * Copyright 2021 Google LLC
1346
1346
  * SPDX-License-Identifier: BSD-3-Clause
1347
- */function*ml(t,e){if(t!==void 0){let s=0;for(const r of t)yield e(r,s++)}}var wd=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,pt=(t,e,s,r)=>{for(var i=r>1?void 0:r?_d(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&wd(e,s,i),i};const Sd="sonic-queue";let rt=class extends Tt(Q){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.loader="inline",this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),r=this.filterPublisher?.get(),i=this.filteredFields.split(" ");for(const o in r){let l=r[o];Array.isArray(l)&&(l=l.filter(h=>h!==null)),!(this.filteredFields&&i.includes(o)||l==null||l.toString()==="")&&s.set(o,r[o].toString())}const n=s.toString();if(!(n==this.searchHash&&!this.isFirstRequest)){this.searchHash=n,Ru(this.resolveScrollRoot(),{x:0,y:0});for(const o of this.listDataProviders)ve.getInstance().delete(o);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const o=this.resultCount;this.props=null,this.requestId++,this.resultCount=o,await ve.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.scrollRoot=null,this.scrollSyncActive=!1,this.mutationObserver=null,this.restoreGeneration=0,this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)ve.getInstance().delete(t),this.listDataProviders=[];this.filterPublisher?.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.teardownScrollSync(),this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=rt.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=gs.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.ensureScrollSync(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await ve.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const t=this.getAncestorAttributeValue("dataFilterProvider");if(!t){this.next();return}this.filterPublisher=ve.getInstance().get(t),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}resolveScrollRoot(){const t=gs.getScrollingAncestor(this);return!t||t===document.documentElement||t===document.body?window:t}isSafari(){return ms()}ensureScrollSync(){if(!ms()||!this.isConnected)return;const t=this.resolveScrollRoot();this.scrollRoot=t,Qs(t),!this.scrollSyncActive&&(this.scrollSyncActive=!0,this.mutationObserver=new MutationObserver(()=>{this.scheduleRestoreAfterChildren()}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}))}teardownScrollSync(){this.restoreGeneration++,this.mutationObserver?.disconnect(),this.mutationObserver=null,this.scrollSyncActive=!1,this.scrollRoot=null}scheduleRestoreAfterChildren(){if(!ms()||!this.isConnected)return;const t=++this.restoreGeneration;(async()=>{if(await this.updateComplete,t!==this.restoreGeneration||!this.isConnected)return;const e=Array.from(this.querySelectorAll("sonic-list"));if(e.length&&await Promise.all(e.map(r=>r.updateComplete)),t!==this.restoreGeneration||!this.isConnected||(await new Promise(r=>requestAnimationFrame(()=>r())),await new Promise(r=>requestAnimationFrame(()=>r())),t!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();Qs(s),zn(s)})()}updated(t){if(ms()){this.ensureScrollSync();const e=this.scrollRoot??this.resolveScrollRoot();zn(e),this.scheduleRestoreAfterChildren()}super.updated(t)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(t){let e=this.offset;const r=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(this.publisher.lastFetchedData=t.detail.fetchedData,t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props?.length||0,!t.detail.isFirstLoad||!t.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const m=this.props,f=m[m.length-1];e=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const m=[];m.resultCount=this.resultCount,m.lastFetchedData=t?.detail.fetchedData||{},this.props=m}r>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/r*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let i=this.dataProviderExpression.replace("$offset",e+"").replace("$limit",this.limit+"");const n=i.split("?");let o=n.shift();const l=new URLSearchParams(n.join("?")),h=this.filterPublisher?.get(),g=this.filteredFields.split(" ");for(const m in h)this.filteredFields&&g.includes(m)||h[m]==null||h[m]==""||l.set(m,h[m]);this.searchHash||(this.searchHash=l.toString()),o=o+"?"+l.toString(),i=i+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(i);const x=[...this.props,{id:l.toString()+"/"+this.props.length,dataProvider:i,endPoint:o,offset:e,limit:this.limit}];x.resultCount=this.resultCount,x.lastFetchedData=t?.detail.fetchedData||{},this.props=x,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return ee;let t=!this.noLazyload;return this.props.length==1&&(t=!1),this.style.display="block",R`
1348
- ${ml(this.props,(e,s)=>{const r=s==0?this.templates:this.templates?.filter(i=>i.getAttribute("data-value")!="no-item");return R`
1347
+ */function*gl(t,e){if(t!==void 0){let s=0;for(const r of t)yield e(r,s++)}}var _d=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,pt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Sd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&_d(e,s,i),i};const Pd="sonic-queue";let rt=class extends Tt(Q){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.loader="inline",this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),r=this.filterPublisher?.get(),i=this.filteredFields.split(" ");for(const o in r){let l=r[o];Array.isArray(l)&&(l=l.filter(h=>h!==null)),!(this.filteredFields&&i.includes(o)||l==null||l.toString()==="")&&s.set(o,r[o].toString())}const n=s.toString();if(!(n==this.searchHash&&!this.isFirstRequest)){this.searchHash=n,ju(this.resolveScrollRoot(),{x:0,y:0});for(const o of this.listDataProviders)ye.getInstance().delete(o);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const o=this.resultCount;this.props=null,this.requestId++,this.resultCount=o,await ye.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.scrollRoot=null,this.scrollSyncActive=!1,this.mutationObserver=null,this.restoreGeneration=0,this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)ye.getInstance().delete(t),this.listDataProviders=[];this.filterPublisher?.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.teardownScrollSync(),this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=rt.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=gs.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.ensureScrollSync(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await ye.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const t=this.getAncestorAttributeValue("dataFilterProvider");if(!t){this.next();return}this.filterPublisher=ye.getInstance().get(t),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}resolveScrollRoot(){const t=gs.getScrollingAncestor(this);return!t||t===document.documentElement||t===document.body?window:t}isSafari(){return ms()}ensureScrollSync(){if(!ms()||!this.isConnected)return;const t=this.resolveScrollRoot();this.scrollRoot=t,Qs(t),!this.scrollSyncActive&&(this.scrollSyncActive=!0,this.mutationObserver=new MutationObserver(()=>{this.scheduleRestoreAfterChildren()}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}))}teardownScrollSync(){this.restoreGeneration++,this.mutationObserver?.disconnect(),this.mutationObserver=null,this.scrollSyncActive=!1,this.scrollRoot=null}scheduleRestoreAfterChildren(){if(!ms()||!this.isConnected)return;const t=++this.restoreGeneration;(async()=>{if(await this.updateComplete,t!==this.restoreGeneration||!this.isConnected)return;const e=Array.from(this.querySelectorAll("sonic-list"));if(e.length&&await Promise.all(e.map(r=>r.updateComplete)),t!==this.restoreGeneration||!this.isConnected||(await new Promise(r=>requestAnimationFrame(()=>r())),await new Promise(r=>requestAnimationFrame(()=>r())),t!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();Qs(s),Un(s)})()}updated(t){if(ms()){this.ensureScrollSync();const e=this.scrollRoot??this.resolveScrollRoot();Un(e),this.scheduleRestoreAfterChildren()}super.updated(t)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(t){let e=this.offset;const r=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(this.publisher.lastFetchedData=t.detail.fetchedData,t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props?.length||0,!t.detail.isFirstLoad||!t.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const m=this.props,f=m[m.length-1];e=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const m=[];m.resultCount=this.resultCount,m.lastFetchedData=t?.detail.fetchedData||{},this.props=m}r>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/r*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let i=this.dataProviderExpression.replace("$offset",e+"").replace("$limit",this.limit+"");const n=i.split("?");let o=n.shift();const l=new URLSearchParams(n.join("?")),h=this.filterPublisher?.get(),g=this.filteredFields.split(" ");for(const m in h)this.filteredFields&&g.includes(m)||h[m]==null||h[m]==""||l.set(m,h[m]);this.searchHash||(this.searchHash=l.toString()),o=o+"?"+l.toString(),i=i+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(i);const x=[...this.props,{id:l.toString()+"/"+this.props.length,dataProvider:i,endPoint:o,offset:e,limit:this.limit}];x.resultCount=this.resultCount,x.lastFetchedData=t?.detail.fetchedData||{},this.props=x,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return ee;let t=!this.noLazyload;return this.props.length==1&&(t=!1),this.style.display="block",R`
1348
+ ${gl(this.props,(e,s)=>{const r=s==0?this.templates:this.templates?.filter(i=>i.getAttribute("data-value")!="no-item");return R`
1349
1349
  <sonic-list
1350
1350
  fetch
1351
1351
  loader="${this.loader}"
@@ -1371,40 +1371,40 @@
1371
1371
  >
1372
1372
  </sonic-list>
1373
1373
  `})}
1374
- `}};rt.instanceCounter=0,pt([u({type:Array})],rt.prototype,"templates",2),pt([u({type:Function,attribute:!1})],rt.prototype,"items",2),pt([u({type:Function,attribute:!1})],rt.prototype,"noItems",2),pt([u({type:Function,attribute:!1})],rt.prototype,"skeleton",2),pt([u({type:Object})],rt.prototype,"itemPropertyMap",2),pt([u()],rt.prototype,"cache",2),pt([u()],rt.prototype,"targetRequestDuration",2),pt([u()],rt.prototype,"limit",2),pt([u()],rt.prototype,"lazyBoundsRatio",2),pt([u()],rt.prototype,"offset",2),pt([u()],rt.prototype,"resultCount",2),pt([u({type:Boolean})],rt.prototype,"noLazyload",2),pt([u({type:String})],rt.prototype,"loader",2),pt([u()],rt.prototype,"filteredFields",2),pt([u({type:String})],rt.prototype,"dataProviderExpression",2),pt([u({type:Boolean})],rt.prototype,"invalidateOnPageShow",2),pt([u({type:String})],rt.prototype,"idKey",2),rt=pt([X(Sd)],rt);var Pd=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,Ar=(t,e,s,r)=>{for(var i=r>1?void 0:r?xd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Pd(e,s,i),i};const Ad="sonic-submit";let Is=class extends Tt(Q){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async t=>{if(this.disabled||t instanceof KeyboardEvent&&t.key!=="Enter")return;t instanceof MouseEvent&&t.stopPropagation();const e=ve.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid.set(!0),e.invalidateForm(),!e.isFormValid.get())return;if(this.disabled=!0,lt.show(),e.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),lt.hide(),this.disabled=!1;return}const r=this.getAttribute("method")?.toLocaleLowerCase()||"post",i=this.hasAttribute("sendAsFormData"),n={...e.get()};delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),l=o?ve.getInstance().get(o):null;let h={};l&&(h={...l.get()});let g=null;const x=this.getAncestorAttributeValue("dataProvider"),m=this.endPoint||x,f=async()=>{const E={...n};if(delete E.needsCaptchaValidation,delete h.needsCaptchaValidation,i)g=await this.api?.submitFormData(m,E,r,h);else switch(r){case"put":g=await this.api?.put(m,E,h);break;case"patch":g=await this.api?.patch(m,E,h);break;case"delete":g=await this.api?.delete(m,E,h);break;case"get":const y=new URLSearchParams;if(E)for(const k in E)y.append(k,E[k]);const M="?"+y.toString();g=await this.api?.get(m+M,h);break;default:g=await this.api?.post(m,E,h);break}lt.hide(),g?g._sonic_http_response_&&!g._sonic_http_response_.ok&&Object.keys(g).length===1&&(g.messages=[{content:"Network Error",status:"error"}]):g={messages:[{content:"Network Error",status:"error"}]};const T=this.getAncestorAttributeValue("clearedDataOnSuccess");T&&T.split(" ").forEach(y=>ve.get(y).set({}));const z=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",U=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&E[z]&&E[U]&&this.saveCredentials(E[z],E[U]),this.submitResultKey&&(g=ut.traverse(g,this.submitResultKey.split("."),!0));const S=this.getAncestorAttributeValue("submitResultDataProvider");S&&ve.get(S).set(g),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:g,bubbles:!0,composed:!0}))},C=l?.needsCaptchaValidation.get()?l:e.needsCaptchaValidation.get()?e:null;if(C){C.captchaToken.set("request_token");const E=T=>{T!="request_token"?(f(),C.captchaToken.offAssign(E)):(lt.hide(),this.disabled=!1)};C.captchaToken.onAssign(E)}else f()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Os(this.getApiConfiguration())}submitNativeForm(){const t=gs.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s={...ve.get(e).get()};delete s.needsCaptchaValidation;for(const i in s){if(i=="isFormValid")continue;let n=t.querySelector('input[name="'+i+'"], select[name="'+i+'"], textarea[name="'+i+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=i,t.appendChild(n));let o=s[i];Array.isArray(o)&&(o=o.join(",")),n.type==="checkbox"||n.type==="radio"?o&&(n.checked=!0):n.value=o}const r=document.createElement("input");r.name=this.name,r.style.display="none",r.value=this.value,r.type="submit",t.appendChild(r),r&&r.click()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return R`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Is.styles=Z`
1374
+ `}};rt.instanceCounter=0,pt([u({type:Array})],rt.prototype,"templates",2),pt([u({type:Function,attribute:!1})],rt.prototype,"items",2),pt([u({type:Function,attribute:!1})],rt.prototype,"noItems",2),pt([u({type:Function,attribute:!1})],rt.prototype,"skeleton",2),pt([u({type:Object})],rt.prototype,"itemPropertyMap",2),pt([u()],rt.prototype,"cache",2),pt([u()],rt.prototype,"targetRequestDuration",2),pt([u()],rt.prototype,"limit",2),pt([u()],rt.prototype,"lazyBoundsRatio",2),pt([u()],rt.prototype,"offset",2),pt([u()],rt.prototype,"resultCount",2),pt([u({type:Boolean})],rt.prototype,"noLazyload",2),pt([u({type:String})],rt.prototype,"loader",2),pt([u()],rt.prototype,"filteredFields",2),pt([u({type:String})],rt.prototype,"dataProviderExpression",2),pt([u({type:Boolean})],rt.prototype,"invalidateOnPageShow",2),pt([u({type:String})],rt.prototype,"idKey",2),rt=pt([X(Pd)],rt);var xd=Object.defineProperty,Ad=Object.getOwnPropertyDescriptor,Ar=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ad(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&xd(e,s,i),i};const Cd="sonic-submit";let Is=class extends Tt(Q){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async t=>{if(this.disabled||t instanceof KeyboardEvent&&t.key!=="Enter")return;t instanceof MouseEvent&&t.stopPropagation();const e=ye.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid.set(!0),e.invalidateForm(),!e.isFormValid.get())return;if(this.disabled=!0,lt.show(),e.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),lt.hide(),this.disabled=!1;return}const r=this.getAttribute("method")?.toLocaleLowerCase()||"post",i=this.hasAttribute("sendAsFormData"),n={...e.get()};delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),l=o?ye.getInstance().get(o):null;let h={};l&&(h={...l.get()});let g=null;const x=this.getAncestorAttributeValue("dataProvider"),m=this.endPoint||x,f=async()=>{const E={...n};if(delete E.needsCaptchaValidation,delete h.needsCaptchaValidation,i)g=await this.api?.submitFormData(m,E,r,h);else switch(r){case"put":g=await this.api?.put(m,E,h);break;case"patch":g=await this.api?.patch(m,E,h);break;case"delete":g=await this.api?.delete(m,E,h);break;case"get":const v=new URLSearchParams;if(E)for(const k in E)v.append(k,E[k]);const M="?"+v.toString();g=await this.api?.get(m+M,h);break;default:g=await this.api?.post(m,E,h);break}lt.hide(),g?g._sonic_http_response_&&!g._sonic_http_response_.ok&&Object.keys(g).length===1&&(g.messages=[{content:"Network Error",status:"error"}]):g={messages:[{content:"Network Error",status:"error"}]};const T=this.getAncestorAttributeValue("clearedDataOnSuccess");T&&T.split(" ").forEach(v=>ye.get(v).set({}));const z=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",U=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&E[z]&&E[U]&&this.saveCredentials(E[z],E[U]),this.submitResultKey&&(g=ut.traverse(g,this.submitResultKey.split("."),!0));const S=this.getAncestorAttributeValue("submitResultDataProvider");S&&ye.get(S).set(g),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:g,bubbles:!0,composed:!0}))},C=l?.needsCaptchaValidation.get()?l:e.needsCaptchaValidation.get()?e:null;if(C){C.captchaToken.set("request_token");const E=T=>{T!="request_token"?(f(),C.captchaToken.offAssign(E)):(lt.hide(),this.disabled=!1)};C.captchaToken.onAssign(E)}else f()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Os(this.getApiConfiguration())}submitNativeForm(){const t=gs.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s={...ye.get(e).get()};delete s.needsCaptchaValidation;for(const i in s){if(i=="isFormValid")continue;let n=t.querySelector('input[name="'+i+'"], select[name="'+i+'"], textarea[name="'+i+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=i,t.appendChild(n));let o=s[i];Array.isArray(o)&&(o=o.join(",")),n.type==="checkbox"||n.type==="radio"?o&&(n.checked=!0):n.value=o}const r=document.createElement("input");r.name=this.name,r.style.display="none",r.value=this.value,r.type="submit",t.appendChild(r),r&&r.click()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return R`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Is.styles=Z`
1375
1375
  [data-disabled] {
1376
1376
  opacity: 0.3;
1377
1377
  pointer-events: none;
1378
1378
  user-select: none;
1379
1379
  }
1380
- `,Ar([u({type:String})],Is.prototype,"submitResultKey",2),Ar([u({type:Boolean})],Is.prototype,"disabled",2),Ar([u({type:String})],Is.prototype,"endPoint",2),Ar([u()],Is.prototype,"name",2),Ar([u()],Is.prototype,"value",2),Is=Ar([X(Ad)],Is);var Cd=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,ni=(t,e,s,r)=>{for(var i=r>1?void 0:r?kd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Cd(e,s,i),i};const $d="sonic-router";let Cr=class extends Yr(Q){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){dt.onChange(this),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const t=new URL(this.location,document.location.origin);return t.pathname+t.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const t=[];for(let[e,s]of Object.entries(this.routes)){if(e==="fallback"||!s)continue;const r=new RegExp(this.regExpBasePath+e);if(r.test(this.cleanLocation)){const i=r.exec(this.cleanLocation)||[e];i.shift(),t.push(s([...i]))}else try{const n=new fs(this.patternBasePath+e).match(this.cleanLocation);if(n){const o=n||{};t.push(s(o))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&this.routes?.fallback&&this.isConnected&&t.push(this.routes.fallback()),t}render(){const t=this.handleroutes();if(t.length>0)return R`${t}`;const e=[];for(const s of this.templatePartsList){const r=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+r).test(this.cleanLocation))e.push(s);else try{new fs(this.patternBasePath+r+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),e.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+r.replace(document.location.origin,""))!=-1&&e.push(s)}}if(e.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(r=>r.hasAttribute("data-fallback"));s&&e.push(s)}return R`${qi(e,(s,r)=>r+new Date().getTime(),s=>{if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let r="";const i=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new fs("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");r=new fs(i).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),o=(this.cleanLocation+"").match(n);o&&(r=o.shift()?.replace(n,i)||"")}return R`<div
1380
+ `,Ar([u({type:String})],Is.prototype,"submitResultKey",2),Ar([u({type:Boolean})],Is.prototype,"disabled",2),Ar([u({type:String})],Is.prototype,"endPoint",2),Ar([u()],Is.prototype,"name",2),Ar([u()],Is.prototype,"value",2),Is=Ar([X(Cd)],Is);var kd=Object.defineProperty,$d=Object.getOwnPropertyDescriptor,ni=(t,e,s,r)=>{for(var i=r>1?void 0:r?$d(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&kd(e,s,i),i};const Dd="sonic-router";let Cr=class extends Yr(Q){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){dt.onChange(this),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const t=new URL(this.location,document.location.origin);return t.pathname+t.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const t=[];for(let[e,s]of Object.entries(this.routes)){if(e==="fallback"||!s)continue;const r=new RegExp(this.regExpBasePath+e);if(r.test(this.cleanLocation)){const i=r.exec(this.cleanLocation)||[e];i.shift(),t.push(s([...i]))}else try{const n=new fs(this.patternBasePath+e).match(this.cleanLocation);if(n){const o=n||{};t.push(s(o))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&this.routes?.fallback&&this.isConnected&&t.push(this.routes.fallback()),t}render(){const t=this.handleroutes();if(t.length>0)return R`${t}`;const e=[];for(const s of this.templatePartsList){const r=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+r).test(this.cleanLocation))e.push(s);else try{new fs(this.patternBasePath+r+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),e.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+r.replace(document.location.origin,""))!=-1&&e.push(s)}}if(e.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(r=>r.hasAttribute("data-fallback"));s&&e.push(s)}return R`${qi(e,(s,r)=>r+new Date().getTime(),s=>{if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let r="";const i=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new fs("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");r=new fs(i).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),o=(this.cleanLocation+"").match(n);o&&(r=o.shift()?.replace(n,i)||"")}return R`<div
1381
1381
  style="display:contents"
1382
1382
  dataProvider="${r}"
1383
1383
  >
1384
1384
  ${ns(s)}
1385
- </div>`}return ns(s)})}`}};ni([u({type:String})],Cr.prototype,"fallBackRoute",2),ni([u({type:Object,attribute:!1})],Cr.prototype,"routes",2),ni([u({type:String})],Cr.prototype,"basePath",2),ni([u()],Cr.prototype,"location",1),Cr=ni([X($d)],Cr);var Dd=Object.getOwnPropertyDescriptor,Ed=(t,e,s,r)=>{for(var i=r>1?void 0:r?Dd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Od="sonic-redirect";let gl=class extends Tt(Q){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded")){dt.changeFromComponent(this);return}if(!this.props)return;const t=this.getAttribute("onData").split("."),e=ut.traverse(this.props,t);e&&!(ut.isObject(e)&&e)&&dt.changeFromComponent(this)}};gl=Ed([X(Od)],gl);var Td=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,Xi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ld(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Td(e,s,i),i};const Id="sonic-states";let oi=class extends Tt(Yr(Q)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(t){if(!this.states)return[];const e=[];for(const[s,r]of Object.entries(this.states)){if(s==="fallback"||!r)continue;const i=new RegExp(s);if(i.test(t)){const n=i.exec(t)||[s];n.shift(),e.push(r([...n]))}else try{const n=new fs("(/)*"+s+"*");if(n.match(t)){const o=n.match(t)||{};e.push(r(o))}}catch{t.indexOf(s.replace(document.location.origin,""))!=-1&&e.push(r({}))}}return e.length==0&&this.states?.fallback&&this.isConnected&&e.push(this.states.fallback()),e}render(){let t=this.state;(!Array.isArray(t)&&ut.isObject(t)||t==null)&&(t="");const e=this.handleStates(t);if(e.length>0)return R`${e}`;const s=[];for(const r of this.templatePartsList){let i=r.getAttribute(this.templateValueAttribute),n=t;if(this.inverted&&(n=i,i=t),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(n+""))s.push(r),r.removeAttribute("mode");else{const l=new fs(i);l.names.length>0&&l.match(n)&&(r.setAttribute("mode","patternMatching"),s.push(r))}}return R`${qi(s,(r,i)=>i+new Date().getTime(),r=>{if(r?.hasAttribute("dataProviderExpression")){const i=r.getAttribute("dataProviderExpression");let n="",o=t,l=r.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=l,l=t),l==""&&(l=this.inverted?"*":"^$"),r.getAttribute("mode")=="patternMatching"){const h=new fs(l);n=new fs(i).stringify(h.match(o))}else{const h=new RegExp(l),g=(o+"").match(h);g&&(n=g.shift()?.replace(h,i))}return R`<div
1385
+ </div>`}return ns(s)})}`}};ni([u({type:String})],Cr.prototype,"fallBackRoute",2),ni([u({type:Object,attribute:!1})],Cr.prototype,"routes",2),ni([u({type:String})],Cr.prototype,"basePath",2),ni([u()],Cr.prototype,"location",1),Cr=ni([X(Dd)],Cr);var Ed=Object.getOwnPropertyDescriptor,Od=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ed(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Td="sonic-redirect";let bl=class extends Tt(Q){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded")){dt.changeFromComponent(this);return}if(!this.props)return;const t=this.getAttribute("onData").split("."),e=ut.traverse(this.props,t);e&&!(ut.isObject(e)&&e)&&dt.changeFromComponent(this)}};bl=Od([X(Td)],bl);var Ld=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,Xi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Id(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ld(e,s,i),i};const Md="sonic-states";let oi=class extends Tt(Yr(Q)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(t){if(!this.states)return[];const e=[];for(const[s,r]of Object.entries(this.states)){if(s==="fallback"||!r)continue;const i=new RegExp(s);if(i.test(t)){const n=i.exec(t)||[s];n.shift(),e.push(r([...n]))}else try{const n=new fs("(/)*"+s+"*");if(n.match(t)){const o=n.match(t)||{};e.push(r(o))}}catch{t.indexOf(s.replace(document.location.origin,""))!=-1&&e.push(r({}))}}return e.length==0&&this.states?.fallback&&this.isConnected&&e.push(this.states.fallback()),e}render(){let t=this.state;(!Array.isArray(t)&&ut.isObject(t)||t==null)&&(t="");const e=this.handleStates(t);if(e.length>0)return R`${e}`;const s=[];for(const r of this.templatePartsList){let i=r.getAttribute(this.templateValueAttribute),n=t;if(this.inverted&&(n=i,i=t),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(n+""))s.push(r),r.removeAttribute("mode");else{const l=new fs(i);l.names.length>0&&l.match(n)&&(r.setAttribute("mode","patternMatching"),s.push(r))}}return R`${qi(s,(r,i)=>i+new Date().getTime(),r=>{if(r?.hasAttribute("dataProviderExpression")){const i=r.getAttribute("dataProviderExpression");let n="",o=t,l=r.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=l,l=t),l==""&&(l=this.inverted?"*":"^$"),r.getAttribute("mode")=="patternMatching"){const h=new fs(l);n=new fs(i).stringify(h.match(o))}else{const h=new RegExp(l),g=(o+"").match(h);g&&(n=g.shift()?.replace(h,i))}return R`<div
1386
1386
  style="display:contents"
1387
1387
  dataProvider="${n}"
1388
1388
  >
1389
1389
  ${ns(r)}
1390
- </div>`}return ns(r)})}`}};Xi([u()],oi.prototype,"state",2),Xi([u({type:Boolean,reflect:!0})],oi.prototype,"inverted",2),Xi([u({type:Object})],oi.prototype,"states",2),oi=Xi([X(Id)],oi);var Md=Object.getOwnPropertyDescriptor,Nd=(t,e,s,r)=>{for(var i=r>1?void 0:r?Md(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Fd="sonic-scope";let bl=class extends Q{createRenderRoot(){return this}render(){return R`<slot></slot>`}};bl=Nd([X(Fd)],bl);function vl(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function yl(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function ao(t){const e=vl(t);return e?ze.getApiConfiguration(e):null}function lo(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const Rd=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function jd(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function wl(t){let e=null,s=[];return()=>{const r=new Promise((i,n)=>{s.push({resolve:i,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const i=s;s=[],t().then(n=>i.forEach(({resolve:o})=>o(n)),n=>i.forEach(({reject:o})=>o(n)))})),r}}function _l(t,e){if(jd(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function Sl(t,e){const s=vl(t);if(!s)return()=>{};let r=!1;const i=()=>{r||lo(ao(t))&&(r=!0,e())};if(i(),r)return()=>{};const n=[],o=requestAnimationFrame(()=>i());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>i());const l=new MutationObserver(()=>i());let h=s;for(;h;)h instanceof Element&&l.observe(h,{attributes:!0,attributeFilter:[...Rd]}),h=h.parentNode||h.host;return n.push(()=>l.disconnect()),()=>{r=!0,n.forEach(g=>g())}}class Pl{constructor(){this.bindings=new WeakMap}bind(e,s){const r={run:s};let i=this.bindings.get(e);return i||(i=new Set,this.bindings.set(e,i)),i.add(r),()=>{const n=this.bindings.get(e);n&&(n.delete(r),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:r})=>r());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let xl=0;function zd(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function Al(t,e){const s=e?.when??"after";return(r,i,n)=>{const o=n.value;if(!o)return;const l=function(...h){if(s==="before")return t(this).then(()=>o.apply(this,h));const g=o.apply(this,h);return zd(g)?g.then(x=>t(this).then(()=>x)):t(this).then(()=>g)};n.value=l}}function Ud(t,e){return Al(s=>t.refetch(s),e)}function qd(t,e){return Al(s=>t.send(s),e)}function en(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function Cl(t,e,s){const r=t.path,i=kl(e)?void 0:e,n=kl(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},l=i?.path,h=n?.triggerKey?.path,g=Ht(r),x=l?Ht(l):[],m=h?Ht(h):[],f=[...new Set([...g,...x,...m])],C=g.length>0,E=!!l,T=n?.refetchEveryMs??0,z=new Pl,U=new WeakMap,S=new WeakSet,y=new WeakMap;let M;const k=function(D,Y,j){if(j){const re=j.value;if(!re)return;k.registerResultHandler(D,(ie,q)=>re.call(ie,q));return}if(!D)return;if(S.has(D)){y.get(D)?.add(Y);return}S.add(D),y.set(D,new Set([Y])),Xs(D);const ne=`__get_state_${Y}`;D.__onConnected__(re=>{const ie=re;let q=ie[ne];q||(q={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:T},ie[ne]=q),q.cleanupOperation?.(),q.cleanupOperation=null,q.cleanupWatchers.forEach(Ae=>Ae()),q.cleanupWatchers=[],q.requestGeneration++,q.refetchEveryMs=T,kr(q);const le=()=>{kr(q),!(!q.refetchEveryMs||q.refetchEveryMs<=0)&&(q.refetchTimeoutId=setTimeout(()=>{q.refetchTimeoutId=null,Be().catch(()=>{})},q.refetchEveryMs))},pe=Ae=>{y.get(D)?.forEach(b=>{ie[b]=Ae})},Be=async()=>{const Ae=C?Lt(re,r,o):{ready:!0,path:r};if(!Ae.ready||!Ae.path){pe(void 0),le();return}let b=null;if(E&&l){const Pe=Lt(re,l,o);if(!Pe.ready||!Pe.path){pe(void 0),le();return}const Ee=It(Pe.path);b=yl(Ee)}else b=ao(re);if(!lo(b)){if(!E&&!q.scopeWatchCleanup){const Pe=Sl(re,ge);q.scopeWatchCleanup=Pe,q.cleanupWatchers.push(()=>{Pe(),q.scopeWatchCleanup=null})}le();return}const _=++q.requestGeneration,we=await new Os(b).getDetailed(Ae.path);return _!==q.requestGeneration||(y.get(D)?.forEach(Pe=>{ie[Pe]=we}),le(),U.get(D)?.forEach(Pe=>Pe(re,we))),we},ue=wl(Be),ge=()=>{ue().catch(()=>{})};q.cleanupOperation=z.bind(re,ue);const $e=()=>{if(tn(q),!h)return;const Ae=Lt(re,h,o);if(!Ae.ready||!Ae.path)return;const b=It(Ae.path);if(!b)return;const _=ge;b.onInvalidate(_),q.triggerPublisher=b,q.triggerInvalidateHandler=_},ce=()=>{if(!E||!l)return;en(q);const Ae=Lt(re,l,o);if(!Ae.ready||!Ae.path){pe(void 0);return}const b=It(Ae.path);if(!b){pe(void 0);return}const _=ge;b.onInternalMutation(_),q.configPublisher=b,q.configMutationHandler=_},W=()=>{$e(),ce(),E||ge()};if(E||m.length){for(const Ae of f){const b=Ts(Ls.watcherStore,Ls.hooked,re,Ae,()=>W());q.cleanupWatchers.push(b)}W()}else{const Ae=()=>{if(C)for(const b of g){const _=Ts(Ls.watcherStore,Ls.hooked,re,b,ge);q.cleanupWatchers.push(_)}$e(),Be().catch(()=>{})};q.cleanupWatchers.push(_l(re,Ae))}}),D.__onDisconnected__(re=>{const ie=re,q=ie[ne];q&&(q.cleanupOperation?.(),q.cleanupOperation=null,en(q),tn(q),kr(q),q.cleanupWatchers.forEach(le=>le()),q.cleanupWatchers=[],q.requestGeneration++,y.get(D)?.forEach(le=>{ie[le]=void 0}))})};return k.refetch=D=>z.run(D),k.registerResultHandler=(D,Y)=>{let j=U.get(D);j||(j=new Set,U.set(D,j)),j.add(Y),S.has(D)||(M??=`__get_handler_${xl++}`,k(D,M))},k}function kl(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function $l(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function Dl(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function tn(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function kr(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function Bd(t){if(!(!t||typeof t.get!="function"))return t.get()}function co(t,e){return function(s,r,i,n){const o=s.path,l=r.path,h=$l(i)?void 0:i,g=$l(i)?i:n,x=h?.path,m=g?.triggerKey?.path,f=Ht(o),C=Ht(l),E=x?Ht(x):[],T=m?Ht(m):[],z=[...new Set([...f,...C,...E,...T])],U=f.length>0,S=!!x,y=g?.refetchEveryMs??0,M=g?.skipIfBodyMissing??!0,k=g?.autoPostOnBodyMutation??!0,D={skipEmptyPlaceholder:g?.skipEmptyPlaceholder},Y=`__${t.toLowerCase()}_state_`,j=new Pl,ne=new WeakMap,re=new WeakSet,ie=new WeakMap;let q;const le=function(pe,Be,ue){if(ue){const $e=ue.value;if(!$e)return;le.registerResultHandler(pe,(ce,W)=>$e.call(ce,W));return}if(!pe)return;if(re.has(pe)){ie.get(pe)?.add(Be);return}re.add(pe),ie.set(pe,new Set([Be])),Xs(pe);const ge=`${Y}${Be}`;pe.__onConnected__($e=>{const ce=$e;let W=ce[ge];W||(W={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:y,skipIfBodyMissing:M,autoPostOnBodyMutation:k},ce[ge]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach($=>$()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=y,W.skipIfBodyMissing=M,W.autoPostOnBodyMutation=k,kr(W);const Ae=()=>{kr(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},b=$=>{ie.get(pe)?.forEach(F=>{ce[F]=$})},_=async()=>{const $=U?Lt($e,o,D):{ready:!0,path:o};if(!$.ready||!$.path){b(void 0),Ae();return}const F=Lt($e,l,D);if(!F.ready||!F.path){b(void 0),Ae();return}const B=It(F.path),V=Bd(B);if(W.skipIfBodyMissing&&V==null){Ae();return}let N=null;if(S&&x){const me=Lt($e,x,D);if(!me.ready||!me.path){b(void 0),Ae();return}const fe=It(me.path);N=yl(fe)}else N=ao($e);if(!lo(N)){if(!S&&!W.scopeWatchCleanup){const me=Sl($e,we);W.scopeWatchCleanup=me,W.cleanupWatchers.push(()=>{me(),W.scopeWatchCleanup=null})}Ae();return}const G=++W.requestGeneration,ae=new Os(N);let Ce;try{Ce=await e(ae,$.path,V)}catch(me){throw G===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe($e,void 0)),me}return G!==W.requestGeneration||(b(Ce),Ae(),ne.get(pe)?.forEach(me=>me($e,Ce))),Ce},te=wl(_),we=()=>{te().catch(()=>{})};W.cleanupOperation=j.bind($e,te);const Pe=()=>{if(Dl(W),!W.autoPostOnBodyMutation)return;const $=Lt($e,l,D);if(!$.ready||!$.path)return;const F=It($.path);if(!F)return;const B=we;F.onInternalMutation(B),W.bodyPublisher=F,W.bodyMutationHandler=B},Ee=()=>{if(tn(W),!m)return;const $=Lt($e,m,D);if(!$.ready||!$.path)return;const F=It($.path);if(!F)return;const B=we;F.onInvalidate(B),W.triggerPublisher=F,W.triggerInvalidateHandler=B},O=()=>{if(!S||!x)return;en(W);const $=Lt($e,x,D);if(!$.ready||!$.path){b(void 0);return}const F=It($.path);if(!F){b(void 0);return}const B=we;F.onInternalMutation(B),W.configPublisher=F,W.configMutationHandler=B},I=()=>{Pe(),Ee(),O(),W.autoPostOnBodyMutation&&we()};if(S||C.length||T.length){for(const $ of z){const F=Ts(Ls.watcherStore,Ls.hooked,$e,$,()=>I());W.cleanupWatchers.push(F)}I()}else{const $=()=>{if(U)for(const F of f){const B=Ts(Ls.watcherStore,Ls.hooked,$e,F,we);W.cleanupWatchers.push(B)}Pe(),Ee(),W.autoPostOnBodyMutation&&we()};W.cleanupWatchers.push(_l($e,$))}}),pe.__onDisconnected__($e=>{const ce=$e,W=ce[ge];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,en(W),Dl(W),tn(W),kr(W),W.cleanupWatchers.forEach(Ae=>Ae()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(Ae=>{ce[Ae]=void 0}))})};return le.send=pe=>j.run(pe),le.registerResultHandler=(pe,Be)=>{let ue=ne.get(pe);ue||(ue=new Set,ne.set(pe,ue)),ue.add(Be),re.has(pe)||(q??=`__${t.toLowerCase()}_handler_${xl++}`,le(pe,q))},le}}function Hd(t,e,s,r){return co("POST",(i,n,o)=>i.postDetailed(n,o))(t,e,s,r)}function Vd(t,e,s,r){return co("PUT",(i,n,o)=>i.putDetailed(n,o))(t,e,s,r)}function Wd(t,e,s,r){return co("PATCH",(i,n,o)=>i.patchDetailed(n,o))(t,e,s,r)}const Kd=za,Gd=Ua,Yd=Cl;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:ja,publish:za,subscribe:Ua,onAssing:_h,handle:Ph,ancestorAttribute:Qn,autoSubscribe:xh,autoFill:Ah,get:Cl,post:Hd,put:Vd,patch:Wd,refetch:Ud,send:qd};var Zd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,sn=(t,e,s,r)=>{for(var i=r>1?void 0:r?Jd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Zd(e,s,i),i};const El=new Ii("communes?limit=$limit&fields=nom,code"),Ol=new Cs(El.path),Qd="sonic-example";let ai=class extends Q{constructor(){super(...arguments),this.limit=5}render(){return R` <span part="api-get-demo">
1390
+ </div>`}return ns(r)})}`}};Xi([u()],oi.prototype,"state",2),Xi([u({type:Boolean,reflect:!0})],oi.prototype,"inverted",2),Xi([u({type:Object})],oi.prototype,"states",2),oi=Xi([X(Md)],oi);var Nd=Object.getOwnPropertyDescriptor,Fd=(t,e,s,r)=>{for(var i=r>1?void 0:r?Nd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Rd="sonic-scope";let yl=class extends Q{createRenderRoot(){return this}render(){return R`<slot></slot>`}};yl=Fd([X(Rd)],yl);function vl(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function wl(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function lo(t){const e=vl(t);return e?ze.getApiConfiguration(e):null}function co(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const jd=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function zd(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function _l(t){let e=null,s=[];return()=>{const r=new Promise((i,n)=>{s.push({resolve:i,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const i=s;s=[],t().then(n=>i.forEach(({resolve:o})=>o(n)),n=>i.forEach(({reject:o})=>o(n)))})),r}}function Sl(t,e){if(zd(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function Pl(t,e){const s=vl(t);if(!s)return()=>{};let r=!1;const i=()=>{r||co(lo(t))&&(r=!0,e())};if(i(),r)return()=>{};const n=[],o=requestAnimationFrame(()=>i());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>i());const l=new MutationObserver(()=>i());let h=s;for(;h;)h instanceof Element&&l.observe(h,{attributes:!0,attributeFilter:[...jd]}),h=h.parentNode||h.host;return n.push(()=>l.disconnect()),()=>{r=!0,n.forEach(g=>g())}}class xl{constructor(){this.bindings=new WeakMap}bind(e,s){const r={run:s};let i=this.bindings.get(e);return i||(i=new Set,this.bindings.set(e,i)),i.add(r),()=>{const n=this.bindings.get(e);n&&(n.delete(r),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:r})=>r());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let Al=0;function Ud(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function Cl(t,e){const s=e?.when??"after";return(r,i,n)=>{const o=n.value;if(!o)return;const l=function(...h){if(s==="before")return t(this).then(()=>o.apply(this,h));const g=o.apply(this,h);return Ud(g)?g.then(x=>t(this).then(()=>x)):t(this).then(()=>g)};n.value=l}}function qd(t,e){return Cl(s=>t.refetch(s),e)}function Bd(t,e){return Cl(s=>t.send(s),e)}function en(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function kl(t,e,s){const r=t.path,i=$l(e)?void 0:e,n=$l(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},l=i?.path,h=n?.triggerKey?.path,g=Ht(r),x=l?Ht(l):[],m=h?Ht(h):[],f=[...new Set([...g,...x,...m])],C=g.length>0,E=!!l,T=n?.refetchEveryMs??0,z=new xl,U=new WeakMap,S=new WeakSet,v=new WeakMap;let M;const k=function(D,Y,j){if(j){const re=j.value;if(!re)return;k.registerResultHandler(D,(ie,q)=>re.call(ie,q));return}if(!D)return;if(S.has(D)){v.get(D)?.add(Y);return}S.add(D),v.set(D,new Set([Y])),Xs(D);const ne=`__get_state_${Y}`;D.__onConnected__(re=>{const ie=re;let q=ie[ne];q||(q={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:T},ie[ne]=q),q.cleanupOperation?.(),q.cleanupOperation=null,q.cleanupWatchers.forEach(Ae=>Ae()),q.cleanupWatchers=[],q.requestGeneration++,q.refetchEveryMs=T,kr(q);const le=()=>{kr(q),!(!q.refetchEveryMs||q.refetchEveryMs<=0)&&(q.refetchTimeoutId=setTimeout(()=>{q.refetchTimeoutId=null,Be().catch(()=>{})},q.refetchEveryMs))},pe=Ae=>{v.get(D)?.forEach(b=>{ie[b]=Ae})},Be=async()=>{const Ae=C?Lt(re,r,o):{ready:!0,path:r};if(!Ae.ready||!Ae.path){pe(void 0),le();return}let b=null;if(E&&l){const Pe=Lt(re,l,o);if(!Pe.ready||!Pe.path){pe(void 0),le();return}const Ee=It(Pe.path);b=wl(Ee)}else b=lo(re);if(!co(b)){if(!E&&!q.scopeWatchCleanup){const Pe=Pl(re,ge);q.scopeWatchCleanup=Pe,q.cleanupWatchers.push(()=>{Pe(),q.scopeWatchCleanup=null})}le();return}const _=++q.requestGeneration,we=await new Os(b).getDetailed(Ae.path);return _!==q.requestGeneration||(v.get(D)?.forEach(Pe=>{ie[Pe]=we}),le(),U.get(D)?.forEach(Pe=>Pe(re,we))),we},ue=_l(Be),ge=()=>{ue().catch(()=>{})};q.cleanupOperation=z.bind(re,ue);const $e=()=>{if(tn(q),!h)return;const Ae=Lt(re,h,o);if(!Ae.ready||!Ae.path)return;const b=It(Ae.path);if(!b)return;const _=ge;b.onInvalidate(_),q.triggerPublisher=b,q.triggerInvalidateHandler=_},ce=()=>{if(!E||!l)return;en(q);const Ae=Lt(re,l,o);if(!Ae.ready||!Ae.path){pe(void 0);return}const b=It(Ae.path);if(!b){pe(void 0);return}const _=ge;b.onInternalMutation(_),q.configPublisher=b,q.configMutationHandler=_},W=()=>{$e(),ce(),E||ge()};if(E||m.length){for(const Ae of f){const b=Ts(Ls.watcherStore,Ls.hooked,re,Ae,()=>W());q.cleanupWatchers.push(b)}W()}else{const Ae=()=>{if(C)for(const b of g){const _=Ts(Ls.watcherStore,Ls.hooked,re,b,ge);q.cleanupWatchers.push(_)}$e(),Be().catch(()=>{})};q.cleanupWatchers.push(Sl(re,Ae))}}),D.__onDisconnected__(re=>{const ie=re,q=ie[ne];q&&(q.cleanupOperation?.(),q.cleanupOperation=null,en(q),tn(q),kr(q),q.cleanupWatchers.forEach(le=>le()),q.cleanupWatchers=[],q.requestGeneration++,v.get(D)?.forEach(le=>{ie[le]=void 0}))})};return k.refetch=D=>z.run(D),k.registerResultHandler=(D,Y)=>{let j=U.get(D);j||(j=new Set,U.set(D,j)),j.add(Y),S.has(D)||(M??=`__get_handler_${Al++}`,k(D,M))},k}function $l(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function Dl(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function El(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function tn(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function kr(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function Hd(t){if(!(!t||typeof t.get!="function"))return t.get()}function uo(t,e){return function(s,r,i,n){const o=s.path,l=r.path,h=Dl(i)?void 0:i,g=Dl(i)?i:n,x=h?.path,m=g?.triggerKey?.path,f=Ht(o),C=Ht(l),E=x?Ht(x):[],T=m?Ht(m):[],z=[...new Set([...f,...C,...E,...T])],U=f.length>0,S=!!x,v=g?.refetchEveryMs??0,M=g?.skipIfBodyMissing??!0,k=g?.autoPostOnBodyMutation??!0,D={skipEmptyPlaceholder:g?.skipEmptyPlaceholder},Y=`__${t.toLowerCase()}_state_`,j=new xl,ne=new WeakMap,re=new WeakSet,ie=new WeakMap;let q;const le=function(pe,Be,ue){if(ue){const $e=ue.value;if(!$e)return;le.registerResultHandler(pe,(ce,W)=>$e.call(ce,W));return}if(!pe)return;if(re.has(pe)){ie.get(pe)?.add(Be);return}re.add(pe),ie.set(pe,new Set([Be])),Xs(pe);const ge=`${Y}${Be}`;pe.__onConnected__($e=>{const ce=$e;let W=ce[ge];W||(W={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:v,skipIfBodyMissing:M,autoPostOnBodyMutation:k},ce[ge]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach($=>$()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=v,W.skipIfBodyMissing=M,W.autoPostOnBodyMutation=k,kr(W);const Ae=()=>{kr(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},b=$=>{ie.get(pe)?.forEach(F=>{ce[F]=$})},_=async()=>{const $=U?Lt($e,o,D):{ready:!0,path:o};if(!$.ready||!$.path){b(void 0),Ae();return}const F=Lt($e,l,D);if(!F.ready||!F.path){b(void 0),Ae();return}const B=It(F.path),V=Hd(B);if(W.skipIfBodyMissing&&V==null){Ae();return}let N=null;if(S&&x){const me=Lt($e,x,D);if(!me.ready||!me.path){b(void 0),Ae();return}const fe=It(me.path);N=wl(fe)}else N=lo($e);if(!co(N)){if(!S&&!W.scopeWatchCleanup){const me=Pl($e,we);W.scopeWatchCleanup=me,W.cleanupWatchers.push(()=>{me(),W.scopeWatchCleanup=null})}Ae();return}const G=++W.requestGeneration,ae=new Os(N);let Ce;try{Ce=await e(ae,$.path,V)}catch(me){throw G===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe($e,void 0)),me}return G!==W.requestGeneration||(b(Ce),Ae(),ne.get(pe)?.forEach(me=>me($e,Ce))),Ce},te=_l(_),we=()=>{te().catch(()=>{})};W.cleanupOperation=j.bind($e,te);const Pe=()=>{if(El(W),!W.autoPostOnBodyMutation)return;const $=Lt($e,l,D);if(!$.ready||!$.path)return;const F=It($.path);if(!F)return;const B=we;F.onInternalMutation(B),W.bodyPublisher=F,W.bodyMutationHandler=B},Ee=()=>{if(tn(W),!m)return;const $=Lt($e,m,D);if(!$.ready||!$.path)return;const F=It($.path);if(!F)return;const B=we;F.onInvalidate(B),W.triggerPublisher=F,W.triggerInvalidateHandler=B},O=()=>{if(!S||!x)return;en(W);const $=Lt($e,x,D);if(!$.ready||!$.path){b(void 0);return}const F=It($.path);if(!F){b(void 0);return}const B=we;F.onInternalMutation(B),W.configPublisher=F,W.configMutationHandler=B},I=()=>{Pe(),Ee(),O(),W.autoPostOnBodyMutation&&we()};if(S||C.length||T.length){for(const $ of z){const F=Ts(Ls.watcherStore,Ls.hooked,$e,$,()=>I());W.cleanupWatchers.push(F)}I()}else{const $=()=>{if(U)for(const F of f){const B=Ts(Ls.watcherStore,Ls.hooked,$e,F,we);W.cleanupWatchers.push(B)}Pe(),Ee(),W.autoPostOnBodyMutation&&we()};W.cleanupWatchers.push(Sl($e,$))}}),pe.__onDisconnected__($e=>{const ce=$e,W=ce[ge];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,en(W),El(W),tn(W),kr(W),W.cleanupWatchers.forEach(Ae=>Ae()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(Ae=>{ce[Ae]=void 0}))})};return le.send=pe=>j.run(pe),le.registerResultHandler=(pe,Be)=>{let ue=ne.get(pe);ue||(ue=new Set,ne.set(pe,ue)),ue.add(Be),re.has(pe)||(q??=`__${t.toLowerCase()}_handler_${Al++}`,le(pe,q))},le}}function Vd(t,e,s,r){return uo("POST",(i,n,o)=>i.postDetailed(n,o))(t,e,s,r)}function Wd(t,e,s,r){return uo("PUT",(i,n,o)=>i.putDetailed(n,o))(t,e,s,r)}function Kd(t,e,s,r){return uo("PATCH",(i,n,o)=>i.patchDetailed(n,o))(t,e,s,r)}const Gd=Ua,Yd=qa,Zd=kl;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:za,publish:Ua,subscribe:qa,onAssing:Sh,handle:xh,ancestorAttribute:Xn,autoSubscribe:Ah,autoFill:Ch,get:kl,post:Vd,put:Wd,patch:Kd,refetch:qd,send:Bd};var Jd=Object.defineProperty,Qd=Object.getOwnPropertyDescriptor,sn=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Jd(e,s,i),i};const Ol=new Ii("communes?limit=$limit&fields=nom,code"),Tl=new Cs(Ol.path),Xd="sonic-example";let ai=class extends Q{constructor(){super(...arguments),this.limit=5}render(){return R` <span part="api-get-demo">
1391
1391
  · get: ${JSON.stringify(this.geoCommunesPayload?.result??null)} · HTTP
1392
1392
  ${this.geoCommunesPayload?.response?.status??"—"} · subscribe:
1393
1393
  ${JSON.stringify(this.geoCommunesResult??null)}</span
1394
- >`}};sn([u({type:Number})],ai.prototype,"limit",2),sn([Yd(El),Kd(Ol)],ai.prototype,"geoCommunesPayload",2),sn([xe(),Gd(Ol.result)],ai.prototype,"geoCommunesResult",2),ai=sn([X(Qd)],ai);const Tl={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class Xd{async transform(e,s){if(this.sduiDescriptor=e,this.sduiDescriptor.library)for(const r in s.library)this.sduiDescriptor.library[r]=s.library[r];for(const r of s.transforms)this.transformAction(r)}transformAction(e){const s=this.getNodesMatchingPatterns(e.patterns,this.sduiDescriptor);this[e.action](e,s)}getNodesMatchingPatterns(e,s){if(!e)return[];if(!s)return[];const r=s.nodes;if(!r)return[];let i=[],n=0;for(const o of e)for(const l of r)this.nodeMatchesPattern(o,l)&&i.push({parent:s,child:l,index:n}),i=i.concat(this.getNodesMatchingPatterns([o],l)),n++;return i}stringMatchesExpression(e,s){return!s||e&&e.match(s)}nodeMatchesPattern(e,s){const r=e,i=s,n=["libraryKey","innerHTML","prefix","suffix","markup","textContent"];for(const h of n)if(!this.stringMatchesExpression(i[h],r[h]))return!1;const o=e.attributes,l=s.attributes;if(o&&!l)return!1;if(o){for(const h in o)if(!l||!this.stringMatchesExpression(l[h],o[h]))return!1}return!0}unwrap(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes)}wrap(e,s){const r={...e.ui};r.nodes||(r.nodes=[]);let i=0;for(const o of s)r.nodes?.push(o.child),i>0&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child),1),i++;const n=s[0]?.parent.nodes?.indexOf(s[0].child);n!=null&&n>=0&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,r))}move(e,s){for(const r of s){r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1);let i=[];e.after&&(i=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor)),e.before&&(i=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor));const n=i[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(e.after?1:0),0,r.child)}}remap(e,s){for(const r of s){const i={...e.ui};i.attributes||(i.attributes={});const n=r.child.attributes;if(n)for(const m in n)Object.prototype.hasOwnProperty.call(i.attributes,m)||(i.attributes[m]=n[m]);const o=["libraryKey","innerHTML","prefix","suffix","markup","textContent"],l=r.child,h=i;for(const m of o)!Object.prototype.hasOwnProperty.call(i,m)&&l[m]&&(h[m]=l[m]);i.nodes||(i.nodes=[]);const g=r.child.nodes;if(g)for(const m of g)i.nodes.push(m);const x=r.parent.nodes?.indexOf(r.child)??-1;x!=-1&&(r.parent.nodes?.splice(x,1),r.parent.nodes?.splice(x,0,i))}}delete(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1)}insert(e,s){const r=e.after?"after":e.before?"before":"in";s=[],e.after?s=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor):e.before?s=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor):e.in&&(s=this.getNodesMatchingPatterns([e.in],this.sduiDescriptor));const i=s[0];i&&(r=="in"?(i.child.nodes||(i.child.nodes=[]),i.child.nodes.push({...e.ui})):i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child)+(r=="after"?1:0),0,{...e.ui}))}}const ep="data-sdui-placeholder",uo="data-sdui-node-id";function Ll(t){const e=document.createElement("div");return e.setAttribute(ep,""),e.setAttribute("data-node-id",t),e.setAttribute(uo,t),e.setAttribute("aria-hidden","true"),e.style.display="contents",e}const tp=["markup","innerHTML","prefix","suffix"];function Il(t){const e=[];for(const s of tp){const r=t[s];r!=null&&r!==""&&e.push(s)}return e}function sp(t){return Il(t).length>0}function rp(t,e){const s=Il(e);return`sonic-sdui (profile="safe") : nœud ignoré (${t}) — champs refusés : ${s.join(", ")}`}function ip(t){return`sonic-sdui (profile="safe") : chargement js ignoré (${t.length} URL) — ${t.join(", ")}`}var np=Object.defineProperty,op=Object.getOwnPropertyDescriptor,$r=(t,e,s,r)=>{for(var i=r>1?void 0:r?op(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&np(e,s,i),i};const ap="sonic-sdui";let rr=class extends ll(sr(Q)){constructor(){super(...arguments),this.partial=!1,this.sduiDescriptor={},this.sduiPropsRef=null,this.nodeIndex=new Map,this.renderingStack=new Set,this.incrementalPartial=!1,this.incrementalActive=!1}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback(),this.opsDataProvider&&this.bindOpsDataProvider()}cloneDescriptor(t){if(t==null)return{};try{return structuredClone(t)}catch{return JSON.parse(JSON.stringify(t))}}get isSafeProfile(){return this.profile==="safe"}get isPartialMode(){return this.partial||this.incrementalPartial}willUpdate(t){if(t.has("opsDataProvider")&&this.bindOpsDataProvider(),this.incrementalActive){super.willUpdate(t);return}if(this.props==null)(this.sduiPropsRef!=null||Object.keys(this.sduiDescriptor).length)&&(this.sduiPropsRef=null,this.sduiDescriptor={},this.updateContents());else{const e=this.props,s=this.sduiKey?e[this.sduiKey]:e,r=t.has("profile"),i=t.has("partial");if(this.sduiPropsRef==s&&!r&&!i){super.willUpdate(t);return}this.sduiPropsRef=s??null,this.sduiDescriptor=this.cloneDescriptor(s),this.updateContents()}super.willUpdate(t)}disconnectedCallback(){this.opsUnsub?.(),this.opsUnsub=void 0,super.disconnectedCallback()}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,Tl,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.rebuildNodeIndex(),this.parseRootNodes()}rebuildNodeIndex(){this.nodeIndex.clear();const t=e=>{e.nodeId&&this.nodeIndex.set(e.nodeId,e),e.nodes?.forEach(t)};if(this.sduiDescriptor.nodeById)for(const e of Object.keys(this.sduiDescriptor.nodeById)){const s=this.sduiDescriptor.nodeById[e];s.nodeId||(s.nodeId=e),this.nodeIndex.set(e,s),t(s)}if(this.sduiDescriptor.nodes?.forEach(t),this.sduiDescriptor.library)for(const e of Object.keys(this.sduiDescriptor.library))t(this.sduiDescriptor.library[e])}removeChildren(){for(;[...this.children].filter(t=>t.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js?.length)if(this.isSafeProfile)console.warn(ip(this.sduiDescriptor.js));else for(const t of this.sduiDescriptor.js)gs.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)gs.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const e=await(await fetch(this.getAttribute("transformation"))).json();await new Xd().transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const e=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((s,r)=>{const i=this.parseChild(s,`nodes[${r}]`);i&&this.appendChild(i)})}parseChild(t,e="node"){if(this.isSafeProfile&&sp(t))return console.warn(rp(e,t)),null;if(t.nodeId&&this.renderingStack.has(t.nodeId))return console.warn(`sonic-sdui : cycle détecté sur nodeId="${t.nodeId}" (${e})`),this.isPartialMode?Ll(t.nodeId):null;t.nodeId&&this.renderingStack.add(t.nodeId);try{const s=t.tagName||"div";let{element:r,contentElement:i}=this.handleLibrary(t,s,e);if(!r)return null;this.handleAttributes(t,r),r=this.handleMarkup(t,r),i||(i=r),this.handleChildNodes(t,i,r,e),this.handleTextContent(t,i),this.handleInnerHTML(t,i);let n=r;return(t.prefix||t.suffix)&&(n=this.handlePrefixSuffix(t,r)),this.bindAction(t,n),t.nodeId&&n.setAttribute(uo,t.nodeId),n}finally{t.nodeId&&this.renderingStack.delete(t.nodeId)}}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}bindAction(t,e){const s=t.action;s?.name&&e.addEventListener("click",()=>{const r={name:s.name,context:s.context??{},sourceNodeId:t.nodeId};this.dispatchEvent(new CustomEvent("sdui-action",{detail:r,bubbles:!0,composed:!0}))})}handleChildNodes(t,e,s,r){if(t.nodes){const i=t.nodes;for(let n=0;n<i.length;n++){const o=i[n],l=this.parseChild(o,`${r}.nodes[${n}]`);l&&this.appendChildElement(o,l,e,s)}}if(t.childNodeIds?.length)for(const i of t.childNodeIds){const n=this.nodeIndex.get(i);if(n){const o=this.parseChild(n,`${r}.childNodeIds[${i}]`);o&&this.appendChildElement(n,o,e,s);continue}this.isPartialMode?this.appendToTarget(e,Ll(i)):console.warn(`sonic-sdui : childNodeId "${i}" introuvable (${r}) — ignoré (activez partial pour un placeholder)`)}}appendChildElement(t,e,s,r){let i=s;t.parentElementSelector&&(i=r.querySelector(t.parentElementSelector)||s),this.appendToTarget(i,e)}appendToTarget(t,e){t.shadowRoot?t.shadowRoot.appendChild(e):t.tagName.toLocaleLowerCase()=="template"?t.content.appendChild(e):t.appendChild(e)}handleLibrary(t,e,s){let r,i;if(t.libraryKey&&this.sduiDescriptor.library){const n=`library.${t.libraryKey}`;if(r=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"},n),!r)return console.warn(`sonic-sdui (profile="safe") : nœud ignoré (${s}) — modèle libraryKey="${t.libraryKey}" refusé`),{element:null,contentElement:void 0};const o=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;o&&(i=r.querySelector(o))}else r=document.createElement(e);return{element:r,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const r in s){const i=s[r],n=Qr.isObject(i)?JSON.stringify(i):i;e.setAttribute(r,n)}}handleMarkup(t,e){return t.markup&&(e=document.createElement("div"),e.style.display="contents",e.innerHTML=t.markup),e}handleTextContent(t,e){t.textContent==null||!e||t.nodes?.length||t.childNodeIds?.length||(e.textContent=t.textContent)}handleInnerHTML(t,e){if(t.innerHTML)if(t.innerHTML.indexOf("wording_")!=-1){const s=this.getAncestorAttributeValue("wordingProvider");this.api?.post(s,{labels:[t.innerHTML.substring(8)]}).then(r=>{e&&(e.innerHTML+=r)})}else e&&(e.innerHTML+=t.innerHTML)}upsertNode(t,e,s){if(!t.nodeId){console.warn('sonic-sdui.upsertNode : "nodeId" est requis');return}this.beginIncremental();const r=t.nodeId;if(this.sduiDescriptor.nodeById||(this.sduiDescriptor.nodeById={}),this.sduiDescriptor.nodeById[r]=t,this.nodeIndex.set(r,t),e){let i=this.nodeIndex.get(e)||this.sduiDescriptor.nodeById[e];i||(i={nodeId:e,tagName:"div",childNodeIds:[]},this.sduiDescriptor.nodeById[e]=i,this.nodeIndex.set(e,i),this.sduiDescriptor.nodes||(this.sduiDescriptor.nodes=[]),this.sduiDescriptor.nodes.some(l=>l.nodeId===e)||this.sduiDescriptor.nodes.push(i)),i.childNodeIds||(i.childNodeIds=[]);const n=i.childNodeIds.indexOf(r);n>=0&&i.childNodeIds.splice(n,1);const o=s!=null?Math.max(0,Math.min(s,i.childNodeIds.length)):i.childNodeIds.length;i.childNodeIds.splice(o,0,r)}else{this.sduiDescriptor.nodes||(this.sduiDescriptor.nodes=[]);const i=this.sduiDescriptor.nodes,n=i.findIndex(o=>o.nodeId===r);n>=0?i[n]=t:s!=null?i.splice(Math.max(0,Math.min(s,i.length)),0,t):i.push(t)}this.rebuildNodeIndex(),this.domUpsertNode(t,e,s)}removeNode(t){if(this.beginIncremental(),delete this.sduiDescriptor.nodeById?.[t],this.nodeIndex.delete(t),this.sduiDescriptor.nodes&&(this.sduiDescriptor.nodes=this.sduiDescriptor.nodes.filter(e=>e.nodeId!==t)),this.sduiDescriptor.nodeById)for(const e of Object.values(this.sduiDescriptor.nodeById))e.childNodeIds&&(e.childNodeIds=e.childNodeIds.filter(s=>s!==t));this.findDomNode(t)?.remove()}setData(t,e){const s=It(t);if(s){s.set(e);return}if(this.dataProvider){const r=It(`${this.dataProvider}.${t}`);if(r){r.set(e);return}}console.warn(`sonic-sdui.setData : chemin introuvable "${t}"`)}applyOp(t){switch(t.op){case"upsertNode":this.upsertNode(t.node,t.parentId,t.index);break;case"removeNode":this.removeNode(t.nodeId);break;case"setData":this.setData(t.path,t.value);break;default:console.warn("sonic-sdui.applyOp : op inconnue",t)}}endIncremental(){this.incrementalActive=!1,this.incrementalPartial=!1}beginIncremental(){if(!this.incrementalActive){if(this.sduiDescriptor=structuredClone(this.sduiDescriptor||{}),this.sduiDescriptor.nodeById||(this.sduiDescriptor.nodeById={}),this.sduiDescriptor.nodes||(this.sduiDescriptor.nodes=[]),!this.sduiDescriptor.library){const t={};Object.assign(t,Tl),this.sduiDescriptor.library=t}this.incrementalActive=!0,this.incrementalPartial=!0,this.rebuildNodeIndex()}}findDomNode(t){const e=typeof CSS<"u"&&CSS.escape?CSS.escape(t):t.replace(/"/g,'\\"');return this.querySelector(`[${uo}="${e}"]`)}domUpsertNode(t,e,s){const r=this.parseChild(t,`upsert:${t.nodeId}`);if(!r)return;const i=this.findDomNode(t.nodeId);if(i&&i!==r){i.replaceWith(r);return}if(i===r)return;if(e){const o=this.findDomNode(e);if(o){const l=Array.from(o.children);s!=null&&s<l.length?o.insertBefore(r,l[s]):o.appendChild(r);return}}const n=this.querySelector("sonic-toast-message-subscriber");n?this.insertBefore(r,n):this.appendChild(r)}bindOpsDataProvider(){this.opsUnsub?.(),this.opsUnsub=void 0;const t=this.opsDataProvider;if(!t)return;const e=It(t);if(!e)return;const s=i=>{if(i==null)return;const n=Array.isArray(i)?i:[i];for(const o of n)o&&typeof o=="object"&&"op"in o&&this.applyOp(o)};e.onAssign(s),this.opsUnsub=()=>e.offAssign(s);const r=e.get();r!=null&&s(r)}};$r([u()],rr.prototype,"sduiKey",2),$r([u()],rr.prototype,"messagesKey",2),$r([u({type:String,reflect:!0})],rr.prototype,"profile",2),$r([u({type:Boolean,reflect:!0})],rr.prototype,"partial",2),$r([u({type:String})],rr.prototype,"opsDataProvider",2),rr=$r([X(ap)],rr);var lp=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,Ml=(t,e,s,r)=>{for(var i=r>1?void 0:r?cp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&lp(e,s,i),i};let rn=class extends sr(Q){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach(e=>{this.publisher.offAssign(e.subscriber)})}parseComposition(t,e){if(t)for(const s in t){const r=t[s];if(typeof r=="string"){const i=r.split("."),n=i.shift();if(!n)continue;let o=ve.get(n);o=Qr.traverse(o,i);const l={publisher:o,subscriber:h=>{e[s]=h}};this.listeners.push(l),o.onAssign(l.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const i=new Ur({},e);e._proxies_.set(s,i);const n={publisher:i,subscriber:o=>{e[s]=o}};this.listeners.push(n),i.onAssign(n.subscriber),this.parseComposition(r,i)}}}render(){return R`<slot></slot>`}};rn.styles=[Z`
1394
+ >`}};sn([u({type:Number})],ai.prototype,"limit",2),sn([Zd(Ol),Gd(Tl)],ai.prototype,"geoCommunesPayload",2),sn([xe(),Yd(Tl.result)],ai.prototype,"geoCommunesResult",2),ai=sn([X(Xd)],ai);const Ll={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class ep{async transform(e,s){if(this.sduiDescriptor=e,this.sduiDescriptor.library)for(const r in s.library)this.sduiDescriptor.library[r]=s.library[r];for(const r of s.transforms)this.transformAction(r)}transformAction(e){const s=this.getNodesMatchingPatterns(e.patterns,this.sduiDescriptor);this[e.action](e,s)}getNodesMatchingPatterns(e,s){if(!e)return[];if(!s)return[];const r=s.nodes;if(!r)return[];let i=[],n=0;for(const o of e)for(const l of r)this.nodeMatchesPattern(o,l)&&i.push({parent:s,child:l,index:n}),i=i.concat(this.getNodesMatchingPatterns([o],l)),n++;return i}stringMatchesExpression(e,s){return!s||e&&e.match(s)}nodeMatchesPattern(e,s){const r=e,i=s,n=["libraryKey","innerHTML","prefix","suffix","markup","textContent"];for(const h of n)if(!this.stringMatchesExpression(i[h],r[h]))return!1;const o=e.attributes,l=s.attributes;if(o&&!l)return!1;if(o){for(const h in o)if(!l||!this.stringMatchesExpression(l[h],o[h]))return!1}return!0}unwrap(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes)}wrap(e,s){const r={...e.ui};r.nodes||(r.nodes=[]);let i=0;for(const o of s)r.nodes?.push(o.child),i>0&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child),1),i++;const n=s[0]?.parent.nodes?.indexOf(s[0].child);n!=null&&n>=0&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,r))}move(e,s){for(const r of s){r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1);let i=[];e.after&&(i=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor)),e.before&&(i=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor));const n=i[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(e.after?1:0),0,r.child)}}remap(e,s){for(const r of s){const i={...e.ui};i.attributes||(i.attributes={});const n=r.child.attributes;if(n)for(const m in n)Object.prototype.hasOwnProperty.call(i.attributes,m)||(i.attributes[m]=n[m]);const o=["libraryKey","innerHTML","prefix","suffix","markup","textContent"],l=r.child,h=i;for(const m of o)!Object.prototype.hasOwnProperty.call(i,m)&&l[m]&&(h[m]=l[m]);i.nodes||(i.nodes=[]);const g=r.child.nodes;if(g)for(const m of g)i.nodes.push(m);const x=r.parent.nodes?.indexOf(r.child)??-1;x!=-1&&(r.parent.nodes?.splice(x,1),r.parent.nodes?.splice(x,0,i))}}delete(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1)}insert(e,s){const r=e.after?"after":e.before?"before":"in";s=[],e.after?s=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor):e.before?s=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor):e.in&&(s=this.getNodesMatchingPatterns([e.in],this.sduiDescriptor));const i=s[0];i&&(r=="in"?(i.child.nodes||(i.child.nodes=[]),i.child.nodes.push({...e.ui})):i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child)+(r=="after"?1:0),0,{...e.ui}))}}const tp="data-sdui-placeholder",ho="data-sdui-node-id";function Il(t){const e=document.createElement("div");return e.setAttribute(tp,""),e.setAttribute("data-node-id",t),e.setAttribute(ho,t),e.setAttribute("aria-hidden","true"),e.style.display="contents",e}const sp=["markup","innerHTML","prefix","suffix"];function Ml(t){const e=[];for(const s of sp){const r=t[s];r!=null&&r!==""&&e.push(s)}return e}function rp(t){return Ml(t).length>0}function ip(t,e){const s=Ml(e);return`sonic-sdui (profile="safe") : nœud ignoré (${t}) — champs refusés : ${s.join(", ")}`}function np(t){return`sonic-sdui (profile="safe") : chargement js ignoré (${t.length} URL) — ${t.join(", ")}`}var op=Object.defineProperty,ap=Object.getOwnPropertyDescriptor,$r=(t,e,s,r)=>{for(var i=r>1?void 0:r?ap(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&op(e,s,i),i};const lp="sonic-sdui";let rr=class extends cl(sr(Q)){constructor(){super(...arguments),this.partial=!1,this.sduiDescriptor={},this.sduiPropsRef=null,this.nodeIndex=new Map,this.renderingStack=new Set,this.incrementalPartial=!1,this.incrementalActive=!1}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback(),this.opsDataProvider&&this.bindOpsDataProvider()}cloneDescriptor(t){if(t==null)return{};try{return structuredClone(t)}catch{return JSON.parse(JSON.stringify(t))}}get isSafeProfile(){return this.profile==="safe"}get isPartialMode(){return this.partial||this.incrementalPartial}willUpdate(t){if(t.has("opsDataProvider")&&this.bindOpsDataProvider(),this.incrementalActive){super.willUpdate(t);return}if(this.props==null)(this.sduiPropsRef!=null||Object.keys(this.sduiDescriptor).length)&&(this.sduiPropsRef=null,this.sduiDescriptor={},this.updateContents());else{const e=this.props,s=this.sduiKey?e[this.sduiKey]:e,r=t.has("profile"),i=t.has("partial");if(this.sduiPropsRef==s&&!r&&!i){super.willUpdate(t);return}this.sduiPropsRef=s??null,this.sduiDescriptor=this.cloneDescriptor(s),this.updateContents()}super.willUpdate(t)}disconnectedCallback(){this.opsUnsub?.(),this.opsUnsub=void 0,super.disconnectedCallback()}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,Ll,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.rebuildNodeIndex(),this.parseRootNodes()}rebuildNodeIndex(){this.nodeIndex.clear();const t=e=>{e.nodeId&&this.nodeIndex.set(e.nodeId,e),e.nodes?.forEach(t)};if(this.sduiDescriptor.nodeById)for(const e of Object.keys(this.sduiDescriptor.nodeById)){const s=this.sduiDescriptor.nodeById[e];s.nodeId||(s.nodeId=e),this.nodeIndex.set(e,s),t(s)}if(this.sduiDescriptor.nodes?.forEach(t),this.sduiDescriptor.library)for(const e of Object.keys(this.sduiDescriptor.library))t(this.sduiDescriptor.library[e])}removeChildren(){for(;[...this.children].filter(t=>t.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js?.length)if(this.isSafeProfile)console.warn(np(this.sduiDescriptor.js));else for(const t of this.sduiDescriptor.js)gs.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)gs.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const e=await(await fetch(this.getAttribute("transformation"))).json();await new ep().transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const e=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((s,r)=>{const i=this.parseChild(s,`nodes[${r}]`);i&&this.appendChild(i)})}parseChild(t,e="node"){if(this.isSafeProfile&&rp(t))return console.warn(ip(e,t)),null;if(t.nodeId&&this.renderingStack.has(t.nodeId))return console.warn(`sonic-sdui : cycle détecté sur nodeId="${t.nodeId}" (${e})`),this.isPartialMode?Il(t.nodeId):null;t.nodeId&&this.renderingStack.add(t.nodeId);try{const s=t.tagName||"div";let{element:r,contentElement:i}=this.handleLibrary(t,s,e);if(!r)return null;this.handleAttributes(t,r),r=this.handleMarkup(t,r),i||(i=r),this.handleChildNodes(t,i,r,e),this.handleTextContent(t,i),this.handleInnerHTML(t,i);let n=r;return(t.prefix||t.suffix)&&(n=this.handlePrefixSuffix(t,r)),this.bindAction(t,n),t.nodeId&&n.setAttribute(ho,t.nodeId),n}finally{t.nodeId&&this.renderingStack.delete(t.nodeId)}}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}bindAction(t,e){const s=t.action;s?.name&&e.addEventListener("click",()=>{const r={name:s.name,context:s.context??{},sourceNodeId:t.nodeId};this.dispatchEvent(new CustomEvent("sdui-action",{detail:r,bubbles:!0,composed:!0}))})}handleChildNodes(t,e,s,r){if(t.nodes){const i=t.nodes;for(let n=0;n<i.length;n++){const o=i[n],l=this.parseChild(o,`${r}.nodes[${n}]`);l&&this.appendChildElement(o,l,e,s)}}if(t.childNodeIds?.length)for(const i of t.childNodeIds){const n=this.nodeIndex.get(i);if(n){const o=this.parseChild(n,`${r}.childNodeIds[${i}]`);o&&this.appendChildElement(n,o,e,s);continue}this.isPartialMode?this.appendToTarget(e,Il(i)):console.warn(`sonic-sdui : childNodeId "${i}" introuvable (${r}) — ignoré (activez partial pour un placeholder)`)}}appendChildElement(t,e,s,r){let i=s;t.parentElementSelector&&(i=r.querySelector(t.parentElementSelector)||s),this.appendToTarget(i,e)}appendToTarget(t,e){t.shadowRoot?t.shadowRoot.appendChild(e):t.tagName.toLocaleLowerCase()=="template"?t.content.appendChild(e):t.appendChild(e)}handleLibrary(t,e,s){let r,i;if(t.libraryKey&&this.sduiDescriptor.library){const n=`library.${t.libraryKey}`;if(r=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"},n),!r)return console.warn(`sonic-sdui (profile="safe") : nœud ignoré (${s}) — modèle libraryKey="${t.libraryKey}" refusé`),{element:null,contentElement:void 0};const o=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;o&&(i=r.querySelector(o))}else r=document.createElement(e);return{element:r,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const r in s){const i=s[r],n=Qr.isObject(i)?JSON.stringify(i):i;e.setAttribute(r,n)}}handleMarkup(t,e){return t.markup&&(e=document.createElement("div"),e.style.display="contents",e.innerHTML=t.markup),e}handleTextContent(t,e){t.textContent==null||!e||t.nodes?.length||t.childNodeIds?.length||(e.textContent=t.textContent)}handleInnerHTML(t,e){if(t.innerHTML)if(t.innerHTML.indexOf("wording_")!=-1){const s=this.getAncestorAttributeValue("wordingProvider");this.api?.post(s,{labels:[t.innerHTML.substring(8)]}).then(r=>{e&&(e.innerHTML+=r)})}else e&&(e.innerHTML+=t.innerHTML)}upsertNode(t,e,s){if(!t.nodeId){console.warn('sonic-sdui.upsertNode : "nodeId" est requis');return}this.beginIncremental();const r=t.nodeId;if(this.sduiDescriptor.nodeById||(this.sduiDescriptor.nodeById={}),this.sduiDescriptor.nodeById[r]=t,this.nodeIndex.set(r,t),e){let i=this.nodeIndex.get(e)||this.sduiDescriptor.nodeById[e];i||(i={nodeId:e,tagName:"div",childNodeIds:[]},this.sduiDescriptor.nodeById[e]=i,this.nodeIndex.set(e,i),this.sduiDescriptor.nodes||(this.sduiDescriptor.nodes=[]),this.sduiDescriptor.nodes.some(l=>l.nodeId===e)||this.sduiDescriptor.nodes.push(i)),i.childNodeIds||(i.childNodeIds=[]);const n=i.childNodeIds.indexOf(r);n>=0&&i.childNodeIds.splice(n,1);const o=s!=null?Math.max(0,Math.min(s,i.childNodeIds.length)):i.childNodeIds.length;i.childNodeIds.splice(o,0,r)}else{this.sduiDescriptor.nodes||(this.sduiDescriptor.nodes=[]);const i=this.sduiDescriptor.nodes,n=i.findIndex(o=>o.nodeId===r);n>=0?i[n]=t:s!=null?i.splice(Math.max(0,Math.min(s,i.length)),0,t):i.push(t)}this.rebuildNodeIndex(),this.domUpsertNode(t,e,s)}removeNode(t){if(this.beginIncremental(),delete this.sduiDescriptor.nodeById?.[t],this.nodeIndex.delete(t),this.sduiDescriptor.nodes&&(this.sduiDescriptor.nodes=this.sduiDescriptor.nodes.filter(e=>e.nodeId!==t)),this.sduiDescriptor.nodeById)for(const e of Object.values(this.sduiDescriptor.nodeById))e.childNodeIds&&(e.childNodeIds=e.childNodeIds.filter(s=>s!==t));this.findDomNode(t)?.remove()}setData(t,e){const s=It(t);if(s){s.set(e);return}if(this.dataProvider){const r=It(`${this.dataProvider}.${t}`);if(r){r.set(e);return}}console.warn(`sonic-sdui.setData : chemin introuvable "${t}"`)}applyOp(t){switch(t.op){case"upsertNode":this.upsertNode(t.node,t.parentId,t.index);break;case"removeNode":this.removeNode(t.nodeId);break;case"setData":this.setData(t.path,t.value);break;default:console.warn("sonic-sdui.applyOp : op inconnue",t)}}endIncremental(){this.incrementalActive=!1,this.incrementalPartial=!1}beginIncremental(){if(!this.incrementalActive){if(this.sduiDescriptor=structuredClone(this.sduiDescriptor||{}),this.sduiDescriptor.nodeById||(this.sduiDescriptor.nodeById={}),this.sduiDescriptor.nodes||(this.sduiDescriptor.nodes=[]),!this.sduiDescriptor.library){const t={};Object.assign(t,Ll),this.sduiDescriptor.library=t}this.incrementalActive=!0,this.incrementalPartial=!0,this.rebuildNodeIndex()}}findDomNode(t){const e=typeof CSS<"u"&&CSS.escape?CSS.escape(t):t.replace(/"/g,'\\"');return this.querySelector(`[${ho}="${e}"]`)}domUpsertNode(t,e,s){const r=this.parseChild(t,`upsert:${t.nodeId}`);if(!r)return;const i=this.findDomNode(t.nodeId);if(i&&i!==r){i.replaceWith(r);return}if(i===r)return;if(e){const o=this.findDomNode(e);if(o){const l=Array.from(o.children);s!=null&&s<l.length?o.insertBefore(r,l[s]):o.appendChild(r);return}}const n=this.querySelector("sonic-toast-message-subscriber");n?this.insertBefore(r,n):this.appendChild(r)}bindOpsDataProvider(){this.opsUnsub?.(),this.opsUnsub=void 0;const t=this.opsDataProvider;if(!t)return;const e=It(t);if(!e)return;const s=i=>{if(i==null)return;const n=Array.isArray(i)?i:[i];for(const o of n)o&&typeof o=="object"&&"op"in o&&this.applyOp(o)};e.onAssign(s),this.opsUnsub=()=>e.offAssign(s);const r=e.get();r!=null&&s(r)}};$r([u()],rr.prototype,"sduiKey",2),$r([u()],rr.prototype,"messagesKey",2),$r([u({type:String,reflect:!0})],rr.prototype,"profile",2),$r([u({type:Boolean,reflect:!0})],rr.prototype,"partial",2),$r([u({type:String})],rr.prototype,"opsDataProvider",2),rr=$r([X(lp)],rr);var cp=Object.defineProperty,up=Object.getOwnPropertyDescriptor,Nl=(t,e,s,r)=>{for(var i=r>1?void 0:r?up(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&cp(e,s,i),i};let rn=class extends sr(Q){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach(e=>{this.publisher.offAssign(e.subscriber)})}parseComposition(t,e){if(t)for(const s in t){const r=t[s];if(typeof r=="string"){const i=r.split("."),n=i.shift();if(!n)continue;let o=ye.get(n);o=Qr.traverse(o,i);const l={publisher:o,subscriber:h=>{e[s]=h}};this.listeners.push(l),o.onAssign(l.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const i=new Ur({},e);e._proxies_.set(s,i);const n={publisher:i,subscriber:o=>{e[s]=o}};this.listeners.push(n),i.onAssign(n.subscriber),this.parseComposition(r,i)}}}render(){return R`<slot></slot>`}};rn.styles=[Z`
1395
1395
  :host {
1396
1396
  display: contents;
1397
1397
  }
1398
- `],Ml([u({type:Object})],rn.prototype,"composition",1),rn=Ml([X("sonic-mix")],rn);var up=Object.defineProperty,hp=Object.getOwnPropertyDescriptor,Dr=(t,e,s,r)=>{for(var i=r>1?void 0:r?hp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&up(e,s,i),i};let Ms=class extends Q{constructor(){super(...arguments),this.inputProvider="",this.outputProvider="",this.formDataProvider="",this.expression="",this.outputSchema=null,this.handle=null}connectedCallback(){super.connectedCallback(),this.restart()}disconnectedCallback(){this.handle?.stop(),this.handle=null,super.disconnectedCallback()}updated(t){(t.has("expression")||t.has("inputProvider")||t.has("outputProvider")||t.has("formDataProvider")||t.has("outputSchema"))&&this.restart()}restart(){if(this.handle?.stop(),this.handle=null,!this.isConnected||!this.inputProvider||!this.outputProvider||!this.expression?.trim())return;const t=this.expression,e=this.outputSchema;this.handle=Au({inputs:{input:new Cs(this.inputProvider)},output:new Cs(this.outputProvider),variables:this.formDataProvider?new Cs(this.formDataProvider):void 0,compute:async({input:s},r)=>{const i=Eu(t),n={...r??{},input:s};let o;try{o=await i.evaluate({},n)}catch(l){const h=l instanceof Error?l.message:String(l);throw new Error(`[sonic-jsonata] Évaluation : ${h}`)}return Ou(o,e),o}})}render(){return R`<slot></slot>`}};Ms.styles=[Z`
1398
+ `],Nl([u({type:Object})],rn.prototype,"composition",1),rn=Nl([X("sonic-mix")],rn);var hp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,Dr=(t,e,s,r)=>{for(var i=r>1?void 0:r?dp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&hp(e,s,i),i};let Ms=class extends Q{constructor(){super(...arguments),this.inputProvider="",this.outputProvider="",this.formDataProvider="",this.expression="",this.outputSchema=null,this.handle=null}connectedCallback(){super.connectedCallback(),this.restart()}disconnectedCallback(){this.handle?.stop(),this.handle=null,super.disconnectedCallback()}updated(t){(t.has("expression")||t.has("inputProvider")||t.has("outputProvider")||t.has("formDataProvider")||t.has("outputSchema"))&&this.restart()}restart(){if(this.handle?.stop(),this.handle=null,!this.isConnected||!this.inputProvider||!this.outputProvider||!this.expression?.trim())return;const t=this.expression,e=this.outputSchema;this.handle=Cu({inputs:{input:new Cs(this.inputProvider)},output:new Cs(this.outputProvider),variables:this.formDataProvider?new Cs(this.formDataProvider):void 0,compute:async({input:s},r)=>{const i=Ou(t),n={...r??{},input:s};let o;try{o=await i.evaluate({},n)}catch(l){const h=l instanceof Error?l.message:String(l);throw new Error(`[sonic-jsonata] Évaluation : ${h}`)}return Tu(o,e),o}})}render(){return R`<slot></slot>`}};Ms.styles=[Z`
1399
1399
  :host {
1400
1400
  display: contents;
1401
1401
  }
1402
- `],Dr([u({type:String})],Ms.prototype,"inputProvider",2),Dr([u({type:String})],Ms.prototype,"outputProvider",2),Dr([u({type:String})],Ms.prototype,"formDataProvider",2),Dr([u({type:String})],Ms.prototype,"expression",2),Dr([u({type:Object})],Ms.prototype,"outputSchema",2),Ms=Dr([X("sonic-jsonata")],Ms);var dp=Object.getOwnPropertyDescriptor,pp=(t,e,s,r)=>{for(var i=r>1?void 0:r?dp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const fp="sonic-value";let Nl=class extends sr(Q){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?R`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:R`${He(this.props.toString())}<slot name="prefix"></slot><slot></slot
1403
- ><slot name="suffix"></slot>`}};Nl=pp([X(fp)],Nl);var mp=Object.defineProperty,gp=Object.getOwnPropertyDescriptor,ho=(t,e,s,r)=>{for(var i=r>1?void 0:r?gp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&mp(e,s,i),i};const bp="sonic-t";let nn=class extends Q{render(){return this.key?R`${tu(this.key,this.unsafeHTML)}`:ee}};ho([u({type:String})],nn.prototype,"key",2),ho([u({type:Boolean})],nn.prototype,"unsafeHTML",2),nn=ho([X(bp)],nn);var vp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,li=(t,e,s,r)=>{for(var i=r>1?void 0:r?yp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&vp(e,s,i),i};const wp="sonic-badge";let ir=class extends Q{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return R`
1402
+ `],Dr([u({type:String})],Ms.prototype,"inputProvider",2),Dr([u({type:String})],Ms.prototype,"outputProvider",2),Dr([u({type:String})],Ms.prototype,"formDataProvider",2),Dr([u({type:String})],Ms.prototype,"expression",2),Dr([u({type:Object})],Ms.prototype,"outputSchema",2),Ms=Dr([X("sonic-jsonata")],Ms);var pp=Object.getOwnPropertyDescriptor,fp=(t,e,s,r)=>{for(var i=r>1?void 0:r?pp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const mp="sonic-value";let Fl=class extends sr(Q){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?R`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:R`${He(this.props.toString())}<slot name="prefix"></slot><slot></slot
1403
+ ><slot name="suffix"></slot>`}};Fl=fp([X(mp)],Fl);var gp=Object.defineProperty,bp=Object.getOwnPropertyDescriptor,po=(t,e,s,r)=>{for(var i=r>1?void 0:r?bp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&gp(e,s,i),i};const yp="sonic-t";let nn=class extends Q{render(){return this.key?R`${su(this.key,this.unsafeHTML)}`:ee}};po([u({type:String})],nn.prototype,"key",2),po([u({type:Boolean})],nn.prototype,"unsafeHTML",2),nn=po([X(yp)],nn);var vp=Object.defineProperty,wp=Object.getOwnPropertyDescriptor,li=(t,e,s,r)=>{for(var i=r>1?void 0:r?wp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&vp(e,s,i),i};const _p="sonic-badge";let ir=class extends Q{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return R`
1404
1404
  <slot name="prefix"></slot>
1405
1405
  <slot></slot>
1406
1406
  <slot name="suffix"></slot>
1407
- `}};ir.styles=[Qt,el,Xa,Z`
1407
+ `}};ir.styles=[Qt,tl,el,Z`
1408
1408
  :host {
1409
1409
  --sc-_gap: 0.3em;
1410
1410
  --sc-_py: 0.35em;
@@ -1491,7 +1491,7 @@
1491
1491
  slot[name="prefix"] {
1492
1492
  flex-shrink: 0;
1493
1493
  }
1494
- `],li([u({type:String,reflect:!0})],ir.prototype,"type",2),li([u({type:String,reflect:!0})],ir.prototype,"variant",2),li([u({type:String,reflect:!0})],ir.prototype,"size",2),li([u({type:Boolean,reflect:!0})],ir.prototype,"ellipsis",2),ir=li([X(wp)],ir);class _p{static fixBlankLink(e){const r=typeof require>"u"||typeof process!="object"?null:require("electron");e.target=="_blank"&&e.addEventListener("click",()=>{r?.shell.openExternal(e.href)})}}var Sp=Object.defineProperty,Pp=Object.getOwnPropertyDescriptor,Er=(t,e,s,r)=>{for(var i=r>1?void 0:r?Pp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Sp(e,s,i),i};const xp="sonic-link";let Ns=class extends Q{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,dt.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(dt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,_p.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),dt.changeFromComponent(this)}get blankRel(){return this.target==="_blank"?"noopener noreferrer":void 0}render(){return this.href?R`
1494
+ `],li([u({type:String,reflect:!0})],ir.prototype,"type",2),li([u({type:String,reflect:!0})],ir.prototype,"variant",2),li([u({type:String,reflect:!0})],ir.prototype,"size",2),li([u({type:Boolean,reflect:!0})],ir.prototype,"ellipsis",2),ir=li([X(_p)],ir);class Sp{static fixBlankLink(e){const r=typeof require>"u"||typeof process!="object"?null:require("electron");e.target=="_blank"&&e.addEventListener("click",()=>{r?.shell.openExternal(e.href)})}}var Pp=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,Er=(t,e,s,r)=>{for(var i=r>1?void 0:r?xp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Pp(e,s,i),i};const Ap="sonic-link";let Ns=class extends Q{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,dt.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(dt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,Sp.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),dt.changeFromComponent(this)}get blankRel(){return this.target==="_blank"?"noopener noreferrer":void 0}render(){return this.href?R`
1495
1495
  <a
1496
1496
  href="${this.href}"
1497
1497
  aria-label=${this.ariaLabel||ee}
@@ -1521,13 +1521,13 @@
1521
1521
  outline-offset: 2px;
1522
1522
  border-radius: 2px;
1523
1523
  }
1524
- `],Er([u({type:String})],Ns.prototype,"href",2),Er([u({type:String,attribute:"data-aria-label"})],Ns.prototype,"ariaLabel",2),Er([u({type:String})],Ns.prototype,"autoActive",2),Er([u({type:String})],Ns.prototype,"target",1),Er([u({type:Boolean,reflect:!0})],Ns.prototype,"pushState",2),Ns=Er([X(xp)],Ns);var Ap=Object.defineProperty,Cp=Object.getOwnPropertyDescriptor,Or=(t,e,s,r)=>{for(var i=r>1?void 0:r?Cp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ap(e,s,i),i};const kp="sonic-progress";let Fs=class extends Q{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return R`
1524
+ `],Er([u({type:String})],Ns.prototype,"href",2),Er([u({type:String,attribute:"data-aria-label"})],Ns.prototype,"ariaLabel",2),Er([u({type:String})],Ns.prototype,"autoActive",2),Er([u({type:String})],Ns.prototype,"target",1),Er([u({type:Boolean,reflect:!0})],Ns.prototype,"pushState",2),Ns=Er([X(Ap)],Ns);var Cp=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,Or=(t,e,s,r)=>{for(var i=r>1?void 0:r?kp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Cp(e,s,i),i};const $p="sonic-progress";let Fs=class extends Q{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return R`
1525
1525
  <progress value=${se(this.value)} max=${this.max}></progress>
1526
1526
  <div class="slot-container">
1527
1527
  <slot></slot>
1528
1528
  <slot name="remaining"></slot>
1529
1529
  </div>
1530
- `}};Fs.styles=[Qt,Wi,Xa,Z`
1530
+ `}};Fs.styles=[Qt,Wi,el,Z`
1531
1531
  :host {
1532
1532
  --sc-_rounded: var(--sc-rounded-lg);
1533
1533
  --sc-_bg: var(--sc-base-50, rgba(0, 0, 0, 0.07));
@@ -1605,7 +1605,7 @@
1605
1605
  gap: 0.5em;
1606
1606
  margin-top: 0.15em;
1607
1607
  }
1608
- `],Or([u({type:Number})],Fs.prototype,"value",2),Or([u({type:Number})],Fs.prototype,"max",2),Or([u({type:Boolean,reflect:!0,attribute:"invert"})],Fs.prototype,"invert",2),Or([u({type:String,reflect:!0})],Fs.prototype,"type",2),Or([u({type:String,reflect:!0})],Fs.prototype,"size",2),Fs=Or([X(kp)],Fs);const $p=Z`
1608
+ `],Or([u({type:Number})],Fs.prototype,"value",2),Or([u({type:Number})],Fs.prototype,"max",2),Or([u({type:Boolean,reflect:!0,attribute:"invert"})],Fs.prototype,"invert",2),Or([u({type:String,reflect:!0})],Fs.prototype,"type",2),Or([u({type:String,reflect:!0})],Fs.prototype,"size",2),Fs=Or([X($p)],Fs);const Dp=Z`
1609
1609
  .password-toggle {
1610
1610
  color: var(--sc-input-c);
1611
1611
  font-size: var(--sc-input-fs);
@@ -1637,7 +1637,7 @@
1637
1637
  margin-top: 0.2em;
1638
1638
  display: block;
1639
1639
  }
1640
- `,po=Z`
1640
+ `,fo=Z`
1641
1641
  * {
1642
1642
  box-sizing: border-box;
1643
1643
  }
@@ -1992,7 +1992,7 @@
1992
1992
  --sc-input-addon-bg: var(--sc-primary, var(--sc-base-content, #000));
1993
1993
  --sc-input-addon-color: var(--sc-primary-content, var(--sc-base, #fff));
1994
1994
  }
1995
- `;var Dp=Object.defineProperty,Ep=Object.getOwnPropertyDescriptor,qe=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ep(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Dp(e,s,i),i};const Op="sonic-input";let Fe=class extends Gi(_r(Q)){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs")||void 0,this.sameValueAsHandle=e=>this.pattern=this.escapeRegExp(e);const t=this.getFormPublisher();if(!t||!this.sameValueAsName)return;Ot(t,this.sameValueAsName).onAssign(this.sameValueAsHandle)}this.type=="password"&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;Ot(t,this.sameValueAsName).offAssign(this.sameValueAsHandle)}}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(t){this.hasSlotOrProps(),this.autoActive&&t.has("value")&&(this.active=!!this.value),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(t){if(!this.hasAttribute("inputDelayMs")){super.handleChange(t);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(t),parseInt(this.getAttribute("inputDelayMs")||"0"))}togglePasswordVisibility(t){t.preventDefault(),t.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return R`
1995
+ `;var Ep=Object.defineProperty,Op=Object.getOwnPropertyDescriptor,qe=(t,e,s,r)=>{for(var i=r>1?void 0:r?Op(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ep(e,s,i),i};const Tp="sonic-input";let Fe=class extends Gi(_r(Q)){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs")||void 0,this.sameValueAsHandle=e=>this.pattern=this.escapeRegExp(e);const t=this.getFormPublisher();if(!t||!this.sameValueAsName)return;Ot(t,this.sameValueAsName).onAssign(this.sameValueAsHandle)}this.type=="password"&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;Ot(t,this.sameValueAsName).offAssign(this.sameValueAsHandle)}}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(t){this.hasSlotOrProps(),this.autoActive&&t.has("value")&&(this.active=!!this.value),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(t){if(!this.hasAttribute("inputDelayMs")){super.handleChange(t);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(t),parseInt(this.getAttribute("inputDelayMs")||"0"))}togglePasswordVisibility(t){t.preventDefault(),t.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return R`
1996
1996
  <label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
1997
1997
  >${this.label?He(this.label):""}<slot
1998
1998
  name="label"
@@ -2057,7 +2057,7 @@
2057
2057
  >${this.description?R`${He(this.description)}`:ee}</slot>
2058
2058
  <slot name="list"></slot>
2059
2059
  </div>
2060
- `}};Fe.styles=[Qt,po,on,an,$p,Z`
2060
+ `}};Fe.styles=[Qt,fo,on,an,Dp,Z`
2061
2061
  :host([type="hidden"]) {
2062
2062
  appearance: none !important;
2063
2063
  display: none !important;
@@ -2065,7 +2065,7 @@
2065
2065
  :host > .form-control {
2066
2066
  position: relative;
2067
2067
  }
2068
- `],qe([u({type:String,reflect:!0})],Fe.prototype,"size",2),qe([u({type:String})],Fe.prototype,"inputmode",2),qe([u({type:String})],Fe.prototype,"list",2),qe([u({type:String})],Fe.prototype,"placeholder",2),qe([u({type:String})],Fe.prototype,"pattern",2),qe([u({type:String})],Fe.prototype,"min",2),qe([u({type:String})],Fe.prototype,"max",2),qe([u({type:Boolean,reflect:!0})],Fe.prototype,"readonly",2),qe([u({type:Number})],Fe.prototype,"step",2),qe([u({type:Number})],Fe.prototype,"minlength",2),qe([u({type:Number})],Fe.prototype,"maxlength",2),qe([u({type:String})],Fe.prototype,"src",2),qe([u({type:Boolean,reflect:!0})],Fe.prototype,"inlineContent",2),qe([u({type:Boolean})],Fe.prototype,"disableInlineContentFocus",2),qe([u({type:Boolean})],Fe.prototype,"showPasswordToggle",2),qe([u({type:Boolean})],Fe.prototype,"autoActive",2),qe([u({type:Boolean,reflect:!0})],Fe.prototype,"active",2),qe([bt({slot:"label",flatten:!0})],Fe.prototype,"slotLabelNodes",2),qe([bt({slot:"description",flatten:!0})],Fe.prototype,"slotDescriptionNodes",2),qe([bt({slot:"suffix",flatten:!0})],Fe.prototype,"slotSuffixNodes",2),qe([bt({slot:"prefix",flatten:!0})],Fe.prototype,"slotPrefixNodes",2),qe([$s("input")],Fe.prototype,"input",2),qe([xe()],Fe.prototype,"hasDescription",2),qe([xe()],Fe.prototype,"hasLabel",2),qe([xe()],Fe.prototype,"hasSuffix",2),qe([xe()],Fe.prototype,"hasPrefix",2),qe([xe()],Fe.prototype,"isPassword",2),Fe=qe([X(Op)],Fe);const Tp=["top","right","bottom","left"],Lp=["start","center","end"];function Fl(t,e,s){const[r,i]=(t??"").split("-");return{side:Tp.includes(r)?r:e,align:Lp.includes(i)?i:s}}const Rl="popover"in HTMLElement.prototype,Ip={top:"bottom",bottom:"top",left:"right",right:"left"};function jl(t,e=0){const s=ze.getScrollableAncestor(t)?.getBoundingClientRect();return{minX:Math.max(0,s?.left||0)+e,minY:Math.max(0,s?.top||0)+e,maxX:Math.min(window.innerWidth,s?.right||window.innerWidth)-e,maxY:Math.min(window.innerHeight,s?.bottom||window.innerHeight)-e}}function ln(t,e,s,r){return r==="start"?t:r==="end"?t+e-s:t+(e-s)/2}function zl(t,e,s,r,i){switch(s){case"top":return{x:ln(t.left,t.width,e.width,r),y:t.top-e.height-i};case"bottom":return{x:ln(t.left,t.width,e.width,r),y:t.bottom+i};case"left":return{x:t.left-e.width-i,y:ln(t.top,t.height,e.height,r)};case"right":return{x:t.right+i,y:ln(t.top,t.height,e.height,r)};default:return{x:t.left,y:t.top}}}function Mp(t,e,s,r){switch(s){case"top":return t.y<r.minY;case"bottom":return t.y+e.height>r.maxY;case"left":return t.x<r.minX;case"right":return t.x+e.width>r.maxX;default:return!1}}function Ul({anchor:t,floating:e,side:s,align:r="center",gap:i=0,bounds:n}){let o=s,l=zl(t,e,o,r,i);return Mp(l,e,o,n)&&(o=Ip[o],l=zl(t,e,o,r,i)),{side:o,x:Math.min(Math.max(l.x,n.minX),n.maxX-e.width),y:Math.min(Math.max(l.y,n.minY),n.maxY-e.height)}}function ql(t){let e=0;const s=()=>{t(),e=requestAnimationFrame(s)};return s(),()=>cancelAnimationFrame(e)}const fo=Z`
2068
+ `],qe([u({type:String,reflect:!0})],Fe.prototype,"size",2),qe([u({type:String})],Fe.prototype,"inputmode",2),qe([u({type:String})],Fe.prototype,"list",2),qe([u({type:String})],Fe.prototype,"placeholder",2),qe([u({type:String})],Fe.prototype,"pattern",2),qe([u({type:String})],Fe.prototype,"min",2),qe([u({type:String})],Fe.prototype,"max",2),qe([u({type:Boolean,reflect:!0})],Fe.prototype,"readonly",2),qe([u({type:Number})],Fe.prototype,"step",2),qe([u({type:Number})],Fe.prototype,"minlength",2),qe([u({type:Number})],Fe.prototype,"maxlength",2),qe([u({type:String})],Fe.prototype,"src",2),qe([u({type:Boolean,reflect:!0})],Fe.prototype,"inlineContent",2),qe([u({type:Boolean})],Fe.prototype,"disableInlineContentFocus",2),qe([u({type:Boolean})],Fe.prototype,"showPasswordToggle",2),qe([u({type:Boolean})],Fe.prototype,"autoActive",2),qe([u({type:Boolean,reflect:!0})],Fe.prototype,"active",2),qe([bt({slot:"label",flatten:!0})],Fe.prototype,"slotLabelNodes",2),qe([bt({slot:"description",flatten:!0})],Fe.prototype,"slotDescriptionNodes",2),qe([bt({slot:"suffix",flatten:!0})],Fe.prototype,"slotSuffixNodes",2),qe([bt({slot:"prefix",flatten:!0})],Fe.prototype,"slotPrefixNodes",2),qe([$s("input")],Fe.prototype,"input",2),qe([xe()],Fe.prototype,"hasDescription",2),qe([xe()],Fe.prototype,"hasLabel",2),qe([xe()],Fe.prototype,"hasSuffix",2),qe([xe()],Fe.prototype,"hasPrefix",2),qe([xe()],Fe.prototype,"isPassword",2),Fe=qe([X(Tp)],Fe);const Lp=["top","right","bottom","left"],Ip=["start","center","end"];function Rl(t,e,s){const[r,i]=(t??"").split("-");return{side:Lp.includes(r)?r:e,align:Ip.includes(i)?i:s}}const jl="popover"in HTMLElement.prototype,Mp={top:"bottom",bottom:"top",left:"right",right:"left"};function zl(t,e=0){const s=ze.getScrollableAncestor(t)?.getBoundingClientRect();return{minX:Math.max(0,s?.left||0)+e,minY:Math.max(0,s?.top||0)+e,maxX:Math.min(window.innerWidth,s?.right||window.innerWidth)-e,maxY:Math.min(window.innerHeight,s?.bottom||window.innerHeight)-e}}function ln(t,e,s,r){return r==="start"?t:r==="end"?t+e-s:t+(e-s)/2}function Ul(t,e,s,r,i){switch(s){case"top":return{x:ln(t.left,t.width,e.width,r),y:t.top-e.height-i};case"bottom":return{x:ln(t.left,t.width,e.width,r),y:t.bottom+i};case"left":return{x:t.left-e.width-i,y:ln(t.top,t.height,e.height,r)};case"right":return{x:t.right+i,y:ln(t.top,t.height,e.height,r)};default:return{x:t.left,y:t.top}}}function Np(t,e,s,r){switch(s){case"top":return t.y<r.minY;case"bottom":return t.y+e.height>r.maxY;case"left":return t.x<r.minX;case"right":return t.x+e.width>r.maxX;default:return!1}}function ql({anchor:t,floating:e,side:s,align:r="center",gap:i=0,bounds:n}){let o=s,l=Ul(t,e,o,r,i);return Np(l,e,o,n)&&(o=Mp[o],l=Ul(t,e,o,r,i)),{side:o,x:Math.min(Math.max(l.x,n.minX),n.maxX-e.width),y:Math.min(Math.max(l.y,n.minY),n.maxY-e.height)}}function Bl(t){let e=0;const s=()=>{t(),e=requestAnimationFrame(s)};return s(),()=>cancelAnimationFrame(e)}const mo=Z`
2069
2069
  /*OMBRE*/
2070
2070
  :host([shadow]) .shadowable,
2071
2071
  :host([shadow="md"]) .shadowable,
@@ -2084,7 +2084,7 @@
2084
2084
  :host([shadow="none"]) .shadowable {
2085
2085
  box-shadow: none;
2086
2086
  }
2087
- `;var Np=Object.defineProperty,Fp=Object.getOwnPropertyDescriptor,os=(t,e,s,r)=>{for(var i=r>1?void 0:r?Fp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Np(e,s,i),i};let Bl=!1;function Rp(t){return t.includes(" ")?(Bl||(Bl=!0,console.warn(`[concorde] sonic-pop placement="${t}" est déprécié, utiliser placement="${t.replace(" ","-")}".`)),t.replace(" ","-")):t}const jp="sonic-pop";let Le=class extends Q{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.pendingShow=!1,this.ancestorsHavingZIndex=new Set}toggle(t){if(this.open&&this.noToggle)return;const e=t;t.type=="keydown"&&(e.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=t.target),this.open?this.hide():this.show())}show(){if(!this.popContent){this.pendingShow=!0,this.updateComplete.then(()=>{this.pendingShow&&this.show()});return}this.pendingShow=!1,!this.open&&(Le.supportsPopover||this.setMaxZindex(),clearTimeout(this.hideDisplayTimeout),this.popContent?.style?.removeProperty("display"),Le.supportsPopover&&!this.popContent.matches(":popover-open")&&this.popContent.showPopover(),this.open=!0,Le.pops.delete(this)&&Le.pops.add(this),this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.stopPositioning&&(this.lastContentX=0,this.lastContentY=0,this.stopPositioning=ql(()=>this.computePosition(this.placement))),this.dispatchEvent(new CustomEvent("show")))}hide(){if(this.pendingShow=!1,!this.popContent){this.dispatchEvent(new CustomEvent("hide"));return}Le.supportsPopover||this.resetZindexes(),Le.supportsPopover&&this.popContent?.matches(":popover-open")&&this.popContent.hidePopover(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.stopPositionLoop(),Le.supportsPopover||this.hideContentAfterTransition(),this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),this.dispatchEvent(new CustomEvent("hide"))}stopPositionLoop(){this.stopPositioning?.(),this.stopPositioning=void 0}hideContentAfterTransition(){clearTimeout(this.hideDisplayTimeout);const t=parseFloat(getComputedStyle(this.popContent).transitionDuration)*1e3;this.hideDisplayTimeout=setTimeout(()=>{this.open||(this.popContent.style.display="none")},t||0)}setMaxZindex(){ze.everyAncestors(this,t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const r=getComputedStyle(e);return r.position!=="relative"&&r.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(t),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(t=>{t.style.removeProperty("position"),t.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(t){const e=t.composedPath(),s=e[0];Le.pops.forEach(r=>{if(!r.open)return;const i=e.includes(r),n=e.includes(r.querySelector('[slot="content"]')),o=ze.getAncestorAttributeValue(s,"data-on-select")==="keep";t.type=="pointerdown"&&i||t.type=="click"&&(i&&o||!n)||r.hide()})}connectedCallback(){super.connectedCallback(),Le.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",Le._handleKeyDown,!0)),Le.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),this.stopPositionLoop(),clearTimeout(this.hideDisplayTimeout),this.open&&(Le.supportsPopover||this.resetZindexes(),this.open=!1,this.triggerElement=null,this.popContent?.style.setProperty("display","none")),super.disconnectedCallback(),Le.pops.delete(this),Le.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",Le._handleKeyDown,!0))}computePosition(t){const{side:e,align:s}=Fl(Rp(t),"bottom","start"),r=this.popContent.getBoundingClientRect(),{x:i,y:n}=Ul({anchor:this.getBoundingClientRect(),floating:r,side:e,align:s,bounds:jl(this.popContent,5)});this.lastContentX+=i-r.x,this.lastContentY+=n-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}static _handleKeyDown(t){if(t.key!=="Escape")return;const e=[...Le.pops].reverse().find(s=>s.open);e&&(t.stopPropagation(),e.hide())}render(){return R`
2087
+ `;var Fp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,os=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Fp(e,s,i),i};let Hl=!1;function jp(t){return t.includes(" ")?(Hl||(Hl=!0,console.warn(`[concorde] sonic-pop placement="${t}" est déprécié, utiliser placement="${t.replace(" ","-")}".`)),t.replace(" ","-")):t}const zp="sonic-pop";let Le=class extends Q{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.pendingShow=!1,this.ancestorsHavingZIndex=new Set}toggle(t){if(this.open&&this.noToggle)return;const e=t;t.type=="keydown"&&(e.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=t.target),this.open?this.hide():this.show())}show(){if(!this.popContent){this.pendingShow=!0,this.updateComplete.then(()=>{this.pendingShow&&this.show()});return}this.pendingShow=!1,!this.open&&(Le.supportsPopover||this.setMaxZindex(),clearTimeout(this.hideDisplayTimeout),this.popContent?.style?.removeProperty("display"),Le.supportsPopover&&!this.popContent.matches(":popover-open")&&this.popContent.showPopover(),this.open=!0,Le.pops.delete(this)&&Le.pops.add(this),this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.stopPositioning&&(this.lastContentX=0,this.lastContentY=0,this.stopPositioning=Bl(()=>this.computePosition(this.placement))),this.dispatchEvent(new CustomEvent("show")))}hide(){if(this.pendingShow=!1,!this.popContent){this.dispatchEvent(new CustomEvent("hide"));return}Le.supportsPopover||this.resetZindexes(),Le.supportsPopover&&this.popContent?.matches(":popover-open")&&this.popContent.hidePopover(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.stopPositionLoop(),Le.supportsPopover||this.hideContentAfterTransition(),this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),this.dispatchEvent(new CustomEvent("hide"))}stopPositionLoop(){this.stopPositioning?.(),this.stopPositioning=void 0}hideContentAfterTransition(){clearTimeout(this.hideDisplayTimeout);const t=parseFloat(getComputedStyle(this.popContent).transitionDuration)*1e3;this.hideDisplayTimeout=setTimeout(()=>{this.open||(this.popContent.style.display="none")},t||0)}setMaxZindex(){ze.everyAncestors(this,t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const r=getComputedStyle(e);return r.position!=="relative"&&r.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(t),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(t=>{t.style.removeProperty("position"),t.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(t){const e=t.composedPath(),s=e[0];Le.pops.forEach(r=>{if(!r.open)return;const i=e.includes(r),n=e.includes(r.querySelector('[slot="content"]')),o=ze.getAncestorAttributeValue(s,"data-on-select")==="keep";t.type=="pointerdown"&&i||t.type=="click"&&(i&&o||!n)||r.hide()})}connectedCallback(){super.connectedCallback(),Le.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",Le._handleKeyDown,!0)),Le.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),this.stopPositionLoop(),clearTimeout(this.hideDisplayTimeout),this.open&&(Le.supportsPopover||this.resetZindexes(),this.open=!1,this.triggerElement=null,this.popContent?.style.setProperty("display","none")),super.disconnectedCallback(),Le.pops.delete(this),Le.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",Le._handleKeyDown,!0))}computePosition(t){const{side:e,align:s}=Rl(jp(t),"bottom","start"),r=this.popContent.getBoundingClientRect(),{x:i,y:n}=ql({anchor:this.getBoundingClientRect(),floating:r,side:e,align:s,bounds:zl(this.popContent,5)});this.lastContentX+=i-r.x,this.lastContentY+=n-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}static _handleKeyDown(t){if(t.key!=="Escape")return;const e=[...Le.pops].reverse().find(s=>s.open);e&&(t.stopPropagation(),e.hide())}render(){return R`
2088
2088
  <slot
2089
2089
  @click=${this.manual?()=>{}:this.toggle}
2090
2090
  @keydown=${this.manual?()=>{}:this.toggle}
@@ -2098,7 +2098,7 @@
2098
2098
  class="shadowable
2099
2099
  ${this.open?"is-open":""}"
2100
2100
  ></slot>
2101
- `}};Le.pops=new Set,Le.supportsPopover=Rl,Le.styles=[Z`
2101
+ `}};Le.pops=new Set,Le.supportsPopover=jl,Le.styles=[Z`
2102
2102
  :host {
2103
2103
  display: inline-block;
2104
2104
  vertical-align: middle;
@@ -2160,11 +2160,11 @@
2160
2160
  :host([inline]) {
2161
2161
  vertical-align: baseline;
2162
2162
  }
2163
- `,fo],os([xe()],Le.prototype,"open",2),os([$s("slot:not([name=content])")],Le.prototype,"popBtn",2),os([$s("slot[name=content]")],Le.prototype,"popContent",2),os([u({type:Boolean})],Le.prototype,"noToggle",2),os([u({type:Boolean,reflect:!0})],Le.prototype,"inline",2),os([u({type:Boolean})],Le.prototype,"manual",2),os([u({type:String,reflect:!0})],Le.prototype,"shadow",2),os([u({type:String})],Le.prototype,"placement",2),os([xe()],Le.prototype,"triggerElement",2),Le=os([X(jp)],Le);var zp=Object.getOwnPropertyDescriptor,Up=(t,e,s,r)=>{for(var i=r>1?void 0:r?zp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const qp="sonic-menu-item";let Hl=class extends Ne{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const t=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!t&&(this.align="left"),super.connectedCallback()}};Hl=Up([X(qp)],Hl);/**
2163
+ `,mo],os([xe()],Le.prototype,"open",2),os([$s("slot:not([name=content])")],Le.prototype,"popBtn",2),os([$s("slot[name=content]")],Le.prototype,"popContent",2),os([u({type:Boolean})],Le.prototype,"noToggle",2),os([u({type:Boolean,reflect:!0})],Le.prototype,"inline",2),os([u({type:Boolean})],Le.prototype,"manual",2),os([u({type:String,reflect:!0})],Le.prototype,"shadow",2),os([u({type:String})],Le.prototype,"placement",2),os([xe()],Le.prototype,"triggerElement",2),Le=os([X(zp)],Le);var Up=Object.getOwnPropertyDescriptor,qp=(t,e,s,r)=>{for(var i=r>1?void 0:r?Up(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Bp="sonic-menu-item";let Vl=class extends Ne{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const t=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!t&&(this.align="left"),super.connectedCallback()}};Vl=qp([X(Bp)],Vl);/**
2164
2164
  * @license
2165
2165
  * Copyright 2021 Google LLC
2166
2166
  * SPDX-License-Identifier: BSD-3-Clause
2167
- */class Vl{constructor(e,{target:s,config:r,callback:i,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,s!==null&&this.t.add(s??e),this.l=r,this.o=n??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((o=>{this.handleChanges(o),this.h.requestUpdate()})),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}}var Bp=Object.defineProperty,Hp=Object.getOwnPropertyDescriptor,ft=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Bp(e,s,i),i};const Vp="data-autocomplete-value",Wp="data-autocomplete-label";let et=class extends oo(ul(cl(Q))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.serviceURL="",this.minSearchLength=3,this.key="",this.searchParameter="",this.propertyName="",this.items=null,this.hasInputPrefix=!1,this._resizeController=new Vl(this,{}),this.searchText="",this.searchDataProvider="",this.queueFilterDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.providersReady=!1,this.suppressPopOpen=!1,this.filterArmed=!1,this.updateSearchParameter=t=>{if(t==""||t==null){this.isSearchParameter()&&(this.lastValidSearch="",this.setSearchText(""));return}this.queryQueueListItem(this.queueDataProvider,s=>(this.propertyName==="_self"?s:s[this.propertyName||this.name])==t,this.setSearchFromSelection)||!this.queryQueueListItem(this.initQueueDataProvider,r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==t,this.setSearchFromSelection)&&this.isSearchParameter()&&(this.lastValidSearch=t,this.setSearchText(String(t)))},this.onSearchPublisherAssign=t=>{const e=t==null?"":String(t);this.searchText!==e&&(this.searchText=e),this.syncQueueFilter(e),this.openPopIfNeeded(e)},this.handleSearchActivity=()=>{const t=String(this.searchPublisher?.get()??this.searchText??"");this.openPopIfNeeded(t,!0)},this.handleSearchKeyUp=t=>{t.ctrlKey||t.metaKey||t.altKey||["Escape","Tab","Enter","ArrowUp","ArrowDown"].includes(t.key)||this.handleSearchActivity()},this.handleSearchKeyDown=t=>{const e=t.composedPath(),s=e.some(o=>o?.tagName==="SONIC-MENU-ITEM");if(s&&(t.key==="Enter"||t.key===" ")){const o=e.find(l=>l?.tagName==="SONIC-MENU-ITEM");if(!o)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o);return}if(s)return;const r=String(this.searchPublisher?.get()??this.searchText??"");if(!this.shouldShowSuggestions(r))return;if(t.key==="Enter"){const o=this.getSuggestionItems();if(!o.length)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o[0]);return}if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;t.preventDefault(),t.stopPropagation(),this.suppressPopOpen=!1,this.popElement?.show(),requestAnimationFrame(()=>this.popElement?.show());const i=this.getSuggestionItems();if(!i.length)return;(t.key==="ArrowDown"?i[0]:i[i.length-1]).focus?.()},this.handleSuggestionPointerDown=t=>{const e=t.composedPath().find(s=>s?.tagName==="SONIC-MENU-ITEM");e&&(t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(e))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.findSelection=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{this.lastValidSearch=this.propertyName==="_self"?t:t[this.searchParameter||this.propertyName||this.name],this.setSearchText(this.lastValidSearch)},this.handleFocusOut=t=>{const e=t.relatedTarget;this.deepContains(this.popElement,e)||this.deepContains(this,e)||setTimeout(()=>{if(this.suppressPopOpen)return;const s=document.activeElement;!s||this.deepContains(this.popElement,s)||this.deepContains(this,s)||this.popElement?.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}searchFieldName(){return this.searchParameter||this.name}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}shouldShowSuggestions(t){return(t?.length||0)>=this.minSearchLength||this.minSearchLength===0}isSearchFocused(){const t=document.activeElement;if(!t)return!1;const e=this.renderRoot?.querySelector("sonic-input.form-element");return!!(e&&(t===e||e.contains(t)||e.shadowRoot?.contains(t)))}openPopIfNeeded(t,e=!1){if(!this.suppressPopOpen){if(!this.shouldShowSuggestions(t)){this.popElement?.hide();return}(e||this.isSearchFocused()||this.popElement?.open)&&(this.popElement?.show(),requestAnimationFrame(()=>{if(this.suppressPopOpen)return;const s=String(this.searchPublisher?.get()??this.searchText??"");this.shouldShowSuggestions(s)&&this.popElement?.show()}))}}setSearchText(t){const e=t==null||t===""?"":typeof t=="string"?t:String(t);this.searchText=e,this.searchPublisher&&this.searchPublisher.get()!==e&&this.searchPublisher.set(e),this.syncQueueFilter(e)}syncQueueFilter(t){if(!this.queueFilterPublisher)return;if(this.minSearchLength===0||t.length>=this.minSearchLength){(!this.filterArmed||this.queueFilterPublisher.get()!==t)&&this.queueFilterPublisher.set(t),this.filterArmed=!0;return}this.filterArmed&&(this.filterArmed=!1,this.clearSearchQueueResults())}clearSearchQueueResults(){if(!this.queueDataProvider)return;const t=ve.get(this.queueDataProvider),e=t.get();if(Array.isArray(e))for(const s of e)s?.dataProvider&&ve.getInstance().delete(s.dataProvider);t.set([])}applySuggestion(t,e){this.suppressPopOpen=!0;const s=t,r=e||(typeof s=="string"?s:String(s??""));this.formValuePublisher?.set(s),this.lastValidSearch=this.isSearchParameter()?s:r,this.setSearchText(this.isSearchParameter()?String(s??""):r),this.popElement?.hide(),requestAnimationFrame(()=>{this.suppressPopOpen=!1})}getSuggestionItems(){return[...this.renderRoot?.querySelectorAll("sonic-menu-item")??[]]}selectSuggestionItem(t){const e=t.getAttribute(Vp)??t.value??null,s=t.getAttribute(Wp)??(t.textContent||"").trim();e==null&&!s||this.applySuggestion(e??s,s)}setupProviders(){const t=this.searchFieldName(),e=this.formDataProvider||this.getAncestorAttributeValue("formDataProvider")||"",s=et.instanceCounter++,r=(e||"form")+"__"+(this.name||"field")+"__autocomplete__"+s;this.initSearchDataProvider=`${r}_init_search__`,this.initQueueDataProvider=`${r}_init_queue__`,this.searchDataProvider=`${r}_search__`,this.queueFilterDataProvider=`${r}_queue_filter__`,this.queueDataProvider=`${r}_queue__`;const i=ve.get;this.searchPublisher=i(this.searchDataProvider)[t],this.queueFilterPublisher=i(this.queueFilterDataProvider)[t],this.formValuePublisher=Ot(i(e),this.name),this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&i(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.searchPublisher?.onAssign(this.onSearchPublisherAssign);const n=this.searchPublisher?.get();n!=null&&n!==""&&(this.searchText=String(n),this.syncQueueFilter(this.searchText)),this.providersReady=!0}teardownProviders(){this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.searchPublisher?.offAssign(this.onSearchPublisherAssign);const t=ve.get;this.initSearchDataProvider&&t(this.initSearchDataProvider).delete(),this.initQueueDataProvider&&t(this.initQueueDataProvider).delete(),this.searchDataProvider&&t(this.searchDataProvider).delete(),this.queueFilterDataProvider&&t(this.queueFilterDataProvider).delete(),this.queueDataProvider&&t(this.queueDataProvider).delete(),this.providersReady=!1}connectedCallback(){super.connectedCallback(),this.setupProviders(),this.addEventListener("keyup",this.handleSearchKeyUp),this.addEventListener("keydown",this.handleSearchKeyDown,!0)}firstUpdated(t){super.firstUpdated(t),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){this.removeEventListener("keyup",this.handleSearchKeyUp),this.removeEventListener("keydown",this.handleSearchKeyDown,!0),this.teardownProviders(),this.popElement?.removeEventListener("focusout",this.handleFocusOut),super.disconnectedCallback()}queryQueueListItem(t,e,s){const r=ve.get(t);let i;const n=r.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){const l=ve.get(o.dataProvider).get();if(Array.isArray(l)&&(i=l.find(e),i))break}return i?(s(i),!0):!1}setSelectionRange(t,e){this.renderRoot?.querySelector("sonic-input.form-element")?.setSelectionRange(t,e)}handleHide(){if(this.select){if(!this.searchText){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.setSearchText(this.lastValidSearch)}}deepContains(t,e){if(!t||!e)return!1;let s=e;for(;s;){if(s===t||t.contains(s))return!0;const r=s.getRootNode();if(r instanceof ShadowRoot)s=r.host;else break}return!1}handleFocus(){const t=String(this.searchText??"");this.shouldShowSuggestions(t)&&(this.suppressPopOpen=!1,this.popElement?.show())}render(){if(!this.providersReady||!this.searchDataProvider)return ee;const t=this.templateList.concat(this.templatePartsList);return R`
2167
+ */class Wl{constructor(e,{target:s,config:r,callback:i,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,s!==null&&this.t.add(s??e),this.l=r,this.o=n??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((o=>{this.handleChanges(o),this.h.requestUpdate()})),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}}var Hp=Object.defineProperty,Vp=Object.getOwnPropertyDescriptor,ft=(t,e,s,r)=>{for(var i=r>1?void 0:r?Vp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Hp(e,s,i),i};const Wp="data-autocomplete-value",Kp="data-autocomplete-label";let et=class extends ao(hl(ul(Q))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.serviceURL="",this.minSearchLength=3,this.key="",this.searchParameter="",this.propertyName="",this.items=null,this.hasInputPrefix=!1,this._resizeController=new Wl(this,{}),this.searchText="",this.searchDataProvider="",this.queueFilterDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.providersReady=!1,this.suppressPopOpen=!1,this.filterArmed=!1,this.updateSearchParameter=t=>{if(t==""||t==null){this.isSearchParameter()&&(this.lastValidSearch="",this.setSearchText(""));return}this.queryQueueListItem(this.queueDataProvider,s=>(this.propertyName==="_self"?s:s[this.propertyName||this.name])==t,this.setSearchFromSelection)||!this.queryQueueListItem(this.initQueueDataProvider,r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==t,this.setSearchFromSelection)&&this.isSearchParameter()&&(this.lastValidSearch=t,this.setSearchText(String(t)))},this.onSearchPublisherAssign=t=>{const e=t==null?"":String(t);this.searchText!==e&&(this.searchText=e),this.syncQueueFilter(e),this.openPopIfNeeded(e)},this.handleSearchActivity=()=>{const t=String(this.searchPublisher?.get()??this.searchText??"");this.openPopIfNeeded(t,!0)},this.handleSearchKeyUp=t=>{t.ctrlKey||t.metaKey||t.altKey||["Escape","Tab","Enter","ArrowUp","ArrowDown"].includes(t.key)||this.handleSearchActivity()},this.handleSearchKeyDown=t=>{const e=t.composedPath(),s=e.some(o=>o?.tagName==="SONIC-MENU-ITEM");if(s&&(t.key==="Enter"||t.key===" ")){const o=e.find(l=>l?.tagName==="SONIC-MENU-ITEM");if(!o)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o);return}if(s)return;const r=String(this.searchPublisher?.get()??this.searchText??"");if(!this.shouldShowSuggestions(r))return;if(t.key==="Enter"){const o=this.getSuggestionItems();if(!o.length)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o[0]);return}if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;t.preventDefault(),t.stopPropagation(),this.suppressPopOpen=!1,this.popElement?.show(),requestAnimationFrame(()=>this.popElement?.show());const i=this.getSuggestionItems();if(!i.length)return;(t.key==="ArrowDown"?i[0]:i[i.length-1]).focus?.()},this.handleSuggestionPointerDown=t=>{const e=t.composedPath().find(s=>s?.tagName==="SONIC-MENU-ITEM");e&&(t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(e))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.findSelection=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{this.lastValidSearch=this.propertyName==="_self"?t:t[this.searchParameter||this.propertyName||this.name],this.setSearchText(this.lastValidSearch)},this.handleFocusOut=t=>{const e=t.relatedTarget;this.deepContains(this.popElement,e)||this.deepContains(this,e)||setTimeout(()=>{if(this.suppressPopOpen)return;const s=document.activeElement;!s||this.deepContains(this.popElement,s)||this.deepContains(this,s)||this.popElement?.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}searchFieldName(){return this.searchParameter||this.name}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}shouldShowSuggestions(t){return(t?.length||0)>=this.minSearchLength||this.minSearchLength===0}isSearchFocused(){const t=document.activeElement;if(!t)return!1;const e=this.renderRoot?.querySelector("sonic-input.form-element");return!!(e&&(t===e||e.contains(t)||e.shadowRoot?.contains(t)))}openPopIfNeeded(t,e=!1){if(!this.suppressPopOpen){if(!this.shouldShowSuggestions(t)){this.popElement?.hide();return}(e||this.isSearchFocused()||this.popElement?.open)&&(this.popElement?.show(),requestAnimationFrame(()=>{if(this.suppressPopOpen)return;const s=String(this.searchPublisher?.get()??this.searchText??"");this.shouldShowSuggestions(s)&&this.popElement?.show()}))}}setSearchText(t){const e=t==null||t===""?"":typeof t=="string"?t:String(t);this.searchText=e,this.searchPublisher&&this.searchPublisher.get()!==e&&this.searchPublisher.set(e),this.syncQueueFilter(e)}syncQueueFilter(t){if(!this.queueFilterPublisher)return;if(this.minSearchLength===0||t.length>=this.minSearchLength){(!this.filterArmed||this.queueFilterPublisher.get()!==t)&&this.queueFilterPublisher.set(t),this.filterArmed=!0;return}this.filterArmed&&(this.filterArmed=!1,this.clearSearchQueueResults())}clearSearchQueueResults(){if(!this.queueDataProvider)return;const t=ye.get(this.queueDataProvider),e=t.get();if(Array.isArray(e))for(const s of e)s?.dataProvider&&ye.getInstance().delete(s.dataProvider);t.set([])}applySuggestion(t,e){this.suppressPopOpen=!0;const s=t,r=e||(typeof s=="string"?s:String(s??""));this.formValuePublisher?.set(s),this.lastValidSearch=this.isSearchParameter()?s:r,this.setSearchText(this.isSearchParameter()?String(s??""):r),this.popElement?.hide(),requestAnimationFrame(()=>{this.suppressPopOpen=!1})}getSuggestionItems(){return[...this.renderRoot?.querySelectorAll("sonic-menu-item")??[]]}selectSuggestionItem(t){const e=t.getAttribute(Wp)??t.value??null,s=t.getAttribute(Kp)??(t.textContent||"").trim();e==null&&!s||this.applySuggestion(e??s,s)}setupProviders(){const t=this.searchFieldName(),e=this.formDataProvider||this.getAncestorAttributeValue("formDataProvider")||"",s=et.instanceCounter++,r=(e||"form")+"__"+(this.name||"field")+"__autocomplete__"+s;this.initSearchDataProvider=`${r}_init_search__`,this.initQueueDataProvider=`${r}_init_queue__`,this.searchDataProvider=`${r}_search__`,this.queueFilterDataProvider=`${r}_queue_filter__`,this.queueDataProvider=`${r}_queue__`;const i=ye.get;this.searchPublisher=i(this.searchDataProvider)[t],this.queueFilterPublisher=i(this.queueFilterDataProvider)[t],this.formValuePublisher=Ot(i(e),this.name),this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&i(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.searchPublisher?.onAssign(this.onSearchPublisherAssign);const n=this.searchPublisher?.get();n!=null&&n!==""&&(this.searchText=String(n),this.syncQueueFilter(this.searchText)),this.providersReady=!0}teardownProviders(){this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.searchPublisher?.offAssign(this.onSearchPublisherAssign);const t=ye.get;this.initSearchDataProvider&&t(this.initSearchDataProvider).delete(),this.initQueueDataProvider&&t(this.initQueueDataProvider).delete(),this.searchDataProvider&&t(this.searchDataProvider).delete(),this.queueFilterDataProvider&&t(this.queueFilterDataProvider).delete(),this.queueDataProvider&&t(this.queueDataProvider).delete(),this.providersReady=!1}connectedCallback(){super.connectedCallback(),this.setupProviders(),this.addEventListener("keyup",this.handleSearchKeyUp),this.addEventListener("keydown",this.handleSearchKeyDown,!0)}firstUpdated(t){super.firstUpdated(t),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){this.removeEventListener("keyup",this.handleSearchKeyUp),this.removeEventListener("keydown",this.handleSearchKeyDown,!0),this.teardownProviders(),this.popElement?.removeEventListener("focusout",this.handleFocusOut),super.disconnectedCallback()}queryQueueListItem(t,e,s){const r=ye.get(t);let i;const n=r.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){const l=ye.get(o.dataProvider).get();if(Array.isArray(l)&&(i=l.find(e),i))break}return i?(s(i),!0):!1}setSelectionRange(t,e){this.renderRoot?.querySelector("sonic-input.form-element")?.setSelectionRange(t,e)}handleHide(){if(this.select){if(!this.searchText){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.setSearchText(this.lastValidSearch)}}deepContains(t,e){if(!t||!e)return!1;let s=e;for(;s;){if(s===t||t.contains(s))return!0;const r=s.getRootNode();if(r instanceof ShadowRoot)s=r.host;else break}return!1}handleFocus(){const t=String(this.searchText??"");this.shouldShowSuggestions(t)&&(this.suppressPopOpen=!1,this.popElement?.show())}render(){if(!this.providersReady||!this.searchDataProvider)return ee;const t=this.templateList.concat(this.templatePartsList);return R`
2168
2168
  <sonic-pop manual style="display:block;" @hide=${this.handleHide}>
2169
2169
  <sonic-input
2170
2170
  class="form-element"
@@ -2266,7 +2266,7 @@
2266
2266
  overflow: hidden;
2267
2267
  pointer-events: none;
2268
2268
  }
2269
- `],et.instanceCounter=0,ft([u({type:String})],et.prototype,"size",2),ft([u({type:String})],et.prototype,"placeholder",2),ft([u()],et.prototype,"filteredFields",2),ft([u({type:Boolean,reflect:!0})],et.prototype,"readonly",2),ft([u({type:String})],et.prototype,"dataProviderExpression",2),ft([u({type:String})],et.prototype,"serviceURL",2),ft([u({type:Number})],et.prototype,"minSearchLength",2),ft([u({type:Boolean})],et.prototype,"select",2),ft([u({type:String})],et.prototype,"key",2),ft([u({type:String})],et.prototype,"searchParameter",2),ft([u({type:String})],et.prototype,"propertyName",2),ft([u({type:Function,attribute:!1})],et.prototype,"items",2),ft([bt({slot:"prefix",flatten:!0})],et.prototype,"slotInputPrefixNodes",2),ft([xe()],et.prototype,"hasInputPrefix",2),ft([$s("sonic-pop")],et.prototype,"popElement",2),ft([xe()],et.prototype,"searchText",2),ft([xe()],et.prototype,"searchDataProvider",2),et=ft([X("sonic-input-autocomplete")],et);var Kp=Object.defineProperty,Gp=Object.getOwnPropertyDescriptor,Dt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Kp(e,s,i),i};const Yp="sonic-password-helper";let yt=class extends sr(Q){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=e=>{e?(this.hasNoChar=e.length==0,this.hasEnoughChars=e.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(e),this.hasMajuscule=/[A-Z]/.test(e),this.hasNumber=/[0-9]/.test(e),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(e)},ve.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ve.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(e){return e?R`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:R`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?ee:R`
2269
+ `],et.instanceCounter=0,ft([u({type:String})],et.prototype,"size",2),ft([u({type:String})],et.prototype,"placeholder",2),ft([u()],et.prototype,"filteredFields",2),ft([u({type:Boolean,reflect:!0})],et.prototype,"readonly",2),ft([u({type:String})],et.prototype,"dataProviderExpression",2),ft([u({type:String})],et.prototype,"serviceURL",2),ft([u({type:Number})],et.prototype,"minSearchLength",2),ft([u({type:Boolean})],et.prototype,"select",2),ft([u({type:String})],et.prototype,"key",2),ft([u({type:String})],et.prototype,"searchParameter",2),ft([u({type:String})],et.prototype,"propertyName",2),ft([u({type:Function,attribute:!1})],et.prototype,"items",2),ft([bt({slot:"prefix",flatten:!0})],et.prototype,"slotInputPrefixNodes",2),ft([xe()],et.prototype,"hasInputPrefix",2),ft([$s("sonic-pop")],et.prototype,"popElement",2),ft([xe()],et.prototype,"searchText",2),ft([xe()],et.prototype,"searchDataProvider",2),et=ft([X("sonic-input-autocomplete")],et);var Gp=Object.defineProperty,Yp=Object.getOwnPropertyDescriptor,Dt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Yp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Gp(e,s,i),i};const Zp="sonic-password-helper";let vt=class extends sr(Q){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=e=>{e?(this.hasNoChar=e.length==0,this.hasEnoughChars=e.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(e),this.hasMajuscule=/[A-Z]/.test(e),this.hasNumber=/[0-9]/.test(e),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(e)},ye.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ye.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(e){return e?R`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:R`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?ee:R`
2270
2270
  <div>${this.wording_password_helper_decription}</div>
2271
2271
  <div>
2272
2272
  ${this.getIcon(this.hasEnoughChars)}
@@ -2287,11 +2287,11 @@
2287
2287
  ${this.getIcon(this.hasSpecialChar)}
2288
2288
  ${this.wording_password_helper_special_char}
2289
2289
  </div>
2290
- `}};Dt([u()],yt.prototype,"name",2),Dt([u()],yt.prototype,"minChars",2),Dt([xe()],yt.prototype,"hasNoChar",2),Dt([xe()],yt.prototype,"hasEnoughChars",2),Dt([xe()],yt.prototype,"hasMinuscule",2),Dt([xe()],yt.prototype,"hasMajuscule",2),Dt([xe()],yt.prototype,"hasNumber",2),Dt([xe()],yt.prototype,"hasSpecialChar",2),Dt([u()],yt.prototype,"wording_password_helper_decription",2),Dt([u()],yt.prototype,"wording_password_helper_min_length",2),Dt([u()],yt.prototype,"wording_password_helper_lower_case",2),Dt([u()],yt.prototype,"wording_password_helper_upper_case",2),Dt([u()],yt.prototype,"wording_password_helper_number",2),Dt([u()],yt.prototype,"wording_password_helper_special_char",2),yt=Dt([X(Yp)],yt);var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,nr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Zp(e,s,i),i};const Qp="sonic-same-value-helper";let Rs=class extends sr(Q){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ve.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{e?this.hasNoChar=e.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=Ot(t,this.name).get()==Ot(t,this.sameValueAs).get())},Ot(t,this.name).onAssign(this.checkValue),Ot(t,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ve.get(this.getAncestorAttributeValue("formDataProvider"));Ot(t,this.name).offAssign(this.checkValue),Ot(t,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?ee:R`
2290
+ `}};Dt([u()],vt.prototype,"name",2),Dt([u()],vt.prototype,"minChars",2),Dt([xe()],vt.prototype,"hasNoChar",2),Dt([xe()],vt.prototype,"hasEnoughChars",2),Dt([xe()],vt.prototype,"hasMinuscule",2),Dt([xe()],vt.prototype,"hasMajuscule",2),Dt([xe()],vt.prototype,"hasNumber",2),Dt([xe()],vt.prototype,"hasSpecialChar",2),Dt([u()],vt.prototype,"wording_password_helper_decription",2),Dt([u()],vt.prototype,"wording_password_helper_min_length",2),Dt([u()],vt.prototype,"wording_password_helper_lower_case",2),Dt([u()],vt.prototype,"wording_password_helper_upper_case",2),Dt([u()],vt.prototype,"wording_password_helper_number",2),Dt([u()],vt.prototype,"wording_password_helper_special_char",2),vt=Dt([X(Zp)],vt);var Jp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,nr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Jp(e,s,i),i};const Xp="sonic-same-value-helper";let Rs=class extends sr(Q){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ye.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{e?this.hasNoChar=e.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=Ot(t,this.name).get()==Ot(t,this.sameValueAs).get())},Ot(t,this.name).onAssign(this.checkValue),Ot(t,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ye.get(this.getAncestorAttributeValue("formDataProvider"));Ot(t,this.name).offAssign(this.checkValue),Ot(t,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?ee:R`
2291
2291
  <span>
2292
2292
  ${this.areEqual?He(this.descriptionWhenEqual):He(this.descriptionWhenNotEqual)}
2293
2293
  </span>
2294
- `}};nr([u()],Rs.prototype,"name",2),nr([u()],Rs.prototype,"sameValueAs",2),nr([u()],Rs.prototype,"descriptionWhenEqual",2),nr([u()],Rs.prototype,"descriptionWhenNotEqual",2),nr([xe()],Rs.prototype,"areEqual",2),nr([xe()],Rs.prototype,"hasNoChar",2),Rs=nr([X(Qp)],Rs);var Xp=Object.defineProperty,ef=Object.getOwnPropertyDescriptor,ys=(t,e,s,r)=>{for(var i=r>1?void 0:r?ef(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Xp(e,s,i),i};const tf="sonic-checkbox";let Et=class extends Wn(Gi(_r(Q))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t),t.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return R`
2294
+ `}};nr([u()],Rs.prototype,"name",2),nr([u()],Rs.prototype,"sameValueAs",2),nr([u()],Rs.prototype,"descriptionWhenEqual",2),nr([u()],Rs.prototype,"descriptionWhenNotEqual",2),nr([xe()],Rs.prototype,"areEqual",2),nr([xe()],Rs.prototype,"hasNoChar",2),Rs=nr([X(Xp)],Rs);var ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,vs=(t,e,s,r)=>{for(var i=r>1?void 0:r?tf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ef(e,s,i),i};const sf="sonic-checkbox";let Et=class extends Kn(Gi(_r(Q))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t),t.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return R`
2295
2295
  <label class="checkbox-container ${this.disabled?"disabled":""}">
2296
2296
 
2297
2297
  <span class="icon-container">
@@ -2441,7 +2441,7 @@
2441
2441
  .hidden {
2442
2442
  display: none;
2443
2443
  }
2444
- `],ys([u({type:Boolean,reflect:!0})],Et.prototype,"touched",2),ys([u({type:String})],Et.prototype,"iconName",2),ys([u({type:String})],Et.prototype,"indeterminateIconName",2),ys([u({type:Boolean})],Et.prototype,"showAsIndeterminate",2),ys([u({type:Boolean})],Et.prototype,"hasDescription",2),ys([u({type:Boolean})],Et.prototype,"hasLabel",2),ys([bt({flatten:!0})],Et.prototype,"slotLabelNodes",2),ys([bt({slot:"description",flatten:!0})],Et.prototype,"slotDescriptionNodes",2),Et=ys([X(tf)],Et);var sf=Object.getOwnPropertyDescriptor,rf=(t,e,s,r)=>{for(var i=r>1?void 0:r?sf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const nf="sonic-radio";let mo=class extends Et{constructor(){super(),this.radio=!0}willUpdate(t){const e=t.has("type");super.willUpdate(t),e&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};mo.styles=[Et.styles,Z`
2444
+ `],vs([u({type:Boolean,reflect:!0})],Et.prototype,"touched",2),vs([u({type:String})],Et.prototype,"iconName",2),vs([u({type:String})],Et.prototype,"indeterminateIconName",2),vs([u({type:Boolean})],Et.prototype,"showAsIndeterminate",2),vs([u({type:Boolean})],Et.prototype,"hasDescription",2),vs([u({type:Boolean})],Et.prototype,"hasLabel",2),vs([bt({flatten:!0})],Et.prototype,"slotLabelNodes",2),vs([bt({slot:"description",flatten:!0})],Et.prototype,"slotDescriptionNodes",2),Et=vs([X(sf)],Et);var rf=Object.getOwnPropertyDescriptor,nf=(t,e,s,r)=>{for(var i=r>1?void 0:r?rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const of="sonic-radio";let go=class extends Et{constructor(){super(),this.radio=!0}willUpdate(t){const e=t.has("type");super.willUpdate(t),e&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};go.styles=[Et.styles,Z`
2445
2445
  :host input {
2446
2446
  border-radius: 50%;
2447
2447
  }
@@ -2457,7 +2457,7 @@
2457
2457
  width: 0.6em;
2458
2458
  width: round(0.6em, 1px);
2459
2459
  }
2460
- `],mo=rf([X(nf)],mo);var of=Object.getOwnPropertyDescriptor,af=(t,e,s,r)=>{for(var i=r>1?void 0:r?of(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const lf="sonic-switch";let go=class extends Et{constructor(){super(),this.unique=!0}};go.styles=[Et.styles,Z`
2460
+ `],go=nf([X(of)],go);var af=Object.getOwnPropertyDescriptor,lf=(t,e,s,r)=>{for(var i=r>1?void 0:r?af(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const cf="sonic-switch";let bo=class extends Et{constructor(){super(),this.unique=!0}};bo.styles=[Et.styles,Z`
2461
2461
  sonic-icon {
2462
2462
  display: none;
2463
2463
  }
@@ -2522,7 +2522,7 @@
2522
2522
  input + sonic-icon {
2523
2523
  display: none;
2524
2524
  }
2525
- `],go=af([X(lf)],go);var cf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,ct=(t,e,s,r)=>{for(var i=r>1?void 0:r?uf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&cf(e,s,i),i};const hf="sonic-select";let tt=class extends _r(Q){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map(e=>({value:e.value,wording:e.text,selected:e.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const s of t)s.selected&&(this.value=s[this.valueKey]||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){t==null&&!this.hasDoneFirstUpdate||(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){this.setFormPublisherValue(this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const t=this.shadowRoot?.querySelector("select");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return R`
2525
+ `],bo=lf([X(cf)],bo);var uf=Object.defineProperty,hf=Object.getOwnPropertyDescriptor,ct=(t,e,s,r)=>{for(var i=r>1?void 0:r?hf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&uf(e,s,i),i};const df="sonic-select";let tt=class extends _r(Q){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map(e=>({value:e.value,wording:e.text,selected:e.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const s of t)s.selected&&(this.value=s[this.valueKey]||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){t==null&&!this.hasDoneFirstUpdate||(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){this.setFormPublisherValue(this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const t=this.shadowRoot?.querySelector("select");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return R`
2526
2526
  <label
2527
2527
  for="form-element"
2528
2528
  class="${this.hasLabel?"form-label":"hidden"}"
@@ -2573,7 +2573,7 @@
2573
2573
  class="${this.hasDescription?"form-description":"hidden"}"
2574
2574
  >${this.description?R`${He(this.description)}`:""}</slot
2575
2575
  >
2576
- `}};tt.styles=[Qt,po,on,an,Z`
2576
+ `}};tt.styles=[Qt,fo,on,an,Z`
2577
2577
  .form-element {
2578
2578
  appearance: none;
2579
2579
  white-space: nowrap;
@@ -2626,7 +2626,7 @@
2626
2626
  :host([multiple]) sonic-icon {
2627
2627
  display: none !important;
2628
2628
  }
2629
- `],ct([u({type:String})],tt.prototype,"valueKey",2),ct([u({type:String})],tt.prototype,"wordingKey",2),ct([u({type:Boolean})],tt.prototype,"multiple",2),ct([u({type:String,reflect:!0})],tt.prototype,"size",2),ct([u({type:Number})],tt.prototype,"selectSize",2),ct([u({type:String,reflect:!0})],tt.prototype,"status",2),ct([u({type:Array})],tt.prototype,"options",1),ct([u({reflect:!0})],tt.prototype,"value",1),ct([u({type:Boolean})],tt.prototype,"forceAutoFill",2),ct([u()],tt.prototype,"description",1),ct([u()],tt.prototype,"label",1),ct([bt({slot:"label",flatten:!0})],tt.prototype,"slotLabelNodes",2),ct([bt({slot:"description",flatten:!0})],tt.prototype,"slotDescriptionNodes",2),ct([bt({slot:"suffix",flatten:!0})],tt.prototype,"slotSuffixNodes",2),ct([bt({slot:"prefix",flatten:!0})],tt.prototype,"slotPrefixNodes",2),ct([xe()],tt.prototype,"hasDescription",2),ct([xe()],tt.prototype,"hasLabel",2),ct([xe()],tt.prototype,"hasSuffix",2),ct([xe()],tt.prototype,"hasPrefix",2),tt=ct([X(hf)],tt);var df=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,Nt=(t,e,s,r)=>{for(var i=r>1?void 0:r?pf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&df(e,s,i),i};const ff="sonic-textarea";let wt=class extends Gi(_r(Q)){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const t=this.shadowRoot?.querySelector("textarea");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={resize:this.resize};return R`
2629
+ `],ct([u({type:String})],tt.prototype,"valueKey",2),ct([u({type:String})],tt.prototype,"wordingKey",2),ct([u({type:Boolean})],tt.prototype,"multiple",2),ct([u({type:String,reflect:!0})],tt.prototype,"size",2),ct([u({type:Number})],tt.prototype,"selectSize",2),ct([u({type:String,reflect:!0})],tt.prototype,"status",2),ct([u({type:Array})],tt.prototype,"options",1),ct([u({reflect:!0})],tt.prototype,"value",1),ct([u({type:Boolean})],tt.prototype,"forceAutoFill",2),ct([u()],tt.prototype,"description",1),ct([u()],tt.prototype,"label",1),ct([bt({slot:"label",flatten:!0})],tt.prototype,"slotLabelNodes",2),ct([bt({slot:"description",flatten:!0})],tt.prototype,"slotDescriptionNodes",2),ct([bt({slot:"suffix",flatten:!0})],tt.prototype,"slotSuffixNodes",2),ct([bt({slot:"prefix",flatten:!0})],tt.prototype,"slotPrefixNodes",2),ct([xe()],tt.prototype,"hasDescription",2),ct([xe()],tt.prototype,"hasLabel",2),ct([xe()],tt.prototype,"hasSuffix",2),ct([xe()],tt.prototype,"hasPrefix",2),tt=ct([X(df)],tt);var pf=Object.defineProperty,ff=Object.getOwnPropertyDescriptor,Nt=(t,e,s,r)=>{for(var i=r>1?void 0:r?ff(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&pf(e,s,i),i};const mf="sonic-textarea";let wt=class extends Gi(_r(Q)){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const t=this.shadowRoot?.querySelector("textarea");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={resize:this.resize};return R`
2630
2630
  <label
2631
2631
  for="${this.id||"form-element"}"
2632
2632
  class="${this.hasLabel?"form-label":"hidden"}"
@@ -2671,12 +2671,12 @@ ${this.value}</textarea
2671
2671
  class="${this.hasDescription?"form-description":"hidden"}"
2672
2672
  >${this.description?R`${He(this.description)}`:""}</slot
2673
2673
  >
2674
- `}};wt.styles=[Qt,po,on,an,si,Z`
2674
+ `}};wt.styles=[Qt,fo,on,an,si,Z`
2675
2675
  textarea {
2676
2676
  overflow-y: auto !important;
2677
2677
  font-size: inherit;
2678
2678
  }
2679
- `],Nt([u({type:String})],wt.prototype,"size",2),Nt([u({type:Number})],wt.prototype,"rows",2),Nt([u({type:Number})],wt.prototype,"cols",2),Nt([u({type:Number})],wt.prototype,"maxlength",2),Nt([u({type:Number})],wt.prototype,"minlength",2),Nt([u({type:String})],wt.prototype,"wrap",2),Nt([u({type:Boolean})],wt.prototype,"readonly",2),Nt([u({type:String})],wt.prototype,"placeholder",2),Nt([u({type:String})],wt.prototype,"resize",2),Nt([bt({slot:"label",flatten:!0})],wt.prototype,"slotLabelNodes",2),Nt([bt({slot:"description",flatten:!0})],wt.prototype,"slotDescriptionNodes",2),Nt([xe()],wt.prototype,"hasDescription",2),Nt([xe()],wt.prototype,"hasLabel",2),wt=Nt([X(ff)],wt);var mf=Object.getOwnPropertyDescriptor,gf=(t,e,s,r)=>{for(var i=r>1?void 0:r?mf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};let bo=class extends Q{render(){return R`<slot></slot>`}};bo.styles=[Z`
2679
+ `],Nt([u({type:String})],wt.prototype,"size",2),Nt([u({type:Number})],wt.prototype,"rows",2),Nt([u({type:Number})],wt.prototype,"cols",2),Nt([u({type:Number})],wt.prototype,"maxlength",2),Nt([u({type:Number})],wt.prototype,"minlength",2),Nt([u({type:String})],wt.prototype,"wrap",2),Nt([u({type:Boolean})],wt.prototype,"readonly",2),Nt([u({type:String})],wt.prototype,"placeholder",2),Nt([u({type:String})],wt.prototype,"resize",2),Nt([bt({slot:"label",flatten:!0})],wt.prototype,"slotLabelNodes",2),Nt([bt({slot:"description",flatten:!0})],wt.prototype,"slotDescriptionNodes",2),Nt([xe()],wt.prototype,"hasDescription",2),Nt([xe()],wt.prototype,"hasLabel",2),wt=Nt([X(mf)],wt);var gf=Object.getOwnPropertyDescriptor,bf=(t,e,s,r)=>{for(var i=r>1?void 0:r?gf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};let yo=class extends Q{render(){return R`<slot></slot>`}};yo.styles=[Z`
2680
2680
  :host {
2681
2681
  font-size: 1.125rem;
2682
2682
  line-height: 1.2;
@@ -2693,7 +2693,7 @@ ${this.value}</textarea
2693
2693
  font-size: 1rem;
2694
2694
  }
2695
2695
  }
2696
- `],bo=gf([X("sonic-legend-description")],bo);var bf=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,or=(t,e,s,r)=>{for(var i=r>1?void 0:r?vf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&bf(e,s,i),i};const yf="sonic-legend";let ws=class extends Q{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return R`<legend part="legend">
2696
+ `],yo=bf([X("sonic-legend-description")],yo);var yf=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,or=(t,e,s,r)=>{for(var i=r>1?void 0:r?vf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&yf(e,s,i),i};const wf="sonic-legend";let ws=class extends Q{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return R`<legend part="legend">
2697
2697
  ${this.iconName?R`<div class="icon">
2698
2698
  <sonic-icon
2699
2699
  name=${this.iconName}
@@ -2754,7 +2754,7 @@ ${this.value}</textarea
2754
2754
  .legend-content {
2755
2755
  flex-grow: 1;
2756
2756
  }
2757
- `],or([u({type:Boolean})],ws.prototype,"forceAutoFill",2),or([u()],ws.prototype,"description",1),or([u()],ws.prototype,"label",1),or([u({type:String})],ws.prototype,"iconName",2),or([u({type:String})],ws.prototype,"iconLibrary",2),or([u({type:String})],ws.prototype,"iconPrefix",2),ws=or([X(yf)],ws);var wf=Object.defineProperty,_f=Object.getOwnPropertyDescriptor,as=(t,e,s,r)=>{for(var i=r>1?void 0:r?_f(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&wf(e,s,i),i};const Sf="sonic-fieldset";let Wt=class extends Tt(Q){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return R`<fieldset form="${se(this.form)}" ?disabled="${this.disabled}">
2757
+ `],or([u({type:Boolean})],ws.prototype,"forceAutoFill",2),or([u()],ws.prototype,"description",1),or([u()],ws.prototype,"label",1),or([u({type:String})],ws.prototype,"iconName",2),or([u({type:String})],ws.prototype,"iconLibrary",2),or([u({type:String})],ws.prototype,"iconPrefix",2),ws=or([X(wf)],ws);var _f=Object.defineProperty,Sf=Object.getOwnPropertyDescriptor,as=(t,e,s,r)=>{for(var i=r>1?void 0:r?Sf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&_f(e,s,i),i};const Pf="sonic-fieldset";let Wt=class extends Tt(Q){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return R`<fieldset form="${se(this.form)}" ?disabled="${this.disabled}">
2758
2758
  ${this.label?R`<sonic-legend
2759
2759
  label=${se(this.label)}
2760
2760
  description=${se(this.description)}
@@ -2810,7 +2810,7 @@ ${this.value}</textarea
2810
2810
  ::slotted(sonic-legend:last-child) {
2811
2811
  margin-bottom: 0;
2812
2812
  }
2813
- `],as([u({type:Boolean,reflect:!0})],Wt.prototype,"disabled",2),as([u({type:String})],Wt.prototype,"form",2),as([u({type:String})],Wt.prototype,"label",2),as([u({type:String})],Wt.prototype,"description",2),as([u({type:String})],Wt.prototype,"iconName",2),as([u({type:String})],Wt.prototype,"iconLibrary",2),as([u({type:String})],Wt.prototype,"iconPrefix",2),as([u({type:Boolean,reflect:!0})],Wt.prototype,"tight",2),as([u({type:String,reflect:!0})],Wt.prototype,"variant",2),Wt=as([X(Sf)],Wt);var Pf=Object.defineProperty,xf=Object.getOwnPropertyDescriptor,vo=(t,e,s,r)=>{for(var i=r>1?void 0:r?xf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Pf(e,s,i),i};const Af="sonic-form-layout";let ci=class extends Q{constructor(){super(...arguments),this._resizeController=new Vl(this,{}),this._oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter(s=>e.includes(s.nodeName.toLowerCase())),this._oneFormElement=t.length==1}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this._oneFormElement};return R`<div class=${Ji(t)}>
2813
+ `],as([u({type:Boolean,reflect:!0})],Wt.prototype,"disabled",2),as([u({type:String})],Wt.prototype,"form",2),as([u({type:String})],Wt.prototype,"label",2),as([u({type:String})],Wt.prototype,"description",2),as([u({type:String})],Wt.prototype,"iconName",2),as([u({type:String})],Wt.prototype,"iconLibrary",2),as([u({type:String})],Wt.prototype,"iconPrefix",2),as([u({type:Boolean,reflect:!0})],Wt.prototype,"tight",2),as([u({type:String,reflect:!0})],Wt.prototype,"variant",2),Wt=as([X(Pf)],Wt);var xf=Object.defineProperty,Af=Object.getOwnPropertyDescriptor,vo=(t,e,s,r)=>{for(var i=r>1?void 0:r?Af(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&xf(e,s,i),i};const Cf="sonic-form-layout";let ci=class extends Q{constructor(){super(...arguments),this._resizeController=new Wl(this,{}),this._oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter(s=>e.includes(s.nodeName.toLowerCase())),this._oneFormElement=t.length==1}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this._oneFormElement};return R`<div class=${Ji(t)}>
2814
2814
  <slot @slotchange=${this.onSlotChange}></slot>
2815
2815
  </div>`}};ci.styles=[Z`
2816
2816
  :host {
@@ -2845,7 +2845,7 @@ ${this.value}</textarea
2845
2845
  margin-top: 0;
2846
2846
  margin-bottom: 0;
2847
2847
  }
2848
- `],vo([Br({flatten:!0})],ci.prototype,"slottedElements",2),vo([xe()],ci.prototype,"_oneFormElement",2),ci=vo([X(Af)],ci);var Cf=Object.defineProperty,kf=Object.getOwnPropertyDescriptor,cn=(t,e,s,r)=>{for(var i=r>1?void 0:r?kf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Cf(e,s,i),i};const $f="sonic-form-actions";let Tr=class extends Q{constructor(){super(...arguments),this.direction="row",this.justify="flex-start",this.alignItems="center"}render(){const t={flexDirection:this.direction,justifyContent:this.justify,alignItems:this.alignItems};return R`<slot style=${$t(t)}></slot>`}};Tr.styles=[Z`
2848
+ `],vo([Br({flatten:!0})],ci.prototype,"slottedElements",2),vo([xe()],ci.prototype,"_oneFormElement",2),ci=vo([X(Cf)],ci);var kf=Object.defineProperty,$f=Object.getOwnPropertyDescriptor,cn=(t,e,s,r)=>{for(var i=r>1?void 0:r?$f(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&kf(e,s,i),i};const Df="sonic-form-actions";let Tr=class extends Q{constructor(){super(...arguments),this.direction="row",this.justify="flex-start",this.alignItems="center"}render(){const t={flexDirection:this.direction,justifyContent:this.justify,alignItems:this.alignItems};return R`<slot style=${$t(t)}></slot>`}};Tr.styles=[Z`
2849
2849
  :host {
2850
2850
  display: block;
2851
2851
  }
@@ -2854,7 +2854,7 @@ ${this.value}</textarea
2854
2854
  flex-wrap: wrap;
2855
2855
  gap: 0.3rem;
2856
2856
  }
2857
- `],cn([u({type:String})],Tr.prototype,"direction",2),cn([u({type:String})],Tr.prototype,"justify",2),cn([u({type:String})],Tr.prototype,"alignItems",2),Tr=cn([X($f)],Tr);var Df=Object.defineProperty,Ef=Object.getOwnPropertyDescriptor,js=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ef(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Df(e,s,i),i};const Of="sonic-group";let ls=class extends Q{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach((s,r)=>{const i=s;r===0?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):r===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))})}willUpdate(t){super.willUpdate(t),this.hasSlotOrProps()}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const t={alignItems:this.alignItems};return R`<span class="${this.hasLabel?"form-label":"hidden"}"
2857
+ `],cn([u({type:String})],Tr.prototype,"direction",2),cn([u({type:String})],Tr.prototype,"justify",2),cn([u({type:String})],Tr.prototype,"alignItems",2),Tr=cn([X(Df)],Tr);var Ef=Object.defineProperty,Of=Object.getOwnPropertyDescriptor,js=(t,e,s,r)=>{for(var i=r>1?void 0:r?Of(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ef(e,s,i),i};const Tf="sonic-group";let ls=class extends Q{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach((s,r)=>{const i=s;r===0?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):r===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))})}willUpdate(t){super.willUpdate(t),this.hasSlotOrProps()}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const t={alignItems:this.alignItems};return R`<span class="${this.hasLabel?"form-label":"hidden"}"
2858
2858
  >${this.label?He(this.label):ee}<slot
2859
2859
  name="label"
2860
2860
  @slotchange=${this.hasSlotOrProps}
@@ -2887,7 +2887,7 @@ ${this.value}</textarea
2887
2887
  ::slotted(sonic-select) {
2888
2888
  flex-grow: 1;
2889
2889
  }
2890
- `],js([u({type:String})],ls.prototype,"alignItems",2),js([u({type:String})],ls.prototype,"label",2),js([u({type:String})],ls.prototype,"description",2),js([bt({slot:"label",flatten:!0})],ls.prototype,"slotLabelNodes",2),js([bt({slot:"description",flatten:!0})],ls.prototype,"slotDescriptionNodes",2),js([xe()],ls.prototype,"hasDescription",2),js([xe()],ls.prototype,"hasLabel",2),ls=js([X(Of)],ls);const Tf=Z`
2890
+ `],js([u({type:String})],ls.prototype,"alignItems",2),js([u({type:String})],ls.prototype,"label",2),js([u({type:String})],ls.prototype,"description",2),js([bt({slot:"label",flatten:!0})],ls.prototype,"slotLabelNodes",2),js([bt({slot:"description",flatten:!0})],ls.prototype,"slotDescriptionNodes",2),js([xe()],ls.prototype,"hasDescription",2),js([xe()],ls.prototype,"hasLabel",2),ls=js([X(Tf)],ls);const Lf=Z`
2891
2891
  :host {
2892
2892
  --sc-_rounded: 0;
2893
2893
  border-radius: var(--sc-_rounded);
@@ -2918,7 +2918,7 @@ ${this.value}</textarea
2918
2918
  :host([rounded="none"]) {
2919
2919
  --sc-_rounded: 0 !important;
2920
2920
  }
2921
- `;var Lf=Object.defineProperty,If=Object.getOwnPropertyDescriptor,cs=(t,e,s,r)=>{for(var i=r>1?void 0:r?If(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Lf(e,s,i),i};const Mf="sonic-image";let Kt=class extends Q{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){if(this.transition){const e=this.shadowRoot?.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return R`<div>
2921
+ `;var If=Object.defineProperty,Mf=Object.getOwnPropertyDescriptor,cs=(t,e,s,r)=>{for(var i=r>1?void 0:r?Mf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&If(e,s,i),i};const Nf="sonic-image";let Kt=class extends Q{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){if(this.transition){const e=this.shadowRoot?.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return R`<div>
2922
2922
  <picture
2923
2923
  ><img
2924
2924
  src="${this.src}"
@@ -2926,7 +2926,7 @@ ${this.value}</textarea
2926
2926
  alt="${this.alt}"
2927
2927
  style=${$t(t)}
2928
2928
  /></picture>
2929
- </div>`}};Kt.styles=[Tf,Z`
2929
+ </div>`}};Kt.styles=[Lf,Z`
2930
2930
  :host {
2931
2931
  --sc-_bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
2932
2932
  background: var(--sc-_bg);
@@ -2971,7 +2971,7 @@ ${this.value}</textarea
2971
2971
  opacity: 1;
2972
2972
  scale: 1;
2973
2973
  }
2974
- `],cs([u({type:String,reflect:!0})],Kt.prototype,"rounded",2),cs([u({type:String})],Kt.prototype,"src",2),cs([u({type:String})],Kt.prototype,"alt",2),cs([u({type:String})],Kt.prototype,"loading",2),cs([u({type:String,reflect:!0})],Kt.prototype,"transition",2),cs([u({type:String})],Kt.prototype,"ratio",2),cs([u({type:String})],Kt.prototype,"objectPosition",2),cs([u({type:String})],Kt.prototype,"imageRendering",2),cs([u({type:Boolean,reflect:!0})],Kt.prototype,"cover",2),Kt=cs([X(Mf)],Kt);var Nf=Object.defineProperty,Ff=Object.getOwnPropertyDescriptor,Ft=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ff(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Nf(e,s,i),i};const yo=t=>Br(t),Rf="sonic-menu";let _t=class extends Q{constructor(){super(...arguments),this.direction="column",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,this.scrollDragBound=!1,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size),super.updated(t)}setDividersSize(t){t.forEach(e=>{e.setAttribute("size","sm"),this.direction=="row"?e.style.setProperty("margin","0 .1rem "):e.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuItemChildren),this.setDividersSize(this.dividerChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuItemChildren.forEach(t=>{this.attributeObserver.observe(t,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const t=this.menuItemChildren.filter(e=>e.hasAttribute("active")&&e.getAttribute("active")!=="false");t.length===1&&requestAnimationFrame(()=>{t[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(t){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){if(!this.scrollable||this.scrollDragBound)return;this.scrollDragBound=!0;let t=!1,e,s;this.addEventListener("mousedown",r=>{t=!0,this.classList.add("active"),e=r.pageX-this.menuContent.offsetLeft,s=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mousemove",r=>{if(!t)return;r.preventDefault();const n=(r.pageX-this.menuContent.offsetLeft-e)*1.5;this.menuContent.scrollLeft=s-n,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",r=>{r.preventDefault(),this.setScrollShadow(this.menuContent,this.direction)})}setScrollShadow(t,e){e=="row"?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):e=="column"&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach(e=>{this.size&&e.setAttribute("size",this.size),this.align&&e.getAttribute("shape")!="square"&&e.getAttribute("shape")!="circle"&&e.setAttribute("align",this.align),this.direction=="row"&&e.getAttribute("shape")=="block"&&e.setAttribute("shape","default")})}render(){const t={minWidth:this.minWidth,flexDirection:this.direction},e=this.direction=="row",s={flexDirection:this.direction},r={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return R`<menu class="shadowable" style=${$t(t)}>
2974
+ `],cs([u({type:String,reflect:!0})],Kt.prototype,"rounded",2),cs([u({type:String})],Kt.prototype,"src",2),cs([u({type:String})],Kt.prototype,"alt",2),cs([u({type:String})],Kt.prototype,"loading",2),cs([u({type:String,reflect:!0})],Kt.prototype,"transition",2),cs([u({type:String})],Kt.prototype,"ratio",2),cs([u({type:String})],Kt.prototype,"objectPosition",2),cs([u({type:String})],Kt.prototype,"imageRendering",2),cs([u({type:Boolean,reflect:!0})],Kt.prototype,"cover",2),Kt=cs([X(Nf)],Kt);var Ff=Object.defineProperty,Rf=Object.getOwnPropertyDescriptor,Ft=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ff(e,s,i),i};const wo=t=>Br(t),jf="sonic-menu";let _t=class extends Q{constructor(){super(...arguments),this.direction="column",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,this.scrollDragBound=!1,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size),super.updated(t)}setDividersSize(t){t.forEach(e=>{e.setAttribute("size","sm"),this.direction=="row"?e.style.setProperty("margin","0 .1rem "):e.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuItemChildren),this.setDividersSize(this.dividerChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuItemChildren.forEach(t=>{this.attributeObserver.observe(t,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const t=this.menuItemChildren.filter(e=>e.hasAttribute("active")&&e.getAttribute("active")!=="false");t.length===1&&requestAnimationFrame(()=>{t[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(t){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){if(!this.scrollable||this.scrollDragBound)return;this.scrollDragBound=!0;let t=!1,e,s;this.addEventListener("mousedown",r=>{t=!0,this.classList.add("active"),e=r.pageX-this.menuContent.offsetLeft,s=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mousemove",r=>{if(!t)return;r.preventDefault();const n=(r.pageX-this.menuContent.offsetLeft-e)*1.5;this.menuContent.scrollLeft=s-n,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",r=>{r.preventDefault(),this.setScrollShadow(this.menuContent,this.direction)})}setScrollShadow(t,e){e=="row"?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):e=="column"&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach(e=>{this.size&&e.setAttribute("size",this.size),this.align&&e.getAttribute("shape")!="square"&&e.getAttribute("shape")!="circle"&&e.setAttribute("align",this.align),this.direction=="row"&&e.getAttribute("shape")=="block"&&e.setAttribute("shape","default")})}render(){const t={minWidth:this.minWidth,flexDirection:this.direction},e=this.direction=="row",s={flexDirection:this.direction},r={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return R`<menu class="shadowable" style=${$t(t)}>
2975
2975
  <slot
2976
2976
  @slotchange=${this.mainSlotChange}
2977
2977
  id="menu-content"
@@ -3131,14 +3131,14 @@ ${this.value}</textarea
3131
3131
  rgba(0, 0, 0, 0) 100%
3132
3132
  );
3133
3133
  }
3134
- `,fo],Ft([u({type:String,reflect:!0})],_t.prototype,"size",2),Ft([u({type:String,reflect:!0})],_t.prototype,"direction",2),Ft([u({type:String,reflect:!0})],_t.prototype,"align",2),Ft([u({type:String,reflect:!0})],_t.prototype,"shadow",2),Ft([u({type:String})],_t.prototype,"moreShape",2),Ft([u({type:Boolean})],_t.prototype,"scrollable",2),Ft([u({type:String})],_t.prototype,"minWidth",2),Ft([$s("menu")],_t.prototype,"menu",2),Ft([$s("#menu-content")],_t.prototype,"menuContent",2),Ft([yo({selector:"sonic-divider"})],_t.prototype,"dividerChildren",2),Ft([yo({selector:"sonic-menu-item"})],_t.prototype,"menuItemChildren",2),Ft([yo({slot:"more",selector:"*"})],_t.prototype,"moreElements",2),Ft([xe()],_t.prototype,"hasMoreElements",2),_t=Ft([X(Rf)],_t);var jf=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,Wl=(t,e,s,r)=>{for(var i=r>1?void 0:r?zf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&jf(e,s,i),i};const Uf="sonic-modal-actions";let un=class extends Q{firstUpdated(t){this.buttons?.forEach(e=>{e.hasAttribute("hideModal")&&e.addEventListener("click",()=>{gs.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(t)}render(){return R`<slot></slot>`}};un.styles=[Z`
3134
+ `,mo],Ft([u({type:String,reflect:!0})],_t.prototype,"size",2),Ft([u({type:String,reflect:!0})],_t.prototype,"direction",2),Ft([u({type:String,reflect:!0})],_t.prototype,"align",2),Ft([u({type:String,reflect:!0})],_t.prototype,"shadow",2),Ft([u({type:String})],_t.prototype,"moreShape",2),Ft([u({type:Boolean})],_t.prototype,"scrollable",2),Ft([u({type:String})],_t.prototype,"minWidth",2),Ft([$s("menu")],_t.prototype,"menu",2),Ft([$s("#menu-content")],_t.prototype,"menuContent",2),Ft([wo({selector:"sonic-divider"})],_t.prototype,"dividerChildren",2),Ft([wo({selector:"sonic-menu-item"})],_t.prototype,"menuItemChildren",2),Ft([wo({slot:"more",selector:"*"})],_t.prototype,"moreElements",2),Ft([xe()],_t.prototype,"hasMoreElements",2),_t=Ft([X(jf)],_t);var zf=Object.defineProperty,Uf=Object.getOwnPropertyDescriptor,Kl=(t,e,s,r)=>{for(var i=r>1?void 0:r?Uf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&zf(e,s,i),i};const qf="sonic-modal-actions";let un=class extends Q{firstUpdated(t){this.buttons?.forEach(e=>{e.hasAttribute("hideModal")&&e.addEventListener("click",()=>{gs.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(t)}render(){return R`<slot></slot>`}};un.styles=[Z`
3135
3135
  :host {
3136
3136
  display: flex;
3137
3137
  gap: 0.5rem;
3138
3138
  margin-top: auto;
3139
3139
  padding-top: 1.5rem;
3140
3140
  }
3141
- `],Wl([Br({selector:"sonic-button"})],un.prototype,"buttons",2),un=Wl([X(Uf)],un);var qf=Object.defineProperty,Bf=Object.getOwnPropertyDescriptor,hn=(t,e,s,r)=>{for(var i=r>1?void 0:r?Bf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&qf(e,s,i),i};const Hf="sonic-modal-close";let ui=class extends Q{constructor(){super(...arguments),this.translation={...is.closeWindow}}render(){return R`<sonic-button
3141
+ `],Kl([Br({selector:"sonic-button"})],un.prototype,"buttons",2),un=Kl([X(qf)],un);var Bf=Object.defineProperty,Hf=Object.getOwnPropertyDescriptor,hn=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Bf(e,s,i),i};const Vf="sonic-modal-close";let ui=class extends Q{constructor(){super(...arguments),this.translation={...is.closeWindow}}render(){return R`<sonic-button
3142
3142
  noAutoFill
3143
3143
  reset=${se(this.reset)}
3144
3144
  shape="circle"
@@ -3146,12 +3146,12 @@ ${this.value}</textarea
3146
3146
  @click=${this.handleClick}
3147
3147
  type=${se(this.type)}
3148
3148
  ><sonic-icon name="cancel" size="lg"></sonic-icon
3149
- ></sonic-button>`}handleClick(){ze.getClosestElement(this,"sonic-modal").hide()}};hn([u()],ui.prototype,"translation",2),hn([u()],ui.prototype,"reset",2),hn([u()],ui.prototype,"type",2),ui=hn([X(Hf)],ui);var Vf=Object.getOwnPropertyDescriptor,Wf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Vf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Kf="sonic-modal-content";let wo=class extends Q{render(){return R`<slot></slot>`}};wo.styles=[Z`
3149
+ ></sonic-button>`}handleClick(){ze.getClosestElement(this,"sonic-modal").hide()}};hn([u()],ui.prototype,"translation",2),hn([u()],ui.prototype,"reset",2),hn([u()],ui.prototype,"type",2),ui=hn([X(Vf)],ui);var Wf=Object.getOwnPropertyDescriptor,Kf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Wf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Gf="sonic-modal-content";let _o=class extends Q{render(){return R`<slot></slot>`}};_o.styles=[Z`
3150
3150
  :host {
3151
3151
  display: block;
3152
3152
  width: 100%;
3153
3153
  }
3154
- `],wo=Wf([X(Kf)],wo);var Gf=Object.getOwnPropertyDescriptor,Yf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Zf="sonic-modal-subtitle";let _o=class extends Q{render(){return R`<slot></slot>`}};_o.styles=[Z`
3154
+ `],_o=Kf([X(Gf)],_o);var Yf=Object.getOwnPropertyDescriptor,Zf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Yf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Jf="sonic-modal-subtitle";let So=class extends Q{render(){return R`<slot></slot>`}};So.styles=[Z`
3155
3155
  :host {
3156
3156
  font-size: 1.25rem;
3157
3157
  display: block;
@@ -3163,7 +3163,7 @@ ${this.value}</textarea
3163
3163
  font-weight: var(--sc-headings-font-weight, 700);
3164
3164
  font-style: var(--sc-headings-font-style, normal);
3165
3165
  }
3166
- `],_o=Yf([X(Zf)],_o);var Jf=Object.getOwnPropertyDescriptor,Qf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Jf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Xf="sonic-modal-title";let So=class extends Q{render(){return R`<slot></slot>`}};So.styles=[Z`
3166
+ `],So=Zf([X(Jf)],So);var Qf=Object.getOwnPropertyDescriptor,Xf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const em="sonic-modal-title";let Po=class extends Q{render(){return R`<slot></slot>`}};Po.styles=[Z`
3167
3167
  :host {
3168
3168
  font-weight: bold;
3169
3169
  font-size: 1.5rem;
@@ -3176,7 +3176,7 @@ ${this.value}</textarea
3176
3176
  font-weight: var(--sc-headings-font-weight, 700);
3177
3177
  font-style: var(--sc-headings-font-style, normal);
3178
3178
  }
3179
- `],So=Qf([X(Xf)],So);var em=Object.defineProperty,tm=Object.getOwnPropertyDescriptor,Je=(t,e,s,r)=>{for(var i=r>1?void 0:r?tm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&em(e,s,i),i};const Kl="sonic-modal";let Oe=class extends Tt(Q){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(t){const e=document.createElement(Kl);return e.options=t,t.removeHashOnHide===!0&&e.setAttribute("removeHashOnHide","true"),t.removeOnHide===!0&&e.setAttribute("removeOnHide","true"),t.closeOnLocationChange===!0&&e.setAttribute("closeOnLocationChange","true"),t.maxWidth&&(e.maxWidth=t?.maxWidth),t.width&&(e.width=t?.width),t.maxHeight&&(e.maxHeight=t?.maxHeight),t.height&&(e.height=t?.height),t.forceAction&&(e.forceAction=!0),t.fullScreen&&(e.fullScreen=t?.fullScreen),t.effect&&(e.effect=t?.effect),t.noCloseButton&&(e.noCloseButton=!0),t.closeButtonType&&(e.closeButtonType=t?.closeButtonType),t.styleSheet&&(e.styleSheet=t?.styleSheet),t.paddingX&&(e.paddingX=t?.paddingX),t.paddingY&&(e.paddingY=t?.paddingY),t.zIndex&&(e.zIndex=t?.zIndex),at.getPopContainer().appendChild(e),e.updateComplete.then(()=>{e.show()}),e}connectedCallback(){Oe.modals.push(this),dt.onChange(this),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),Oe.modals.splice(Oe.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(t){if(this.closeOnLocationChange&&t.has("location")){const e=t.get("location");e&&this.location&&this.location!==e&&setTimeout(()=>{this.hide()},50)}t.has("zIndex")&&this.style.setProperty("--sc-_z-index",this.zIndex||"990"),t.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),t.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(t)}updated(t){const e=!t.get("visible")&&this.visible,s=t.get("visible")&&!this.visible;e&&this._animationState==="hidden"?this.show():s&&this._animationState==="visible"&&this.hide(),t.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(t){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},e={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return R`
3179
+ `],Po=Xf([X(em)],Po);var tm=Object.defineProperty,sm=Object.getOwnPropertyDescriptor,Je=(t,e,s,r)=>{for(var i=r>1?void 0:r?sm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&tm(e,s,i),i};const Gl="sonic-modal";let Oe=class extends Tt(Q){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(t){const e=document.createElement(Gl);return e.options=t,t.removeHashOnHide===!0&&e.setAttribute("removeHashOnHide","true"),t.removeOnHide===!0&&e.setAttribute("removeOnHide","true"),t.closeOnLocationChange===!0&&e.setAttribute("closeOnLocationChange","true"),t.maxWidth&&(e.maxWidth=t?.maxWidth),t.width&&(e.width=t?.width),t.maxHeight&&(e.maxHeight=t?.maxHeight),t.height&&(e.height=t?.height),t.forceAction&&(e.forceAction=!0),t.fullScreen&&(e.fullScreen=t?.fullScreen),t.effect&&(e.effect=t?.effect),t.noCloseButton&&(e.noCloseButton=!0),t.closeButtonType&&(e.closeButtonType=t?.closeButtonType),t.styleSheet&&(e.styleSheet=t?.styleSheet),t.paddingX&&(e.paddingX=t?.paddingX),t.paddingY&&(e.paddingY=t?.paddingY),t.zIndex&&(e.zIndex=t?.zIndex),at.getPopContainer().appendChild(e),e.updateComplete.then(()=>{e.show()}),e}connectedCallback(){Oe.modals.push(this),dt.onChange(this),super.connectedCallback()}disconnectedCallback(){dt.offChange(this),Oe.modals.splice(Oe.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(t){if(this.closeOnLocationChange&&t.has("location")){const e=t.get("location");e&&this.location&&this.location!==e&&setTimeout(()=>{this.hide()},50)}t.has("zIndex")&&this.style.setProperty("--sc-_z-index",this.zIndex||"990"),t.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),t.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(t)}updated(t){const e=!t.get("visible")&&this.visible,s=t.get("visible")&&!this.visible;e&&this._animationState==="hidden"?this.show():s&&this._animationState==="visible"&&this.hide(),t.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(t){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},e={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return R`
3180
3180
  <div
3181
3181
  id="backdrop"
3182
3182
  @click=${this.handleOverlayClick}
@@ -3199,7 +3199,7 @@ ${this.value}</textarea
3199
3199
  <slot></slot>
3200
3200
  </div>`:ee}
3201
3201
  </dialog>
3202
- `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=to(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}modalFragment(t){const e=this.options?.[t];if(!e)return ee;let s;switch(e instanceof Object?s=e:s=He(e),t){case"title":return R`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return R`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return R`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return R`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return ee}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&ve.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){Oe.modals.forEach(t=>{t.dispose()})}handleEscape(t){if(t.key==="Escape"){t.preventDefault();const e=Oe.modals.filter(s=>s._animationState!=="hidden"&&!s.forceAction);e.length>0&&e[e.length-1].hide()}}animation(t){return new Promise(e=>{const{quartOut:s,linear:r,translateY:i,durationIn:n,durationOut:o,quadOut:l}=this._animationConfig,h=this._modalElement;if(!h)return e();const g=t==="in",x=g?n:o,m=!this.fullScreen&&g?100:0;this.fullScreen||(g?this.style.setProperty("--sc-_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc-_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&f.push(h.animate([{transform:g?i:"translateY(0)"},{transform:g?"translateY(0)":i}],{duration:x,easing:g?s:l,fill:"both",delay:m}));const C=this.effect==="none";f.push(h.animate([{opacity:g?0:1},{opacity:g?1:0}],{duration:C?0:x,easing:r,fill:"both",delay:C?0:m})),Promise.all(f.map(E=>E.finished)).then(()=>e())})}};Oe.styles=[si,Z`
3202
+ `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=so(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}modalFragment(t){const e=this.options?.[t];if(!e)return ee;let s;switch(e instanceof Object?s=e:s=He(e),t){case"title":return R`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return R`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return R`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return R`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return ee}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&ye.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){Oe.modals.forEach(t=>{t.dispose()})}handleEscape(t){if(t.key==="Escape"){t.preventDefault();const e=Oe.modals.filter(s=>s._animationState!=="hidden"&&!s.forceAction);e.length>0&&e[e.length-1].hide()}}animation(t){return new Promise(e=>{const{quartOut:s,linear:r,translateY:i,durationIn:n,durationOut:o,quadOut:l}=this._animationConfig,h=this._modalElement;if(!h)return e();const g=t==="in",x=g?n:o,m=!this.fullScreen&&g?100:0;this.fullScreen||(g?this.style.setProperty("--sc-_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc-_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&f.push(h.animate([{transform:g?i:"translateY(0)"},{transform:g?"translateY(0)":i}],{duration:x,easing:g?s:l,fill:"both",delay:m}));const C=this.effect==="none";f.push(h.animate([{opacity:g?0:1},{opacity:g?1:0}],{duration:C?0:x,easing:r,fill:"both",delay:C?0:m})),Promise.all(f.map(E=>E.finished)).then(()=>e())})}};Oe.styles=[si,Z`
3203
3203
  :host {
3204
3204
  --sc-modal-py: 2.5rem;
3205
3205
  --sc-modal-px: 1.5rem;
@@ -3350,7 +3350,7 @@ ${this.value}</textarea
3350
3350
  transform: scale(0) !important;
3351
3351
  transition: 0.2s linear !important;
3352
3352
  }
3353
- `],Oe.modals=[],Je([u({type:Boolean})],Oe.prototype,"forceAction",2),Je([u({type:Boolean})],Oe.prototype,"noCloseButton",2),Je([u({type:Boolean})],Oe.prototype,"removeOnHide",2),Je([u({type:Boolean})],Oe.prototype,"removeHashOnHide",2),Je([u({type:String,reflect:!0})],Oe.prototype,"align",2),Je([u({type:String})],Oe.prototype,"paddingX",2),Je([u({type:String})],Oe.prototype,"paddingY",2),Je([u({type:String})],Oe.prototype,"maxWidth",2),Je([u({type:String})],Oe.prototype,"maxHeight",2),Je([u({type:String})],Oe.prototype,"zIndex",2),Je([u({type:String})],Oe.prototype,"width",2),Je([u({type:String})],Oe.prototype,"height",2),Je([u({type:String})],Oe.prototype,"effect",2),Je([u({attribute:!1})],Oe.prototype,"styleSheet",2),Je([u({type:Object})],Oe.prototype,"options",2),Je([u({type:Boolean,reflect:!0})],Oe.prototype,"fullScreen",2),Je([u({type:Boolean,reflect:!0})],Oe.prototype,"visible",2),Je([u({type:String})],Oe.prototype,"closeButtonType",2),Je([$s("#modal")],Oe.prototype,"_modalElement",2),Je([u({type:Boolean})],Oe.prototype,"closeOnLocationChange",2),Je([xe()],Oe.prototype,"location",2),Je([xe()],Oe.prototype,"_animationState",2),Oe=Je([X(Kl)],Oe),typeof window<"u"&&(window.SonicModal=Oe);var sm=Object.defineProperty,rm=Object.getOwnPropertyDescriptor,us=(t,e,s,r)=>{for(var i=r>1?void 0:r?rm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&sm(e,s,i),i};const im="sonic-alert",Gl="sonic-alert-dismissed";let Gt=class extends Q{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1,this.announce=!1}connectedCallback(){super.connectedCallback(),this.dismissForever&&this.id&&Wa(Gl,this.id)&&this.remove()}willUpdate(t){(t.has("announce")||t.has("status"))&&this._syncAnnounceA11y()}_syncAnnounceA11y(){if(!this.announce){this.removeAttribute("role"),this.removeAttribute("aria-live");return}this.setAttribute("role",Za(this.status));const t=Ja(this.status);t?this.setAttribute("aria-live",t):this.removeAttribute("aria-live")}render(){return R`
3353
+ `],Oe.modals=[],Je([u({type:Boolean})],Oe.prototype,"forceAction",2),Je([u({type:Boolean})],Oe.prototype,"noCloseButton",2),Je([u({type:Boolean})],Oe.prototype,"removeOnHide",2),Je([u({type:Boolean})],Oe.prototype,"removeHashOnHide",2),Je([u({type:String,reflect:!0})],Oe.prototype,"align",2),Je([u({type:String})],Oe.prototype,"paddingX",2),Je([u({type:String})],Oe.prototype,"paddingY",2),Je([u({type:String})],Oe.prototype,"maxWidth",2),Je([u({type:String})],Oe.prototype,"maxHeight",2),Je([u({type:String})],Oe.prototype,"zIndex",2),Je([u({type:String})],Oe.prototype,"width",2),Je([u({type:String})],Oe.prototype,"height",2),Je([u({type:String})],Oe.prototype,"effect",2),Je([u({attribute:!1})],Oe.prototype,"styleSheet",2),Je([u({type:Object})],Oe.prototype,"options",2),Je([u({type:Boolean,reflect:!0})],Oe.prototype,"fullScreen",2),Je([u({type:Boolean,reflect:!0})],Oe.prototype,"visible",2),Je([u({type:String})],Oe.prototype,"closeButtonType",2),Je([$s("#modal")],Oe.prototype,"_modalElement",2),Je([u({type:Boolean})],Oe.prototype,"closeOnLocationChange",2),Je([xe()],Oe.prototype,"location",2),Je([xe()],Oe.prototype,"_animationState",2),Oe=Je([X(Gl)],Oe),typeof window<"u"&&(window.SonicModal=Oe);var rm=Object.defineProperty,im=Object.getOwnPropertyDescriptor,us=(t,e,s,r)=>{for(var i=r>1?void 0:r?im(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&rm(e,s,i),i};const nm="sonic-alert",Yl="sonic-alert-dismissed";let Gt=class extends Q{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1,this.announce=!1}connectedCallback(){super.connectedCallback(),this.dismissForever&&this.id&&Ka(Yl,this.id)&&this.remove()}willUpdate(t){(t.has("announce")||t.has("status"))&&this._syncAnnounceA11y()}_syncAnnounceA11y(){if(!this.announce){this.removeAttribute("role"),this.removeAttribute("aria-live");return}this.setAttribute("role",Ja(this.status));const t=Qa(this.status);t?this.setAttribute("aria-live",t):this.removeAttribute("aria-live")}render(){return R`
3354
3354
  ${this.noIcon?ee:R`<slot name="icon">
3355
3355
  <sonic-icon
3356
3356
  aria-hidden="true"
@@ -3371,7 +3371,7 @@ ${this.value}</textarea
3371
3371
  >
3372
3372
  <sonic-icon name="cancel"></sonic-icon>
3373
3373
  </sonic-button>`:ee}
3374
- `}close(){if(this.remove(),!!this.dismissForever){if(!this.id){console.warn("sonic-alert : dismissForever nécessite un id.");return}Ka(Gl,this.id)}}};Gt.styles=[Qt,Qa,Z`
3374
+ `}close(){if(this.remove(),!!this.dismissForever){if(!this.id){console.warn("sonic-alert : dismissForever nécessite un id.");return}Ga(Yl,this.id)}}};Gt.styles=[Qt,Xa,Z`
3375
3375
  :host {
3376
3376
  --sc-_rounded: var(--sc-rounded);
3377
3377
  position: relative;
@@ -3424,8 +3424,8 @@ ${this.value}</textarea
3424
3424
  right: 0.3rem;
3425
3425
  border-left: none;
3426
3426
  }
3427
- `],us([u({type:String})],Gt.prototype,"label",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"noIcon",2),us([u({type:String})],Gt.prototype,"text",2),us([u({type:String,reflect:!0})],Gt.prototype,"size",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"dismissible",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"background",2),us([u({type:String,reflect:!0})],Gt.prototype,"status",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"dismissForever",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"announce",2),Gt=us([X(im)],Gt);var nm=Object.defineProperty,om=Object.getOwnPropertyDescriptor,hi=(t,e,s,r)=>{for(var i=r>1?void 0:r?om(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&nm(e,s,i),i};const am="sonic-alert-messages";let ar=class extends Tt(Q){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?R`<div class="container">
3428
- ${ml(this.messages,t=>t.type=="public"?R`<sonic-alert
3427
+ `],us([u({type:String})],Gt.prototype,"label",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"noIcon",2),us([u({type:String})],Gt.prototype,"text",2),us([u({type:String,reflect:!0})],Gt.prototype,"size",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"dismissible",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"background",2),us([u({type:String,reflect:!0})],Gt.prototype,"status",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"dismissForever",2),us([u({type:Boolean,reflect:!0})],Gt.prototype,"announce",2),Gt=us([X(nm)],Gt);var om=Object.defineProperty,am=Object.getOwnPropertyDescriptor,hi=(t,e,s,r)=>{for(var i=r>1?void 0:r?am(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&om(e,s,i),i};const lm="sonic-alert-messages";let ar=class extends Tt(Q){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?R`<div class="container">
3428
+ ${gl(this.messages,t=>t.type=="public"?R`<sonic-alert
3429
3429
  announce
3430
3430
  status=${t.status||"default"}
3431
3431
  text=${se(t.content)}
@@ -3440,9 +3440,9 @@ ${this.value}</textarea
3440
3440
  grid-template-columns: minmax(0, 1fr);
3441
3441
  width: 100%;
3442
3442
  }
3443
- `],hi([u({type:String})],ar.prototype,"size",2),hi([u({type:Boolean})],ar.prototype,"background",2),hi([u({type:Boolean})],ar.prototype,"noIcon",2),hi([u({type:Array})],ar.prototype,"messages",2),ar=hi([X(am)],ar);var lm=Object.defineProperty,cm=Object.getOwnPropertyDescriptor,Yl=(t,e,s,r)=>{for(var i=r>1?void 0:r?cm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&lm(e,s,i),i};const um="sonic-toast-message-subscriber";let Po=class extends Tt(Q){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach(e=>{e.type=="public"&&Se.add({text:e.content||"",status:e.status})})}render(){return ee}};Yl([u({type:Array})],Po.prototype,"messages",1),Po=Yl([X(um)],Po);var hm=Object.defineProperty,dm=Object.getOwnPropertyDescriptor,Lr=(t,e,s,r)=>{for(var i=r>1?void 0:r?dm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&hm(e,s,i),i};const pm="sonic-tooltip",Zl=4;let Ut=class extends Q{constructor(){super(...arguments),this.disabled=!1,this.focusable=!1,this.showTooltip=()=>{this.isEffectivelyDisabled||!this.bubbleEl||this.bubbleEl.matches(":popover-open")||this.bubbleEl.showPopover()},this.hideTooltip=()=>{this.bubbleEl?.matches(":popover-open")&&this.bubbleEl.hidePopover()},this.handleBeforeToggle=t=>{if(t.newState==="open"){this.stopPositioning??=ql(()=>this.computePosition());return}this.endPositioning()}}get isEffectivelyDisabled(){return this.disabled||!this.formatLabel()}formatLabel(){return(this.label??"").replaceAll("&nbsp;"," ").trim().split(`
3443
+ `],hi([u({type:String})],ar.prototype,"size",2),hi([u({type:Boolean})],ar.prototype,"background",2),hi([u({type:Boolean})],ar.prototype,"noIcon",2),hi([u({type:Array})],ar.prototype,"messages",2),ar=hi([X(lm)],ar);var cm=Object.defineProperty,um=Object.getOwnPropertyDescriptor,Zl=(t,e,s,r)=>{for(var i=r>1?void 0:r?um(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&cm(e,s,i),i};const hm="sonic-toast-message-subscriber";let xo=class extends Tt(Q){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach(e=>{e.type=="public"&&Se.add({text:e.content||"",status:e.status})})}render(){return ee}};Zl([u({type:Array})],xo.prototype,"messages",1),xo=Zl([X(hm)],xo);var dm=Object.defineProperty,pm=Object.getOwnPropertyDescriptor,Lr=(t,e,s,r)=>{for(var i=r>1?void 0:r?pm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&dm(e,s,i),i};const fm="sonic-tooltip",Jl=4;let Ut=class extends Q{constructor(){super(...arguments),this.disabled=!1,this.focusable=!1,this.showTooltip=()=>{this.isEffectivelyDisabled||!this.bubbleEl||this.bubbleEl.matches(":popover-open")||this.bubbleEl.showPopover()},this.hideTooltip=()=>{this.bubbleEl?.matches(":popover-open")&&this.bubbleEl.hidePopover()},this.handleBeforeToggle=t=>{if(t.newState==="open"){this.stopPositioning??=Bl(()=>this.computePosition());return}this.endPositioning()}}get isEffectivelyDisabled(){return this.disabled||!this.formatLabel()}formatLabel(){return(this.label??"").replaceAll("&nbsp;"," ").trim().split(`
3444
3444
  `).map(t=>t.trim()).join(`
3445
- `)}computePosition(){const t=this.bubbleEl;if(!t)return;const{side:e,align:s}=Fl(this.placement,"top","center"),{x:r,y:i}=Ul({anchor:this.getBoundingClientRect(),floating:t.getBoundingClientRect(),side:e,align:s,gap:Zl,bounds:jl(this,Zl)});Object.assign(t.style,{left:`${Math.round(r)}px`,top:`${Math.round(i)}px`})}endPositioning(){this.stopPositioning?.(),this.stopPositioning=void 0}syncTabIndex(){this.disabled?this.setAttribute("tabindex","-1"):this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex")}syncNativeTitle(){if(Ut.supportsPopover||this.isEffectivelyDisabled){this.removeAttribute("title");return}this.setAttribute("title",this.formatLabel().replaceAll(`
3445
+ `)}computePosition(){const t=this.bubbleEl;if(!t)return;const{side:e,align:s}=Rl(this.placement,"top","center"),{x:r,y:i}=ql({anchor:this.getBoundingClientRect(),floating:t.getBoundingClientRect(),side:e,align:s,gap:Jl,bounds:zl(this,Jl)});Object.assign(t.style,{left:`${Math.round(r)}px`,top:`${Math.round(i)}px`})}endPositioning(){this.stopPositioning?.(),this.stopPositioning=void 0}syncTabIndex(){this.disabled?this.setAttribute("tabindex","-1"):this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex")}syncNativeTitle(){if(Ut.supportsPopover||this.isEffectivelyDisabled){this.removeAttribute("title");return}this.setAttribute("title",this.formatLabel().replaceAll(`
3446
3446
  `," "))}connectedCallback(){super.connectedCallback(),Ut.supportsPopover&&(this.addEventListener("focusin",this.showTooltip),this.addEventListener("focusout",this.hideTooltip))}disconnectedCallback(){this.endPositioning(),Ut.supportsPopover&&(this.removeEventListener("focusin",this.showTooltip),this.removeEventListener("focusout",this.hideTooltip)),super.disconnectedCallback()}willUpdate(t){(!this.hasUpdated||t.has("disabled")||t.has("focusable"))&&this.syncTabIndex(),(!this.hasUpdated||t.has("label")||t.has("disabled"))&&this.syncNativeTitle(),t.has("disabled")&&this.disabled&&this.hideTooltip(),t.has("label")&&this.isEffectivelyDisabled&&this.hideTooltip(),super.willUpdate(t)}render(){if(!Ut.supportsPopover)return R`<slot></slot>`;const t=this.isEffectivelyDisabled?"disabled":"",e=this.formatLabel();return R`
3447
3447
  <slot
3448
3448
  @mouseenter=${this.showTooltip}
@@ -3454,7 +3454,7 @@ ${this.value}</textarea
3454
3454
  @beforetoggle=${this.handleBeforeToggle}
3455
3455
  >${e}</span
3456
3456
  >
3457
- `}};Ut.supportsPopover=Rl,Ut.styles=[Z`
3457
+ `}};Ut.supportsPopover=jl,Ut.styles=[Z`
3458
3458
  :host {
3459
3459
  display: inline-flex;
3460
3460
  align-items: center;
@@ -3504,7 +3504,7 @@ ${this.value}</textarea
3504
3504
  transition: none;
3505
3505
  }
3506
3506
  }
3507
- `],Lr([u({type:String})],Ut.prototype,"label",2),Lr([u({type:String,reflect:!0})],Ut.prototype,"placement",2),Lr([u({type:Boolean})],Ut.prototype,"disabled",2),Lr([u({type:Boolean})],Ut.prototype,"focusable",2),Lr([$s(".tooltip-bubble")],Ut.prototype,"bubbleEl",2),Ut=Lr([X(pm)],Ut);var fm=Object.defineProperty,mm=Object.getOwnPropertyDescriptor,_s=(t,e,s,r)=>{for(var i=r>1?void 0:r?mm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&fm(e,s,i),i};const gm="sonic-divider";let es=class extends Q{constructor(){super(...arguments),this.hasText=!1,this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.lineStyle="solid"}willUpdate(t){super.willUpdate(t),this.syncHasText()}syncHasText(){this.hasText=!!(this.label||this.slotNodes?.length)}render(){return R`<div class="${this.hasText?"has-text":"no-text"}">
3507
+ `],Lr([u({type:String})],Ut.prototype,"label",2),Lr([u({type:String,reflect:!0})],Ut.prototype,"placement",2),Lr([u({type:Boolean})],Ut.prototype,"disabled",2),Lr([u({type:Boolean})],Ut.prototype,"focusable",2),Lr([$s(".tooltip-bubble")],Ut.prototype,"bubbleEl",2),Ut=Lr([X(fm)],Ut);var mm=Object.defineProperty,gm=Object.getOwnPropertyDescriptor,_s=(t,e,s,r)=>{for(var i=r>1?void 0:r?gm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&mm(e,s,i),i};const bm="sonic-divider";let es=class extends Q{constructor(){super(...arguments),this.hasText=!1,this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.lineStyle="solid"}willUpdate(t){super.willUpdate(t),this.syncHasText()}syncHasText(){this.hasText=!!(this.label||this.slotNodes?.length)}render(){return R`<div class="${this.hasText?"has-text":"no-text"}">
3508
3508
  <span class="text"
3509
3509
  >${He(this.label?this.label:ee)}<slot
3510
3510
  @slotchange=${this.syncHasText}
@@ -3640,7 +3640,7 @@ ${this.value}</textarea
3640
3640
  :host([linestyle="dotted"]) {
3641
3641
  --sc-_border-style: dotted;
3642
3642
  }
3643
- `],_s([bt({flatten:!0})],es.prototype,"slotNodes",2),_s([xe()],es.prototype,"hasText",2),_s([u({type:String})],es.prototype,"label",2),_s([u({type:String,reflect:!0})],es.prototype,"size",2),_s([u({type:String,reflect:!0})],es.prototype,"align",2),_s([u({type:Boolean,reflect:!0})],es.prototype,"vertical",2),_s([u({type:Boolean,reflect:!0})],es.prototype,"noMargin",2),_s([u({type:String,reflect:!0})],es.prototype,"lineStyle",2),es=_s([X(gm)],es);var bm=Object.getOwnPropertyDescriptor,vm=(t,e,s,r)=>{for(var i=r>1?void 0:r?bm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const ym="sonic-card-header-description";let xo=class extends Q{render(){return R`<slot></slot>`}};xo.styles=[Z`
3643
+ `],_s([bt({flatten:!0})],es.prototype,"slotNodes",2),_s([xe()],es.prototype,"hasText",2),_s([u({type:String})],es.prototype,"label",2),_s([u({type:String,reflect:!0})],es.prototype,"size",2),_s([u({type:String,reflect:!0})],es.prototype,"align",2),_s([u({type:Boolean,reflect:!0})],es.prototype,"vertical",2),_s([u({type:Boolean,reflect:!0})],es.prototype,"noMargin",2),_s([u({type:String,reflect:!0})],es.prototype,"lineStyle",2),es=_s([X(bm)],es);var ym=Object.getOwnPropertyDescriptor,vm=(t,e,s,r)=>{for(var i=r>1?void 0:r?ym(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const wm="sonic-card-header-description";let Ao=class extends Q{render(){return R`<slot></slot>`}};Ao.styles=[Z`
3644
3644
  :host() {
3645
3645
  display: block;
3646
3646
  font-size: 0.7em;
@@ -3648,7 +3648,7 @@ ${this.value}</textarea
3648
3648
  font-family: var(--sc-font-family-base, sans-serif);
3649
3649
  font-weight: var(--sc-font-style-base, normal);
3650
3650
  }
3651
- `],xo=vm([X(ym)],xo);var wm=Object.defineProperty,_m=Object.getOwnPropertyDescriptor,Ao=(t,e,s,r)=>{for(var i=r>1?void 0:r?_m(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&wm(e,s,i),i};const Sm="sonic-card-header";let di=class extends Q{render(){return R`
3651
+ `],Ao=vm([X(wm)],Ao);var _m=Object.defineProperty,Sm=Object.getOwnPropertyDescriptor,Co=(t,e,s,r)=>{for(var i=r>1?void 0:r?Sm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&_m(e,s,i),i};const Pm="sonic-card-header";let di=class extends Q{render(){return R`
3652
3652
  <div class="header-content">
3653
3653
  ${He(this.label)}
3654
3654
  ${this.description?R`<sonic-card-header-description
@@ -3700,15 +3700,15 @@ ${this.value}</textarea
3700
3700
  ::slotted(sonic-card-header-description) {
3701
3701
  margin-top: 0.12em;
3702
3702
  }
3703
- `],Ao([u()],di.prototype,"label",2),Ao([u()],di.prototype,"description",2),di=Ao([X(Sm)],di);var Pm=Object.getOwnPropertyDescriptor,xm=(t,e,s,r)=>{for(var i=r>1?void 0:r?Pm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Am="sonic-card-main";let Co=class extends Q{render(){return R`<slot></slot>`}};Co.styles=[Z`
3703
+ `],Co([u()],di.prototype,"label",2),Co([u()],di.prototype,"description",2),di=Co([X(Pm)],di);var xm=Object.getOwnPropertyDescriptor,Am=(t,e,s,r)=>{for(var i=r>1?void 0:r?xm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Cm="sonic-card-main";let ko=class extends Q{render(){return R`<slot></slot>`}};ko.styles=[Z`
3704
3704
  :host {
3705
3705
  display: block;
3706
3706
  }
3707
- `],Co=xm([X(Am)],Co);var Cm=Object.getOwnPropertyDescriptor,km=(t,e,s,r)=>{for(var i=r>1?void 0:r?Cm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const $m="sonic-card-footer";let ko=class extends Q{render(){return R` <slot></slot> `}};ko.styles=[Z`
3707
+ `],ko=Am([X(Cm)],ko);var km=Object.getOwnPropertyDescriptor,$m=(t,e,s,r)=>{for(var i=r>1?void 0:r?km(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Dm="sonic-card-footer";let $o=class extends Q{render(){return R` <slot></slot> `}};$o.styles=[Z`
3708
3708
  :host {
3709
3709
  display: block;
3710
3710
  }
3711
- `],ko=km([X($m)],ko);var Dm=Object.defineProperty,Em=Object.getOwnPropertyDescriptor,$o=(t,e,s,r)=>{for(var i=r>1?void 0:r?Em(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Dm(e,s,i),i};const Om="sonic-card";let pi=class extends Q{constructor(){super(...arguments),this.shadow="lg",this.type="base"}render(){return R`<div class="shadowable"><slot></slot></div>`}};pi.styles=[el,fo,Z`
3711
+ `],$o=$m([X(Dm)],$o);var Em=Object.defineProperty,Om=Object.getOwnPropertyDescriptor,Do=(t,e,s,r)=>{for(var i=r>1?void 0:r?Om(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Em(e,s,i),i};const Tm="sonic-card";let pi=class extends Q{constructor(){super(...arguments),this.shadow="lg",this.type="base"}render(){return R`<div class="shadowable"><slot></slot></div>`}};pi.styles=[tl,mo,Z`
3712
3712
  * {
3713
3713
  box-sizing: border-box;
3714
3714
  }
@@ -3742,7 +3742,7 @@ ${this.value}</textarea
3742
3742
  border: 1px solid var(--sc-base-200, rgba(0, 0, 0, 0.12));
3743
3743
  }
3744
3744
  }
3745
- `],$o([u({type:String,reflect:!0})],pi.prototype,"shadow",2),$o([u({type:String,reflect:!0})],pi.prototype,"type",2),pi=$o([X(Om)],pi);var Tm=Object.defineProperty,Lm=Object.getOwnPropertyDescriptor,fi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Lm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Tm(e,s,i),i};const Im="sonic-tr";let lr=class extends Tt(Q){constructor(){super(...arguments),this._metadata_={}}willUpdate(t){t.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(t)}render(){return R`<slot></slot>`}};lr.styles=[Wi,Z`
3745
+ `],Do([u({type:String,reflect:!0})],pi.prototype,"shadow",2),Do([u({type:String,reflect:!0})],pi.prototype,"type",2),pi=Do([X(Tm)],pi);var Lm=Object.defineProperty,Im=Object.getOwnPropertyDescriptor,fi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Im(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Lm(e,s,i),i};const Mm="sonic-tr";let lr=class extends Tt(Q){constructor(){super(...arguments),this._metadata_={}}willUpdate(t){t.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(t)}render(){return R`<slot></slot>`}};lr.styles=[Wi,Z`
3746
3746
  :host {
3747
3747
  display: table-row;
3748
3748
  }
@@ -3760,7 +3760,7 @@ ${this.value}</textarea
3760
3760
  :host(:hover) {
3761
3761
  background: var(--sc-_hover-bg) !important;
3762
3762
  }
3763
- `],fi([u({type:Object})],lr.prototype,"_metadata_",2),fi([u({type:Boolean,reflect:!0})],lr.prototype,"even",2),fi([u({type:Boolean,reflect:!0})],lr.prototype,"odd",2),fi([u({type:Boolean,reflect:!0})],lr.prototype,"last",2),lr=fi([X(Im)],lr);var Mm=Object.defineProperty,Nm=Object.getOwnPropertyDescriptor,cr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Nm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Mm(e,s,i),i};const Fm="sonic-th";let Ss=class extends Q{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<th
3763
+ `],fi([u({type:Object})],lr.prototype,"_metadata_",2),fi([u({type:Boolean,reflect:!0})],lr.prototype,"even",2),fi([u({type:Boolean,reflect:!0})],lr.prototype,"odd",2),fi([u({type:Boolean,reflect:!0})],lr.prototype,"last",2),lr=fi([X(Mm)],lr);var Nm=Object.defineProperty,Fm=Object.getOwnPropertyDescriptor,cr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Fm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Nm(e,s,i),i};const Rm="sonic-th";let Ss=class extends Q{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<th
3764
3764
  style=${$t(t)}
3765
3765
  colspan=${se(this.colSpan)}
3766
3766
  rowspan=${se(this.rowSpan)}
@@ -3789,7 +3789,7 @@ ${this.value}</textarea
3789
3789
  :host([noBorder]) th {
3790
3790
  border-bottom: none;
3791
3791
  }
3792
- `],cr([u({type:Number})],Ss.prototype,"colSpan",2),cr([u({type:Number})],Ss.prototype,"rowSpan",2),cr([u({type:String})],Ss.prototype,"align",2),cr([u({type:String})],Ss.prototype,"minWidth",2),cr([u({type:String})],Ss.prototype,"maxWidth",2),cr([u({type:String})],Ss.prototype,"width",2),Ss=cr([X(Fm)],Ss);var Rm=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,zs=(t,e,s,r)=>{for(var i=r>1?void 0:r?jm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Rm(e,s,i),i};const zm="sonic-td";let hs=class extends Q{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<td
3792
+ `],cr([u({type:Number})],Ss.prototype,"colSpan",2),cr([u({type:Number})],Ss.prototype,"rowSpan",2),cr([u({type:String})],Ss.prototype,"align",2),cr([u({type:String})],Ss.prototype,"minWidth",2),cr([u({type:String})],Ss.prototype,"maxWidth",2),cr([u({type:String})],Ss.prototype,"width",2),Ss=cr([X(Rm)],Ss);var jm=Object.defineProperty,zm=Object.getOwnPropertyDescriptor,zs=(t,e,s,r)=>{for(var i=r>1?void 0:r?zm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&jm(e,s,i),i};const Um="sonic-td";let hs=class extends Q{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<td
3793
3793
  style=${$t(t)}
3794
3794
  colspan=${se(this.colSpan)}
3795
3795
  rowspan=${se(this.rowSpan)}
@@ -3808,13 +3808,13 @@ ${this.value}</textarea
3808
3808
  border-right: var(--sc-_td-border-r, none);
3809
3809
  border-left: var(--sc-_td-border-l, none);
3810
3810
  }
3811
- `],zs([u({type:Number})],hs.prototype,"colSpan",2),zs([u({type:Number})],hs.prototype,"rowSpan",2),zs([u({type:String})],hs.prototype,"align",2),zs([u({type:String})],hs.prototype,"vAlign",2),zs([u({type:String})],hs.prototype,"minWidth",2),zs([u({type:String})],hs.prototype,"maxWidth",2),zs([u({type:String})],hs.prototype,"width",2),hs=zs([X(zm)],hs);var Um=Object.getOwnPropertyDescriptor,qm=(t,e,s,r)=>{for(var i=r>1?void 0:r?Um(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Bm="sonic-thead";let Do=class extends Q{render(){return R`<slot></slot>`}};Do.styles=[Z`
3811
+ `],zs([u({type:Number})],hs.prototype,"colSpan",2),zs([u({type:Number})],hs.prototype,"rowSpan",2),zs([u({type:String})],hs.prototype,"align",2),zs([u({type:String})],hs.prototype,"vAlign",2),zs([u({type:String})],hs.prototype,"minWidth",2),zs([u({type:String})],hs.prototype,"maxWidth",2),zs([u({type:String})],hs.prototype,"width",2),hs=zs([X(Um)],hs);var qm=Object.getOwnPropertyDescriptor,Bm=(t,e,s,r)=>{for(var i=r>1?void 0:r?qm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Hm="sonic-thead";let Eo=class extends Q{render(){return R`<slot></slot>`}};Eo.styles=[Z`
3812
3812
  :host {
3813
3813
  display: table-header-group;
3814
3814
  }
3815
- `],Do=qm([X(Bm)],Do);var Hm=Object.getOwnPropertyDescriptor,Vm=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Wm="sonic-tbody";let Eo=class extends Q{render(){return R`<tbody>
3815
+ `],Eo=Bm([X(Hm)],Eo);var Vm=Object.getOwnPropertyDescriptor,Wm=(t,e,s,r)=>{for(var i=r>1?void 0:r?Vm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Km="sonic-tbody";let Oo=class extends Q{render(){return R`<tbody>
3816
3816
  <slot></slot>
3817
- </tbody>`}};Eo.styles=[Z`
3817
+ </tbody>`}};Oo.styles=[Z`
3818
3818
  :host {
3819
3819
  display: table-row-group;
3820
3820
  }
@@ -3831,20 +3831,20 @@ ${this.value}</textarea
3831
3831
  border-bottom: var(--sc-form-border-width) solid
3832
3832
  var(--sc-base-200, rgba(0, 0, 0, 0.12)) !important;
3833
3833
  }
3834
- `],Eo=Vm([X(Wm)],Eo);var Km=Object.getOwnPropertyDescriptor,Gm=(t,e,s,r)=>{for(var i=r>1?void 0:r?Km(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Ym="sonic-tfoot";let Oo=class extends Q{render(){return R`<tfoot>
3834
+ `],Oo=Wm([X(Km)],Oo);var Gm=Object.getOwnPropertyDescriptor,Ym=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Zm="sonic-tfoot";let To=class extends Q{render(){return R`<tfoot>
3835
3835
  <slot></slot>
3836
- </tfoot>`}};Oo.styles=[Z`
3836
+ </tfoot>`}};To.styles=[Z`
3837
3837
  :host {
3838
3838
  display: contents;
3839
3839
  }
3840
- `],Oo=Gm([X(Ym)],Oo);var Zm=Object.getOwnPropertyDescriptor,Jm=(t,e,s,r)=>{for(var i=r>1?void 0:r?Zm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Qm="sonic-caption";let To=class extends Q{render(){return R`<slot></slot>`}};To.styles=[Z`
3840
+ `],To=Ym([X(Zm)],To);var Jm=Object.getOwnPropertyDescriptor,Qm=(t,e,s,r)=>{for(var i=r>1?void 0:r?Jm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Xm="sonic-caption";let Lo=class extends Q{render(){return R`<slot></slot>`}};Lo.styles=[Z`
3841
3841
  :host {
3842
3842
  display: table-caption;
3843
3843
  font-size: 0.75rem;
3844
3844
  color: var(--sc-_caption-color);
3845
3845
  padding: var(--sc-_td-py) var(--sc-_td-px) calc(2 * var(--sc-_td-py));
3846
3846
  }
3847
- `],To=Jm([X(Qm)],To);var Xm=Object.defineProperty,eg=Object.getOwnPropertyDescriptor,Ir=(t,e,s,r)=>{for(var i=r>1?void 0:r?eg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Xm(e,s,i),i};const tg="sonic-table";let Us=class extends Q{render(){const t={maxHeight:this.maxHeight};return R`
3847
+ `],Lo=Qm([X(Xm)],Lo);var eg=Object.defineProperty,tg=Object.getOwnPropertyDescriptor,Ir=(t,e,s,r)=>{for(var i=r>1?void 0:r?tg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&eg(e,s,i),i};const sg="sonic-table";let Us=class extends Q{render(){const t={maxHeight:this.maxHeight};return R`
3848
3848
  <div
3849
3849
  class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
3850
3850
  style=${$t(t)}
@@ -3899,7 +3899,7 @@ ${this.value}</textarea
3899
3899
  border: var(--sc-_bw) solid var(--sc-_border-color);
3900
3900
  border-radius: var(--sc-rounded);
3901
3901
  }
3902
- `],Ir([u({type:String,reflect:!0})],Us.prototype,"size",2),Ir([u({type:Boolean,reflect:!0})],Us.prototype,"bordered",2),Ir([u({type:Boolean,reflect:!0})],Us.prototype,"rounded",2),Ir([u({type:Boolean,reflect:!0})],Us.prototype,"noCustomScroll",2),Ir([u({type:String})],Us.prototype,"maxHeight",2),Us=Ir([X(tg)],Us);const Jl="AES-CBC",sg=256;async function rg(){return crypto.subtle.generateKey({name:Jl,length:sg},!0,["encrypt","decrypt"])}function ig(t){return btoa(String.fromCharCode(...new Uint8Array(t)))}async function ng(t,e,s){const r=new TextEncoder().encode(t),i=await crypto.subtle.encrypt({name:Jl,iv:s.buffer},e,r);return ig(i)}const og=Z`
3902
+ `],Ir([u({type:String,reflect:!0})],Us.prototype,"size",2),Ir([u({type:Boolean,reflect:!0})],Us.prototype,"bordered",2),Ir([u({type:Boolean,reflect:!0})],Us.prototype,"rounded",2),Ir([u({type:Boolean,reflect:!0})],Us.prototype,"noCustomScroll",2),Ir([u({type:String})],Us.prototype,"maxHeight",2),Us=Ir([X(sg)],Us);const Ql="AES-CBC",rg=256;async function ig(){return crypto.subtle.generateKey({name:Ql,length:rg},!0,["encrypt","decrypt"])}function ng(t){return btoa(String.fromCharCode(...new Uint8Array(t)))}async function og(t,e,s){const r=new TextEncoder().encode(t),i=await crypto.subtle.encrypt({name:Ql,iv:s.buffer},e,r);return ng(i)}const ag=Z`
3903
3903
  @keyframes altcha-spinner {
3904
3904
  to {
3905
3905
  transform: rotate(360deg);
@@ -4122,7 +4122,7 @@ ${this.value}</textarea
4122
4122
  animation: altcha-spinner 0.75s infinite linear;
4123
4123
  transform-origin: center;
4124
4124
  }
4125
- `;var ag=Object.defineProperty,lg=Object.getOwnPropertyDescriptor,dn=(t,e,s,r)=>{for(var i=r>1?void 0:r?lg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ag(e,s,i),i};const cg="supersoniks_altcha",ug="Si2\\]X8M4!n9DCLd";let Ql=!1;const hg="sonic-captcha";let Mr=class extends sr(Q){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=t=>{t=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!Ql){const t=document.createElement("script");t.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),t.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",Ql=!0,document.head.appendChild(t)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=xi(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const t=this.shadowRoot.querySelector("form");if(!t)return;const e=new FormData(t);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(e.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const t=await rg(),e=new TextEncoder().encode(ug),s=await ng(cg,t,e);this.key=s}render(){if(!this.key)return ee;const e=gs.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return R`
4125
+ `;var lg=Object.defineProperty,cg=Object.getOwnPropertyDescriptor,dn=(t,e,s,r)=>{for(var i=r>1?void 0:r?cg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&lg(e,s,i),i};const ug="supersoniks_altcha",hg="Si2\\]X8M4!n9DCLd";let Xl=!1;const dg="sonic-captcha";let Mr=class extends sr(Q){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=t=>{t=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!Xl){const t=document.createElement("script");t.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),t.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",Xl=!0,document.head.appendChild(t)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=xi(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const t=this.shadowRoot.querySelector("form");if(!t)return;const e=new FormData(t);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(e.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const t=await ig(),e=new TextEncoder().encode(hg),s=await og(ug,t,e);this.key=s}render(){if(!this.key)return ee;const e=gs.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return R`
4126
4126
  <form>
4127
4127
  <altcha-widget
4128
4128
  challengeurl="${this.chalengeUrl}?key=${this.key}&maxNumber=${this.maxNumber}"
@@ -4134,7 +4134,7 @@ ${this.value}</textarea
4134
4134
  ></altcha-widget>
4135
4135
  </form>
4136
4136
  <slot></slot>
4137
- `}};Mr.styles=[og,Z`
4137
+ `}};Mr.styles=[ag,Z`
4138
4138
  :host {
4139
4139
  --altcha-border-width: var(--sc-border-width, 1px);
4140
4140
  --altcha-border-radius: var(--sc-rounded);
@@ -4153,4 +4153,4 @@ ${this.value}</textarea
4153
4153
  --altcha-color-footer-bg: var(--sc-base-100, #000);
4154
4154
  --altcha-max-width: 260px;
4155
4155
  }
4156
- `],dn([u()],Mr.prototype,"key",2),dn([u()],Mr.prototype,"action",2),dn([u({type:Number})],Mr.prototype,"zIndex",2),Mr=dn([X(hg)],Mr),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))};class dg extends Ln{constructor(e){super(e),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=s=>{this.setValue(s)},this.node=e.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(e=>e()),this.cleanupWatchers=[]}normalizeInput(e){return Ma(e)?e.path:e}render(e){const s=this.normalizeInput(e),r=this.pathTemplate!==s;return r&&(this.pathTemplate=s,this.teardownWatchers()),(r||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),zt}setupSubscription(){const e=this.node,s=this.pathTemplate;if(!e||!s)return;this.teardownWatchers();const r=Ht(s);if(r.length>0)for(const i of r)this.cleanupWatchers.push(Ts(Hi.watcherStore,Hi.hooked,e,i,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const e=this.node,s=this.pathTemplate;if(!s)return;const r=Ht(s).length>0;let i=s;if(r)if(!e)i=null;else{const n=Lt(e,s);i=n.ready?n.path:null}if(i!==this.resolvedPath){if(!i){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=i,this.subscribe(i)}}subscribe(e){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=Si(e),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(e=>e.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const Xl=Es(dg),pg=Xl,fg=Xl;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:xi,dataProvider:yc,sub:fg,subscribe:pg,get:vc,set:wc};const mg=Se,gg=Oe;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:mg,SonicModal:gg};const bg=window;bg.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));
4156
+ `],dn([u()],Mr.prototype,"key",2),dn([u()],Mr.prototype,"action",2),dn([u({type:Number})],Mr.prototype,"zIndex",2),Mr=dn([X(dg)],Mr),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))};class pg extends In{constructor(e){super(e),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=s=>{this.setValue(s)},this.node=e.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(e=>e()),this.cleanupWatchers=[]}normalizeInput(e){return Na(e)?e.path:e}render(e){const s=this.normalizeInput(e),r=this.pathTemplate!==s;return r&&(this.pathTemplate=s,this.teardownWatchers()),(r||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),zt}setupSubscription(){const e=this.node,s=this.pathTemplate;if(!e||!s)return;this.teardownWatchers();const r=Ht(s);if(r.length>0)for(const i of r)this.cleanupWatchers.push(Ts(Hi.watcherStore,Hi.hooked,e,i,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const e=this.node,s=this.pathTemplate;if(!s)return;const r=Ht(s).length>0;let i=s;if(r)if(!e)i=null;else{const n=Lt(e,s);i=n.ready?n.path:null}if(i!==this.resolvedPath){if(!i){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=i,this.subscribe(i)}}subscribe(e){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=Si(e),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(e=>e.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const ec=Es(pg),fg=ec,mg=ec;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:xi,dataProvider:wc,sub:mg,subscribe:fg,get:vc,set:_c};const gg=Se,bg=Oe;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:gg,SonicModal:bg};const yg=window;yg.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));