@supersoniks/concorde 4.9.92 → 4.9.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/ai/cursor/rules/concorde.mdc +7 -0
  2. package/ai/jetbrains/rules/concorde.md +6 -0
  3. package/ai/skills/concorde/SKILL.md +48 -0
  4. package/build-infos.json +1 -1
  5. package/concorde-core.bundle.js +299 -292
  6. package/concorde-core.es.js +10139 -6035
  7. package/dist/concorde-core.bundle.js +299 -292
  8. package/dist/concorde-core.es.js +10139 -6035
  9. package/dist/docs-mock-api-sw.js +110 -0
  10. package/dist/docs-mock-api-sw.js.map +3 -3
  11. package/dist/js/core/components/functional/functional.js +1 -0
  12. package/dist/js/core/components/functional/functional.js.map +1 -1
  13. package/dist/js/core/components/functional/jsonata/jsonata.js +119 -0
  14. package/dist/js/core/components/functional/jsonata/jsonata.js.map +1 -0
  15. package/dist/js/core/components/ui/button/button.js +1 -1
  16. package/dist/js/core/components/ui/button/button.js.map +1 -1
  17. package/dist/js/core/decorators/Subscriber.js +1 -0
  18. package/dist/js/core/decorators/Subscriber.js.map +1 -1
  19. package/dist/js/core/decorators/api.js +108 -16
  20. package/dist/js/core/decorators/api.js.map +1 -1
  21. package/dist/js/core/decorators/subscriber/derive.js +60 -0
  22. package/dist/js/core/decorators/subscriber/derive.js.map +1 -0
  23. package/dist/js/core/utils/api.js +29 -8
  24. package/dist/js/core/utils/api.js.map +1 -1
  25. package/dist/js/core/utils/derive.js +246 -0
  26. package/dist/js/core/utils/derive.js.map +1 -0
  27. package/dist/js/core/utils/jsonataHelpers.js +69 -0
  28. package/dist/js/core/utils/jsonataHelpers.js.map +1 -0
  29. package/dist/js/core/utils/jsonataRuntime.js +75 -0
  30. package/dist/js/core/utils/jsonataRuntime.js.map +1 -0
  31. package/dist/js/utils.js +2 -0
  32. package/dist/js/utils.js.map +1 -1
  33. package/dist/types/core/components/functional/functional.d.ts +1 -0
  34. package/dist/types/core/components/functional/functional.d.ts.map +1 -1
  35. package/dist/types/core/components/functional/jsonata/jsonata.d.ts +29 -0
  36. package/dist/types/core/components/functional/jsonata/jsonata.d.ts.map +1 -0
  37. package/dist/types/core/components/ui/button/button.d.ts +1 -1
  38. package/dist/types/core/components/ui/button/button.d.ts.map +1 -1
  39. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +3 -3
  40. package/dist/types/core/components/ui/form/input/input.d.ts +3 -3
  41. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +3 -3
  42. package/dist/types/core/components/ui/form/textarea/textarea.d.ts +3 -3
  43. package/dist/types/core/decorators/Subscriber.d.ts +2 -0
  44. package/dist/types/core/decorators/Subscriber.d.ts.map +1 -1
  45. package/dist/types/core/decorators/api.d.ts +21 -12
  46. package/dist/types/core/decorators/api.d.ts.map +1 -1
  47. package/dist/types/core/decorators/subscriber/derive.d.ts +30 -0
  48. package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -0
  49. package/dist/types/core/utils/api.d.ts +1 -1
  50. package/dist/types/core/utils/api.d.ts.map +1 -1
  51. package/dist/types/core/utils/derive.d.ts +40 -0
  52. package/dist/types/core/utils/derive.d.ts.map +1 -0
  53. package/dist/types/core/utils/jsonataHelpers.d.ts +15 -0
  54. package/dist/types/core/utils/jsonataHelpers.d.ts.map +1 -0
  55. package/dist/types/core/utils/jsonataRuntime.d.ts +13 -0
  56. package/dist/types/core/utils/jsonataRuntime.d.ts.map +1 -0
  57. package/dist/types/mixins.d.ts +3 -3
  58. package/dist/types/utils.d.ts +2 -0
  59. package/dist/types/utils.d.ts.map +1 -1
  60. package/docs/assets/{index-DURr6O71.js → index-DpIkksht.js} +652 -479
  61. package/docs/crawl/docs/_decorators/get.html +27 -6
  62. package/docs/crawl/docs/_decorators/patch.html +6 -0
  63. package/docs/crawl/docs/_decorators/post.html +8 -0
  64. package/docs/crawl/docs/_decorators/put.html +6 -0
  65. package/docs/crawl/hubs/decorators.html +36 -31
  66. package/docs/crawl/hubs/remote-data.html +36 -31
  67. package/docs/index.html +1 -1
  68. package/docs/llms-full.txt +47 -3
  69. package/docs/src/docs/_decorators/get.md +31 -0
  70. package/docs/src/docs/_decorators/patch.md +9 -0
  71. package/docs/src/docs/_decorators/post.md +11 -0
  72. package/docs/src/docs/_decorators/put.md +9 -0
  73. package/docs/src/docs/search/docs-search.json +120 -5
  74. package/docs/src/tsconfig.json +268 -268
  75. package/package.json +28 -3
  76. package/public/docs-mock-api-sw.js +110 -0
  77. package/public/docs-mock-api-sw.js.map +3 -3
  78. package/src/core/components/functional/functional.ts +1 -0
  79. package/src/core/components/functional/jsonata/jsonata.md +56 -0
  80. package/src/core/components/functional/jsonata/jsonata.spec.ts +202 -0
  81. package/src/core/components/functional/jsonata/jsonata.ts +116 -0
  82. package/src/core/components/ui/button/button.ts +2 -2
  83. package/src/core/decorators/Subscriber.ts +2 -0
  84. package/src/core/decorators/api.post.spec.ts +99 -4
  85. package/src/core/decorators/api.spec.ts +90 -0
  86. package/src/core/decorators/api.ts +212 -92
  87. package/src/core/decorators/subscriber/derive.ts +95 -0
  88. package/src/core/utils/api.spec.ts +73 -0
  89. package/src/core/utils/api.ts +44 -11
  90. package/src/core/utils/derive.spec.ts +190 -0
  91. package/src/core/utils/derive.ts +357 -0
  92. package/src/core/utils/jsonataHelpers.ts +100 -0
  93. package/src/core/utils/jsonataRuntime.ts +88 -0
  94. package/src/docs/_core-concept/dataFlow.md +9 -0
  95. package/src/docs/_decorators/get.md +31 -0
  96. package/src/docs/_decorators/patch.md +9 -0
  97. package/src/docs/_decorators/post.md +11 -0
  98. package/src/docs/_decorators/put.md +9 -0
  99. package/src/docs/_misc/docs-mock-api.md +3 -0
  100. package/src/docs/components/docs-demo-sources.ts +40 -0
  101. package/src/docs/docs.ts +1 -0
  102. package/src/docs/example/decorators-demo-post.ts +70 -0
  103. package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +59 -0
  104. package/src/docs/example/docs-jsonata-demos.ts +128 -0
  105. package/src/docs/mock-api/fixtures-jsonata.ts +131 -0
  106. package/src/docs/mock-api/router.ts +26 -0
  107. package/src/docs/navigation/navigation.ts +4 -0
  108. package/src/docs/search/docs-search.json +300 -5
  109. package/src/tsconfig.json +18 -0
  110. package/src/tsconfig.tsbuildinfo +1 -1
  111. package/src/utils.ts +13 -0
@@ -1,79 +1,82 @@
1
- (function(G){typeof define=="function"&&define.amd?define(G):G()})((function(){"use strict";var N,tt;let G=class vt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const r=s.indexOf("=");return t[s.substring(0,r).trim()]=s.substring(r+1),t},{})}static nextComposedAncestor(t){return t instanceof Element&&t.assignedSlot?t.assignedSlot:t.parentNode||t.host||null}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static overflowMatches(t,s){return s.includes(t.overflowY)||s.includes(t.overflowX)}static findAncestorByOverflow(t,s){let r=t;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(vt.overflowMatches(i,s))return r}r=vt.nextComposedAncestor(r)}return null}static getScrollableAncestor(t){return vt.findAncestorByOverflow(t,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(t){return vt.findAncestorByOverflow(t,["auto","scroll","overlay"])}static scopeAttributeNames(t){const s=t.toLowerCase();return s===t?[t]:[t,s]}static readScopeAttributeOnElement(t,s){for(const r of vt.scopeAttributeNames(s))if(t.hasAttribute(r))return t.getAttribute(r)??"";return null}static getAncestorAttributeValue(t,s){if(!t)return null;let r=t;for(;r;){if(r instanceof HTMLElement){const n=vt.readScopeAttributeOnElement(r,s);if(n!=null)return n}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(t){const s=vt.getAncestorAttributeValue(t,"token"),r=vt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,i=vt.getAncestorAttributeValue(t,"serviceURL");let n=null,o=null;const l=vt.getAncestorAttributeValue(t,"tokenProvider"),c=vt.getAncestorAttributeValue(t,"eventsApiToken");s||(n=vt.getAncestorAttributeValue(t,"userName"),o=vt.getAncestorAttributeValue(t,"password"));const h=vt.getAncestorAttributeValue(t,"credentials")||void 0,u=t.getAttribute("cache"),d=t.hasAttribute("blockUntilDone"),p=t.hasAttribute("keepAlive");return{serviceURL:i,token:s,userName:n,password:o,authToken:c,tokenProvider:l,addHTTPResponse:r,credentials:h,cache:u,blockUntilDone:d,keepAlive:p}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return vt.getClosestElement(t,"form")}static getAncestorsByTagNames(t,s){const r=new Set(s.map(o=>o.toLowerCase())),i=[];let n=t.parentNode||t.host;for(;n;)n instanceof Element&&r.has(n.tagName.toLowerCase())&&i.push(n),n=n.parentNode||n.host;return i}static getAncestorsBySelectors(t,s){const r=[];let i=t.parentNode||t.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(t){return new Promise(async r=>{const i=document.createElement("script");i.src=t,i.onload=()=>r(!0),i.onerror=()=>r(!0),document.head.appendChild(i)})}static async loadCSS(t){return new Promise(async r=>{const i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href=t,i.onload=()=>r(!0),i.onerror=()=>r(!0),document.head.appendChild(i)})}};const $i=e=>{const t=document.documentElement,s=new MutationObserver(i=>{for(let n of i)n.type==="attributes"&&n.attributeName==="lang"&&e()}),r={attributes:!0,attributeFilter:["lang"]};s.observe(t,r)};let js=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",r="long"){s||(s=G.getLanguage());const i=(h,u)=>[Math.floor(h/u),h%u];function n(h,u,d){return new Intl.NumberFormat(h,{style:"unit",unit:u,unitDisplay:d}).format}const[o,l]=i(t,60),c=[];return o&&c.push(n(s,"hour",r)(o)),l&&c.push(n(s,"minute",r)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};class jr{constructor(t){this.path=t}toString(){return this.path}}function zr(e){return new Proxy(e,{get(t,s){if(s==="path")return t.path;if(s==="toString")return t.toString.bind(t);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return t[s];const r=t.path?`${t.path}.${String(s)}`:String(s);return zr(new jr(r))}})}const Ao=/\$\{|\{\$/;function ko(e){return Ao.test(e)}function Ai(e){const t=typeof e=="string"?e:e.path;if(ko(t))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return t}const hs=function(e){return this instanceof hs?zr(new jr(e)):new hs(e)};let ot=class he{static shallowEqual(t,s,r=!0){const i=Object.keys(t),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const l=t[o],c=s[o];if(r?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,r=!0){const i=Object.keys(t),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const l=t[o],c=s[o],h=he.isObject(l)&&he.isObject(c),u=r?l!==c:l!=c;if(h&&!he.deepEqual(l,c)||!h&&u)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return he.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,r=!1){for(const i of s){const n=t[i];if(n===void 0)return;r&&he.isObject(n)?t=Object.assign(Array.isArray(n)?[]:{},t,n):t=t[i]}return t}static traverseDotNotation(t,s,r=!1){return he.traverse(t,s.split("."),r)}static getURLSearchArray(t,s=""){let r=[];for(let i in t){const n=t[i];s&&(i=s+"["+i+"]"),he.isObject(n)?r=[...r,...this.getURLSearchArray(n,i)]:r.push(`${i}=${n}`)}return r}static getURLSearchString(t){return he.getURLSearchArray(t,"").join("&")}};const yt=ot.traverseDotNotation;let Do=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},Ur="sonic";typeof __SONIC_PREFIX__<"u"&&(Ur=__SONIC_PREFIX__);let Vr=Ur.replace(/-([a-z])/g,e=>e[1].toUpperCase());const zs=Vr.charAt(0).toUpperCase()+Vr.slice(1),Oo=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function Br(e){return e==null||typeof e!="object"||Array.isArray(e)?!1:Object.keys(e).some(t=>Oo.has(t))}function Us(e){return Object.prototype.hasOwnProperty.call(e,"__value")}function de(e){return typeof e=="object"&&e!==null}let qe="sonic";typeof __SONIC_PREFIX__>"u"&&(qe="sonic");const ki=qe=="sonic"?"publisher-proxies-data":qe+"-publisher-proxies-data",$e=class $e{constructor(t,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_=t,this.parent=s||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const t in this._proxies_.keys())t!="_parent_"&&this._proxies_.get(t)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),$e.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_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!L.changed){L.changed=!0,L.saveId++;const s=L.saveId;setTimeout(()=>L.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(r=>{r[t]!==s&&(r[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,t);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[t]&&(t=r.propertyMap[t]),typeof r[t]<"u"&&r[t]!==s&&(r[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let r=s;const i=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(r=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==i&&(t[r]=i)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const r=this._value_[s];t[s]!==r&&(t[s]=r)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){if(this._value_===t||de(this._value_)&&de(t)&&t&&Us(this._value_)&&Us(t)&&this._value_.__value===t.__value||!de(t)&&t===this._value_.__value)return!0;this._value_=de(t)?t:{__value:t},this._cachedGet_=void 0;const r=Us(this._value_);if(this._parentKey_&&this.parent){const i=Us(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const n=[];n[Number(this._parentKey_)]=i,this.parent.set(n)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,n)=>{n!="_parent_"&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,n)=>{const o=this._value_[n];n!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(n))&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),de(this._value_))for(const i in this._value_){const n=t[i],l=de(n)?n:{__value:n};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,n);continue}this._proxies_.get(i)?.set(l,!0),this._publishDynamicFilling_(i,n)}return!0}get(){if(Eo(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||($e.instancesCounter++,this._instanceCounter_=$e.instancesCounter),$e.instances.set(this._instanceCounter_,this),"<"+qe+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+qe+"-publisher-proxy>"}};$e.instances=new Map,$e.instancesCounter=0;let ds=$e;const Vs=[];function Eo(e){Vs.length>0&&Vs[0].add(e)}function Hr(){Vs.unshift(new Set)}function qr(){return Vs.shift()}const R=class R{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],R.instance!=null)throw"Singleton / use getInstance";R.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),R.initPageShowHandler()}static initPageShowHandler(){R.pageShowHandlerInitialized||(R.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",t=>{t.persisted&&R.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let r=localStorage.getItem(ki),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(ki,r),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const l=this.localStorageData[o],c=new Date().getTime()-(l.expirationDelayMs||n);l.lastModifiationMS<c&&delete this.localStorageData[o]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=R.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new R)}return R.instance==null?new R:R.instance}static get(t,s){return R.getInstance().get(t,s)}async setLocalData(t,s){await this.isLocalStrorageReady,t.set(this.localStorageData[s+"¤lang_"+G.getLanguage()]?.data||t.get())}get(t,s){const r=s?.localStorageMode==="enabled",i=s?.invalidateOnPageShow===!0;if(!this.publishers.has(t)){const l=Di({});this.set(t,l)}const n=this.publishers.get(t);return r&&this.initialisedData.indexOf(t)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(n,t)),i&&(n._invalidate_on_page_show_=i),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==R.saveId&&t%10!=0))try{if(!R.changed||R.saving)return;R.saving=!0,R.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_"+G.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(ki,i)}if(R.saving=!1,R.changed){R.saveId++;const i=R.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{R.saving=!1}}async compress(t,s){const r=new TextEncoder().encode(t),i=window,n=new i.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const l=await new Response(n.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let u=0;u<c.length;u++)h+=String.fromCharCode(c[u]);return btoa(h)}async decompress(t,s){const r=atob(t),n=Uint8Array.from(r,u=>u.charCodeAt(0)).buffer,o=window,l=new o.DecompressionStream(s),c=l.writable.getWriter();c.write(n),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}};R.buildDate="Tue Sep 15 2026 12:46:45 GMT+0200 (Central European Summer Time)",R.changed=!1,R.saving=!1,R.saveId=0,R.instance=null,R.instances=new Map,R.pageShowHandlerInitialized=!1;let L=R;if(typeof window<"u"){const e=window;e[zs+"PublisherManager"]=e[zs+"PublisherManager"]||L}const Lo=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function To(e,t){return{get:function(s,r){if(typeof r=="string"&&Lo.has(r))return e[r];if(r==Symbol.toPrimitive)return()=>t().get();if(!e._proxies_.has(r)){const i=e._value_[r],n=Di(de(i)?i:{__value:i},e,r);n._proxies_.set("_parent_",t()),e._proxies_.set(r,n)}return e._proxies_.get(r)},set:function(s,r,i){if(r=="_value_")return e._value_=i,!0;if(r=="_cachedGet_")return e._cachedGet_=i,!0;if(r=="_assignmentId_")return e._assignmentId_=i,!0;if(r=="_is_savable_")return e._is_savable_=i,!0;if(r=="_expiration_delay_")return e._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return e._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return e._instanceCounter_=i,!0;if(!e._proxies_.has(r)){const o=Di({},e,r);o._proxies_.set("_parent_",t()),e._proxies_.set(r,o)}return e._value_[r]!==i&&(e._value_[r]=i,e._publishDynamicFilling_(r,i),e._proxies_.get(r)?.set(de(i)?i:{__value:i})),!0},deleteProperty:function(s,r){return e._publishDynamicFilling_(r,null),e._proxies_.get(r)?.set(null),delete e._value_[r]},has:function(s,r){return r in e._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(s,r,i){return i&&"value"in i&&(e._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(s,r){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return e._value_.__value?Object.keys(e._value_.__value):Object.keys(e._value_)}}}function Di(e,t=null,s){const r=new ds(e,t,s);let i=null;const n=To(r,()=>i);return i=new Proxy(r,n),i}class Io extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=ds.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(qe+"-publisher-proxy",Io)}catch{}const Bs=(e,t)=>{if(typeof e=="function"){const s=e;return Hr(),s(),qr()}if(typeof e=="string"){const s=e.split("."),r=s.shift()||"";let i=L.get(r,t);i=ot.traverse(i,s);const n=new Set;return n.add(i),n}return new Set([e])};function Mo(e){const t=Ai(e);return Bs(t).values().next().value?.get()}function Hs(e,t,s){const r=Ai(e);return Bs(r,s).values().next().value}function No(e,t){return Br(t)?Hs(e,void 0,t):Hs(e)}function qs(e,t){return Br(t)?Hs(e,void 0,t):Hs(e)}function Ro(e,t){const s=Ai(e);Bs(s).values().next().value?.set(t)}let Ws=(N=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(N.observedElements.keys()).forEach(t=>N.unObserve(t)))}static observe(t){if(!t||!N.enabled||N.observedElements.has(t))return;const s=new MutationObserver(N.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(t,r),t.querySelectorAll("[data-bind]").forEach(i=>N.addPublisherListeners(i)),N.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(r=>N.removePublisherListeners(r)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&N.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>N.addPublisherListeners(s)):t.childNodes.forEach(s=>N.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&N.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>N.removePublisherListeners(s)):t.childNodes.forEach(s=>N.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":N.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{N.onAdded(r)}),s.removedNodes.forEach(r=>{N.onRemoved(r)});break}}static removePublisherListeners(t){const s=N.publisherListeners.get(t);s&&(N.publisherListeners.delete(t),s.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[t],s=s.filter(r=>r.length>0),{expression:t.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:N.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const r of s)if(r!="_self_"){if(!t)return null;t=t[r]}return t}static addPublisherListeners(t){N.removePublisherListeners(t);const s=G.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const r=L.getInstance().get(s),i=N.getDataBindItems(t),n=[];i.forEach(o=>{const l=o.bindedVariablesDescriptor,c=o.propertyToUpdate;for(const h of l.variables){const u=h;let d=r;d=N.getSubPublisher(r,u);const p=t,y={publisher:d,onAssign:()=>{const g=l.variables.map(E=>N.getSubPublisher(r,E)?.get());let b=l.expression,w=!1;if(g.length==1&&l.variables[0].join(".")==b.substring(1)){let E=g[0];E===null&&(E=""),p[c]=E;return}for(let E=0;E<g.length;E++){let f=g[E];const m=l.variables[E];f===null&&(w=!0,f=void 0),b=b.replace("$"+m.join("."),f)}if(b.indexOf("|")!=-1){const E=b.indexOf("|");if(E==0)b=js.js(b.substring(1));else{const f=b.substring(0,E),m=b.substring(E+1),_=js[f];b=w?"":_?_(m):b}}else b=w?"":b;p[c]=b}};d?.onAssign(y.onAssign),n.push(y)}}),N.publisherListeners.set(t,n)}},N.observedElements=new Map,N.enabled=!0,N.publisherListeners=new Map,N);Ws.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ws);/**
1
+ (function(Ke){typeof define=="function"&&define.amd?define(Ke):Ke()})((function(){"use strict";var Oe,et;let Ke=class Ct{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const i=s.indexOf("=");return e[s.substring(0,i).trim()]=s.substring(i+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 i=e;for(;i;){if(i instanceof Element&&i.nodeType===1){const r=window.getComputedStyle(i);if(Ct.overflowMatches(r,s))return i}i=Ct.nextComposedAncestor(i)}return null}static getScrollableAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const i of Ct.scopeAttributeNames(s))if(e.hasAttribute(i))return e.getAttribute(i)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let i=e;for(;i;){if(i instanceof HTMLElement){const n=Ct.readScopeAttributeOnElement(i,s);if(n!=null)return n}const r=i.parentNode||i.host;if(!r)break;i=r}return null}static getApiConfiguration(e){const s=Ct.getAncestorAttributeValue(e,"token"),i=Ct.getAncestorAttributeValue(e,"addHTTPResponse")!=null,r=Ct.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const c=Ct.getAncestorAttributeValue(e,"tokenProvider"),d=Ct.getAncestorAttributeValue(e,"eventsApiToken");s||(n=Ct.getAncestorAttributeValue(e,"userName"),o=Ct.getAncestorAttributeValue(e,"password"));const m=Ct.getAncestorAttributeValue(e,"credentials")||void 0,k=e.getAttribute("cache"),g=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:r,token:s,userName:n,password:o,authToken:d,tokenProvider:c,addHTTPResponse:i,credentials:m,cache:k,blockUntilDone:g,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 Ct.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const i=new Set(s.map(o=>o.toLowerCase())),r=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&i.has(n.tagName.toLowerCase())&&r.push(n),n=n.parentNode||n.host;return r}static getAncestorsBySelectors(e,s){const i=[];let r=e.parentNode||e.host;for(;r;){if(r instanceof Element)for(const n of s)try{if(r.matches(n)){i.push(r);break}}catch{}r=r.parentNode||r.host}return i}static async loadJS(e){return new Promise(async i=>{const r=document.createElement("script");r.src=e,r.onload=()=>i(!0),r.onerror=()=>i(!0),document.head.appendChild(r)})}static async loadCSS(e){return new Promise(async i=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>i(!0),r.onerror=()=>i(!0),document.head.appendChild(r)})}};const ln=t=>{const e=document.documentElement,s=new MutationObserver(r=>{for(let n of r)n.type==="attributes"&&n.attributeName==="lang"&&t()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(e,i)};let Tr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",i="long"){s||(s=Ke.getLanguage());const r=(m,k)=>[Math.floor(m/k),m%k];function n(m,k,g){return new Intl.NumberFormat(m,{style:"unit",unit:k,unitDisplay:g}).format}const[o,c]=r(e,60),d=[];return o&&d.push(n(s,"hour",i)(o)),c&&d.push(n(s,"minute",i)(c)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(d)}static js(e){try{return Function("return "+e)()}catch{return""}}};class wo{constructor(e){this.path=e}toString(){return this.path}}function _o(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 i=e.path?`${e.path}.${String(s)}`:String(s);return _o(new wo(i))}})}const fl=/\$\{|\{\$/;function gl(t){return fl.test(t)}function di(t){const e=typeof t=="string"?t:t.path;if(gl(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Ss=function(t){return this instanceof Ss?_o(new wo(t)):new Ss(t)};let at=class Ps{static shallowEqual(e,s,i=!0){const r=Object.keys(e),n=Object.keys(s);if(r.length!==n.length&&i)return!1;for(const o of r){const c=e[o],d=s[o];if(i?c!==d:c!=d)return!1}return!0}static deepEqual(e,s,i=!0){const r=Object.keys(e),n=Object.keys(s);if(r.length!==n.length&&i)return!1;for(const o of r){const c=e[o],d=s[o],m=Ps.isObject(c)&&Ps.isObject(d),k=i?c!==d:c!=d;if(m&&!Ps.deepEqual(c,d)||!m&&k)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return Ps.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,i=!1){for(const r of s){const n=e[r];if(n===void 0)return;i&&Ps.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[r]}return e}static traverseDotNotation(e,s,i=!1){return Ps.traverse(e,s.split("."),i)}static getURLSearchArray(e,s=""){let i=[];for(let r in e){const n=e[r];s&&(r=s+"["+r+"]"),Ps.isObject(n)?i=[...i,...this.getURLSearchArray(n,r)]:i.push(`${r}=${n}`)}return i}static getURLSearchString(e){return Ps.getURLSearchArray(e,"").join("&")}};const kt=at.traverseDotNotation;let bl=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},xo="sonic";typeof __SONIC_PREFIX__<"u"&&(xo=__SONIC_PREFIX__);let Po=xo.replace(/-([a-z])/g,t=>t[1].toUpperCase());const pi=Po.charAt(0).toUpperCase()+Po.slice(1),ml=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function So(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>ml.has(e))}function fi(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function As(t){return typeof t=="object"&&t!==null}let hr="sonic";typeof __SONIC_PREFIX__>"u"&&(hr="sonic");const cn=hr=="sonic"?"publisher-proxies-data":hr+"-publisher-proxies-data",Us=class Us{constructor(e,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=s||null,this._parentKey_=i,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(),Us.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 i=this.get();this._assignListeners_.forEach(r=>{r(i)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(i=>{i[e]!==s&&(i[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(i=>{const r=Object.getOwnPropertyDescriptor(i,e);r&&!r.set&&!r.writable||(i.propertyMap&&i.propertyMap[e]&&(e=i.propertyMap[e]),typeof i[e]<"u"&&i[e]!==s&&(i[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 i=s;const r=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(i=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==r&&(e[i]=r)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const i=this._value_[s];e[s]!==i&&(e[s]=i)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1){if(this._value_===e||As(this._value_)&&As(e)&&e&&fi(this._value_)&&fi(e)&&this._value_.__value===e.__value||!As(e)&&e===this._value_.__value)return!0;this._value_=As(e)?e:{__value:e},this._cachedGet_=void 0;const i=fi(this._value_);if(this._parentKey_&&this.parent){const r=fi(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:r});else{const n=[];n[Number(this._parentKey_)]=r,this.parent.set(n)}else this.parent._value_[this._parentKey_]=r}if(i)return this._proxies_.forEach((r,n)=>{n!="_parent_"&&(r.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const r in this._value_)this._value_[r]===void 0&&delete this._value_[r];if(this._proxies_.forEach((r,n)=>{const o=this._value_[n];n!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(n))&&(r.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),As(this._value_))for(const r in this._value_){const n=e[r],c=As(n)?n:{__value:n};if(!this._proxies_.has(r)){this._publishDynamicFilling_(r,n);continue}this._proxies_.get(r)?.set(c,!0),this._publishDynamicFilling_(r,n)}return!0}get(){if(vl(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Us.instancesCounter++,this._instanceCounter_=Us.instancesCounter),Us.instances.set(this._instanceCounter_,this),"<"+hr+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+hr+"-publisher-proxy>"}};Us.instances=new Map,Us.instancesCounter=0;let Lr=Us;const gi=[];function vl(t){gi.length>0&&gi[0].add(t)}function Ao(){gi.unshift(new Set)}function Co(){return gi.shift()}const Te=class Te{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Te.instance!=null)throw"Singleton / use getInstance";Te.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Te.initPageShowHandler()}static initPageShowHandler(){Te.pageShowHandlerInitialized||(Te.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Te.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let i=localStorage.getItem(cn),r=null;if(i&&(r=await this.decompress(i,"gzip")),r)try{this.localStorageData=JSON.parse(r)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(cn,i),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const c=this.localStorageData[o],d=new Date().getTime()-(c.expirationDelayMs||n);c.lastModifiationMS<d&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const s=Te.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Te)}return Te.instance==null?new Te:Te.instance}static get(e,s){return Te.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+Ke.getLanguage()]?.data||e.get())}get(e,s){const i=s?.localStorageMode==="enabled",r=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const c=hn({});this.set(e,c)}const n=this.publishers.get(e);return i&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),r&&(n._invalidate_on_page_show_=r),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!==Te.saveId&&e%10!=0))try{if(!Te.changed||Te.saving)return;Te.saving=!0,Te.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const r of s){const n=this.publishers.get(r);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[r+"¤lang_"+Ke.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},i=!0)}if(i){const r=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(cn,r)}if(Te.saving=!1,Te.changed){Te.saveId++;const r=Te.saveId;setTimeout(()=>this.saveToLocalStorage(r),1e3)}}catch{Te.saving=!1}}async compress(e,s){const i=new TextEncoder().encode(e),r=window,n=new r.CompressionStream(s),o=n.writable.getWriter();o.write(i),o.close();const c=await new Response(n.readable).arrayBuffer(),d=new Uint8Array(c);let m="";for(let k=0;k<d.length;k++)m+=String.fromCharCode(d[k]);return btoa(m)}async decompress(e,s){const i=atob(e),n=Uint8Array.from(i,k=>k.charCodeAt(0)).buffer,o=window,c=new o.DecompressionStream(s),d=c.writable.getWriter();d.write(n),d.close();const m=await new Response(c.readable).arrayBuffer();return new TextDecoder().decode(m)}};Te.buildDate="Fri Sep 25 2026 11:10:29 GMT+0200 (Central European Summer Time)",Te.changed=!1,Te.saving=!1,Te.saveId=0,Te.instance=null,Te.instances=new Map,Te.pageShowHandlerInitialized=!1;let ye=Te;if(typeof window<"u"){const t=window;t[pi+"PublisherManager"]=t[pi+"PublisherManager"]||ye}const yl=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function wl(t,e){return{get:function(s,i){if(typeof i=="string"&&yl.has(i))return t[i];if(i==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(i)){const r=t._value_[i],n=hn(As(r)?r:{__value:r},t,i);n._proxies_.set("_parent_",e()),t._proxies_.set(i,n)}return t._proxies_.get(i)},set:function(s,i,r){if(i=="_value_")return t._value_=r,!0;if(i=="_cachedGet_")return t._cachedGet_=r,!0;if(i=="_assignmentId_")return t._assignmentId_=r,!0;if(i=="_is_savable_")return t._is_savable_=r,!0;if(i=="_expiration_delay_")return t._expiration_delay_=r,!0;if(i=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=r,!0;if(i=="_instanceCounter_")return t._instanceCounter_=r,!0;if(!t._proxies_.has(i)){const o=hn({},t,i);o._proxies_.set("_parent_",e()),t._proxies_.set(i,o)}return t._value_[i]!==r&&(t._value_[i]=r,t._publishDynamicFilling_(i,r),t._proxies_.get(i)?.set(As(r)?r:{__value:r})),!0},deleteProperty:function(s,i){return t._publishDynamicFilling_(i,null),t._proxies_.get(i)?.set(null),delete t._value_[i]},has:function(s,i){return i in t._value_&&i!="_lockInternalMutationPublishing_"},defineProperty:function(s,i,r){return r&&"value"in r&&(t._value_[i]=r.value),!0},getOwnPropertyDescriptor:function(s,i){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function hn(t,e=null,s){const i=new Lr(t,e,s);let r=null;const n=wl(i,()=>r);return r=new Proxy(i,n),r}class _l extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Lr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(hr+"-publisher-proxy",_l)}catch{}const bi=(t,e)=>{if(typeof t=="function"){const s=t;return Ao(),s(),Co()}if(typeof t=="string"){const s=t.split("."),i=s.shift()||"";let r=ye.get(i,e);r=at.traverse(r,s);const n=new Set;return n.add(r),n}return new Set([t])};function xl(t){const e=di(t);return bi(e).values().next().value?.get()}function mi(t,e,s){const i=di(t);return bi(i,s).values().next().value}function Pl(t,e){return So(e)?mi(t,void 0,e):mi(t)}function vi(t,e){return So(e)?mi(t,void 0,e):mi(t)}function Sl(t,e){const s=di(t);bi(s).values().next().value?.set(e)}let yi=(Oe=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Oe.observedElements.keys()).forEach(e=>Oe.unObserve(e)))}static observe(e){if(!e||!Oe.enabled||Oe.observedElements.has(e))return;const s=new MutationObserver(Oe.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(e,i),e.querySelectorAll("[data-bind]").forEach(r=>Oe.addPublisherListeners(r)),Oe.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(i=>Oe.removePublisherListeners(i)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Oe.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Oe.addPublisherListeners(s)):e.childNodes.forEach(s=>Oe.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Oe.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Oe.removePublisherListeners(s)):e.childNodes.forEach(s=>Oe.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Oe.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{Oe.onAdded(i)}),s.removedNodes.forEach(i=>{Oe.onRemoved(i)});break}}static removePublisherListeners(e){const s=Oe.publisherListeners.get(e);s&&(Oe.publisherListeners.delete(e),s.forEach(i=>{i.publisher?.offAssign(i.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[e],s=s.filter(i=>i.length>0),{expression:e.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(r=>r.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,r=>r.substring(1).toUpperCase()),bindedVariablesDescriptor:Oe.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const i of s)if(i!="_self_"){if(!e)return null;e=e[i]}return e}static addPublisherListeners(e){Oe.removePublisherListeners(e);const s=Ke.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const i=ye.getInstance().get(s),r=Oe.getDataBindItems(e),n=[];r.forEach(o=>{const c=o.bindedVariablesDescriptor,d=o.propertyToUpdate;for(const m of c.variables){const k=m;let g=i;g=Oe.getSubPublisher(i,k);const f=e,A={publisher:g,onAssign:()=>{const E=c.variables.map(U=>Oe.getSubPublisher(i,U)?.get());let O=c.expression,I=!1;if(E.length==1&&c.variables[0].join(".")==O.substring(1)){let U=E[0];U===null&&(U=""),f[d]=U;return}for(let U=0;U<E.length;U++){let x=E[U];const y=c.variables[U];x===null&&(I=!0,x=void 0),O=O.replace("$"+y.join("."),x)}if(O.indexOf("|")!=-1){const U=O.indexOf("|");if(U==0)O=Tr.js(O.substring(1));else{const x=O.substring(0,U),y=O.substring(U+1),N=Tr[x];O=I?"":N?N(y):O}}else O=I?"":O;f[d]=O}};g?.onAssign(A.onAssign),n.push(A)}}),Oe.publisherListeners.set(e,n)}},Oe.observedElements=new Map,Oe.enabled=!0,Oe.publisherListeners=new Map,Oe);yi.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=yi);/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const $=e=>(t,s)=>{s!==void 0?s.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)};/**
5
+ */const X=t=>(e,s)=>{s!==void 0?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};/**
6
6
  * @license
7
7
  * Copyright 2019 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const Ks=globalThis,Oi=Ks.ShadowRoot&&(Ks.ShadyCSS===void 0||Ks.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ei=Symbol(),Wr=new WeakMap;let Li=class{constructor(t,s,r){if(this._$cssResult$=!0,r!==Ei)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(Oi&&t===void 0){const r=s!==void 0&&s.length===1;r&&(t=Wr.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Wr.set(s,t))}return t}toString(){return this.cssText}};const Fo=e=>new Li(typeof e=="string"?e:e+"",void 0,Ei),A=(e,...t)=>{const s=e.length===1?e[0]:t.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)+e[n+1]),e[0]);return new Li(s,e,Ei)},jo=(e,t)=>{if(Oi)e.adoptedStyleSheets=t.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of t){const r=document.createElement("style"),i=Ks.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,e.appendChild(r)}},Kr=Oi?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(const r of t.cssRules)s+=r.cssText;return Fo(s)})(e):e;/**
9
+ */const wi=globalThis,un=wi.ShadowRoot&&(wi.ShadyCSS===void 0||wi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dn=Symbol(),ko=new WeakMap;let pn=class{constructor(e,s,i){if(this._$cssResult$=!0,i!==dn)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(un&&e===void 0){const i=s!==void 0&&s.length===1;i&&(e=ko.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&ko.set(s,e))}return e}toString(){return this.cssText}};const Al=t=>new pn(typeof t=="string"?t:t+"",void 0,dn),ee=(t,...e)=>{const s=t.length===1?t[0]:e.reduce(((i,r,n)=>i+(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.")})(r)+t[n+1]),t[0]);return new pn(s,t,dn)},Cl=(t,e)=>{if(un)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const i=document.createElement("style"),r=wi.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,t.appendChild(i)}},$o=un?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const i of e.cssRules)s+=i.cssText;return Al(s)})(t):t;/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const{is:zo,defineProperty:Uo,getOwnPropertyDescriptor:Vo,getOwnPropertyNames:Bo,getOwnPropertySymbols:Ho,getPrototypeOf:qo}=Object,Gs=globalThis,Gr=Gs.trustedTypes,Wo=Gr?Gr.emptyScript:"",Ko=Gs.reactiveElementPolyfillSupport,us=(e,t)=>e,Ys={toAttribute(e,t){switch(t){case Boolean:e=e?Wo:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=e!==null;break;case Number:s=e===null?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch{s=null}}return s}},Ti=(e,t)=>!zo(e,t),Yr={attribute:!0,type:String,converter:Ys,reflect:!1,useDefault:!1,hasChanged:Ti};Symbol.metadata??=Symbol("metadata"),Gs.litPropertyMetadata??=new WeakMap;let We=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=Yr){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,s);i!==void 0&&Uo(this.prototype,t,i)}}static getPropertyDescriptor(t,s,r){const{get:i,set:n}=Vo(this.prototype,t)??{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(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Yr}static _$Ei(){if(this.hasOwnProperty(us("elementProperties")))return;const t=qo(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(us("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(us("properties"))){const s=this.properties,r=[...Bo(s),...Ho(s)];for(const i of r)this.createProperty(i,s[i])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);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(t){const s=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)s.unshift(Kr(i))}else t!==void 0&&s.push(Kr(t));return s}static _$Eu(t,s){const r=s.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.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((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const r of s.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jo(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,r){this._$AK(t,r)}_$ET(t,s){const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:Ys).toAttribute(s,r.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,s){const r=this.constructor,i=r._$Eh.get(t);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:Ys;this._$Em=i;const l=o.fromAttribute(s,n.type);this[i]=l??this._$Ej?.get(i)??l,this._$Em=null}}requestUpdate(t,s,r){if(t!==void 0){const i=this.constructor,n=this[t];if(r??=i.getPropertyOptions(t),!((r.hasChanged??Ti)(n,s)||r.useDefault&&r.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,s,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??s??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(s=void 0),this._$AL.set(t,s)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!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 t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(s)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(t){}firstUpdated(t){}};We.elementStyles=[],We.shadowRootOptions={mode:"open"},We[us("elementProperties")]=new Map,We[us("finalized")]=new Map,Ko?.({ReactiveElement:We}),(Gs.reactiveElementVersions??=[]).push("2.1.1");/**
13
+ */const{is:kl,defineProperty:$l,getOwnPropertyDescriptor:Dl,getOwnPropertyNames:El,getOwnPropertySymbols:Ol,getPrototypeOf:Tl}=Object,_i=globalThis,Do=_i.trustedTypes,Ll=Do?Do.emptyScript:"",Ml=_i.reactiveElementPolyfillSupport,Mr=(t,e)=>t,xi={toAttribute(t,e){switch(e){case Boolean:t=t?Ll: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}},fn=(t,e)=>!kl(t,e),Eo={attribute:!0,type:String,converter:xi,reflect:!1,useDefault:!1,hasChanged:fn};Symbol.metadata??=Symbol("metadata"),_i.litPropertyMetadata??=new WeakMap;let ur=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=Eo){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 i=Symbol(),r=this.getPropertyDescriptor(e,i,s);r!==void 0&&$l(this.prototype,e,r)}}static getPropertyDescriptor(e,s,i){const{get:r,set:n}=Dl(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:r,set(o){const c=r?.call(this);n?.call(this,o),this.requestUpdate(e,c,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Eo}static _$Ei(){if(this.hasOwnProperty(Mr("elementProperties")))return;const e=Tl(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Mr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Mr("properties"))){const s=this.properties,i=[...El(s),...Ol(s)];for(const r of i)this.createProperty(r,s[r])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[i,r]of s)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const r=this._$Eu(s,i);r!==void 0&&this._$Eh.set(r,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)s.unshift($o(r))}else e!==void 0&&s.push($o(e));return s}static _$Eu(e,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i: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 i of s.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Cl(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,i){this._$AK(e,i)}_$ET(e,s){const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const n=(i.converter?.toAttribute!==void 0?i.converter:xi).toAttribute(s,i.type);this._$Em=e,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(e,s){const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const n=i.getPropertyOptions(r),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:xi;this._$Em=r;const c=o.fromAttribute(s,n.type);this[r]=c??this._$Ej?.get(r)??c,this._$Em=null}}requestUpdate(e,s,i){if(e!==void 0){const r=this.constructor,n=this[e];if(i??=r.getPropertyOptions(e),!((i.hasChanged??fn)(n,s)||i.useDefault&&i.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:i,reflect:r,wrapped:n},o){i&&!(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||i||(s=void 0),this._$AL.set(e,s)),r===!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[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,n]of i){const{wrapped:o}=n,c=this[r];o!==!0||this._$AL.has(r)||c===void 0||this.C(r,void 0,n,c)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(s)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}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){}};ur.elementStyles=[],ur.shadowRootOptions={mode:"open"},ur[Mr("elementProperties")]=new Map,ur[Mr("finalized")]=new Map,Ml?.({ReactiveElement:ur}),(_i.reactiveElementVersions??=[]).push("2.1.1");/**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */const Go={attribute:!0,type:String,converter:Ys,reflect:!1,hasChanged:Ti},Yo=(e=Go,t,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"&&((e=Object.create(e)).wrapped=!0),n.set(s.name,e),r==="accessor"){const{name:o}=s;return{set(l){const c=t.get.call(this);t.set.call(this,l),this.requestUpdate(o,c,e)},init(l){return l!==void 0&&this.C(o,void 0,e,l),l}}}if(r==="setter"){const{name:o}=s;return function(l){const c=this[o];t.call(this,l),this.requestUpdate(o,c,e)}}throw Error("Unsupported decorator location: "+r)};function a(e){return(t,s)=>typeof s=="object"?Yo(e,t,s):((r,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(e,t,s)}/**
17
+ */const Nl={attribute:!0,type:String,converter:xi,reflect:!1,hasChanged:fn},Il=(t=Nl,e,s)=>{const{kind:i,metadata:r}=s;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),i==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),i==="accessor"){const{name:o}=s;return{set(c){const d=e.get.call(this);e.set.call(this,c),this.requestUpdate(o,d,t)},init(c){return c!==void 0&&this.C(o,void 0,t,c),c}}}if(i==="setter"){const{name:o}=s;return function(c){const d=this[o];e.call(this,c),this.requestUpdate(o,d,t)}}throw Error("Unsupported decorator location: "+i)};function h(t){return(e,s)=>typeof s=="object"?Il(t,e,s):((i,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,i),o?Object.getOwnPropertyDescriptor(r,n):void 0})(t,e,s)}/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
21
- */function T(e){return a({...e,state:!0,attribute:!1})}/**
21
+ */function Ae(t){return h({...t,state:!0,attribute:!1})}/**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const Ii=(e,t,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,s),s);/**
25
+ */const gn=(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 ue(e,t){return(s,r,i)=>{const n=o=>o.renderRoot?.querySelector(e)??null;return Ii(s,r,{get(){return n(this)}})}}/**
29
+ */function Cs(t,e){return(s,i,r)=>{const n=o=>o.renderRoot?.querySelector(t)??null;return gn(s,i,{get(){return n(this)}})}}/**
30
30
  * @license
31
31
  * Copyright 2021 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */function ps(e){return(t,s)=>{const{slot:r,selector:i}=e??{},n="slot"+(r?`[name=${r}]`:":not([name])");return Ii(t,s,{get(){const o=this.renderRoot?.querySelector(n),l=o?.assignedElements(e)??[];return i===void 0?l:l.filter((c=>c.matches(i)))}})}}/**
33
+ */function Nr(t){return(e,s)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return gn(e,s,{get(){const o=this.renderRoot?.querySelector(n),c=o?.assignedElements(t)??[];return r===void 0?c:c.filter((d=>d.matches(r)))}})}}/**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */function pt(e){return(t,s)=>{const{slot:r}=e??{},i="slot"+(r?`[name=${r}]`:":not([name])");return Ii(t,s,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(e)??[]}})}}/**
37
+ */function bt(t){return(e,s)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return gn(e,s,{get(){return this.renderRoot?.querySelector(r)?.assignedNodes(t)??[]}})}}/**
38
38
  * @license
39
39
  * Copyright 2017 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
- */const Mi=globalThis,Zs=Mi.trustedTypes,Zr=Zs?Zs.createPolicy("lit-html",{createHTML:e=>e}):void 0,Xr="$lit$",pe=`lit$${Math.random().toFixed(9).slice(2)}$`,Qr="?"+pe,Zo=`<${Qr}>`,Ae=document,fs=()=>Ae.createComment(""),ms=e=>e===null||typeof e!="object"&&typeof e!="function",Ni=Array.isArray,Xo=e=>Ni(e)||typeof e?.[Symbol.iterator]=="function",Ri=`[
42
- \f\r]`,bs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Jr=/-->/g,tn=/>/g,ke=RegExp(`>|${Ri}(?:([^\\s"'>=/]+)(${Ri}*=${Ri}*(?:[^
43
- \f\r"'\`<>=]|("|')|))|$)`,"g"),en=/'/g,sn=/"/g,rn=/^(?:script|style|textarea|title)$/i,Qo=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),v=Qo(1),Dt=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),nn=new WeakMap,De=Ae.createTreeWalker(Ae,129);function on(e,t){if(!Ni(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zr!==void 0?Zr.createHTML(t):t}const Jo=(e,t)=>{const s=e.length-1,r=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=bs;for(let l=0;l<s;l++){const c=e[l];let h,u,d=-1,p=0;for(;p<c.length&&(o.lastIndex=p,u=o.exec(c),u!==null);)p=o.lastIndex,o===bs?u[1]==="!--"?o=Jr:u[1]!==void 0?o=tn:u[2]!==void 0?(rn.test(u[2])&&(i=RegExp("</"+u[2],"g")),o=ke):u[3]!==void 0&&(o=ke):o===ke?u[0]===">"?(o=i??bs,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,h=u[1],o=u[3]===void 0?ke:u[3]==='"'?sn:en):o===sn||o===en?o=ke:o===Jr||o===tn?o=bs:(o=ke,i=void 0);const y=o===ke&&e[l+1].startsWith("/>")?" ":"";n+=o===bs?c+Zo:d>=0?(r.push(h),c.slice(0,d)+Xr+c.slice(d)+pe+y):c+pe+(d===-2?l:y)}return[on(e,n+(e[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]};let Fi=class $o{constructor({strings:t,_$litType$:s},r){let i;this.parts=[];let n=0,o=0;const l=t.length-1,c=this.parts,[h,u]=Jo(t,s);if(this.el=$o.createElement(h,r),De.currentNode=this.el.content,s===2||s===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=De.nextNode())!==null&&c.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const d of i.getAttributeNames())if(d.endsWith(Xr)){const p=u[o++],y=i.getAttribute(d).split(pe),g=/([.?@])?(.*)/.exec(p);c.push({type:1,index:n,name:g[2],strings:y,ctor:g[1]==="."?ea:g[1]==="?"?sa:g[1]==="@"?ia:Xs}),i.removeAttribute(d)}else d.startsWith(pe)&&(c.push({type:6,index:n}),i.removeAttribute(d));if(rn.test(i.tagName)){const d=i.textContent.split(pe),p=d.length-1;if(p>0){i.textContent=Zs?Zs.emptyScript:"";for(let y=0;y<p;y++)i.append(d[y],fs()),De.nextNode(),c.push({type:2,index:++n});i.append(d[p],fs())}}}else if(i.nodeType===8)if(i.data===Qr)c.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(pe,d+1))!==-1;)c.push({type:7,index:n}),d+=pe.length-1}n++}}static createElement(t,s){const r=Ae.createElement("template");return r.innerHTML=t,r}};function Ke(e,t,s=e,r){if(t===Dt)return t;let i=r!==void 0?s._$Co?.[r]:s._$Cl;const n=ms(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(e),i._$AT(e,s,r)),r!==void 0?(s._$Co??=[])[r]=i:s._$Cl=i),i!==void 0&&(t=Ke(e,i._$AS(e,t.values),i,r)),t}let ta=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:r}=this._$AD,i=(t?.creationScope??Ae).importNode(s,!0);De.currentNode=i;let n=De.nextNode(),o=0,l=0,c=r[0];for(;c!==void 0;){if(o===c.index){let h;c.type===2?h=new Ge(n,n.nextSibling,this,t):c.type===1?h=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(h=new ra(n,this,t)),this._$AV.push(h),c=r[++l]}o!==c?.index&&(n=De.nextNode(),o++)}return De.currentNode=Ae,i}p(t){let s=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,s),s+=r.strings.length-2):r._$AI(t[s])),s++}};class Ge{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,r,i){this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&t?.nodeType===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=Ke(this,t,s),ms(t)?t===D||t==null||t===""?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==Dt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Xo(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==D&&ms(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ae.createTextNode(t)),this._$AH=t}$(t){const{values:s,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Fi.createElement(on(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(s);else{const n=new ta(i,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(t){let s=nn.get(t.strings);return s===void 0&&nn.set(t.strings,s=new Fi(t)),s}k(t){Ni(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,i=0;for(const n of t)i===s.length?s.push(r=new Ge(this.O(fs()),this.O(fs()),this,this.options)):r=s[i],r._$AI(n),i++;i<s.length&&(this._$AR(r&&r._$AB.nextSibling,i),s.length=i)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class Xs{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,r,i,n){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,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=D}_$AI(t,s=this,r,i){const n=this.strings;let o=!1;if(n===void 0)t=Ke(this,t,s,0),o=!ms(t)||t!==this._$AH&&t!==Dt,o&&(this._$AH=t);else{const l=t;let c,h;for(t=n[0],c=0;c<n.length-1;c++)h=Ke(this,l[r+c],s,c),h===Dt&&(h=this._$AH[c]),o||=!ms(h)||h!==this._$AH[c],h===D?t=D:t!==D&&(t+=(h??"")+n[c+1]),this._$AH[c]=h}o&&!i&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ea extends Xs{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}class sa extends Xs{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==D)}}class ia extends Xs{constructor(t,s,r,i,n){super(t,s,r,i,n),this.type=5}_$AI(t,s=this){if((t=Ke(this,t,s,0)??D)===Dt)return;const r=this._$AH,i=t===D&&r!==D||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==D&&(r===D||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ra{constructor(t,s,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Ke(this,t)}}const na={I:Ge},oa=Mi.litHtmlPolyfillSupport;oa?.(Fi,Ge),(Mi.litHtmlVersions??=[]).push("3.3.1");const aa=(e,t,s)=>{const r=s?.renderBefore??t;let i=r._$litPart$;if(i===void 0){const n=s?.renderBefore??null;r._$litPart$=i=new Ge(t.insertBefore(fs(),n),n,void 0,s??{})}return i._$AI(e),i};/**
41
+ */const bn=globalThis,Pi=bn.trustedTypes,Oo=Pi?Pi.createPolicy("lit-html",{createHTML:t=>t}):void 0,To="$lit$",ks=`lit$${Math.random().toFixed(9).slice(2)}$`,Lo="?"+ks,Fl=`<${Lo}>`,Bs=document,Ir=()=>Bs.createComment(""),Fr=t=>t===null||typeof t!="object"&&typeof t!="function",mn=Array.isArray,jl=t=>mn(t)||typeof t?.[Symbol.iterator]=="function",vn=`[
42
+ \f\r]`,jr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mo=/-->/g,No=/>/g,Hs=RegExp(`>|${vn}(?:([^\\s"'>=/]+)(${vn}*=${vn}*(?:[^
43
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Io=/'/g,Fo=/"/g,jo=/^(?:script|style|textarea|title)$/i,Rl=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=Rl(1),It=Symbol.for("lit-noChange"),re=Symbol.for("lit-nothing"),Ro=new WeakMap,Ws=Bs.createTreeWalker(Bs,129);function zo(t,e){if(!mn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Oo!==void 0?Oo.createHTML(e):e}const zl=(t,e)=>{const s=t.length-1,i=[];let r,n=e===2?"<svg>":e===3?"<math>":"",o=jr;for(let c=0;c<s;c++){const d=t[c];let m,k,g=-1,f=0;for(;f<d.length&&(o.lastIndex=f,k=o.exec(d),k!==null);)f=o.lastIndex,o===jr?k[1]==="!--"?o=Mo:k[1]!==void 0?o=No:k[2]!==void 0?(jo.test(k[2])&&(r=RegExp("</"+k[2],"g")),o=Hs):k[3]!==void 0&&(o=Hs):o===Hs?k[0]===">"?(o=r??jr,g=-1):k[1]===void 0?g=-2:(g=o.lastIndex-k[2].length,m=k[1],o=k[3]===void 0?Hs:k[3]==='"'?Fo:Io):o===Fo||o===Io?o=Hs:o===Mo||o===No?o=jr:(o=Hs,r=void 0);const A=o===Hs&&t[c+1].startsWith("/>")?" ":"";n+=o===jr?d+Fl:g>=0?(i.push(m),d.slice(0,g)+To+d.slice(g)+ks+A):d+ks+(g===-2?c:A)}return[zo(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};let yn=class pl{constructor({strings:e,_$litType$:s},i){let r;this.parts=[];let n=0,o=0;const c=e.length-1,d=this.parts,[m,k]=zl(e,s);if(this.el=pl.createElement(m,i),Ws.currentNode=this.el.content,s===2||s===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(r=Ws.nextNode())!==null&&d.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(const g of r.getAttributeNames())if(g.endsWith(To)){const f=k[o++],A=r.getAttribute(g).split(ks),E=/([.?@])?(.*)/.exec(f);d.push({type:1,index:n,name:E[2],strings:A,ctor:E[1]==="."?ql:E[1]==="?"?Vl:E[1]==="@"?Bl:Si}),r.removeAttribute(g)}else g.startsWith(ks)&&(d.push({type:6,index:n}),r.removeAttribute(g));if(jo.test(r.tagName)){const g=r.textContent.split(ks),f=g.length-1;if(f>0){r.textContent=Pi?Pi.emptyScript:"";for(let A=0;A<f;A++)r.append(g[A],Ir()),Ws.nextNode(),d.push({type:2,index:++n});r.append(g[f],Ir())}}}else if(r.nodeType===8)if(r.data===Lo)d.push({type:2,index:n});else{let g=-1;for(;(g=r.data.indexOf(ks,g+1))!==-1;)d.push({type:7,index:n}),g+=ks.length-1}n++}}static createElement(e,s){const i=Bs.createElement("template");return i.innerHTML=e,i}};function dr(t,e,s=t,i){if(e===It)return e;let r=i!==void 0?s._$Co?.[i]:s._$Cl;const n=Fr(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(t),r._$AT(t,s,i)),i!==void 0?(s._$Co??=[])[i]=r:s._$Cl=r),r!==void 0&&(e=dr(t,r._$AS(t,e.values),r,i)),e}let Ul=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:i}=this._$AD,r=(e?.creationScope??Bs).importNode(s,!0);Ws.currentNode=r;let n=Ws.nextNode(),o=0,c=0,d=i[0];for(;d!==void 0;){if(o===d.index){let m;d.type===2?m=new pr(n,n.nextSibling,this,e):d.type===1?m=new d.ctor(n,d.name,d.strings,this,e):d.type===6&&(m=new Hl(n,this,e)),this._$AV.push(m),d=i[++c]}o!==d?.index&&(n=Ws.nextNode(),o++)}return Ws.currentNode=Bs,r}p(e){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,s),s+=i.strings.length-2):i._$AI(e[s])),s++}};class pr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,i,r){this.type=2,this._$AH=re,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=i,this.options=r,this._$Cv=r?.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=dr(this,e,s),Fr(e)?e===re||e==null||e===""?(this._$AH!==re&&this._$AR(),this._$AH=re):e!==this._$AH&&e!==It&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):jl(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!==re&&Fr(this._$AH)?this._$AA.nextSibling.data=e:this.T(Bs.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=yn.createElement(zo(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(s);else{const n=new Ul(r,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=Ro.get(e.strings);return s===void 0&&Ro.set(e.strings,s=new yn(e)),s}k(e){mn(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,r=0;for(const n of e)r===s.length?s.push(i=new pr(this.O(Ir()),this.O(Ir()),this,this.options)):i=s[r],i._$AI(n),r++;r<s.length&&(this._$AR(i&&i._$AB.nextSibling,r),s.length=r)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Si{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,i,r,n){this.type=1,this._$AH=re,this._$AN=void 0,this.element=e,this.name=s,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=re}_$AI(e,s=this,i,r){const n=this.strings;let o=!1;if(n===void 0)e=dr(this,e,s,0),o=!Fr(e)||e!==this._$AH&&e!==It,o&&(this._$AH=e);else{const c=e;let d,m;for(e=n[0],d=0;d<n.length-1;d++)m=dr(this,c[i+d],s,d),m===It&&(m=this._$AH[d]),o||=!Fr(m)||m!==this._$AH[d],m===re?e=re:e!==re&&(e+=(m??"")+n[d+1]),this._$AH[d]=m}o&&!r&&this.j(e)}j(e){e===re?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ql extends Si{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===re?void 0:e}}class Vl extends Si{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==re)}}class Bl extends Si{constructor(e,s,i,r,n){super(e,s,i,r,n),this.type=5}_$AI(e,s=this){if((e=dr(this,e,s,0)??re)===It)return;const i=this._$AH,r=e===re&&i!==re||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,n=e!==re&&(i===re||r);r&&this.element.removeEventListener(this.name,this,i),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 Hl{constructor(e,s,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){dr(this,e)}}const Wl={I:pr},Kl=bn.litHtmlPolyfillSupport;Kl?.(yn,pr),(bn.litHtmlVersions??=[]).push("3.3.1");const Yl=(t,e,s)=>{const i=s?.renderBefore??e;let r=i._$litPart$;if(r===void 0){const n=s?.renderBefore??null;i._$litPart$=r=new pr(e.insertBefore(Ir(),n),n,void 0,s??{})}return r._$AI(t),r};/**
44
44
  * @license
45
45
  * Copyright 2020 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
- */const{I:la}=na,ca=e=>e.strings===void 0,an=()=>document.createComment(""),gs=(e,t,s)=>{const r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(s===void 0){const n=r.insertBefore(an(),i),o=r.insertBefore(an(),i);s=new la(n,o,e,e.options)}else{const n=s._$AB.nextSibling,o=s._$AM,l=o!==e;if(l){let c;s._$AQ?.(e),s._$AM=e,s._$AP!==void 0&&(c=e._$AU)!==o._$AU&&s._$AP(c)}if(n!==i||l){let c=s._$AA;for(;c!==n;){const h=c.nextSibling;r.insertBefore(c,i),c=h}}}return s},Oe=(e,t,s=e)=>(e._$AI(t,s),e),ha={},da=(e,t=ha)=>e._$AH=t,ua=e=>e._$AH,ji=e=>{e._$AR(),e._$AA.remove()};/**
47
+ */const{I:Gl}=Wl,Zl=t=>t.strings===void 0,Uo=()=>document.createComment(""),Rr=(t,e,s)=>{const i=t._$AA.parentNode,r=e===void 0?t._$AB:e._$AA;if(s===void 0){const n=i.insertBefore(Uo(),r),o=i.insertBefore(Uo(),r);s=new Gl(n,o,t,t.options)}else{const n=s._$AB.nextSibling,o=s._$AM,c=o!==t;if(c){let d;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(d=t._$AU)!==o._$AU&&s._$AP(d)}if(n!==r||c){let d=s._$AA;for(;d!==n;){const m=d.nextSibling;i.insertBefore(d,r),d=m}}}return s},Ks=(t,e,s=t)=>(t._$AI(e,s),t),Jl={},Xl=(t,e=Jl)=>t._$AH=e,Ql=t=>t._$AH,wn=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 Ee={ATTRIBUTE:1,CHILD:2},fe=e=>(...t)=>({_$litDirective$:e,values:t});let Ye=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,r){this._$Ct=t,this._$AM=s,this._$Ci=r}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}};/**
51
+ */const Ys={ATTRIBUTE:1,CHILD:2},$s=t=>(...e)=>({_$litDirective$:t,values:e});let fr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,i){this._$Ct=e,this._$AM=s,this._$Ci=i}_$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 vs=(e,t)=>{const s=e._$AN;if(s===void 0)return!1;for(const r of s)r._$AO?.(t,!1),vs(r,t);return!0},Qs=e=>{let t,s;do{if((t=e._$AM)===void 0)break;s=t._$AN,s.delete(e),e=t}while(s?.size===0)},ln=e=>{for(let t;t=e._$AM;e=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(e))break;s.add(e),ma(t)}};function pa(e){this._$AN!==void 0?(Qs(this),this._$AM=e,ln(this)):this._$AM=e}function fa(e,t=!1,s=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let n=s;n<r.length;n++)vs(r[n],!1),Qs(r[n]);else r!=null&&(vs(r,!1),Qs(r));else vs(this,e)}const ma=e=>{e.type==Ee.CHILD&&(e._$AP??=fa,e._$AQ??=pa)};class zi extends Ye{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,r){super._$AT(t,s,r),ln(this),this.isConnected=t._$AU}_$AO(t,s=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),s&&(vs(this,t),Qs(this))}setValue(t){if(ca(this._$Ct))this._$Ct._$AI(t,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
55
+ */const zr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const i of s)i._$AO?.(e,!1),zr(i,e);return!0},Ai=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},qo=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),sc(e)}};function ec(t){this._$AN!==void 0?(Ai(this),this._$AM=t,qo(this)):this._$AM=t}function tc(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let n=s;n<i.length;n++)zr(i[n],!1),Ai(i[n]);else i!=null&&(zr(i,!1),Ai(i));else zr(this,t)}const sc=t=>{t.type==Ys.CHILD&&(t._$AP??=tc,t._$AQ??=ec)};class _n extends fr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),qo(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(zr(this,e),Ai(this))}setValue(e){if(Zl(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 Ui=globalThis;let C=class extends We{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=aa(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Dt}};C._$litElement$=!0,C.finalized=!0,Ui.litElementHydrateSupport?.({LitElement:C});const ba=Ui.litElementPolyfillSupport;ba?.({LitElement:C}),(Ui.litElementVersions??=[]).push("4.2.1");function cn(e){if(e==null||typeof e!="object"||Array.isArray(e))return e;const t={...e};return delete t._sonic_http_response_,t}const H=class H{constructor(t){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=t.serviceURL,this.blockUntilDone=t.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=t.userName,this.password=t.password,t.token&&(this.token=t.token),this.tokenProvider=t.tokenProvider,this.authToken=t.authToken,this.addHTTPResponse=t.addHTTPResponse||!1,this.credentials=t.credentials,this.cache=t.cache||"default",this.keepAlive=t.keepAlive||!1}set token(t){if(this._token=t,!t){H.tokens.delete(this.serviceURL);return}H.invalidTokens.includes(t)||H.tokens.set(this.serviceURL,t)}get token(){return H.invalidTokens.includes(this._token)?H.tokens.get(this.serviceURL):this._token}handleInvalidToken(t){t&&(H.invalidTokens.includes(t)||(H.invalidTokens.push(t),this.token=null))}async handleResult(t,s){H.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=t;const r=t.headers.get("content-type")?.toLowerCase(),i=t.status;let n={};if(!r||r.indexOf("text/")==0)n={text:await t.text()};else try{n=await t.json()}catch{n={}}return this.addHTTPResponse&&ot.isObject(n)&&(n._sonic_http_response_=t),i===498&&!H.failledTokenUpdates.has(this.serviceURL)&&(this.handleInvalidToken(this.token),s.apiMethod==="get"?n=await this[s.apiMethod](s.path,s.additionalHeaders):n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders)),qs("sonic-api").lastResponse.set({http:t,processed:n}),n}async auth(){if(this.token)return;if(H.tokens.has(this.serviceURL)){this.token=H.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let t={};this.userName&&this.password?t={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(t={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:t,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await i.json();n.token?this.token=n.token:H.failledTokenUpdates.set(this.serviceURL,!0)}catch{H.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(t,s){const r=L.get(t),i=new URLSearchParams(s.split("?")[1]||""),n=r.get();let o=[];Array.isArray(n)?o=n:o=[n];const l=[];let c=Number.POSITIVE_INFINITY,h=0,u=0;if(i.has("limit")&&(c=parseInt(i.get("limit")||"0"),u++),i.has("offset")&&(h=parseInt(i.get("offset")||"0"),u++),u>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return o.slice(h,h+c);for(const[d,p]of i.entries()){const y=p.split(",").map(g=>g.trim());for(const g of y)for(const b of o)if(typeof b!="object")isNaN(+b)?b.toString().toLowerCase().includes(p.toLowerCase())&&l.push(b):b===p&&l.push(b);else{const w=b;if(!w[d])continue;isNaN(+w[d])?w[d]?.toString().toLowerCase().includes(g.toLowerCase())&&l.push(b):w[d]===g&&l.push(b)}}return l.slice(h,h+c)}firstCallDone(){return new Promise(t=>{if(!H.firstCallDoneFlags.has(this.serviceURL))H.firstCallDoneFlags.set(this.serviceURL,"loading"),t(!0);else{const s=()=>{[void 0,"loading"].includes(H.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):t(!0)};s()}})}async get(t,s){await this.firstCallDone(),this.blockUntilDone&&H.firstCallDoneFlags.set(this.serviceURL,"loading");const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(t)){const h=t.match(r);if(!h)throw new Error("dataProvider path is not valid");return await this.localGet(h[1],h[2])}const i={apiMethod:"get",path:t,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(t),l=JSON.stringify({url:o,headers:n});if(!H.loadingGetPromises.has(l)){const h=new Promise(async u=>{try{const d=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),p=await this.handleResult(d,i);u(p)}catch{u(null)}});H.loadingGetPromises.set(l,h)}const c=await H.loadingGetPromises.get(l);return H.loadingGetPromises.delete(l),c}async getDetailed(t,s){const r=/dataProvider\((.*?)\)(.*?)$/.test(t),i=await this.get(t,s);if(i==null)return;const n=cn(i),o=this.computeURL(t);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(t,s,r,i){const n=await this.send(t,s,r,i);if(n==null)return;const o=cn(n),l=this.computeURL(t),c=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(l,{method:r,headers:new Headers(c),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(t,s,r){return this.sendDetailed(t,s,"POST",r)}async putDetailed(t,s,r){return this.sendDetailed(t,s,"PUT",r)}async patchDetailed(t,s,r){return this.sendDetailed(t,s,"PATCH",r)}async createHeaders(t){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=G.getLanguage(),t&&Object.assign(s,t),s}computeURL(t,s={}){let r="";t.startsWith("http")?r=t:r=this.serviceURL+"/"+t,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(t,s,r="POST",i){const n={apiMethod:"send",path:t,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(t),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(l,n)}async submitFormData(t,s,r="POST",i){const n={apiMethod:"submitFormData",path:t,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json";const l=new FormData,c=s;for(const u in c)l.set(u,c[u]);const h=await fetch(this.computeURL(t),{headers:o,credentials:this.credentials,method:r,body:l,keepalive:this.keepAlive});return await this.handleResult(h,n)}async put(t,s,r){return this.send(t,s,"PUT",r)}async post(t,s,r){return this.send(t,s,"POST",r)}async patch(t,s,r){return this.send(t,s,"PATCH",r)}async delete(t,s,r){return this.send(t,s,"delete",r)}};H.loadingGetPromises=new Map,H.tokens=new Map,H.invalidTokens=[],H.failledTokenUpdates=new Map,H.firstCallDoneFlags=new Map;let me=H;G.getApiConfiguration(document.body||document.documentElement);const ga=async(e,t)=>{};/**
59
+ */const xn=globalThis;let J=class extends ur{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=Yl(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return It}};J._$litElement$=!0,J.finalized=!0,xn.litElementHydrateSupport?.({LitElement:J});const rc=xn.litElementPolyfillSupport;rc?.({LitElement:J}),(xn.litElementVersions??=[]).push("4.2.1");function Vo(t){if(t==null||typeof t!="object"||Array.isArray(t))return t;const e={...t};return delete e._sonic_http_response_,e}const Ie=class Ie{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){Ie.tokens.delete(this.serviceURL);return}Ie.invalidTokens.includes(e)||Ie.tokens.set(this.serviceURL,e)}get token(){return Ie.invalidTokens.includes(this._token)?Ie.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(Ie.invalidTokens.includes(e)||(Ie.invalidTokens.push(e),this.token=null))}async handleResult(e,s){Ie.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const i=e.headers.get("content-type")?.toLowerCase(),r=e.status;let n={};if(!i||i.indexOf("text/")==0)n={text:await e.text()};else try{n=await e.json()}catch{n={}}if(this.addHTTPResponse&&at.isObject(n)&&(n._sonic_http_response_=e),r===498&&!Ie.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),s.apiMethod==="get"){const c=await this.get(s.path,s.additionalHeaders);if(c==null)throw new Error("GET retry failed after token refresh");n=c}else n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders);return vi("sonic-api").lastResponse.set({http:e,processed:n}),n}async auth(){if(this.token)return;if(Ie.tokens.has(this.serviceURL)){this.token=Ie.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),i=s.protocol+"//"+s.host,r=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await r.json();n.token?this.token=n.token:Ie.failledTokenUpdates.set(this.serviceURL,!0)}catch{Ie.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,s){const i=ye.get(e),r=new URLSearchParams(s.split("?")[1]||""),n=i.get();let o=[];Array.isArray(n)?o=n:o=[n];const c=[];let d=Number.POSITIVE_INFINITY,m=0,k=0;if(r.has("limit")&&(d=parseInt(r.get("limit")||"0"),k++),r.has("offset")&&(m=parseInt(r.get("offset")||"0"),k++),k>0&&(r.delete("limit"),r.delete("offset")),r.size===0)return o.slice(m,m+d);for(const[g,f]of r.entries()){const A=f.split(",").map(E=>E.trim());for(const E of A)for(const O of o)if(typeof O!="object")isNaN(+O)?O.toString().toLowerCase().includes(f.toLowerCase())&&c.push(O):O===f&&c.push(O);else{const I=O;if(!I[g])continue;isNaN(+I[g])?I[g]?.toString().toLowerCase().includes(E.toLowerCase())&&c.push(O):I[g]===E&&c.push(O)}}return c.slice(m,m+d)}firstCallDone(){return new Promise(e=>{if(!Ie.firstCallDoneFlags.has(this.serviceURL))Ie.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const s=()=>{[void 0,"loading"].includes(Ie.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}})}async get(e,s){const i=/dataProvider\((.*?)\)(.*?)$/;if(i.test(e)){this.blockUntilDone&&(await this.firstCallDone(),Ie.firstCallDoneFlags.set(this.serviceURL,"loading"));const m=e.match(i);if(!m)throw new Error("dataProvider path is not valid");return await this.localGet(m[1],m[2])}const r={apiMethod:"get",path:e,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(e),c=JSON.stringify({url:o,headers:n,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),Ie.firstCallDoneFlags.set(this.serviceURL,"loading")),!Ie.loadingGetPromises.has(c)){const m=new Promise(async k=>{try{const g=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(g,r);k({processed:f,response:this.lastResult})}catch{Ie.firstCallDoneFlags.set(this.serviceURL,"error"),k(null)}});Ie.loadingGetPromises.set(c,m)}const d=await Ie.loadingGetPromises.get(c);return Ie.loadingGetPromises.delete(c),d?(this.lastResult=d.response,d.processed):null}async getDetailed(e,s){const i=/dataProvider\((.*?)\)(.*?)$/.test(e),r=await this.get(e,s);if(r==null)return;const n=Vo(r),o=this.computeURL(e);if(i)return{request:new Request(o,{method:"GET"}),result:n};const c=await this.createHeaders(s);return{request:new Request(o,{method:"GET",headers:new Headers(c),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:n}}async sendDetailed(e,s,i,r){const n=await this.send(e,s,i,r);if(n==null)return;const o=Vo(n),c=this.computeURL(e),d=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...r});return{request:new Request(c,{method:i,headers:new Headers(d),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,s,i){return this.sendDetailed(e,s,"POST",i)}async putDetailed(e,s,i){return this.sendDetailed(e,s,"PUT",i)}async patchDetailed(e,s,i){return this.sendDetailed(e,s,"PATCH",i)}async createHeaders(e){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=Ke.getLanguage(),e&&Object.assign(s,e),s}computeURL(e,s={}){let i="";e.startsWith("http")?i=e:i=this.serviceURL+"/"+e,i.startsWith("http")||(i=window.location.origin+i);const r=new URL(i);for(const n in s)r.searchParams.set(n,s[n]);return r.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,s,i="POST",r){const n={apiMethod:"send",path:e,additionalHeaders:r,method:i,data:s},o=await this.createHeaders(r);o.Accept="application/json",o["Content-Type"]="application/json";const c=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:i,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(c,n)}async submitFormData(e,s,i="POST",r){const n={apiMethod:"submitFormData",path:e,additionalHeaders:r,method:i,data:s},o=await this.createHeaders(r);o.Accept="application/json";const c=new FormData,d=s;for(const k in d)c.set(k,d[k]);const m=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:i,body:c,keepalive:this.keepAlive});return await this.handleResult(m,n)}async put(e,s,i){return this.send(e,s,"PUT",i)}async post(e,s,i){return this.send(e,s,"POST",i)}async patch(e,s,i){return this.send(e,s,"PATCH",i)}async delete(e,s,i){return this.send(e,s,"delete",i)}};Ie.loadingGetPromises=new Map,Ie.tokens=new Map,Ie.invalidTokens=[],Ie.failledTokenUpdates=new Map,Ie.firstCallDoneFlags=new Map;let Ds=Ie;Ke.getApiConfiguration(document.body||document.documentElement);const ic=async(t,e)=>{};/**
60
60
  * @license
61
61
  * Copyright 2017 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
- */let Vi=class extends Ye{constructor(t){if(super(t),this.it=D,t.type!==Ee.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===D||t==null)return this._t=void 0,this.it=t;if(t===Dt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};Vi.directiveName="unsafeHTML",Vi.resultType=1;const U=fe(Vi),Bi=new Map,hn=e=>{if(!e)return null;const t=G.getApiConfiguration(e),s=G.getAncestorAttributeValue(e,"wordingProvider"),r=G.getAncestorAttributeValue(e,"wordingVersionProvider"),i={apiConfiguration:t,wordingProvider:s,wordingVersionProvider:r};let n=null;for(const[o,l]of Bi)if(ot.deepEqual(o,i)){n=l;break}return n||(n={api:new me(t),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:r,apiCallKey:i},Bi.set(i,n)),n},dn="",W=class W extends zi{constructor(t){super(t),this.useUnsafeHTML=!1,this.onAssign=s=>{const r=this.useUnsafeHTML?U(s):s;this.setValue(r)},this.node=t.options.host}unsubscribe(){W.publisher["wording_"+this.key].offAssign(this.onAssign)}render(t,s=!1){return this.useUnsafeHTML=s,this.key!==t&&(this.key=t,this.isConnected&&this.subscribe(t)),Dt}static async callApi(t,s,r=!0,i){if(await L.getInstance().isLocalStrorageReady,W.firstCall){W.firstCall=!1,$i(W.reloadWordings);const u=Object.keys(W.publisher.get());for(const d of u)W.publisher.get()[d]===dn&&delete W.publisher[d]}if(t){const u=G.getAncestorAttributeValue(t,"wordingVersionProvider");u&&qs(u).onAssign(W.handleVersionProvider(t))}let n=W.publisher.get()["wording_"+s]!=null;const o=i||hn(t);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const l=o.callIndex,c=o.wordingProvider??"";if(!c&&r){window.setTimeout(async()=>{W.callApi(null,s,!1,o)},1e3);return}const h=o.api;window.queueMicrotask(async()=>{if(n=W.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),W.publisher["wording_"+s].set(dn)),l!==o.callIndex)return;const u=Array.from(o.keysToTranslate);if(!u.length)return;const d=c.split("?"),p=d.shift(),y=(d.length>0?d.join("?")+"&":"")+"labels[]="+u.join("&labels[]="),g=p+"?"+y;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const b=await h.get(g);for(const w in b)W.publisher["wording_"+w].set(b[w])})}static reloadWordings(){for(const t of Bi.values())t.keysToTranslate=new Set(t.translatedKeys),t.keysToTranslate.size>0&&W.callApi(null,"",!1,t)}static handleVersionProvider(t){const s=hn(t),r=n=>{};if(!s)return r;if(W.versionProviderHandlers.has(s))return W.versionProviderHandlers.get(s)||r;const i=function(n){if(!s.wordingVersionProvider)return;const l=W.publisher.get().__wording_versions__??[];if(n==null)return;const c=l.find(h=>h.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};l.includes(c)||l.push(c),n!==c.version&&(c.version=n,W.publisher.set({__wording_versions__:l}),W.reloadWordings())};return W.versionProviderHandlers.set(s,i),i}subscribe(t){this.unsubscribe(),W.publisher["wording_"+t].onAssign(this.onAssign),W.callApi(this.node,t)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};W.publisher=L.get("sonic-wording",{localStorageMode:"enabled"}),W.firstCall=!0,W.versionProviderHandlers=new Map;let Ze=W;const va=fe(Ze);var ya=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,Ht=(e,t,s,r)=>{for(var i=r>1?void 0:r?wa(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ya(t,s,i),i};let Js=!1,Hi=new Set;const it=(e,t)=>{var i;const s=(i=class extends e{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 G.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 c=[...(this.shadowRoot||this).children].filter(u=>u.tagName!="STYLE"),h=this.displayContents?"contents":c.length==0?"none":null;h?this.style.display=h:this.style.removeProperty("display")}connectedCallback(){if(i.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let l=!0;const c=new IntersectionObserver(h=>{for(const u of h)if(l&&u.isIntersecting){l=!1,c.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);c.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)),Ze.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(),Js=!Js)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Js||this.removeDebugger(),document.body.appendChild(this.debug),Hi.add(this.debug)}),this.addEventListener("mouseout",()=>{Js||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
63
+ */let Pn=class extends fr{constructor(e){if(super(e),this.it=re,e.type!==Ys.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===re||e==null)return this._t=void 0,this.it=e;if(e===It)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:[]}}};Pn.directiveName="unsafeHTML",Pn.resultType=1;const je=$s(Pn),Sn=new Map,Bo=t=>{if(!t)return null;const e=Ke.getApiConfiguration(t),s=Ke.getAncestorAttributeValue(t,"wordingProvider"),i=Ke.getAncestorAttributeValue(t,"wordingVersionProvider"),r={apiConfiguration:e,wordingProvider:s,wordingVersionProvider:i};let n=null;for(const[o,c]of Sn)if(at.deepEqual(o,r)){n=c;break}return n||(n={api:new Ds(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:i,apiCallKey:r},Sn.set(r,n)),n},Ho="",Ve=class Ve extends _n{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=s=>{const i=this.useUnsafeHTML?je(s):s;this.setValue(i)},this.node=e.options.host}unsubscribe(){Ve.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)),It}static async callApi(e,s,i=!0,r){if(await ye.getInstance().isLocalStrorageReady,Ve.firstCall){Ve.firstCall=!1,ln(Ve.reloadWordings);const k=Object.keys(Ve.publisher.get());for(const g of k)Ve.publisher.get()[g]===Ho&&delete Ve.publisher[g]}if(e){const k=Ke.getAncestorAttributeValue(e,"wordingVersionProvider");k&&vi(k).onAssign(Ve.handleVersionProvider(e))}let n=Ve.publisher.get()["wording_"+s]!=null;const o=r||Bo(e);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const c=o.callIndex,d=o.wordingProvider??"";if(!d&&i){window.setTimeout(async()=>{Ve.callApi(null,s,!1,o)},1e3);return}const m=o.api;window.queueMicrotask(async()=>{if(n=Ve.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),Ve.publisher["wording_"+s].set(Ho)),c!==o.callIndex)return;const k=Array.from(o.keysToTranslate);if(!k.length)return;const g=d.split("?"),f=g.shift(),A=(g.length>0?g.join("?")+"&":"")+"labels[]="+k.join("&labels[]="),E=f+"?"+A;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const O=await m.get(E);for(const I in O)Ve.publisher["wording_"+I].set(O[I])})}static reloadWordings(){for(const e of Sn.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&Ve.callApi(null,"",!1,e)}static handleVersionProvider(e){const s=Bo(e),i=n=>{};if(!s)return i;if(Ve.versionProviderHandlers.has(s))return Ve.versionProviderHandlers.get(s)||i;const r=function(n){if(!s.wordingVersionProvider)return;const c=Ve.publisher.get().__wording_versions__??[];if(n==null)return;const d=c.find(m=>m.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};c.includes(d)||c.push(d),n!==d.version&&(d.version=n,Ve.publisher.set({__wording_versions__:c}),Ve.reloadWordings())};return Ve.versionProviderHandlers.set(s,r),r}subscribe(e){this.unsubscribe(),Ve.publisher["wording_"+e].onAssign(this.onAssign),Ve.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};Ve.publisher=ye.get("sonic-wording",{localStorageMode:"enabled"}),Ve.firstCall=!0,Ve.versionProviderHandlers=new Map;let gr=Ve;const nc=$s(gr);var oc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,es=(t,e,s,i)=>{for(var r=i>1?void 0:i?ac(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&oc(e,s,r),r};let Ci=!1,An=new Set;const nt=(t,e)=>{var r;const s=(r=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=c=>{this.props=c}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return Ke.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){typeof o=="string"&&["{","["].includes(o.trim().charAt(0))&&(o=JSON.parse(o)),o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const d=[...(this.shadowRoot||this).children].filter(k=>k.tagName!="STYLE"),m=this.displayContents?"contents":d.length==0?"none":null;m?this.style.display=m:this.style.removeProperty("display")}connectedCallback(){if(r.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let c=!0;const d=new IntersectionObserver(m=>{for(const k of m)if(c&&k.isIntersecting){c=!1,d.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);d.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),gr.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(),Ci=!Ci)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Ci||this.removeDebugger(),document.body.appendChild(this.debug),An.add(this.debug)}),this.addEventListener("mouseout",()=>{Ci||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(){Hi.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Hi=new Set}getApiConfiguration(){return G.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of o)l.indexOf("wording_")==0&&Ze.callApi(this,l.substring(8));Ze.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return Ws.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=L.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 c=o.get(l,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+h,c=ot.traverse(c,h.split(".")),o.set(this.dataProvider,c),this.publisher=c}this.publisher=c}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 Ht([a({type:Number})],s.prototype,"collectDependenciesVersion",2),Ht([a({type:Boolean})],s.prototype,"displayContents",2),Ht([a({type:Boolean})],s.prototype,"noAutoFill",2),Ht([a({type:Boolean})],s.prototype,"forceAutoFill",2),Ht([a({type:Object})],s.prototype,"propertyMap",2),Ht([a({type:String,attribute:"data-title"})],s.prototype,"title",2),Ht([a({reflect:!0})],s.prototype,"dataProvider",2),Ht([a()],s.prototype,"bindPublisher",2),Ht([a()],s.prototype,"props",1),Ht([T()],s.prototype,"shouldRenderLazy",2),s};var _a=Object.defineProperty,xa=(e,t,s,r)=>{for(var i=void 0,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(t,s,i)||i);return i&&_a(t,s,i),i};const ys=e=>{class t extends e{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 xa([a({type:Array})],t.prototype,"templates"),t};var Pa=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,Q=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ca(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Pa(t,s,i),i};const Sa="sonic-date";$i(()=>V.updateComponentsLanguage());let V=class extends it(ys(C)){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(){V.dateCompnents.forEach(e=>e.pageLanguage=G.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(e){e||(e="Du %s au %s"),this._wording_billet_periode_validite=e,this.duAu=this.wording_billet_periode_validite?.split("%s").map(t=>t.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=G.getLanguage(),V.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),V.dateCompnents.delete(this)}getDatesParts(e,t,s){const r=this.startDateObject;r.setTime(e*1e3);let i=[];if(t>0){const n=this.endDateObject;n.setTime(t*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 c=i.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.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=js.ucFirst(i[0].value),i.filter(n=>n.hidden!==!0)}dateStringToSeconds(e){return new Date(e).getTime()/1e3}willUpdate(e){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 t=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=t}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return D;const e={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(e.weekday=this.weekday||"short"),this.hour!=="hidden"&&(e.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(e.minute=this.minute||"2-digit"),this.era&&(e.era=this.era),this.time_zone&&(e.timeZone=this.time_zone);const t=this.getDatesParts(this.computedStartDate,this.computedEndDate,e);return U(`${t.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("")}`)}};V.dateCompnents=new Set,Q([a()],V.prototype,"wording_billet_periode_validite",1),Q([a({type:Boolean})],V.prototype,"designMode",2),Q([a({type:String})],V.prototype,"time_zone",2),Q([a({type:Number})],V.prototype,"date",2),Q([a({type:String})],V.prototype,"date_string",2),Q([a({type:String})],V.prototype,"start_date_string",2),Q([a({type:String})],V.prototype,"end_date_string",2),Q([a({type:Number})],V.prototype,"start_date",2),Q([a({type:Number})],V.prototype,"end_date",2),Q([a({type:Boolean})],V.prototype,"hide_hours",2),Q([a({type:String})],V.prototype,"era",2),Q([a({type:String})],V.prototype,"year",2),Q([a({type:String})],V.prototype,"month",2),Q([a({type:String})],V.prototype,"day",2),Q([a({type:String})],V.prototype,"weekday",2),Q([a({type:String})],V.prototype,"hour",2),Q([a({type:Boolean})],V.prototype,"hour12",2),Q([a({type:String})],V.prototype,"minute",2),Q([a({type:String})],V.prototype,"language",2),Q([a({type:Boolean})],V.prototype,"renderIf",2),Q([a({type:Boolean})],V.prototype,"now",2),V=Q([$(Sa)],V);let at=(tt=class{static listen(){if(!tt.listening)return;const t=document.location?.href.replace(document.location.origin,"");tt.prevURL&&tt.prevURL!=t&&(tt.prevURL=t,tt.listeners.forEach(s=>{s.location=t})),window.requestAnimationFrame(tt.listen)}static offChange(t){const s=tt.listeners.indexOf(t);s!=-1&&(tt.listeners.splice(s,1),tt.listeners.length==0&&(tt.listening=!1))}static onChange(t){tt.listening||(tt.listening=!0,tt.listen()),tt.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){const s=t.goBack,r=document.referrer;if(s!=null){const h=document.location.origin,u=(s||h).toString(),p=r.indexOf("http")==0?new URL(r).origin!=h:!1,y=r=="",g=history.length<3,b=y&&g,w=u!=document.location.href;if(p&&w||b){const f=history.state||{};f.concorde=f.concorde||{},f.concorde.hasDoneHistoryBack=!0,history.pushState(f,document.title),history.back(),document.location.replace(u)}else history.back();return}let i=t.getAttribute("to")||"";if(i||(i=t.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const n=new URL(i,document.location.href),o=n.pathname.split("/"),l=[];let c="";for(const h of o)h!=c&&l.push(h),c=h;i="/"+l.join("/")+n.search+(n.hash?+n.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",i):t.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(t){if(t.autoActive=="disabled")return;const s=t.href?.toString()||"";if(t.href&&s.indexOf("http")!=0){const r=new URL(s,document.location.href),i=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:t.autoActive=="strict-path-only"?n=r.pathname==i.pathname&&r.hash==i.hash:n=i.href.indexOf(r.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},tt.listeners=[],tt.listening=!1,tt.prevURL=document.location?.href.replace(document.location.origin,""),tt);/**
68
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){An.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),An=new Set}getApiConfiguration(){return Ke.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const c of o)c.indexOf("wording_")==0&&gr.callApi(this,c.substring(8));gr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return yi.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 c=this.dataProvider;if(!c&&this._props&&(this.dataProvider=c="__subscriber__"+r.instanceCounter),c){this.bindPublisher&&o.set(c,this.bindPublisher());let d=o.get(c,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=c,this.hasAttribute("subDataProvider")){const m=this.getAttribute("subDataProvider");this.dataProvider=c+"/"+m,d=at.traverse(d,m.split(".")),o.set(this.dataProvider,d),this.publisher=d}this.publisher=d}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},r.instanceCounter=0,r);return es([h({type:Number})],s.prototype,"collectDependenciesVersion",2),es([h({type:Boolean})],s.prototype,"displayContents",2),es([h({type:Boolean})],s.prototype,"noAutoFill",2),es([h({type:Boolean})],s.prototype,"forceAutoFill",2),es([h({type:Object})],s.prototype,"propertyMap",2),es([h({type:String,attribute:"data-title"})],s.prototype,"title",2),es([h({reflect:!0})],s.prototype,"dataProvider",2),es([h()],s.prototype,"bindPublisher",2),es([h()],s.prototype,"props",1),es([Ae()],s.prototype,"shouldRenderLazy",2),s};var lc=Object.defineProperty,cc=(t,e,s,i)=>{for(var r=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(e,s,r)||r);return r&&lc(e,s,r),r};const Ur=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const i=this.templates||[...this.querySelectorAll("template")];for(const r of i)r.hasAttribute(this.templateValueAttribute)&&(this.templateParts[r.getAttribute(this.templateValueAttribute)]=r,this.templatePartsList.push(r)),r.hasAttribute("skeleton")&&(this.templateParts.skeleton=r),r.hasAttribute("no-result")&&(this.templateParts["no-result"]=r),r.hasAttribute("no-item")&&(this.templateParts["no-item"]=r);this.templateList=i.filter(r=>!r.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return cc([h({type:Array})],e.prototype,"templates"),e};var hc=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,Xe=(t,e,s,i)=>{for(var r=i>1?void 0:i?uc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&hc(e,s,r),r};const dc="sonic-date";ln(()=>Re.updateComponentsLanguage());let Re=class extends nt(Ur(J)){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(){Re.dateCompnents.forEach(t=>t.pageLanguage=Ke.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=Ke.getLanguage(),Re.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),Re.dateCompnents.delete(this)}getDatesParts(t,e,s){const i=this.startDateObject;i.setTime(t*1e3);let r=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=i.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,n),!o){const d=r.find(m=>m.type=="literal"&&m.source=="shared"&&m.value.trim().length>0);d&&(d.value=" "+this.duAu[1]+" ",d.type="to"),this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&r.forEach(n=>n.value=n.value.replace(/,/g," ")),r[0].value=Tr.ucFirst(r[0].value),r.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 re;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 je(`${e.map(s=>{const i=this.templateParts[s.type];if(i){const o=document.importNode(i.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const r=document.createElement("span");return r.innerText=s.value,r.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};Re.dateCompnents=new Set,Xe([h()],Re.prototype,"wording_billet_periode_validite",1),Xe([h({type:Boolean})],Re.prototype,"designMode",2),Xe([h({type:String})],Re.prototype,"time_zone",2),Xe([h({type:Number})],Re.prototype,"date",2),Xe([h({type:String})],Re.prototype,"date_string",2),Xe([h({type:String})],Re.prototype,"start_date_string",2),Xe([h({type:String})],Re.prototype,"end_date_string",2),Xe([h({type:Number})],Re.prototype,"start_date",2),Xe([h({type:Number})],Re.prototype,"end_date",2),Xe([h({type:Boolean})],Re.prototype,"hide_hours",2),Xe([h({type:String})],Re.prototype,"era",2),Xe([h({type:String})],Re.prototype,"year",2),Xe([h({type:String})],Re.prototype,"month",2),Xe([h({type:String})],Re.prototype,"day",2),Xe([h({type:String})],Re.prototype,"weekday",2),Xe([h({type:String})],Re.prototype,"hour",2),Xe([h({type:Boolean})],Re.prototype,"hour12",2),Xe([h({type:String})],Re.prototype,"minute",2),Xe([h({type:String})],Re.prototype,"language",2),Xe([h({type:Boolean})],Re.prototype,"renderIf",2),Xe([h({type:Boolean})],Re.prototype,"now",2),Re=Xe([X(dc)],Re);let ct=(et=class{static listen(){if(!et.listening)return;const e=document.location?.href.replace(document.location.origin,"");et.prevURL&&et.prevURL!=e&&(et.prevURL=e,et.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(et.listen)}static offChange(e){const s=et.listeners.indexOf(e);s!=-1&&(et.listeners.splice(s,1),et.listeners.length==0&&(et.listening=!1))}static onChange(e){et.listening||(et.listening=!0,et.listen()),et.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,i=document.referrer;if(s!=null){const m=document.location.origin,k=(s||m).toString(),f=i.indexOf("http")==0?new URL(i).origin!=m:!1,A=i=="",E=history.length<3,O=A&&E,I=k!=document.location.href;if(f&&I||O){const x=history.state||{};x.concorde=x.concorde||{},x.concorde.hasDoneHistoryBack=!0,history.pushState(x,document.title),history.back(),document.location.replace(k)}else history.back();return}let r=e.getAttribute("to")||"";if(r||(r=e.href?.toString()||""),!r)return;if(r.indexOf("#")==0){document.location.hash=r.substring(1);return}const n=new URL(r,document.location.href),o=n.pathname.split("/"),c=[];let d="";for(const m of o)m!=d&&c.push(m),d=m;r="/"+c.join("/")+n.search+(n.hash?+n.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",r):e.hasAttribute("replaceState")?history.replaceState(null,"",r):document.location.href=r}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const i=new URL(s,document.location.href),r=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=i.pathname==r.pathname&&i.hash==r.hash&&i.search==r.search:e.autoActive=="strict-path-only"?n=i.pathname==r.pathname&&i.hash==r.hash:n=r.href.indexOf(i.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},et.listeners=[],et.listening=!1,et.prevURL=document.location?.href.replace(document.location.origin,""),et);/**
69
69
  * @license
70
70
  * Copyright 2018 Google LLC
71
71
  * SPDX-License-Identifier: BSD-3-Clause
72
- */const un="important",$a=" !"+un,wt=fe(class extends Ye{constructor(e){if(super(e),e.type!==Ee.ATTRIBUTE||e.name!=="style"||e.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(e){return Object.keys(e).reduce(((t,s)=>{const r=e[s];return r==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(e,[t]){const{style:s}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith($a);r.includes("-")||n?s.setProperty(r,n?i.slice(0,-11):i,n?un:""):s[r]=i}}return Dt}});var Aa=Object.defineProperty,ka=Object.getOwnPropertyDescriptor,qt=(e,t,s,r)=>{for(var i=r>1?void 0:r?ka(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Aa(t,s,i),i};const ti=new Map,Xe=e=>{class t extends e{constructor(...r){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=i=>{this.setValueFromPublisher(i)},this.onFormValueAssign=async i=>{this.setFormValueFromPublisher(i)},this.onFormDataInValidate=()=>{const i=this.getFormPublisher();i&&i.isFormValid.get()&&this.validateFormElement()}}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?L.get(this.formDataProvider):null}setFormPublisherValue(r){const i=this.getFormPublisher();i&&yt(i,this.name).set(r)}getFormPublisherValue(){const r=this.getFormPublisher();return r?yt(r,this.name).get():null}getValueForFormPublisher(){return this.value}setValueFromPublisher(r){this.value=r}setFormValueFromPublisher(r){this.value=r}get value(){return this._value}set value(r){r==null&&(r=""),ot.isObject(r)&&Object.prototype.hasOwnProperty.call(r,"__value")&&r._value==null&&(r=""),this._value!=r&&(this._value=r,this.updateDataValue(),this.requestUpdate())}initPublisher(){let r=this.getFormPublisher();const i=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&this.publisher&&yt(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&r&&yt(r,this._name).offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&yt(this.publisher,this._name).onAssign(this.onValueAssign),r=this.getFormPublisher(),this._name&&r&&(yt(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){ti.has(l)||ti.set(l,[]);const c=ti.get(l);c?.indexOf(this)==-1&&c.push(this)}const o=ti.get(n);this.addEventListener("keydown",l=>{const c=l;if(!["ArrowDown","ArrowUp"].includes(c.key))return;const h="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",u=o?.filter(y=>{const g=y.shadowRoot?.querySelector(h);if(!g)return!1;const b=window.getComputedStyle(g);return b.display!=="none"&&b.display!==""&&b.pointerEvents!="none"&&b.visibility!=="hidden"&&g.getBoundingClientRect().width>0});let d=null;if(c.key=="ArrowDown"&&u){const y=u.indexOf(this);y==u.length-1?d=u[0]:d=u[y+1]}else if(c.key=="ArrowUp"&&u){const y=u.indexOf(this);y==0?d=u[u.length-1]:d=u[y-1]}const p=d?.shadowRoot?.querySelector(h);p&&p.focus&&(p.focus(),l.preventDefault(),l.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback(),this._name&&this.publisher&&yt(this.publisher,this._name).offAssign(this.onValueAssign);const r=this.getFormPublisher();this._name&&r&&(yt(r,this._name).offAssign(this.onFormValueAssign),r.offFormInvalidate(this.onFormDataInValidate))}}return qt([a({type:Boolean,reflect:!0})],t.prototype,"touched",2),qt([a({type:Boolean})],t.prototype,"error",2),qt([a({type:Boolean})],t.prototype,"autofocus",2),qt([a({type:Boolean})],t.prototype,"required",2),qt([a({type:Boolean})],t.prototype,"forceAutoFill",2),qt([a({type:Boolean,reflect:!0})],t.prototype,"disabled",2),qt([a({type:String,attribute:"data-aria-label"})],t.prototype,"ariaLabel",2),qt([a({type:String,attribute:"data-aria-labelledby"})],t.prototype,"ariaLabelledby",2),qt([a()],t.prototype,"name",1),qt([a()],t.prototype,"value",1),t};let Da=class He{static areEqual(t,s){return t.length===s.length?t.every((r,i)=>r===s[i]):!1}static from2d(t){return{to1D:()=>{let s=[];return t.forEach(r=>s=s.concat(r)),this.from(s)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(t.length<1)return!0;const r=(t[0]||{})[s];return t.every(i=>(i||{})[s]==r)}})})}),value:()=>({forKey:s=>He.from(t.map(r=>r[s]))}),copy:()=>({fromKey:s=>({toKey:r=>{t.forEach(i=>{i[r]=Array.isArray(i[s])?[...i[s]]:typeof i[s]=="object"&&i[s]!=null?{...i[s]}:i[s]})}})})}),map:s=>He.from(t.map(s)),filter:s=>He.from(t.filter(s)),find:s=>t.find(s),some:s=>t.some(s),every:s=>t.every(s),group:()=>({byKey:s=>{const r=[],i=new Map;for(const n of t){const o=n[s];if(!i.has(o)){const l=r.length;i.set(o,l);const c={items:[]};c[s]=o,r.push(c)}r[i.get(o)].items.push(n)}return He.from(r)}}),without:()=>({duplicates:()=>({forKey:s=>{const r=[...new Set(t.map(i=>i[s]))];return He.from(r.map(i=>t.find(n=>n[s]==i)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:r=>{const i=(n,o)=>l=>n[o]!=l[o];return He.from(t.filter(n=>s.every(i(n,r))))}})})})}}};function Oa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ws={exports:{}},Ea=ws.exports,pn;function La(){return pn||(pn=1,(function(e,t){var s=[].slice;(function(r,i){return t!==null?e.exports=i():r.UrlPattern=i()})(Ea,function(){var r,i,n,o,l,c,h,u,d,p,y,g,b,w,E;return d=function(f){return f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(f,m){var _,x,O;for(O=[],_=-1,x=f.length;++_<x;)O=O.concat(m(f[_]));return O},w=function(f,m){var _,x,O;for(O="",_=-1,x=f.length;++_<x;)O+=m(f[_]);return O},b=function(f){return new RegExp(f.toString()+"|").exec("").length-1},y=function(f,m){var _,x,O,P,F;for(P={},_=-1,O=f.length;++_<O;)x=f[_],F=m[_],F!=null&&(P[x]!=null?(Array.isArray(P[x])||(P[x]=[P[x]]),P[x].push(F)):P[x]=F);return P},r={},r.Result=function(f,m){this.value=f,this.rest=m},r.Tagged=function(f,m){this.tag=f,this.value=m},r.tag=function(f,m){return function(_){var x,O;if(x=m(_),x!=null)return O=new r.Tagged(f,x.value),new r.Result(O,x.rest)}},r.regex=function(f){return function(m){var _,x;if(_=f.exec(m),_!=null)return x=_[0],new r.Result(x,m.slice(x.length))}},r.sequence=function(){var f;return f=1<=arguments.length?s.call(arguments,0):[],function(m){var _,x,O,P,F,Z;for(_=-1,x=f.length,Z=[],P=m;++_<x;){if(O=f[_],F=O(P),F==null)return;Z.push(F.value),P=F.rest}return new r.Result(Z,P)}},r.pick=function(){var f,m;return f=arguments[0],m=2<=arguments.length?s.call(arguments,1):[],function(_){var x,O;if(O=r.sequence.apply(r,m)(_),O!=null)return x=O.value,O.value=x[f],O}},r.string=function(f){var m;return m=f.length,function(_){if(_.slice(0,m)===f)return new r.Result(f,_.slice(m))}},r.lazy=function(f){var m;return m=null,function(_){return m==null&&(m=f()),m(_)}},r.baseMany=function(f,m,_,x,O){var P,F,Z,Pt;for(Z=O,Pt=_?"":[];!(m!=null&&(P=m(Z),P!=null)||(F=f(Z),F==null));)_?Pt+=F.value:Pt.push(F.value),Z=F.rest;if(!(x&&Pt.length===0))return new r.Result(Pt,Z)},r.many1=function(f){return function(m){return r.baseMany(f,null,!1,!0,m)}},r.concatMany1Till=function(f,m){return function(_){return r.baseMany(f,m,!0,!0,_)}},r.firstChoice=function(){var f;return f=1<=arguments.length?s.call(arguments,0):[],function(m){var _,x,O,P;for(_=-1,x=f.length;++_<x;)if(O=f[_],P=O(m),P!=null)return P}},g=function(f){var m;return m={},m.wildcard=r.tag("wildcard",r.string(f.wildcardChar)),m.optional=r.tag("optional",r.pick(1,r.string(f.optionalSegmentStartChar),r.lazy(function(){return m.pattern}),r.string(f.optionalSegmentEndChar))),m.name=r.regex(new RegExp("^["+f.segmentNameCharset+"]+")),m.named=r.tag("named",r.pick(1,r.string(f.segmentNameStartChar),r.lazy(function(){return m.name}))),m.escapedChar=r.pick(1,r.string(f.escapeChar),r.regex(/^./)),m.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return m.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(f.segmentNameStartChar),r.string(f.optionalSegmentStartChar),r.string(f.optionalSegmentEndChar),m.wildcard))),m.token=r.lazy(function(){return r.firstChoice(m.wildcard,m.optional,m.named,m.static)}),m.pattern=r.many1(r.lazy(function(){return m.token})),m},u={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},c=function(f,m){if(Array.isArray(f))return w(f,function(_){return c(_,m)});switch(f.tag){case"wildcard":return"(.*?)";case"named":return"(["+m+"]+)";case"static":return d(f.value);case"optional":return"(?:"+c(f.value,m)+")?"}},l=function(f,m){return m==null&&(m=u.segmentValueCharset),"^"+c(f,m)+"$"},o=function(f){if(Array.isArray(f))return h(f,o);switch(f.tag){case"wildcard":return["_"];case"named":return[f.value];case"static":return[];case"optional":return o(f.value)}},p=function(f,m,_,x){var O,P,F,Z;if(x==null&&(x=!1),Z=f[m],Z==null){if(x)throw new Error("no values provided for key `"+m+"`");return}if(O=_[m]||0,P=Array.isArray(Z)?Z.length-1:0,O>P){if(x)throw new Error("too few values provided for key `"+m+"`");return}return F=Array.isArray(Z)?Z[O]:Z,x&&(_[m]=O+1),F},n=function(f,m,_){var x,O;if(Array.isArray(f)){for(x=-1,O=f.length;++x<O;)if(n(f[x],m,_))return!0;return!1}switch(f.tag){case"wildcard":return p(m,"_",_,!1)!=null;case"named":return p(m,f.value,_,!1)!=null;case"static":return!1;case"optional":return n(f.value,m,_)}},E=function(f,m,_){if(Array.isArray(f))return w(f,function(x){return E(x,m,_)});switch(f.tag){case"wildcard":return p(m,"_",_,!0);case"named":return p(m,f.value,_,!0);case"static":return f.value;case"optional":return n(f.value,m,_)?E(f.value,m,_):""}},i=function(f,m){var _,x,O,P,F;if(f instanceof i){this.isRegex=f.isRegex,this.regex=f.regex,this.ast=f.ast,this.names=f.names;return}if(this.isRegex=f instanceof RegExp,!(typeof f=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=f,m!=null){if(!Array.isArray(m))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(_=b(this.regex),m.length!==_)throw new Error("regex contains "+_+" groups but array of group names contains "+m.length);this.names=m}return}if(f==="")throw new Error("argument must not be the empty string");if(F=f.replace(/\s+/g,""),F!==f)throw new Error("argument must not contain whitespace");if(x={escapeChar:m?.escapeChar||u.escapeChar,segmentNameStartChar:m?.segmentNameStartChar||u.segmentNameStartChar,segmentNameCharset:m?.segmentNameCharset||u.segmentNameCharset,segmentValueCharset:m?.segmentValueCharset||u.segmentValueCharset,optionalSegmentStartChar:m?.optionalSegmentStartChar||u.optionalSegmentStartChar,optionalSegmentEndChar:m?.optionalSegmentEndChar||u.optionalSegmentEndChar,wildcardChar:m?.wildcardChar||u.wildcardChar},P=g(x),O=P.pattern(f),O==null)throw new Error("couldn't parse pattern");if(O.rest!=="")throw new Error("could only partially parse pattern");this.ast=O.value,this.regex=new RegExp(l(this.ast,x.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(f){var m,_;return _=this.regex.exec(f),_==null?null:(m=_.slice(1),this.names?y(this.names,m):m)},i.prototype.stringify=function(f){if(f==null&&(f={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(f!==Object(f))throw new Error("argument must be an object or undefined");return E(this.ast,f,{})},i.escapeForRegex=d,i.concatMap=h,i.stringConcatMap=w,i.regexGroupCount=b,i.keysAndValuesToObject=y,i.P=r,i.newParser=g,i.defaultOptions=u,i.astNodeToRegexString=l,i.astNodeToNames=o,i.getParam=p,i.astNodeContainsSegmentsForProvidedParams=n,i.stringify=E,i})})(ws,ws.exports)),ws.exports}var Ta=La();const ee=Oa(Ta);class ei{constructor(t){this.path=ei.normalizePath(t)}getDataProviderKey(){return new hs(this.path)}static normalizePath(t){const s=String(t).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let c;try{c=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return c.pathname=c.pathname.replace(/\/+/g,"/"),c.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(t){return String(t).trim().length>0}static looksLikeDataProviderPath(t){return/^\s*dataProvider\s*\(/i.test(String(t))}toString(){return this.path}}const Ia=150,fn=10,Ma=200,Na=16,mn=new WeakMap;let bn=!1;function se(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Qe(e){if(e===window)return{x:window.scrollX,y:window.scrollY};const t=e;return{x:t.scrollLeft,y:t.scrollTop}}function Ra(e,t,s){if(e===window){window.scrollTo(t,s);return}const r=e;typeof r.scrollTo=="function"?r.scrollTo(t,s):(r.scrollLeft=t,r.scrollTop=s)}function Fa(e){if(e===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const t=e;return Math.max(0,t.scrollHeight-t.clientHeight)}function Le(e){let t=mn.get(e);if(!t){const s=Qe(e);t={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},mn.set(e,t)}return t}function si(e){Le(e).userEngaged=!0}function ii(e){const t=Le(e);clearTimeout(t.settleTimer),t.settleTimer=setTimeout(()=>{t.userEngaged=!1,t.settleTimer=void 0},Ia)}function gn(e,t){return t-e>=Ma}function Je(e){if(!se())return;const t=Le(e);if(t.restoring)return;const s=Qe(e);if(gn(s.y,t.y)){Wi(e);return}t.x=s.x,t.y=s.y}function qi(e){if(!se())return;const t=Le(e),s=Fa(e),r=t.x,i=s>0?Math.min(t.y,s):t.y,{x:n,y:o}=Qe(e);if(!(Math.abs(r-n)<=fn&&Math.abs(i-o)<=fn)){t.restoring=!0;try{Ra(e,r,i)}finally{requestAnimationFrame(()=>{t.restoring=!1})}}}function ja(e,t={x:0,y:0}){if(!se())return;const s=Le(e);if(t==="current"){const r=Qe(e);s.x=r.x,s.y=r.y;return}s.x=t.x??0,s.y=t.y??0}function Wi(e){const t=Le(e);if(t.stickyFrames=Na,t.raf)return;const s=()=>{t.raf=0,qi(e),t.stickyFrames>0&&(t.stickyFrames--,t.raf=requestAnimationFrame(s))};t.raf=requestAnimationFrame(s)}function Ki(e){Wi(e)}function Te(e){if(!se())return;const t=Le(e);if(t.watching)return;t.watching=!0;const s=e===window?window:e,r=()=>{if(t.restoring)return;const{y:g}=Qe(e);if(gn(g,t.y)){Wi(e);return}if(t.userEngaged){Je(e),ii(e);return}Je(e)},i=g=>vn(g)===e,n=g=>{i(g)&&(Je(e),si(e))},o=g=>{i(g)&&ii(e)},l=g=>{i(g)&&(Je(e),si(e),ii(e))};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 c=Qe(e);if(t.x=c.x,t.y=c.y,e===window){const g=new ResizeObserver(()=>Ki(window));g.observe(document.documentElement),t.resizeObserver=g;return}const h=e,u=new ResizeObserver(()=>Ki(h));u.observe(h);for(const g of Array.from(h.children))u.observe(g);t.resizeObserver=u;const d=()=>Ki(h),p=new MutationObserver(g=>{for(const b of g)if(b.type==="childList")for(const w of Array.from(b.addedNodes))w instanceof Element&&u.observe(w);d()});p.observe(h,{childList:!0,subtree:!0,characterData:!0});const y=h.getRootNode();y instanceof ShadowRoot&&y.host&&p.observe(y.host,{childList:!0,subtree:!0,characterData:!0}),t.mutationObserver=p}function vn(e){for(const t of e.composedPath())if(!(t===window||t===document)&&t instanceof HTMLElement&&yn(t))return t;return window}function yn(e){if(!(e instanceof HTMLElement)||e===document.documentElement||e===document.body)return!1;const t=getComputedStyle(e).overflowY;return t==="auto"||t==="scroll"||t==="overlay"}function Gi(e){for(const s of e.composedPath())s===window||s===document||s instanceof HTMLElement&&yn(s)&&Te(s);const t=vn(e);Te(t),e.type==="wheel"?(Je(t),si(t),ii(t)):(e.type==="touchstart"||e.type==="pointerdown")&&(Je(t),si(t))}function ri(e){e instanceof Element&&e.classList?.contains("custom-scroll")&&Te(e),e.querySelectorAll?.(".custom-scroll").forEach(t=>{t instanceof HTMLElement&&Te(t)})}function Yi(e){ri(e),new MutationObserver(s=>{for(const r of s)for(const i of Array.from(r.addedNodes))i instanceof Element&&ri(i)}).observe(e,{childList:!0,subtree:!0})}function Zi(e){e.querySelectorAll?.("*").forEach(t=>{t.shadowRoot&&(Yi(t.shadowRoot),Zi(t.shadowRoot))})}function za(){const e=Element.prototype;if(e.__safariScrollGuardPatched)return;e.__safariScrollGuardPatched=!0;const t=e.attachShadow;e.attachShadow=function(r){const i=t.call(this,r);return Yi(i),i}}function wn(){if(typeof window>"u"||bn||(bn=!0,!se()))return;Te(window),za();const e={capture:!0,passive:!0};window.addEventListener("wheel",Gi,e),window.addEventListener("touchstart",Gi,e),window.addEventListener("pointerdown",Gi,e);const t=()=>{ri(document),Zi(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t(),new MutationObserver(r=>{for(const i of r)for(const n of Array.from(i.addedNodes))n instanceof Element&&(ri(n),n.shadowRoot&&Yi(n.shadowRoot),Zi(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Ua=Do,Va=Da,Ba=Ws,Ha=js,ie=G,qa=at,_s=ot,Wa=me,Ka=ee;wn(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Ua,Arrays:Va,DataBindObserver:Ba,Format:Ha,HTML:ie,LocationHandler:qa,Objects:_s,PublisherManager:L,api:Wa,URLPattern:Ka,Endpoint:ei,DataProviderKey:hs};var Ga=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,xs=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ya(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ga(t,s,i),i};const Xi=e=>{class t extends e{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 c=l.length;for(const h of l)o.indexOf(h)==-1&&(c-=1);c==l.length&&i.checkMode.set("allChecked"),c==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:L.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")&&(!this.publisher||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return xs([a()],t.prototype,"value",1),xs([a()],t.prototype,"forceAutoFill",2),xs([a({type:Boolean})],t.prototype,"unique",2),xs([a({type:Boolean})],t.prototype,"radio",2),xs([a()],t.prototype,"checked",1),t};/**
72
+ */const Wo="important",pc=" !"+Wo,$t=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.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 i=t[s];return i==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}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 i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in e){const r=e[i];if(r!=null){this.ft.add(i);const n=typeof r=="string"&&r.endsWith(pc);i.includes("-")||n?s.setProperty(i,n?r.slice(0,-11):r,n?Wo:""):s[i]=r}}return It}});var fc=Object.defineProperty,gc=Object.getOwnPropertyDescriptor,ts=(t,e,s,i)=>{for(var r=i>1?void 0:i?gc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&fc(e,s,r),r};const ki=new Map,br=t=>{class e extends t{constructor(...i){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=r=>{this.setValueFromPublisher(r)},this.onFormValueAssign=async r=>{this.setFormValueFromPublisher(r)},this.onFormDataInValidate=()=>{const r=this.getFormPublisher();r&&r.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(i){this.hasAttribute("name")&&!this.forceAutoFill&&(i=this.getAttribute("name")),this._name=i,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(i){const r=this.getFormPublisher();r&&kt(r,this.name).set(i)}getFormPublisherValue(){const i=this.getFormPublisher();return i?kt(i,this.name).get():null}getValueForFormPublisher(){return this.value}setValueFromPublisher(i){this.value=i}setFormValueFromPublisher(i){this.value=i}get value(){return this._value}set value(i){i==null&&(i=""),at.isObject(i)&&Object.prototype.hasOwnProperty.call(i,"__value")&&i._value==null&&(i=""),this._value!=i&&(this._value=i,this.updateDataValue(),this.requestUpdate())}initPublisher(){let i=this.getFormPublisher();const r=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&this.publisher&&kt(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&i&&kt(i,this._name).offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&kt(this.publisher,this._name).onAssign(this.onValueAssign),i=this.getFormPublisher(),this._name&&i&&(kt(i,this._name).onAssign(this.onFormValueAssign),i.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),r&&(this.value=r)}handleBlur(){this.touched=!0}handleChange(i){this.value=i.target.value;const r=new Event("change");this.dispatchEvent(r)}addKeyboardNavigation(){const i=this.getAncestorAttributeValue("data-keyboard-nav");if(!i)return;const r=i.split(" "),n=r[0];if(!n)return;for(const c of r){ki.has(c)||ki.set(c,[]);const d=ki.get(c);d?.indexOf(this)==-1&&d.push(this)}const o=ki.get(n);this.addEventListener("keydown",c=>{const d=c;if(!["ArrowDown","ArrowUp"].includes(d.key))return;const m="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",k=o?.filter(A=>{const E=A.shadowRoot?.querySelector(m);if(!E)return!1;const O=window.getComputedStyle(E);return O.display!=="none"&&O.display!==""&&O.pointerEvents!="none"&&O.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let g=null;if(d.key=="ArrowDown"&&k){const A=k.indexOf(this);A==k.length-1?g=k[0]:g=k[A+1]}else if(d.key=="ArrowUp"&&k){const A=k.indexOf(this);A==0?g=k[k.length-1]:g=k[A-1]}const f=g?.shadowRoot?.querySelector(m);f&&f.focus&&(f.focus(),c.preventDefault(),c.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback(),this._name&&this.publisher&&kt(this.publisher,this._name).offAssign(this.onValueAssign);const i=this.getFormPublisher();this._name&&i&&(kt(i,this._name).offAssign(this.onFormValueAssign),i.offFormInvalidate(this.onFormDataInValidate))}}return ts([h({type:Boolean,reflect:!0})],e.prototype,"touched",2),ts([h({type:Boolean})],e.prototype,"error",2),ts([h({type:Boolean})],e.prototype,"autofocus",2),ts([h({type:Boolean})],e.prototype,"required",2),ts([h({type:Boolean})],e.prototype,"forceAutoFill",2),ts([h({type:Boolean,reflect:!0})],e.prototype,"disabled",2),ts([h({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),ts([h({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),ts([h()],e.prototype,"name",1),ts([h()],e.prototype,"value",1),e};let bc=class cr{static areEqual(e,s){return e.length===s.length?e.every((i,r)=>i===s[r]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(i=>s=s.concat(i)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const i=(e[0]||{})[s];return e.every(r=>(r||{})[s]==i)}})})}),value:()=>({forKey:s=>cr.from(e.map(i=>i[s]))}),copy:()=>({fromKey:s=>({toKey:i=>{e.forEach(r=>{r[i]=Array.isArray(r[s])?[...r[s]]:typeof r[s]=="object"&&r[s]!=null?{...r[s]}:r[s]})}})})}),map:s=>cr.from(e.map(s)),filter:s=>cr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const i=[],r=new Map;for(const n of e){const o=n[s];if(!r.has(o)){const c=i.length;r.set(o,c);const d={items:[]};d[s]=o,i.push(d)}i[r.get(o)].items.push(n)}return cr.from(i)}}),without:()=>({duplicates:()=>({forKey:s=>{const i=[...new Set(e.map(r=>r[s]))];return cr.from(i.map(r=>e.find(n=>n[s]==r)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:i=>{const r=(n,o)=>c=>n[o]!=c[o];return cr.from(e.filter(n=>s.every(r(n,i))))}})})})}}};var Ko=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qr={exports:{}},mc=qr.exports,Go;function vc(){return Go||(Go=1,(function(t,e){var s=[].slice;(function(i,r){return e!==null?t.exports=r():i.UrlPattern=r()})(mc,function(){var i,r,n,o,c,d,m,k,g,f,A,E,O,I,U;return g=function(x){return x.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},m=function(x,y){var N,C,$;for($=[],N=-1,C=x.length;++N<C;)$=$.concat(y(x[N]));return $},I=function(x,y){var N,C,$;for($="",N=-1,C=x.length;++N<C;)$+=y(x[N]);return $},O=function(x){return new RegExp(x.toString()+"|").exec("").length-1},A=function(x,y){var N,C,$,G,z;for(G={},N=-1,$=x.length;++N<$;)C=x[N],z=y[N],z!=null&&(G[C]!=null?(Array.isArray(G[C])||(G[C]=[G[C]]),G[C].push(z)):G[C]=z);return G},i={},i.Result=function(x,y){this.value=x,this.rest=y},i.Tagged=function(x,y){this.tag=x,this.value=y},i.tag=function(x,y){return function(N){var C,$;if(C=y(N),C!=null)return $=new i.Tagged(x,C.value),new i.Result($,C.rest)}},i.regex=function(x){return function(y){var N,C;if(N=x.exec(y),N!=null)return C=N[0],new i.Result(C,y.slice(C.length))}},i.sequence=function(){var x;return x=1<=arguments.length?s.call(arguments,0):[],function(y){var N,C,$,G,z,ne;for(N=-1,C=x.length,ne=[],G=y;++N<C;){if($=x[N],z=$(G),z==null)return;ne.push(z.value),G=z.rest}return new i.Result(ne,G)}},i.pick=function(){var x,y;return x=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],function(N){var C,$;if($=i.sequence.apply(i,y)(N),$!=null)return C=$.value,$.value=C[x],$}},i.string=function(x){var y;return y=x.length,function(N){if(N.slice(0,y)===x)return new i.Result(x,N.slice(y))}},i.lazy=function(x){var y;return y=null,function(N){return y==null&&(y=x()),y(N)}},i.baseMany=function(x,y,N,C,$){var G,z,ne,se;for(ne=$,se=N?"":[];!(y!=null&&(G=y(ne),G!=null)||(z=x(ne),z==null));)N?se+=z.value:se.push(z.value),ne=z.rest;if(!(C&&se.length===0))return new i.Result(se,ne)},i.many1=function(x){return function(y){return i.baseMany(x,null,!1,!0,y)}},i.concatMany1Till=function(x,y){return function(N){return i.baseMany(x,y,!0,!0,N)}},i.firstChoice=function(){var x;return x=1<=arguments.length?s.call(arguments,0):[],function(y){var N,C,$,G;for(N=-1,C=x.length;++N<C;)if($=x[N],G=$(y),G!=null)return G}},E=function(x){var y;return y={},y.wildcard=i.tag("wildcard",i.string(x.wildcardChar)),y.optional=i.tag("optional",i.pick(1,i.string(x.optionalSegmentStartChar),i.lazy(function(){return y.pattern}),i.string(x.optionalSegmentEndChar))),y.name=i.regex(new RegExp("^["+x.segmentNameCharset+"]+")),y.named=i.tag("named",i.pick(1,i.string(x.segmentNameStartChar),i.lazy(function(){return y.name}))),y.escapedChar=i.pick(1,i.string(x.escapeChar),i.regex(/^./)),y.static=i.tag("static",i.concatMany1Till(i.firstChoice(i.lazy(function(){return y.escapedChar}),i.regex(/^./)),i.firstChoice(i.string(x.segmentNameStartChar),i.string(x.optionalSegmentStartChar),i.string(x.optionalSegmentEndChar),y.wildcard))),y.token=i.lazy(function(){return i.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=i.many1(i.lazy(function(){return y.token})),y},k={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},d=function(x,y){if(Array.isArray(x))return I(x,function(N){return d(N,y)});switch(x.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return g(x.value);case"optional":return"(?:"+d(x.value,y)+")?"}},c=function(x,y){return y==null&&(y=k.segmentValueCharset),"^"+d(x,y)+"$"},o=function(x){if(Array.isArray(x))return m(x,o);switch(x.tag){case"wildcard":return["_"];case"named":return[x.value];case"static":return[];case"optional":return o(x.value)}},f=function(x,y,N,C){var $,G,z,ne;if(C==null&&(C=!1),ne=x[y],ne==null){if(C)throw new Error("no values provided for key `"+y+"`");return}if($=N[y]||0,G=Array.isArray(ne)?ne.length-1:0,$>G){if(C)throw new Error("too few values provided for key `"+y+"`");return}return z=Array.isArray(ne)?ne[$]:ne,C&&(N[y]=$+1),z},n=function(x,y,N){var C,$;if(Array.isArray(x)){for(C=-1,$=x.length;++C<$;)if(n(x[C],y,N))return!0;return!1}switch(x.tag){case"wildcard":return f(y,"_",N,!1)!=null;case"named":return f(y,x.value,N,!1)!=null;case"static":return!1;case"optional":return n(x.value,y,N)}},U=function(x,y,N){if(Array.isArray(x))return I(x,function(C){return U(C,y,N)});switch(x.tag){case"wildcard":return f(y,"_",N,!0);case"named":return f(y,x.value,N,!0);case"static":return x.value;case"optional":return n(x.value,y,N)?U(x.value,y,N):""}},r=function(x,y){var N,C,$,G,z;if(x instanceof r){this.isRegex=x.isRegex,this.regex=x.regex,this.ast=x.ast,this.names=x.names;return}if(this.isRegex=x instanceof RegExp,!(typeof x=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=x,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(N=O(this.regex),y.length!==N)throw new Error("regex contains "+N+" groups but array of group names contains "+y.length);this.names=y}return}if(x==="")throw new Error("argument must not be the empty string");if(z=x.replace(/\s+/g,""),z!==x)throw new Error("argument must not contain whitespace");if(C={escapeChar:y?.escapeChar||k.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||k.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||k.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||k.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||k.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||k.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||k.wildcardChar},G=E(C),$=G.pattern(x),$==null)throw new Error("couldn't parse pattern");if($.rest!=="")throw new Error("could only partially parse pattern");this.ast=$.value,this.regex=new RegExp(c(this.ast,C.segmentValueCharset)),this.names=o(this.ast)},r.prototype.match=function(x){var y,N;return N=this.regex.exec(x),N==null?null:(y=N.slice(1),this.names?A(this.names,y):y)},r.prototype.stringify=function(x){if(x==null&&(x={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(x!==Object(x))throw new Error("argument must be an object or undefined");return U(this.ast,x,{})},r.escapeForRegex=g,r.concatMap=m,r.stringConcatMap=I,r.regexGroupCount=O,r.keysAndValuesToObject=A,r.P=i,r.newParser=E,r.defaultOptions=k,r.astNodeToRegexString=c,r.astNodeToNames=o,r.getParam=f,r.astNodeContainsSegmentsForProvidedParams=n,r.stringify=U,r})})(qr,qr.exports)),qr.exports}var yc=vc();const ps=Yo(yc);class $i{constructor(e){this.path=$i.normalizePath(e)}getDataProviderKey(){return new Ss(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 d;try{d=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return d.pathname=d.pathname.replace(/\/+/g,"/"),d.href}const i=s.indexOf("?"),r=s.indexOf("#");let n=s.length;i>=0&&(n=Math.min(n,i)),r>=0&&(n=Math.min(n,r));let o=s.slice(0,n);const c=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&c)throw new RangeError("Endpoint: path cannot be empty");return o+c}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 wc=50,_c=1e4,xc=100,Cn=new Map;function Di(t){return di(t)}function Vr(t){return t.split(".")[0]??t}function Ei(t){const e=t.split("."),s=e.shift();let i=ye.get(s);return e.length&&(i=at.traverse(i,e)),i}function Pc(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 Sc(t){return Array.isArray(t)?t.length:0}function Ac(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=Vr(t),i=new Map;for(const[o,c]of Cn)i.set(Vr(o),new Set(c));i.set(s,new Set(e.map(Vr)));const r=new Set,n=o=>{if(r.has(o))return!0;r.add(o);for(const c of i.get(o)??[])if(n(c))return!0;return r.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 Cc(t,e){Cn.set(t,new Set(e.map(s=>Vr(s))))}function kc(t){Cn.delete(t)}function $c(t){return`${Vr(Di(t))}/_state_`}function Oi(t,e){const s=$c(t);ye.get(s).set(e)}function Dc(t,e,s,i){const r=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:i},n=r.debounceMs??wc,o=r.maxInputItems??_c,c=r.isEmpty??Pc,d=Di(r.output),m=Object.entries(r.inputs).map(([ie,q])=>({alias:ie,path:Di(q)})),k=m.map(ie=>ie.path),g=r.variables?Di(r.variables):null;Ac(d,k),Cc(d,k);const f=Ei(d);let A,E=!1,O=0,I=null,U=!1,x="";const y=ie=>{E=!0,A=ie,f.set(ie),E=!1},N=()=>{E||U||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${d}".`),A!==void 0&&(E=!0,f.set(A),E=!1))};f.onAssign(N,!1);const C=()=>{const ie={};for(const{alias:q,path:le}of m){const pe=Ei(le).get(),Ue=Sc(pe);Ue>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${Ue} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[q]=pe}return ie},$=()=>g?Ei(g).get()??{}:{},G=async()=>{if(U)return;const ie=++O;Oi(d,{status:"loading",error:null});const q=C(),le=$(),pe=JSON.stringify({inputs:q,vars:le});if(pe===x&&A!==void 0){Oi(d,{status:c(A)?"empty":"ready",error:null});return}const Ue=typeof performance<"u"?performance.now():Date.now();try{const he=await Promise.resolve(r.compute(q,le));if(U||ie!==O)return;const be=(typeof performance<"u"?performance.now():Date.now())-Ue;be>xc&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(be)} ms) → "${d}".`),x=pe,y(he),Oi(d,{status:c(he)?"empty":"ready",error:null})}catch(he){if(U||ie!==O)return;const be=he instanceof Error?he.message:String(he);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${d}" :`,be),Oi(d,{status:"error",error:be})}},z=()=>{U||(I&&clearTimeout(I),I=setTimeout(()=>{I=null,G()},n))},ne=[],se=ie=>{const q=Ei(ie),le=()=>z();q.onInternalMutation(le),ne.push({pub:q,handler:le})};for(const{path:ie}of m)se(ie);return g&&se(g),z(),{stop(){if(!U){U=!0,I&&clearTimeout(I);for(const{pub:ie,handler:q}of ne)ie.offInternalMutation(q);f.offAssign(N),kc(d)}},recompute(){x="",G()}}}function Ti(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 kn={exports:{}},Zo;function Ec(){return Zo||(Zo=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(i,r,n){function o(m,k){if(!r[m]){if(!i[m]){var g=typeof Ti=="function"&&Ti;if(!k&&g)return g(m,!0);if(c)return c(m,!0);var f=new Error("Cannot find module '"+m+"'");throw f.code="MODULE_NOT_FOUND",f}var A=r[m]={exports:{}};i[m][0].call(A.exports,function(E){var O=i[m][1][E];return o(O||E)},A,A.exports,s,i,r,n)}return r[m].exports}for(var c=typeof Ti=="function"&&Ti,d=0;d<n.length;d++)o(n[d]);return o}return s})()({1:[function(s,i,r){const n=s("./utils"),o=(function(){const c=n.stringToArray,d=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],m=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],k=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],g=["Thousand","Million","Billion","Trillion"];function f(T,M){var D=function(V,H,F){var Y="";if(V<=19)Y=(H?" and ":"")+(F?m[V]:d[V]);else if(V<100){const Pe=Math.floor(V/10),ge=V%10;Y=(H?" and ":"")+k[Pe-2],ge>0?Y+="-"+D(ge,!1,F):F&&(Y=Y.substring(0,Y.length-1)+"ieth")}else if(V<1e3){const Pe=Math.floor(V/100),ge=V%100;Y=(H?", ":"")+d[Pe]+" Hundred",ge>0?Y+=D(ge,!0,F):F&&(Y+="th")}else{var ae=Math.floor(Math.log10(V)/3);ae>g.length&&(ae=g.length);const Pe=Math.pow(10,ae*3),ge=Math.floor(V/Pe),fe=V-ge*Pe;Y=(H?", ":"")+D(ge,!1,!1)+" "+g[ae-1],fe>0?Y+=D(fe,!0,F):F&&(Y+="th")}return Y},j=D(T,!1,M);return j}const A=Object.create(null);d.forEach(function(T,M){A[T.toLowerCase()]=M}),m.forEach(function(T,M){A[T.toLowerCase()]=M}),k.forEach(function(T,M){const D=T.toLowerCase();A[D]=(M+2)*10,A[D.substring(0,T.length-1)+"ieth"]=A[D]}),A.hundredth=100,g.forEach(function(T,M){const D=T.toLowerCase(),j=Math.pow(10,(M+1)*3);A[D]=j,A[D+"th"]=j});function E(T){const D=T.split(/,\s|\sand\s|[\s\\-]/).map(H=>A[H]);let j=[0];return D.forEach(H=>{if(H<100){let F=j.pop();F>=1e3&&(j.push(F),F=0),j.push(F+H)}else j.push(j.pop()*H)}),j.reduce((H,F)=>H+F,0)}const O=[[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"]],I={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function U(T){for(var M=0;M<O.length;M++){const D=O[M];if(T>=D[0])return D[1]+U(T-D[0])}return""}function x(T){for(var M=0,D=1,j=T.length-1;j>=0;j--){const V=T[j],H=I[V];H<D?M-=H:(D=H,M+=H)}return M}function y(T,M){for(var D=[],j=M.charCodeAt(0);T>0;)D.unshift(String.fromCharCode((T-1)%26+j)),T=Math.floor((T-1)/26);return D.join("")}function N(T,M){for(var D=M.charCodeAt(0),j=0,V=0;V<T.length;V++)j+=(T.charCodeAt(T.length-V-1)-D+1)*Math.pow(26,V);return j}function C(T,M){if(typeof T>"u")return;T=Math.floor(T);const D=se(M);return z(T,D)}const $={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},G={UPPER:"upper",LOWER:"lower",TITLE:"title"};function z(T,M){let D;const j=T<0;switch(T=Math.abs(T),M.primary){case $.LETTERS:D=y(T,M.case===G.UPPER?"A":"a");break;case $.ROMAN:D=U(T),M.case===G.UPPER&&(D=D.toUpperCase());break;case $.WORDS:D=f(T,M.ordinal),M.case===G.UPPER?D=D.toUpperCase():M.case===G.LOWER&&(D=D.toLowerCase());break;case $.DECIMAL:D=""+T;var V=M.mandatoryDigits-D.length;if(V>0){var H=new Array(V+1).join("0");D=H+D}if(M.zeroCode!==48&&(D=c(D).map(Pe=>String.fromCodePoint(Pe.codePointAt(0)+M.zeroCode-48)).join("")),M.regular){const Pe=Math.floor((D.length-1)/M.groupingSeparators.position);for(let ge=Pe;ge>0;ge--){const fe=D.length-ge*M.groupingSeparators.position;D=D.substr(0,fe)+M.groupingSeparators.character+D.substr(fe)}}else M.groupingSeparators.reverse().forEach(Pe=>{const ge=D.length-Pe.position;D=D.substr(0,ge)+Pe.character+D.substr(ge)});if(M.ordinal){var F={1:"st",2:"nd",3:"rd"},Y=D[D.length-1],ae=F[Y];(!ae||D.length>1&&D[D.length-2]==="1")&&(ae="th"),D=D+ae}break;case $.SEQUENCE:throw{code:"D3130",value:M.token}}return j&&(D="-"+D),D}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 se(T){const M={type:"integer",primary:$.DECIMAL,case:G.LOWER,ordinal:!1};let D,j;const V=T.lastIndexOf(";");switch(V===-1?D=T:(D=T.substring(0,V),j=T.substring(V+1),j[0]==="o"&&(M.ordinal=!0)),D){case"A":M.case=G.UPPER;case"a":M.primary=$.LETTERS;break;case"I":M.case=G.UPPER;case"i":M.primary=$.ROMAN;break;case"W":M.case=G.UPPER,M.primary=$.WORDS;break;case"Ww":M.case=G.TITLE,M.primary=$.WORDS;break;case"w":M.primary=$.WORDS;break;default:{let H=null,F=0,Y=0,ae=[],Pe=0;if(c(D).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let ue=!1;for(let $e=0;$e<ne.length;$e++){const de=ne[$e];if(fe>=de&&fe<=de+9){if(ue=!0,F++,Pe++,H===null)H=de;else if(de!==H)throw{code:"D3131"};break}}ue||(fe===35?(Pe++,Y++):ae.push({position:Pe,character:String.fromCodePoint(fe)}))}),F>0){M.primary=$.DECIMAL,M.zeroCode=H,M.mandatoryDigits=F,M.optionalDigits=Y;const ue=function($e){if($e.length===0)return 0;const de=$e[0].character;for(let st=1;st<$e.length;st++)if($e[st].character!==de)return 0;const ft=$e.map(st=>st.position),Kt=function(st,xt){return xt===0?st:Kt(xt,st%xt)},_t=ft.reduce(Kt);for(let st=1;st<=ft.length;st++)if(ft.indexOf(st*_t)===-1)return 0;return _t}(ae);ue>0?(M.regular=!0,M.groupingSeparators={position:ue,character:ae[0].character}):(M.regular=!1,M.groupingSeparators=ae)}else M.primary=$.SEQUENCE,M.token=D}}return M}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(T){var M=[];const D={type:"datetime",parts:M},j=function(ue,$e){if($e>ue){let de=T.substring(ue,$e);de=de.split("]]").join("]"),M.push({type:"literal",value:de})}};for(var V=0,H=0;H<T.length;){if(T.charAt(H)==="["){if(T.charAt(H+1)==="["){j(V,H),M.push({type:"literal",value:"["}),H+=2,V=H;continue}if(j(V,H),V=H,H=T.indexOf("]",V),H===-1)throw{code:"D3135"};let ue=T.substring(V+1,H);ue=ue.split(/\s+/).join("");var F={type:"marker",component:ue.charAt(0)},Y=ue.lastIndexOf(","),ae;if(Y!==-1){const $e=ue.substring(Y+1),de=$e.indexOf("-");let ft,Kt;const _t=function(xt){if(!(typeof xt>"u"||xt==="*"))return parseInt(xt)};de===-1?ft=$e:(ft=$e.substring(0,de),Kt=$e.substring(de+1));const st={min:_t(ft),max:_t(Kt)};F.width=st,ae=ue.substring(1,Y)}else ae=ue.substring(1);if(ae.length===1)F.presentation1=ae;else if(ae.length>1){var Pe=ae.charAt(ae.length-1);"atco".indexOf(Pe)!==-1?(F.presentation2=Pe,Pe==="o"&&(F.ordinal=!0),F.presentation1=ae.substring(0,ae.length-1)):F.presentation1=ae}else F.presentation1=ie[F.component];if(typeof F.presentation1>"u")throw{code:"D3132",value:F.component};if(F.presentation1[0]==="n")F.names=G.LOWER;else if(F.presentation1[0]==="N")F.presentation1[1]==="n"?F.names=G.TITLE:F.names=G.UPPER;else if("YMDdFWwXxHhmsf".indexOf(F.component)!==-1){var ge=F.presentation1;if(F.presentation2&&(ge+=";"+F.presentation2),F.integerFormat=se(ge),F.width&&F.width.min!==void 0&&F.integerFormat.mandatoryDigits<F.width.min&&(F.integerFormat.mandatoryDigits=F.width.min),F.component==="Y")if(F.n=-1,F.width&&F.width.max!==void 0)F.n=F.width.max,F.integerFormat.mandatoryDigits=F.n;else{var fe=F.integerFormat.mandatoryDigits+F.integerFormat.optionalDigits;fe>=2&&(F.n=fe)}const $e=M[M.length-1];$e&&$e.integerFormat&&($e.integerFormat.parseWidth=$e.integerFormat.mandatoryDigits)}(F.component==="Z"||F.component==="z")&&(F.integerFormat=se(F.presentation1)),M.push(F),V=H+1}H++}return j(V,H),D}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Ue=1e3*60*60*24,he=function(T){const M=Date.UTC(T.year,T.month);var D=new Date(M).getUTCDay();return D===0&&(D=7),D>4?M+(8-D)*Ue:M-(D-1)*Ue},be=function(T,M){return{year:T,month:M,nextMonth:function(){return M===11?be(T+1,0):be(T,M+1)},previousMonth:function(){return M===0?be(T-1,11):be(T,M-1)},nextYear:function(){return be(T+1,M)},previousYear:function(){return be(T-1,M)}}},ke=function(T,M){return(M-T)/(Ue*7)+1},ce=(T,M)=>{let D;switch(M){case"Y":D=T.getUTCFullYear();break;case"M":D=T.getUTCMonth()+1;break;case"D":D=T.getUTCDate();break;case"d":{const j=Date.UTC(T.getUTCFullYear(),T.getUTCMonth(),T.getUTCDate()),V=Date.UTC(T.getUTCFullYear(),0);D=(j-V)/Ue+1;break}case"F":D=T.getUTCDay(),D===0&&(D=7);break;case"W":{const j=be(T.getUTCFullYear(),0),V=he(j),H=Date.UTC(j.year,T.getUTCMonth(),T.getUTCDate());let F=ke(V,H);if(F>52){const Y=he(j.nextYear());H>=Y&&(F=1)}else if(F<1){const Y=he(j.previousYear());F=ke(Y,H)}D=Math.floor(F);break}case"w":{const j=be(T.getUTCFullYear(),T.getUTCMonth()),V=he(j),H=Date.UTC(j.year,j.month,T.getUTCDate());let F=ke(V,H);if(F>4){const Y=he(j.nextMonth());H>=Y&&(F=1)}else if(F<1){const Y=he(j.previousMonth());F=ke(Y,H)}D=Math.floor(F);break}case"X":{const j=be(T.getUTCFullYear(),0),V=he(j),H=he(j.nextYear()),F=T.getTime();F<V?D=j.year-1:F>=H?D=j.year+1:D=j.year;break}case"x":{const j=be(T.getUTCFullYear(),T.getUTCMonth()),V=he(j),H=j.nextMonth(),F=he(H),Y=T.getTime();Y<V?D=j.previousMonth().month+1:Y>=F?D=H.month+1:D=j.month+1;break}case"H":D=T.getUTCHours();break;case"h":D=T.getUTCHours(),D=D%12,D===0&&(D=12);break;case"P":D=T.getUTCHours()>=12?"pm":"am";break;case"m":D=T.getUTCMinutes();break;case"s":D=T.getUTCSeconds();break;case"f":D=T.getUTCMilliseconds();break;case"Z":case"z":break;case"C":D="ISO";break;case"E":D="ISO";break}return D};let W=null;function xe(T,M,D){var j=0,V=0;if(typeof D<"u"){const ge=parseInt(D);j=Math.floor(ge/100),V=ge%100}var H=function(ge,fe){var ue=ce(ge,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(ue=ue%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")ue=pe[ue-1];else if(fe.component==="F")ue=le[ue];else throw{code:"D3133",value:fe.component};fe.names===G.UPPER?ue=ue.toUpperCase():fe.names===G.LOWER&&(ue=ue.toLowerCase()),fe.width&&ue.length>fe.width.max&&(ue=ue.substring(0,fe.width.max))}else ue=z(ue,fe.integerFormat);else if(fe.component==="f")ue=z(ue,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const $e=j*100+V;if(fe.integerFormat.regular)ue=z($e,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)ue=z(j,fe.integerFormat),V!==0&&(ue+=":"+C(V,"00"));else if(de===3||de===4)ue=z($e,fe.integerFormat);else throw{code:"D3134",value:de}}$e>=0&&(ue="+"+ue),fe.component==="z"&&(ue="GMT"+ue),$e===0&&fe.presentation2==="t"&&(ue="Z")}else fe.component==="P"&&fe.names===G.UPPER&&(ue=ue.toUpperCase());return ue};let F;typeof M>"u"?(W===null&&(W=q("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),F=W):F=q(M);const Y=(60*j+V)*60*1e3,ae=new Date(T+Y);let Pe="";return F.parts.forEach(function(ge){ge.type==="literal"?Pe+=ge.value:Pe+=H(ae,ge)}),Pe}function b(T){var M=Object.create(null);if(T.type==="datetime")M.type="datetime",M.parts=T.parts.map(function(D){var j=Object.create(null);if(D.type==="literal")j.regex=D.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(D.component==="Z"||D.component==="z"){let H;Array.isArray(D.integerFormat.groupingSeparators)||(H=D.integerFormat.groupingSeparators),j.regex="",D.component==="z"&&(j.regex="GMT"),j.regex+="[-+][0-9]+",H&&(j.regex+=H.character+"[0-9]+"),j.parse=function(F){D.component==="z"&&(F=F.substring(3));let Y=0,ae=0;return H?(Y=Number.parseInt(F.substring(0,F.indexOf(H.character))),ae=Number.parseInt(F.substring(F.indexOf(H.character)+1))):F.length-1<=2?Y=Number.parseInt(F):(Y=Number.parseInt(F.substring(0,3)),ae=Number.parseInt(F.substring(3))),Y*60+ae}}else if(D.component==="f")j.regex="[0-9]+",j.parse=function(H){return parseFloat("0."+H.substring(0,3))*1e3};else if(D.integerFormat)j=b(D.integerFormat);else{j.regex="[a-zA-Z]+";var V=Object.create(null);if(D.component==="M"||D.component==="x")pe.forEach(function(H,F){D.width&&D.width.max?V[H.substring(0,D.width.max)]=F+1:V[H]=F+1});else if(D.component==="F")le.forEach(function(H,F){F>0&&(D.width&&D.width.max?V[H.substring(0,D.width.max)]=F:V[H]=F)});else if(D.component==="P")V={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:D.component};j.parse=function(H){return V[H]}}return j.component=D.component,j});else{M.type="integer";const D=T.case===G.UPPER;switch(T.primary){case $.LETTERS:M.regex=D?"[A-Z]+":"[a-z]+",M.parse=function(j){return N(j,D?"A":"a")};break;case $.ROMAN:M.regex=D?"[MDCLXVI]+":"[mdclxvi]+",M.parse=function(j){return x(D?j:j.toUpperCase())};break;case $.WORDS:M.regex="(?:"+n.keys(A).concat("and","[\\-, ]").join("|")+")+",M.parse=function(j){return E(j.toLowerCase())};break;case $.DECIMAL:M.regex="[0-9]",T.parseWidth?M.regex+=`{${T.parseWidth}}`:M.regex+="+",T.ordinal&&(M.regex+="(?:th|st|nd|rd)"),M.parse=function(j){let V=j;return T.ordinal&&(V=j.substring(0,j.length-2)),T.regular?V=V.split(",").join(""):T.groupingSeparators.forEach(H=>{V=V.split(H.character).join("")}),T.zeroCode!==48&&(V=V.split("").map(H=>String.fromCodePoint(H.codePointAt(0)-T.zeroCode+48)).join("")),parseInt(V)};break;case $.SEQUENCE:throw{code:"D3130",value:T.token}}}return M}function _(T,M){if(typeof T>"u")return;const D=se(M);return b(D).parse(T)}function Q(T,M){const D=q(M),j=b(D),V="^"+j.parts.map(ae=>"("+ae.regex+")").join("")+"$";var F=new RegExp(V,"i").exec(T);if(F!==null){const de=Object.create(null);for(let u=1;u<F.length;u++){const v=j.parts[u-1];v.parse&&(de[v.component]=v.parse(F[u]))}if(Object.getOwnPropertyNames(de).length===0)return;let ft=0;const Kt=u=>{ft<<=1,ft+=u?1:0},_t=u=>!(~u&ft)&&!!(u&ft);"YXMxWwdD".split("").forEach(u=>Kt(de[u]));const xt=!_t(161)&&_t(130),_s=_t(84),$r=!_s&&_t(72);ft=0,"PHhmsf".split("").forEach(u=>Kt(de[u]));const Z=!_t(23)&&_t(47),Xt=(xt?"YD":_s?"XxwF":$r?"XWF":"YMD")+(Z?"Phmsf":"Hmsf"),li=this.environment.timestamp;let us=!1,ar=!1;if(Xt.split("").forEach(u=>{if(typeof de[u]>"u")us?(de[u]="MDd".indexOf(u)!==-1?1:0,ar=!0):de[u]=ce(li,u);else if(us=!0,ar)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,xt){const u=Date.UTC(de.Y,0),v=(de.d-1)*1e3*60*60*24,w=new Date(u+v);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(_s)throw{code:"D3136"};if($r)throw{code:"D3136"};Z&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var Y=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(Y-=(de.Z||de.z)*60*1e3),Y}}var ve=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 _e(T,M){if(!(typeof T>"u"))if(typeof M>"u"){if(!ve.test(T))throw{stack:new Error().stack,code:"D3110",value:T};return Date.parse(T)}else return Q.call(this,T,M)}function De(T,M,D){if(!(typeof T>"u"))return xe.call(this,T,M,D)}return{formatInteger:C,parseInteger:_,fromMillis:De,toMillis:_e}})();i.exports=o},{"./utils":6}],2:[function(s,i,r){(function(n){(function(){var o=s("./utils");const c=(()=>{var d=o.isNumeric,m=o.isArrayOfStrings,k=o.isArrayOfNumbers,g=o.isSequence,f=o.isFunction,A=o.isLambda,E=o.isPromise,O=o.getFunctionArity,I=o.isDeepEqual,U=o.stringToArray;function x(a){if(!(typeof a>"u")){var l=0;return a.forEach(function(p){l+=p}),l}}function y(a){return typeof a>"u"?0:a.length}function N(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function C(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function $(a){if(!(typeof a>"u"||a.length===0)){var l=0;return a.forEach(function(p){l+=p}),l/a.length}}function G(a,l=!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 S=l?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(P,L){return typeof L<"u"&&L!==null&&d(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},S)}return p}}function z(a,l,p){if(!(typeof a>"u")){var S=U(a),P=S.length;if(P+l<0&&(l=0),typeof p<"u"){if(p<=0)return"";var L=l>=0?l+p:P+l+p;return S.slice(l,L).join("")}return S.slice(l).join("")}}function ne(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(0,p):a}}function se(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(p+l.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 l=a.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function Ue(a,l,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var S;l=Math.trunc(l);var P=Math.abs(l)-le(a);if(P>0){var L=new Array(P+1).join(p);p.length>1&&(L=z(L,0,P)),l>0?S=a+L:S=L+a}else S=a;return S}}async function he(a,l){var p=a.apply(this,[l]);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 be(a,l){if(!(typeof a>"u"||typeof l>"u")){var p;if(typeof l=="string")p=a.indexOf(l)!==-1;else{var S=await he(l,a);p=typeof S<"u"}return p}}async function ke(a,l,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var S=this.createSequence();if(typeof p>"u"||p>0){var P=0,L=await he(l,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||P<p);)S.push({match:L.match,index:L.start,groups:L.groups}),L=await he(L.next),P++}return S}}async function ce(a,l,p,S){if(!(typeof a>"u")){var P=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(S<0)throw{code:"D3011",stack:new Error().stack,value:S,index:4};var L;typeof p=="string"?L=function(We){for(var rt="",Le=0,Je=p.indexOf("$",Le);Je!==-1&&Le<p.length;){rt+=p.substring(Le,Je),Le=Je+1;var Yt=p.charAt(Le);if(Yt==="$")rt+="$",Le++;else if(Yt==="0")rt+=We.match,Le++;else{var Pt;if(We.groups.length===0?Pt=1:Pt=Math.floor(Math.log(We.groups.length)*Math.LOG10E)+1,Je=parseInt(p.substring(Le,Le+Pt),10),Pt>1&&Je>We.groups.length&&(Je=parseInt(p.substring(Le,Le+Pt-1),10)),isNaN(Je))rt+="$";else{if(We.groups.length>0){var ds=We.groups[Je-1];typeof ds<"u"&&(rt+=ds)}Le+=Je.toString().length}}Je=p.indexOf("$",Le)}return rt+=p.substring(Le),rt}:L=p;var B="",K=0;if(typeof S>"u"||S>0){var we=0;if(typeof l=="string"){for(var oe=a.indexOf(l,K);oe!==-1&&(typeof S>"u"||we<S);)B+=a.substring(K,oe),B+=p,K=oe+l.length,we++,oe=a.indexOf(l,K);B+=a.substring(K)}else{var Fe=await he(l,a);if(typeof Fe<"u"){for(;typeof Fe<"u"&&(typeof S>"u"||we<S);){B+=a.substring(K,Fe.start);var He=L.apply(P,[Fe]);if(E(He)&&(He=await He),typeof He=="string")B+=He;else throw{code:"D3012",stack:new Error().stack,value:He};K=Fe.start+Fe.match.length,we++,Fe=await he(Fe.next)}B+=a.substring(K)}else B=a}}else B=a;return B}}function W(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return l(a)}}function xe(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return l(a)}}function b(a){if(!(typeof a>"u")){var l;try{l=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return l}}function _(a){if(!(typeof a>"u")){var l;try{l=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return l}}function Q(a){if(!(typeof a>"u")){var l;try{l=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return l}}function ve(a){if(!(typeof a>"u")){var l;try{l=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return l}}async function _e(a,l,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var S=[];if(typeof p>"u"||p>0)if(typeof l=="string")S=a.split(l,p);else{var P=0,L=await he(l,a);if(typeof L<"u"){for(var B=0;typeof L<"u"&&(typeof p>"u"||P<p);)S.push(a.substring(B,L.start)),B=L.end,L=await he(L.next),P++;(typeof p>"u"||P<p)&&S.push(a.substring(B))}else S.push(a)}return S}}function De(a,l){if(!(typeof a>"u"))return typeof l>"u"&&(l=""),a.join(l)}function T(a,l,p){if(!(typeof a>"u")){var S={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},P=S;typeof p<"u"&&o.keys(p).forEach(function(me){P[me]=p[me]});for(var L=[],B=P["zero-digit"].charCodeAt(0),K=B;K<B+10;K++)L.push(String.fromCharCode(K));var we=L.concat([P["decimal-separator"],P["exponent-separator"],P["grouping-separator"],P.digit,P["pattern-separator"]]),oe=l.split(P["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var Fe=function(me){var Ge=(function(){for(var lt,zt=0;zt<me.length;zt++)if(lt=me.charAt(zt),we.indexOf(lt)!==-1&&lt!==P["exponent-separator"])return me.substring(0,zt);return""})(),At=(function(){for(var lt,zt=me.length-1;zt>=0;zt--)if(lt=me.charAt(zt),we.indexOf(lt)!==-1&&lt!==P["exponent-separator"])return me.substring(zt+1);return""})(),Ye=me.substring(Ge.length,me.length-At.length),Mt,Vs,Nt,lr,Rt=me.indexOf(P["exponent-separator"],Ge.length);Rt===-1||Rt>me.length-At.length?(Mt=Ye,Vs=void 0):(Mt=Ye.substring(0,Rt),Vs=Ye.substring(Rt+1));var Qt=Mt.indexOf(P["decimal-separator"]);return Qt===-1?(Nt=Mt,lr=At):(Nt=Mt.substring(0,Qt),lr=Mt.substring(Qt+1)),{prefix:Ge,suffix:At,activePart:Ye,mantissaPart:Mt,exponentPart:Vs,integerPart:Nt,fractionalPart:lr,subpicture:me}},He=function(me){var Ge,At,Ye=me.subpicture,Mt=Ye.indexOf(P["decimal-separator"]);Mt!==Ye.lastIndexOf(P["decimal-separator"])&&(Ge="D3081"),Ye.indexOf(P.percent)!==Ye.lastIndexOf(P.percent)&&(Ge="D3082"),Ye.indexOf(P["per-mille"])!==Ye.lastIndexOf(P["per-mille"])&&(Ge="D3083"),Ye.indexOf(P.percent)!==-1&&Ye.indexOf(P["per-mille"])!==-1&&(Ge="D3084");var Vs=!1;for(At=0;At<me.mantissaPart.length;At++){var Nt=me.mantissaPart.charAt(At);if(L.indexOf(Nt)!==-1||Nt===P.digit){Vs=!0;break}}Vs||(Ge="D3085");var lr=me.activePart.split("").map(function(lt){return we.indexOf(lt)===-1?"p":"a"}).join("");lr.indexOf("p")!==-1&&(Ge="D3086"),Mt!==-1?(Ye.charAt(Mt-1)===P["grouping-separator"]||Ye.charAt(Mt+1)===P["grouping-separator"])&&(Ge="D3087"):me.integerPart.charAt(me.integerPart.length-1)===P["grouping-separator"]&&(Ge="D3088"),Ye.indexOf(P["grouping-separator"]+P["grouping-separator"])!==-1&&(Ge="D3089");var Rt=me.integerPart.indexOf(P.digit);Rt!==-1&&me.integerPart.substring(0,Rt).split("").filter(function(lt){return L.indexOf(lt)>-1}).length>0&&(Ge="D3090"),Rt=me.fractionalPart.lastIndexOf(P.digit),Rt!==-1&&me.fractionalPart.substring(Rt).split("").filter(function(lt){return L.indexOf(lt)>-1}).length>0&&(Ge="D3091");var Qt=typeof me.exponentPart=="string";if(Qt&&me.exponentPart.length>0&&(Ye.indexOf(P.percent)!==-1||Ye.indexOf(P["per-mille"])!==-1)&&(Ge="D3092"),Qt&&(me.exponentPart.length===0||me.exponentPart.split("").filter(function(lt){return L.indexOf(lt)===-1}).length>0)&&(Ge="D3093"),Ge)throw{code:Ge,stack:new Error().stack}},We=function(me){var Ge=function(gt,on){for(var ui=[],xs=gt.indexOf(P["grouping-separator"]);xs!==-1;){var an=(on?gt.substring(0,xs):gt.substring(xs)).split("").filter(function(Or){return L.indexOf(Or)!==-1||Or===P.digit}).length;ui.push(an),xs=me.integerPart.indexOf(P["grouping-separator"],xs+1)}return ui},At=Ge(me.integerPart),Ye=function(gt){if(gt.length===0)return 0;for(var on=function(an,Or){return Or===0?an:on(Or,an%Or)},ui=gt.reduce(on),xs=1;xs<=gt.length;xs++)if(gt.indexOf(xs*ui)===-1)return 0;return ui},Mt=Ye(At),Vs=Ge(me.fractionalPart,!0),Nt=me.integerPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length,lr=Nt,Rt=me.fractionalPart.split(""),Qt=Rt.filter(function(gt){return L.indexOf(gt)!==-1}).length,lt=Rt.filter(function(gt){return L.indexOf(gt)!==-1||gt===P.digit}).length,zt=typeof me.exponentPart=="string";Nt===0&&lt===0&&(zt?(Qt=1,lt=1):Nt=1),zt&&Nt===0&&me.integerPart.indexOf(P.digit)!==-1&&(Nt=1),Nt===0&&Qt===0&&(Qt=1);var dl=0;return zt&&(dl=me.exponentPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length),{integerPartGroupingPositions:At,regularGrouping:Mt,minimumIntegerPartSize:Nt,scalingFactor:lr,prefix:me.prefix,fractionalPartGroupingPositions:Vs,minimumFactionalPartSize:Qt,maximumFactionalPartSize:lt,minimumExponentSize:dl,suffix:me.suffix,picture:me.subpicture}},rt=oe.map(Fe);rt.forEach(He);var Le=rt.map(We),Je=P["minus-sign"],Yt=P["zero-digit"],Pt=P["decimal-separator"],ds=P["grouping-separator"];Le.length===1&&(Le.push(JSON.parse(JSON.stringify(Le[0]))),Le[1].prefix=Je+Le[1].prefix);var it;a>=0?it=Le[0]:it=Le[1];var ci;it.picture.indexOf(P.percent)!==-1?ci=a*100:it.picture.indexOf(P["per-mille"])!==-1?ci=a*1e3:ci=a;var qs,Er;if(it.minimumExponentSize===0)qs=ci;else{var hg=Math.pow(10,it.scalingFactor),ug=Math.pow(10,it.scalingFactor-1);if(qs=ci,Er=0,qs!==0){for(;Math.abs(qs)<ug;)qs*=10,Er-=1;for(;Math.abs(qs)>hg;)qs/=10,Er+=1}}var dg=F(qs,it.maximumFactionalPartSize),hl=function(me,Ge){var At=Math.abs(me).toFixed(Ge);return Yt!=="0"&&(At=At.split("").map(function(Ye){return Ye>="0"&&Ye<="9"?L[Ye.charCodeAt(0)-48]:Ye}).join("")),At},Se=hl(dg,it.maximumFactionalPartSize),St=Se.indexOf(".");for(St===-1?Se=Se+Pt:Se=Se.replace(".",Pt);Se.charAt(0)===Yt;)Se=Se.substring(1);for(;Se.charAt(Se.length-1)===Yt;)Se=Se.substring(0,Se.length-1);St=Se.indexOf(Pt);var hi=it.minimumIntegerPartSize-St,ul=it.minimumFactionalPartSize-(Se.length-St-1);if(Se=(hi>0?new Array(hi+1).join(Yt):"")+Se,Se=Se+(ul>0?new Array(ul+1).join(Yt):""),St=Se.indexOf(Pt),it.regularGrouping>0)for(var pg=Math.floor((St-1)/it.regularGrouping),rn=1;rn<=pg;rn++)Se=[Se.slice(0,St-rn*it.regularGrouping),ds,Se.slice(St-rn*it.regularGrouping)].join("");else it.integerPartGroupingPositions.forEach(function(me){Se=[Se.slice(0,St-me),ds,Se.slice(St-me)].join(""),St++});if(St=Se.indexOf(Pt),it.fractionalPartGroupingPositions.forEach(function(me){Se=[Se.slice(0,me+St+1),ds,Se.slice(me+St+1)].join("")}),St=Se.indexOf(Pt),(it.picture.indexOf(Pt)===-1||St===Se.length-1)&&(Se=Se.substring(0,Se.length-1)),typeof Er<"u"){var nn=hl(Er,0);hi=it.minimumExponentSize-nn.length,hi>0&&(nn=new Array(hi+1).join(Yt)+nn),Se=Se+P["exponent-separator"]+(Er<0?Je:"")+nn}return Se=it.prefix+Se+it.suffix,Se}}function M(a,l){if(!(typeof a>"u")){if(a=F(a),typeof l>"u"?l=10:l=F(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var p=a.toString(l);return p}}function D(a){var l;if(!(typeof a>"u")){if(typeof a=="number")l=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))l=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))l=Number(a);else if(a===!0)l=1;else if(a===!1)l=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return l}}function j(a){var l;if(!(typeof a>"u"))return l=Math.abs(a),l}function V(a){var l;if(!(typeof a>"u"))return l=Math.floor(a),l}function H(a){var l;if(!(typeof a>"u"))return l=Math.ceil(a),l}function F(a,l){var p;if(!(typeof a>"u")){if(l){var S=a.toString().split("e");a=+(S[0]+"e"+(S[1]?+S[1]+l:l))}p=Math.round(a);var P=p-a;return Math.abs(P)===.5&&Math.abs(p%2)===1&&(p=p-1),l&&(S=p.toString().split("e"),p=+(S[0]+"e"+(S[1]?+S[1]-l:-l))),Object.is(p,-0)&&(p=0),p}}function Y(a){var l;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return l=Math.sqrt(a),l}}function ae(a,l){var p;if(!(typeof a>"u")){if(p=Math.pow(a,l),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:l};return p}}function Pe(){return Math.random()}function ge(a){if(!(typeof a>"u")){var l=!1;if(Array.isArray(a)){if(a.length===1)l=ge(a[0]);else if(a.length>1){var p=a.filter(function(S){return ge(S)});l=p.length>0}}else typeof a=="string"?a.length>0&&(l=!0):d(a)?a!==0&&(l=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(l=!0):typeof a=="boolean"&&a===!0&&(l=!0);return l}}function fe(a){if(!(typeof a>"u"))return!ge(a)}function ue(a,l,p,S){var P=[l],L=O(a);return L>=2&&P.push(p),L>=3&&P.push(S),P}async function $e(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),S=0;S<a.length;S++){var P=ue(l,a[S],S,a),L=await l.apply(this,P);typeof L<"u"&&p.push(L)}return p}}async function de(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),S=0;S<a.length;S++){var P=a[S],L=ue(l,P,S,a),B=await l.apply(this,L);ge(B)&&p.push(P)}return p}}async function ft(a,l){if(!(typeof a>"u")){for(var p=!1,S,P=0;P<a.length;P++){var L=a[P],B=!0;if(typeof l<"u"){var K=ue(l,L,P,a),we=await l.apply(this,K);B=ge(we)}if(B)if(!p)S=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:P}}if(!p)throw{stack:new Error().stack,code:"D3139"};return S}}function Kt(){for(var a=[],l=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,l.map(function(L){return Array.isArray(L)?L.length:0})),S=0;S<p;S++){var P=l.map(L=>L[S]);a.push(P)}return a}async function _t(a,l,p){if(!(typeof a>"u")){var S,P=O(l);if(P<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(S=a[0],L=1):(S=p,L=0);L<a.length;){var B=[S,a[L]];P>=3&&B.push(L),P>=4&&B.push(a),S=await l.apply(this,B),L++}return S}}function st(a){var l=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),S=0;S<a.length;S++){var P=st.call(this,a[S]);P.forEach(function(L){p[L]=!0})}l=st.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>l.push(L));return l}function xt(a,l){var p;if(Array.isArray(a)){p=this.createSequence();for(var S=0;S<a.length;S++){var P=xt.call(this,a[S],l);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,l)&&!f(a)&&(p=a[l]);return p}function _s(a,l){if(typeof a>"u")return l;if(typeof l>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(l)||(l=[l]);const p=a.length+l.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(l)}function $r(a){return!(typeof a>"u")}function Dr(a){var l=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)l=_s.call(this,l,Dr.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!A(a))for(const P of o.keys(a)){var S=Object.create(null);S[P]=a[P],l.push(S)}else l=a;return l}function Z(a){if(!(typeof a>"u")){var l=Object.create(null);return a.forEach(function(p){for(const S of o.keys(p))l[S]=p[S]}),l}}function tn(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=a.length,p=new Array(l),S=0;S<l;S++)p[l-S-1]=a[S];return p}}async function sn(a,l){var p=this.createSequence();for(const L of o.keys(a)){var S=ue(l,a[L],L,a),P=await l.apply(this,S);typeof P<"u"&&p.push(P)}return p}function Xt(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function li(a,l){if(!a)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function us(a){if(a!==void 0)return a===null?"null":d(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function ar(a,l){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof l>"u"){if(!k(a)&&!m(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(B,K){return B>K}}else p=l;var S=async function(B,K){var we=async function(Fe,He,We){He.length===0?Array.prototype.push.apply(Fe,We):We.length===0?Array.prototype.push.apply(Fe,He):await p(He[0],We[0])?(Fe.push(We[0]),await we(Fe,He,We.slice(1))):(Fe.push(He[0]),await we(Fe,He.slice(1),We))},oe=[];return await we(oe,B,K),oe},P=async function(B){if(!Array.isArray(B)||B.length<=1)return B;var K=Math.floor(B.length/2),we=B.slice(0,K),oe=B.slice(K);return we=await P(we),oe=await P(oe),await S(we,oe)},L=await P(a);return L}}function u(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=new Array(a.length),p=0;p<a.length;p++){var S=Math.floor(Math.random()*(p+1));p!==S&&(l[p]=l[S]),l[S]=a[p]}return l}}function v(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var l=g(a)?this.createSequence():[],p=0;p<a.length;p++){for(var S=a[p],P=!1,L=0;L<l.length;L++)if(I(S,l[L])){P=!0;break}P||l.push(S)}return l}}async function w(a,l){var p=Object.create(null);for(const B of o.keys(a)){var S=a[B],P=ue(l,S,B,a),L=await l.apply(this,P);ge(L)&&(p[B]=S)}return o.keys(p).length===0&&(p=void 0),p}return{sum:x,count:y,max:N,min:C,average:$,string:G,substring:z,substringBefore:ne,substringAfter:se,lowercase:ie,uppercase:q,length:le,trim:pe,pad:Ue,match:ke,contains:be,replace:ce,split:_e,join:De,formatNumber:T,formatBase:M,number:D,floor:V,ceil:H,round:F,abs:j,sqrt:Y,power:ae,random:Pe,boolean:ge,not:fe,map:$e,zip:Kt,filter:de,single:ft,foldLeft:_t,sift:w,keys:st,lookup:xt,append:_s,exists:$r,spread:Dr,merge:Z,reverse:tn,each:sn,error:Xt,assert:li,type:us,sort:ar,shuffle:u,distinct:v,base64encode:W,base64decode:xe,encodeUrlComponent:b,encodeUrl:_,decodeUrlComponent:Q,decodeUrl:ve}})();i.exports=c}).call(this)}).call(this,typeof Ko<"u"?Ko:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,i,r){var n=s("./datetime"),o=s("./functions"),c=s("./utils"),d=s("./parser"),m=s("./signature"),k=(function(){var g=c.isNumeric,f=c.isArrayOfStrings,A=c.isArrayOfNumbers,E=c.isSequence,O=c.isFunction,I=c.isLambda,U=c.isIterable,x=c.isPromise,y=c.getFunctionArity,N=c.isDeepEqual,C=Xt(null);async function $(u,v,w){var a;w.base.depth++,w.base.guardrails();var l=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(u,v,w),u.type){case"path":a=await G(u,v,w);break;case"binary":a=await le(u,v,w);break;case"unary":a=await pe(u,v,w);break;case"name":a=Ue(u,v,w);break;case"string":case"number":case"value":a=he(u);break;case"wildcard":a=be(u,v,w);break;case"descendant":a=ce(u,v,w);break;case"parent":a=w.lookup(u.slot.label);break;case"condition":a=await V(u,v,w);break;case"block":a=await H(u,v,w);break;case"bind":a=await j(u,v,w);break;case"regex":a=F(u,v,w);break;case"function":a=await ue(u,v,w);break;case"variable":a=Y(u,v,w);break;case"lambda":a=ft(u,v,w);break;case"partial":a=await Kt(u,v,w);break;case"apply":a=await fe(u,v,w);break;case"transform":a=Pe(u,v,w);break}if(Object.prototype.hasOwnProperty.call(u,"predicate"))for(var p=0;p<u.predicate.length;p++)a=await q(u.predicate[p].expr,a,w);u.type!=="path"&&Object.prototype.hasOwnProperty.call(u,"group")&&(a=await T(u.group,a,w));var S=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return S&&await S(u,v,w,a),a&&E(a)&&!a.tupleStream&&(u.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 G(u,v,w){var a;Array.isArray(v)&&u.steps[0].type!=="variable"?a=v:a=w.base.createSequence(v);for(var l,p=!1,S=void 0,P=0;P<u.steps.length;P++){var L=u.steps[P];if(L.tuple&&(p=!0),P===0&&L.consarray?l=await $(L,a,w):p?S=await ie(L,a,S,w):l=await ne(L,a,w,P===u.steps.length-1),!p&&(typeof l>"u"||l.length===0))break;typeof L.focus>"u"&&(a=l)}if(p)if(u.tuple)l=S;else for(l=w.base.createSequence(),P=0;P<S.length;P++)l.push(S[P]["@"]);return u.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=w.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(u,"group")&&(l=await T(u.group,p?S:l,w)),l}function z(u,v){var w=Xt(u);for(const a of c.keys(v))w.bind(a,v[a]);return w}async function ne(u,v,w,a){var l;if(u.type==="sort")return l=await ae(u,v,w),u.stages&&(l=await se(u.stages,l,w)),l;l=w.base.createSequence();for(var p=0;p<v.length;p++){var S=await $(u,v[p],w);if(u.stages)for(var P=0;P<u.stages.length;P++)S=await q(u.stages[P].expr,S,w);typeof S<"u"&&l.push(S)}var L=w.base.createSequence();return a&&l.length===1&&Array.isArray(l[0])&&!E(l[0])?L=l[0]:Array.prototype.forEach.call(l,function(B){!Array.isArray(B)||B.cons?L.push(B):Array.prototype.forEach.call(B,K=>L.push(K))}),L}async function se(u,v,w){for(var a=v,l=0;l<u.length;l++){var p=u[l];switch(p.type){case"filter":a=await q(p.expr,a,w);break;case"index":for(var S=0;S<a.length;S++){var P=a[S];P[p.value]=S}break}}return a}async function ie(u,v,w,a){var l;if(u.type==="sort"){if(w)l=await ae(u,w,a);else{var p=await ae(u,v,a);l=a.base.createSequence(),l.tupleStream=!0;for(var S=0;S<p.length;S++){var P={"@":p[S]};P[u.index]=S,l.push(P)}}return u.stages&&(l=await se(u.stages,l,a)),l}l=a.base.createSequence(),l.tupleStream=!0;var L=a;w===void 0&&(w=v.map(oe=>({"@":oe})));for(var B=0;B<w.length;B++){L=z(a,w[B]);var K=await $(u,w[B]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var we=0;we<K.length;we++)P=Object.create(null),Object.assign(P,w[B]),K.tupleStream?Object.assign(P,K[we]):(u.focus?(P[u.focus]=K[we],P["@"]=w[B]["@"]):P["@"]=K[we],u.index&&(P[u.index]=we),u.ancestor&&(P[u.ancestor.label]=w[B]["@"])),l.push(P)}}return u.stages&&(l=await se(u.stages,l,a)),l}async function q(u,v,w){var a=w.base.createSequence();if(v&&v.tupleStream&&(a.tupleStream=!0),Array.isArray(v)||(v=w.base.createSequence(v)),u.type==="number"){var l=Math.floor(u.value);l<0&&(l=v.length+l);var p=await v[l];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(l=0;l<v.length;l++){var p=v[l],S=p,P=w;v.tupleStream&&(S=p["@"],P=z(w,p));var L=await $(u,S,P);g(L)&&(L=[L]),A(L)?Array.prototype.forEach.call(L,function(K){var we=Math.floor(K);we<0&&(we=v.length+we),we===l&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(u,v,w){var a,l=await $(u.lhs,v,w),p=u.value,S=async()=>await $(u.rhs,v,w);if(p==="and"||p==="or")try{return await ve(l,S,p)}catch(L){throw L.position=u.position,L.token=p,L}var P=await S();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=xe(l,P,p);break;case"=":case"!=":a=b(l,P,p);break;case"<":case"<=":case">":case">=":a=_(l,P,p);break;case"&":a=De(l,P);break;case"..":a=D(l,P,w);break;case"in":a=Q(l,P);break}}catch(L){throw L.position=u.position,L.token=p,L}return a}async function pe(u,v,w){var a,l={options:w.base.options,createSequence:w.base.createSequence};switch(u.value){case"-":if(a=await $(u.expression,v,w),typeof a>"u")a=void 0;else if(g(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:u.position,token:u.value,value:a};break;case"[":a=[];let P=await Promise.all(u.expressions.map(async(L,B)=>(w.isParallelCall=B>0,[L,await $(L,v,w)])));for(let L of P){var[p,S]=L;typeof S<"u"&&(p.value==="["?a.push(S):a=o.append.call(l,a,S))}u.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await T(u,v,w);break}return a}function Ue(u,v,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,v,u.value)}function he(u){return u.value}function be(u,v,w){var a={options:w.base.options,createSequence:w.base.createSequence},l=a.createSequence();return Array.isArray(v)&&v.outerWrapper&&v.length>0&&(v=v[0]),v!==null&&typeof v=="object"&&!O(v)&&c.keys(v).forEach(function(p){var S=v[p];Array.isArray(S)?(S=ke(S),l=o.append.call(a,l,S)):l.push(S)}),l}function ke(u,v){return typeof v>"u"&&(v=[]),Array.isArray(u)?Array.prototype.forEach.call(u,function(w){ke(w,v)}):v.push(u),v}function ce(u,v,w){var a,l=w.base.createSequence();return typeof v<"u"&&(W(v,l),l.length===1?a=l[0]:a=l),a}function W(u,v){Array.isArray(u)||v.push(u),Array.isArray(u)?Array.prototype.forEach.call(u,function(w){W(w,v)}):u!==null&&typeof u=="object"&&!O(u)&&c.keys(u).forEach(function(w){W(u[w],v)})}function xe(u,v,w){var a;if(typeof u<"u"&&!g(u))throw{code:"T2001",stack:new Error().stack,value:u};if(typeof v<"u"&&!g(v))throw{code:"T2002",stack:new Error().stack,value:v};if(typeof u>"u"||typeof v>"u")return a;switch(w){case"+":a=u+v;break;case"-":a=u-v;break;case"*":a=u*v;break;case"/":a=u/v;break;case"%":a=u%v;break}return a}function b(u,v,w){var a,l=typeof u,p=typeof v;if(l==="undefined"||p==="undefined")return!1;switch(w){case"=":a=N(u,v);break;case"!=":a=!N(u,v);break}return a}function _(u,v,w){var a,l=typeof u,p=typeof v,S=l==="undefined"||l==="string"||l==="number",P=p==="undefined"||p==="string"||p==="number";if(!S||!P)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?v:u};if(!(l==="undefined"||p==="undefined")){if(l!==p)throw{code:"T2009",stack:new Error().stack,value:u,value2:v};switch(w){case"<":a=u<v;break;case"<=":a=u<=v;break;case">":a=u>v;break;case">=":a=u>=v;break}return a}}function Q(u,v){var w=!1;if(typeof u>"u"||typeof v>"u")return!1;Array.isArray(v)||(v=[v]);for(var a=0;a<v.length;a++)if(v[a]===u){w=!0;break}return w}async function ve(u,v,w){var a,l=_e(u);switch(w){case"and":a=l&&_e(await v());break;case"or":a=l||_e(await v());break}return a}function _e(u){var v=o.boolean(u);return typeof v>"u"?!1:v}function De(u,v){var w,a="",l="";return typeof u<"u"&&(a=o.string(u)),typeof v<"u"&&(l=o.string(v)),w=a.concat(l),w}async function T(u,v,w){var a=Object.create(null),l=Object.create(null),p=!!(v&&v.tupleStream),S={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(v)||(w.base.options,v=S.createSequence(v)),v.length===0&&!p&&v.push(void 0);for(var P=0;P<v.length;P++)for(var L=v[P],B=p?z(w,L):w,K=0;K<u.lhs.length;K++){var we=u.lhs[K],oe=await $(we[0],p?L["@"]:L,B);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:u.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:u.position,value:oe};var Fe={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(l,oe)){if(l[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:u.position,value:oe};l[oe].data=o.append.call(S,l[oe].data,L)}else l[oe]=Fe}}let He=await Promise.all(c.keys(l).map(async(rt,Le)=>{let Je=l[rt];var Yt=Je.data,Pt=w;if(p){var ds=M(Je.data,w);Yt=ds["@"],delete ds["@"],Pt=z(w,ds)}return w.isParallelCall=Le>0,[rt,await $(u.lhs[Je.exprIndex][1],Yt,Pt)]}));for(let rt of He){var[oe,We]=await rt;typeof We<"u"&&(a[oe]=We)}return a}function M(u,v){if(!Array.isArray(u))return u;var w=Object.create(null),a={options:v.base.options,createSequence:v.base.createSequence};Object.assign(w,u[0]);for(var l=1;l<u.length;l++)for(const p of c.keys(u[l]))w[p]=o.append.call(a,w[p],u[l][p]);return w}function D(u,v,w){var a;if(typeof u<"u"&&!Number.isInteger(u))throw{code:"T2003",stack:new Error().stack,value:u};if(typeof v<"u"&&!Number.isInteger(v))throw{code:"T2004",stack:new Error().stack,value:v};if(typeof u>"u"||typeof v>"u"||u>v)return a;var l=v-u+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(w.base.options&&l>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};a=new Array(l);for(var p=u,S=0;p<=v;p++,S++)a[S]=p;return a.sequence=!0,a}async function j(u,v,w){var a=await $(u.rhs,v,w);return w.bind(u.lhs.value,a),a}async function V(u,v,w){var a,l=await $(u.condition,v,w);return o.boolean(l)?a=await $(u.then,v,w):typeof u.else<"u"&&(a=await $(u.else,v,w)),a}async function H(u,v,w){for(var a,l=Xt(w),p=0;p<u.expressions.length;p++)a=await $(u.expressions[p],v,l);return a}function F(u,v,w){var a=new w.base.RegexEngine(u.value),l=function(p,S){var P;a.lastIndex=S||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 B=1;B<L.length;B++)P.groups.push(L[B]);P.next=function(){if(!(a.lastIndex>=p.length)){var K=l(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:u.position,value:u.value.source};return K}}}return P};return l}function Y(u,v,w){var a;return u.value===""?a=v&&v.outerWrapper?v[0]:v:a=w.lookup(u.value),a}async function ae(u,v,w){var a,l=v,p=!!v.tupleStream,S=async function(L,B){for(var K=0,we=0;K===0&&we<u.terms.length;we++){var oe=u.terms[we],Fe=L,He=w;p&&(Fe=L["@"],He=z(w,L));var We=await $(oe.expression,Fe,He);Fe=B,He=w,p&&(Fe=B["@"],He=z(w,B));var rt=await $(oe.expression,Fe,He),Le=typeof We,Je=typeof rt;if(Le==="undefined"){K=Je==="undefined"?0:1;continue}if(Je==="undefined"){K=-1;continue}if(!(Le==="string"||Le==="number")||!(Je==="string"||Je==="number"))throw{code:"T2008",stack:new Error().stack,position:u.position,value:Le==="string"||Le==="number"?rt:We};if(Le!==Je)throw{code:"T2007",stack:new Error().stack,position:u.position,value:We,value2:rt};We!==rt&&(We<rt?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},P={environment:w,input:v};return a=await o.sort.apply(P,[l,S]),a}function Pe(u,v,w){var a=async function(l){if(!(typeof l>"u")){var p=w.lookup("clone");if(!O(p))throw{code:"T2013",stack:new Error().stack,position:u.position};var S=await $e(p,[l],null,w),P=await $(u.pattern,S,w);if(typeof P<"u"){Array.isArray(P)||(P=[P]);for(var L=0;L<P.length;L++){var B=P[L],K=await $(u.update,B,w),we=typeof K;if(we!=="undefined"){if(we!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:u.update.position,value:K};for(const We of c.keys(K))B[We]=K[We]}if(typeof u.delete<"u"){var oe=await $(u.delete,B,w);if(typeof oe<"u"){var Fe=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:u.delete.position,value:Fe};for(var He=0;He<oe.length;He++)typeof B=="object"&&B!==null&&delete B[oe[He]]}}}}return S}};return Z(a,"<(oa):o>")}var ge=d("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(u,v,w){var a,l=await $(u.lhs,v,w);if(u.rhs.type==="function")a=await ue(u.rhs,v,w,{context:l});else{var p=await $(u.rhs,v,w);if(!O(p))throw{code:"T2006",stack:new Error().stack,position:u.position,value:p};if(O(l)){var S=await $(ge,null,w);a=await $e(S,[l,p],null,w)}else a=await $e(p,[l],null,w)}return a}async function ue(u,v,w,a){var l,p=await $(u.procedure,v,w);if(typeof p>"u"&&u.procedure.type==="path"&&w.lookup(u.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};var S=[];typeof a<"u"&&S.push(a.context);for(var P=0;P<u.arguments.length;P++){const B=await $(u.arguments[P],v,w);if(O(B)){const K=async function(...we){return await $e(B,we,null,w)};K.arity=y(B),S.push(K)}else S.push(B)}var L=u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=u.position),l=await $e(p,S,v,w)}catch(B){throw B.position||(B.position=u.position),B.token||(B.token=L),B}return l}async function $e(u,v,w,a){var l;for(l=await de(u,v,w,a);I(l)&&l.thunk===!0;){var p=await $(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(p.token=l.body.procedure.value),p.position=l.body.procedure.position;for(var S=[],P=0;P<l.body.arguments.length;P++)S.push(await $(l.body.arguments[P],l.input,l.environment));l=await de(p,S,w,a)}return l}async function de(u,v,w,a){var l;try{var p=v;if(u&&(p=_t(u.signature,v,w)),I(u))l=await st(u,p);else if(u&&u._jsonata_function===!0){var S={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};l=u.implementation.apply(S,p),U(l)&&(l=l.next().value),x(l)&&(l=await l)}else if(typeof u=="function")l=u.apply(w,p),x(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(P){throw u&&(typeof P.token>"u"&&typeof u.token<"u"&&(P.token=u.token),P.position=u.position||P.position),P}return l}function ft(u,v,w){var a={_jsonata_lambda:!0,input:v,environment:w,arguments:u.arguments,signature:u.signature,body:u.body};return u.thunk===!0&&(a.thunk=!0),a.apply=async function(l,p){return await $e(a,p,v,l?l.environment:w)},a}async function Kt(u,v,w){for(var a,l=[],p=0;p<u.arguments.length;p++){var S=u.arguments[p];S.type==="operator"&&S.value==="?"?l.push(S):l.push(await $(S,v,w))}var P=await $(u.procedure,v,w);if(typeof P>"u"&&u.procedure.type==="path"&&w.lookup(u.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};if(I(P))a=xt(P,l,w);else if(P&&P._jsonata_function===!0)a=_s(P.implementation,l,w);else if(typeof P=="function")a=_s(P,l,w);else throw{code:"T1008",stack:new Error().stack,position:u.position,token:u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value};return a}function _t(u,v,w){if(typeof u>"u")return v;var a=u.validate(v,w);return a}async function st(u,v){var w,a=Xt(u.environment);return Array.prototype.forEach.call(u.arguments,function(l,p){a.bind(l.value,v[p])}),typeof u.body=="function"?w=await $r(u.body,a):w=await $(u.body,u.input,a),w}function xt(u,v,w){var a=Xt(u.environment||w),l=[];Array.prototype.forEach.call(u.arguments,function(S,P){var L=v[P];L&&L.type==="operator"&&L.value==="?"?l.push(S):a.bind(S.value,L)});var p={_jsonata_lambda:!0,input:u.input,environment:a,arguments:l,body:u.body};return p}function _s(u,v,w){var a=Dr(u);a=a.map(function(P){return"$"+P.trim()});var l="function("+a.join(", ")+"){ _ }",p=d(l);p.body=u;var S=xt(p,v,w);return S}async function $r(u,v){var w=Dr(u),a=w.map(function(S){return v.lookup(S.trim())}),l={environment:v,createSequence:v.base.createSequence},p=u.apply(l,a);return x(p)&&(p=await p),p}function Dr(u){var v=u.toString(),w=/\(([^)]*)\)/.exec(v)[1],a=w.split(",");return a}function Z(u,v){var w={_jsonata_function:!0,implementation:u};return typeof v<"u"&&(w.signature=m(v)),w}async function tn(u,v){if(!(typeof u>"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=d(u,!1)}catch(p){throw us(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var l=await $(a,w,this.environment)}catch(p){throw us(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return l}}function sn(u){if(!(typeof u>"u"))return JSON.parse(o.string(u))}function Xt(u){var v=Object.create(null);const w={bind:function(l,p){v[l]=p},lookup:function(l){var p;return Object.prototype.hasOwnProperty.call(v,l)?p=v[l]:u&&(p=u.lookup(l)),p},timestamp:u?u.timestamp:null,async:u?u.async:!1,isParallelCall:u?u.isParallelCall:!1,global:u?u.global:{ancestry:[null]}};if(u){var a=u.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(u,w),w.base=u.base}return w}C.bind("sum",Z(o.sum,"<a<n>:n>")),C.bind("count",Z(o.count,"<a:n>")),C.bind("max",Z(o.max,"<a<n>:n>")),C.bind("min",Z(o.min,"<a<n>:n>")),C.bind("average",Z(o.average,"<a<n>:n>")),C.bind("string",Z(o.string,"<x-b?:s>")),C.bind("substring",Z(o.substring,"<s-nn?:s>")),C.bind("substringBefore",Z(o.substringBefore,"<s-s:s>")),C.bind("substringAfter",Z(o.substringAfter,"<s-s:s>")),C.bind("lowercase",Z(o.lowercase,"<s-:s>")),C.bind("uppercase",Z(o.uppercase,"<s-:s>")),C.bind("length",Z(o.length,"<s-:n>")),C.bind("trim",Z(o.trim,"<s-:s>")),C.bind("pad",Z(o.pad,"<s-ns?:s>")),C.bind("match",Z(o.match,"<s-f<s:o>n?:a<o>>")),C.bind("contains",Z(o.contains,"<s-(sf):b>")),C.bind("replace",Z(o.replace,"<s-(sf)(sf)n?:s>")),C.bind("split",Z(o.split,"<s-(sf)n?:a<s>>")),C.bind("join",Z(o.join,"<a<s>s?:s>")),C.bind("formatNumber",Z(o.formatNumber,"<n-so?:s>")),C.bind("formatBase",Z(o.formatBase,"<n-n?:s>")),C.bind("formatInteger",Z(n.formatInteger,"<n-s:s>")),C.bind("parseInteger",Z(n.parseInteger,"<s-s:n>")),C.bind("number",Z(o.number,"<(nsb)-:n>")),C.bind("floor",Z(o.floor,"<n-:n>")),C.bind("ceil",Z(o.ceil,"<n-:n>")),C.bind("round",Z(o.round,"<n-n?:n>")),C.bind("abs",Z(o.abs,"<n-:n>")),C.bind("sqrt",Z(o.sqrt,"<n-:n>")),C.bind("power",Z(o.power,"<n-n:n>")),C.bind("random",Z(o.random,"<:n>")),C.bind("boolean",Z(o.boolean,"<x-:b>")),C.bind("not",Z(o.not,"<x-:b>")),C.bind("map",Z(o.map,"<af>")),C.bind("zip",Z(o.zip,"<a+>")),C.bind("filter",Z(o.filter,"<af>")),C.bind("single",Z(o.single,"<af?>")),C.bind("reduce",Z(o.foldLeft,"<afj?:j>")),C.bind("sift",Z(o.sift,"<o-f?:o>")),C.bind("keys",Z(o.keys,"<x-:a<s>>")),C.bind("lookup",Z(o.lookup,"<x-s:x>")),C.bind("append",Z(o.append,"<xx:a>")),C.bind("exists",Z(o.exists,"<x:b>")),C.bind("spread",Z(o.spread,"<x-:a<o>>")),C.bind("merge",Z(o.merge,"<a<o>:o>")),C.bind("reverse",Z(o.reverse,"<a:a>")),C.bind("each",Z(o.each,"<o-f:a>")),C.bind("error",Z(o.error,"<s?:x>")),C.bind("assert",Z(o.assert,"<bs?:x>")),C.bind("type",Z(o.type,"<x:s>")),C.bind("sort",Z(o.sort,"<af?:a>")),C.bind("shuffle",Z(o.shuffle,"<a:a>")),C.bind("distinct",Z(o.distinct,"<x:x>")),C.bind("base64encode",Z(o.base64encode,"<s-:s>")),C.bind("base64decode",Z(o.base64decode,"<s-:s>")),C.bind("encodeUrlComponent",Z(o.encodeUrlComponent,"<s-:s>")),C.bind("encodeUrl",Z(o.encodeUrl,"<s-:s>")),C.bind("decodeUrlComponent",Z(o.decodeUrlComponent,"<s-:s>")),C.bind("decodeUrl",Z(o.decodeUrl,"<s-:s>")),C.bind("eval",Z(tn,"<sx?:x>")),C.bind("toMillis",Z(n.toMillis,"<s-s?:n>")),C.bind("fromMillis",Z(n.fromMillis,"<n-s?s?:s>")),C.bind("clone",Z(sn,"<(oa)-:o>"));var li={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 us(u){var v=li[u.code];if(typeof v<"u"){var w=v.replace(/\{\{\{([^}]+)}}}/g,function(){return u[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(u[arguments[1]])}),u.message=w}}function ar(u,v){var w,a;try{w=d(u,v&&v.recover),a=w.errors,delete w.errors}catch(S){throw us(S),S}var l=Xt(C),p=new Date;return l.bind("now",Z(function(S,P){return n.fromMillis(p.getTime(),S,P)},"<s?s?:s>")),l.bind("millis",Z(function(){return p.getTime()},"<:n>")),{evaluate:async function(S,P,L){if(typeof a<"u"){var B={code:"S0500",position:0};throw us(B),B}const K=Xt(l);for(const oe of c.keys(P))K.bind(oe,P[oe]);if(K.bind("$",S),p=new Date,K.timestamp=p,K.options=v,K.createSequence=function(){var oe=[];return v&&v.sequence&&(oe.push=function(...Fe){if(oe.length+Fe.length>v.sequence)throw{code:"D2015",stack:new Error().stack,value:v.sequence};return Array.prototype.push.apply(oe,Fe)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(S)&&!E(S)&&(S=K.createSequence(S),S.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 we;try{return we=await $(w,S,K),typeof L=="function"&&L(null,we),we}catch(oe){throw us(oe),oe}},assign:function(S,P){l.bind(S,P)},registerFunction:function(S,P,L){var B=Z(P,L);l.bind(S,B)},ast:function(){return w},errors:function(){return a}}}return ar.parser=d,ar})();i.exports=k},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,i,r){var n=s("./signature");const o=(()=>{var c={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
73
+ `,r:"\r",t:" "},m=function(g){var f=0,A=g.length,E=function(U,x){var y={type:U,value:x,position:f};return y},O=function(){for(var U=f,x=0,y,N,C=function(G){if(g.charAt(G)==="/"&&x===0){for(var z=0;g.charAt(G-(z+1))==="\\";)z++;if(z%2===0)return!0}return!1};f<A;){var $=g.charAt(f);if(C(f)){if(y=g.substring(U,f),y==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,$=g.charAt(f),U=f;$==="i"||$==="m";)f++,$=g.charAt(f);return N=g.substring(U,f)+"g",new RegExp(y,N)}($==="("||$==="["||$==="{")&&g.charAt(f-1)!=="\\"&&x++,($===")"||$==="]"||$==="}")&&g.charAt(f-1)!=="\\"&&x--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},I=function(U){if(f>=A)return null;for(var x=g.charAt(f);f<A&&`
74
+ \r\v`.indexOf(x)>-1;)f++,x=g.charAt(f);if(x==="/"&&g.charAt(f+1)==="*"){var y=f;for(f+=2,x=g.charAt(f);!(x==="*"&&g.charAt(f+1)==="/");)if(x=g.charAt(++f),f>=A)throw{code:"S0106",stack:new Error().stack,position:y};return f+=2,x=g.charAt(f),I(U)}if(U!==!0&&x==="/")return f++,E("regex",O());if(x==="."&&g.charAt(f+1)===".")return f+=2,E("operator","..");if(x===":"&&g.charAt(f+1)==="=")return f+=2,E("operator",":=");if(x==="!"&&g.charAt(f+1)==="=")return f+=2,E("operator","!=");if(x===">"&&g.charAt(f+1)==="=")return f+=2,E("operator",">=");if(x==="<"&&g.charAt(f+1)==="=")return f+=2,E("operator","<=");if(x==="*"&&g.charAt(f+1)==="*")return f+=2,E("operator","**");if(x==="~"&&g.charAt(f+1)===">")return f+=2,E("operator","~>");if(x==="?"&&g.charAt(f+1)===":")return f+=2,E("operator","?:");if(x==="?"&&g.charAt(f+1)==="?")return f+=2,E("operator","??");if(Object.prototype.hasOwnProperty.call(c,x))return f++,E("operator",x);if(x==='"'||x==="'"){var N=x;f++;for(var C="";f<A;){if(x=g.charAt(f),x==="\\")if(f++,x=g.charAt(f),Object.prototype.hasOwnProperty.call(d,x))C+=d[x];else if(x==="u"){var $=g.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test($)){var G=parseInt($,16);C+=String.fromCharCode(G),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:x};else{if(x===N)return f++,E("string",C);C+=x}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var z=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ne=z.exec(g.substring(f));if(ne!==null){var se=parseFloat(ne[0]);if(!isNaN(se)&&isFinite(se))return f+=ne[0].length,E("number",se);throw{code:"S0102",stack:new Error().stack,position:f,token:ne[0]}}var ie;if(x==="`"){f++;var q=g.indexOf("`",f);if(q!==-1)return ie=g.substring(f,q),f=q+1,E("name",ie);throw f=A,{code:"S0105",stack:new Error().stack,position:f}}for(var le=f,pe;;)if(pe=g.charAt(le),le===A||`
75
+ \r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(c,pe)){if(g.charAt(f)==="$")return ie=g.substring(f+1,le),f=le,E("variable",ie);switch(ie=g.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===A&&ie===""?null:E("name",ie)}}else le++};return I},k=function(g,f){var A,E,O=Object.create(null),I=[],U=function(){var b=[];A.id!=="(end)"&&b.push({type:A.type,value:A.value,position:A.position});for(var _=E();_!==null;)b.push(_),_=E();return b},x={nud:function(){var b={code:"S0211",token:this.value,position:this.position};if(f)return b.remaining=U(),b.type="error",I.push(b),b;throw b.stack=new Error().stack,b}},y=function(b,_){var Q=O[b];return _=_||0,Q?_>=Q.lbp&&(Q.lbp=_):(Q=Object.create(x),Q.id=Q.value=b,Q.lbp=_,O[b]=Q),Q},N=function(b){if(f){b.remaining=U(),I.push(b);var _=O["(error)"];return A=Object.create(_),A.error=b,A.type="(error)",A}else throw b.stack=new Error().stack,b},C=function(b,_){if(b&&A.id!==b){var Q;A.id==="(end)"?Q="S0203":Q="S0202";var ve={code:Q,position:A.position,token:A.value,value:b};return N(ve)}var _e=E(_);if(_e===null)return A=O["(end)"],A.position=g.length,A;var De=_e.value,T=_e.type,M;switch(T){case"name":case"variable":M=O["(name)"];break;case"operator":if(M=O[De],!M)return N({code:"S0204",stack:new Error().stack,position:_e.position,token:De});break;case"string":case"number":case"value":M=O["(literal)"];break;case"regex":T="regex",M=O["(regex)"];break;default:return N({code:"S0205",stack:new Error().stack,position:_e.position,token:De})}return A=Object.create(M),A.value=De,A.type=T,A.position=_e.position,A},$=function(b){var _,Q=A;for(C(null,!0),_=Q.nud();b<A.lbp;)Q=A,C(),_=Q.led(_);return _},G=function(b){var _=y(b,0);_.nud=function(){return this}},z=function(b,_,Q){var ve=_||c[b],_e=y(b,ve);return _e.led=Q||function(De){return this.lhs=De,this.rhs=$(ve),this.type="binary",this},_e},ne=function(b,_,Q){var ve=y(b,_);return ve.led=Q,ve},se=function(b,_){var Q=y(b);return Q.nud=_||function(){return this.expression=$(70),this.type="unary",this},Q};G("(end)"),G("(name)"),G("(literal)"),G("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),z("."),z("+"),z("-"),z("*"),z("/"),z("%"),z("="),z("<"),z(">"),z("!="),z("<="),z(">="),z("&"),z("and"),z("or"),z("in"),G("and"),G("or"),G("in"),se("-"),z("~>"),z("??",c["??"],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=$(0),this}),ne("(error)",10,function(b){return this.lhs=b,this.error=A.error,this.remaining=U(),this.type="error",this}),se("*",function(){return this.type="wildcard",this}),se("**",function(){return this.type="descendant",this}),se("%",function(){return this.type="parent",this}),z("(",c["("],function(b){if(this.procedure=b,this.type="function",this.arguments=[],A.id!==")")for(;A.type==="operator"&&A.id==="?"?(this.type="partial",this.arguments.push(A),C("?")):this.arguments.push($(0)),A.id===",";)C(",");if(C(")",!0),b.type==="name"&&(b.value==="function"||b.value==="λ")){if(this.arguments.forEach(function(De,T){if(De.type!=="variable")return N({code:"S0208",stack:new Error().stack,position:De.position,token:De.value,value:T+1})}),this.type="lambda",A.id==="<"){for(var _=A.position,Q=1,ve="<";Q>0&&A.id!=="{"&&A.id!=="(end)";){var _e=C();_e.id===">"?Q--:_e.id==="<"&&Q++,ve+=_e.value}C(">");try{this.signature=n(ve)}catch(De){return De.position=_+De.offset,N(De)}}C("{"),this.body=$(0),C("}")}return this}),se("(",function(){for(var b=[];A.id!==")"&&(b.push($(0)),A.id===";");)C(";");return C(")",!0),this.type="block",this.expressions=b,this}),se("[",function(){var b=[];if(A.id!=="]")for(;;){var _=$(0);if(A.id===".."){var Q={type:"binary",value:"..",position:A.position,lhs:_};C(".."),Q.rhs=$(0),_=Q}if(b.push(_),A.id!==",")break;C(",")}return C("]",!0),this.expressions=b,this.type="unary",this}),z("[",c["["],function(b){if(A.id==="]"){for(var _=b;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,C("]"),b}else return this.lhs=b,this.rhs=$(c["]"]),this.type="binary",C("]",!0),this}),z("^",c["^"],function(b){C("(");for(var _=[];;){var Q={descending:!1};if(A.id==="<"?C("<"):A.id===">"&&(Q.descending=!0,C(">")),Q.expression=$(0),_.push(Q),A.id!==",")break;C(",")}return C(")"),this.lhs=b,this.rhs=_,this.type="binary",this});var ie=function(b){var _=[];if(A.id!=="}")for(;;){var Q=$(0);C(":");var ve=$(0);if(_.push([Q,ve]),A.id!==",")break;C(",")}return C("}",!0),typeof b>"u"?(this.lhs=_,this.type="unary"):(this.lhs=b,this.rhs=_,this.type="binary"),this};se("{",ie),z("{",c["{"],ie),ne(":=",c[":="],function(b){return b.type!=="variable"?N({code:"S0212",stack:new Error().stack,position:b.position,token:b.value}):(this.lhs=b,this.rhs=$(c[":="]-1),this.type="binary",this)}),z("@",c["@"],function(b){return this.lhs=b,this.rhs=$(c["@"]),this.rhs.type!=="variable"?N({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),z("#",c["#"],function(b){return this.lhs=b,this.rhs=$(c["#"]),this.rhs.type!=="variable"?N({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),z("?",c["?"],function(b){return this.type="condition",this.condition=b,this.then=$(0),A.id===":"&&(C(":"),this.else=$(0)),this}),z("?:",c["?:"],function(b){return this.type="condition",this.condition=JSON.parse(JSON.stringify(b)),this.then=b,this.else=$(0),this}),se("|",function(){return this.type="transform",this.pattern=$(0),C("|"),this.update=$(0),A.id===","&&(C(","),this.delete=$(0)),C("|"),this});var q=function(b){var _;if(b.type==="function"&&!b.predicate){var Q={type:"lambda",thunk:!0,arguments:[],position:b.position};Q.body=b,_=Q}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 ve=b.expressions.length;ve>0&&(b.expressions[ve-1]=q(b.expressions[ve-1])),_=b}else _=b;return _},le=0,pe=0,Ue=[],he=function(b,_){switch(b.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof b.ancestor>"u"||(Ue[_.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,_=he(b.expressions[b.expressions.length-1],_));break;case"path":b.tuple=!0;var Q=b.steps.length-1;for(_=he(b.steps[Q--],_);_.level>0&&Q>=0;)_=he(b.steps[Q--],_);break;default:throw{code:"S0217",token:b.type,position:b.position}}return _},be=function(b,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var Q=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&Q.push(_.slot),typeof b.seekingParent>"u"?b.seekingParent=Q:Array.prototype.push.apply(b.seekingParent,Q)}},ke=function(b){var _=b.steps.length-1,Q=b.steps[_],ve=typeof Q.seekingParent<"u"?Q.seekingParent:[];Q.type==="parent"&&ve.push(Q.slot);for(var _e=0;_e<ve.length;_e++){var De=ve[_e];for(_=b.steps.length-2;De.level>0;){if(_<0){typeof b.seekingParent>"u"?b.seekingParent=[De]:b.seekingParent.push(De);break}for(var T=b.steps[_--];_>=0&&T.focus&&b.steps[_].focus;)T=b.steps[_--];De=he(T,De)}}},ce=function(b){var _;switch(b.type){case"binary":switch(b.value){case".":var Q=ce(b.lhs);Q.type==="path"?_=Q:_={type:"path",steps:[Q]},Q.type==="parent"&&(_.seekingParent=[Q.slot]);var ve=ce(b.rhs);ve.type==="path"?Array.prototype.push.apply(_.steps,ve.steps):(typeof ve.predicate<"u"&&(ve.stages=ve.predicate,delete ve.predicate),_.steps.push(ve)),_.steps.filter(function(Y){if(Y.type==="number"||Y.type==="value")throw{code:"S0213",stack:new Error().stack,position:Y.position,value:Y.value};return Y.type==="string"}).forEach(function(Y){Y.type="name"}),_.steps.filter(function(Y){return Y.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var _e=_.steps[0];_e.type==="unary"&&_e.value==="["&&(_e.consarray=!0);var De=_.steps[_.steps.length-1];De.type==="unary"&&De.value==="["&&(De.consarray=!0),ke(_);break;case"[":_=ce(b.lhs);var T=_,M="predicate";if(_.type==="path"&&(T=_.steps[_.steps.length-1],M="stages"),typeof T.group<"u")throw{code:"S0209",stack:new Error().stack,position:b.position};typeof T[M]>"u"&&(T[M]=[]);var D=ce(b.rhs);typeof D.seekingParent<"u"&&(D.seekingParent.forEach(Y=>{Y.level===1?he(T,Y):Y.level--}),be(T,D)),T[M].push({type:"filter",expr:D,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(Y){return[ce(Y[0]),ce(Y[1])]}),position:b.position};break;case"^":_=ce(b.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var j={type:"sort",position:b.position};j.terms=b.rhs.map(function(Y){var ae=ce(Y.expression);return be(j,ae),{descending:Y.descending,expression:ae}}),_.steps.push(j),ke(_);break;case":=":_={type:"bind",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),be(_,_.rhs);break;case"@":if(_=ce(b.lhs),T=_,_.type==="path"&&(T=_.steps[_.steps.length-1]),typeof T.stages<"u"||typeof T.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:b.position};if(T.type==="sort")throw{code:"S0216",stack:new Error().stack,position:b.position};b.keepArray&&(T.keepArray=!0),T.focus=b.rhs.value,T.tuple=!0;break;case"#":_=ce(b.lhs),T=_,_.type==="path"?T=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof T.predicate<"u"&&(T.stages=T.predicate,delete T.predicate)),typeof T.stages>"u"?T.index=b.rhs.value:T.stages.push({type:"index",value:b.rhs.value,position:b.position}),T.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),be(_,_.lhs),be(_,_.rhs)}break;case"unary":_={type:b.type,value:b.value,position:b.position},b.value==="["?_.expressions=b.expressions.map(function(Y){var ae=ce(Y);return be(_,ae),ae}):b.value==="{"?_.lhs=b.lhs.map(function(Y){var ae=ce(Y[0]);be(_,ae);var Pe=ce(Y[1]);return be(_,Pe),[ae,Pe]}):(_.expression=ce(b.expression),b.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):be(_,_.expression));break;case"function":case"partial":_={type:b.type,name:b.name,value:b.value,position:b.position},_.arguments=b.arguments.map(function(Y){var ae=ce(Y);return be(_,ae),ae}),_.procedure=ce(b.procedure);break;case"lambda":_={type:b.type,arguments:b.arguments,signature:b.signature,position:b.position};var V=ce(b.body);_.body=q(V);break;case"condition":_={type:b.type,position:b.position},_.condition=ce(b.condition),be(_,_.condition),_.then=ce(b.then),be(_,_.then),typeof b.else<"u"&&(_.else=ce(b.else),be(_,_.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(Y){var ae=ce(Y);return be(_,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++}},Ue.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 H="S0206";b.id==="(end)"&&(H="S0207");var F={code:H,position:b.position,token:b.value};if(f)return I.push(F),{type:"error",error:F};throw F.stack=new Error().stack,F}return b.keepArray&&(_.keepArray=!0),_};E=m(g),C();var W=$(0);if(A.id!=="(end)"){var xe={code:"S0201",position:A.position,token:A.value};N(xe)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return I.length>0&&(W.errors=I),W};return k})();i.exports=o},{"./signature":5}],5:[function(s,i,r){var n=s("./utils");const o=(()=>{var c={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function d(m){for(var k=1,g=[],f=Object.create(null),A=f;k<m.length;){var E=m.charAt(k);if(E===":")break;var O=function(){g.push(f),A=f,f=Object.create(null)},I=function(z,ne,se,ie){for(var q=1,le=ne;le<z.length;)if(le++,E=z.charAt(le),E===ie){if(q--,q===0)break}else E===se&&q++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,O();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,O();break;case"f":f.regex="f",f.type=E,O();break;case"j":f.regex="[asnblom]",f.type=E,O();break;case"x":f.regex="[asnblfom]",f.type=E,O();break;case"-":A.context=!0,A.contextRegex=new RegExp(A.regex),A.regex+="?";break;case"?":case"+":A.regex+=E;break;case"(":var U=I(m,k,"(",")"),x=m.substring(k+1,U);if(x.indexOf("<")===-1)f.regex="["+x+"m]";else throw{code:"S0402",stack:new Error().stack,value:x,offset:k};f.type="("+x+")",k=U,O();break;case"<":if(A.type==="a"||A.type==="f"){var y=I(m,k,"<",">");A.subtype=m.substring(k+1,y),k=y}else throw{code:"S0401",stack:new Error().stack,value:A.type,offset:k};break}k++}var N="^"+g.map(function(z){return"("+z.regex+")"}).join("")+"$",C=new RegExp(N),$=function(z){var ne;if(n.isFunction(z))ne="f";else{var se=typeof z;switch(se){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":z===null?ne="l":Array.isArray(z)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},G=function(z,ne){for(var se="^",ie=0,q=0;q<g.length;q++){se+=g[q].regex;var le=ne.match(se);if(le===null)throw{code:"T0410",stack:new Error().stack,value:z[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:z[ie],index:ie+1}};return{definition:m,validate:function(z,ne){var se="";z.forEach(function(pe){se+=$(pe)});var ie=C.exec(se);if(ie){var q=[],le=0;return g.forEach(function(pe,Ue){var he=z[le],be=ie[Ue+1];if(be==="")if(pe.context&&pe.contextRegex){var ke=$(ne);if(pe.contextRegex.test(ke))q.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else q.push(he),le++;else be.split("").forEach(function(ce){if(he=z[le],pe.type==="a"){if(ce==="m")he=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&be!==pe.subtype)W=!1;else if(ce==="a"&&he.length>0){var xe=$(he[0]);if(xe!==pe.subtype.charAt(0))W=!1;else{var b=he.filter(function(_){return $(_)!==xe});W=b.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:he,index:le+1,type:c[pe.subtype]};ce!=="a"&&(he=[he])}q.push(he),le++}else q.push(he),le++})}),q}G(z,se)}}}return d})();i.exports=o},{"./utils":6}],6:[function(s,i,r){const n=(()=>{function o(y){var N=!1;if(typeof y=="number"&&(N=!isNaN(y),N&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return N}function c(y){var N=!1;return Array.isArray(y)&&(N=y.filter(function(C){return typeof C!="string"}).length===0),N}function d(y){var N=!1;return Array.isArray(y)&&(N=y.filter(function(C){return!o(C)}).length===0),N}function m(y){return y.sequence===!0&&Array.isArray(y)}function k(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function g(y){var N=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return N}function f(y){return y&&y._jsonata_lambda===!0}var A=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(y){return typeof y=="object"&&y!==null&&A in y&&"next"in y&&typeof y.next=="function"}function O(y,N){if(y===N)return!0;if(typeof y=="object"&&typeof N=="object"&&y!==null&&N!==null){if(Array.isArray(y)&&Array.isArray(N)){if(y.length!==N.length)return!1;for(var C=0;C<y.length;C++)if(!O(y[C],N[C]))return!1;return!0}var $=Object.getOwnPropertyNames(y),G=Object.getOwnPropertyNames(N);if($.length!==G.length)return!1;for($=$.sort(),G=G.sort(),C=0;C<$.length;C++)if($[C]!==G[C])return!1;for(C=0;C<$.length;C++){var z=$[C];if(!O(y[z],N[z]))return!1}return!0}return!1}function I(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function U(y){var N=[];for(let C of y)N.push(C);return N}function x(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:o,isArrayOfStrings:c,isArrayOfNumbers:d,isSequence:m,isFunction:k,isLambda:f,isIterable:E,getFunctionArity:g,isDeepEqual:O,stringToArray:U,isPromise:I,keys:x}})();i.exports=n},{}]},{},[3])(3)})})(kn)),kn.exports}var Oc=Ec();const Tc=Yo(Oc);function Lc(t){t.registerFunction("ucFirst",e=>Tr.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",i="EUR")=>{const r=Number(e);return Number.isNaN(r)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(i)}).format(r)}),t.registerFunction("percent",(e,s="fr-FR",i=0)=>{const r=Number(e);return Number.isNaN(r)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(i)||0}).format(r)}),t.registerFunction("date",(e,s="fr-FR",i)=>{const r=e instanceof Date?e:new Date(String(e));if(Number.isNaN(r.getTime()))return String(e??"");let n={dateStyle:"medium"};if(i)try{n=JSON.parse(String(i))}catch{}return new Intl.DateTimeFormat(String(s),n).format(r)}),t.registerFunction("toChart",(e,s="label",i="value",r="")=>{const n=Array.isArray(e)?e:[],o=[],c=[];for(const d of n){if(!d||typeof d!="object")continue;const m=d;o.push(String(m[String(s)]??"")),c.push(Number(m[String(i)]??0))}return{labels:o,datasets:[{label:String(r||""),data:c}]}})}const Jo=new Map,Xo=8e3;function Mc(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>Xo)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${Xo}).`);const e=Jo.get(t);if(e)return e;try{const s=Tc(t);return Lc(s),Jo.set(t,s),s}catch(s){const i=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 : ${i}`)}}function Nc(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 ${Ic(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const i=t;for(const r of e.required)if(typeof r=="string"&&!(r in i))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${r}".`)}}function Ic(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const Fc=150,Qo=10,jc=200,Rc=16,ea=new WeakMap;let ta=!1;function fs(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function mr(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function zc(t,e,s){if(t===window){window.scrollTo(e,s);return}const i=t;typeof i.scrollTo=="function"?i.scrollTo(e,s):(i.scrollLeft=e,i.scrollTop=s)}function Uc(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 Gs(t){let e=ea.get(t);if(!e){const s=mr(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},ea.set(t,e)}return e}function Li(t){Gs(t).userEngaged=!0}function Mi(t){const e=Gs(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},Fc)}function sa(t,e){return e-t>=jc}function vr(t){if(!fs())return;const e=Gs(t);if(e.restoring)return;const s=mr(t);if(sa(s.y,e.y)){Dn(t);return}e.x=s.x,e.y=s.y}function $n(t){if(!fs())return;const e=Gs(t),s=Uc(t),i=e.x,r=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=mr(t);if(!(Math.abs(i-n)<=Qo&&Math.abs(r-o)<=Qo)){e.restoring=!0;try{zc(t,i,r)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function qc(t,e={x:0,y:0}){if(!fs())return;const s=Gs(t);if(e==="current"){const i=mr(t);s.x=i.x,s.y=i.y;return}s.x=e.x??0,s.y=e.y??0}function Dn(t){const e=Gs(t);if(e.stickyFrames=Rc,e.raf)return;const s=()=>{e.raf=0,$n(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function En(t){Dn(t)}function Zs(t){if(!fs())return;const e=Gs(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,i=()=>{if(e.restoring)return;const{y:E}=mr(t);if(sa(E,e.y)){Dn(t);return}if(e.userEngaged){vr(t),Mi(t);return}vr(t)},r=E=>ra(E)===t,n=E=>{r(E)&&(vr(t),Li(t))},o=E=>{r(E)&&Mi(t)},c=E=>{r(E)&&(vr(t),Li(t),Mi(t))};s.addEventListener("scroll",i,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",c,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const d=mr(t);if(e.x=d.x,e.y=d.y,t===window){const E=new ResizeObserver(()=>En(window));E.observe(document.documentElement),e.resizeObserver=E;return}const m=t,k=new ResizeObserver(()=>En(m));k.observe(m);for(const E of Array.from(m.children))k.observe(E);e.resizeObserver=k;const g=()=>En(m),f=new MutationObserver(E=>{for(const O of E)if(O.type==="childList")for(const I of Array.from(O.addedNodes))I instanceof Element&&k.observe(I);g()});f.observe(m,{childList:!0,subtree:!0,characterData:!0});const A=m.getRootNode();A instanceof ShadowRoot&&A.host&&f.observe(A.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function ra(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&ia(e))return e;return window}function ia(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 On(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&ia(s)&&Zs(s);const e=ra(t);Zs(e),t.type==="wheel"?(vr(e),Li(e),Mi(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(vr(e),Li(e))}function Ni(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&Zs(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Zs(e)})}function Tn(t){Ni(t),new MutationObserver(s=>{for(const i of s)for(const r of Array.from(i.addedNodes))r instanceof Element&&Ni(r)}).observe(t,{childList:!0,subtree:!0})}function Ln(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(Tn(e.shadowRoot),Ln(e.shadowRoot))})}function Vc(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(i){const r=e.call(this,i);return Tn(r),r}}function na(){if(typeof window>"u"||ta||(ta=!0,!fs()))return;Zs(window),Vc();const t={capture:!0,passive:!0};window.addEventListener("wheel",On,t),window.addEventListener("touchstart",On,t),window.addEventListener("pointerdown",On,t);const e=()=>{Ni(document),Ln(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(i=>{for(const r of i)for(const n of Array.from(r.addedNodes))n instanceof Element&&(Ni(n),n.shadowRoot&&Tn(n.shadowRoot),Ln(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Bc=bl,Hc=bc,Wc=yi,Kc=Tr,gs=Ke,Yc=ct,Br=at,Gc=Ds,Zc=ps;na(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Bc,Arrays:Hc,DataBindObserver:Wc,Format:Kc,HTML:gs,LocationHandler:Yc,Objects:Br,PublisherManager:ye,api:Gc,URLPattern:Zc,Endpoint:$i,DataProviderKey:Ss};var Jc=Object.defineProperty,Xc=Object.getOwnPropertyDescriptor,Hr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Xc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Jc(e,s,r),r};const Mn=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 i=this.getAttribute("name"),r=this.getCheckAllPublisher(),n=this.getFormPublisher();if(r?.hasCheckAll.get()&&!this.checksAll()&&r&&n&&i){if(this.getFormPublisherValue()?.length)(this.checked===null||r.checkMode.get()=="noneChecked"||r.checkMode.get()==null)&&r.checkMode.set("someUnchecked");else{r.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),c=r.values.get();if(c&&c.length){let d=c.length;for(const m of c)o.indexOf(m)==-1&&(d-=1);d==c.length&&r.checkMode.set("allChecked"),d==0&&r.checkMode.set("noneChecked")}c.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=i=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),i=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),i=="noneChecked"&&(this.checked=null),i=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(i){if(this.value==i||(this.hasAttribute("value")&&!this.forceAutoFill&&(i=this.getAttribute("value")),this._value==i)||i==null||(this._value=i,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==i?!0:null),Array.isArray(n)||(n=[]),n.indexOf(i)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(i){if(this.setCheckedValue(i),this.checksAll()){const r=this.getCheckAllPublisher();r&&(this.checked===!0?r.checkMode.set("allChecked"):this.checked===null&&(r.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const i=this.shadowRoot?.querySelector("input");if(!i||i.checkValidity())return;const r=this.getFormPublisher();if(r){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;r.isFormValid=!1,i.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(i){this._checked!=i&&(this._checked=i,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const i=this.checked===!0?this.radio?!0:null:!0;this.checked=i;const r=new Event("change");this.dispatchEvent(r)}getValueForFormPublisher(){let i=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:i;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(i)||(i=[]);const r=i.slice(0),n=r.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&r.push(this.value),this.checked===null&&n!==-1&&r.splice(n,1),r}setFormValueFromPublisher(i){if(this.unique||this.radio){this.checked=this.value==i?!0:null;return}Array.isArray(i)||(i=[]),!this.checksAll()&&(this.checked=i.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const i=this.formDataProvider,r=this.getAttribute("name");return!i||!r?null:ye.get(i+"/"+r+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const i=this.getCheckAllPublisher();if(i&&(i.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const r=i.values.get().slice(0),n=r.indexOf(this.value);n!=-1&&(r.splice(n,1),i.values.set(r))}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 r=this.getCheckAllPublisher();r&&(r.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&r.hasCheckAll.set(!0),r.values.get()||r.values.set([]),this.checksAll()||r.values.set([...r.values.get(),this.value])),this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return Hr([h()],e.prototype,"value",1),Hr([h()],e.prototype,"forceAutoFill",2),Hr([h({type:Boolean})],e.prototype,"unique",2),Hr([h({type:Boolean})],e.prototype,"radio",2),Hr([h()],e.prototype,"checked",1),e};/**
73
76
  * @license
74
77
  * Copyright 2018 Google LLC
75
78
  * SPDX-License-Identifier: BSD-3-Clause
76
- */const k=e=>e??D,Wt=A`
79
+ */const te=t=>t??re,ss=ee`
77
80
  /*SIZES*/
78
81
  :host {
79
82
  --sc-_fs: 1rem;
@@ -106,15 +109,15 @@
106
109
  :host([size="inherit"]) {
107
110
  --sc-_fs: 1em;
108
111
  }
109
- `;var Za=Object.defineProperty,Xa=Object.getOwnPropertyDescriptor,q=(e,t,s,r)=>{for(var i=r>1?void 0:r?Xa(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Za(t,s,i),i};const Qa="sonic-button";let j=class extends Xi(Xe(it(C))){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(e){this._href=e;const t=this._href.toString();t&&t.indexOf("http")!=0?at.onChange(this):at.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(e){e.preventDefault(),at.changeFromComponent(this)}handleChange(e){if(!(e?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(e?.preventDefault(),e?.stopPropagation(),at.changeFromComponent(this)),this.hasAttribute("reset"))){const t=this.getAttribute("reset"),s=t?L.get(t):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(e){this.autoRepeat&&(this.handleChange(e),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(e){if(this.name){if(e?this.setAttribute("active","true"):this.removeAttribute("active"),e==this._checked)return;super.setCheckedValue(e)}}disconnectedCallback(){at.offChange(this),super.disconnectedCallback()}willUpdate(e){(e.has("href")||e.has("autoActive"))&&at.updateComponentActiveState(this),e.has("location")&&at.updateComponentActiveState(this)}render(){const e={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},t=v`
112
+ `;var Qc=Object.defineProperty,eh=Object.getOwnPropertyDescriptor,qe=(t,e,s,i)=>{for(var r=i>1?void 0:i?eh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Qc(e,s,r),r};const th="sonic-button";let Me=class extends Mn(br(nt(J))){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?ct.onChange(this):ct.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),ct.changeFromComponent(this)}handleChange(t){if(!(t?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(t?.preventDefault(),t?.stopPropagation(),ct.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(){ct.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&ct.updateComponentActiveState(this),t.has("location")&&ct.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=R`
110
113
  <button
111
114
  part="button"
112
115
  class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
113
- style=${wt(e)}
114
- aria-controls=${k(this.ariaControls)}
115
- aria-expanded=${k(this.sonicAriaExpanded)}
116
- aria-label=${k(this.ariaLabel)}
117
- aria-labelledby=${k(this.ariaLabelledby)}
116
+ style=${$t(t)}
117
+ aria-controls=${te(this.ariaControls)}
118
+ aria-expanded=${te(this.sonicAriaExpanded)}
119
+ aria-label=${te(this.ariaLabel)}
120
+ aria-labelledby=${te(this.ariaLabelledby)}
118
121
  ?disabled=${this.disabled}
119
122
  @click=${this.handleChange}
120
123
  @pointerdown=${this.handleRepeatStart}
@@ -130,17 +133,17 @@
130
133
  part="suffix"
131
134
  name="suffix"
132
135
  ></slot>
133
- ${this.loading==!0?v`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
136
+ ${this.loading==!0?R`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
134
137
  </button>
135
- `;return this.href?v`<a
138
+ `;return this.href?R`<a
136
139
  href="${this.href}"
137
- download=${k(this.download)}
138
- target=${k(this.target)}
139
- aria-label=${k(this.ariaLabel)}
140
- aria-labelledby=${k(this.ariaLabelledby)}
140
+ download=${te(this.download)}
141
+ target=${te(this.target)}
142
+ aria-label=${te(this.ariaLabel)}
143
+ aria-labelledby=${te(this.ariaLabelledby)}
141
144
  @click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
142
- >${t}</a
143
- >`:v`${t}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};j.styles=[Wt,A`
145
+ >${e}</a
146
+ >`:R`${e}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};Me.styles=[ss,ee`
144
147
  * {
145
148
  box-sizing: border-box;
146
149
  }
@@ -506,11 +509,11 @@
506
509
  transform: translate(-50%, -50%) rotate(359deg);
507
510
  }
508
511
  }
509
- `],q([a({type:String,reflect:!0})],j.prototype,"type",2),q([a({type:String,reflect:!0})],j.prototype,"variant",2),q([a({type:String,reflect:!0})],j.prototype,"size",2),q([a({type:String,reflect:!0})],j.prototype,"shape",2),q([a({type:String})],j.prototype,"direction",2),q([a({type:String,reflect:!0})],j.prototype,"alignItems",2),q([a({type:String})],j.prototype,"justify",2),q([a({type:String,reflect:!0})],j.prototype,"align",2),q([a({type:String})],j.prototype,"minWidth",2),q([a({type:Boolean,reflect:!0})],j.prototype,"icon",2),q([a({type:String})],j.prototype,"download",2),q([a({type:String})],j.prototype,"autoActive",2),q([a({type:Boolean,reflect:!0})],j.prototype,"loading",2),q([T()],j.prototype,"hasPrefix",2),q([T()],j.prototype,"hasSuffix",2),q([ps({flatten:!0,slot:"prefix"})],j.prototype,"prefixes",2),q([ps({flatten:!0,slot:"suffix"})],j.prototype,"suffixes",2),q([a({type:String})],j.prototype,"target",2),q([a({type:String})],j.prototype,"href",1),q([a({type:String})],j.prototype,"goBack",2),q([a({type:Boolean})],j.prototype,"pushState",2),q([a({type:Boolean,reflect:!0})],j.prototype,"active",2),q([a({type:Boolean,reflect:!0})],j.prototype,"autoRepeat",2),q([a({type:String,attribute:"data-aria-controls"})],j.prototype,"ariaControls",2),q([a({type:Boolean,attribute:"data-aria-expanded"})],j.prototype,"sonicAriaExpanded",2),q([T()],j.prototype,"location",2),j=q([$(Qa)],j);/**
512
+ `],qe([h({type:String,reflect:!0})],Me.prototype,"type",2),qe([h({type:String,reflect:!0})],Me.prototype,"variant",2),qe([h({type:String,reflect:!0})],Me.prototype,"size",2),qe([h({type:String,reflect:!0})],Me.prototype,"shape",2),qe([h({type:String})],Me.prototype,"direction",2),qe([h({type:String,reflect:!0})],Me.prototype,"alignItems",2),qe([h({type:String})],Me.prototype,"justify",2),qe([h({type:String,reflect:!0})],Me.prototype,"align",2),qe([h({type:String})],Me.prototype,"minWidth",2),qe([h({type:Boolean,reflect:!0})],Me.prototype,"icon",2),qe([h({type:String})],Me.prototype,"download",2),qe([h({type:String})],Me.prototype,"autoActive",2),qe([h({type:Boolean,reflect:!0})],Me.prototype,"loading",2),qe([Ae()],Me.prototype,"hasPrefix",2),qe([Ae()],Me.prototype,"hasSuffix",2),qe([Nr({flatten:!0,slot:"prefix"})],Me.prototype,"prefixes",2),qe([Nr({flatten:!0,slot:"suffix"})],Me.prototype,"suffixes",2),qe([h({type:String})],Me.prototype,"target",2),qe([h({type:String})],Me.prototype,"href",1),qe([h({type:String})],Me.prototype,"goBack",2),qe([h({type:Boolean})],Me.prototype,"pushState",2),qe([h({type:Boolean,reflect:!0})],Me.prototype,"active",2),qe([h({type:Boolean,reflect:!0})],Me.prototype,"autoRepeat",2),qe([h({type:String,attribute:"data-aria-controls"})],Me.prototype,"ariaControls",2),qe([h({type:Boolean,attribute:"data-aria-expanded"})],Me.prototype,"sonicAriaExpanded",2),qe([Ae()],Me.prototype,"location",2),Me=qe([X(th)],Me);/**
510
513
  * @license
511
514
  * Copyright 2017 Google LLC
512
515
  * SPDX-License-Identifier: BSD-3-Clause
513
- */const _n=(e,t,s)=>{const r=new Map;for(let i=t;i<=s;i++)r.set(e[i],i);return r},ni=fe(class extends Ye{constructor(e){if(super(e),e.type!==Ee.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,s){let r;s===void 0?s=t:t!==void 0&&(r=t);const i=[],n=[];let o=0;for(const l of e)i[o]=r?r(l,o):o,n[o]=s(l,o),o++;return{values:n,keys:i}}render(e,t,s){return this.dt(e,t,s).values}update(e,[t,s,r]){const i=ua(e),{values:n,keys:o}=this.dt(t,s,r);if(!Array.isArray(i))return this.ut=o,n;const l=this.ut??=[],c=[];let h,u,d=0,p=i.length-1,y=0,g=n.length-1;for(;d<=p&&y<=g;)if(i[d]===null)d++;else if(i[p]===null)p--;else if(l[d]===o[y])c[y]=Oe(i[d],n[y]),d++,y++;else if(l[p]===o[g])c[g]=Oe(i[p],n[g]),p--,g--;else if(l[d]===o[g])c[g]=Oe(i[d],n[g]),gs(e,c[g+1],i[d]),d++,g--;else if(l[p]===o[y])c[y]=Oe(i[p],n[y]),gs(e,i[d],i[p]),p--,y++;else if(h===void 0&&(h=_n(o,y,g),u=_n(l,d,p)),h.has(l[d]))if(h.has(l[p])){const b=u.get(o[y]),w=b!==void 0?i[b]:null;if(w===null){const E=gs(e,i[d]);Oe(E,n[y]),c[y]=E}else c[y]=Oe(w,n[y]),gs(e,i[d],w),i[b]=null;y++}else ji(i[p]),p--;else ji(i[d]),d++;for(;y<=g;){const b=gs(e,c[g+1]);Oe(b,n[y]),c[y++]=b}for(;d<=p;){const b=i[d++];b!==null&&ji(b)}return this.ut=o,da(e,c),Dt}}),Ja=new WeakMap;let xn=0;const Qi=new Map,Pn=new WeakSet,Cn=()=>new Promise((e=>requestAnimationFrame(e))),Sn=(e,t)=>{const s=e-t;return s===0?void 0:s},$n=(e,t)=>{const s=e/t;return s===1?void 0:s},Ji={left:(e,t)=>{const s=Sn(e,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(e,t)=>{const s=Sn(e,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(e,t)=>{let s;t===0&&(t=1,s={width:"1px"});const r=$n(e,t);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleX(${r})`}},height:(e,t)=>{let s;t===0&&(t=1,s={height:"1px"});const r=$n(e,t);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleY(${r})`}}},tl={duration:333,easing:"ease-in-out"},el=["left","top","width","height","opacity","color","background"],An=new WeakMap;class sl extends zi{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===Ee.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((t=>{this.l=t}))}async resolveFinished(){this.l?.(),this.l=void 0}render(t){return D}getController(){return Ja.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(t,[s]){const r=this.u===void 0;return r&&(this.u=t.options?.host,this.u.addController(this),this.u.updateComplete.then((i=>this.t=!0)),this.element=t.element,An.set(this.element,this)),this.optionsOrCallback=s,(r||typeof s!="function")&&this.p(s),this.render(s)}p(t){t=t??{};const s=this.getController();s!==void 0&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??=el,this.options=t}m(){const t={},s=this.element.getBoundingClientRect(),r=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const n=s[i]??(Ji[i]?void 0:r[i]),o=Number(n);t[i]=isNaN(o)?n+"":o})),t}v(){let t,s=!0;return this.options.guard&&(t=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})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),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 t;this.prepare(),await Cn;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]),t=this.calculateKeyframes(n,o)}else{const n=Qi.get(this.options.inId);if(n){Qi.delete(this.options.inId);const{from:o,to:l}=this.N(n,i,s);t=this.calculateKeyframes(o,l),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,xn++,t.forEach((c=>c.zIndex=xn))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,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&&Qi.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Cn(),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 t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(t){t&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let s=this.element.parentNode;s;s=s?.parentNode){const r=An.get(s);r&&!r.isDisabled()&&r&&t.push(r)}return t}get isHostRendered(){const t=Pn.has(this.u);return t||this.u.updateComplete.then((()=>{Pn.add(this.u)})),t}j(t,s=this.O()){const r={...tl};return s.forEach((i=>Object.assign(r,i.options.keyframeOptions))),Object.assign(r,t),r}N(t,s,r){t={...t},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)})),t.left!==void 0&&s.left!==void 0&&(t.left=n*t.left,s.left=n*s.left),t.top!==void 0&&s.top!==void 0&&(t.top=o*t.top,s.top=o*s.top)),{from:t,to:s}}calculateKeyframes(t,s,r=!1){const i={},n={};let o=!1;const l={};for(const c in s){const h=t[c],u=s[c];if(c in Ji){const d=Ji[c];if(h===void 0||u===void 0)continue;const p=d(h,u);p.transform!==void 0&&(l[c]=p.value,o=!0,i.transform=`${i.transform??""} ${p.transform}`,p.overrideFrom!==void 0&&Object.assign(i,p.overrideFrom))}else h!==u&&h!==void 0&&u!==void 0&&(o=!0,i[c]=h,n[c]=u)}return i.transformOrigin=n.transformOrigin=r?"center center":"top left",this.animatingProperties=l,o?[i,n]:void 0}async animate(t,s=this.options.keyframeOptions){this.start(),this.frames=t;let r=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,s]),r=!0,this.webAnimation=this.element.animate(t,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(t,s){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,s)}}const il=fe(sl),rl={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">
516
+ */const oa=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},Ii=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;s===void 0?s=e:e!==void 0&&(i=e);const r=[],n=[];let o=0;for(const c of t)r[o]=i?i(c,o):o,n[o]=s(c,o),o++;return{values:n,keys:r}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){const r=Ql(t),{values:n,keys:o}=this.dt(e,s,i);if(!Array.isArray(r))return this.ut=o,n;const c=this.ut??=[],d=[];let m,k,g=0,f=r.length-1,A=0,E=n.length-1;for(;g<=f&&A<=E;)if(r[g]===null)g++;else if(r[f]===null)f--;else if(c[g]===o[A])d[A]=Ks(r[g],n[A]),g++,A++;else if(c[f]===o[E])d[E]=Ks(r[f],n[E]),f--,E--;else if(c[g]===o[E])d[E]=Ks(r[g],n[E]),Rr(t,d[E+1],r[g]),g++,E--;else if(c[f]===o[A])d[A]=Ks(r[f],n[A]),Rr(t,r[g],r[f]),f--,A++;else if(m===void 0&&(m=oa(o,A,E),k=oa(c,g,f)),m.has(c[g]))if(m.has(c[f])){const O=k.get(o[A]),I=O!==void 0?r[O]:null;if(I===null){const U=Rr(t,r[g]);Ks(U,n[A]),d[A]=U}else d[A]=Ks(I,n[A]),Rr(t,r[g],I),r[O]=null;A++}else wn(r[f]),f--;else wn(r[g]),g++;for(;A<=E;){const O=Rr(t,d[E+1]);Ks(O,n[A]),d[A++]=O}for(;g<=f;){const O=r[g++];O!==null&&wn(O)}return this.ut=o,Xl(t,d),It}}),sh=new WeakMap;let aa=0;const Nn=new Map,la=new WeakSet,ca=()=>new Promise((t=>requestAnimationFrame(t))),ha=(t,e)=>{const s=t-e;return s===0?void 0:s},ua=(t,e)=>{const s=t/e;return s===1?void 0:s},In={left:(t,e)=>{const s=ha(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=ha(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 i=ua(t,e);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(t,e)=>{let s;e===0&&(e=1,s={height:"1px"});const i=ua(t,e);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},rh={duration:333,easing:"ease-in-out"},ih=["left","top","width","height","opacity","color","background"],da=new WeakMap;class nh extends _n{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Ys.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 re}getController(){return sh.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[s]){const i=this.u===void 0;return i&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((r=>this.t=!0)),this.element=e.element,da.set(this.element,this)),this.optionsOrCallback=s,(i||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??=ih,this.options=e}m(){const e={},s=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((r=>{const n=s[r]??(In[r]?void 0:i[r]),o=Number(n);e[r]=isNaN(o)?n+"":o})),e}v(){let e,s=!0;return this.options.guard&&(e=this.options.guard(),s=((i,r)=>{if(Array.isArray(i)){if(Array.isArray(r)&&r.length===i.length&&i.every(((n,o)=>n===r[o])))return!1}else if(r===i)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 ca;const s=this.O(),i=this.j(this.options.keyframeOptions,s),r=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,r,s);this.log("measured",[this.A,r,n,o]),e=this.calculateKeyframes(n,o)}else{const n=Nn.get(this.options.inId);if(n){Nn.delete(this.options.inId);const{from:o,to:c}=this.N(n,r,s);e=this.calculateKeyframes(o,c),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,aa++,e.forEach((d=>d.zIndex=aa))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,i)}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&&Nn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ca(),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 i=this.m();this.log("stabilizing out");const r=this.A.left-i.left,n=this.A.top-i.top;getComputedStyle(this.element).position!=="static"||r===0&&n===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"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 i=da.get(s);i&&!i.isDisabled()&&i&&e.push(i)}return e}get isHostRendered(){const e=la.has(this.u);return e||this.u.updateComplete.then((()=>{la.add(this.u)})),e}j(e,s=this.O()){const i={...rh};return s.forEach((r=>Object.assign(i,r.options.keyframeOptions))),Object.assign(i,e),i}N(e,s,i){e={...e},s={...s};const r=i.map((c=>c.animatingProperties)).filter((c=>c!==void 0));let n=1,o=1;return r.length>0&&(r.forEach((c=>{c.width&&(n/=c.width),c.height&&(o/=c.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,i=!1){const r={},n={};let o=!1;const c={};for(const d in s){const m=e[d],k=s[d];if(d in In){const g=In[d];if(m===void 0||k===void 0)continue;const f=g(m,k);f.transform!==void 0&&(c[d]=f.value,o=!0,r.transform=`${r.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(r,f.overrideFrom))}else m!==k&&m!==void 0&&k!==void 0&&(o=!0,r[d]=m,n[d]=k)}return r.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=c,o?[r,n]:void 0}async animate(e,s=this.options.keyframeOptions){this.start(),this.frames=e;let i=!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]),i=!0,this.webAnimation=this.element.animate(e,s);const r=this.getController();r?.add(this);try{await this.webAnimation.finished}catch{}r?.remove(this)}return this.didFinish(i),i}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,s){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,s)}}const oh=$s(nh),ah={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">
514
517
  <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"/>
515
518
  </svg>
516
519
  `,"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">
@@ -546,7 +549,7 @@
546
549
  <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
547
550
  <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"/>
548
551
  </svg>
549
- `}},oi=new Map,kn={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 nl(e){let t=e.customLibraryPath,s=e.customLibraryDefaultPrefix;if(t==null){const r=document.querySelector("[customIconLibraryPath]");t=r?.getAttribute("customIconLibraryPath")??"",s==null&&(s=r?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:t||"",defaultPrefix:s||""}}function ol(e,t){return e in kn?e!=="custom"?kn[e]:nl(t):null}const Dn=sessionStorage.getItem("sonicIconsCache"),re=Dn?JSON.parse(Dn):{icons:{},names:[]},al=100,Mr=class Mr{};Mr.default={get:async t=>{const s=t.library;if(!t.name)return"";const r=t.name,i=rl;if(!s)return U(i.core[t.name]||"");const n=ol(s,t);if(n){if(s==="custom"&&!n.url)return"";const o=t.prefix||n.defaultPrefix||"",l=i[s]||{};i[s]=l;const c=s==="custom"?`${n.url}|${o}-${r}`:`${o}-${r}`;if(l[c])return U(l[c]);const h=(n.url||"").replace("$prefix",o).replace("$name",r);if(re.icons[h]){const d=re.icons[h];if(/^\s*<svg[\s>]/i.test(d||""))return l[c]=d,U(d);delete re.icons[h]}if(!oi.has(h)){const d=new Promise(async p=>{try{const y=await fetch(h);if(!y.ok){p("");return}try{const g=y.headers.get("content-type")||"";if(!g.includes("image/svg+xml")&&!g.includes("svg")){p("");return}const b=await y.text(),w=/^\s*<svg[\s>]/i.test(b);p(w?b:"")}catch{p("")}}catch{ga(),p("")}});oi.set(h,d)}const u=await oi.get(h);if(oi.delete(h),l[c]=u||"",u&&/^\s*<svg[\s>]/i.test(u)&&(re.icons[h]=u,re.names.push(h)),re.names.length>al){const d=re.names.shift();delete re.icons[d]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(re)),u?U(u):""}return U(i.core[t.name]||"")}};let tr=Mr;function ll(e){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(e)}function cl(e){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(e)}function hl(e){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(e)}function Ie(e){if(e.__is__setSubscribable__)return;e.__is__setSubscribable__=!0,e.__onBeforeConnected__=ll,e.__onConnected__=cl,e.__onDisconnected__=hl;const t=e.connectedCallback;e.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(r=>r(this)),t?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(r=>r(this))};const s=e.disconnectedCallback;e.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(r=>r(this))}}function dl(e){return e.trim().replace(/^this\./,"")}function er(e,t){if(!t)return;const s=t.split(".").filter(Boolean);if(s.length===0)return;let r=e;for(const i of s){if(r==null||typeof r!="object")return;r=r[i]}return r}function ul(e,t){return!!(e==null||t?.skipEmptyPlaceholder&&e==="")}function Ct(e,t,s){let r=!1;const i=(l,c)=>{const h=dl(c),u=er(e,h);return ul(u,s)?(r=!0,""):`${u}`},n=t.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 Lt(e){const t=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const r of t){let i;for(;(i=r.exec(e))!==null;){const n=(i[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function On(e){return typeof e=="object"&&e!==null&&"path"in e&&typeof e.path=="string"}const Ps=new WeakMap,Cs=new Set;let ts=null;const pl=8;function fl(e){let t=Ps.get(e);return t||(t=new Map,Ps.set(e,t)),t}function ml(e,t){const s=new Set;for(const[r,i]of t){const n=er(e,r);Object.is(i.lastValue,n)||(i.lastValue=n,i.onChangeHandlers.forEach(o=>s.add(o)))}return s}function bl(){ts=null;let e=0,t=!0;for(;t&&e<pl;){t=!1,e+=1;for(const s of Cs){const r=Ps.get(s);if(!r||r.size===0)continue;const i=ml(s,r);i.size!==0&&(t=!0,i.forEach(n=>n()))}}t&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),Cs.size>0&&En()}function En(){ts===null&&(ts=requestAnimationFrame(bl))}function gl(){Cs.size===0&&ts!==null&&(cancelAnimationFrame(ts),ts=null)}function be(e,t,s,r,i){const n=String(r),o=fl(s);let l=o.get(n);return l||(l={lastValue:er(s,n),onChangeHandlers:new Set},o.set(n,l)),l.onChangeHandlers.add(i),Cs.add(s),En(),()=>{const c=Ps.get(s);if(!c)return;const h=c.get(n);h&&(h.onChangeHandlers.delete(i),h.onChangeHandlers.size===0&&c.delete(n),c.size===0&&(Ps.delete(s),Cs.delete(s),gl()))}}const ai={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},Ln={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},ge={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},Tn={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function zt(e){const t=e.split(".").filter(i=>i.length>0);if(t.length===0)return null;const s=t.shift()||"";if(!s)return null;let r=L.get(s);return r?(r=_s.traverse(r,t),r):null}function vl(e,t){const s=t?.reflect??!1,r={skipEmptyPlaceholder:t?.skipEmptyPlaceholder},i=Lt(e),n=i.length>0;return function(o,l){if(!o)return;Ie(o);const c=`__bind_state_${l}`,h=`__bind_${l}_publisher__`,u=s?`__bind_${l}_updating_from_publisher__`:null;if(s){const d=Object.getOwnPropertyDescriptor(o,l),p=`__bind_${l}_value__`,y=`__bind_${l}_updating_from_publisher__`,g=d&&!d.get&&!d.set?d.value:void 0;Object.defineProperty(o,l,{get(){return d?.get?d.get.call(this):(!Object.prototype.hasOwnProperty.call(this,p)&&g!==void 0&&(this[p]=g),this[p])},set(b){d?.set?d.set.call(this,b):this[p]=b,!this[y]&&this[h]&&this[h].set(b)},enumerable:d?.enumerable??!0,configurable:d?.configurable??!0})}o.__onConnected__(d=>{const p=d[c]||(d[c]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});p.unsubscribePublisher&&(p.unsubscribePublisher(),p.unsubscribePublisher=null),p.cleanupWatchers.forEach(b=>b()),p.cleanupWatchers=[],p.currentPath=null;const y=b=>{if(!b){p.unsubscribePublisher&&(p.unsubscribePublisher(),p.unsubscribePublisher=null),p.currentPath=null,d[h]=null;return}if(b===p.currentPath)return;p.unsubscribePublisher&&(p.unsubscribePublisher(),p.unsubscribePublisher=null);const w=zt(b);if(!w){p.currentPath=null,d[h]=null;return}const E=f=>{s&&u&&(d[u]=!0),d[l]=f,s&&u&&(d[u]=!1)};w.onAssign(E),p.unsubscribePublisher=()=>{w.offAssign(E),d[h]===w&&(d[h]=null)},p.currentPath=b,d[h]=w},g=()=>{if(n){const b=Ct(d,e,r);if(!b.ready){y(null);return}y(b.path);return}y(e)};if(n)for(const b of i){const w=be(ai.watcherStore,ai.hooked,d,b,()=>g());p.cleanupWatchers.push(w)}g()}),o.__onDisconnected__(d=>{const p=d[c];p&&(p.unsubscribePublisher&&(p.unsubscribePublisher(),p.unsubscribePublisher=null),p.cleanupWatchers.forEach(y=>y()),p.cleanupWatchers=[],p.currentPath=null,d[h]=null)})}}function In(e,t){const s=On(e)?e.path:e;return vl(s,t)}function Mn(e,t){const s=e.path,r={skipEmptyPlaceholder:t?.skipEmptyPlaceholder},i=Lt(s);return function(n,o){Ie(n);const l=`__publish_${o}_publisher__`,c=`__publish_${o}_value__`,h=Object.getOwnPropertyDescriptor(n,o),u=h&&!h.get&&!h.set?h.value:void 0;Object.defineProperty(n,o,{get(){return h?.get?h.get.call(this):(!Object.prototype.hasOwnProperty.call(this,c)&&u!==void 0&&(this[c]=u),this[c])},set(d){h?.set?h.set.call(this,d):this[c]=d;const p=this[l];p&&p.set(d)},enumerable:h?.enumerable??!0,configurable:h?.configurable??!0}),n.__onConnected__(d=>{const p=d,y=`__publish_state_${o}`,g=p[y]||(p[y]={cleanupWatchers:[]}),b=()=>{let w;if(i.length){const f=Ct(d,s,r);w=f.ready?f.path:null}else w=s;const E=w?zt(w):void 0;if(p[l]=E??null,E&&o in d){const f=p[o];f!==void 0&&E.set(f)}};if(g.cleanupWatchers.forEach(w=>w()),g.cleanupWatchers=[],i.length)for(const w of i)g.cleanupWatchers.push(be(Ln.watcherStore,Ln.hooked,p,w,b));b()}),n.__onDisconnected__(d=>{const p=d,y=`__publish_state_${o}`,g=p[y];g?.cleanupWatchers&&g.cleanupWatchers.forEach(b=>b()),p[l]=void 0})}}function Nn(e){return In(e)}const yl={nullish:e=>e==null,emptyString:e=>e==="",emptyObject:e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.keys(e).length===0,emptyArray:e=>Array.isArray(e)&&e.length===0};function wl(e,t){return t.some(s=>yl[s](e))}function _l(e,t,s){if(!s.dispatchWhenUndefined&&e.slice(0,t).filter(i=>i!=null).length!==t)return!1;if(s.skip&&s.skip.length>0){for(let r=0;r<t;r++)if(wl(e[r],s.skip))return!1}return!0}function xl(...e){return Rn({},e)}function Rn(e,t){const s=t.map(i=>{const n=Lt(i);return{originalPath:i,dynamicDependencies:n,isDynamic:n.length>0}}),r={skipEmptyPlaceholder:e.skipEmptyPlaceholder};return function(i,n,o){Ie(i);const l=`__onAssign_state_${n}__`;let c;i.__onConnected__(h=>{const u=h[l]||(h[l]={cleanupWatchers:[],configurations:[]});u.cleanupWatchers.forEach(b=>b()),u.cleanupWatchers=[],u.configurations.forEach(b=>{b.unsubscribePublisher&&b.unsubscribePublisher()}),u.configurations=[];const d=[],p=[];for(let b=0;b<t.length;b++){const w=s[b],E=new Set,f=m=>{d[b]=m,_l(d,t.length,e)&&E.forEach(_=>_(...d))};p.push({publisher:null,onAssign:f,callbacks:E,unsubscribePublisher:null,pathConfig:w,index:b})}const y=(b,w)=>{if(b.unsubscribePublisher&&(b.unsubscribePublisher(),b.unsubscribePublisher=null),d[b.index]=null,b.publisher=null,!w)return;const E=zt(w);E&&(E.onAssign(b.onAssign),b.unsubscribePublisher=()=>{E.offAssign(b.onAssign),b.publisher===E&&(b.publisher=null)},b.publisher=E)},g=()=>{for(const b of p)if(b.pathConfig.isDynamic){const w=Ct(h,b.pathConfig.originalPath,r);if(!w.ready){y(b,null);continue}y(b,w.path)}else y(b,b.pathConfig.originalPath)};for(const b of p)if(b.pathConfig.isDynamic)for(const w of b.pathConfig.dynamicDependencies){const E=be(Tn.watcherStore,Tn.hooked,h,w,()=>g());u.cleanupWatchers.push(E)}c=o.value.bind(h);for(const b of p)b.callbacks.add(c);g(),u.configurations=p}),i.__onDisconnected__(h=>{const u=h[l];u&&(u.cleanupWatchers.forEach(d=>d()),u.cleanupWatchers=[],u.configurations.forEach(d=>{d.unsubscribePublisher&&d.unsubscribePublisher(),d.callbacks.delete(c)}),u.configurations=[])})}}function Pl(e){return Object.prototype.toString.call(e)==="[object DataProviderKey]"}function Cl(...e){const t=e[e.length-1],s=t!==void 0&&!Pl(t),r=s?t:{},n=(s?e.slice(0,-1):e).map(o=>o.path);return Rn({dispatchWhenUndefined:!r.waitForAllDefined,skip:r.skip,skipEmptyPlaceholder:r.skipEmptyPlaceholder},n)}function Sl(){return function(e,t,s){let r=0;const i=s.value,n=e.constructor.prototype.disconnectedCallback;e.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=e.connectedCallback;e.connectedCallback=function(){o?.call(this),this[t]()},s.value=function(...l){let c=new Set;const h=()=>{r++;const d=r;window.queueMicrotask(()=>{d===r&&this[t]()})};c.forEach(d=>{d.offAssign(h)}),Hr();const u=i.apply(this,l);return c=qr()||new Set,c.forEach(d=>{d.onAssign(h,!1)}),this.__removeAutoSubscribe__=()=>{c.forEach(d=>{d.offAssign(h)})},u}}}function $l(e){return function(t){Ie(t);for(const s of e){const r=s.split(".");if(r.length===0)continue;const i=r.shift()||"";let n=L.get(i);n=_s.traverse(n,r),t.__onConnected__(o=>{n.startTemplateFilling(o)}),t.__onDisconnected__(()=>{})}}}function Al(e){const t=[];let s=e;for(;s;)s instanceof Element&&t.push(s),s=s.parentNode||(s.host??null);return t}function kl(e,t){const s=[];let r=!1;const i=G.scopeAttributeNames(e.attributeName),n=()=>{for(const o of s)o.disconnect();if(s.length=0,!r)for(const o of Al(e.component)){const l=new MutationObserver(c=>{r||(c.some(h=>h.type==="childList")&&n(),t())});l.observe(o,{attributes:!0,attributeFilter:i,childList:!0,subtree:!1}),s.push(l)}};return n(),()=>{r=!0;for(const o of s)o.disconnect();s.length=0}}function Fn(e,t,s,r){const i=e,n=G.getAncestorAttributeValue(e,t);!r.assignNull&&n===null||Object.is(i[s],n)||(i[s]=n)}const K=class K{static subscribe(t,s,r,i={assignNull:!0}){const n={component:t,attributeName:s,propertyKey:r,syncOptions:i,disconnectObservers:null};return n.disconnectObservers=kl(n,()=>{K.subscriptions.has(n)&&(K.pendingRefresh.add(n),K.scheduleRefresh())}),K.subscriptions.add(n),()=>{K.unsubscribe(n)}}static unsubscribe(t){K.subscriptions.has(t)&&(t.disconnectObservers?.(),t.disconnectObservers=null,K.subscriptions.delete(t),K.pendingRefresh.delete(t),K.subscriptions.size===0&&K.cancelScheduledRefresh())}static scheduleRefresh(){K.pendingRefresh.size!==0&&K.animationFrameId===null&&(K.animationFrameId=requestAnimationFrame(()=>{K.flushRefresh()}))}static cancelScheduledRefresh(){K.animationFrameId!==null&&(cancelAnimationFrame(K.animationFrameId),K.animationFrameId=null),K.pendingRefresh.clear()}static flushRefresh(){K.animationFrameId=null;const t=Array.from(K.pendingRefresh);K.pendingRefresh.clear();for(const s of t)K.subscriptions.has(s)&&s.component.isConnected&&Fn(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};K.subscriptions=new Set,K.pendingRefresh=new Set,K.animationFrameId=null;let sr=K;function ir(e,t){const s=t?.dynamic??!1,r=s;return function(i,n){if(!i||(Ie(i),i.__onBeforeConnected__(l=>{Fn(l,e,n,{assignNull:r})}),!s))return;let o=null;i.__onConnected__(l=>{o=sr.subscribe(l,e,n,{assignNull:!0})}),i.__onDisconnected__(()=>{o?.(),o=null})}}var Dl=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,Me=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ol(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Dl(t,s,i),i};const rr=e=>a(e),El="sonic-icon";let ne=class extends C{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await tr.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(e){(e.has("name")||e.has("prefix")||e.has("library")||this.library==="custom"&&(e.has("customIconLibraryPath")||e.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(e)}render(){return this.iconText?this.iconText:D}};ne.styles=A`
552
+ `}},Fi=new Map,pa={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 lh(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const i=document.querySelector("[customIconLibraryPath]");e=i?.getAttribute("customIconLibraryPath")??"",s==null&&(s=i?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function ch(t,e){return t in pa?t!=="custom"?pa[t]:lh(e):null}const fa=sessionStorage.getItem("sonicIconsCache"),bs=fa?JSON.parse(fa):{icons:{},names:[]},hh=100,yo=class yo{};yo.default={get:async e=>{const s=e.library;if(!e.name)return"";const i=e.name,r=ah;if(!s)return je(r.core[e.name]||"");const n=ch(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",c=r[s]||{};r[s]=c;const d=s==="custom"?`${n.url}|${o}-${i}`:`${o}-${i}`;if(c[d])return je(c[d]);const m=(n.url||"").replace("$prefix",o).replace("$name",i);if(bs.icons[m]){const g=bs.icons[m];if(/^\s*<svg[\s>]/i.test(g||""))return c[d]=g,je(g);delete bs.icons[m]}if(!Fi.has(m)){const g=new Promise(async f=>{try{const A=await fetch(m);if(!A.ok){f("");return}try{const E=A.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const O=await A.text(),I=/^\s*<svg[\s>]/i.test(O);f(I?O:"")}catch{f("")}}catch{ic(),f("")}});Fi.set(m,g)}const k=await Fi.get(m);if(Fi.delete(m),c[d]=k||"",k&&/^\s*<svg[\s>]/i.test(k)&&(bs.icons[m]=k,bs.names.push(m)),bs.names.length>hh){const g=bs.names.shift();delete bs.icons[g]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(bs)),k?je(k):""}return je(r.core[e.name]||"")}};let Fn=yo;function uh(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function dh(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function ph(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Js(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=uh,t.__onConnected__=dh,t.__onDisconnected__=ph;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(i=>i(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(i=>i(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(i=>i(this))}}function fh(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 i=t;for(const r of s){if(i==null||typeof i!="object")return;i=i[r]}return i}function gh(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Ot(t,e,s){let i=!1;const r=(c,d)=>{const m=fh(d),k=jn(t,m);return gh(k,s)?(i=!0,""):`${k}`},n=e.replace(/\$\{([^}]+)\}/g,r).replace(/\{\$([^}]+)\}/g,r).trim();if(i||!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 Ut(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const i of e){let r;for(;(r=i.exec(t))!==null;){const n=(r[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function ga(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const Wr=new WeakMap,Kr=new Set;let yr=null;const bh=8;function mh(t){let e=Wr.get(t);return e||(e=new Map,Wr.set(t,e)),e}function vh(t,e){const s=new Set;for(const[i,r]of e){const n=jn(t,i);Object.is(r.lastValue,n)||(r.lastValue=n,r.onChangeHandlers.forEach(o=>s.add(o)))}return s}function yh(){yr=null;let t=0,e=!0;for(;e&&t<bh;){e=!1,t+=1;for(const s of Kr){const i=Wr.get(s);if(!i||i.size===0)continue;const r=vh(s,i);r.size!==0&&(e=!0,r.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),Kr.size>0&&ba()}function ba(){yr===null&&(yr=requestAnimationFrame(yh))}function wh(){Kr.size===0&&yr!==null&&(cancelAnimationFrame(yr),yr=null)}function Es(t,e,s,i,r){const n=String(i),o=mh(s);let c=o.get(n);return c||(c={lastValue:jn(s,n),onChangeHandlers:new Set},o.set(n,c)),c.onChangeHandlers.add(r),Kr.add(s),ba(),()=>{const d=Wr.get(s);if(!d)return;const m=d.get(n);m&&(m.onChangeHandlers.delete(r),m.onChangeHandlers.size===0&&d.delete(n),d.size===0&&(Wr.delete(s),Kr.delete(s),wh()))}}const ji={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},ma={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Os={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},va={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function Gt(t){const e=t.split(".").filter(r=>r.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let i=ye.get(s);return i?(i=Br.traverse(i,e),i):null}function _h(t,e){const s=e?.reflect??!1,i={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},r=Ut(t),n=r.length>0;return function(o,c){if(!o)return;Js(o);const d=`__bind_state_${c}`,m=`__bind_${c}_publisher__`,k=s?`__bind_${c}_updating_from_publisher__`:null;if(s){const g=Object.getOwnPropertyDescriptor(o,c),f=`__bind_${c}_value__`,A=`__bind_${c}_updating_from_publisher__`,E=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(o,c,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(O){g?.set?g.set.call(this,O):this[f]=O,!this[A]&&this[m]&&this[m].set(O)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0})}o.__onConnected__(g=>{const f=g[d]||(g[d]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(O=>O()),f.cleanupWatchers=[],f.currentPath=null;const A=O=>{if(!O){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,g[m]=null;return}if(O===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const I=Gt(O);if(!I){f.currentPath=null,g[m]=null;return}const U=x=>{s&&k&&(g[k]=!0),g[c]=x,s&&k&&(g[k]=!1)};I.onAssign(U),f.unsubscribePublisher=()=>{I.offAssign(U),g[m]===I&&(g[m]=null)},f.currentPath=O,g[m]=I},E=()=>{if(n){const O=Ot(g,t,i);if(!O.ready){A(null);return}A(O.path);return}A(t)};if(n)for(const O of r){const I=Es(ji.watcherStore,ji.hooked,g,O,()=>E());f.cleanupWatchers.push(I)}E()}),o.__onDisconnected__(g=>{const f=g[d];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(A=>A()),f.cleanupWatchers=[],f.currentPath=null,g[m]=null)})}}function ya(t,e){const s=ga(t)?t.path:t;return _h(s,e)}function wa(t,e){const s=t.path,i={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},r=Ut(s);return function(n,o){Js(n);const c=`__publish_${o}_publisher__`,d=`__publish_${o}_value__`,m=Object.getOwnPropertyDescriptor(n,o),k=m&&!m.get&&!m.set?m.value:void 0;Object.defineProperty(n,o,{get(){return m?.get?m.get.call(this):(!Object.prototype.hasOwnProperty.call(this,d)&&k!==void 0&&(this[d]=k),this[d])},set(g){m?.set?m.set.call(this,g):this[d]=g;const f=this[c];f&&f.set(g)},enumerable:m?.enumerable??!0,configurable:m?.configurable??!0}),n.__onConnected__(g=>{const f=g,A=`__publish_state_${o}`,E=f[A]||(f[A]={cleanupWatchers:[]}),O=()=>{let I;if(r.length){const x=Ot(g,s,i);I=x.ready?x.path:null}else I=s;const U=I?Gt(I):void 0;if(f[c]=U??null,U&&o in g){const x=f[o];x!==void 0&&U.set(x)}};if(E.cleanupWatchers.forEach(I=>I()),E.cleanupWatchers=[],r.length)for(const I of r)E.cleanupWatchers.push(Es(ma.watcherStore,ma.hooked,f,I,O));O()}),n.__onDisconnected__(g=>{const f=g,A=`__publish_state_${o}`,E=f[A];E?.cleanupWatchers&&E.cleanupWatchers.forEach(O=>O()),f[c]=void 0})}}function _a(t){return ya(t)}const xh={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 Ph(t,e){return e.some(s=>xh[s](t))}function Sh(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(r=>r!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let i=0;i<e;i++)if(Ph(t[i],s.skip))return!1}return!0}function Ah(...t){return xa({},t)}function xa(t,e){const s=e.map(r=>{const n=Ut(r);return{originalPath:r,dynamicDependencies:n,isDynamic:n.length>0}}),i={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(r,n,o){Js(r);const c=`__onAssign_state_${n}__`;let d;r.__onConnected__(m=>{const k=m[c]||(m[c]={cleanupWatchers:[],configurations:[]});k.cleanupWatchers.forEach(O=>O()),k.cleanupWatchers=[],k.configurations.forEach(O=>{O.unsubscribePublisher&&O.unsubscribePublisher()}),k.configurations=[];const g=[],f=[];for(let O=0;O<e.length;O++){const I=s[O],U=new Set,x=y=>{g[O]=y,Sh(g,e.length,t)&&U.forEach(N=>N(...g))};f.push({publisher:null,onAssign:x,callbacks:U,unsubscribePublisher:null,pathConfig:I,index:O})}const A=(O,I)=>{if(O.unsubscribePublisher&&(O.unsubscribePublisher(),O.unsubscribePublisher=null),g[O.index]=null,O.publisher=null,!I)return;const U=Gt(I);U&&(U.onAssign(O.onAssign),O.unsubscribePublisher=()=>{U.offAssign(O.onAssign),O.publisher===U&&(O.publisher=null)},O.publisher=U)},E=()=>{for(const O of f)if(O.pathConfig.isDynamic){const I=Ot(m,O.pathConfig.originalPath,i);if(!I.ready){A(O,null);continue}A(O,I.path)}else A(O,O.pathConfig.originalPath)};for(const O of f)if(O.pathConfig.isDynamic)for(const I of O.pathConfig.dynamicDependencies){const U=Es(va.watcherStore,va.hooked,m,I,()=>E());k.cleanupWatchers.push(U)}d=o.value.bind(m);for(const O of f)O.callbacks.add(d);E(),k.configurations=f}),r.__onDisconnected__(m=>{const k=m[c];k&&(k.cleanupWatchers.forEach(g=>g()),k.cleanupWatchers=[],k.configurations.forEach(g=>{g.unsubscribePublisher&&g.unsubscribePublisher(),g.callbacks.delete(d)}),k.configurations=[])})}}function Ch(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function kh(...t){const e=t[t.length-1],s=e!==void 0&&!Ch(e),i=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return xa({dispatchWhenUndefined:!i.waitForAllDefined,skip:i.skip,skipEmptyPlaceholder:i.skipEmptyPlaceholder},n)}function $h(){return function(t,e,s){let i=0;const r=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(...c){let d=new Set;const m=()=>{i++;const g=i;window.queueMicrotask(()=>{g===i&&this[e]()})};d.forEach(g=>{g.offAssign(m)}),Ao();const k=r.apply(this,c);return d=Co()||new Set,d.forEach(g=>{g.onAssign(m,!1)}),this.__removeAutoSubscribe__=()=>{d.forEach(g=>{g.offAssign(m)})},k}}}function Dh(t){return function(e){Js(e);for(const s of t){const i=s.split(".");if(i.length===0)continue;const r=i.shift()||"";let n=ye.get(r);n=Br.traverse(n,i),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function Eh(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function Oh(t,e){const s=[];let i=!1;const r=Ke.scopeAttributeNames(t.attributeName),n=()=>{for(const o of s)o.disconnect();if(s.length=0,!i)for(const o of Eh(t.component)){const c=new MutationObserver(d=>{i||(d.some(m=>m.type==="childList")&&n(),e())});c.observe(o,{attributes:!0,attributeFilter:r,childList:!0,subtree:!1}),s.push(c)}};return n(),()=>{i=!0;for(const o of s)o.disconnect();s.length=0}}function Pa(t,e,s,i){const r=t,n=Ke.getAncestorAttributeValue(t,e);!i.assignNull&&n===null||Object.is(r[s],n)||(r[s]=n)}const Be=class Be{static subscribe(e,s,i,r={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:i,syncOptions:r,disconnectObservers:null};return n.disconnectObservers=Oh(n,()=>{Be.subscriptions.has(n)&&(Be.pendingRefresh.add(n),Be.scheduleRefresh())}),Be.subscriptions.add(n),()=>{Be.unsubscribe(n)}}static unsubscribe(e){Be.subscriptions.has(e)&&(e.disconnectObservers?.(),e.disconnectObservers=null,Be.subscriptions.delete(e),Be.pendingRefresh.delete(e),Be.subscriptions.size===0&&Be.cancelScheduledRefresh())}static scheduleRefresh(){Be.pendingRefresh.size!==0&&Be.animationFrameId===null&&(Be.animationFrameId=requestAnimationFrame(()=>{Be.flushRefresh()}))}static cancelScheduledRefresh(){Be.animationFrameId!==null&&(cancelAnimationFrame(Be.animationFrameId),Be.animationFrameId=null),Be.pendingRefresh.clear()}static flushRefresh(){Be.animationFrameId=null;const e=Array.from(Be.pendingRefresh);Be.pendingRefresh.clear();for(const s of e)Be.subscriptions.has(s)&&s.component.isConnected&&Pa(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};Be.subscriptions=new Set,Be.pendingRefresh=new Set,Be.animationFrameId=null;let Rn=Be;function zn(t,e){const s=e?.dynamic??!1,i=s;return function(r,n){if(!r||(Js(r),r.__onBeforeConnected__(c=>{Pa(c,t,n,{assignNull:i})}),!s))return;let o=null;r.__onConnected__(c=>{o=Rn.subscribe(c,t,n,{assignNull:!0})}),r.__onDisconnected__(()=>{o?.(),o=null})}}var Th=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,Xs=(t,e,s,i)=>{for(var r=i>1?void 0:i?Lh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Th(e,s,r),r};const Un=t=>h(t),Mh="sonic-icon";let ms=class extends J{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Fn.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:re}};ms.styles=ee`
550
553
  :host {
551
554
  line-height: 0.1em;
552
555
  width: fit-content;
@@ -596,7 +599,7 @@
596
599
  :host([size="3xl"]) svg {
597
600
  --_sc-icon-size: 2.8em;
598
601
  }
599
- `,Me([T()],ne.prototype,"iconText",2),Me([rr({type:String})],ne.prototype,"name",2),Me([rr({type:String})],ne.prototype,"prefix",2),Me([rr({type:String})],ne.prototype,"library",2),Me([ir("customIconLibraryPath",{dynamic:!0}),T()],ne.prototype,"customIconLibraryPath",2),Me([ir("customIconDefaultPrefix",{dynamic:!0}),T()],ne.prototype,"customIconDefaultPrefix",2),ne=Me([$(El)],ne),wn();const Ss=A`
602
+ `,Xs([Ae()],ms.prototype,"iconText",2),Xs([Un({type:String})],ms.prototype,"name",2),Xs([Un({type:String})],ms.prototype,"prefix",2),Xs([Un({type:String})],ms.prototype,"library",2),Xs([zn("customIconLibraryPath",{dynamic:!0}),Ae()],ms.prototype,"customIconLibraryPath",2),Xs([zn("customIconDefaultPrefix",{dynamic:!0}),Ae()],ms.prototype,"customIconDefaultPrefix",2),ms=Xs([X(Mh)],ms),na();const Yr=ee`
600
603
  .custom-scroll {
601
604
  overflow: auto !important;
602
605
  overflow-y: overlay !important;
@@ -618,12 +621,12 @@
618
621
  border: solid 0.15rem transparent;
619
622
  }
620
623
  }
621
- `;var Ll=Object.defineProperty,Tl=Object.getOwnPropertyDescriptor,Ut=(e,t,s,r)=>{for(var i=r>1?void 0:r?Tl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ll(t,s,i),i};const Il={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},Ml="sonic-toast-item";let Ot=class extends C{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0,this._titleId=""}getAriaRole(){return this.status==="error"?"alert":"status"}getAriaLive(){return this.status==="error"?null:"polite"}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)}getCloseButtonLabel(){const e={error:"Fermer le message d'erreur",warning:"Fermer l'avertissement",success:"Fermer le message de succès",info:"Fermer l'information"};return this.status&&e[this.status]||"Fermer la notification"}render(){if(this.dismissForever){const r=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(r)[this.id])return D}if(!this.visible)return D;const e=this.title?this.getTitleId():void 0,t=!this.title&&this.text?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return v`<div
624
+ `;var Nh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,Zt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ih(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Nh(e,s,r),r};const Fh={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},jh="sonic-toast-item";let Ft=class extends J{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0,this._titleId=""}getAriaRole(){return this.status==="error"?"alert":"status"}getAriaLive(){return this.status==="error"?null:"polite"}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)}getCloseButtonLabel(){const t={error:"Fermer le message d'erreur",warning:"Fermer l'avertissement",success:"Fermer le message de succès",info:"Fermer l'information"};return this.status&&t[this.status]||"Fermer la notification"}render(){if(this.dismissForever){const i=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(i)[this.id])return re}if(!this.visible)return re;const t=this.title?this.getTitleId():void 0,e=!this.title&&this.text?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return R`<div
622
625
  class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"
623
626
  role=${this.getAriaRole()}
624
- aria-live=${s||D}
627
+ aria-live=${s||re}
625
628
  aria-atomic="true"
626
- aria-label=${t||D}
629
+ aria-label=${e||re}
627
630
  >
628
631
  <button
629
632
  aria-label=${this.getCloseButtonLabel()}
@@ -636,24 +639,24 @@
636
639
  class="sonic-toast-content custom-scroll"
637
640
  style="max-height: ${this.maxHeight} ;"
638
641
  >
639
- ${this.status&&v`<sonic-icon
640
- name=${Il[this.status]}
642
+ ${this.status&&R`<sonic-icon
643
+ name=${Fh[this.status]}
641
644
  class="sonic-toast-icon"
642
645
  size="2xl"
643
646
  aria-hidden="true"
644
647
  ></sonic-icon>`}
645
648
 
646
649
  <div class="sonic-toast-text">
647
- ${this.title?v`<div class="sonic-toast-title" id=${e}>
650
+ ${this.title?R`<div class="sonic-toast-title" id=${t}>
648
651
  ${this.title}
649
652
  </div>`:""}
650
- ${this.text?U(this.text):""}
653
+ ${this.text?je(this.text):""}
651
654
  <slot></slot>
652
655
  </div>
653
656
 
654
657
  ${this.preserve?"":this.autoHide()}
655
658
  </div>
656
- </div>`}hide(){if(ie.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever){const e=localStorage.getItem("sonic-toast-dismissed")||"{}",t=JSON.parse(e);t[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(t))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},6e3)}};Ot.styles=[Ss,A`
659
+ </div>`}hide(){if(gs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},6e3)}};Ft.styles=[Yr,ee`
657
660
  * {
658
661
  box-sizing: border-box;
659
662
  }
@@ -833,7 +836,7 @@
833
836
  opacity: 0.85;
834
837
  pointer-events: none;
835
838
  }
836
- `],Ut([a({type:String})],Ot.prototype,"title",2),Ut([a({type:String})],Ot.prototype,"id",2),Ut([a({type:String})],Ot.prototype,"text",2),Ut([a({type:String})],Ot.prototype,"status",2),Ut([a({type:Boolean})],Ot.prototype,"ghost",2),Ut([a({type:Boolean})],Ot.prototype,"preserve",2),Ut([a({type:Boolean})],Ot.prototype,"dismissForever",2),Ut([a({type:String})],Ot.prototype,"maxHeight",2),Ut([T()],Ot.prototype,"visible",2),Ut([T()],Ot.prototype,"_titleId",2),Ot=Ut([$(Ml)],Ot);const Nl=A`
839
+ `],Zt([h({type:String})],Ft.prototype,"title",2),Zt([h({type:String})],Ft.prototype,"id",2),Zt([h({type:String})],Ft.prototype,"text",2),Zt([h({type:String})],Ft.prototype,"status",2),Zt([h({type:Boolean})],Ft.prototype,"ghost",2),Zt([h({type:Boolean})],Ft.prototype,"preserve",2),Zt([h({type:Boolean})],Ft.prototype,"dismissForever",2),Zt([h({type:String})],Ft.prototype,"maxHeight",2),Zt([Ae()],Ft.prototype,"visible",2),Zt([Ae()],Ft.prototype,"_titleId",2),Ft=Zt([X(jh)],Ft);const Rh=ee`
837
840
  :host {
838
841
  /* POLICES */
839
842
  /*
@@ -904,7 +907,7 @@
904
907
  --sc-contrast-content: #fff;
905
908
  --sc-contrast: #000000;
906
909
  }
907
- `,Rl=A`
910
+ `,zh=ee`
908
911
  :host([theme="light"]) {
909
912
  /*Boutons*/
910
913
  --sc-primary: var(--sc-base-800);
@@ -933,7 +936,7 @@
933
936
  --sc-base-900: #0f172a;
934
937
  --sc-base-content: var(--sc-base-700);
935
938
  }
936
- `,jn=A`
939
+ `,Sa=ee`
937
940
  --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
938
941
  --sc-info: var(--sc-dark-info, #3abff8);
939
942
  --sc-danger: var(--sc-dark-danger, #f87272);
@@ -958,17 +961,17 @@
958
961
  --sc-base-800: var(--sc-dark-base-800, #d9dce0);
959
962
  --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
960
963
  --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
961
- `,Fl=A`
964
+ `,Uh=ee`
962
965
  :host([theme="dark"]) {
963
- ${jn}
966
+ ${Sa}
964
967
  }
965
968
 
966
969
  @media (prefers-color-scheme: dark) {
967
970
  :host([theme="auto"]) {
968
- ${jn}
971
+ ${Sa}
969
972
  }
970
973
  }
971
- `;var jl=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,$s=(e,t,s,r)=>{for(var i=r>1?void 0:r?zl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&jl(t,s,i),i};const Ul="sonic-theme";let Et=class extends C{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,Et.instance=this}static getPopContainer(){return Et.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",e=>this.receiveMessage(e),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const e=document.styleSheets,t=e.length,s=[];for(let i=0;i<t;i++){const n=e[i];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const r={variables:this.getCssVariables(),fonts:s};L.get("sonic-theme")?.set(r),document.querySelectorAll("iframe").forEach(i=>i.contentWindow?.postMessage({type:"SonicTheme",...r},"*"))}receiveMessage(e){const t=e.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const e=[],t=[...Et.styles.map(i=>i.styleSheet),...Array.from(document.styleSheets)];for(const i of t)try{if(!i)continue;const n=i.cssRules;for(const o of n){if(!("style"in o))continue;const l=o.style;for(const c of l)e.includes(c)||c.indexOf("--sc")!==0||e.push(c)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),r={};return e.forEach(i=>r[i]=s.getPropertyValue(i)),r}render(){return v`<slot></slot>`}};Et.styles=[Rl,Fl,Nl,A`
974
+ `;var qh=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,Gr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Vh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&qh(e,s,r),r};const Bh="sonic-theme";let jt=class extends J{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,jt.instance=this}static getPopContainer(){return jt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",t=>this.receiveMessage(t),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let r=0;r<e;r++){const n=t[r];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};ye.get("sonic-theme")?.set(i),document.querySelectorAll("iframe").forEach(r=>r.contentWindow?.postMessage({type:"SonicTheme",...i},"*"))}receiveMessage(t){const e=t.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const t=[],e=[...jt.styles.map(r=>r.styleSheet),...Array.from(document.styleSheets)];for(const r of e)try{if(!r)continue;const n=r.cssRules;for(const o of n){if(!("style"in o))continue;const c=o.style;for(const d of c)t.includes(d)||d.indexOf("--sc")!==0||t.push(d)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach(r=>i[r]=s.getPropertyValue(r)),i}render(){return R`<slot></slot>`}};jt.styles=[zh,Uh,Rh,ee`
972
975
  :host([color]) {
973
976
  color: var(--sc-base-content, #000);
974
977
  }
@@ -1000,39 +1003,39 @@
1000
1003
  transition-property: scale, opacity;
1001
1004
  transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1002
1005
  }
1003
- `],$s([a({type:String,reflect:!0})],Et.prototype,"theme",2),$s([a({type:Boolean,reflect:!0})],Et.prototype,"background",2),$s([a({type:Boolean,reflect:!0})],Et.prototype,"color",2),$s([a({type:Boolean,reflect:!0})],Et.prototype,"font",2),Et=$s([$(Ul)],Et);var Vl=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,zn=(e,t,s,r)=>{for(var i=r>1?void 0:r?Bl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Vl(t,s,i),i};const Hl="sonic-toast";let I=class extends C{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return t||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),I.handleExistingToastDelegation(),this.toasts?v`<div style=${wt(s)}>
1004
- ${ni(this.toasts,r=>r.id,r=>v`
1006
+ `],Gr([h({type:String,reflect:!0})],jt.prototype,"theme",2),Gr([h({type:Boolean,reflect:!0})],jt.prototype,"background",2),Gr([h({type:Boolean,reflect:!0})],jt.prototype,"color",2),Gr([h({type:Boolean,reflect:!0})],jt.prototype,"font",2),jt=Gr([X(Bh)],jt);var Hh=Object.defineProperty,Wh=Object.getOwnPropertyDescriptor,Aa=(t,e,s,i)=>{for(var r=i>1?void 0:i?Wh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Hh(e,s,r),r};const Kh="sonic-toast";let Ce=class extends J{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:"64ch",flexDirection:"column-reverse"}),Ce.handleExistingToastDelegation(),this.toasts?R`<div style=${$t(s)}>
1007
+ ${Ii(this.toasts,i=>i.id,i=>R`
1005
1008
  <sonic-toast-item
1006
- maxHeight=${t?"none":"10rem"}
1007
- status=${k(r.status)}
1008
- title=${k(r.title)}
1009
- ?ghost=${r.ghost}
1010
- ?dismissForever=${r.dismissForever}
1011
- ?preserve=${r.preserve}
1012
- id=${k(r.id)}
1013
- @hide=${()=>this.removeItem(r)}
1014
- ${il({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})}
1009
+ maxHeight=${e?"none":"10rem"}
1010
+ status=${te(i.status)}
1011
+ title=${te(i.title)}
1012
+ ?ghost=${i.ghost}
1013
+ ?dismissForever=${i.dismissForever}
1014
+ ?preserve=${i.preserve}
1015
+ id=${te(i.id)}
1016
+ @hide=${()=>this.removeItem(i)}
1017
+ ${oh({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})}
1015
1018
  >
1016
1019
  <!-- Le texte est passé dans le slot et non pas en propriété pour contrer des problèmatiques de shadow-dom et d'appel exterieur (exemple: fancybox) -->
1017
- ${r.text?U(r.text):""}
1020
+ ${i.text?je(i.text):""}
1018
1021
  </sonic-toast-item>
1019
1022
  `)}
1020
- </div>`:D}static removeAll(){if(I.delegateToasts){I.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const t=I.getInstance();t&&(t.toasts=t.toasts.filter(s=>s.ghost))}static removeItemsByStatus(t){if(I.delegateToasts){I.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:t},"*");return}const s=I.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.status!==t))}static removeTemporaryItems(){if(I.delegateToasts){I.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const t=I.getInstance();t&&(t.toasts=t.toasts.filter(s=>s.preserve))}static getInstance(){return I.instance||(I.instance=document.createElement("sonic-toast"),Et.getPopContainer().prepend(I.instance)),I.instance}static add(t){if(I.delegateToasts){I.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:t},"*");return}const s=I.getInstance(),r=t.id??new Date().valueOf(),n=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),o={id:r,text:t.text,title:t.title,status:t.status,preserve:n?!0:t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const l=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(l)[t.id])return null}if(s?.toasts.length){const l={...o};for(const c of s.toasts){const h={...c};if(l.id=h.id=0,ot.shallowEqual(l,h))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const t=I.getInstance();window.parent.postMessage({type:"addToasts",toasts:t.toasts},"*"),t.toasts=[]}static removeItem(t){if(I.delegateToasts){I.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:t},"*");return}const s=I.getInstance();s&&s.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!ot.shallowEqual(s,t,!1))))}};I.delegateToasts=!1,zn([a({type:Array})],I.prototype,"toasts",2),I=zn([$(Hl)],I),typeof window<"u"&&(window[zs+"Toast"]=window[zs+"Toast"]||I);function ql(){const e=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&I.removeItemsByStatus(s.data.status),s.data.type=="removeTemporaryItems"&&I.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(I.delegateToasts=!0,I.handleExistingToastDelegation()),s.data.type=="addToasts"&&(I.getInstance().toasts=[...I.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&I.removeAll(),s.data.type=="removeToast"&&I.removeItem(s.data.toast),s.data.type=="addToast"&&I.add(s.data.toast)},t=window.parent!=window;if(window.addEventListener("message",e,!1),t&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!t)for(const s of document.querySelectorAll("iframe"))s.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}ql();var Wl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,As=(e,t,s,r)=>{for(var i=r>1?void 0:r?Kl(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Wl(t,s,i),i};const Gl=new Set,Yl=new Set,Zl=e=>{for(const t of Yl)t(e)},nr=new Set;let or=0;$i(async()=>{or++;const e=or,t=Array.from(nr);for(;t.length>0;){if(e!=or)return;const s=t.splice(0,4);await Promise.all(s.map(r=>r.refetch()))}});const ar=(e,t)=>{class s extends e{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 me(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await L.getInstance().isLocalStrorageReady,!this.isConnected))return;const i=L.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,ot.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||Gl.add(this),Zl(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&I.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_,c=this.key.split(".");o=ot.traverse(o,c,this.hasAttribute("preserveOtherKeys")),o&&ot.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(),nr.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"),nr.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(c=>this.onIntersection(c),n);let l=[...(this.shadowRoot?this.shadowRoot:this).children].filter(c=>c.nodeName.toLowerCase()!="style")[0];if(l?.nodeName.toLocaleLowerCase()=="slot"&&(l=[...l.children].filter(c=>c.nodeName.toLowerCase()!="style")[0]),!l||l.nodeName.toLocaleLowerCase()=="template"){l=document.createElement("div");const c=l.style;c.pointerEvents="none",c.width="1px",c.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 As([a()],s.prototype,"noErrorsRecordings",2),As([a()],s.prototype,"props",1),As([a({type:String})],s.prototype,"endPoint",1),As([a()],s.prototype,"requestId",2),As([a({type:Number})],s.prototype,"refetchEveryMs",2),s};var Xl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,Ne=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ql(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Xl(t,s,i),i};const li=e=>{class t extends e{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 Ne([a()],t.prototype,"forceAutoFill",2),Ne([a({type:String})],t.prototype,"type",1),Ne([a()],t.prototype,"description",1),Ne([a()],t.prototype,"label",1),Ne([a({type:String,reflect:!0})],t.prototype,"status",2),Ne([a({type:Number})],t.prototype,"tabindex",2),Ne([a({type:String})],t.prototype,"autocomplete",2),t},Un=ar,Jl=Xi,Vn=Xe,Bn=li,ve=it,lr=ys;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Un,FormCheckable:Jl,FormElement:Vn,FormInput:Bn,Subscriber:ve,TemplatesContainer:lr};/**
1023
+ </div>`:re}static removeAll(){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const e=Ce.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.ghost))}static removeItemsByStatus(e){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:e},"*");return}const s=Ce.getInstance();s&&(s.toasts=s.toasts.filter(i=>i.status!==e))}static removeTemporaryItems(){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const e=Ce.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.preserve))}static getInstance(){return Ce.instance||(Ce.instance=document.createElement("sonic-toast"),jt.getPopContainer().prepend(Ce.instance)),Ce.instance}static add(e){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:e},"*");return}const s=Ce.getInstance(),i=e.id??new Date().valueOf(),n=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(e.text),o={id:i,text:e.text,title:e.title,status:e.status,preserve:n?!0:e.preserve,ghost:e.ghost,dismissForever:e.dismissForever};if(e.dismissForever&&e.id){const c=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(c)[e.id])return null}if(s?.toasts.length){const c={...o};for(const d of s.toasts){const m={...d};if(c.id=m.id=0,at.shallowEqual(c,m))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const e=Ce.getInstance();window.parent.postMessage({type:"addToasts",toasts:e.toasts},"*"),e.toasts=[]}static removeItem(e){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:e},"*");return}const s=Ce.getInstance();s&&s.removeItem(e)}removeItem(e){e&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!at.shallowEqual(s,e,!1))))}};Ce.delegateToasts=!1,Aa([h({type:Array})],Ce.prototype,"toasts",2),Ce=Aa([X(Kh)],Ce),typeof window<"u"&&(window[pi+"Toast"]=window[pi+"Toast"]||Ce);function Yh(){const t=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&Ce.removeItemsByStatus(s.data.status),s.data.type=="removeTemporaryItems"&&Ce.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(Ce.delegateToasts=!0,Ce.handleExistingToastDelegation()),s.data.type=="addToasts"&&(Ce.getInstance().toasts=[...Ce.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&Ce.removeAll(),s.data.type=="removeToast"&&Ce.removeItem(s.data.toast),s.data.type=="addToast"&&Ce.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 Gh=Object.defineProperty,Zh=Object.getOwnPropertyDescriptor,Zr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Zh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Gh(e,s,r),r};const Jh=new Set,Xh=new Set,Qh=t=>{for(const e of Xh)e(t)},qn=new Set;let Vn=0;ln(async()=>{Vn++;const t=Vn,e=Array.from(qn);for(;e.length>0;){if(t!=Vn)return;const s=e.splice(0,4);await Promise.all(s.map(i=>i.refetch()))}});const Bn=(t,e)=>{class s extends t{constructor(...r){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(r){super.props=r}set endPoint(r){this._endPoint=r,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 Ds(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await ye.getInstance().isLocalStrorageReady,!this.isConnected))return;const r=ye.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,at.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||"",r)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||Jh.add(this),Qh(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&Ce.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 c=o._sonic_http_response_,d=this.key.split(".");o=at.traverse(o,d,this.hasAttribute("preserveOtherKeys")),o&&at.isObject(o)&&c&&(o._sonic_http_response_=c)}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(),qn.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"),qn.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 r=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*r,window.innerHeight*r)+"px",threshold:.9};this.iObserver=new IntersectionObserver(d=>this.onIntersection(d),n);let c=[...(this.shadowRoot?this.shadowRoot:this).children].filter(d=>d.nodeName.toLowerCase()!="style")[0];if(c?.nodeName.toLocaleLowerCase()=="slot"&&(c=[...c.children].filter(d=>d.nodeName.toLowerCase()!="style")[0]),!c||c.nodeName.toLocaleLowerCase()=="template"){c=document.createElement("div");const d=c.style;d.pointerEvents="none",d.width="1px",d.height="1px",this.lazyLoadPlaceHolder=c,this.appendChild(c)}c?this.iObserver.observe(c):this.isFirstLoad&&this._fetchData()}onIntersection(r){for(const n of r)if(n.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return Zr([h()],s.prototype,"noErrorsRecordings",2),Zr([h()],s.prototype,"props",1),Zr([h({type:String})],s.prototype,"endPoint",1),Zr([h()],s.prototype,"requestId",2),Zr([h({type:Number})],s.prototype,"refetchEveryMs",2),s};var eu=Object.defineProperty,tu=Object.getOwnPropertyDescriptor,Qs=(t,e,s,i)=>{for(var r=i>1?void 0:i?tu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&eu(e,s,r),r};const Ri=t=>{class e extends t{constructor(...i){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const i=this.shadowRoot?.querySelector("input");if(!i||i.checkValidity())return;const r=this.getFormPublisher();r&&(r.isFormValid=!1),i.reportValidity()}set type(i){this.hasAttribute("type")&&!this.forceAutoFill&&(i=this.getAttribute("type")),this._type=i,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(i){this.hasAttribute("description")&&!this.forceAutoFill&&(i=this.getAttribute("description")),this._description=i,this.requestUpdate()}get label(){return this._label}set label(i){this.hasAttribute("label")&&!this.forceAutoFill&&(i=this.getAttribute("label")),this._label=i,this.requestUpdate()}}return Qs([h()],e.prototype,"forceAutoFill",2),Qs([h({type:String})],e.prototype,"type",1),Qs([h()],e.prototype,"description",1),Qs([h()],e.prototype,"label",1),Qs([h({type:String,reflect:!0})],e.prototype,"status",2),Qs([h({type:Number})],e.prototype,"tabindex",2),Qs([h({type:String})],e.prototype,"autocomplete",2),e},Ca=Bn,su=Mn,ka=br,$a=Ri,Ts=nt,Hn=Ur;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Ca,FormCheckable:su,FormElement:ka,FormInput:$a,Subscriber:Ts,TemplatesContainer:Hn};/**
1021
1024
  * @license
1022
1025
  * Copyright 2020 Google LLC
1023
1026
  * SPDX-License-Identifier: BSD-3-Clause
1024
- */const Kt=fe(class extends Ye{constructor(e){if(super(e),e.type!==Ee.CHILD)throw Error("templateContent can only be used in child bindings")}render(e){return this.vt===e?Dt:(this.vt=e,document.importNode(e.content,!0))}});var tc=Object.defineProperty,ec=Object.getOwnPropertyDescriptor,Hn=(e,t,s,r)=>{for(var i=r>1?void 0:r?ec(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&tc(t,s,i),i};const sc="sonic-fetch";let ci=class extends ar(it(lr(C))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return D;const e=this.loader===!0||this.loader===""?"fixed":this.loader;return v`<sonic-loader mode=${e}></sonic-loader>`}renderSkeleton(){const e=this.templateParts.skeleton;return this.isLoading&&e?Kt(e):D}render(){return v`
1027
+ */const rs=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?It:(this.vt=t,document.importNode(t.content,!0))}});var ru=Object.defineProperty,iu=Object.getOwnPropertyDescriptor,Da=(t,e,s,i)=>{for(var r=i>1?void 0:i?iu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ru(e,s,r),r};const nu="sonic-fetch";let zi=class extends Bn(nt(Hn(J))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return re;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?rs(t):re}render(){return R`
1025
1028
  ${this.renderSkeleton()} ${this.renderLoader()}
1026
- ${this.isLoading?D:v`<slot></slot>`}
1027
- `}};ci.styles=[A`
1029
+ ${this.isLoading?re:R`<slot></slot>`}
1030
+ `}};zi.styles=[ee`
1028
1031
  :host {
1029
1032
  display: contents;
1030
1033
  }
1031
- `],Hn([a()],ci.prototype,"loader",2),ci=Hn([$(sc)],ci);var ic=Object.defineProperty,rc=Object.getOwnPropertyDescriptor,qn=(e,t,s,r)=>{for(var i=r>1?void 0:r?rc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ic(t,s,i),i};const nc="sonic-if";let hi=class extends C{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?v` <slot></slot> `:D}};hi.styles=A`
1034
+ `],Da([h()],zi.prototype,"loader",2),zi=Da([X(nu)],zi);var ou=Object.defineProperty,au=Object.getOwnPropertyDescriptor,Ea=(t,e,s,i)=>{for(var r=i>1?void 0:i?au(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ou(e,s,r),r};const lu="sonic-if";let Ui=class extends J{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?R` <slot></slot> `:re}};Ui.styles=ee`
1032
1035
  :host {
1033
1036
  display: contents;
1034
1037
  }
1035
- `,qn([a({type:Boolean})],hi.prototype,"condition",2),hi=qn([$(nc)],hi);const oc=A`
1038
+ `,Ea([h({type:Boolean})],Ui.prototype,"condition",2),Ui=Ea([X(lu)],Ui);const cu=ee`
1036
1039
  :host([align="left"]) .sonic-loader--inline {
1037
1040
  margin-left: 0;
1038
1041
  }
@@ -1099,7 +1102,7 @@
1099
1102
  transform: translate(24px, 0);
1100
1103
  }
1101
1104
  }
1102
- `,ac=A`
1105
+ `,hu=ee`
1103
1106
  @keyframes sonic-loader--fixed {
1104
1107
  0% {
1105
1108
  transform: scale(0);
@@ -1152,14 +1155,14 @@
1152
1155
  height: 5rem;
1153
1156
  animation: sonic-loader--fixed 1s 0s linear infinite;
1154
1157
  }
1155
- `;var lc=Object.defineProperty,cc=Object.getOwnPropertyDescriptor,cr=(e,t,s,r)=>{for(var i=r>1?void 0:r?cc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&lc(t,s,i),i};const hc="sonic-loader";let lt=class extends C{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(e){lt.loader||(lt.loader=document.createElement("sonic-loader"));const t=lt.loader;e||(e={}),e.mode&&t.setAttribute("mode",e.mode),e.noDelay&&t.setAttribute("noDelay",""),e.container||(e.container=Et.getPopContainer(),e.mode="fixed"),e.container.appendChild(t),lt.callCounter++}static hide(){lt.callCounter--,!(lt.callCounter>0)&&lt.loader&&lt.loader.remove()}render(){return v`<div
1158
+ `;var uu=Object.defineProperty,du=Object.getOwnPropertyDescriptor,Wn=(t,e,s,i)=>{for(var r=i>1?void 0:i?du(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&uu(e,s,r),r};const pu="sonic-loader";let ht=class extends J{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(t){ht.loader||(ht.loader=document.createElement("sonic-loader"));const e=ht.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.noDelay&&e.setAttribute("noDelay",""),t.container||(t.container=jt.getPopContainer(),t.mode="fixed"),t.container.appendChild(e),ht.callCounter++}static hide(){ht.callCounter--,!(ht.callCounter>0)&&ht.loader&&ht.loader.remove()}render(){return R`<div
1156
1159
  class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} "
1157
1160
  >
1158
1161
  <div></div>
1159
1162
  <div></div>
1160
1163
  <div></div>
1161
1164
  <div></div>
1162
- </div>`}};lt.styles=[oc,ac,A`
1165
+ </div>`}};ht.styles=[cu,hu,ee`
1163
1166
  :host {
1164
1167
  --sc-_loader-bg: var(--sc-primary, currentColor);
1165
1168
  pointer-events: none;
@@ -1187,7 +1190,7 @@
1187
1190
  opacity: 1;
1188
1191
  }
1189
1192
  }
1190
- `],lt.callCounter=0,cr([a({type:String})],lt.prototype,"mode",2),cr([a({type:Boolean})],lt.prototype,"noDelay",2),lt=cr([$(hc)],lt);var dc=Object.getOwnPropertyDescriptor,uc=(e,t,s,r)=>{for(var i=r>1?void 0:r?dc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const pc="sonic-subscriber";let Wn=class extends it(C){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(e){super.updated(e),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return v`<slot></slot> `}};Wn=uc([$(pc)],Wn);var fc=Object.defineProperty,mc=Object.getOwnPropertyDescriptor,Vt=(e,t,s,r)=>{for(var i=r>1?void 0:r?mc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&fc(t,s,i),i};const bc="sonic-list";let Tt=class extends ar(it(ys(C))){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(e){typeof e!="function"&&e!==void 0||(this._items=e,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 D;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return v`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const e=this.templateParts.skeleton;return this.isLoading&&e?Kt(e):D}renderSeparator(){if(this.separator)return this.separator();const e=this.templateParts.separator;return e?Kt(e):D}renderLoadingState(){return v`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return v` <div
1193
+ `],ht.callCounter=0,Wn([h({type:String})],ht.prototype,"mode",2),Wn([h({type:Boolean})],ht.prototype,"noDelay",2),ht=Wn([X(pu)],ht);var fu=Object.getOwnPropertyDescriptor,gu=(t,e,s,i)=>{for(var r=i>1?void 0:i?fu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const bu="sonic-subscriber";let Oa=class extends nt(J){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> `}};Oa=gu([X(bu)],Oa);var mu=Object.defineProperty,vu=Object.getOwnPropertyDescriptor,Jt=(t,e,s,i)=>{for(var r=i>1?void 0:i?vu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&mu(e,s,r),r};const yu="sonic-list";let qt=class extends Bn(nt(Ur(J))){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 re;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?rs(t):re}renderSeparator(){if(this.separator)return this.separator();const t=this.templateParts.separator;return t?rs(t):re}renderLoadingState(){return R`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return R` <div
1191
1194
  style="color: var(--sc-base-400);
1192
1195
  font-size: 1.5em;
1193
1196
  margin: 4rem 0;
@@ -1198,43 +1201,43 @@
1198
1201
  ><span class="sonic-no-result-text"
1199
1202
  >${typeof this.props=="string"&&this.props==""?"Aucun résultat":this.props}</span
1200
1203
  >
1201
- </div>`}formatProps(){let e=this.props;if(e==null)return null;const t=e._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(e)||(s?e=Object.entries(e).map(([r,i])=>({key:r,value:i})):ot.isObject(e)&&Object.keys(e).length>0&&(!t||t.ok)?e=[e]:e=[]),e=e.filter(r=>r!=null),t&&(e._sonic_http_response_=t),e}updated(e){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(e)}getAllRenderableElements(e){let t=[];function s(r){if(r.nodeType===Node.ELEMENT_NODE){const i=r.getBoundingClientRect();(i.width>0||i.height>0)&&t.push(r),r.childNodes.forEach(s),r.shadowRoot&&r.shadowRoot.childNodes.forEach(s)}}return s(e),t}getDisplayContentsSize(e){const t=this.getAllRenderableElements(e);if(t.length===0)return{width:0,height:0};const s=t.map(l=>l.getBoundingClientRect()),r=Math.min(...s.map(l=>l.left)),i=Math.max(...s.map(l=>l.right)),n=Math.min(...s.map(l=>l.top)),o=Math.max(...s.map(l=>l.bottom));return{width:i-r,height:o-n}}render(){return v`
1204
+ </div>`}formatProps(){let t=this.props;if(t==null)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(s?t=Object.entries(t).map(([i,r])=>({key:i,value:r})):at.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?t=[t]:t=[]),t=t.filter(i=>i!=null),e&&(t._sonic_http_response_=e),t}updated(t){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(t)}getAllRenderableElements(t){let e=[];function s(i){if(i.nodeType===Node.ELEMENT_NODE){const r=i.getBoundingClientRect();(r.width>0||r.height>0)&&e.push(i),i.childNodes.forEach(s),i.shadowRoot&&i.shadowRoot.childNodes.forEach(s)}}return s(t),e}getDisplayContentsSize(t){const e=this.getAllRenderableElements(t);if(e.length===0)return{width:0,height:0};const s=e.map(c=>c.getBoundingClientRect()),i=Math.min(...s.map(c=>c.left)),r=Math.max(...s.map(c=>c.right)),n=Math.min(...s.map(c=>c.top)),o=Math.max(...s.map(c=>c.bottom));return{width:r-i,height:o-n}}render(){return R`
1202
1205
  ${this.renderContent()}
1203
1206
  <div
1204
1207
  style="grid-column: 1 / -1;min-height:${this.isLoading?0:this.loadingSize.height}px; width:0;float:left;display: var(--list-loader-height-display);"
1205
1208
  ></div>
1206
- `}handleProgrammaticTemplates(e,t,s){return this.items?v`<sonic-subscriber
1209
+ `}handleProgrammaticTemplates(t,e,s){return this.items?R`<sonic-subscriber
1207
1210
  ?debug=${this.defferedDebug===!0}
1208
1211
  .bindPublisher=${()=>this.publisher[s]}
1209
1212
  .propertyMap?=${this.itemPropertyMap}
1210
1213
  dataProvider="${this.dataProvider}/list-item/${s}"
1211
1214
  >
1212
- ${this.items(e,t)}
1213
- </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!ot.isObject(this.props))return v`<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 Kt(this.templateParts["no-items"])}const i=this.templateList.length;let n=-1;const o=this.hasAttribute("extractValues"),l=this.renderSeparator(),c=r?.length||0,h=r?.slice(this.offset,this.offset+this.limit);return v`
1214
- ${h?.map((u,d)=>{if(u==null)return D;let p=d,y=null;if(typeof u=="object"&&!Array.isArray(u)){o&&(p=u?.key);const m=u[this.templateKey];m&&typeof m=="string"&&(y=this.templateParts[m])}if(p=="_sonic_http_response_"||typeof p!="string"&&typeof p!="number")return D;const g=d>=c-1,b=d%2,w=this.publisher[p],E={key:p,even:b==0,odd:b==1,onlyChild:c==1,firstChild:d==0,lastChild:g};w._key_=p+"",w._metadata_={...w._metadata_.get(),...E};const f=this.handleProgrammaticTemplates(u,E,p);return f?v`${f}${g?D:l}`:(n++,y&&(n=-1),v`
1215
+ ${this.items(t,e)}
1216
+ </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!at.isObject(this.props))return R`<div></div>`;const i=this.formatProps();if((i?.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 rs(this.templateParts["no-items"])}const r=this.templateList.length;let n=-1;const o=this.hasAttribute("extractValues"),c=this.renderSeparator(),d=i?.length||0,m=i?.slice(this.offset,this.offset+this.limit);return R`
1217
+ ${m?.map((k,g)=>{if(k==null)return re;let f=g,A=null;if(typeof k=="object"&&!Array.isArray(k)){o&&(f=k?.key);const y=k[this.templateKey];y&&typeof y=="string"&&(A=this.templateParts[y])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return re;const E=g>=d-1,O=g%2,I=this.publisher[f],U={key:f,even:O==0,odd:O==1,onlyChild:d==1,firstChild:g==0,lastChild:E};I._key_=f+"",I._metadata_={...I._metadata_.get(),...U};const x=this.handleProgrammaticTemplates(k,U,f);return x?R`${x}${E?re:c}`:(n++,A&&(n=-1),R`
1215
1218
  <sonic-subscriber
1216
1219
  ?debug=${this.defferedDebug===!0}
1217
- .bindPublisher=${function(){return w}}
1220
+ .bindPublisher=${function(){return I}}
1218
1221
  .propertyMap?=${this.itemPropertyMap}
1219
- dataProvider="${this.dataProvider}/list-item/${p}"
1222
+ dataProvider="${this.dataProvider}/list-item/${f}"
1220
1223
  >
1221
- ${Kt(y||this.templateList[n%i])}
1224
+ ${rs(A||this.templateList[n%r])}
1222
1225
  </sonic-subscriber>
1223
- ${g?D:l}
1226
+ ${E?re:c}
1224
1227
  `)})}
1225
- `}};Vt([a({type:Object})],Tt.prototype,"itemPropertyMap",2),Vt([a({type:String})],Tt.prototype,"templateKey",2),Vt([a({type:String})],Tt.prototype,"idKey",2),Vt([a()],Tt.prototype,"loader",2),Vt([a()],Tt.prototype,"limit",2),Vt([a()],Tt.prototype,"offset",2),Vt([a({type:Function,attribute:!1})],Tt.prototype,"items",1),Vt([a({type:Function,attribute:!1})],Tt.prototype,"noItems",2),Vt([a({type:Function,attribute:!1})],Tt.prototype,"skeleton",2),Vt([a({type:Function,attribute:!1})],Tt.prototype,"separator",2),Tt=Vt([$(bc)],Tt);/**
1228
+ `}};Jt([h({type:Object})],qt.prototype,"itemPropertyMap",2),Jt([h({type:String})],qt.prototype,"templateKey",2),Jt([h({type:String})],qt.prototype,"idKey",2),Jt([h()],qt.prototype,"loader",2),Jt([h()],qt.prototype,"limit",2),Jt([h()],qt.prototype,"offset",2),Jt([h({type:Function,attribute:!1})],qt.prototype,"items",1),Jt([h({type:Function,attribute:!1})],qt.prototype,"noItems",2),Jt([h({type:Function,attribute:!1})],qt.prototype,"skeleton",2),Jt([h({type:Function,attribute:!1})],qt.prototype,"separator",2),qt=Jt([X(yu)],qt);/**
1226
1229
  * @license
1227
1230
  * Copyright 2021 Google LLC
1228
1231
  * SPDX-License-Identifier: BSD-3-Clause
1229
- */function*Kn(e,t){if(e!==void 0){let s=0;for(const r of e)yield t(r,s++)}}var gc=Object.defineProperty,vc=Object.getOwnPropertyDescriptor,ct=(e,t,s,r)=>{for(var i=r>1?void 0:r?vc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&gc(t,s,i),i};const yc="sonic-queue";let et=class extends it(C){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 t=this.dataProviderExpression.split("?");t.shift();const s=new URLSearchParams(t.join("?")),r=this.filterPublisher?.get(),i=this.filteredFields.split(" ");for(const o in r){let l=r[o];Array.isArray(l)&&(l=l.filter(c=>c!==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,ja(this.resolveScrollRoot(),{x:0,y:0});for(const o of this.listDataProviders)L.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 L.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 e of this.listDataProviders)L.getInstance().delete(e),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=et.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=ie.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.ensureScrollSync(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await L.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const e=this.getAncestorAttributeValue("dataFilterProvider");if(!e){this.next();return}this.filterPublisher=L.getInstance().get(e),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}resolveScrollRoot(){const e=ie.getScrollingAncestor(this);return!e||e===document.documentElement||e===document.body?window:e}isSafari(){return se()}ensureScrollSync(){if(!se()||!this.isConnected)return;const e=this.resolveScrollRoot();this.scrollRoot=e,Te(e),!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(!se()||!this.isConnected)return;const e=++this.restoreGeneration;(async()=>{if(await this.updateComplete,e!==this.restoreGeneration||!this.isConnected)return;const t=Array.from(this.querySelectorAll("sonic-list"));if(t.length&&await Promise.all(t.map(r=>r.updateComplete)),e!==this.restoreGeneration||!this.isConnected||(await new Promise(r=>requestAnimationFrame(()=>r())),await new Promise(r=>requestAnimationFrame(()=>r())),e!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();Te(s),qi(s)})()}updated(e){if(se()){this.ensureScrollSync();const t=this.scrollRoot??this.resolveScrollRoot();qi(t),this.scheduleRestoreAfterChildren()}super.updated(e)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(e){let t=this.offset;const r=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&e&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!e,e){if(this.publisher.lastFetchedData=e.detail.fetchedData,e.detail.requestId<this.requestId)return;if(this.resultCount+=e.detail.props?.length||0,!e.detail.isFirstLoad||!e.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const d=this.props,p=d[d.length-1];t=parseInt(p.offset.toString())+parseInt(p.limit.toString())}else{const d=[];d.resultCount=this.resultCount,d.lastFetchedData=e?.detail.fetchedData||{},this.props=d}r>0&&e&&!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",t+"").replace("$limit",this.limit+"");const n=i.split("?");let o=n.shift();const l=new URLSearchParams(n.join("?")),c=this.filterPublisher?.get(),h=this.filteredFields.split(" ");for(const d in c)this.filteredFields&&h.includes(d)||c[d]==null||c[d]==""||l.set(d,c[d]);this.searchHash||(this.searchHash=l.toString()),o=o+"?"+l.toString(),i=i+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(i);const u=[...this.props,{id:l.toString()+"/"+this.props.length,dataProvider:i,endPoint:o,offset:t,limit:this.limit}];u.resultCount=this.resultCount,u.lastFetchedData=e?.detail.fetchedData||{},this.props=u,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return D;let e=!this.noLazyload;return this.props.length==1&&(e=!1),this.style.display="block",v`
1230
- ${Kn(this.props,(t,s)=>{const r=s==0?this.templates:this.templates?.filter(i=>i.getAttribute("data-value")!="no-item");return v`
1232
+ */function*Ta(t,e){if(t!==void 0){let s=0;for(const i of t)yield e(i,s++)}}var wu=Object.defineProperty,_u=Object.getOwnPropertyDescriptor,ut=(t,e,s,i)=>{for(var r=i>1?void 0:i?_u(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&wu(e,s,r),r};const xu="sonic-queue";let tt=class extends nt(J){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("?")),i=this.filterPublisher?.get(),r=this.filteredFields.split(" ");for(const o in i){let c=i[o];Array.isArray(c)&&(c=c.filter(d=>d!==null)),!(this.filteredFields&&r.includes(o)||c==null||c.toString()==="")&&s.set(o,i[o].toString())}const n=s.toString();if(!(n==this.searchHash&&!this.isFirstRequest)){this.searchHash=n,qc(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=tt.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 fs()}ensureScrollSync(){if(!fs()||!this.isConnected)return;const t=this.resolveScrollRoot();this.scrollRoot=t,Zs(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(!fs()||!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(i=>i.updateComplete)),t!==this.restoreGeneration||!this.isConnected||(await new Promise(i=>requestAnimationFrame(()=>i())),await new Promise(i=>requestAnimationFrame(()=>i())),t!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();Zs(s),$n(s)})()}updated(t){if(fs()){this.ensureScrollSync();const e=this.scrollRoot??this.resolveScrollRoot();$n(e),this.scheduleRestoreAfterChildren()}super.updated(t)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(t){let e=this.offset;const i=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 g=this.props,f=g[g.length-1];e=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const g=[];g.resultCount=this.resultCount,g.lastFetchedData=t?.detail.fetchedData||{},this.props=g}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",e+"").replace("$limit",this.limit+"");const n=r.split("?");let o=n.shift();const c=new URLSearchParams(n.join("?")),d=this.filterPublisher?.get(),m=this.filteredFields.split(" ");for(const g in d)this.filteredFields&&m.includes(g)||d[g]==null||d[g]==""||c.set(g,d[g]);this.searchHash||(this.searchHash=c.toString()),o=o+"?"+c.toString(),r=r+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(r);const k=[...this.props,{id:c.toString()+"/"+this.props.length,dataProvider:r,endPoint:o,offset:e,limit:this.limit}];k.resultCount=this.resultCount,k.lastFetchedData=t?.detail.fetchedData||{},this.props=k,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return re;let t=!this.noLazyload;return this.props.length==1&&(t=!1),this.style.display="block",R`
1233
+ ${Ta(this.props,(e,s)=>{const i=s==0?this.templates:this.templates?.filter(r=>r.getAttribute("data-value")!="no-item");return R`
1231
1234
  <sonic-list
1232
1235
  fetch
1233
1236
  loader="${this.loader}"
1234
1237
  cache=${this.cache}
1235
1238
  displayContents
1236
1239
  lazyBoundsRatio=${this.lazyBoundsRatio}
1237
- ?lazyload=${e}
1240
+ ?lazyload=${t}
1238
1241
  ?invalidateOnPageShow=${this.invalidateOnPageShow}
1239
1242
  localStorage=${this.localStorage}
1240
1243
  requestId=${this.requestId}
@@ -1243,46 +1246,50 @@
1243
1246
  @load=${this.next}
1244
1247
  key=${this.key}
1245
1248
  @loading=${this.resetDuration}
1246
- dataProvider="${t.dataProvider}"
1247
- endPoint="${t.endPoint}"
1249
+ dataProvider="${e.dataProvider}"
1250
+ endPoint="${e.endPoint}"
1248
1251
  idKey=${this.idKey}
1249
- .templates=${r}
1252
+ .templates=${i}
1250
1253
  .items=${this.items}
1251
1254
  .noItems=${s==0?this.noItems:void 0}
1252
1255
  .skeleton=${this.skeleton}
1253
1256
  >
1254
1257
  </sonic-list>
1255
1258
  `})}
1256
- `}};et.instanceCounter=0,ct([a({type:Array})],et.prototype,"templates",2),ct([a({type:Function,attribute:!1})],et.prototype,"items",2),ct([a({type:Function,attribute:!1})],et.prototype,"noItems",2),ct([a({type:Function,attribute:!1})],et.prototype,"skeleton",2),ct([a({type:Object})],et.prototype,"itemPropertyMap",2),ct([a()],et.prototype,"cache",2),ct([a()],et.prototype,"targetRequestDuration",2),ct([a()],et.prototype,"limit",2),ct([a()],et.prototype,"lazyBoundsRatio",2),ct([a()],et.prototype,"offset",2),ct([a()],et.prototype,"resultCount",2),ct([a({type:Boolean})],et.prototype,"noLazyload",2),ct([a({type:String})],et.prototype,"loader",2),ct([a()],et.prototype,"filteredFields",2),ct([a({type:String})],et.prototype,"dataProviderExpression",2),ct([a({type:Boolean})],et.prototype,"invalidateOnPageShow",2),ct([a({type:String})],et.prototype,"idKey",2),et=ct([$(yc)],et);var wc=Object.defineProperty,_c=Object.getOwnPropertyDescriptor,es=(e,t,s,r)=>{for(var i=r>1?void 0:r?_c(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&wc(t,s,i),i};const xc="sonic-submit";let ye=class extends it(C){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 e=>{if(this.disabled||e instanceof KeyboardEvent&&e.key!=="Enter")return;e instanceof MouseEvent&&e.stopPropagation();const t=L.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid.set(!0),t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,lt.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),lt.hide(),this.disabled=!1;return}const r=this.getAttribute("method")?.toLocaleLowerCase()||"post",i=this.hasAttribute("sendAsFormData"),n=t.get();delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),l=o?L.getInstance().get(o):null;let c={};l&&(c=l.get());let h=null;const u=this.getAncestorAttributeValue("dataProvider"),d=this.endPoint||u,p=async()=>{const g={...n};if(delete g.needsCaptchaValidation,delete c.needsCaptchaValidation,i)h=await this.api?.submitFormData(d,g,r,c);else switch(r){case"put":h=await this.api?.put(d,g,c);break;case"patch":h=await this.api?.patch(d,g,c);break;case"delete":h=await this.api?.delete(d,g,c);break;case"get":const m=new URLSearchParams;if(g)for(const x in g)m.append(x,g[x]);const _="?"+m.toString();h=await this.api?.get(d+_,c);break;default:h=await this.api?.post(d,g,c);break}lt.hide(),h?h._sonic_http_response_&&!h._sonic_http_response_.ok&&Object.keys(h).length===1&&(h.messages=[{content:"Network Error",status:"error"}]):h={messages:[{content:"Network Error",status:"error"}]};const b=this.getAncestorAttributeValue("clearedDataOnSuccess");b&&b.split(" ").forEach(m=>L.get(m).set({}));const w=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",E=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&g[w]&&g[E]&&this.saveCredentials(g[w],g[E]),this.submitResultKey&&(h=ot.traverse(h,this.submitResultKey.split("."),!0));const f=this.getAncestorAttributeValue("submitResultDataProvider");f&&L.get(f).set(h),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:h,bubbles:!0,composed:!0}))},y=l?.needsCaptchaValidation.get()?l:t.needsCaptchaValidation.get()?t:null;if(y){y.captchaToken.set("request_token");const g=b=>{b!="request_token"?(p(),y.captchaToken.offAssign(g)):(lt.hide(),this.disabled=!1)};y.captchaToken.onAssign(g)}else p()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new me(this.getApiConfiguration())}submitNativeForm(){const e=ie.getClosestForm(this);if(!e)return;const t=this.getAncestorAttributeValue("formDataProvider"),s={...L.get(t).get()};delete s.needsCaptchaValidation;for(const i in s){if(i=="isFormValid")continue;let n=e.querySelector('input[name="'+i+'"], select[name="'+i+'"], textarea[name="'+i+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=i,e.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",e.appendChild(r),r&&r.click()}async saveCredentials(e,t){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:e,password:t});await navigator.credentials.store(s)}}render(){return v`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};ye.styles=A`
1259
+ `}};tt.instanceCounter=0,ut([h({type:Array})],tt.prototype,"templates",2),ut([h({type:Function,attribute:!1})],tt.prototype,"items",2),ut([h({type:Function,attribute:!1})],tt.prototype,"noItems",2),ut([h({type:Function,attribute:!1})],tt.prototype,"skeleton",2),ut([h({type:Object})],tt.prototype,"itemPropertyMap",2),ut([h()],tt.prototype,"cache",2),ut([h()],tt.prototype,"targetRequestDuration",2),ut([h()],tt.prototype,"limit",2),ut([h()],tt.prototype,"lazyBoundsRatio",2),ut([h()],tt.prototype,"offset",2),ut([h()],tt.prototype,"resultCount",2),ut([h({type:Boolean})],tt.prototype,"noLazyload",2),ut([h({type:String})],tt.prototype,"loader",2),ut([h()],tt.prototype,"filteredFields",2),ut([h({type:String})],tt.prototype,"dataProviderExpression",2),ut([h({type:Boolean})],tt.prototype,"invalidateOnPageShow",2),ut([h({type:String})],tt.prototype,"idKey",2),tt=ut([X(xu)],tt);var Pu=Object.defineProperty,Su=Object.getOwnPropertyDescriptor,wr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Su(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Pu(e,s,r),r};const Au="sonic-submit";let Ls=class extends nt(J){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,ht.show(),e.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),ht.hide(),this.disabled=!1;return}const i=this.getAttribute("method")?.toLocaleLowerCase()||"post",r=this.hasAttribute("sendAsFormData"),n=e.get();delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),c=o?ye.getInstance().get(o):null;let d={};c&&(d=c.get());let m=null;const k=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||k,f=async()=>{const E={...n};if(delete E.needsCaptchaValidation,delete d.needsCaptchaValidation,r)m=await this.api?.submitFormData(g,E,i,d);else switch(i){case"put":m=await this.api?.put(g,E,d);break;case"patch":m=await this.api?.patch(g,E,d);break;case"delete":m=await this.api?.delete(g,E,d);break;case"get":const y=new URLSearchParams;if(E)for(const C in E)y.append(C,E[C]);const N="?"+y.toString();m=await this.api?.get(g+N,d);break;default:m=await this.api?.post(g,E,d);break}ht.hide(),m?m._sonic_http_response_&&!m._sonic_http_response_.ok&&Object.keys(m).length===1&&(m.messages=[{content:"Network Error",status:"error"}]):m={messages:[{content:"Network Error",status:"error"}]};const O=this.getAncestorAttributeValue("clearedDataOnSuccess");O&&O.split(" ").forEach(y=>ye.get(y).set({}));const I=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",U=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&E[I]&&E[U]&&this.saveCredentials(E[I],E[U]),this.submitResultKey&&(m=at.traverse(m,this.submitResultKey.split("."),!0));const x=this.getAncestorAttributeValue("submitResultDataProvider");x&&ye.get(x).set(m),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:m,bubbles:!0,composed:!0}))},A=c?.needsCaptchaValidation.get()?c:e.needsCaptchaValidation.get()?e:null;if(A){A.captchaToken.set("request_token");const E=O=>{O!="request_token"?(f(),A.captchaToken.offAssign(E)):(ht.hide(),this.disabled=!1)};A.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 Ds(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 r in s){if(r=="isFormValid")continue;let n=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=r,t.appendChild(n));let o=s[r];Array.isArray(o)&&(o=o.join(",")),n.type==="checkbox"||n.type==="radio"?o&&(n.checked=!0):n.value=o}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.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>`}};Ls.styles=ee`
1257
1260
  [data-disabled] {
1258
1261
  opacity: 0.3;
1259
1262
  pointer-events: none;
1260
1263
  user-select: none;
1261
1264
  }
1262
- `,es([a({type:String})],ye.prototype,"submitResultKey",2),es([a({type:Boolean})],ye.prototype,"disabled",2),es([a({type:String})],ye.prototype,"endPoint",2),es([a()],ye.prototype,"name",2),es([a()],ye.prototype,"value",2),ye=es([$(xc)],ye);var Pc=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,ks=(e,t,s,r)=>{for(var i=r>1?void 0:r?Cc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Pc(t,s,i),i};const Sc="sonic-router";let ss=class extends ys(C){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){at.onChange(this),super.connectedCallback()}disconnectedCallback(){at.offChange(this),super.disconnectedCallback()}set location(e){this._location=e,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const e=new URL(this.location,document.location.origin);return e.pathname+e.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 e=[];for(let[t,s]of Object.entries(this.routes)){if(t==="fallback"||!s)continue;const r=new RegExp(this.regExpBasePath+t);if(r.test(this.cleanLocation)){const i=r.exec(this.cleanLocation)||[t];i.shift(),e.push(s([...i]))}else try{const n=new ee(this.patternBasePath+t).match(this.cleanLocation);if(n){const o=n||{};e.push(s(o))}}catch{this.cleanLocation.indexOf((this.basePath||"")+t.replace(document.location.origin,""))!=-1&&e.push(s({}))}}return e.length==0&&this.routes?.fallback&&this.isConnected&&e.push(this.routes.fallback()),e}render(){const e=this.handleroutes();if(e.length>0)return v`${e}`;const t=[];for(const s of this.templatePartsList){const r=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+r).test(this.cleanLocation))t.push(s);else try{new ee(this.patternBasePath+r+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),t.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+r.replace(document.location.origin,""))!=-1&&t.push(s)}}if(t.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(r=>r.hasAttribute("data-fallback"));s&&t.push(s)}return v`${ni(t,(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 ee("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");r=new ee(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 v`<div
1265
+ `,wr([h({type:String})],Ls.prototype,"submitResultKey",2),wr([h({type:Boolean})],Ls.prototype,"disabled",2),wr([h({type:String})],Ls.prototype,"endPoint",2),wr([h()],Ls.prototype,"name",2),wr([h()],Ls.prototype,"value",2),Ls=wr([X(Au)],Ls);var Cu=Object.defineProperty,ku=Object.getOwnPropertyDescriptor,Jr=(t,e,s,i)=>{for(var r=i>1?void 0:i?ku(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Cu(e,s,r),r};const $u="sonic-router";let _r=class extends Ur(J){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){ct.onChange(this),super.connectedCallback()}disconnectedCallback(){ct.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 i=new RegExp(this.regExpBasePath+e);if(i.test(this.cleanLocation)){const r=i.exec(this.cleanLocation)||[e];r.shift(),t.push(s([...r]))}else try{const n=new ps(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 i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+i).test(this.cleanLocation))e.push(s);else try{new ps(this.patternBasePath+i+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),e.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+i.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(i=>i.hasAttribute("data-fallback"));s&&e.push(s)}return R`${Ii(e,(s,i)=>i+new Date().getTime(),s=>{if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let i="";const r=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new ps("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");i=new ps(r).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),o=(this.cleanLocation+"").match(n);o&&(i=o.shift()?.replace(n,r)||"")}return R`<div
1263
1266
  style="display:contents"
1264
- dataProvider="${r}"
1267
+ dataProvider="${i}"
1265
1268
  >
1266
- ${Kt(s)}
1267
- </div>`}return Kt(s)})}`}};ks([a({type:String})],ss.prototype,"fallBackRoute",2),ks([a({type:Object,attribute:!1})],ss.prototype,"routes",2),ks([a({type:String})],ss.prototype,"basePath",2),ks([a()],ss.prototype,"location",1),ss=ks([$(Sc)],ss);var $c=Object.getOwnPropertyDescriptor,Ac=(e,t,s,r)=>{for(var i=r>1?void 0:r?$c(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const kc="sonic-redirect";let Gn=class extends it(C){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")){at.changeFromComponent(this);return}if(!this.props)return;const e=this.getAttribute("onData").split("."),t=ot.traverse(this.props,e);t&&!(ot.isObject(t)&&t)&&at.changeFromComponent(this)}};Gn=Ac([$(kc)],Gn);var Dc=Object.defineProperty,Oc=Object.getOwnPropertyDescriptor,di=(e,t,s,r)=>{for(var i=r>1?void 0:r?Oc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Dc(t,s,i),i};const Ec="sonic-states";let Ds=class extends it(ys(C)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=e=>{this.state=e,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 e=this.statePath.split(".");for(const t of e)this.statePublisher=this.statePublisher[t];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(e){if(!this.states)return[];const t=[];for(const[s,r]of Object.entries(this.states)){if(s==="fallback"||!r)continue;const i=new RegExp(s);if(i.test(e)){const n=i.exec(e)||[s];n.shift(),t.push(r([...n]))}else try{const n=new ee("(/)*"+s+"*");if(n.match(e)){const o=n.match(e)||{};t.push(r(o))}}catch{e.indexOf(s.replace(document.location.origin,""))!=-1&&t.push(r({}))}}return t.length==0&&this.states?.fallback&&this.isConnected&&t.push(this.states.fallback()),t}render(){let e=this.state;(!Array.isArray(e)&&ot.isObject(e)||e===void 0)&&(e="");const t=this.handleStates(e);if(t.length>0)return v`${t}`;const s=[];for(const r of this.templatePartsList){let i=r.getAttribute(this.templateValueAttribute),n=e;if(this.inverted&&(n=i,i=e),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(n+""))s.push(r),r.removeAttribute("mode");else{const l=new ee(i);l.names.length>0&&l.match(n)&&(r.setAttribute("mode","patternMatching"),s.push(r))}}return v`${ni(s,(r,i)=>i+new Date().getTime(),r=>{if(r?.hasAttribute("dataProviderExpression")){const i=r.getAttribute("dataProviderExpression");let n="",o=e,l=r.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=l,l=e),l==""&&(l=this.inverted?"*":"^$"),r.getAttribute("mode")=="patternMatching"){const c=new ee(l);n=new ee(i).stringify(c.match(o))}else{const c=new RegExp(l),h=(o+"").match(c);h&&(n=h.shift()?.replace(c,i))}return v`<div
1269
+ ${rs(s)}
1270
+ </div>`}return rs(s)})}`}};Jr([h({type:String})],_r.prototype,"fallBackRoute",2),Jr([h({type:Object,attribute:!1})],_r.prototype,"routes",2),Jr([h({type:String})],_r.prototype,"basePath",2),Jr([h()],_r.prototype,"location",1),_r=Jr([X($u)],_r);var Du=Object.getOwnPropertyDescriptor,Eu=(t,e,s,i)=>{for(var r=i>1?void 0:i?Du(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Ou="sonic-redirect";let La=class extends nt(J){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")){ct.changeFromComponent(this);return}if(!this.props)return;const t=this.getAttribute("onData").split("."),e=at.traverse(this.props,t);e&&!(at.isObject(e)&&e)&&ct.changeFromComponent(this)}};La=Eu([X(Ou)],La);var Tu=Object.defineProperty,Lu=Object.getOwnPropertyDescriptor,qi=(t,e,s,i)=>{for(var r=i>1?void 0:i?Lu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Tu(e,s,r),r};const Mu="sonic-states";let Xr=class extends nt(Ur(J)){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,i]of Object.entries(this.states)){if(s==="fallback"||!i)continue;const r=new RegExp(s);if(r.test(t)){const n=r.exec(t)||[s];n.shift(),e.push(i([...n]))}else try{const n=new ps("(/)*"+s+"*");if(n.match(t)){const o=n.match(t)||{};e.push(i(o))}}catch{t.indexOf(s.replace(document.location.origin,""))!=-1&&e.push(i({}))}}return e.length==0&&this.states?.fallback&&this.isConnected&&e.push(this.states.fallback()),e}render(){let t=this.state;(!Array.isArray(t)&&at.isObject(t)||t===void 0)&&(t="");const e=this.handleStates(t);if(e.length>0)return R`${e}`;const s=[];for(const i of this.templatePartsList){let r=i.getAttribute(this.templateValueAttribute),n=t;if(this.inverted&&(n=r,r=t),r==""&&(r=this.inverted?".*?":"^$"),new RegExp(r).test(n+""))s.push(i),i.removeAttribute("mode");else{const c=new ps(r);c.names.length>0&&c.match(n)&&(i.setAttribute("mode","patternMatching"),s.push(i))}}return R`${Ii(s,(i,r)=>r+new Date().getTime(),i=>{if(i?.hasAttribute("dataProviderExpression")){const r=i.getAttribute("dataProviderExpression");let n="",o=t,c=i.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=c,c=t),c==""&&(c=this.inverted?"*":"^$"),i.getAttribute("mode")=="patternMatching"){const d=new ps(c);n=new ps(r).stringify(d.match(o))}else{const d=new RegExp(c),m=(o+"").match(d);m&&(n=m.shift()?.replace(d,r))}return R`<div
1268
1271
  style="display:contents"
1269
1272
  dataProvider="${n}"
1270
1273
  >
1271
- ${Kt(r)}
1272
- </div>`}return Kt(r)})}`}};di([a()],Ds.prototype,"state",2),di([a({type:Boolean,reflect:!0})],Ds.prototype,"inverted",2),di([a({type:Object})],Ds.prototype,"states",2),Ds=di([$(Ec)],Ds);var Lc=Object.getOwnPropertyDescriptor,Tc=(e,t,s,r)=>{for(var i=r>1?void 0:r?Lc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Ic="sonic-scope";let Yn=class extends C{createRenderRoot(){return this}render(){return v`<slot></slot>`}};Yn=Tc([$(Ic)],Yn);function Zn(e){return e instanceof HTMLElement||e instanceof ShadowRoot?e:null}function Xn(e){if(!e||typeof e.get!="function")return null;const t=e.get();return!t||typeof t!="object"||!("serviceURL"in t)?null:t}function hr(e){const t=Zn(e);return t?G.getApiConfiguration(t):null}function dr(e){return typeof e?.serviceURL=="string"&&e.serviceURL.length>0}const Mc=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function Nc(e){return e instanceof HTMLElement&&typeof e.updateComplete<"u"}function Qn(e){let t=null,s=[];return()=>{const r=new Promise((i,n)=>{s.push({resolve:i,reject:n})});return t!==null||(t=requestAnimationFrame(()=>{t=null;const i=s;s=[],e().then(n=>i.forEach(({resolve:o})=>o(n)),n=>i.forEach(({reject:o})=>o(n)))})),r}}function Jn(e,t){if(Nc(e)){let s=!1;return e.updateComplete.then(()=>{s||t()}),()=>{s=!0}}return t(),()=>{}}function to(e,t){const s=Zn(e);if(!s)return()=>{};let r=!1;const i=()=>{r||dr(hr(e))&&(r=!0,t())};if(i(),r)return()=>{};const n=[],o=requestAnimationFrame(()=>i());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>i());const l=new MutationObserver(()=>i());let c=s;for(;c;)c instanceof Element&&l.observe(c,{attributes:!0,attributeFilter:[...Mc]}),c=c.parentNode||c.host;return n.push(()=>l.disconnect()),()=>{r=!0,n.forEach(h=>h())}}class eo{constructor(){this.bindings=new WeakMap}bind(t,s){const r={run:s};let i=this.bindings.get(t);return i||(i=new Set,this.bindings.set(t,i)),i.add(r),()=>{const n=this.bindings.get(t);n&&(n.delete(r),n.size===0&&this.bindings.delete(t))}}run(t){const s=[...this.bindings.get(t)??[]].map(({run:r})=>r());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}function Rc(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function so(e,t){const s=t?.when??"after";return(r,i,n)=>{const o=n.value;if(!o)return;const l=function(...c){if(s==="before")return e(this).then(()=>o.apply(this,c));const h=o.apply(this,c);return Rc(h)?h.then(u=>e(this).then(()=>u)):e(this).then(()=>h)};n.value=l}}function Fc(e,t){return so(s=>e.refetch(s),t)}function jc(e,t){return so(s=>e.send(s),t)}function ui(e){e.configPublisher&&e.configMutationHandler&&e.configPublisher.offInternalMutation(e.configMutationHandler),e.configPublisher=null,e.configMutationHandler=null}function io(e,t,s){const r=e.path,i=ro(t)?void 0:t,n=ro(t)?t:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},l=i?.path,c=n?.triggerKey?.path,h=Lt(r),u=l?Lt(l):[],d=c?Lt(c):[],p=[...new Set([...h,...u,...d])],y=h.length>0,g=!!l,b=n?.refetchEveryMs??0,w=new eo,E=function(f,m){if(!f)return;Ie(f);const _=`__get_state_${m}`;f.__onConnected__(x=>{const O=x;let P=O[_];P||(P={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:b},O[_]=P),P.cleanupOperation?.(),P.cleanupOperation=null,P.cleanupWatchers.forEach(S=>S()),P.cleanupWatchers=[],P.requestGeneration++,P.refetchEveryMs=b,is(P);const F=()=>{is(P),!(!P.refetchEveryMs||P.refetchEveryMs<=0)&&(P.refetchTimeoutId=setTimeout(()=>{P.refetchTimeoutId=null,Z().catch(()=>{})},P.refetchEveryMs))},Z=async()=>{const S=y?Ct(x,r,o):{ready:!0,path:r};if(!S.ready||!S.path){O[m]=void 0,F();return}let Y=null;if(g&&l){const ce=Ct(x,l,o);if(!ce.ready||!ce.path){O[m]=void 0,F();return}const Ci=zt(ce.path);Y=Xn(Ci)}else Y=hr(x);if(!dr(Y)){if(!g&&!P.scopeWatchCleanup){const ce=to(x,At);P.scopeWatchCleanup=ce,P.cleanupWatchers.push(()=>{ce(),P.scopeWatchCleanup=null})}F();return}const Ft=++P.requestGeneration,Bt=await new me(Y).getDetailed(S.path);return Ft!==P.requestGeneration||(O[m]=Bt,F()),Bt},Pt=Qn(Z),At=()=>{Pt().catch(()=>{})};P.cleanupOperation=w.bind(x,Pt);const ls=()=>{if(pi(P),!c)return;const S=Ct(x,c,o);if(!S.ready||!S.path)return;const Y=zt(S.path);if(!Y)return;const Ft=At;Y.onInvalidate(Ft),P.triggerPublisher=Y,P.triggerInvalidateHandler=Ft},ut=()=>{if(!g||!l)return;ui(P);const S=Ct(x,l,o);if(!S.ready||!S.path){O[m]=void 0;return}const Y=zt(S.path);if(!Y){O[m]=void 0;return}const Ft=At;Y.onInternalMutation(Ft),P.configPublisher=Y,P.configMutationHandler=Ft},kt=()=>{ls(),ut(),g||At()};if(g||d.length){for(const S of p){const Y=be(ge.watcherStore,ge.hooked,x,S,()=>kt());P.cleanupWatchers.push(Y)}kt()}else{const S=()=>{if(y)for(const Y of h){const Ft=be(ge.watcherStore,ge.hooked,x,Y,At);P.cleanupWatchers.push(Ft)}ls(),Z().catch(()=>{})};P.cleanupWatchers.push(Jn(x,S))}}),f.__onDisconnected__(x=>{const O=x,P=O[_];P&&(P.cleanupOperation?.(),P.cleanupOperation=null,ui(P),pi(P),is(P),P.cleanupWatchers.forEach(F=>F()),P.cleanupWatchers=[],P.requestGeneration++,O[m]=void 0)})};return E.refetch=f=>w.run(f),E}function ro(e){return!e||typeof e!="object"?!1:"skipEmptyPlaceholder"in e||"refetchEveryMs"in e||"triggerKey"in e}function no(e){return!e||typeof e!="object"?!1:"refetchEveryMs"in e||"skipIfBodyMissing"in e||"autoPostOnBodyMutation"in e||"skipEmptyPlaceholder"in e||"triggerKey"in e}function oo(e){e.bodyPublisher&&e.bodyMutationHandler&&e.bodyPublisher.offInternalMutation(e.bodyMutationHandler),e.bodyPublisher=null,e.bodyMutationHandler=null}function pi(e){e.triggerPublisher&&e.triggerInvalidateHandler&&e.triggerPublisher.offInvalidate(e.triggerInvalidateHandler),e.triggerPublisher=null,e.triggerInvalidateHandler=null}function is(e){e.refetchTimeoutId&&(clearTimeout(e.refetchTimeoutId),e.refetchTimeoutId=null)}function zc(e){if(!(!e||typeof e.get!="function"))return e.get()}function ur(e,t){return function(s,r,i,n){const o=s.path,l=r.path,c=no(i)?void 0:i,h=no(i)?i:n,u=c?.path,d=h?.triggerKey?.path,p=Lt(o),y=Lt(l),g=u?Lt(u):[],b=d?Lt(d):[],w=[...new Set([...p,...y,...g,...b])],E=p.length>0,f=!!u,m=h?.refetchEveryMs??0,_=h?.skipIfBodyMissing??!0,x=h?.autoPostOnBodyMutation??!0,O={skipEmptyPlaceholder:h?.skipEmptyPlaceholder},P=`__${e.toLowerCase()}_state_`,F=new eo,Z=function(Pt,At){if(!Pt)return;Ie(Pt);const ls=`${P}${At}`;Pt.__onConnected__(ut=>{const kt=ut;let S=kt[ls];S||(S={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:m,skipIfBodyMissing:_,autoPostOnBodyMutation:x},kt[ls]=S),S.cleanupOperation?.(),S.cleanupOperation=null,S.cleanupWatchers.forEach(st=>st()),S.cleanupWatchers=[],S.requestGeneration++,S.refetchEveryMs=m,S.skipIfBodyMissing=_,S.autoPostOnBodyMutation=x,is(S);const Y=()=>{is(S),!(!S.refetchEveryMs||S.refetchEveryMs<=0)&&(S.refetchTimeoutId=setTimeout(()=>{S.refetchTimeoutId=null,Ft().catch(()=>{})},S.refetchEveryMs))},Ft=async()=>{const st=E?Ct(ut,o,O):{ready:!0,path:o};if(!st.ready||!st.path){kt[At]=void 0,Y();return}const nt=Ct(ut,l,O);if(!nt.ready||!nt.path){kt[At]=void 0,Y();return}const jt=zt(nt.path),Rr=zc(jt);if(S.skipIfBodyMissing&&Rr==null){Y();return}let Si=null;if(f&&u){const cs=Ct(ut,u,O);if(!cs.ready||!cs.path){kt[At]=void 0,Y();return}const ap=zt(cs.path);Si=Xn(ap)}else Si=hr(ut);if(!dr(Si)){if(!f&&!S.scopeWatchCleanup){const cs=to(ut,Bt);S.scopeWatchCleanup=cs,S.cleanupWatchers.push(()=>{cs(),S.scopeWatchCleanup=null})}Y();return}const np=++S.requestGeneration,op=new me(Si),Fr=await t(op,st.path,Rr);return np!==S.requestGeneration||(kt[At]=Fr,Y()),Fr},Nr=Qn(Ft),Bt=()=>{Nr().catch(()=>{})};S.cleanupOperation=F.bind(ut,Nr);const ce=()=>{if(oo(S),!S.autoPostOnBodyMutation)return;const st=Ct(ut,l,O);if(!st.ready||!st.path)return;const nt=zt(st.path);if(!nt)return;const jt=Bt;nt.onInternalMutation(jt),S.bodyPublisher=nt,S.bodyMutationHandler=jt},Ci=()=>{if(pi(S),!d)return;const st=Ct(ut,d,O);if(!st.ready||!st.path)return;const nt=zt(st.path);if(!nt)return;const jt=Bt;nt.onInvalidate(jt),S.triggerPublisher=nt,S.triggerInvalidateHandler=jt},rp=()=>{if(!f||!u)return;ui(S);const st=Ct(ut,u,O);if(!st.ready||!st.path){kt[At]=void 0;return}const nt=zt(st.path);if(!nt){kt[At]=void 0;return}const jt=Bt;nt.onInternalMutation(jt),S.configPublisher=nt,S.configMutationHandler=jt},So=()=>{ce(),Ci(),rp(),S.autoPostOnBodyMutation&&Bt()};if(f||y.length||b.length){for(const st of w){const nt=be(ge.watcherStore,ge.hooked,ut,st,()=>So());S.cleanupWatchers.push(nt)}So()}else{const st=()=>{if(E)for(const nt of p){const jt=be(ge.watcherStore,ge.hooked,ut,nt,Bt);S.cleanupWatchers.push(jt)}ce(),Ci(),S.autoPostOnBodyMutation&&Bt()};S.cleanupWatchers.push(Jn(ut,st))}}),Pt.__onDisconnected__(ut=>{const kt=ut,S=kt[ls];S&&(S.cleanupOperation?.(),S.cleanupOperation=null,ui(S),oo(S),pi(S),is(S),S.cleanupWatchers.forEach(Y=>Y()),S.cleanupWatchers=[],S.requestGeneration++,kt[At]=void 0)})};return Z.send=Pt=>F.run(Pt),Z}}function Uc(e,t,s,r){return ur("POST",(i,n,o)=>i.postDetailed(n,o))(e,t,s,r)}function Vc(e,t,s,r){return ur("PUT",(i,n,o)=>i.putDetailed(n,o))(e,t,s,r)}function Bc(e,t,s,r){return ur("PATCH",(i,n,o)=>i.patchDetailed(n,o))(e,t,s,r)}const Hc=Mn,qc=Nn,Wc=io;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:In,publish:Mn,subscribe:Nn,onAssing:xl,handle:Cl,ancestorAttribute:ir,autoSubscribe:Sl,autoFill:$l,get:io,post:Uc,put:Vc,patch:Bc,refetch:Fc,send:jc};var Kc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,fi=(e,t,s,r)=>{for(var i=r>1?void 0:r?Gc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Kc(t,s,i),i};const ao=new ei("communes?limit=$limit&fields=nom,code"),lo=new hs(ao.path),Yc="sonic-example";let Os=class extends C{constructor(){super(...arguments),this.limit=5}render(){return v` <span part="api-get-demo">
1274
+ ${rs(i)}
1275
+ </div>`}return rs(i)})}`}};qi([h()],Xr.prototype,"state",2),qi([h({type:Boolean,reflect:!0})],Xr.prototype,"inverted",2),qi([h({type:Object})],Xr.prototype,"states",2),Xr=qi([X(Mu)],Xr);var Nu=Object.getOwnPropertyDescriptor,Iu=(t,e,s,i)=>{for(var r=i>1?void 0:i?Nu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Fu="sonic-scope";let Ma=class extends J{createRenderRoot(){return this}render(){return R`<slot></slot>`}};Ma=Iu([X(Fu)],Ma);function Na(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function Ia(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function Kn(t){const e=Na(t);return e?Ke.getApiConfiguration(e):null}function Yn(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const ju=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function Ru(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function Fa(t){let e=null,s=[];return()=>{const i=new Promise((r,n)=>{s.push({resolve:r,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const r=s;s=[],t().then(n=>r.forEach(({resolve:o})=>o(n)),n=>r.forEach(({reject:o})=>o(n)))})),i}}function ja(t,e){if(Ru(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function Ra(t,e){const s=Na(t);if(!s)return()=>{};let i=!1;const r=()=>{i||Yn(Kn(t))&&(i=!0,e())};if(r(),i)return()=>{};const n=[],o=requestAnimationFrame(()=>r());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>r());const c=new MutationObserver(()=>r());let d=s;for(;d;)d instanceof Element&&c.observe(d,{attributes:!0,attributeFilter:[...ju]}),d=d.parentNode||d.host;return n.push(()=>c.disconnect()),()=>{i=!0,n.forEach(m=>m())}}class za{constructor(){this.bindings=new WeakMap}bind(e,s){const i={run:s};let r=this.bindings.get(e);return r||(r=new Set,this.bindings.set(e,r)),r.add(i),()=>{const n=this.bindings.get(e);n&&(n.delete(i),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:i})=>i());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let Ua=0;function zu(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function qa(t,e){const s=e?.when??"after";return(i,r,n)=>{const o=n.value;if(!o)return;const c=function(...d){if(s==="before")return t(this).then(()=>o.apply(this,d));const m=o.apply(this,d);return zu(m)?m.then(k=>t(this).then(()=>k)):t(this).then(()=>m)};n.value=c}}function Uu(t,e){return qa(s=>t.refetch(s),e)}function qu(t,e){return qa(s=>t.send(s),e)}function Vi(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function Va(t,e,s){const i=t.path,r=Ba(e)?void 0:e,n=Ba(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},c=r?.path,d=n?.triggerKey?.path,m=Ut(i),k=c?Ut(c):[],g=d?Ut(d):[],f=[...new Set([...m,...k,...g])],A=m.length>0,E=!!c,O=n?.refetchEveryMs??0,I=new za,U=new WeakMap,x=new WeakSet,y=new WeakMap;let N;const C=function($,G,z){if(z){const se=z.value;if(!se)return;C.registerResultHandler($,(ie,q)=>se.call(ie,q));return}if(!$)return;if(x.has($)){y.get($)?.add(G);return}x.add($),y.set($,new Set([G])),Js($);const ne=`__get_state_${G}`;$.__onConnected__(se=>{const ie=se;let q=ie[ne];q||(q={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:O},ie[ne]=q),q.cleanupOperation?.(),q.cleanupOperation=null,q.cleanupWatchers.forEach(xe=>xe()),q.cleanupWatchers=[],q.requestGeneration++,q.refetchEveryMs=O,xr(q);const le=()=>{xr(q),!(!q.refetchEveryMs||q.refetchEveryMs<=0)&&(q.refetchTimeoutId=setTimeout(()=>{q.refetchTimeoutId=null,Ue().catch(()=>{})},q.refetchEveryMs))},pe=xe=>{y.get($)?.forEach(b=>{ie[b]=xe})},Ue=async()=>{const xe=A?Ot(se,i,o):{ready:!0,path:i};if(!xe.ready||!xe.path){pe(void 0),le();return}let b=null;if(E&&c){const _e=Ot(se,c,o);if(!_e.ready||!_e.path){pe(void 0),le();return}const De=Gt(_e.path);b=Ia(De)}else b=Kn(se);if(!Yn(b)){if(!E&&!q.scopeWatchCleanup){const _e=Ra(se,be);q.scopeWatchCleanup=_e,q.cleanupWatchers.push(()=>{_e(),q.scopeWatchCleanup=null})}le();return}const _=++q.requestGeneration,ve=await new Ds(b).getDetailed(xe.path);return _!==q.requestGeneration||(y.get($)?.forEach(_e=>{ie[_e]=ve}),le(),U.get($)?.forEach(_e=>_e(se,ve))),ve},he=Fa(Ue),be=()=>{he().catch(()=>{})};q.cleanupOperation=I.bind(se,he);const ke=()=>{if(Bi(q),!d)return;const xe=Ot(se,d,o);if(!xe.ready||!xe.path)return;const b=Gt(xe.path);if(!b)return;const _=be;b.onInvalidate(_),q.triggerPublisher=b,q.triggerInvalidateHandler=_},ce=()=>{if(!E||!c)return;Vi(q);const xe=Ot(se,c,o);if(!xe.ready||!xe.path){pe(void 0);return}const b=Gt(xe.path);if(!b){pe(void 0);return}const _=be;b.onInternalMutation(_),q.configPublisher=b,q.configMutationHandler=_},W=()=>{ke(),ce(),E||be()};if(E||g.length){for(const xe of f){const b=Es(Os.watcherStore,Os.hooked,se,xe,()=>W());q.cleanupWatchers.push(b)}W()}else{const xe=()=>{if(A)for(const b of m){const _=Es(Os.watcherStore,Os.hooked,se,b,be);q.cleanupWatchers.push(_)}ke(),Ue().catch(()=>{})};q.cleanupWatchers.push(ja(se,xe))}}),$.__onDisconnected__(se=>{const ie=se,q=ie[ne];q&&(q.cleanupOperation?.(),q.cleanupOperation=null,Vi(q),Bi(q),xr(q),q.cleanupWatchers.forEach(le=>le()),q.cleanupWatchers=[],q.requestGeneration++,y.get($)?.forEach(le=>{ie[le]=void 0}))})};return C.refetch=$=>I.run($),C.registerResultHandler=($,G)=>{let z=U.get($);z||(z=new Set,U.set($,z)),z.add(G),x.has($)||(N??=`__get_handler_${Ua++}`,C($,N))},C}function Ba(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function Ha(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function Wa(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function Bi(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function xr(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function Vu(t){if(!(!t||typeof t.get!="function"))return t.get()}function Gn(t,e){return function(s,i,r,n){const o=s.path,c=i.path,d=Ha(r)?void 0:r,m=Ha(r)?r:n,k=d?.path,g=m?.triggerKey?.path,f=Ut(o),A=Ut(c),E=k?Ut(k):[],O=g?Ut(g):[],I=[...new Set([...f,...A,...E,...O])],U=f.length>0,x=!!k,y=m?.refetchEveryMs??0,N=m?.skipIfBodyMissing??!0,C=m?.autoPostOnBodyMutation??!0,$={skipEmptyPlaceholder:m?.skipEmptyPlaceholder},G=`__${t.toLowerCase()}_state_`,z=new za,ne=new WeakMap,se=new WeakSet,ie=new WeakMap;let q;const le=function(pe,Ue,he){if(he){const ke=he.value;if(!ke)return;le.registerResultHandler(pe,(ce,W)=>ke.call(ce,W));return}if(!pe)return;if(se.has(pe)){ie.get(pe)?.add(Ue);return}se.add(pe),ie.set(pe,new Set([Ue])),Js(pe);const be=`${G}${Ue}`;pe.__onConnected__(ke=>{const ce=ke;let W=ce[be];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:N,autoPostOnBodyMutation:C},ce[be]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach(D=>D()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=y,W.skipIfBodyMissing=N,W.autoPostOnBodyMutation=C,xr(W);const xe=()=>{xr(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},b=D=>{ie.get(pe)?.forEach(j=>{ce[j]=D})},_=async()=>{const D=U?Ot(ke,o,$):{ready:!0,path:o};if(!D.ready||!D.path){b(void 0),xe();return}const j=Ot(ke,c,$);if(!j.ready||!j.path){b(void 0),xe();return}const V=Gt(j.path),H=Vu(V);if(W.skipIfBodyMissing&&H==null){xe();return}let F=null;if(x&&k){const ge=Ot(ke,k,$);if(!ge.ready||!ge.path){b(void 0),xe();return}const fe=Gt(ge.path);F=Ia(fe)}else F=Kn(ke);if(!Yn(F)){if(!x&&!W.scopeWatchCleanup){const ge=Ra(ke,ve);W.scopeWatchCleanup=ge,W.cleanupWatchers.push(()=>{ge(),W.scopeWatchCleanup=null})}xe();return}const Y=++W.requestGeneration,ae=new Ds(F);let Pe;try{Pe=await e(ae,D.path,H)}catch(ge){throw Y===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe(ke,void 0)),ge}return Y!==W.requestGeneration||(b(Pe),xe(),ne.get(pe)?.forEach(ge=>ge(ke,Pe))),Pe},Q=Fa(_),ve=()=>{Q().catch(()=>{})};W.cleanupOperation=z.bind(ke,Q);const _e=()=>{if(Wa(W),!W.autoPostOnBodyMutation)return;const D=Ot(ke,c,$);if(!D.ready||!D.path)return;const j=Gt(D.path);if(!j)return;const V=ve;j.onInternalMutation(V),W.bodyPublisher=j,W.bodyMutationHandler=V},De=()=>{if(Bi(W),!g)return;const D=Ot(ke,g,$);if(!D.ready||!D.path)return;const j=Gt(D.path);if(!j)return;const V=ve;j.onInvalidate(V),W.triggerPublisher=j,W.triggerInvalidateHandler=V},T=()=>{if(!x||!k)return;Vi(W);const D=Ot(ke,k,$);if(!D.ready||!D.path){b(void 0);return}const j=Gt(D.path);if(!j){b(void 0);return}const V=ve;j.onInternalMutation(V),W.configPublisher=j,W.configMutationHandler=V},M=()=>{_e(),De(),T(),W.autoPostOnBodyMutation&&ve()};if(x||A.length||O.length){for(const D of I){const j=Es(Os.watcherStore,Os.hooked,ke,D,()=>M());W.cleanupWatchers.push(j)}M()}else{const D=()=>{if(U)for(const j of f){const V=Es(Os.watcherStore,Os.hooked,ke,j,ve);W.cleanupWatchers.push(V)}_e(),De(),W.autoPostOnBodyMutation&&ve()};W.cleanupWatchers.push(ja(ke,D))}}),pe.__onDisconnected__(ke=>{const ce=ke,W=ce[be];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,Vi(W),Wa(W),Bi(W),xr(W),W.cleanupWatchers.forEach(xe=>xe()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(xe=>{ce[xe]=void 0}))})};return le.send=pe=>z.run(pe),le.registerResultHandler=(pe,Ue)=>{let he=ne.get(pe);he||(he=new Set,ne.set(pe,he)),he.add(Ue),se.has(pe)||(q??=`__${t.toLowerCase()}_handler_${Ua++}`,le(pe,q))},le}}function Bu(t,e,s,i){return Gn("POST",(r,n,o)=>r.postDetailed(n,o))(t,e,s,i)}function Hu(t,e,s,i){return Gn("PUT",(r,n,o)=>r.putDetailed(n,o))(t,e,s,i)}function Wu(t,e,s,i){return Gn("PATCH",(r,n,o)=>r.patchDetailed(n,o))(t,e,s,i)}const Ku=wa,Yu=_a,Gu=Va;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:ya,publish:wa,subscribe:_a,onAssing:Ah,handle:kh,ancestorAttribute:zn,autoSubscribe:$h,autoFill:Dh,get:Va,post:Bu,put:Hu,patch:Wu,refetch:Uu,send:qu};var Zu=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,Hi=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ju(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Zu(e,s,r),r};const Ka=new $i("communes?limit=$limit&fields=nom,code"),Ya=new Ss(Ka.path),Xu="sonic-example";let Qr=class extends J{constructor(){super(...arguments),this.limit=5}render(){return R` <span part="api-get-demo">
1273
1276
  · get: ${JSON.stringify(this.geoCommunesPayload?.result??null)} · HTTP
1274
1277
  ${this.geoCommunesPayload?.response?.status??"—"} · subscribe:
1275
1278
  ${JSON.stringify(this.geoCommunesResult??null)}</span
1276
- >`}};fi([a({type:Number})],Os.prototype,"limit",2),fi([Wc(ao),Hc(lo)],Os.prototype,"geoCommunesPayload",2),fi([T(),qc(lo.result)],Os.prototype,"geoCommunesResult",2),Os=fi([$(Yc)],Os);const Zc={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 Xc{async transform(t,s){if(this.sduiDescriptor=t,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(t){const s=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,s)}getNodesMatchingPatterns(t,s){if(!t)return[];if(!s)return[];const r=s.nodes;if(!r)return[];let i=[],n=0;for(const o of t)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(t,s){return!s||t&&t.match(s)}nodeMatchesPattern(t,s){const r=t,i=s,n=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of n)if(!this.stringMatchesExpression(i[c],r[c]))return!1;const o=t.attributes,l=s.attributes;if(o&&!l)return!1;if(o){for(const c in o)if(!l||!this.stringMatchesExpression(l[c],o[c]))return!1}return!0}unwrap(t,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(t,s){const r={...t.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&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,r))}move(t,s){for(const r of s){r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1);let i=[];t.after&&(i=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(i=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const n=i[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(t.after?1:0),0,r.child)}}remap(t,s){for(const r of s){const i={...t.ui};i.attributes||(i.attributes={});const n=r.child.attributes;if(n)for(const d in n)Object.prototype.hasOwnProperty.call(i.attributes,"key")||(i.attributes[d]=n[d]);const o=["libraryKey","innerHTML","prefix","suffix","markup"],l=r.child,c=i;for(const d of o)!Object.prototype.hasOwnProperty.call(i,d)&&l[d]&&(c[d]=l[d]);i.nodes||(i.nodes=[]);const h=r.child.nodes;if(h)for(const d of h)i.nodes.push(d);const u=r.parent.nodes?.indexOf(r.child)||-1;u!=-1&&(r.parent.nodes?.splice(u,1),r.parent.nodes?.splice(u,0,i))}}delete(t,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1)}insert(t,s){const r=t.after?"after":t.before?"before":"in";s=[],t.after?s=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?s=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(s=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const i=s[0];i&&(r=="in"?(i.child.nodes||(i.child.nodes=[]),i.child.nodes.push({...t.ui})):i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child)+(r=="after"?1:0),0,{...t.ui}))}}var Qc=Object.defineProperty,Jc=Object.getOwnPropertyDescriptor,pr=(e,t,s,r)=>{for(var i=r>1?void 0:r?Jc(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Qc(t,s,i),i};const th="sonic-sdui";let mi=class extends Un(ve(C)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(e){this.props==null&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(e)}async updateContents(){if(!this.sduiDescriptor)return;const e={};Object.assign(e,Zc,this.sduiDescriptor.library),this.sduiDescriptor.library=e,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(e=>e.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const e of this.sduiDescriptor.js)ie.loadJS(e);if(this.sduiDescriptor.css)for(const e of this.sduiDescriptor.css)ie.loadCSS(e)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new Xc().transform(this.sduiDescriptor,t)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=t}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let e=this.sduiDescriptor.nodes;e||(e=[]);const t={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(t.attributes={subDataProvider:this.messagesKey}),e.push(t),e.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(e){const t=e.tagName||"div";let{element:s,contentElement:r}=this.handleLibrary(e,t);return this.handleAttributes(e,s),s=this.handleMarkup(e,s),r||(r=s),this.handleChildNodes(e,r,s),this.handleInnerHTML(e,r),e.prefix||e.suffix?this.handlePrefixSuffix(e,s):s}handlePrefixSuffix(e,t){const s=document.createElement("div");return s.innerHTML=(e.prefix||"")+t.outerHTML+(e.suffix||""),s.style.display="contents",s}handleChildNodes(e,t,s){if(e.nodes){const r=e.nodes;for(const i of r){const n=this.parseChild(i);let o=t;i.parentElementSelector&&(o=s.querySelector(i.parentElementSelector)||t),o.shadowRoot?o.shadowRoot.appendChild(n):o.tagName.toLocaleLowerCase()=="template"?o.content.appendChild(n):o.appendChild(n)}}}handleLibrary(e,t){let s,r;if(e.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[e.libraryKey]||{tagName:"div"});const i=(this.sduiDescriptor.library[e.libraryKey]||{}).contentElementSelector;i&&(r=s.querySelector(i))}else s=document.createElement(t);return{element:s,contentElement:r}}handleAttributes(e,t){const s=e.attributes;for(const r in s){const i=s[r],n=_s.isObject(i)?JSON.stringify(i):i;t.setAttribute(r,n)}}handleMarkup(e,t){return e.markup&&(t=document.createElement("div"),t.style.display="contents",t.innerHTML=e.markup),t}handleInnerHTML(e,t){if(e.innerHTML)if(e.innerHTML.indexOf("wording_")!=-1){const s=this.getAncestorAttributeValue("wordingProvider");this.api?.post(s,{labels:[e.innerHTML.substring(8)]}).then(r=>{t&&(t.innerHTML+=r)})}else t&&(t.innerHTML+=e.innerHTML)}};pr([a()],mi.prototype,"sduiKey",2),pr([a()],mi.prototype,"messagesKey",2),mi=pr([$(th)],mi);var eh=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,co=(e,t,s,r)=>{for(var i=r>1?void 0:r?sh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&eh(t,s,i),i};let bi=class extends ve(C){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(e){this._composition=e,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 e=this.listeners;this.listeners=[],e.forEach(t=>{this.publisher.offAssign(t.subscriber)})}parseComposition(e,t){if(e)for(const s in e){const r=e[s];if(typeof r=="string"){const i=r.split("."),n=i.shift();if(!n)continue;let o=L.get(n);o=_s.traverse(o,i);const l={publisher:o,subscriber:c=>{t[s]=c}};this.listeners.push(l),o.onAssign(l.subscriber),t._proxies_.set(s,o)}else{this.publisher[s]={};const i=new ds({},t);t._proxies_.set(s,i);const n={publisher:i,subscriber:o=>{t[s]=o}};this.listeners.push(n),i.onAssign(n.subscriber),this.parseComposition(r,i)}}}render(){return v`<slot></slot>`}};bi.styles=[A`
1279
+ >`}};Hi([h({type:Number})],Qr.prototype,"limit",2),Hi([Gu(Ka),Ku(Ya)],Qr.prototype,"geoCommunesPayload",2),Hi([Ae(),Yu(Ya.result)],Qr.prototype,"geoCommunesResult",2),Qr=Hi([X(Xu)],Qr);const Qu={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 ed{async transform(e,s){if(this.sduiDescriptor=e,this.sduiDescriptor.library)for(const i in s.library)this.sduiDescriptor.library[i]=s.library[i];for(const i of s.transforms)this.transformAction(i)}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 i=s.nodes;if(!i)return[];let r=[],n=0;for(const o of e)for(const c of i)this.nodeMatchesPattern(o,c)&&r.push({parent:s,child:c,index:n}),r=r.concat(this.getNodesMatchingPatterns([o],c)),n++;return r}stringMatchesExpression(e,s){return!s||e&&e.match(s)}nodeMatchesPattern(e,s){const i=e,r=s,n=["libraryKey","innerHTML","prefix","suffix","markup"];for(const d of n)if(!this.stringMatchesExpression(r[d],i[d]))return!1;const o=e.attributes,c=s.attributes;if(o&&!c)return!1;if(o){for(const d in o)if(!c||!this.stringMatchesExpression(c[d],o[d]))return!1}return!0}unwrap(e,s){for(const i of s)i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1),i.child.nodes&&i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),0,...i.child.nodes)}wrap(e,s){const i={...e.ui};i.nodes||(i.nodes=[]);let r=0;for(const o of s)i.nodes?.push(o.child),r>0&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child),1),r++;const n=s[0]?.parent.nodes?.indexOf(s[0].child);n&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,i))}move(e,s){for(const i of s){i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1);let r=[];e.after&&(r=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor)),e.before&&(r=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor));const n=r[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(e.after?1:0),0,i.child)}}remap(e,s){for(const i of s){const r={...e.ui};r.attributes||(r.attributes={});const n=i.child.attributes;if(n)for(const g in n)Object.prototype.hasOwnProperty.call(r.attributes,"key")||(r.attributes[g]=n[g]);const o=["libraryKey","innerHTML","prefix","suffix","markup"],c=i.child,d=r;for(const g of o)!Object.prototype.hasOwnProperty.call(r,g)&&c[g]&&(d[g]=c[g]);r.nodes||(r.nodes=[]);const m=i.child.nodes;if(m)for(const g of m)r.nodes.push(g);const k=i.parent.nodes?.indexOf(i.child)||-1;k!=-1&&(i.parent.nodes?.splice(k,1),i.parent.nodes?.splice(k,0,r))}}delete(e,s){for(const i of s)i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1)}insert(e,s){const i=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 r=s[0];r&&(i=="in"?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...e.ui})):r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child)+(i=="after"?1:0),0,{...e.ui}))}}var td=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,Zn=(t,e,s,i)=>{for(var r=i>1?void 0:i?sd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&td(e,s,r),r};const rd="sonic-sdui";let Wi=class extends Ca(Ts(J)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){this.props==null&&(this.sduiDescriptor={});{const e=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==e)return;this.sduiDescriptor=e,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,Qu,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(t=>t.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)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 ed().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=>this.appendChild(this.parseChild(s)))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);return this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix?this.handlePrefixSuffix(t,s):s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const r of i){const n=this.parseChild(r);let o=e;r.parentElementSelector&&(o=s.querySelector(r.parentElementSelector)||e),o.shadowRoot?o.shadowRoot.appendChild(n):o.tagName.toLocaleLowerCase()=="template"?o.content.appendChild(n):o.appendChild(n)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const r=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;r&&(i=s.querySelector(r))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const r=s[i],n=Br.isObject(r)?JSON.stringify(r):r;e.setAttribute(i,n)}}handleMarkup(t,e){return t.markup&&(e=document.createElement("div"),e.style.display="contents",e.innerHTML=t.markup),e}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(i=>{e&&(e.innerHTML+=i)})}else e&&(e.innerHTML+=t.innerHTML)}};Zn([h()],Wi.prototype,"sduiKey",2),Zn([h()],Wi.prototype,"messagesKey",2),Wi=Zn([X(rd)],Wi);var id=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,Ga=(t,e,s,i)=>{for(var r=i>1?void 0:i?nd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&id(e,s,r),r};let Ki=class extends Ts(J){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 i=t[s];if(typeof i=="string"){const r=i.split("."),n=r.shift();if(!n)continue;let o=ye.get(n);o=Br.traverse(o,r);const c={publisher:o,subscriber:d=>{e[s]=d}};this.listeners.push(c),o.onAssign(c.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const r=new Lr({},e);e._proxies_.set(s,r);const n={publisher:r,subscriber:o=>{e[s]=o}};this.listeners.push(n),r.onAssign(n.subscriber),this.parseComposition(i,r)}}}render(){return R`<slot></slot>`}};Ki.styles=[ee`
1277
1280
  :host {
1278
1281
  display: contents;
1279
1282
  }
1280
- `],co([a({type:Object})],bi.prototype,"composition",1),bi=co([$("sonic-mix")],bi);var ih=Object.getOwnPropertyDescriptor,rh=(e,t,s,r)=>{for(var i=r>1?void 0:r?ih(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const nh="sonic-value";let ho=class extends ve(C){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?v`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:v`${U(this.props.toString())}<slot name="prefix"></slot><slot></slot
1281
- ><slot name="suffix"></slot>`}};ho=rh([$(nh)],ho);var oh=Object.defineProperty,ah=Object.getOwnPropertyDescriptor,fr=(e,t,s,r)=>{for(var i=r>1?void 0:r?ah(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&oh(t,s,i),i};const lh="sonic-t";let gi=class extends C{render(){return this.key?v`${va(this.key,this.unsafeHTML)}`:D}};fr([a({type:String})],gi.prototype,"key",2),fr([a({type:Boolean})],gi.prototype,"unsafeHTML",2),gi=fr([$(lh)],gi);var ch=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,Es=(e,t,s,r)=>{for(var i=r>1?void 0:r?hh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ch(t,s,i),i};const dh="sonic-badge";let Re=class extends C{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return v`
1283
+ `],Ga([h({type:Object})],Ki.prototype,"composition",1),Ki=Ga([X("sonic-mix")],Ki);var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,Pr=(t,e,s,i)=>{for(var r=i>1?void 0:i?ad(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&od(e,s,r),r};let Ms=class extends J{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=Dc({inputs:{input:new Ss(this.inputProvider)},output:new Ss(this.outputProvider),variables:this.formDataProvider?new Ss(this.formDataProvider):void 0,compute:async({input:s},i)=>{const r=Mc(t),n={...i??{},input:s};let o;try{o=await r.evaluate({},n)}catch(c){const d=c instanceof Error?c.message:String(c);throw new Error(`[sonic-jsonata] Évaluation : ${d}`)}return Nc(o,e),o}})}render(){return R`<slot></slot>`}};Ms.styles=[ee`
1284
+ :host {
1285
+ display: contents;
1286
+ }
1287
+ `],Pr([h({type:String})],Ms.prototype,"inputProvider",2),Pr([h({type:String})],Ms.prototype,"outputProvider",2),Pr([h({type:String})],Ms.prototype,"formDataProvider",2),Pr([h({type:String})],Ms.prototype,"expression",2),Pr([h({type:Object})],Ms.prototype,"outputSchema",2),Ms=Pr([X("sonic-jsonata")],Ms);var ld=Object.getOwnPropertyDescriptor,cd=(t,e,s,i)=>{for(var r=i>1?void 0:i?ld(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const hd="sonic-value";let Za=class extends Ts(J){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`${je(this.props.toString())}<slot name="prefix"></slot><slot></slot
1288
+ ><slot name="suffix"></slot>`}};Za=cd([X(hd)],Za);var ud=Object.defineProperty,dd=Object.getOwnPropertyDescriptor,Jn=(t,e,s,i)=>{for(var r=i>1?void 0:i?dd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ud(e,s,r),r};const pd="sonic-t";let Yi=class extends J{render(){return this.key?R`${nc(this.key,this.unsafeHTML)}`:re}};Jn([h({type:String})],Yi.prototype,"key",2),Jn([h({type:Boolean})],Yi.prototype,"unsafeHTML",2),Yi=Jn([X(pd)],Yi);var fd=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,ei=(t,e,s,i)=>{for(var r=i>1?void 0:i?gd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&fd(e,s,r),r};const bd="sonic-badge";let er=class extends J{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return R`
1282
1289
  <slot name="prefix"></slot>
1283
1290
  <slot></slot>
1284
1291
  <slot name="suffix"></slot>
1285
- `}};Re.styles=[Wt,A`
1292
+ `}};er.styles=[ss,ee`
1286
1293
  :host {
1287
1294
  --sc-badge-gap: 0.3em;
1288
1295
  --sc-badge-py: 0.35em;
@@ -1422,28 +1429,28 @@
1422
1429
  slot[name="prefix"] {
1423
1430
  flex-shrink: 0;
1424
1431
  }
1425
- `],Es([a({type:String,reflect:!0})],Re.prototype,"type",2),Es([a({type:String,reflect:!0})],Re.prototype,"variant",2),Es([a({type:String,reflect:!0})],Re.prototype,"size",2),Es([a({type:Boolean,reflect:!0})],Re.prototype,"ellipsis",2),Re=Es([$(dh)],Re);class uh{static fixBlankLink(t){const r=typeof require>"u"||typeof process!="object"?null:require("electron");t.target=="_blank"&&t.addEventListener("click",()=>{r?.shell.openExternal(t.href)})}}var ph=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,rs=(e,t,s,r)=>{for(var i=r>1?void 0:r?fh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ph(t,s,i),i};const mh="sonic-link";let we=class extends C{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(e){this._location=e,at.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(at.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",e=>{e.key==="Enter"&&this.shadowRoot?.querySelector("a")?.click()}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){at.offChange(this),super.disconnectedCallback()}set target(e){this._target=e,uh.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(e){e.preventDefault(),at.changeFromComponent(this)}updated(e){e.has("href")&&this.setFocusable()}render(){return this.href?v`
1432
+ `],ei([h({type:String,reflect:!0})],er.prototype,"type",2),ei([h({type:String,reflect:!0})],er.prototype,"variant",2),ei([h({type:String,reflect:!0})],er.prototype,"size",2),ei([h({type:Boolean,reflect:!0})],er.prototype,"ellipsis",2),er=ei([X(bd)],er);class md{static fixBlankLink(e){const i=typeof require>"u"||typeof process!="object"?null:require("electron");e.target=="_blank"&&e.addEventListener("click",()=>{i?.shell.openExternal(e.href)})}}var vd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,Sr=(t,e,s,i)=>{for(var r=i>1?void 0:i?yd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&vd(e,s,r),r};const wd="sonic-link";let Ns=class extends J{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,ct.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(ct.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",t=>{t.key==="Enter"&&this.shadowRoot?.querySelector("a")?.click()}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){ct.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,md.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),ct.changeFromComponent(this)}updated(t){t.has("href")&&this.setFocusable()}render(){return this.href?R`
1426
1433
  <a
1427
1434
  href="${this.href}"
1428
- aria-label=${this.ariaLabel||D}
1429
- target=${k(this.target)}
1435
+ aria-label=${this.ariaLabel||re}
1436
+ target=${te(this.target)}
1430
1437
  @click=${this.pushState?this.handlePushState:null}
1431
1438
  >
1432
1439
  <slot></slot>
1433
1440
  </a>
1434
- `:v`<slot></slot>`}};we.styles=[A`
1441
+ `:R`<slot></slot>`}};Ns.styles=[ee`
1435
1442
  a {
1436
1443
  color: inherit;
1437
1444
  text-decoration: none;
1438
1445
  display: contents;
1439
1446
  }
1440
- `],rs([a({type:String})],we.prototype,"href",2),rs([a({type:String,attribute:"data-aria-label"})],we.prototype,"ariaLabel",2),rs([a({type:String})],we.prototype,"autoActive",2),rs([a({type:String})],we.prototype,"target",1),rs([a({type:Boolean})],we.prototype,"pushState",2),we=rs([$(mh)],we);var bh=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,ns=(e,t,s,r)=>{for(var i=r>1?void 0:r?gh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&bh(t,s,i),i};const vh="sonic-progress";let _e=class extends C{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return v`
1441
- <progress value=${k(this.value)} max=${this.max}></progress>
1447
+ `],Sr([h({type:String})],Ns.prototype,"href",2),Sr([h({type:String,attribute:"data-aria-label"})],Ns.prototype,"ariaLabel",2),Sr([h({type:String})],Ns.prototype,"autoActive",2),Sr([h({type:String})],Ns.prototype,"target",1),Sr([h({type:Boolean})],Ns.prototype,"pushState",2),Ns=Sr([X(wd)],Ns);var _d=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,Ar=(t,e,s,i)=>{for(var r=i>1?void 0:i?xd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&_d(e,s,r),r};const Pd="sonic-progress";let Is=class extends J{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return R`
1448
+ <progress value=${te(this.value)} max=${this.max}></progress>
1442
1449
  <div class="slot-container">
1443
1450
  <slot></slot>
1444
1451
  <slot name="remaining"></slot>
1445
1452
  </div>
1446
- `}};_e.styles=[Wt,A`
1453
+ `}};Is.styles=[ss,ee`
1447
1454
  :host {
1448
1455
  --sc-progress-bg: var(
1449
1456
  --sc-input-bg,
@@ -1555,7 +1562,7 @@
1555
1562
  gap: 0.5em;
1556
1563
  margin-top: 0.15em;
1557
1564
  }
1558
- `],ns([a({type:Number})],_e.prototype,"value",2),ns([a({type:Number})],_e.prototype,"max",2),ns([a({type:Boolean})],_e.prototype,"invert",2),ns([a({type:String,reflect:!0})],_e.prototype,"type",2),ns([a({type:String,reflect:!0})],_e.prototype,"size",2),_e=ns([$(vh)],_e);const yh=A`
1565
+ `],Ar([h({type:Number})],Is.prototype,"value",2),Ar([h({type:Number})],Is.prototype,"max",2),Ar([h({type:Boolean})],Is.prototype,"invert",2),Ar([h({type:String,reflect:!0})],Is.prototype,"type",2),Ar([h({type:String,reflect:!0})],Is.prototype,"size",2),Is=Ar([X(Pd)],Is);const Sd=ee`
1559
1566
  .password-toggle {
1560
1567
  color: var(--sc-input-c);
1561
1568
  font-size: var(--sc-input-fs);
@@ -1566,7 +1573,7 @@
1566
1573
  :host([inlineContent]) .has-suffix .password-toggle {
1567
1574
  margin-right: 0;
1568
1575
  }
1569
- `,vi=A`
1576
+ `,Gi=ee`
1570
1577
  :host {
1571
1578
  --sc-label-fs: var(--sc-_fs, 1rem);
1572
1579
  --sc-label-fw: var(--sc-label-font-weight, 500);
@@ -1580,14 +1587,14 @@
1580
1587
  margin-bottom: 0.22em;
1581
1588
  display: block;
1582
1589
  }
1583
- `,yi=A`
1590
+ `,Zi=ee`
1584
1591
  .form-description {
1585
1592
  color: var(--sc-base-400, var(--sc-base-content, #000));
1586
1593
  font-size: 0.85em;
1587
1594
  margin-top: 0.2em;
1588
1595
  display: block;
1589
1596
  }
1590
- `,mr=A`
1597
+ `,Xn=ee`
1591
1598
  * {
1592
1599
  box-sizing: border-box;
1593
1600
  }
@@ -1946,21 +1953,21 @@
1946
1953
  * @license
1947
1954
  * Copyright 2018 Google LLC
1948
1955
  * SPDX-License-Identifier: BSD-3-Clause
1949
- */const br=fe(class extends Ye{constructor(e){if(super(e),e.type!==Ee.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in t)t[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(t)}const s=e.element.classList;for(const r of this.st)r in t||(s.remove(r),this.st.delete(r));for(const r in t){const i=!!t[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 Dt}});var wh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,B=(e,t,s,r)=>{for(var i=r>1?void 0:r?_h(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&wh(t,s,i),i};const xh="sonic-input";let z=class extends li(Xe(it(C))){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"),this.sameValueAsHandle=t=>this.pattern=this.escapeRegExp(t);const e=this.getFormPublisher();if(!e)return;e[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 e=this.getFormPublisher();if(!e)return;e[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(e){this.hasSlotOrProps(),this.autoActive&&e.has("value")&&(this.active=!!this.value),super.willUpdate(e)}setSelectionRange(e,t){this.input.setSelectionRange(e,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}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(e){if(!this.hasAttribute("inputDelayMs")){super.handleChange(e);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(e),parseInt(this.getAttribute("inputDelayMs")))}togglePasswordVisibility(e){e.preventDefault(),e.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const e={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return v`
1956
+ */const Qn=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.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((i=>i!==""))));for(const i in e)e[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(e)}const s=t.element.classList;for(const i of this.st)i in e||(s.remove(i),this.st.delete(i));for(const i in e){const r=!!e[i];r===this.st.has(i)||this.nt?.has(i)||(r?(s.add(i),this.st.add(i)):(s.remove(i),this.st.delete(i)))}return It}});var Ad=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,ze=(t,e,s,i)=>{for(var r=i>1?void 0:i?Cd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ad(e,s,r),r};const kd="sonic-input";let Ne=class extends Ri(br(nt(J))){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"),this.sameValueAsHandle=e=>this.pattern=this.escapeRegExp(e);const t=this.getFormPublisher();if(!t)return;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;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")))}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`
1950
1957
  <label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
1951
- >${this.label?U(this.label):""}<slot
1958
+ >${this.label?je(this.label):""}<slot
1952
1959
  name="label"
1953
1960
  @slotchange=${this.hasSlotOrProps}
1954
1961
  ></slot
1955
1962
  ></label>
1956
1963
 
1957
- <div @click=${this.inlineContentFocus} class="form-control ${br(e)}">
1964
+ <div @click=${this.inlineContentFocus} class="form-control ${Qn(t)}">
1958
1965
  <div part="content" class="${this.inlineContent?"form-element form-element-wrapper":"contents"}">
1959
1966
  <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
1960
1967
  <input
1961
1968
  data-form-element
1962
1969
  part="input"
1963
- id=${k(this.id||"form-element")}
1970
+ id=${te(this.id||"form-element")}
1964
1971
  part="input"
1965
1972
  class="form-element input"
1966
1973
  @input=${this.handleChange}
@@ -1969,25 +1976,25 @@
1969
1976
  ?disabled=${this.disabled}
1970
1977
  ?readonly=${this.readonly}
1971
1978
  ?autofocus=${this.autofocus}
1972
- list=${k(this.list)}
1973
- tabindex=${k(this.tabindex)}
1974
- pattern=${k(this.pattern)}
1975
- min=${k(this.min)}
1976
- max=${k(this.max)}
1977
- step=${k(this.step)}
1978
- inputmode=${k(this.inputmode)}
1979
- src=${k(this.src)}
1980
- minlength=${k(this.minlength)}
1981
- maxlength=${k(this.maxlength)}
1982
- placeholder=${k(this.placeholder)}
1979
+ list=${te(this.list)}
1980
+ tabindex=${te(this.tabindex)}
1981
+ pattern=${te(this.pattern)}
1982
+ min=${te(this.min)}
1983
+ max=${te(this.max)}
1984
+ step=${te(this.step)}
1985
+ inputmode=${te(this.inputmode)}
1986
+ src=${te(this.src)}
1987
+ minlength=${te(this.minlength)}
1988
+ maxlength=${te(this.maxlength)}
1989
+ placeholder=${te(this.placeholder)}
1983
1990
  ?required=${this.required}
1984
- autocomplete=${k(this.autocomplete)}
1985
- aria-label=${k(this.ariaLabel)}
1986
- aria-labelledby=${k(this.ariaLabelledby)}
1991
+ autocomplete=${te(this.autocomplete)}
1992
+ aria-label=${te(this.ariaLabel)}
1993
+ aria-labelledby=${te(this.ariaLabelledby)}
1987
1994
  .name=${this.name}
1988
1995
  .value=${this.value}
1989
1996
  />
1990
- ${this.showPasswordToggle?v`<sonic-button
1997
+ ${this.showPasswordToggle?R`<sonic-button
1991
1998
  shape="circle"
1992
1999
  class="password-toggle"
1993
2000
  @click=${this.togglePasswordVisibility}
@@ -2008,10 +2015,10 @@
2008
2015
  name="description"
2009
2016
  @slotchange=${this.hasSlotOrProps}
2010
2017
  class="${this.hasDescription?"form-description":"hidden"}"
2011
- >${this.description?v`${U(this.description)}`:D}</slot>
2018
+ >${this.description?R`${je(this.description)}`:re}</slot>
2012
2019
  <slot name="list"></slot>
2013
2020
  </div>
2014
- `}};z.styles=[Wt,mr,vi,yi,yh,A`
2021
+ `}};Ne.styles=[ss,Xn,Gi,Zi,Sd,ee`
2015
2022
  :host([type="hidden"]) {
2016
2023
  appearance: none !important;
2017
2024
  display: none !important;
@@ -2019,7 +2026,7 @@
2019
2026
  :host > .form-control {
2020
2027
  position: relative;
2021
2028
  }
2022
- `],B([a({type:String,reflect:!0})],z.prototype,"size",2),B([a({type:String})],z.prototype,"inputmode",2),B([a({type:String})],z.prototype,"list",2),B([a({type:String})],z.prototype,"placeholder",2),B([a({type:String})],z.prototype,"pattern",2),B([a({type:String})],z.prototype,"min",2),B([a({type:String})],z.prototype,"max",2),B([a({type:Boolean,reflect:!0})],z.prototype,"readonly",2),B([a({type:Number})],z.prototype,"step",2),B([a({type:Number})],z.prototype,"minlength",2),B([a({type:Number})],z.prototype,"maxlength",2),B([a({type:String})],z.prototype,"src",2),B([a({type:Boolean,reflect:!0})],z.prototype,"inlineContent",2),B([a({type:Boolean})],z.prototype,"disableInlineContentFocus",2),B([a({type:Boolean})],z.prototype,"showPasswordToggle",2),B([a({type:Boolean})],z.prototype,"autoActive",2),B([a({type:Boolean,reflect:!0})],z.prototype,"active",2),B([pt({slot:"label",flatten:!0})],z.prototype,"slotLabelNodes",2),B([pt({slot:"description",flatten:!0})],z.prototype,"slotDescriptionNodes",2),B([pt({slot:"suffix",flatten:!0})],z.prototype,"slotSuffixNodes",2),B([pt({slot:"prefix",flatten:!0})],z.prototype,"slotPrefixNodes",2),B([ue("input")],z.prototype,"input",2),B([T()],z.prototype,"hasDescription",2),B([T()],z.prototype,"hasLabel",2),B([T()],z.prototype,"hasSuffix",2),B([T()],z.prototype,"hasPrefix",2),B([T()],z.prototype,"isPassword",2),z=B([$(xh)],z);const uo=A`
2029
+ `],ze([h({type:String,reflect:!0})],Ne.prototype,"size",2),ze([h({type:String})],Ne.prototype,"inputmode",2),ze([h({type:String})],Ne.prototype,"list",2),ze([h({type:String})],Ne.prototype,"placeholder",2),ze([h({type:String})],Ne.prototype,"pattern",2),ze([h({type:String})],Ne.prototype,"min",2),ze([h({type:String})],Ne.prototype,"max",2),ze([h({type:Boolean,reflect:!0})],Ne.prototype,"readonly",2),ze([h({type:Number})],Ne.prototype,"step",2),ze([h({type:Number})],Ne.prototype,"minlength",2),ze([h({type:Number})],Ne.prototype,"maxlength",2),ze([h({type:String})],Ne.prototype,"src",2),ze([h({type:Boolean,reflect:!0})],Ne.prototype,"inlineContent",2),ze([h({type:Boolean})],Ne.prototype,"disableInlineContentFocus",2),ze([h({type:Boolean})],Ne.prototype,"showPasswordToggle",2),ze([h({type:Boolean})],Ne.prototype,"autoActive",2),ze([h({type:Boolean,reflect:!0})],Ne.prototype,"active",2),ze([bt({slot:"label",flatten:!0})],Ne.prototype,"slotLabelNodes",2),ze([bt({slot:"description",flatten:!0})],Ne.prototype,"slotDescriptionNodes",2),ze([bt({slot:"suffix",flatten:!0})],Ne.prototype,"slotSuffixNodes",2),ze([bt({slot:"prefix",flatten:!0})],Ne.prototype,"slotPrefixNodes",2),ze([Cs("input")],Ne.prototype,"input",2),ze([Ae()],Ne.prototype,"hasDescription",2),ze([Ae()],Ne.prototype,"hasLabel",2),ze([Ae()],Ne.prototype,"hasSuffix",2),ze([Ae()],Ne.prototype,"hasPrefix",2),ze([Ae()],Ne.prototype,"isPassword",2),Ne=ze([X(kd)],Ne);const Ja=ee`
2023
2030
  /*OMBRE*/
2024
2031
  :host([shadow]) .shadowable,
2025
2032
  :host([shadow="md"]) .shadowable,
@@ -2038,7 +2045,7 @@
2038
2045
  :host([shadow="none"]) .shadowable {
2039
2046
  box-shadow: none;
2040
2047
  }
2041
- `;var Ph=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,Gt=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ch(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ph(t,s,i),i};const Sh="sonic-pop";let ht=class extends C{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=e=>{e.key==="Escape"&&this.open&&(e.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(e){if(this.open&&this.noToggle)return;const t=e;e.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=e.target),this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent?.style?.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){G.everyAncestors(this,e=>{const t=e;if(!t.className)return!0;if([...t.classList].includes("@container")){const s=t.style;s.zIndex="999999999";const r=getComputedStyle(t);return r.position!=="relative"&&r.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(e),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(e=>{e.style.removeProperty("position"),e.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(e){const t=e.composedPath(),s=t[0];ht.pops.forEach(r=>{const i=t.includes(r),n=t.includes(r.querySelector('[slot="content"]')),o=G.getAncestorAttributeValue(s,"data-on-select")==="keep";e.type=="pointerdown"&&i||e.type=="click"&&(i&&o||!n)||r.hide()})}connectedCallback(){super.connectedCallback(),ht.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),ht.pops.add(this)}firstUpdated(e){super.firstUpdated(e),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),ht.pops.delete(this),ht.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(e){const t=e.split(" "),s=t[0];let r=t[1];const i=5,n=this.getBoundingClientRect(),l=G.getScrollableAncestor(this.popContent)?.getBoundingClientRect(),c=Math.max(0,l?.left||0)+i,h=Math.max(0,l?.top||0)+i,u=Math.min(window.innerWidth,l?.right||window.innerWidth)-i,d=Math.min(window.innerHeight,l?.bottom||window.innerHeight)-i,p=n.left,y=n.top;let g=p,b=y,w=this.popContent?.getBoundingClientRect();const E=y-w.height,f=p-w.width,m=p+n.width,_=y+n.height,x=p+(n.width-w.width)*.5,O=y+(n.height-w.height)*.5;switch(s){case"bottom":b=_,r=="center"&&(g=x);break;case"top":b=E,r=="center"&&(g=x);break;case"left":g=f,r=="center"&&(b=O);break;case"right":g=m,r=="center"&&(b=O);break}this.lastContentX+=g-w.x,this.lastContentY+=b-w.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),w=this.popContent?.getBoundingClientRect(),w.x<c&&s=="left"&&(g=m),w.y<h&&s=="top"&&(b=_),w.x+w.width>u&&s=="right"&&(g=f),w.y+w.height>d&&s=="bottom"&&(b=E),this.lastContentX+=g-w.x,this.lastContentY+=b-w.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),w=this.popContent?.getBoundingClientRect(),w.x<c&&(this.lastContentX+=c-w.x),w.y<h&&(this.lastContentY+=h-w.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),w=this.popContent?.getBoundingClientRect(),w.x+w.width>u&&(this.lastContentX+=u-(w.x+w.width)),w.y+w.height>d&&(this.lastContentY+=d-(w.y+w.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return v`
2048
+ `;var $d=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,is=(t,e,s,i)=>{for(var r=i>1?void 0:i?Dd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&$d(e,s,r),r};const Ed="sonic-pop";let dt=class extends J{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=t=>{t.key==="Escape"&&this.open&&(t.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}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.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent?.style?.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){Ke.everyAncestors(this,t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const i=getComputedStyle(e);return i.position!=="relative"&&i.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];dt.pops.forEach(i=>{const r=e.includes(i),n=e.includes(i.querySelector('[slot="content"]')),o=Ke.getAncestorAttributeValue(s,"data-on-select")==="keep";t.type=="pointerdown"&&r||t.type=="click"&&(r&&o||!n)||i.hide()})}connectedCallback(){super.connectedCallback(),dt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),dt.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),dt.pops.delete(this),dt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(t){const e=t.split(" "),s=e[0];let i=e[1];const r=5,n=this.getBoundingClientRect(),c=Ke.getScrollableAncestor(this.popContent)?.getBoundingClientRect(),d=Math.max(0,c?.left||0)+r,m=Math.max(0,c?.top||0)+r,k=Math.min(window.innerWidth,c?.right||window.innerWidth)-r,g=Math.min(window.innerHeight,c?.bottom||window.innerHeight)-r,f=n.left,A=n.top;let E=f,O=A,I=this.popContent?.getBoundingClientRect();const U=A-I.height,x=f-I.width,y=f+n.width,N=A+n.height,C=f+(n.width-I.width)*.5,$=A+(n.height-I.height)*.5;switch(s){case"bottom":O=N,i=="center"&&(E=C);break;case"top":O=U,i=="center"&&(E=C);break;case"left":E=x,i=="center"&&(O=$);break;case"right":E=y,i=="center"&&(O=$);break}this.lastContentX+=E-I.x,this.lastContentY+=O-I.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),I=this.popContent?.getBoundingClientRect(),I.x<d&&s=="left"&&(E=y),I.y<m&&s=="top"&&(O=N),I.x+I.width>k&&s=="right"&&(E=x),I.y+I.height>g&&s=="bottom"&&(O=U),this.lastContentX+=E-I.x,this.lastContentY+=O-I.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),I=this.popContent?.getBoundingClientRect(),I.x<d&&(this.lastContentX+=d-I.x),I.y<m&&(this.lastContentY+=m-I.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),I=this.popContent?.getBoundingClientRect(),I.x+I.width>k&&(this.lastContentX+=k-(I.x+I.width)),I.y+I.height>g&&(this.lastContentY+=g-(I.y+I.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return R`
2042
2049
  <slot
2043
2050
  @click=${this.manual?()=>{}:this.toggle}
2044
2051
  @keydown=${this.manual?()=>{}:this.toggle}
@@ -2052,7 +2059,7 @@
2052
2059
  class="shadowable
2053
2060
  ${this.open?"is-open":""}"
2054
2061
  ></slot>
2055
- `}};ht.pops=new Set,ht.styles=[A`
2062
+ `}};dt.pops=new Set,dt.styles=[ee`
2056
2063
  :host {
2057
2064
  display: inline-block;
2058
2065
  vertical-align: middle;
@@ -2084,11 +2091,11 @@
2084
2091
  :host([inline]) {
2085
2092
  vertical-align: baseline;
2086
2093
  }
2087
- `,uo],Gt([T()],ht.prototype,"open",2),Gt([ue("slot:not([name=content])")],ht.prototype,"popBtn",2),Gt([ue("slot[name=content]")],ht.prototype,"popContent",2),Gt([a({type:Boolean})],ht.prototype,"noToggle",2),Gt([a({type:Boolean,reflect:!0})],ht.prototype,"inline",2),Gt([a({type:Boolean})],ht.prototype,"manual",2),Gt([a({type:String,reflect:!0})],ht.prototype,"shadow",2),Gt([a({type:String})],ht.prototype,"placement",2),Gt([T()],ht.prototype,"triggerElement",2),ht=Gt([$(Sh)],ht);var $h=Object.getOwnPropertyDescriptor,Ah=(e,t,s,r)=>{for(var i=r>1?void 0:r?$h(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const kh="sonic-menu-item";let po=class extends j{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const e=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!e&&(this.align="left"),super.connectedCallback()}};po=Ah([$(kh)],po);/**
2094
+ `,Ja],is([Ae()],dt.prototype,"open",2),is([Cs("slot:not([name=content])")],dt.prototype,"popBtn",2),is([Cs("slot[name=content]")],dt.prototype,"popContent",2),is([h({type:Boolean})],dt.prototype,"noToggle",2),is([h({type:Boolean,reflect:!0})],dt.prototype,"inline",2),is([h({type:Boolean})],dt.prototype,"manual",2),is([h({type:String,reflect:!0})],dt.prototype,"shadow",2),is([h({type:String})],dt.prototype,"placement",2),is([Ae()],dt.prototype,"triggerElement",2),dt=is([X(Ed)],dt);var Od=Object.getOwnPropertyDescriptor,Td=(t,e,s,i)=>{for(var r=i>1?void 0:i?Od(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Ld="sonic-menu-item";let Xa=class extends Me{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()}};Xa=Td([X(Ld)],Xa);/**
2088
2095
  * @license
2089
2096
  * Copyright 2021 Google LLC
2090
2097
  * SPDX-License-Identifier: BSD-3-Clause
2091
- */class fo{constructor(t,{target:s,config:r,callback:i,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=r,this.o=n??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((o=>{this.handleChanges(o),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){this.value=this.callback?.(t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Dh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,ft=(e,t,s,r)=>{for(var i=r>1?void 0:r?Oh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Dh(t,s,i),i};let dt=class extends lr(Bn(Vn(ve(C)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new fo(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=e=>{if(e==""&&this.isSearchParameter()){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&this.isSearchParameter()&&(this.lastValidSearch=e,this.searchPublisher?.set(this.lastValidSearch))},this.updatePopContentVisibility=e=>{this.isPopVisible=(e?.length||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=e=>{const t=this.propertyName==="_self"?e:e[this.propertyName||this.name];this.formValuePublisher?.set(t)},this.findSearchedItem=e=>(this.propertyName==="_self"?e:e[this.propertyName||this.searchParameter||this.name])==this.searchPublisher?.get(),this.findSelection=e=>(this.propertyName==="_self"?e:e[this.propertyName||this.name])==this.value,this.setSearchFromSelection=e=>{this.lastValidSearch=this.propertyName==="_self"?e:e[this.searchParameter||this.propertyName||this.name],this.isSearchParameter()&&this.searchPublisher?.set(this.lastValidSearch)},this.updateActiveSelection=()=>{this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=this.searchPublisher?.get()&&this.formValuePublisher?.get()&&this.formValuePublisher?.set("")},this.handleFocusOut=e=>{setTimeout(()=>{const t=document.activeElement;if(!t){this.popElement.hide();return}const s=this.popElement.contains(t)||this.popElement.shadowRoot?.contains(t),r=this.contains(t)||this.shadowRoot?.contains(t);!s&&!r&&this.popElement.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}connectedCallback(){super.connectedCallback();const e=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),s=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${s}_init_search__`,this.initQueueDataProvider=`${s}_init_queue__`,this.searchDataProvider=`${s}_search__`,this.queueDataProvider=`${s}_queue__`;const r=L.get;this.searchPublisher=r(this.searchDataProvider)[e],this.formValuePublisher=yt(r(t),this.name),this.countPublisher=r(this.queueDataProvider).resultCount,this.initCountPublisher=r(this.initQueueDataProvider).resultCount,this.value&&L.get(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.countPublisher?.onAssign(this.updateActiveSelection),this.searchPublisher?.onAssign(this.updatePopContentVisibility)}firstUpdated(e){super.firstUpdated(e),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.countPublisher?.offAssign(this.updateActiveSelection);const e=L.get;e(this.initSearchDataProvider).delete(),e(this.initQueueDataProvider).delete(),e(this.searchDataProvider).delete(),e(this.queueDataProvider).delete(),this.searchPublisher?.offAssign(this.updatePopContentVisibility),this.popElement.removeEventListener("focusout",this.handleFocusOut)}queryQueueListItem(e,t,s){const r=L.get(e);let i,n=r.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){let l=L.get(o.dataProvider).get();if(Array.isArray(l)&&(i=l.find(t),i))break}return i?(s(i),!0):!1}setSelectionRange(e,t){this.querySelector("sonic-input")?.setSelectionRange(e,t)}handleHide(){if(this.select){if(this.searchPublisher?.get()==""){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.searchPublisher?.set(this.lastValidSearch)}}getInputValue(){return this.isSearchParameter()?this.searchPublisher?.get():this.lastValidSearch}handleFocus(){this.popElement.show()}render(){return v`
2098
+ */class Qa{constructor(e,{target:s,config:i,callback:r,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,s!==null&&this.t.add(s??e),this.l=i,this.o=n??this.o,this.callback=r,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 Md=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,mt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Nd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Md(e,s,r),r};let pt=class extends Hn($a(ka(Ts(J)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new Qa(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=t=>{if(t==""&&this.isSearchParameter()){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&this.isSearchParameter()&&(this.lastValidSearch=t,this.searchPublisher?.set(this.lastValidSearch))},this.updatePopContentVisibility=t=>{this.isPopVisible=(t?.length||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=t=>{const e=this.propertyName==="_self"?t:t[this.propertyName||this.name];this.formValuePublisher?.set(e)},this.findSearchedItem=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.searchParameter||this.name])==this.searchPublisher?.get(),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.isSearchParameter()&&this.searchPublisher?.set(this.lastValidSearch)},this.updateActiveSelection=()=>{this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=this.searchPublisher?.get()&&this.formValuePublisher?.get()&&this.formValuePublisher?.set("")},this.handleFocusOut=t=>{setTimeout(()=>{const e=document.activeElement;if(!e){this.popElement.hide();return}const s=this.popElement.contains(e)||this.popElement.shadowRoot?.contains(e),i=this.contains(e)||this.shadowRoot?.contains(e);!s&&!i&&this.popElement.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}connectedCallback(){super.connectedCallback();const t=this.searchParameter||this.name,e=this.getAncestorAttributeValue("formDataProvider"),s=e+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${s}_init_search__`,this.initQueueDataProvider=`${s}_init_queue__`,this.searchDataProvider=`${s}_search__`,this.queueDataProvider=`${s}_queue__`;const i=ye.get;this.searchPublisher=i(this.searchDataProvider)[t],this.formValuePublisher=kt(i(e),this.name),this.countPublisher=i(this.queueDataProvider).resultCount,this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&ye.get(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.countPublisher?.onAssign(this.updateActiveSelection),this.searchPublisher?.onAssign(this.updatePopContentVisibility)}firstUpdated(t){super.firstUpdated(t),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.countPublisher?.offAssign(this.updateActiveSelection);const t=ye.get;t(this.initSearchDataProvider).delete(),t(this.initQueueDataProvider).delete(),t(this.searchDataProvider).delete(),t(this.queueDataProvider).delete(),this.searchPublisher?.offAssign(this.updatePopContentVisibility),this.popElement.removeEventListener("focusout",this.handleFocusOut)}queryQueueListItem(t,e,s){const i=ye.get(t);let r,n=i.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){let c=ye.get(o.dataProvider).get();if(Array.isArray(c)&&(r=c.find(e),r))break}return r?(s(r),!0):!1}setSelectionRange(t,e){this.querySelector("sonic-input")?.setSelectionRange(t,e)}handleHide(){if(this.select){if(this.searchPublisher?.get()==""){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.searchPublisher?.set(this.lastValidSearch)}}getInputValue(){return this.isSearchParameter()?this.searchPublisher?.get():this.lastValidSearch}handleFocus(){this.popElement.show()}render(){return R`
2092
2099
  <sonic-pop manual style="display:block;" @hide=${this.handleHide}>
2093
2100
  <sonic-input
2094
2101
  class="form-element"
@@ -2097,18 +2104,18 @@
2097
2104
  formDataProvider="${this.searchDataProvider}"
2098
2105
  type="search"
2099
2106
  data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}"
2100
- label="${k(this.label)}"
2101
- description="${k(this.description)}"
2102
- name="${k(this.searchParameter||this.name)}"
2107
+ label="${te(this.label)}"
2108
+ description="${te(this.description)}"
2109
+ name="${te(this.searchParameter||this.name)}"
2103
2110
  ?required=${this.required}
2104
- placeholder="${k(this.placeholder)}"
2111
+ placeholder="${te(this.placeholder)}"
2105
2112
  ?readonly="${this.readonly}"
2106
2113
  autocomplete="off"
2107
2114
  clearable
2108
2115
  inlineContent
2109
2116
  size=${this.size}
2110
2117
  @focus=${this.handleFocus}
2111
- value=${k(this.getInputValue())}
2118
+ value=${te(this.getInputValue())}
2112
2119
  >
2113
2120
  <slot
2114
2121
  name="prefix"
@@ -2116,14 +2123,14 @@
2116
2123
  @slotchange=${this.hasSlotOrProps}
2117
2124
  ></slot>
2118
2125
 
2119
- ${this.select?v`
2126
+ ${this.select?R`
2120
2127
  <sonic-icon
2121
2128
  slot="suffix"
2122
2129
  class="select-chevron"
2123
2130
  name="nav-arrow-down"
2124
2131
  .size=${this.size}
2125
2132
  ></sonic-icon>
2126
- `:D}
2133
+ `:re}
2127
2134
  </sonic-input>
2128
2135
  <sonic-menu
2129
2136
  slot="content"
@@ -2153,7 +2160,7 @@
2153
2160
  </sonic-queue>
2154
2161
  </sonic-menu>
2155
2162
  </sonic-pop>
2156
- `}};dt.styles=[Ss,A`
2163
+ `}};pt.styles=[Yr,ee`
2157
2164
  :host {
2158
2165
  display: block;
2159
2166
  }
@@ -2174,7 +2181,7 @@
2174
2181
  min-width: 14rem;
2175
2182
  width: 100%;
2176
2183
  }
2177
- `],ft([a({type:String})],dt.prototype,"size",2),ft([a({type:String})],dt.prototype,"placeholder",2),ft([a()],dt.prototype,"filteredFields",2),ft([a({type:Boolean,reflect:!0})],dt.prototype,"readonly",2),ft([a({type:String})],dt.prototype,"dataProviderExpression",2),ft([a({type:Number})],dt.prototype,"minSearchLength",2),ft([a({type:Boolean})],dt.prototype,"select",2),ft([a({type:String})],dt.prototype,"key",2),ft([a({type:String})],dt.prototype,"searchParameter",2),ft([a({type:String})],dt.prototype,"propertyName",2),ft([pt({slot:"prefix",flatten:!0})],dt.prototype,"slotInputPrefixNodes",2),ft([T()],dt.prototype,"hasInputPrefix",2),ft([ue("sonic-pop")],dt.prototype,"popElement",2),ft([T()],dt.prototype,"isPopVisible",2),ft([T()],dt.prototype,"lastValidSearch",2),dt=ft([$("sonic-input-autocomplete")],dt);var Eh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,_t=(e,t,s,r)=>{for(var i=r>1?void 0:r?Lh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Eh(t,s,i),i};const Th="sonic-password-helper";let mt=class extends ve(C){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=t=>{t?(this.hasNoChar=t.length==0,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},L.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&L.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?v`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:v`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?D:v`
2184
+ `],mt([h({type:String})],pt.prototype,"size",2),mt([h({type:String})],pt.prototype,"placeholder",2),mt([h()],pt.prototype,"filteredFields",2),mt([h({type:Boolean,reflect:!0})],pt.prototype,"readonly",2),mt([h({type:String})],pt.prototype,"dataProviderExpression",2),mt([h({type:Number})],pt.prototype,"minSearchLength",2),mt([h({type:Boolean})],pt.prototype,"select",2),mt([h({type:String})],pt.prototype,"key",2),mt([h({type:String})],pt.prototype,"searchParameter",2),mt([h({type:String})],pt.prototype,"propertyName",2),mt([bt({slot:"prefix",flatten:!0})],pt.prototype,"slotInputPrefixNodes",2),mt([Ae()],pt.prototype,"hasInputPrefix",2),mt([Cs("sonic-pop")],pt.prototype,"popElement",2),mt([Ae()],pt.prototype,"isPopVisible",2),mt([Ae()],pt.prototype,"lastValidSearch",2),pt=mt([X("sonic-input-autocomplete")],pt);var Id=Object.defineProperty,Fd=Object.getOwnPropertyDescriptor,Dt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Fd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Id(e,s,r),r};const jd="sonic-password-helper";let vt=class extends Ts(J){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?re:R`
2178
2185
  <div>${this.wording_password_helper_decription}</div>
2179
2186
  <div>
2180
2187
  ${this.getIcon(this.hasEnoughChars)}
@@ -2195,11 +2202,11 @@
2195
2202
  ${this.getIcon(this.hasSpecialChar)}
2196
2203
  ${this.wording_password_helper_special_char}
2197
2204
  </div>
2198
- `}};_t([a()],mt.prototype,"name",2),_t([a()],mt.prototype,"minChars",2),_t([T()],mt.prototype,"hasNoChar",2),_t([T()],mt.prototype,"hasEnoughChars",2),_t([T()],mt.prototype,"hasMinuscule",2),_t([T()],mt.prototype,"hasMajuscule",2),_t([T()],mt.prototype,"hasNumber",2),_t([T()],mt.prototype,"hasSpecialChar",2),_t([a()],mt.prototype,"wording_password_helper_decription",2),_t([a()],mt.prototype,"wording_password_helper_min_length",2),_t([a()],mt.prototype,"wording_password_helper_lower_case",2),_t([a()],mt.prototype,"wording_password_helper_upper_case",2),_t([a()],mt.prototype,"wording_password_helper_number",2),_t([a()],mt.prototype,"wording_password_helper_special_char",2),mt=_t([$(Th)],mt);var Ih=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Fe=(e,t,s,r)=>{for(var i=r>1?void 0:r?Mh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ih(t,s,i),i};const Nh="sonic-same-value-helper";let xe=class extends ve(C){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const e=L.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=t=>{t?this.hasNoChar=t.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=yt(e,this.name).get()==yt(e,this.sameValueAs).get())},yt(e,this.name).onAssign(this.checkValue),yt(e,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const e=L.get(this.getAncestorAttributeValue("formDataProvider"));yt(e,this.name).offAssign(this.checkValue),yt(e,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?D:v`
2205
+ `}};Dt([h()],vt.prototype,"name",2),Dt([h()],vt.prototype,"minChars",2),Dt([Ae()],vt.prototype,"hasNoChar",2),Dt([Ae()],vt.prototype,"hasEnoughChars",2),Dt([Ae()],vt.prototype,"hasMinuscule",2),Dt([Ae()],vt.prototype,"hasMajuscule",2),Dt([Ae()],vt.prototype,"hasNumber",2),Dt([Ae()],vt.prototype,"hasSpecialChar",2),Dt([h()],vt.prototype,"wording_password_helper_decription",2),Dt([h()],vt.prototype,"wording_password_helper_min_length",2),Dt([h()],vt.prototype,"wording_password_helper_lower_case",2),Dt([h()],vt.prototype,"wording_password_helper_upper_case",2),Dt([h()],vt.prototype,"wording_password_helper_number",2),Dt([h()],vt.prototype,"wording_password_helper_special_char",2),vt=Dt([X(jd)],vt);var Rd=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,tr=(t,e,s,i)=>{for(var r=i>1?void 0:i?zd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Rd(e,s,r),r};const Ud="sonic-same-value-helper";let Fs=class extends Ts(J){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=kt(t,this.name).get()==kt(t,this.sameValueAs).get())},kt(t,this.name).onAssign(this.checkValue),kt(t,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ye.get(this.getAncestorAttributeValue("formDataProvider"));kt(t,this.name).offAssign(this.checkValue),kt(t,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?re:R`
2199
2206
  <span>
2200
- ${this.areEqual?U(this.descriptionWhenEqual):U(this.descriptionWhenNotEqual)}
2207
+ ${this.areEqual?je(this.descriptionWhenEqual):je(this.descriptionWhenNotEqual)}
2201
2208
  </span>
2202
- `}};Fe([a()],xe.prototype,"name",2),Fe([a()],xe.prototype,"sameValueAs",2),Fe([a()],xe.prototype,"descriptionWhenEqual",2),Fe([a()],xe.prototype,"descriptionWhenNotEqual",2),Fe([T()],xe.prototype,"areEqual",2),Fe([T()],xe.prototype,"hasNoChar",2),xe=Fe([$(Nh)],xe);var Rh=Object.defineProperty,Fh=Object.getOwnPropertyDescriptor,oe=(e,t,s,r)=>{for(var i=r>1?void 0:r?Fh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Rh(t,s,i),i};const jh="sonic-checkbox";let xt=class extends Xi(li(Xe(it(C)))){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(e){this.hasSlotOrProps(),super.willUpdate(e),e.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return v`
2209
+ `}};tr([h()],Fs.prototype,"name",2),tr([h()],Fs.prototype,"sameValueAs",2),tr([h()],Fs.prototype,"descriptionWhenEqual",2),tr([h()],Fs.prototype,"descriptionWhenNotEqual",2),tr([Ae()],Fs.prototype,"areEqual",2),tr([Ae()],Fs.prototype,"hasNoChar",2),Fs=tr([X(Ud)],Fs);var qd=Object.defineProperty,Vd=Object.getOwnPropertyDescriptor,vs=(t,e,s,i)=>{for(var r=i>1?void 0:i?Vd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&qd(e,s,r),r};const Bd="sonic-checkbox";let Et=class extends Mn(Ri(br(nt(J)))){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`
2203
2210
  <label class="checkbox-container ${this.disabled?"disabled":""}">
2204
2211
 
2205
2212
  <span class="icon-container">
@@ -2210,24 +2217,24 @@
2210
2217
  ?required=${this.required}
2211
2218
  ?data-indeterminate=${this.showAsIndeterminate}
2212
2219
  ?disabled=${this.disabled}
2213
- .checked=${k(this.checked)}
2220
+ .checked=${te(this.checked)}
2214
2221
  .name=${this.name}
2215
2222
  .value=${this.value}
2216
2223
  ?autofocus=${this.autofocus}
2217
- aria-label=${k(this.ariaLabel)}
2218
- aria-labelledby=${k(this.ariaLabelledby)}
2224
+ aria-label=${te(this.ariaLabel)}
2225
+ aria-labelledby=${te(this.ariaLabelledby)}
2219
2226
  />
2220
2227
  <sonic-icon name="${this.checked=="indeterminate"||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon>
2221
2228
  </span>
2222
2229
 
2223
2230
  <div class="checkbox-text ${!this.hasDescription&&!this.hasLabel?"hidden":"checkbox-text"}">
2224
- ${this.label?U(this.label):""}
2231
+ ${this.label?je(this.label):""}
2225
2232
  <slot @slotchange=${this.hasSlotOrProps}></slot>
2226
- <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?v`${U(this.description)}`:""}</slot>
2233
+ <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?R`${je(this.description)}`:""}</slot>
2227
2234
  </div>
2228
2235
  </label>
2229
2236
  </label>
2230
- `}};xt.styles=[Wt,A`
2237
+ `}};Et.styles=[ss,ee`
2231
2238
  :host {
2232
2239
  --sc-checkbox-border-width: var(--sc-form-border-width);
2233
2240
  --sc-checkbox-border-color: var(
@@ -2349,7 +2356,7 @@
2349
2356
  .hidden {
2350
2357
  display: none;
2351
2358
  }
2352
- `],oe([a({type:Boolean,reflect:!0})],xt.prototype,"touched",2),oe([a({type:String})],xt.prototype,"iconName",2),oe([a({type:String})],xt.prototype,"indeterminateIconName",2),oe([a({type:Boolean})],xt.prototype,"showAsIndeterminate",2),oe([a({type:Boolean})],xt.prototype,"hasDescription",2),oe([a({type:Boolean})],xt.prototype,"hasLabel",2),oe([pt({flatten:!0})],xt.prototype,"slotLabelNodes",2),oe([pt({slot:"description",flatten:!0})],xt.prototype,"slotDescriptionNodes",2),xt=oe([$(jh)],xt);var zh=Object.getOwnPropertyDescriptor,Uh=(e,t,s,r)=>{for(var i=r>1?void 0:r?zh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Vh="sonic-radio";let gr=class extends xt{constructor(){super(),this.radio=!0}willUpdate(e){const t=e.has("type");super.willUpdate(e),t&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};gr.styles=[xt.styles,A`
2359
+ `],vs([h({type:Boolean,reflect:!0})],Et.prototype,"touched",2),vs([h({type:String})],Et.prototype,"iconName",2),vs([h({type:String})],Et.prototype,"indeterminateIconName",2),vs([h({type:Boolean})],Et.prototype,"showAsIndeterminate",2),vs([h({type:Boolean})],Et.prototype,"hasDescription",2),vs([h({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(Bd)],Et);var Hd=Object.getOwnPropertyDescriptor,Wd=(t,e,s,i)=>{for(var r=i>1?void 0:i?Hd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Kd="sonic-radio";let eo=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"}};eo.styles=[Et.styles,ee`
2353
2360
  :host input {
2354
2361
  border-radius: 50%;
2355
2362
  }
@@ -2365,7 +2372,7 @@
2365
2372
  width: 0.6em;
2366
2373
  width: round(0.6em, 1px);
2367
2374
  }
2368
- `],gr=Uh([$(Vh)],gr);var Bh=Object.getOwnPropertyDescriptor,Hh=(e,t,s,r)=>{for(var i=r>1?void 0:r?Bh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const qh="sonic-switch";let vr=class extends xt{constructor(){super(),this.unique=!0}};vr.styles=[xt.styles,A`
2375
+ `],eo=Wd([X(Kd)],eo);var Yd=Object.getOwnPropertyDescriptor,Gd=(t,e,s,i)=>{for(var r=i>1?void 0:i?Yd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Zd="sonic-switch";let to=class extends Et{constructor(){super(),this.unique=!0}};to.styles=[Et.styles,ee`
2369
2376
  sonic-icon {
2370
2377
  display: none;
2371
2378
  }
@@ -2430,17 +2437,17 @@
2430
2437
  input + sonic-icon {
2431
2438
  display: none;
2432
2439
  }
2433
- `],vr=Hh([$(qh)],vr);var Wh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,rt=(e,t,s,r)=>{for(var i=r>1?void 0:r?Kh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Wh(t,s,i),i};const Gh="sonic-select";let J=class extends Xe(it(C)){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 e=this.querySelectorAll("option");e.length>0&&(this.options=Array.from(e).map(t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(e){this._options=e;for(const s of e)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(e){this.hasDoneFirstUpdate=!0,super.firstUpdated(e)}set value(e){e==null&&!this.hasDoneFirstUpdate||(e||(e=""),this._value!=e&&(this._value=e,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(e){this.hasAttribute("description")&&!this.forceAutoFill&&(e=this.getAttribute("description")),this._description=e,this.requestUpdate()}get label(){return this._label}set label(e){this.hasAttribute("label")&&!this.forceAutoFill&&(e=this.getAttribute("label")),this._label=e,this.requestUpdate()}willUpdate(e){this.hasSlotOrProps(),super.willUpdate(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}validateFormElement(){const e=this.shadowRoot?.querySelector("select");if(!e||e.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),e.reportValidity()}render(){const e={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return v`
2440
+ `],to=Gd([X(Zd)],to);var Jd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,ot=(t,e,s,i)=>{for(var r=i>1?void 0:i?Xd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Jd(e,s,r),r};const Qd="sonic-select";let Qe=class extends br(nt(J)){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`
2434
2441
  <label
2435
2442
  for="form-element"
2436
2443
  class="${this.hasLabel?"form-label":"hidden"}"
2437
- >${this.label?U(this.label):""}<slot
2444
+ >${this.label?je(this.label):""}<slot
2438
2445
  name="label"
2439
2446
  @slotchange=${this.hasSlotOrProps}
2440
2447
  ></slot
2441
2448
  ></label>
2442
2449
 
2443
- <div class="form-control ${br(e)}">
2450
+ <div class="form-control ${Qn(t)}">
2444
2451
  <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
2445
2452
  <div class="form-select-wrapper">
2446
2453
  <select
@@ -2451,18 +2458,18 @@
2451
2458
  ?disabled=${this.disabled}
2452
2459
  ?required=${this.required}
2453
2460
  ?multiple=${this.multiple}
2454
- size=${k(this.selectSize)}
2461
+ size=${te(this.selectSize)}
2455
2462
  ?autofocus=${this.autofocus}
2456
2463
  .value="${this.value}"
2457
2464
  class="form-element"
2458
- aria-label=${k(this.ariaLabel)}
2459
- aria-labelledby=${k(this.ariaLabelledby)}
2465
+ aria-label=${te(this.ariaLabel)}
2466
+ aria-labelledby=${te(this.ariaLabelledby)}
2460
2467
  >
2461
- ${ni(this.options,t=>t[this.valueKey],t=>{const s=this.value==t[this.valueKey];return v`<option
2468
+ ${Ii(this.options,e=>e[this.valueKey],e=>{const s=this.value==e[this.valueKey];return R`<option
2462
2469
  ?selected=${s}
2463
- value="${t[this.valueKey]}"
2470
+ value="${e[this.valueKey]}"
2464
2471
  >
2465
- ${t[this.wordingKey]}
2472
+ ${e[this.wordingKey]}
2466
2473
  </option>`})}
2467
2474
  <slot></slot>
2468
2475
  </select>
@@ -2479,9 +2486,9 @@
2479
2486
  name="description"
2480
2487
  @slotchange=${this.hasSlotOrProps}
2481
2488
  class="${this.hasDescription?"form-description":"hidden"}"
2482
- >${this.description?v`${U(this.description)}`:""}</slot
2489
+ >${this.description?R`${je(this.description)}`:""}</slot
2483
2490
  >
2484
- `}};J.styles=[Wt,mr,vi,yi,A`
2491
+ `}};Qe.styles=[ss,Xn,Gi,Zi,ee`
2485
2492
  .form-element {
2486
2493
  appearance: none;
2487
2494
  white-space: nowrap;
@@ -2534,11 +2541,11 @@
2534
2541
  :host([multiple]) sonic-icon {
2535
2542
  display: none !important;
2536
2543
  }
2537
- `],rt([a({type:String})],J.prototype,"valueKey",2),rt([a({type:String})],J.prototype,"wordingKey",2),rt([a({type:Boolean})],J.prototype,"multiple",2),rt([a({type:String,reflect:!0})],J.prototype,"size",2),rt([a({type:Number})],J.prototype,"selectSize",2),rt([a({type:String,reflect:!0})],J.prototype,"status",2),rt([a({type:Array})],J.prototype,"options",1),rt([a({reflect:!0})],J.prototype,"value",1),rt([a({type:Boolean})],J.prototype,"forceAutoFill",2),rt([a()],J.prototype,"description",1),rt([a()],J.prototype,"label",1),rt([pt({slot:"label",flatten:!0})],J.prototype,"slotLabelNodes",2),rt([pt({slot:"description",flatten:!0})],J.prototype,"slotDescriptionNodes",2),rt([pt({slot:"suffix",flatten:!0})],J.prototype,"slotSuffixNodes",2),rt([pt({slot:"prefix",flatten:!0})],J.prototype,"slotPrefixNodes",2),rt([T()],J.prototype,"hasDescription",2),rt([T()],J.prototype,"hasLabel",2),rt([T()],J.prototype,"hasSuffix",2),rt([T()],J.prototype,"hasPrefix",2),J=rt([$(Gh)],J);var Yh=Object.defineProperty,Zh=Object.getOwnPropertyDescriptor,St=(e,t,s,r)=>{for(var i=r>1?void 0:r?Zh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Yh(t,s,i),i};const Xh="sonic-textarea";let bt=class extends li(Xe(it(C))){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(e){this.hasSlotOrProps(),super.willUpdate(e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const e=this.shadowRoot?.querySelector("textarea");if(!e||e.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),e.reportValidity()}render(){const e={resize:this.resize};return v`
2544
+ `],ot([h({type:String})],Qe.prototype,"valueKey",2),ot([h({type:String})],Qe.prototype,"wordingKey",2),ot([h({type:Boolean})],Qe.prototype,"multiple",2),ot([h({type:String,reflect:!0})],Qe.prototype,"size",2),ot([h({type:Number})],Qe.prototype,"selectSize",2),ot([h({type:String,reflect:!0})],Qe.prototype,"status",2),ot([h({type:Array})],Qe.prototype,"options",1),ot([h({reflect:!0})],Qe.prototype,"value",1),ot([h({type:Boolean})],Qe.prototype,"forceAutoFill",2),ot([h()],Qe.prototype,"description",1),ot([h()],Qe.prototype,"label",1),ot([bt({slot:"label",flatten:!0})],Qe.prototype,"slotLabelNodes",2),ot([bt({slot:"description",flatten:!0})],Qe.prototype,"slotDescriptionNodes",2),ot([bt({slot:"suffix",flatten:!0})],Qe.prototype,"slotSuffixNodes",2),ot([bt({slot:"prefix",flatten:!0})],Qe.prototype,"slotPrefixNodes",2),ot([Ae()],Qe.prototype,"hasDescription",2),ot([Ae()],Qe.prototype,"hasLabel",2),ot([Ae()],Qe.prototype,"hasSuffix",2),ot([Ae()],Qe.prototype,"hasPrefix",2),Qe=ot([X(Qd)],Qe);var ep=Object.defineProperty,tp=Object.getOwnPropertyDescriptor,Tt=(t,e,s,i)=>{for(var r=i>1?void 0:i?tp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ep(e,s,r),r};const sp="sonic-textarea";let yt=class extends Ri(br(nt(J))){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`
2538
2545
  <label
2539
2546
  for="${this.id||"form-element"}"
2540
2547
  class="${this.hasLabel?"form-label":"hidden"}"
2541
- >${this.label?U(this.label):""}<slot
2548
+ >${this.label?je(this.label):""}<slot
2542
2549
  name="label"
2543
2550
  @slotchange=${this.hasSlotOrProps}
2544
2551
  ></slot
@@ -2553,20 +2560,20 @@
2553
2560
  ?disabled=${this.disabled}
2554
2561
  ?required=${this.required}
2555
2562
  ?autofocus=${this.autofocus}
2556
- rows=${k(this.rows)}
2557
- cols=${k(this.cols)}
2558
- maxlength=${k(this.maxlength)}
2559
- minlength=${k(this.minlength)}
2563
+ rows=${te(this.rows)}
2564
+ cols=${te(this.cols)}
2565
+ maxlength=${te(this.maxlength)}
2566
+ minlength=${te(this.minlength)}
2560
2567
  ?readonly=${this.readonly}
2561
- spellcheck=${k(this.spellcheck)}
2562
- autocomplete=${k(this.autocomplete)}
2563
- tabindex=${k(this.tabindex)}
2564
- wrap=${k(this.wrap)}
2568
+ spellcheck=${te(this.spellcheck)}
2569
+ autocomplete=${te(this.autocomplete)}
2570
+ tabindex=${te(this.tabindex)}
2571
+ wrap=${te(this.wrap)}
2565
2572
  placeholder="${this.placeholder}"
2566
2573
  class="form-element textarea custom-scroll"
2567
- aria-label=${k(this.ariaLabel)}
2568
- aria-labelledby=${k(this.ariaLabelledby)}
2569
- style=${wt(e)}
2574
+ aria-label=${te(this.ariaLabel)}
2575
+ aria-labelledby=${te(this.ariaLabelledby)}
2576
+ style=${$t(t)}
2570
2577
  >
2571
2578
  ${this.value}</textarea
2572
2579
  >
@@ -2576,14 +2583,14 @@ ${this.value}</textarea
2576
2583
  name="description"
2577
2584
  @slotchange=${this.hasSlotOrProps}
2578
2585
  class="${this.hasDescription?"form-description":"hidden"}"
2579
- >${this.description?v`${U(this.description)}`:""}</slot
2586
+ >${this.description?R`${je(this.description)}`:""}</slot
2580
2587
  >
2581
- `}};bt.styles=[Wt,mr,vi,yi,Ss,A`
2588
+ `}};yt.styles=[ss,Xn,Gi,Zi,Yr,ee`
2582
2589
  textarea {
2583
2590
  overflow-y: auto !important;
2584
2591
  font-size: inherit;
2585
2592
  }
2586
- `],St([a({type:String})],bt.prototype,"size",2),St([a({type:Number})],bt.prototype,"rows",2),St([a({type:Number})],bt.prototype,"cols",2),St([a({type:Number})],bt.prototype,"maxlength",2),St([a({type:Number})],bt.prototype,"minlength",2),St([a({type:String})],bt.prototype,"wrap",2),St([a({type:Boolean})],bt.prototype,"readonly",2),St([a({type:String})],bt.prototype,"placeholder",2),St([a({type:String})],bt.prototype,"resize",2),St([pt({slot:"label",flatten:!0})],bt.prototype,"slotLabelNodes",2),St([pt({slot:"description",flatten:!0})],bt.prototype,"slotDescriptionNodes",2),St([T()],bt.prototype,"hasDescription",2),St([T()],bt.prototype,"hasLabel",2),bt=St([$(Xh)],bt);var Qh=Object.getOwnPropertyDescriptor,Jh=(e,t,s,r)=>{for(var i=r>1?void 0:r?Qh(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};let yr=class extends C{render(){return v`<slot></slot>`}};yr.styles=[A`
2593
+ `],Tt([h({type:String})],yt.prototype,"size",2),Tt([h({type:Number})],yt.prototype,"rows",2),Tt([h({type:Number})],yt.prototype,"cols",2),Tt([h({type:Number})],yt.prototype,"maxlength",2),Tt([h({type:Number})],yt.prototype,"minlength",2),Tt([h({type:String})],yt.prototype,"wrap",2),Tt([h({type:Boolean})],yt.prototype,"readonly",2),Tt([h({type:String})],yt.prototype,"placeholder",2),Tt([h({type:String})],yt.prototype,"resize",2),Tt([bt({slot:"label",flatten:!0})],yt.prototype,"slotLabelNodes",2),Tt([bt({slot:"description",flatten:!0})],yt.prototype,"slotDescriptionNodes",2),Tt([Ae()],yt.prototype,"hasDescription",2),Tt([Ae()],yt.prototype,"hasLabel",2),yt=Tt([X(sp)],yt);var rp=Object.getOwnPropertyDescriptor,ip=(t,e,s,i)=>{for(var r=i>1?void 0:i?rp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};let so=class extends J{render(){return R`<slot></slot>`}};so.styles=[ee`
2587
2594
  :host {
2588
2595
  font-size: 1.15rem;
2589
2596
  line-height: 1.2;
@@ -2600,24 +2607,24 @@ ${this.value}</textarea
2600
2607
  font-size: 1rem;
2601
2608
  }
2602
2609
  }
2603
- `],yr=Jh([$("sonic-legend-description")],yr);var td=Object.defineProperty,ed=Object.getOwnPropertyDescriptor,je=(e,t,s,r)=>{for(var i=r>1?void 0:r?ed(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&td(t,s,i),i};const sd="sonic-legend";let ae=class extends C{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(e){this.hasAttribute("description")&&!this.forceAutoFill&&(e=this.getAttribute("description")),this._description=e,this.requestUpdate()}get label(){return this._label}set label(e){this.hasAttribute("label")&&!this.forceAutoFill&&(e=this.getAttribute("label")),this._label=e,this.requestUpdate()}render(){return v`<legend part="legend">
2604
- ${this.iconName?v`<div class="icon">
2610
+ `],so=ip([X("sonic-legend-description")],so);var np=Object.defineProperty,op=Object.getOwnPropertyDescriptor,sr=(t,e,s,i)=>{for(var r=i>1?void 0:i?op(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&np(e,s,r),r};const ap="sonic-legend";let ys=class extends J{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">
2611
+ ${this.iconName?R`<div class="icon">
2605
2612
  <sonic-icon
2606
2613
  name=${this.iconName}
2607
- prefix=${k(this.iconPrefix)}
2608
- library=${k(this.iconLibrary)}
2614
+ prefix=${te(this.iconPrefix)}
2615
+ library=${te(this.iconLibrary)}
2609
2616
  ></sonic-icon>
2610
2617
  </div>`:""}
2611
2618
 
2612
2619
  <div class="legend-content">
2613
- ${U(this.label?this.label:"")}
2614
- ${this.description?v`<sonic-legend-description
2615
- >${U(this.description)}</sonic-legend-description
2620
+ ${je(this.label?this.label:"")}
2621
+ ${this.description?R`<sonic-legend-description
2622
+ >${je(this.description)}</sonic-legend-description
2616
2623
  >`:""}
2617
2624
  <slot></slot>
2618
2625
  </div>
2619
2626
  <slot name="suffix"></slot>
2620
- </legend>`}};ae.styles=[A`
2627
+ </legend>`}};ys.styles=[ee`
2621
2628
  :host {
2622
2629
  --sc-legend-font-size: 1.5rem;
2623
2630
  --sc-legend-font-weight: var(--sc-font-weight-base, 400);
@@ -2661,19 +2668,19 @@ ${this.value}</textarea
2661
2668
  .legend-content {
2662
2669
  flex-grow: 1;
2663
2670
  }
2664
- `],je([a({type:Boolean})],ae.prototype,"forceAutoFill",2),je([a()],ae.prototype,"description",1),je([a()],ae.prototype,"label",1),je([a({type:String})],ae.prototype,"iconName",2),je([a({type:String})],ae.prototype,"iconLibrary",2),je([a({type:String})],ae.prototype,"iconPrefix",2),ae=je([$(sd)],ae);var id=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,Yt=(e,t,s,r)=>{for(var i=r>1?void 0:r?rd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&id(t,s,i),i};const nd="sonic-fieldset";let It=class extends it(C){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return v`<fieldset
2665
- form="${k(this.form)}"
2671
+ `],sr([h({type:Boolean})],ys.prototype,"forceAutoFill",2),sr([h()],ys.prototype,"description",1),sr([h()],ys.prototype,"label",1),sr([h({type:String})],ys.prototype,"iconName",2),sr([h({type:String})],ys.prototype,"iconLibrary",2),sr([h({type:String})],ys.prototype,"iconPrefix",2),ys=sr([X(ap)],ys);var lp=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,ns=(t,e,s,i)=>{for(var r=i>1?void 0:i?cp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&lp(e,s,r),r};const hp="sonic-fieldset";let Vt=class extends nt(J){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return R`<fieldset
2672
+ form="${te(this.form)}"
2666
2673
  ?disabled="${this.disabled}"
2667
2674
  >
2668
- ${this.label?v` <sonic-legend
2669
- label=${k(this.label)}
2670
- description=${k(this.description)}
2671
- iconName=${k(this.iconName)}
2672
- iconPrefix=${k(this.iconPrefix)}
2673
- iconLibrary=${k(this.iconLibrary)}
2674
- ></sonic-legend>`:D}
2675
+ ${this.label?R` <sonic-legend
2676
+ label=${te(this.label)}
2677
+ description=${te(this.description)}
2678
+ iconName=${te(this.iconName)}
2679
+ iconPrefix=${te(this.iconPrefix)}
2680
+ iconLibrary=${te(this.iconLibrary)}
2681
+ ></sonic-legend>`:re}
2675
2682
  <slot></slot>
2676
- </fieldset>`}};It.styles=[A`
2683
+ </fieldset>`}};Vt.styles=[ee`
2677
2684
  :host {
2678
2685
  --sc-fieldset-mt: 0;
2679
2686
  --sc-fieldset-mb: 1rem;
@@ -2722,9 +2729,9 @@ ${this.value}</textarea
2722
2729
  ::slotted(sonic-legend:last-child) {
2723
2730
  margin-bottom: 0;
2724
2731
  }
2725
- `],Yt([a({type:Boolean,reflect:!0})],It.prototype,"disabled",2),Yt([a({type:String})],It.prototype,"form",2),Yt([a({type:String})],It.prototype,"label",2),Yt([a({type:String})],It.prototype,"description",2),Yt([a({type:String})],It.prototype,"iconName",2),Yt([a({type:String})],It.prototype,"iconLibrary",2),Yt([a({type:String})],It.prototype,"iconPrefix",2),Yt([a({type:Boolean,reflect:!0})],It.prototype,"tight",2),Yt([a({type:String,reflect:!0})],It.prototype,"variant",2),It=Yt([$(nd)],It);var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,wr=(e,t,s,r)=>{for(var i=r>1?void 0:r?ad(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&od(t,s,i),i};const ld="sonic-form-layout";let Ls=class extends it(C){constructor(){super(...arguments),this._resizeController=new fo(this,{}),this.oneFormElement=!1}onSlotChange(){let e=this.slottedElements;const t=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];e=e.filter(s=>t.includes(s.nodeName.toLowerCase())),this.oneFormElement=e.length==1}render(){const e={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return v`<div class=${br(e)}>
2732
+ `],ns([h({type:Boolean,reflect:!0})],Vt.prototype,"disabled",2),ns([h({type:String})],Vt.prototype,"form",2),ns([h({type:String})],Vt.prototype,"label",2),ns([h({type:String})],Vt.prototype,"description",2),ns([h({type:String})],Vt.prototype,"iconName",2),ns([h({type:String})],Vt.prototype,"iconLibrary",2),ns([h({type:String})],Vt.prototype,"iconPrefix",2),ns([h({type:Boolean,reflect:!0})],Vt.prototype,"tight",2),ns([h({type:String,reflect:!0})],Vt.prototype,"variant",2),Vt=ns([X(hp)],Vt);var up=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,ro=(t,e,s,i)=>{for(var r=i>1?void 0:i?dp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&up(e,s,r),r};const pp="sonic-form-layout";let ti=class extends nt(J){constructor(){super(...arguments),this._resizeController=new Qa(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=${Qn(t)}>
2726
2733
  <slot @slotchange=${this.onSlotChange}></slot>
2727
- </div>`}};Ls.styles=[A`
2734
+ </div>`}};ti.styles=[ee`
2728
2735
  :host {
2729
2736
  display: block;
2730
2737
  }
@@ -2759,7 +2766,7 @@ ${this.value}</textarea
2759
2766
  ::slotted(sonic-divider) {
2760
2767
  --sc-divider-my: 0;
2761
2768
  }
2762
- `],wr([ps({flatten:!0})],Ls.prototype,"slottedElements",2),wr([a({type:Boolean})],Ls.prototype,"oneFormElement",2),Ls=wr([$(ld)],Ls);var cd=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,_r=(e,t,s,r)=>{for(var i=r>1?void 0:r?hd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&cd(t,s,i),i};const dd="sonic-form-actions";let Ts=class extends C{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const e={flexDirection:this.direction,justifyContent:this.justify};return v`<slot style=${wt(e)}></slot>`}};Ts.styles=[A`
2769
+ `],ro([Nr({flatten:!0})],ti.prototype,"slottedElements",2),ro([h({type:Boolean})],ti.prototype,"oneFormElement",2),ti=ro([X(pp)],ti);var fp=Object.defineProperty,gp=Object.getOwnPropertyDescriptor,io=(t,e,s,i)=>{for(var r=i>1?void 0:i?gp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&fp(e,s,r),r};const bp="sonic-form-actions";let si=class extends J{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return R`<slot style=${$t(t)}></slot>`}};si.styles=[ee`
2763
2770
  :host {
2764
2771
  display: block;
2765
2772
  }
@@ -2768,20 +2775,20 @@ ${this.value}</textarea
2768
2775
  flex-wrap: wrap;
2769
2776
  gap: 0.3rem;
2770
2777
  }
2771
- `],_r([a({type:String})],Ts.prototype,"direction",2),_r([a({type:String})],Ts.prototype,"justify",2),Ts=_r([$(dd)],Ts);var ud=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,Pe=(e,t,s,r)=>{for(var i=r>1?void 0:r?pd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ud(t,s,i),i};const fd="sonic-group";let Zt=class extends C{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const e=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),t=e.length;t>1&&e.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===t-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"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(e){this.hasSlotOrProps(),super.willUpdate(e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const e={alignItems:this.alignItems};return v`<span class="${this.hasLabel?"form-label":"hidden"}"
2772
- >${this.label?U(this.label):""}<slot
2778
+ `],io([h({type:String})],si.prototype,"direction",2),io([h({type:String})],si.prototype,"justify",2),si=io([X(bp)],si);var mp=Object.defineProperty,vp=Object.getOwnPropertyDescriptor,js=(t,e,s,i)=>{for(var r=i>1?void 0:i?vp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&mp(e,s,r),r};const yp="sonic-group";let os=class extends J{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,i)=>{const r=s;i===0?(r.style.setProperty("--sc-item-rounded-tr","0"),r.style.setProperty("--sc-item-rounded-br","0")):i===e-1?(r.style.setProperty("--sc-item-rounded-tl","0"),r.style.setProperty("--sc-item-rounded-bl","0")):(r.style.setProperty("--sc-item-rounded-tr","0"),r.style.setProperty("--sc-item-rounded-br","0"),r.style.setProperty("--sc-item-rounded-tl","0"),r.style.setProperty("--sc-item-rounded-bl","0"))})}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)}render(){const t={alignItems:this.alignItems};return R`<span class="${this.hasLabel?"form-label":"hidden"}"
2779
+ >${this.label?je(this.label):""}<slot
2773
2780
  name="label"
2774
2781
  @slotchange=${this.hasSlotOrProps}
2775
2782
  ></slot
2776
2783
  ></span>
2777
- <slot class="main-slot" style=${wt(e)}></slot>
2784
+ <slot class="main-slot" style=${$t(t)}></slot>
2778
2785
  <slot
2779
2786
  name="description"
2780
2787
  @slotchange=${this.hasSlotOrProps}
2781
2788
  class="${this.hasDescription?"form-description":"hidden"}"
2782
2789
  >
2783
- ${this.description?v`${U(this.description)}`:""}
2784
- </slot>`}};Zt.styles=[Wt,vi,yi,A`
2790
+ ${this.description?R`${je(this.description)}`:""}
2791
+ </slot>`}};os.styles=[ss,Gi,Zi,ee`
2785
2792
  :host {
2786
2793
  display: inline-block;
2787
2794
  vertical-align: middle;
@@ -2801,16 +2808,16 @@ ${this.value}</textarea
2801
2808
  ::slotted(sonic-select) {
2802
2809
  flex-grow: 1;
2803
2810
  }
2804
- `],Pe([a({type:String})],Zt.prototype,"alignItems",2),Pe([a({type:String})],Zt.prototype,"label",2),Pe([a({type:String})],Zt.prototype,"description",2),Pe([pt({slot:"label",flatten:!0})],Zt.prototype,"slotLabelNodes",2),Pe([pt({slot:"description",flatten:!0})],Zt.prototype,"slotDescriptionNodes",2),Pe([T()],Zt.prototype,"hasDescription",2),Pe([T()],Zt.prototype,"hasLabel",2),Zt=Pe([$(fd)],Zt);var md=Object.defineProperty,bd=Object.getOwnPropertyDescriptor,Xt=(e,t,s,r)=>{for(var i=r>1?void 0:r?bd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&md(t,s,i),i};const gd="sonic-image";let Mt=class extends C{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(e){if(this.transition){const t=this.shadowRoot?.querySelector("img");if(!t)return;t.onload=function(){t.classList.add("loaded")}}super.firstUpdated(e)}render(){const e={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return v`<div part="image">
2811
+ `],js([h({type:String})],os.prototype,"alignItems",2),js([h({type:String})],os.prototype,"label",2),js([h({type:String})],os.prototype,"description",2),js([bt({slot:"label",flatten:!0})],os.prototype,"slotLabelNodes",2),js([bt({slot:"description",flatten:!0})],os.prototype,"slotDescriptionNodes",2),js([Ae()],os.prototype,"hasDescription",2),js([Ae()],os.prototype,"hasLabel",2),os=js([X(yp)],os);var wp=Object.defineProperty,_p=Object.getOwnPropertyDescriptor,as=(t,e,s,i)=>{for(var r=i>1?void 0:i?_p(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&wp(e,s,r),r};const xp="sonic-image";let Bt=class extends J{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 part="image">
2805
2812
  <picture part="picture"
2806
2813
  ><img
2807
2814
  part="img"
2808
2815
  src="${this.src}"
2809
2816
  loading="${this.loading}"
2810
2817
  alt="${this.alt}"
2811
- style=${wt(e)}
2818
+ style=${$t(t)}
2812
2819
  /></picture>
2813
- </div>`}};Mt.styles=[A`
2820
+ </div>`}};Bt.styles=[ee`
2814
2821
  :host {
2815
2822
  --sc-img-radius: 0;
2816
2823
  --sc-img-bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
@@ -2884,29 +2891,29 @@ ${this.value}</textarea
2884
2891
  opacity: 1;
2885
2892
  scale: 1;
2886
2893
  }
2887
- `],Xt([a({type:String})],Mt.prototype,"rounded",2),Xt([a({type:String})],Mt.prototype,"src",2),Xt([a({type:String})],Mt.prototype,"alt",2),Xt([a({type:String})],Mt.prototype,"loading",2),Xt([a({type:String,reflect:!0})],Mt.prototype,"transition",2),Xt([a({type:String})],Mt.prototype,"ratio",2),Xt([a({type:String})],Mt.prototype,"objectPosition",2),Xt([a({type:String})],Mt.prototype,"imageRendering",2),Xt([a({type:Boolean,reflect:!0})],Mt.prototype,"cover",2),Mt=Xt([$(gd)],Mt);var vd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,$t=(e,t,s,r)=>{for(var i=r>1?void 0:r?yd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&vd(t,s,i),i};const mo=e=>ps(e),wd="sonic-menu";let gt=class extends C{constructor(){super(...arguments),this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,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(e){const t=this.querySelector(".more-btn");this.size&&t&&t.setAttribute("size",this.size),super.updated(e)}setDividersSize(e){e.forEach(t=>{t.setAttribute("size","sm"),this.direction=="row"?t.style.setProperty("margin","0 .1rem "):t.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.setDividersSize(this.menuChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuChildren.forEach(e=>{this.attributeObserver.observe(e,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const e=this.menuChildren.filter(t=>t.hasAttribute("active")&&t.getAttribute("active")!=="false");e.length===1&&requestAnimationFrame(()=>{e[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(e){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){let e=!1,t,s;this.scrollable&&(this.addEventListener("mousedown",r=>{e=!0,this.classList.add("active"),t=r.pageX-this.menuContent.offsetLeft,s=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{e=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{e=!1,this.classList.remove("active")}),this.addEventListener("mousemove",r=>{if(!e)return;r.preventDefault();const n=(r.pageX-this.menuContent.offsetLeft-t)*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(e,t){t=="row"?(e.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),e.scrollLeft<e.scrollWidth-e.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):t=="column"&&(e.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),e.scrollTop<e.scrollHeight-(e.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(e){e.forEach(t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.getAttribute("shape")!="square"&&t.getAttribute("shape")!="circle"&&t.setAttribute("align",this.align),this.direction=="row"&&t.getAttribute("shape")=="block"&&t.setAttribute("shape","default")})}render(){const e={minWidth:this.minWidth,flexDirection:this.direction},t=this.direction=="row",s={gap:this.gap,flexDirection:this.direction},r={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:t?"":".55em"};return v`<menu
2894
+ `],as([h({type:String})],Bt.prototype,"rounded",2),as([h({type:String})],Bt.prototype,"src",2),as([h({type:String})],Bt.prototype,"alt",2),as([h({type:String})],Bt.prototype,"loading",2),as([h({type:String,reflect:!0})],Bt.prototype,"transition",2),as([h({type:String})],Bt.prototype,"ratio",2),as([h({type:String})],Bt.prototype,"objectPosition",2),as([h({type:String})],Bt.prototype,"imageRendering",2),as([h({type:Boolean,reflect:!0})],Bt.prototype,"cover",2),Bt=as([X(xp)],Bt);var Pp=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Lt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Sp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Pp(e,s,r),r};const el=t=>Nr(t),Ap="sonic-menu";let wt=class extends J{constructor(){super(...arguments),this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,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.menuChildren),this.setDividersSize(this.menuChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuChildren.forEach(t=>{this.attributeObserver.observe(t,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const t=this.menuChildren.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(){let t=!1,e,s;this.scrollable&&(this.addEventListener("mousedown",i=>{t=!0,this.classList.add("active"),e=i.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",i=>{if(!t)return;i.preventDefault();const n=(i.pageX-this.menuContent.offsetLeft-e)*1.5;this.menuContent.scrollLeft=s-n,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",i=>{i.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={gap:this.gap,flexDirection:this.direction},i={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},r={marginLeft:e?"":".55em"};return R`<menu
2888
2895
  part="menu"
2889
2896
  class="shadowable"
2890
- style=${wt(e)}
2897
+ style=${$t(t)}
2891
2898
  >
2892
2899
  <slot
2893
2900
  @slotchange=${this.mainSlotChange}
2894
2901
  id="menu-content"
2895
- style=${wt(s)}
2902
+ style=${$t(s)}
2896
2903
  ></slot>
2897
2904
  <sonic-pop
2898
- style=${wt(r)}
2905
+ style=${$t(i)}
2899
2906
  class=${this.hasMoreElements?"":"hidden"}
2900
2907
  >
2901
2908
  <sonic-menu-item
2902
- style=${wt(i)}
2909
+ style=${$t(r)}
2903
2910
  class="more-btn"
2904
2911
  shape=${this.moreShape}
2905
2912
  align="center"
2906
2913
  >
2907
2914
  <sonic-icon
2908
2915
  size="xl"
2909
- name=${t?"more-vert":"more-horiz"}
2916
+ name=${e?"more-vert":"more-horiz"}
2910
2917
  ></sonic-icon>
2911
2918
  </sonic-menu-item>
2912
2919
  <slot
@@ -2915,7 +2922,7 @@ ${this.value}</textarea
2915
2922
  slot="content"
2916
2923
  ></slot>
2917
2924
  </sonic-pop>
2918
- </menu>`}};gt.styles=[A`
2925
+ </menu>`}};wt.styles=[ee`
2919
2926
  :host {
2920
2927
  display: block;
2921
2928
  --sc-menu-gap: 0.15rem;
@@ -3043,27 +3050,27 @@ ${this.value}</textarea
3043
3050
  rgba(0, 0, 0, 0) 100%
3044
3051
  );
3045
3052
  }
3046
- `,uo],$t([a({type:String,reflect:!0})],gt.prototype,"size",2),$t([a({type:String,reflect:!0})],gt.prototype,"direction",2),$t([a({type:String})],gt.prototype,"gap",2),$t([a({type:String,reflect:!0})],gt.prototype,"align",2),$t([a({type:String,reflect:!0})],gt.prototype,"shadow",2),$t([a({type:String})],gt.prototype,"moreShape",2),$t([a({type:Boolean})],gt.prototype,"scrollable",2),$t([a({type:String})],gt.prototype,"minWidth",2),$t([ue("menu")],gt.prototype,"menu",2),$t([ue("#menu-content")],gt.prototype,"menuContent",2),$t([mo({selector:"*"})],gt.prototype,"menuChildren",2),$t([mo({slot:"more",selector:"*"})],gt.prototype,"moreElements",2),$t([T()],gt.prototype,"hasMoreElements",2),gt=$t([$(wd)],gt);var _d=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,bo=(e,t,s,r)=>{for(var i=r>1?void 0:r?xd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&_d(t,s,i),i};const Pd="sonic-modal-actions";let wi=class extends C{firstUpdated(e){this.buttons?.forEach(t=>{t.hasAttribute("hideModal")&&t.addEventListener("click",()=>{ie.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(e)}render(){return v`<slot></slot>`}};wi.styles=[A`
3053
+ `,Ja],Lt([h({type:String,reflect:!0})],wt.prototype,"size",2),Lt([h({type:String,reflect:!0})],wt.prototype,"direction",2),Lt([h({type:String})],wt.prototype,"gap",2),Lt([h({type:String,reflect:!0})],wt.prototype,"align",2),Lt([h({type:String,reflect:!0})],wt.prototype,"shadow",2),Lt([h({type:String})],wt.prototype,"moreShape",2),Lt([h({type:Boolean})],wt.prototype,"scrollable",2),Lt([h({type:String})],wt.prototype,"minWidth",2),Lt([Cs("menu")],wt.prototype,"menu",2),Lt([Cs("#menu-content")],wt.prototype,"menuContent",2),Lt([el({selector:"*"})],wt.prototype,"menuChildren",2),Lt([el({slot:"more",selector:"*"})],wt.prototype,"moreElements",2),Lt([Ae()],wt.prototype,"hasMoreElements",2),wt=Lt([X(Ap)],wt);var Cp=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,tl=(t,e,s,i)=>{for(var r=i>1?void 0:i?kp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Cp(e,s,r),r};const $p="sonic-modal-actions";let Ji=class extends J{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>`}};Ji.styles=[ee`
3047
3054
  :host {
3048
3055
  display: flex;
3049
3056
  gap: 0.5rem;
3050
3057
  margin-top: auto;
3051
3058
  padding-top: 1.5rem;
3052
3059
  }
3053
- `],bo([ps({selector:"sonic-button"})],wi.prototype,"buttons",2),wi=bo([$(Pd)],wi);var Cd=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,_i=(e,t,s,r)=>{for(var i=r>1?void 0:r?Sd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Cd(t,s,i),i};const $d="sonic-modal-close";let Is=class extends C{constructor(){super(...arguments),this.translation={fr:"Fermer la fenêtre",en:"Close window",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar"}}connectedCallback(){super.connectedCallback(),this.lang=document.documentElement.lang?.split("-")[0]??"fr"}render(){return v`<sonic-button
3060
+ `],tl([Nr({selector:"sonic-button"})],Ji.prototype,"buttons",2),Ji=tl([X($p)],Ji);var Dp=Object.defineProperty,Ep=Object.getOwnPropertyDescriptor,Xi=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ep(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Dp(e,s,r),r};const Op="sonic-modal-close";let ri=class extends J{constructor(){super(...arguments),this.translation={fr:"Fermer la fenêtre",en:"Close window",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar"}}connectedCallback(){super.connectedCallback(),this.lang=document.documentElement.lang?.split("-")[0]??"fr"}render(){return R`<sonic-button
3054
3061
  noAutoFill
3055
3062
  data-aria-label=${this.translation[this.lang]}
3056
- reset=${k(this.reset)}
3063
+ reset=${te(this.reset)}
3057
3064
  shape="circle"
3058
3065
  @click=${this.handleClick}
3059
- type=${k(this.type)}
3066
+ type=${te(this.type)}
3060
3067
  ><sonic-icon name="cancel" size="lg"></sonic-icon
3061
- ></sonic-button>`}handleClick(){G.getClosestElement(this,"sonic-modal").hide()}};_i([a()],Is.prototype,"translation",2),_i([a()],Is.prototype,"reset",2),_i([a()],Is.prototype,"type",2),Is=_i([$($d)],Is);var Ad=Object.getOwnPropertyDescriptor,kd=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ad(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Dd="sonic-modal-content";let xr=class extends C{render(){return v`<slot></slot>`}};xr.styles=[A`
3068
+ ></sonic-button>`}handleClick(){Ke.getClosestElement(this,"sonic-modal").hide()}};Xi([h()],ri.prototype,"translation",2),Xi([h()],ri.prototype,"reset",2),Xi([h()],ri.prototype,"type",2),ri=Xi([X(Op)],ri);var Tp=Object.getOwnPropertyDescriptor,Lp=(t,e,s,i)=>{for(var r=i>1?void 0:i?Tp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Mp="sonic-modal-content";let no=class extends J{render(){return R`<slot></slot>`}};no.styles=[ee`
3062
3069
  :host {
3063
3070
  display: block;
3064
3071
  width: 100%;
3065
3072
  }
3066
- `],xr=kd([$(Dd)],xr);var Od=Object.getOwnPropertyDescriptor,Ed=(e,t,s,r)=>{for(var i=r>1?void 0:r?Od(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Ld="sonic-modal-subtitle";let Pr=class extends C{render(){return v`<slot></slot>`}};Pr.styles=[A`
3073
+ `],no=Lp([X(Mp)],no);var Np=Object.getOwnPropertyDescriptor,Ip=(t,e,s,i)=>{for(var r=i>1?void 0:i?Np(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Fp="sonic-modal-subtitle";let oo=class extends J{render(){return R`<slot></slot>`}};oo.styles=[ee`
3067
3074
  :host {
3068
3075
  font-size: 1.25rem;
3069
3076
  display: block;
@@ -3075,7 +3082,7 @@ ${this.value}</textarea
3075
3082
  font-weight: var(--sc-headings-font-weight, 700);
3076
3083
  font-style: var(--sc-headings-font-style, normal);
3077
3084
  }
3078
- `],Pr=Ed([$(Ld)],Pr);var Td=Object.getOwnPropertyDescriptor,Id=(e,t,s,r)=>{for(var i=r>1?void 0:r?Td(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Md="sonic-modal-title";let Cr=class extends C{render(){return v`<slot></slot>`}};Cr.styles=[A`
3085
+ `],oo=Ip([X(Fp)],oo);var jp=Object.getOwnPropertyDescriptor,Rp=(t,e,s,i)=>{for(var r=i>1?void 0:i?jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const zp="sonic-modal-title";let ao=class extends J{render(){return R`<slot></slot>`}};ao.styles=[ee`
3079
3086
  :host {
3080
3087
  font-weight: bold;
3081
3088
  font-size: 1.5rem;
@@ -3088,30 +3095,30 @@ ${this.value}</textarea
3088
3095
  font-weight: var(--sc-headings-font-weight, 700);
3089
3096
  font-style: var(--sc-headings-font-style, normal);
3090
3097
  }
3091
- `],Cr=Id([$(Md)],Cr);const go=new WeakMap;function Nd(e){const t=go.get(e);if(t)return t;const s=new CSSStyleSheet;return s.replaceSync(e.cssText),go.set(e,s),s}function Rd(e){return e instanceof Li}function vo(e){return e?(Array.isArray(e)?e:[e]).flatMap(s=>Array.isArray(s)?vo(s):s instanceof CSSStyleSheet?[s]:Rd(s)?[Nd(s)]:[]):[]}var Fd=Object.defineProperty,jd=Object.getOwnPropertyDescriptor,X=(e,t,s,r)=>{for(var i=r>1?void 0:r?jd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Fd(t,s,i),i};const yo="sonic-modal";let M=class extends it(C){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(e){const t=document.createElement(yo);return t.options=e,e.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),e.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),e.closeOnLocationChange===!0&&t.setAttribute("closeOnLocationChange","true"),e.maxWidth&&(t.maxWidth=e?.maxWidth),e.width&&(t.width=e?.width),e.maxHeight&&(t.maxHeight=e?.maxHeight),e.height&&(t.height=e?.height),e.forceAction&&(t.forceAction=!0),e.fullScreen&&(t.fullScreen=e?.fullScreen),e.effect&&(t.effect=e?.effect),e.noCloseButton&&(t.noCloseButton=!0),e.closeButtonType&&(t.closeButtonType=e?.closeButtonType),e.styleSheet&&(t.styleSheet=e?.styleSheet),e.paddingX&&(t.paddingX=e?.paddingX),e.paddingY&&(t.paddingY=e?.paddingY),e.zIndex&&(t.zIndex=e?.zIndex),Et.getPopContainer().appendChild(t),t.updateComplete.then(()=>{t.show()}),t}connectedCallback(){M.modals.push(this),at.onChange(this),super.connectedCallback()}disconnectedCallback(){at.offChange(this),M.modals.splice(M.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(e){if(this.closeOnLocationChange&&e.has("location")){const t=e.get("location");t&&this.location&&this.location!==t&&setTimeout(()=>{this.hide()},50)}e.has("zIndex")&&this.style.setProperty("--sc_z-index",this.zIndex||"990"),e.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),e.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(e)}updated(e){const t=!e.get("visible")&&this.visible,s=e.get("visible")&&!this.visible;t&&this._animationState==="hidden"?this.show():s&&this._animationState==="visible"&&this.hide(),e.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(e){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const e={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},t={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return v`
3098
+ `],ao=Rp([X(zp)],ao);const sl=new WeakMap;function Up(t){const e=sl.get(t);if(e)return e;const s=new CSSStyleSheet;return s.replaceSync(t.cssText),sl.set(t,s),s}function qp(t){return t instanceof pn}function rl(t){return t?(Array.isArray(t)?t:[t]).flatMap(s=>Array.isArray(s)?rl(s):s instanceof CSSStyleSheet?[s]:qp(s)?[Up(s)]:[]):[]}var Vp=Object.defineProperty,Bp=Object.getOwnPropertyDescriptor,Ze=(t,e,s,i)=>{for(var r=i>1?void 0:i?Bp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Vp(e,s,r),r};const il="sonic-modal";let Ee=class extends nt(J){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(il);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),jt.getPopContainer().appendChild(e),e.updateComplete.then(()=>{e.show()}),e}connectedCallback(){Ee.modals.push(this),ct.onChange(this),super.connectedCallback()}disconnectedCallback(){ct.offChange(this),Ee.modals.splice(Ee.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`
3092
3099
  <div
3093
3100
  id="backdrop"
3094
3101
  @click=${this.handleOverlayClick}
3095
- style=${wt(t)}
3102
+ style=${$t(e)}
3096
3103
  ></div>
3097
3104
  <dialog
3098
3105
  id="modal"
3099
3106
  part="modal"
3100
3107
  class="custom-scroll"
3101
3108
  aria-modal="true"
3102
- style=${wt(e)}
3109
+ style=${$t(t)}
3103
3110
  >
3104
- ${this._animationState!=="hidden"?v`<div id="modal-content">
3105
- ${!this.forceAction&&!this.noCloseButton?v`<sonic-modal-close
3111
+ ${this._animationState!=="hidden"?R`<div id="modal-content">
3112
+ ${!this.forceAction&&!this.noCloseButton?R`<sonic-modal-close
3106
3113
  class="${this._animationState=="visible"?"animate-in":"animate-out"}"
3107
- type=${k(this.closeButtonType)}
3108
- ></sonic-modal-close>`:D}
3114
+ type=${te(this.closeButtonType)}
3115
+ ></sonic-modal-close>`:re}
3109
3116
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
3110
3117
  ${this.modalFragment("content")} ${this.modalFragment("actions")}
3111
3118
  <slot></slot>
3112
- </div>`:D}
3119
+ </div>`:re}
3113
3120
  </dialog>
3114
- `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const e=vo(this.styleSheet),t=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...t,...e],this._adoptedStyleSheets=e}modalFragment(e){const t=this.options?.[e];if(!t)return D;let s;switch(t instanceof Object?s=t:s=U(t),e){case"title":return v`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return v`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return v`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return v`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return D}}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")&&L.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(){M.modals.forEach(e=>{e.dispose()})}handleEscape(e){if(e.key==="Escape"){e.preventDefault();const t=M.modals.filter(s=>s._animationState!=="hidden"&&!s.forceAction);t.length>0&&t[t.length-1].hide()}}animation(e){return new Promise(t=>{const{quartOut:s,linear:r,translateY:i,durationIn:n,durationOut:o,quadOut:l}=this._animationConfig,c=this._modalElement;if(!c)return t();const h=e==="in",u=h?n:o,d=!this.fullScreen&&h?100:0;this.fullScreen||(h?this.style.setProperty("--sc_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc_backdrop-opacity","0")},150));const p=[];this.effect==="slide"&&(p.push(c.animate([{transform:h?i:"translateY(0)"},{transform:h?"translateY(0)":i}],{duration:u,easing:h?s:l,fill:"both",delay:d})),p.push(c.animate([{opacity:h?0:1},{opacity:h?1:0}],{duration:u,easing:r,fill:"both",delay:d}))),Promise.all(p.map(y=>y.finished)).then(()=>t())})}};M.styles=[Ss,A`
3121
+ `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=rl(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 re;let s;switch(e instanceof Object?s=e:s=je(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 re}}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(){Ee.modals.forEach(t=>{t.dispose()})}handleEscape(t){if(t.key==="Escape"){t.preventDefault();const e=Ee.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:i,translateY:r,durationIn:n,durationOut:o,quadOut:c}=this._animationConfig,d=this._modalElement;if(!d)return e();const m=t==="in",k=m?n:o,g=!this.fullScreen&&m?100:0;this.fullScreen||(m?this.style.setProperty("--sc_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&(f.push(d.animate([{transform:m?r:"translateY(0)"},{transform:m?"translateY(0)":r}],{duration:k,easing:m?s:c,fill:"both",delay:g})),f.push(d.animate([{opacity:m?0:1},{opacity:m?1:0}],{duration:k,easing:i,fill:"both",delay:g}))),Promise.all(f.map(A=>A.finished)).then(()=>e())})}};Ee.styles=[Yr,ee`
3115
3122
  :host {
3116
3123
  --sc-modal-py: 2.5rem;
3117
3124
  --sc-modal-px: 1.5rem;
@@ -3262,17 +3269,17 @@ ${this.value}</textarea
3262
3269
  transform: scale(0) !important;
3263
3270
  transition: 0.2s linear !important;
3264
3271
  }
3265
- `],M.modals=[],X([a({type:Boolean})],M.prototype,"forceAction",2),X([a({type:Boolean})],M.prototype,"noCloseButton",2),X([a({type:Boolean})],M.prototype,"removeOnHide",2),X([a({type:Boolean})],M.prototype,"removeHashOnHide",2),X([a({type:String,reflect:!0})],M.prototype,"align",2),X([a({type:String})],M.prototype,"paddingX",2),X([a({type:String})],M.prototype,"paddingY",2),X([a({type:String})],M.prototype,"maxWidth",2),X([a({type:String})],M.prototype,"maxHeight",2),X([a({type:String})],M.prototype,"zIndex",2),X([a({type:String})],M.prototype,"width",2),X([a({type:String})],M.prototype,"height",2),X([a({type:String})],M.prototype,"effect",2),X([a({attribute:!1})],M.prototype,"styleSheet",2),X([a({type:Object})],M.prototype,"options",2),X([a({type:Boolean,reflect:!0})],M.prototype,"fullScreen",2),X([a({type:Boolean,reflect:!0})],M.prototype,"visible",2),X([a({type:String})],M.prototype,"closeButtonType",2),X([ue("#modal")],M.prototype,"_modalElement",2),X([a({type:Boolean})],M.prototype,"closeOnLocationChange",2),X([T()],M.prototype,"location",2),X([T()],M.prototype,"_animationState",2),M=X([$(yo)],M),typeof window<"u"&&(window.SonicModal=M);var zd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,Qt=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ud(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&zd(t,s,i),i};const Vd={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},Bd="sonic-alert";let Nt=class extends C{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.id=new Date().getTime().toString(),this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1}connectedCallback(){if(this.dismissForever){const e=localStorage.getItem("sonic-alert-dismissed")||"{}";JSON.parse(e)[this.id]&&this.remove()}super.connectedCallback()}render(){return v`
3272
+ `],Ee.modals=[],Ze([h({type:Boolean})],Ee.prototype,"forceAction",2),Ze([h({type:Boolean})],Ee.prototype,"noCloseButton",2),Ze([h({type:Boolean})],Ee.prototype,"removeOnHide",2),Ze([h({type:Boolean})],Ee.prototype,"removeHashOnHide",2),Ze([h({type:String,reflect:!0})],Ee.prototype,"align",2),Ze([h({type:String})],Ee.prototype,"paddingX",2),Ze([h({type:String})],Ee.prototype,"paddingY",2),Ze([h({type:String})],Ee.prototype,"maxWidth",2),Ze([h({type:String})],Ee.prototype,"maxHeight",2),Ze([h({type:String})],Ee.prototype,"zIndex",2),Ze([h({type:String})],Ee.prototype,"width",2),Ze([h({type:String})],Ee.prototype,"height",2),Ze([h({type:String})],Ee.prototype,"effect",2),Ze([h({attribute:!1})],Ee.prototype,"styleSheet",2),Ze([h({type:Object})],Ee.prototype,"options",2),Ze([h({type:Boolean,reflect:!0})],Ee.prototype,"fullScreen",2),Ze([h({type:Boolean,reflect:!0})],Ee.prototype,"visible",2),Ze([h({type:String})],Ee.prototype,"closeButtonType",2),Ze([Cs("#modal")],Ee.prototype,"_modalElement",2),Ze([h({type:Boolean})],Ee.prototype,"closeOnLocationChange",2),Ze([Ae()],Ee.prototype,"location",2),Ze([Ae()],Ee.prototype,"_animationState",2),Ee=Ze([X(il)],Ee),typeof window<"u"&&(window.SonicModal=Ee);var Hp=Object.defineProperty,Wp=Object.getOwnPropertyDescriptor,ls=(t,e,s,i)=>{for(var r=i>1?void 0:i?Wp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Hp(e,s,r),r};const Kp={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},Yp="sonic-alert";let Ht=class extends J{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.id=new Date().getTime().toString(),this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1}connectedCallback(){if(this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}";JSON.parse(t)[this.id]&&this.remove()}super.connectedCallback()}render(){return R`
3266
3273
  <slot name="icon" class="${this.noIcon?"hidden":""}"
3267
- >${this.noIcon?D:v`<div>
3268
- ${this.status&&v`<sonic-icon name=${Vd[this.status]}></sonic-icon>`}
3274
+ >${this.noIcon?re:R`<div>
3275
+ ${this.status&&R`<sonic-icon name=${Kp[this.status]}></sonic-icon>`}
3269
3276
  </div>`}</slot
3270
3277
  >
3271
3278
  <div class="content">
3272
- ${this.label?v`<span class="label">${U(this.label)}</span>`:D}
3279
+ ${this.label?R`<span class="label">${je(this.label)}</span>`:re}
3273
3280
  <div>${this.text}<slot></slot></div>
3274
3281
  </div>
3275
- ${this.dismissible?v`<sonic-button
3282
+ ${this.dismissible?R`<sonic-button
3276
3283
  @click=${this.close}
3277
3284
  class="close-btn"
3278
3285
  variant="unstyled"
@@ -3280,8 +3287,8 @@ ${this.value}</textarea
3280
3287
  icon
3281
3288
  >
3282
3289
  <sonic-icon name="cancel"></sonic-icon>
3283
- </sonic-button>`:D}
3284
- `}close(){if(this.remove(),this.dismissForever){const e=localStorage.getItem("sonic-alert-dismissed")||"{}",t=JSON.parse(e);t[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(t))}}};Nt.styles=[Wt,A`
3290
+ </sonic-button>`:re}
3291
+ `}close(){if(this.remove(),this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(e))}}};Ht.styles=[ss,ee`
3285
3292
  :host {
3286
3293
  --sc_color: var(--sc-base-content, #000);
3287
3294
  --sc_rounded: var(--sc-rounded);
@@ -3368,27 +3375,27 @@ ${this.value}</textarea
3368
3375
  top: 0.4rem;
3369
3376
  right: 0.3rem;
3370
3377
  }
3371
- `],Qt([a({type:String})],Nt.prototype,"label",2),Qt([a({type:Boolean,reflect:!0})],Nt.prototype,"noIcon",2),Qt([a({type:String})],Nt.prototype,"text",2),Qt([a({type:String})],Nt.prototype,"id",2),Qt([a({type:String,reflect:!0})],Nt.prototype,"size",2),Qt([a({type:Boolean,reflect:!0})],Nt.prototype,"dismissible",2),Qt([a({type:Boolean,reflect:!0})],Nt.prototype,"background",2),Qt([a({type:String,reflect:!0})],Nt.prototype,"status",2),Qt([a({type:Boolean,reflect:!0})],Nt.prototype,"dismissForever",2),Nt=Qt([$(Bd)],Nt);var Hd=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,Ms=(e,t,s,r)=>{for(var i=r>1?void 0:r?qd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Hd(t,s,i),i};const Wd="sonic-alert-messages";let ze=class extends it(C){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?v`<div class="container">
3372
- ${Kn(this.messages,e=>e.type=="public"?v`<sonic-alert
3373
- status=${e.status||"default"}
3374
- text=${k(e.content)}
3378
+ `],ls([h({type:String})],Ht.prototype,"label",2),ls([h({type:Boolean,reflect:!0})],Ht.prototype,"noIcon",2),ls([h({type:String})],Ht.prototype,"text",2),ls([h({type:String})],Ht.prototype,"id",2),ls([h({type:String,reflect:!0})],Ht.prototype,"size",2),ls([h({type:Boolean,reflect:!0})],Ht.prototype,"dismissible",2),ls([h({type:Boolean,reflect:!0})],Ht.prototype,"background",2),ls([h({type:String,reflect:!0})],Ht.prototype,"status",2),ls([h({type:Boolean,reflect:!0})],Ht.prototype,"dismissForever",2),Ht=ls([X(Yp)],Ht);var Gp=Object.defineProperty,Zp=Object.getOwnPropertyDescriptor,ii=(t,e,s,i)=>{for(var r=i>1?void 0:i?Zp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Gp(e,s,r),r};const Jp="sonic-alert-messages";let rr=class extends nt(J){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?R`<div class="container">
3379
+ ${Ta(this.messages,t=>t.type=="public"?R`<sonic-alert
3380
+ status=${t.status||"default"}
3381
+ text=${te(t.content)}
3375
3382
  size=${this.size}
3376
3383
  ?noIcon=${this.noIcon}
3377
3384
  ?background=${this.background}
3378
- ></sonic-alert>`:D)}
3379
- </div>`:D}};ze.styles=[A`
3385
+ ></sonic-alert>`:re)}
3386
+ </div>`:re}};rr.styles=[ee`
3380
3387
  .container {
3381
3388
  display: grid;
3382
3389
  gap: 0.5em;
3383
3390
  grid-template-columns: minmax(0, 1fr);
3384
3391
  width: 100%;
3385
3392
  }
3386
- `],Ms([a({type:String})],ze.prototype,"size",2),Ms([a({type:Boolean})],ze.prototype,"background",2),Ms([a({type:Boolean})],ze.prototype,"noIcon",2),Ms([a({type:Array})],ze.prototype,"messages",2),ze=Ms([$(Wd)],ze);var Kd=Object.defineProperty,Gd=Object.getOwnPropertyDescriptor,wo=(e,t,s,r)=>{for(var i=r>1?void 0:r?Gd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Kd(t,s,i),i};const Yd="sonic-toast-message-subscriber";let Sr=class extends it(C){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(e){this._messages=e,this.messages&&e.forEach(t=>{t.type=="public"&&I.add({text:t.content||"",status:t.status})})}render(){return D}};wo([a({type:Array})],Sr.prototype,"messages",1),Sr=wo([$(Yd)],Sr);var Zd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,Ns=(e,t,s,r)=>{for(var i=r>1?void 0:r?Xd(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Zd(t,s,i),i};const Qd="sonic-tooltip";let Ue=class extends C{constructor(){super(),this.label="",this.disabled=!1,this.focusable=!1,this.lastKeyWasTab=!1,this.handleKeyDown=e=>{e.key==="Tab"&&(this.lastKeyWasTab=!0)},this.handleMouseDown=()=>{this.lastKeyWasTab=!1,this.classList.remove("keyboard-focus")},this.handleFocusIn=()=>{this.lastKeyWasTab&&this.classList.add("keyboard-focus"),this.lastKeyWasTab=!1},this.handleFocusOut=()=>{this.classList.remove("keyboard-focus"),this.lastKeyWasTab=!1},this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.boundHandleMouseDown=this.handleMouseDown.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),document.addEventListener("keydown",this.boundHandleKeyDown,!0),document.addEventListener("mousedown",this.boundHandleMouseDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),document.removeEventListener("keydown",this.boundHandleKeyDown,!0),document.removeEventListener("mousedown",this.boundHandleMouseDown,!0)}willUpdate(e){if(e.has("disabled")){const t=e.get("disabled")===!0;this.disabled?(this.setAttribute("tabindex","-1"),this.classList.remove("keyboard-focus")):!this.disabled&&t&&(this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex"))}e.has("focusable")&&(this.focusable&&!this.disabled?this.setAttribute("tabindex","0"):!this.focusable&&!this.disabled&&this.removeAttribute("tabindex")),super.willUpdate(e)}render(){const e=this.disabled||this.label==""?"disabled":"";return v`<div
3393
+ `],ii([h({type:String})],rr.prototype,"size",2),ii([h({type:Boolean})],rr.prototype,"background",2),ii([h({type:Boolean})],rr.prototype,"noIcon",2),ii([h({type:Array})],rr.prototype,"messages",2),rr=ii([X(Jp)],rr);var Xp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,nl=(t,e,s,i)=>{for(var r=i>1?void 0:i?Qp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Xp(e,s,r),r};const ef="sonic-toast-message-subscriber";let lo=class extends nt(J){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach(e=>{e.type=="public"&&Ce.add({text:e.content||"",status:e.status})})}render(){return re}};nl([h({type:Array})],lo.prototype,"messages",1),lo=nl([X(ef)],lo);var tf=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,ni=(t,e,s,i)=>{for(var r=i>1?void 0:i?sf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&tf(e,s,r),r};const rf="sonic-tooltip";let ir=class extends J{constructor(){super(),this.label="",this.disabled=!1,this.focusable=!1,this.lastKeyWasTab=!1,this.handleKeyDown=t=>{t.key==="Tab"&&(this.lastKeyWasTab=!0)},this.handleMouseDown=()=>{this.lastKeyWasTab=!1,this.classList.remove("keyboard-focus")},this.handleFocusIn=()=>{this.lastKeyWasTab&&this.classList.add("keyboard-focus"),this.lastKeyWasTab=!1},this.handleFocusOut=()=>{this.classList.remove("keyboard-focus"),this.lastKeyWasTab=!1},this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.boundHandleMouseDown=this.handleMouseDown.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),document.addEventListener("keydown",this.boundHandleKeyDown,!0),document.addEventListener("mousedown",this.boundHandleMouseDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),document.removeEventListener("keydown",this.boundHandleKeyDown,!0),document.removeEventListener("mousedown",this.boundHandleMouseDown,!0)}willUpdate(t){if(t.has("disabled")){const e=t.get("disabled")===!0;this.disabled?(this.setAttribute("tabindex","-1"),this.classList.remove("keyboard-focus")):!this.disabled&&e&&(this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex"))}t.has("focusable")&&(this.focusable&&!this.disabled?this.setAttribute("tabindex","0"):!this.focusable&&!this.disabled&&this.removeAttribute("tabindex")),super.willUpdate(t)}render(){const t=this.disabled||this.label==""?"disabled":"";return R`<div
3387
3394
  data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}"
3388
- class="tooltip ${e}"
3395
+ class="tooltip ${t}"
3389
3396
  >
3390
3397
  <slot></slot>
3391
- </div>`}};Ue.styles=[A`
3398
+ </div>`}};ir.styles=[ee`
3392
3399
  :host {
3393
3400
  position: relative;
3394
3401
  display: inline-flex;
@@ -3494,11 +3501,11 @@ ${this.value}</textarea
3494
3501
  bottom: 0;
3495
3502
  left: var(--sc-tooltip-position);
3496
3503
  }
3497
- `],Ns([a({type:String})],Ue.prototype,"label",2),Ns([a({type:String,reflect:!0})],Ue.prototype,"placement",2),Ns([a({type:Boolean})],Ue.prototype,"disabled",2),Ns([a({type:Boolean})],Ue.prototype,"focusable",2),Ue=Ns([$(Qd)],Ue);var Jd=Object.defineProperty,tu=Object.getOwnPropertyDescriptor,Jt=(e,t,s,r)=>{for(var i=r>1?void 0:r?tu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Jd(t,s,i),i};const eu="sonic-divider";let Rt=class extends C{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(e){super.firstUpdated(e),(this.label||this.slotNodes?.length)&&this.divider?.classList.add("has-text")}render(){return v`<div part="divider">
3504
+ `],ni([h({type:String})],ir.prototype,"label",2),ni([h({type:String,reflect:!0})],ir.prototype,"placement",2),ni([h({type:Boolean})],ir.prototype,"disabled",2),ni([h({type:Boolean})],ir.prototype,"focusable",2),ir=ni([X(rf)],ir);var nf=Object.defineProperty,of=Object.getOwnPropertyDescriptor,cs=(t,e,s,i)=>{for(var r=i>1?void 0:i?of(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&nf(e,s,r),r};const af="sonic-divider";let Wt=class extends J{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(t){super.firstUpdated(t),(this.label||this.slotNodes?.length)&&this.divider?.classList.add("has-text")}render(){return R`<div part="divider">
3498
3505
  <span class="text"
3499
- >${U(this.label?this.label:"")}<slot></slot
3506
+ >${je(this.label?this.label:"")}<slot></slot
3500
3507
  ></span>
3501
- </div>`}};Rt.styles=[A`
3508
+ </div>`}};Wt.styles=[ee`
3502
3509
  :host {
3503
3510
  --sc-divider-my: 0.5rem;
3504
3511
  --sc-divider-mx: 0;
@@ -3629,7 +3636,7 @@ ${this.value}</textarea
3629
3636
  :host([dashed]) {
3630
3637
  --sc-divider-border-style: dashed;
3631
3638
  }
3632
- `],Jt([pt({flatten:!0})],Rt.prototype,"slotNodes",2),Jt([ue("div")],Rt.prototype,"divider",2),Jt([a({type:String})],Rt.prototype,"label",2),Jt([a({type:String,reflect:!0})],Rt.prototype,"size",2),Jt([a({type:String,reflect:!0})],Rt.prototype,"align",2),Jt([a({type:Boolean,reflect:!0})],Rt.prototype,"vertical",2),Jt([a({type:Boolean,reflect:!0})],Rt.prototype,"noMargin",2),Jt([a({type:Boolean,reflect:!0})],Rt.prototype,"dashed",2),Jt([a({type:Boolean,reflect:!0})],Rt.prototype,"dotted",2),Rt=Jt([$(eu)],Rt);var su=Object.getOwnPropertyDescriptor,iu=(e,t,s,r)=>{for(var i=r>1?void 0:r?su(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const ru="sonic-card-header-description";let $r=class extends C{render(){return v`<slot></slot>`}};$r.styles=[A`
3639
+ `],cs([bt({flatten:!0})],Wt.prototype,"slotNodes",2),cs([Cs("div")],Wt.prototype,"divider",2),cs([h({type:String})],Wt.prototype,"label",2),cs([h({type:String,reflect:!0})],Wt.prototype,"size",2),cs([h({type:String,reflect:!0})],Wt.prototype,"align",2),cs([h({type:Boolean,reflect:!0})],Wt.prototype,"vertical",2),cs([h({type:Boolean,reflect:!0})],Wt.prototype,"noMargin",2),cs([h({type:Boolean,reflect:!0})],Wt.prototype,"dashed",2),cs([h({type:Boolean,reflect:!0})],Wt.prototype,"dotted",2),Wt=cs([X(af)],Wt);var lf=Object.getOwnPropertyDescriptor,cf=(t,e,s,i)=>{for(var r=i>1?void 0:i?lf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const hf="sonic-card-header-description";let co=class extends J{render(){return R`<slot></slot>`}};co.styles=[ee`
3633
3640
  :host() {
3634
3641
  display: block;
3635
3642
  font-size: 0.7em;
@@ -3637,16 +3644,16 @@ ${this.value}</textarea
3637
3644
  font-family: var(--sc-font-family-base, sans-serif);
3638
3645
  font-weight: var(--sc-font-style-base, normal);
3639
3646
  }
3640
- `],$r=iu([$(ru)],$r);var nu=Object.defineProperty,ou=Object.getOwnPropertyDescriptor,Ar=(e,t,s,r)=>{for(var i=r>1?void 0:r?ou(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&nu(t,s,i),i};const au="sonic-card-header";let Rs=class extends C{render(){return v`
3647
+ `],co=cf([X(hf)],co);var uf=Object.defineProperty,df=Object.getOwnPropertyDescriptor,ho=(t,e,s,i)=>{for(var r=i>1?void 0:i?df(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&uf(e,s,r),r};const pf="sonic-card-header";let oi=class extends J{render(){return R`
3641
3648
  <div class="header-content">
3642
- ${U(this.label)}
3643
- ${this.description?v`<sonic-card-header-description
3644
- >${U(this.description)}</sonic-card-header-description
3645
- >`:D}
3649
+ ${je(this.label)}
3650
+ ${this.description?R`<sonic-card-header-description
3651
+ >${je(this.description)}</sonic-card-header-description
3652
+ >`:re}
3646
3653
  <slot></slot>
3647
3654
  </div>
3648
3655
  <slot name="suffix"></slot>
3649
- `}};Rs.styles=[A`
3656
+ `}};oi.styles=[ee`
3650
3657
  :host {
3651
3658
  --sc-card-header-mb: 1.35rem;
3652
3659
  --sc-card-header-font-size: 1.875rem;
@@ -3684,15 +3691,15 @@ ${this.value}</textarea
3684
3691
  ::slotted(sonic-card-header-description) {
3685
3692
  margin-top: 0.1em;
3686
3693
  }
3687
- `],Ar([a()],Rs.prototype,"label",2),Ar([a()],Rs.prototype,"description",2),Rs=Ar([$(au)],Rs);var lu=Object.getOwnPropertyDescriptor,cu=(e,t,s,r)=>{for(var i=r>1?void 0:r?lu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const hu="sonic-card-main";let kr=class extends C{render(){return v`<slot></slot>`}};kr.styles=[A`
3694
+ `],ho([h()],oi.prototype,"label",2),ho([h()],oi.prototype,"description",2),oi=ho([X(pf)],oi);var ff=Object.getOwnPropertyDescriptor,gf=(t,e,s,i)=>{for(var r=i>1?void 0:i?ff(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const bf="sonic-card-main";let uo=class extends J{render(){return R`<slot></slot>`}};uo.styles=[ee`
3688
3695
  :host {
3689
3696
  display: block;
3690
3697
  }
3691
- `],kr=cu([$(hu)],kr);var du=Object.getOwnPropertyDescriptor,uu=(e,t,s,r)=>{for(var i=r>1?void 0:r?du(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const pu="sonic-card-footer";let Dr=class extends C{render(){return v` <slot></slot> `}};Dr.styles=[A`
3698
+ `],uo=gf([X(bf)],uo);var mf=Object.getOwnPropertyDescriptor,vf=(t,e,s,i)=>{for(var r=i>1?void 0:i?mf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const yf="sonic-card-footer";let po=class extends J{render(){return R` <slot></slot> `}};po.styles=[ee`
3692
3699
  :host {
3693
3700
  display: block;
3694
3701
  }
3695
- `],Dr=uu([$(pu)],Dr);const Or=A`
3702
+ `],po=vf([X(yf)],po);const fo=ee`
3696
3703
  :host {
3697
3704
  --sc-_color: inherit;
3698
3705
  color: var(--sc-_color);
@@ -3717,7 +3724,7 @@ ${this.value}</textarea
3717
3724
  .inherit-color {
3718
3725
  color: var(--sc-_color);
3719
3726
  }
3720
- `,fu=A`
3727
+ `,wf=ee`
3721
3728
  :host {
3722
3729
  --sc-_color: inherit;
3723
3730
  --sc-_bg: inherit;
@@ -3780,7 +3787,7 @@ ${this.value}</textarea
3780
3787
  .inherit-bg {
3781
3788
  color: inherit;
3782
3789
  }
3783
- `;var mu=Object.defineProperty,bu=Object.getOwnPropertyDescriptor,_o=(e,t,s,r)=>{for(var i=r>1?void 0:r?bu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&mu(t,s,i),i};const gu="sonic-card";let xi=class extends C{constructor(){super(...arguments),this.type="base"}render(){return v`<slot></slot> `}};xi.styles=[fu,A`
3790
+ `;var _f=Object.defineProperty,xf=Object.getOwnPropertyDescriptor,ol=(t,e,s,i)=>{for(var r=i>1?void 0:i?xf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&_f(e,s,r),r};const Pf="sonic-card";let Qi=class extends J{constructor(){super(...arguments),this.type="base"}render(){return R`<slot></slot> `}};Qi.styles=[wf,ee`
3784
3791
  * {
3785
3792
  box-sizing: border-box;
3786
3793
  }
@@ -3810,7 +3817,7 @@ ${this.value}</textarea
3810
3817
  box-shadow: var(--sc-_shadow);
3811
3818
  color: var(--sc-_color);
3812
3819
  }
3813
- `],_o([a({type:String,reflect:!0})],xi.prototype,"type",2),xi=_o([$(gu)],xi);var vu=Object.defineProperty,yu=Object.getOwnPropertyDescriptor,Fs=(e,t,s,r)=>{for(var i=r>1?void 0:r?yu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&vu(t,s,i),i};const wu="sonic-tr";let Ve=class extends it(C){constructor(){super(...arguments),this._metadata_={}}willUpdate(e){e.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(e)}render(){return v`<slot></slot>`}};Ve.styles=[Or,A`
3820
+ `],ol([h({type:String,reflect:!0})],Qi.prototype,"type",2),Qi=ol([X(Pf)],Qi);var Sf=Object.defineProperty,Af=Object.getOwnPropertyDescriptor,ai=(t,e,s,i)=>{for(var r=i>1?void 0:i?Af(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Sf(e,s,r),r};const Cf="sonic-tr";let nr=class extends nt(J){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>`}};nr.styles=[fo,ee`
3814
3821
  :host {
3815
3822
  display: table-row;
3816
3823
  }
@@ -3828,14 +3835,14 @@ ${this.value}</textarea
3828
3835
  :host(:hover) {
3829
3836
  background: var(--sc-table-hover-bg) !important;
3830
3837
  }
3831
- `],Fs([a({type:Object})],Ve.prototype,"_metadata_",2),Fs([a({type:Boolean,reflect:!0})],Ve.prototype,"even",2),Fs([a({type:Boolean,reflect:!0})],Ve.prototype,"odd",2),Fs([a({type:Boolean,reflect:!0})],Ve.prototype,"last",2),Ve=Fs([$(wu)],Ve);var _u=Object.defineProperty,xu=Object.getOwnPropertyDescriptor,Be=(e,t,s,r)=>{for(var i=r>1?void 0:r?xu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&_u(t,s,i),i};const Pu="sonic-th";let le=class extends C{render(){const e={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return v`<th
3838
+ `],ai([h({type:Object})],nr.prototype,"_metadata_",2),ai([h({type:Boolean,reflect:!0})],nr.prototype,"even",2),ai([h({type:Boolean,reflect:!0})],nr.prototype,"odd",2),ai([h({type:Boolean,reflect:!0})],nr.prototype,"last",2),nr=ai([X(Cf)],nr);var kf=Object.defineProperty,$f=Object.getOwnPropertyDescriptor,or=(t,e,s,i)=>{for(var r=i>1?void 0:i?$f(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&kf(e,s,r),r};const Df="sonic-th";let ws=class extends J{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<th
3832
3839
  part="th"
3833
- style=${wt(e)}
3834
- colspan=${k(this.colSpan)}
3835
- rowspan=${k(this.rowSpan)}
3840
+ style=${$t(t)}
3841
+ colspan=${te(this.colSpan)}
3842
+ rowspan=${te(this.rowSpan)}
3836
3843
  >
3837
3844
  <slot></slot>
3838
- </th> `}};le.styles=[Or,A`
3845
+ </th> `}};ws.styles=[fo,ee`
3839
3846
  :host {
3840
3847
  display: contents;
3841
3848
  background: var(--sc-table-bg);
@@ -3858,9 +3865,9 @@ ${this.value}</textarea
3858
3865
  :host([noBorder]) th {
3859
3866
  border-bottom: none;
3860
3867
  }
3861
- `],Be([a({type:Number})],le.prototype,"colSpan",2),Be([a({type:Number})],le.prototype,"rowSpan",2),Be([a({type:String})],le.prototype,"align",2),Be([a({type:String})],le.prototype,"minWidth",2),Be([a({type:String})],le.prototype,"maxWidth",2),Be([a({type:String})],le.prototype,"width",2),le=Be([$(Pu)],le);var Cu=Object.defineProperty,Su=Object.getOwnPropertyDescriptor,Ce=(e,t,s,r)=>{for(var i=r>1?void 0:r?Su(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Cu(t,s,i),i};const $u="sonic-td";let te=class extends C{render(){const e={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return v`<td part="td" style=${wt(e)} colspan=${k(this.colSpan)} rowspan=${k(this.rowSpan)}>
3868
+ `],or([h({type:Number})],ws.prototype,"colSpan",2),or([h({type:Number})],ws.prototype,"rowSpan",2),or([h({type:String})],ws.prototype,"align",2),or([h({type:String})],ws.prototype,"minWidth",2),or([h({type:String})],ws.prototype,"maxWidth",2),or([h({type:String})],ws.prototype,"width",2),ws=or([X(Df)],ws);var Ef=Object.defineProperty,Of=Object.getOwnPropertyDescriptor,Rs=(t,e,s,i)=>{for(var r=i>1?void 0:i?Of(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ef(e,s,r),r};const Tf="sonic-td";let hs=class extends J{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<td part="td" style=${$t(t)} colspan=${te(this.colSpan)} rowspan=${te(this.rowSpan)}>
3862
3869
  <slot></slot>
3863
- </td>`}};te.styles=[Or,A`
3870
+ </td>`}};hs.styles=[fo,ee`
3864
3871
  :host {
3865
3872
  display: contents;
3866
3873
  }
@@ -3873,13 +3880,13 @@ ${this.value}</textarea
3873
3880
  border-right: var(--sc-table-td-border-r, none);
3874
3881
  border-left: var(--sc-table-td-border-l, none);
3875
3882
  }
3876
- `],Ce([a({type:Number})],te.prototype,"colSpan",2),Ce([a({type:Number})],te.prototype,"rowSpan",2),Ce([a({type:String})],te.prototype,"align",2),Ce([a({type:String})],te.prototype,"vAlign",2),Ce([a({type:String})],te.prototype,"minWidth",2),Ce([a({type:String})],te.prototype,"maxWidth",2),Ce([a({type:String})],te.prototype,"width",2),te=Ce([$($u)],te);var Au=Object.getOwnPropertyDescriptor,ku=(e,t,s,r)=>{for(var i=r>1?void 0:r?Au(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Du="sonic-thead";let Er=class extends C{render(){return v`<slot></slot>`}};Er.styles=[A`
3883
+ `],Rs([h({type:Number})],hs.prototype,"colSpan",2),Rs([h({type:Number})],hs.prototype,"rowSpan",2),Rs([h({type:String})],hs.prototype,"align",2),Rs([h({type:String})],hs.prototype,"vAlign",2),Rs([h({type:String})],hs.prototype,"minWidth",2),Rs([h({type:String})],hs.prototype,"maxWidth",2),Rs([h({type:String})],hs.prototype,"width",2),hs=Rs([X(Tf)],hs);var Lf=Object.getOwnPropertyDescriptor,Mf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Lf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Nf="sonic-thead";let go=class extends J{render(){return R`<slot></slot>`}};go.styles=[ee`
3877
3884
  :host {
3878
3885
  display: table-header-group;
3879
3886
  }
3880
- `],Er=ku([$(Du)],Er);var Ou=Object.getOwnPropertyDescriptor,Eu=(e,t,s,r)=>{for(var i=r>1?void 0:r?Ou(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Lu="sonic-tbody";let Lr=class extends C{render(){return v`<tbody part="tbody">
3887
+ `],go=Mf([X(Nf)],go);var If=Object.getOwnPropertyDescriptor,Ff=(t,e,s,i)=>{for(var r=i>1?void 0:i?If(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const jf="sonic-tbody";let bo=class extends J{render(){return R`<tbody part="tbody">
3881
3888
  <slot></slot>
3882
- </tbody>`}};Lr.styles=[A`
3889
+ </tbody>`}};bo.styles=[ee`
3883
3890
  :host {
3884
3891
  display: table-row-group;
3885
3892
  }
@@ -3896,29 +3903,29 @@ ${this.value}</textarea
3896
3903
  border-bottom: var(--sc-form-border-width) solid
3897
3904
  var(--sc-base-200, rgba(0, 0, 0, 0.12)) !important;
3898
3905
  }
3899
- `],Lr=Eu([$(Lu)],Lr);var Tu=Object.getOwnPropertyDescriptor,Iu=(e,t,s,r)=>{for(var i=r>1?void 0:r?Tu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Mu="sonic-tfoot";let Tr=class extends C{render(){return v`<tfoot>
3906
+ `],bo=Ff([X(jf)],bo);var Rf=Object.getOwnPropertyDescriptor,zf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Uf="sonic-tfoot";let mo=class extends J{render(){return R`<tfoot>
3900
3907
  <slot></slot>
3901
- </tfoot>`}};Tr.styles=[A`
3908
+ </tfoot>`}};mo.styles=[ee`
3902
3909
  :host {
3903
3910
  display: contents;
3904
3911
  }
3905
- `],Tr=Iu([$(Mu)],Tr);var Nu=Object.getOwnPropertyDescriptor,Ru=(e,t,s,r)=>{for(var i=r>1?void 0:r?Nu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=o(i)||i);return i};const Fu="sonic-caption";let Ir=class extends C{render(){return v`<slot></slot>`}};Ir.styles=[A`
3912
+ `],mo=zf([X(Uf)],mo);var qf=Object.getOwnPropertyDescriptor,Vf=(t,e,s,i)=>{for(var r=i>1?void 0:i?qf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Bf="sonic-caption";let vo=class extends J{render(){return R`<slot></slot>`}};vo.styles=[ee`
3906
3913
  :host {
3907
3914
  display: table-caption;
3908
3915
  font-size: 0.75rem;
3909
3916
  color: var(--sc-table-caption-color);
3910
3917
  padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
3911
3918
  }
3912
- `],Ir=Ru([$(Fu)],Ir);var ju=Object.defineProperty,zu=Object.getOwnPropertyDescriptor,os=(e,t,s,r)=>{for(var i=r>1?void 0:r?zu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&ju(t,s,i),i};const Uu="sonic-table";let Se=class extends C{render(){const e={maxHeight:this.maxHeight};return v`
3919
+ `],vo=Vf([X(Bf)],vo);var Hf=Object.defineProperty,Wf=Object.getOwnPropertyDescriptor,Cr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Wf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Hf(e,s,r),r};const Kf="sonic-table";let zs=class extends J{render(){const t={maxHeight:this.maxHeight};return R`
3913
3920
  <div
3914
3921
  class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
3915
- style=${wt(e)}
3922
+ style=${$t(t)}
3916
3923
  >
3917
3924
  <div class="table">
3918
3925
  <slot></slot>
3919
3926
  </div>
3920
3927
  </div>
3921
- `}};Se.styles=[Ss,Wt,A`
3928
+ `}};zs.styles=[Yr,ss,ee`
3922
3929
  :host {
3923
3930
  --sc-table-fw: var(--sc-font-weight-base, 400);
3924
3931
  --sc-table-fst: var(--sc-font-style-base, normal);
@@ -3963,7 +3970,7 @@ ${this.value}</textarea
3963
3970
  --sc-table-td-border-b: var(--sc-table-bw) solid
3964
3971
  var(--sc-table-border-color);
3965
3972
  }
3966
- `],os([a({type:String,reflect:!0})],Se.prototype,"size",2),os([a({type:Boolean,reflect:!0})],Se.prototype,"bordered",2),os([a({type:Boolean,reflect:!0})],Se.prototype,"rounded",2),os([a({type:Boolean,reflect:!0})],Se.prototype,"noCustomScroll",2),os([a({type:String})],Se.prototype,"maxHeight",2),Se=os([$(Uu)],Se);const xo="AES-CBC",Vu=256;async function Bu(){return crypto.subtle.generateKey({name:xo,length:Vu},!0,["encrypt","decrypt"])}function Hu(e){return btoa(String.fromCharCode(...new Uint8Array(e)))}async function qu(e,t,s){const r=new TextEncoder().encode(e),i=await crypto.subtle.encrypt({name:xo,iv:s.buffer},t,r);return Hu(i)}const Wu=A`
3973
+ `],Cr([h({type:String,reflect:!0})],zs.prototype,"size",2),Cr([h({type:Boolean,reflect:!0})],zs.prototype,"bordered",2),Cr([h({type:Boolean,reflect:!0})],zs.prototype,"rounded",2),Cr([h({type:Boolean,reflect:!0})],zs.prototype,"noCustomScroll",2),Cr([h({type:String})],zs.prototype,"maxHeight",2),zs=Cr([X(Kf)],zs);const al="AES-CBC",Yf=256;async function Gf(){return crypto.subtle.generateKey({name:al,length:Yf},!0,["encrypt","decrypt"])}function Zf(t){return btoa(String.fromCharCode(...new Uint8Array(t)))}async function Jf(t,e,s){const i=new TextEncoder().encode(t),r=await crypto.subtle.encrypt({name:al,iv:s.buffer},e,i);return Zf(r)}const Xf=ee`
3967
3974
  @keyframes altcha-spinner {
3968
3975
  to {
3969
3976
  transform: rotate(360deg);
@@ -4186,7 +4193,7 @@ ${this.value}</textarea
4186
4193
  animation: altcha-spinner 0.75s infinite linear;
4187
4194
  transform-origin: center;
4188
4195
  }
4189
- `;var Ku=Object.defineProperty,Gu=Object.getOwnPropertyDescriptor,Pi=(e,t,s,r)=>{for(var i=r>1?void 0:r?Gu(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&Ku(t,s,i),i};const Yu="supersoniks_altcha",Zu="Si2\\]X8M4!n9DCLd";let Po=!1;const Xu="sonic-captcha";let as=class extends ve(C){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=e=>{e=="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(!Po){const e=document.createElement("script");e.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),e.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",Po=!0,document.head.appendChild(e)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=qs(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 e=this.shadowRoot.querySelector("form");if(!e)return;const t=new FormData(e);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(t.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const e=await Bu(),t=new TextEncoder().encode(Zu),s=await qu(Yu,e,t);this.key=s}render(){if(!this.key)return D;const t=ie.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 v`
4196
+ `;var Qf=Object.defineProperty,eg=Object.getOwnPropertyDescriptor,en=(t,e,s,i)=>{for(var r=i>1?void 0:i?eg(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Qf(e,s,r),r};const tg="supersoniks_altcha",sg="Si2\\]X8M4!n9DCLd";let ll=!1;const rg="sonic-captcha";let kr=class extends Ts(J){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(!ll){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",ll=!0,document.head.appendChild(t)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=vi(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 Gf(),e=new TextEncoder().encode(sg),s=await Jf(tg,t,e);this.key=s}render(){if(!this.key)return re;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`
4190
4197
  <form>
4191
4198
  <altcha-widget
4192
4199
  challengeurl="${this.chalengeUrl}?key=${this.key}&maxNumber=${this.maxNumber}"
@@ -4194,11 +4201,11 @@ ${this.value}</textarea
4194
4201
  hidelogo
4195
4202
  hidefooter
4196
4203
  auto="onfocus"
4197
- strings=${JSON.stringify(t)}
4204
+ strings=${JSON.stringify(e)}
4198
4205
  ></altcha-widget>
4199
4206
  </form>
4200
4207
  <slot></slot>
4201
- `}};as.styles=[Wu,A`
4208
+ `}};kr.styles=[Xf,ee`
4202
4209
  :host {
4203
4210
  --altcha-border-width: var(--sc-border-width, 1px);
4204
4211
  --altcha-border-radius: var(--sc-rounded);
@@ -4217,4 +4224,4 @@ ${this.value}</textarea
4217
4224
  --altcha-color-footer-bg: var(--sc-base-100, #000);
4218
4225
  --altcha-max-width: 260px;
4219
4226
  }
4220
- `],Pi([a()],as.prototype,"key",2),Pi([a()],as.prototype,"action",2),Pi([a({type:Number})],as.prototype,"zIndex",2),as=Pi([$(Xu)],as),window.queueMicrotask=window.queueMicrotask||function(e){Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))};class Qu extends zi{constructor(t){super(t),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=s=>{this.setValue(s)},this.node=t.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(t=>t()),this.cleanupWatchers=[]}normalizeInput(t){return On(t)?t.path:t}render(t){const s=this.normalizeInput(t),r=this.pathTemplate!==s;return r&&(this.pathTemplate=s,this.teardownWatchers()),(r||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),Dt}setupSubscription(){const t=this.node,s=this.pathTemplate;if(!t||!s)return;this.teardownWatchers();const r=Lt(s);if(r.length>0)for(const i of r)this.cleanupWatchers.push(be(ai.watcherStore,ai.hooked,t,i,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const t=this.node,s=this.pathTemplate;if(!s)return;const r=Lt(s).length>0;let i=s;if(r)if(!t)i=null;else{const n=Ct(t,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(t){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=Bs(t),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(t=>t.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const Co=fe(Qu),Ju=Co,tp=Co;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:qs,dataProvider:No,sub:tp,subscribe:Ju,get:Mo,set:Ro};const ep=I,sp=M;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:ep,SonicModal:sp};const ip=window;ip.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));
4227
+ `],en([h()],kr.prototype,"key",2),en([h()],kr.prototype,"action",2),en([h({type:Number})],kr.prototype,"zIndex",2),kr=en([X(rg)],kr),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))};class ig extends _n{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 ga(e)?e.path:e}render(e){const s=this.normalizeInput(e),i=this.pathTemplate!==s;return i&&(this.pathTemplate=s,this.teardownWatchers()),(i||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),It}setupSubscription(){const e=this.node,s=this.pathTemplate;if(!e||!s)return;this.teardownWatchers();const i=Ut(s);if(i.length>0)for(const r of i)this.cleanupWatchers.push(Es(ji.watcherStore,ji.hooked,e,r,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const e=this.node,s=this.pathTemplate;if(!s)return;const i=Ut(s).length>0;let r=s;if(i)if(!e)r=null;else{const n=Ot(e,s);r=n.ready?n.path:null}if(r!==this.resolvedPath){if(!r){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=r,this.subscribe(r)}}subscribe(e){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=bi(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 cl=$s(ig),ng=cl,og=cl;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:vi,dataProvider:Pl,sub:og,subscribe:ng,get:xl,set:Sl};const ag=Ce,lg=Ee;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:ag,SonicModal:lg};const cg=window;cg.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));